Space Harrier 2 Reverse Engineering and ROM Hacking Thread

Faceless Fox

The mysterious arctic fox
Banished
Messages
11
Location
France
Over the past few days I've been working on a disassembly for Space Harrier 2. Here, we can post findings, questions, and progress on Space Harrier 2 research and modding.
To start things, I've found that Space Harrier 2 uses the same SDK (software development kit) as the original Sonic the Hedgehog. My evidence supporting this is that the stack pointer is in the same location (0xFFFE00), and it has a very similar game mode array to Sonic.
1638484304958.png
I'll continue to provide updates on the disassembly and any interesting things that come up. Hope there is interest for hacking this game!
1638485660624.png
(Here's a cute little screen to go with the thread too)
 
I've made some good progress on the disassembly today. I've found that the game uses a table in RAM for calculating the perspective of the ground for H-Int at 0xFFEE00. And there is a pointer to this perspective table in 0xFFF01A. Here is the H-Int routine in question.
Code:
HInt:
        move.l  #$40020010,(VDPCtrlPort).l
        addq.w  #2,($FFF01C).w
        move.l  a0,-(sp)
        movea.l (perspectiveTablePtr).w,a0
        move.w  (a0),(VDPDataPort).l
        movea.l (sp)+,a0
        rte
; End of function HInt
I'm still looking for the code to calculate the perspective though.
Next, I have found the location for Harrier as an object. I've been using this as a base to figure out the rest of the object variables. I suspect 0x39 and 0x3A to be the X and Y hitboxes, but the evidence towards it is kind of weak. I also suspect 0xE to be the art tile, but when I calculated Harrier's art tile it didn't quite match. My results came out to 0x2580 but the actual value Harrier's object uses is $4500. It could be possible I miscalculated though. The biggest mystery to me right now is 0x4, the value for it is always 0x2YY or higher.
Edit: I've definitely confirmed 0xE to be the art tile.
The pause function has also been documented, interestingly its done in the subroutine to read the joypads.
Code:
checkPause:
                tst.b   (canPause).w
                beq.w   _return         ; check if you can pause right now
                btst    #7,(a0)
                beq.w   _return         ; check if start is pressed
                move.b  (pauseFlag).w,d0
                not.b   d0
                andi.b  #1,d0
                move.b  d0,(pauseFlag).w ; invert pause flag
                addi.w  #$B7,d0         ; play the pause noise
                bsr.w   queueSound

_return:
                rts
 
Last edited:
Back
Top