BizHawk icon indicating copy to clipboard operation
BizHawk copied to clipboard

Adding Stella as A2600 emulation core

Open SergioMartin86 opened this issue 1 year ago • 2 comments

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

SergioMartin86 avatar May 03 '24 17:05 SergioMartin86

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)

CasualPokePlayer avatar May 05 '24 20:05 CasualPokePlayer

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 avatar May 09 '24 08:05 SergioMartin86

I think this can be merged (after conflicts are fixed) and completed later in master.

vadosnaprimer avatar Aug 05 '24 15:08 vadosnaprimer

  • Conflicts have been resolved
  • Waterboxed core added
  • Fully working for discrete inputs

image

SergioMartin86 avatar Aug 11 '24 15:08 SergioMartin86

_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

SergioMartin86 avatar Sep 08 '24 16:09 SergioMartin86

These are CPP's requests as committable diffs.

Thanks, committed.

SergioMartin86 avatar Sep 08 '24 17:09 SergioMartin86

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)

YoshiRulz avatar Sep 10 '24 11:09 YoshiRulz

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?

SergioMartin86 avatar Sep 10 '24 12:09 SergioMartin86

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.

YoshiRulz avatar Sep 10 '24 12:09 YoshiRulz

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

image

SergioMartin86 avatar Sep 10 '24 17:09 SergioMartin86