cyborgar / Petaxian

C64 Galaga type game implemented in Prog8
GNU General Public License v3.0
16 stars 3 forks source link

freezes on title screen in box16 emulator #3

Closed irmen closed 3 years ago

irmen commented 3 years ago

It hangs in the joystick pull_info() routine, because that contains a STP instruction for unclear reasons.

STP locks up the CPU : "STP stops the clock input of the 65C02, effectively shutting down the 65C02 until a hardware reset occurs (i.e. the RES pin goes low). This puts the 65C02 into a low power state. This is useful for applications (circuits) that require low power consumption, but STP is rarely seen otherwise. "

As the game runs fine on the official emulator, I think the official emulator doesn't process the STP instruction accurately.

I suggest removing the STP instruction there, as I guess it was a mistake/typo to put it in there in the first place?

cyborgar commented 3 years ago

This must have snuck in by some accident. Perhaps in some copy & past operation when the function was originally added though I can't really see what snippet I could have copied that used STP. In any case it's fixed now I hope.