Hacking the ST rom


Inputs only Directions and Punches

ADR   Change
1D2BC 804001
1D2C8 804000


CPS2 Input notes aka I should of read the Source Code before I wrote this.

CPS2 0x804000 
Switches are Inverse 0 = on and 1 = off. Inputs are binary.

0x804000 and 0x804001
Other than location it behaves the same on CPS1.
First byte Player 2 controls 0x804000
0x80 = Return to neutral aka cancel?
0x40 = HP, Shot 3, Shot C
0x20 = MP, Shot 2, Shot B
0x10 = LP, Shot 1, Shot A
0x08 = Up
0x04 = Down
0x02 = Left
0x01 = Right
Second byte Player 1 Controls 0x804001
0x80 = Return to neutral aka cancel? 
0x40 = HP, Shot 3, Shot C
0x20 = MP, Shot 2, Shot B
0x10 = LP, Shot 1, Shot A
0x08 = Up
0x04 = Down
0x02 = Left
0x01 = Right

Kick Harness
This is where it gets different and weirdly this doesn't use a full byte only these bits.
0x20 = Player 2 MK, Shot 5, Shot E
0x10 = Player 2 LK, Shot 4, Shot D
0x04 = Player 1 HK, Shot 6, Shot F
0x02 = Player 1 MK, Shot 5, Shot E
0x01 = Player 1 LK, Shot 4, Shot D

Kick harness part 2
0x40 = Player 2 HK, Shot 6, Shot F


You probably seen this on my twitter.


Decided to make the patch available for it.



309D10 - 309dfc


It’s a simple tile edit only visible on us region.



Cadillacs and Dinos?


Hey Jed
I’m wondering if you ever thought about modifying the ST ROM to make it more tournament friendly? I think a lot of people would like the random stage select as it can get very boring being stuck on the same stage forever (also it’s nicer for the spectators too), so maybe a service menu option to enable/disable that would be great if not too much work.

Also something like a score counter would be amazing. It’s the one thing I miss from Hyper SF2 (perhaps you can copy and paste the code for this?!). It can be troublesome when you have a setup unmanned as sometimes the players are so into it they lose track of the scores haha.

I was wondering how to implement this as easily as possible. You may recall that the score counter increases by 1 each time a new game is started, but this applies for both players. If a player loses and let’s the continue timer count down, it counts as a new game and the score is reset. Obviously letting the timer run down wouldn’t work normally since you wipe out the score for the losing player. Maybe you could do something so the score counter of the player who continues does not increase by 1?

I initially thought that you might be able to mess with the end of round scores, like adding 1 point permanently to the vital and disabling the “new match +1 score” thing entirely, but then I realised that would increase the score each round and not each game.

I imagine there is something you can use to generate a score since the game obviously keeps track of who won the last game due to the character lock. You could even get rid of the score entirely and just have a couple of digits for the win counter. Would make it look a bit cleaner for capture overlays too.

Also I got some replacement ROMs in the end and burned training mode. Works so good :slight_smile:


It’s still SF2:HF just got the intro to start playing sort of.


Haha, ok, the elephants didn’t look right to me for SF.


I dunno about the win counter since it usually gets covered up any way. I’d think being able to quickly go back to the character screen would be better and implement Fighting Layer’s where you could select a different character when challenged instead of having an event mode.


Glorious double post of being undetected for hours.


I just noticed a bug in my code with my training mode hacks since Player 2 HK is shared with the start buttons on cps2 inputs that means holding will cause the same effect as holding start. So no Kick TAP with p2 boxer.

Seems to be only on Vampire Savior.

This code seems to work for now will make a patch soon.

*better code below


Vsav Training mode 1.2(I guess)

New patch you only need to re do patch 4 if you already have it.

New feature
Pressing start will give you meter up to 5 for both players in player vs player and 10 against the cpu.

Bug fix
Holding Player’s 2 HK no longer takes you to character select

New code at address 0xFFD60

4A2D 00A4
6612                       ;branch if not set to 1 life/toremo
102D 0060                  move.b  ($60,A5), D0
0200 000F                  andi.b  #$f, D0
4A00                       tst.b   D0
660E                       bne     ;pc + #$0e

1B7C 0080 6000             move.b  #$80, ($6000,A5)
7000                       moveq   #$0, D0
4EF9 0002 9F12             jmp     $29f12.l

4A2D 6000                  tst.b   ($6000,A5)
6610                       bne     ;$pc + #$10

7000                       moveq   #$0, D0
3B40 0004                  move.w  D0, ($4,A5)
3B40 0008                  move.w  D0, ($8,A5)
3B40 000C                  move.w  D0, ($c,A5)
4E75                       rts

102D 6000                  move.b  ($6000,A5), D0
B07C 0077                  cmp.b   #$77, D0
6D04                       blt     $660044
522E 0109                  addq.b  #1, ($109,A6)
532D 6000                  subq.b  #1, ($6000,A5)
7000                       moveq   #$0, D0
4EF9 0002 9F12             jmp     $29f12.l

Razoola phoenix set first.
New patch you only need to re do patch 4 if you already have it.


I second the win counter, the HSF2 one. The JP version shows it every start of round and disappears when the “Fight!” message is over; I think it has ample time and appears ever so often to track score, at least in a simple way.


Found the commands that read the dipswitches. What that means is I don’t have to edit that branch to get past the ram check and rotate the screen and fix the speed.

1D3D4 Reads 80001A
1D3E0 Reads 80001C
1D3EC Reads 80001E

Now to controls
I can make some nasty code to try and make all kicks work.
Or I can have people rework their wiring and maybe make a custom game slot on the emu.

Re:Win Count
These HSF2 graphics aren’t on ST so you will have to reuse existing assets.


And there will be people so used to it not being there and still ignore it. So I would use a big number font for it like these.


Then again I’m not working on it.


Too bad you can’t just write the graphics data to a bit of space in the program ROM and reference that. Even if it just uses the regular score/name font, that would be a big help. It’s just something so it’s there for people to keep track of. Many times players have lost count of where they are in a tournament set because neither of them have been keeping count, or they forget with all the hype. Likewise when we’re on the stream and trying to run brackets and so on, sometimes we slip up and forget to update the scores


Wouldn’t you have to re-boot the game between matches to reset the count, though?


Technically, you could hijack the old character code and add a menu but that you would still need get the score code.

I mean the code for the inputs to select the old version.


Main Controls done.

;Player 2 Main input
1D2BC: move.b  $804001, D0
1D2C2: not.b   D0
1D2C4: move.b   D0, ($7b,A5)

;Player 1 Main Input
1D2C8: move.b  $804000, D0
1D2CE: not.b   D0
1D2D0: move.b   D0, ($7b,A5)

1D2D4: move.b   $804011.l, D0

;Player 2 Kicks
01D2E6: jsr     $kickcode;haven't decided where yet, there is plenty of room.
01D2EC: move.b  D1, ($7e,A5);Move to Player 2 controls

;jsr $Kickcode
;Need D0 to equal 40 with out input and 0 with add it to d1
move.b  $804020.l ;(1039 0080 4020)
andi.b 	#$40, D0 ;(0240 0040)
add.b D0,D1 ;(D200)
lsr.w #$4, D1 ;(E849)
andi.b #$7, D1 ;(0241 0007)
rts ;(4e75)


It’s progress need to figure out the right roms.


I dunno how well this would go over, but I made name graphics for the one character that doesn’t have any, so if you wanted to, say, insert them into ST with the ability to switch which one gets used based on region, it’s possible (both regions use the same number of 16x16 tiles, and there’s a metric shitton of blanks space in the ST art, so space isn’t an issue there).

I’m not so sure how well they’d work on hardware, considering the resolution is so oddball, but it’d be worth a shot, I think.



Can’t really take any credit for these either, since I just edited existing letters. Use them if you see fit.