Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Stella as A2600 emulation core #3911

Merged
merged 52 commits into from
Sep 11, 2024

Conversation

SergioMartin86
Copy link
Contributor

@SergioMartin86 SergioMartin86 commented May 3, 2024

Adding Stella as A2600 emulator.

Progress has been painful and messy; don't expect minimalism during this first stage. We can do the fine tuning once everything works correctly.

Check if completed:

  • Load Rom
  • Advancing Frame
  • Processing Digital Inputs
  • Processing Analog Inputs
  • Rendering frame into the screen
  • Rendering sound
  • Memory Accesses
  • CPU Hooks

resolves #2001

@CasualPokePlayer
Copy link
Member

Note, GPGX isn't particularly the best example of how to do a waterbox core, if it's at all possible use the standard WaterboxCore base class (see PicoDrive, TIC80, uzem, as simple examples of this being used)

@SergioMartin86
Copy link
Contributor Author

Ok, opening this PR for review. This is a summary of what's been done:

  • Emulation works correctly for several games I tested (including Myst, which apparently a2600hawk does not support)
  • Video is rendering correctly
  • Audio is also playing correctly, except for the first few frames or so (try Frogger (USA).a26)
  • Statable interface correctly implemented
  • Memory domains correctly showing
  • Digital Controllers working

To-Dos:

  • Analog controllers (paddle) not currently supported
  • CPU hooks and debug functonality not current implemented

@SergioMartin86 SergioMartin86 marked this pull request as ready for review May 9, 2024 08:58
.vscode/settings.json Outdated Show resolved Hide resolved
Copy link
Member

@CasualPokePlayer CasualPokePlayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_byteArrayDomains is unused (I assume this is copy paste from a2600hawk)

Also, probably should ensure the Main RAM domain is the IMemoryDomain's MainMemory.

@SergioMartin86
Copy link
Contributor Author

_byteArrayDomains is unused (I assume this is copy paste from a2600hawk)

Also, probably should ensure the Main RAM domain is the IMemoryDomain's MainMemory.

I'm not sure exactly what changes are being requested here

Copy link
Member

@YoshiRulz YoshiRulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are CPP's requests as committable diffs.

@SergioMartin86
Copy link
Contributor Author

These are CPP's requests as committable diffs.

Thanks, committed.

waterbox/common.mak Outdated Show resolved Hide resolved
@YoshiRulz
Copy link
Member

Crash before rom finishes loading:

[...]
A2600 console created successfully
[Stella] Cart type loaded: 4K (string size: 2, ptr: 3775284406225)
Calling ecl_seal()
WaterboxHost Sealed!
Trace/breakpoint trap (core dumped)

@SergioMartin86
Copy link
Contributor Author

Crash before rom finishes loading:

[...]
A2600 console created successfully
[Stella] Cart type loaded: 4K (string size: 2, ptr: 3775284406225)
Calling ecl_seal()
WaterboxHost Sealed!
Trace/breakpoint trap (core dumped)

Can you tell me what game you're trying to run?

@YoshiRulz
Copy link
Member

YoshiRulz commented Sep 10, 2024

Pitfall! (SHA1:8D525480445D48CC48460DC666EBAD78C8FB7B73). Atari2600Hawk loads it with the m4K mapper.

edit: Several other titles, all with that mapper, load in Atari2600Hawk but blackscreen in Stella. The blackscreening only happens with the GDI+ display method. The Pitfall! crash was reproduced and may be fixed, but that I happened to pick that to try was just bad luck. With the OpenGL display method, I can see those other titles.

Copy link
Member

@YoshiRulz YoshiRulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for squash merge in this functional state, as per #3911 (comment).

@SergioMartin86
Copy link
Contributor Author

Pitfall! works now after extending the sound buffer from 4K to 1Mb. Thanks to Morilli for the backtrace needed to find this issue

image

@vadosnaprimer vadosnaprimer merged commit bf8758e into TASEmulators:master Sep 11, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Stella to Bizhawk for Atari 2600 emulation.
6 participants