Need help to understand sonic rom [Resolved]
Posted: Mon Feb 08, 2021 8:30 pm
I'm actually implementing higan 68k core in my emulator and i would need help in understanding the code of sonic rom.
My emulator actually loop at this place :
With other 68k core (musashi, c68k ...) everything works ok.
Edit :
if found this in a sonic dissasembly :
I imagine the data located at the adress ($FFFFF62A) is decremented at each V-interrupt until it reach 0 value.
So a infinite loop would mean that v-interrupt subroutine is not executed by the core
My emulator actually loop at this place :
Code: Select all
0029AC TST.b $FFFFF62A.w
0029B0 BNE.b *+$FA => 0029AC
Edit :
if found this in a sonic dissasembly :
Code: Select all
; ---------------------------------------------------------------------------
; Subroutine to delay the program by ($FFFFF62A) frames
; ---------------------------------------------------------------------------
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
DelayProgram: ; XREF: PauseGame
move #$2300,sr
loc_29AC:
tst.b ($FFFFF62A).w
bne.s loc_29AC
rts
; End of function DelayProgram
So a infinite loop would mean that v-interrupt subroutine is not executed by the core