Hacking the ST rom


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.


So, mind the double-post, but going by previous postings, it seems that we really don’t have any way to actually edit ST graphics yet. Am I correct in thinking that the stumbling block is that we don’t have any good 16x16 (or 32x32) tile editors?


I keep coming back to thinking of ways of improving the ROM so that it is more tournament friendly. Jed, do you think it is possible to disable the winner character lock thing and make both players able to select a character after a match without having to reset the board or kill the characters off? I think if we can hack that and freeplay into the Japanese ROM, it will go a little way to making things run a bit smoother


Dude I would love a st world trainning mode encrypted as maybe a could make a switch on my arcade board to switch between trainning and normal


Sorry if im reviving a dead post but I am being asked by some of the a3 players in the room to get the romhack i did for the a3 playable in there.

Jed I tried xcopy with the keys for sfa3 and sfa3u on my ggpo rom but it results in a corrupted zip file. The file offset I left to 0. What could I be doing wrong?

Any help would be appreciated :slight_smile:


wait, you applied xcopy to the zip file itself? you’re supposed to patch the actual rom files, not the zip that contains them.


Okay that would explain why it was resulting in a corrupted file, but what about the file offset? How do I go about identifying which file offset i’m supposed to use (since I imagine it cannot be 0 for all)?


What exactly did you hacked? It’s strange because, if you’re actually able to hack roms, you should already know why doing what you did would not work.

I dont really know if you understand the proccess, so let me explain it all: xcopy’s functionallity is to apply/remove the encryption from the instructions present on the roms. Not all rom files contain instructions, some of them only contain data, so applying xcopy on these would make no sense. Anyway, lets say you want to hack some of the assembly code contained in a CPS2/3 rom: to do it, you first have to apply xcopy on the right file, to remove the encryption. After that, you hex edit the file (to this part you have to be actually good on reading assembly, so its not up to me to tell you how to do that) making sure to not alter the number of bytes on that rom file (obviously). After you hacked the right bytes, you have to encrypt it back so the emulator can read it properly, so you have to use xcopy again, now in encryption mode. After that, you can pack the modified file with the other files to form the complete rom, zip it back and it will be read to be used on emulators.
As for the offset, it depends on which file from the rom you hacked. If you press the " :slight_smile: " icon, it will say exactly which offset to use, depending on which file you hacked.


Maybe hack is a strong word, I just applied some mods to the decrypted romset of sfa3 (Pheonix Rom).

Obviously I dont know what I am doing when it comes to using the XCopy tool, mainly because there is no real documentation regarding it.

Thanks for the pointers thus far, it looks more like what I expected to see now once I am doing the encryption/decryption.


The phoenix rom is not simply a decrypted rom, it has other differences. If you want to play on fightcade, you have to base your work on the same rom that is used there AFAIK.
So, instead of picking the phoenixed rom as a base, pick the “normal” sfa3 (i.e. the one used on fightcade) and decrypt it using xcopy first, then do whatever you must with these files, encrypt it back, and then zip it.


yeah I understand that now, cheers, looks like im gonna have to go and figure out the locations again.