a2-4am / 4cade

100s of games at your fingertips, as long as your fingertips are on an Apple ][
https://archive.org/details/TotalReplay
MIT License
153 stars 21 forks source link

Planetoids hangs just after game start #600

Closed frankmilliron closed 5 months ago

frankmilliron commented 5 months ago

Just after the game field is drawn, a couple frames will advance then the game hangs.

peterferrie commented 5 months ago

I can't reproduce this in Virtual II. Please send a save-state.

frankmilliron commented 5 months ago

OK weird. Virtual ][ is just beachballing when I try to save a Machine Snapshot. Nevermind... If I remove the Z80 card it works.

peterferrie commented 5 months ago

That's still a thing to fix. I will try with the Z80 card.

On Thu, 13 Jun 2024 at 19:06, frankmilliron @.***> wrote:

OK weird. Virtual ][ is just beachballing when I try to save a Machine Snapshot. Nevermind... If I remove the Z80 card it works.

— Reply to this email directly, view it on GitHub https://github.com/a2-4am/4cade/issues/600#issuecomment-2167079070, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWSFM5YI3TGGYHG5EPG45LZHJF37AVCNFSM6AAAAABJIZU6Y6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRXGA3TSMBXGA . You are receiving this because you commented.Message ID: @.***>

frankmilliron commented 5 months ago

The main game loop runs from $821 to $851. It runs through three times normally, then hangs on the fourth time through the loop, on the JSR $ED2, never exiting the loop from $F1E to $F37.

peterferrie commented 5 months ago

That loop has a guaranteed exit condition, so it's something else maybe corrupting the code. Please send a save-state.

frankmilliron commented 5 months ago

Wow. I really can't save a Machine State without hanging Virtual ][. The indirect, indexed read at $F2E (and others) from $70/71 may be getting corrupted. Points to $C2A0 once it's hung and I can see it looping through softswitch addresses it shouldn't. One of those has to be activating the Z80 hardware.

peterferrie commented 5 months ago

There's a theme here. $600-7FF content is missing in Marble Madness (which then causes the hang on pressing space), and presumably is damaged here, too (it holds the pointers used to set $70-71). I will keep looking.

peterferrie commented 5 months ago

Please send a save-state before starting play. Maybe I can trace from that point.

frankmilliron commented 5 months ago

Attached. PC was at $95E when I halted it. Hit 'P' to start. Planetoids.viisnapshot.zip

peterferrie commented 5 months ago

Perfect. It's a game bug. I will fix it.

peterferrie commented 5 months ago

fixed in d52883974c62b14914afdc96a04a6b1797d85864