Adding Stella as A2600 emulation core
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:
-
[x] I have run any relevant test suites
-
[x] I, the committer, have read the licensing terms for contributors (last updated 2024-03-20) and am compliant
-
[x] Load Rom
-
[x] Advancing Frame
-
[x] Processing Digital Inputs
-
[ ] Processing Analog Inputs
-
[x] Rendering frame into the screen
-
[x] Rendering sound
-
[x] Memory Accesses
-
[ ] CPU Hooks
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)
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
I think this can be merged (after conflicts are fixed) and completed later in master.
- Conflicts have been resolved
- Waterboxed core added
- Fully working for discrete inputs
_byteArrayDomains is unused (I assume this is copy paste from a2600hawk)
Also, probably should ensure the
Main RAMdomain is the IMemoryDomain'sMainMemory.
I'm not sure exactly what changes are being requested here
These are CPP's requests as committable diffs.
Thanks, committed.
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)
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?
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.
Pitfall! works now after extending the sound buffer from 4K to 1Mb. Thanks to Morilli for the backtrace needed to find this issue