Game patch for Street Fighter II'

This forum is for posting M.A.M.E. arcade cheats. Requests will be fulfilled here....but please keep the requests to the requests forum.
Post Reply
Bugfinder
Posts: 168
Joined: Tue Sep 25, 2001 1:00 am
Location: Rio de Janeiro, Brasil

Game patch for Street Fighter II'

Post by Bugfinder »

Many players think it's not fair to achieve a hiscore by the use of continues and disputing fights with other players. Most players (not only nitpickers) think the hiscore should be left to scores achieved in only one coin.

Code: Select all

005512: 202B 029A        move.l  ($29a,A3), D0  - copy current player score to D0
005516: B0AD 52EE        cmp.l   ($52ee,A5), D0 - compare with in-game hiscore
00551A: 6500 0052        bcs     556e           - if lower then go to end
00551E: 4EF8 19B2        jmp     $19b2.w        - jump to Bugfinder's patch,
005522: 4A2E 0012        tst.b   ($12,A6)       - that will return to this address
005526: 6646             bne     556e
005528: 3A3C 00A4        move.w  #$a4, D5
00552C: 3C3C 00F0        move.w  #$f0, D6
005530: 41F9 0091 0098   lea     $910098.l, A0
005536: 45ED 52EE        lea     ($52ee,A5), A2
00553A: 7400             moveq   #$0, D2
00553C: 6100 FC2C        bsr     516a
005540: 202A 0000        move.l  ($0,A2), D0
005544: 672A             beq     5570
005546: 101A             move.b  (A2)+, D0
005548: 363C 000D        move.w  #$d, D3
00554C: 6100 FCDA        bsr     5228
005550: 101A             move.b  (A2)+, D0
005552: 363C 000D        move.w  #$d, D3
005556: 6100 FCC8        bsr     5220
00555A: 101A             move.b  (A2)+, D0
00555C: 363C 000D        move.w  #$d, D3
005560: 6100 FCBE        bsr     5220
005564: 101A             move.b  (A2)+, D0
005566: 363C 000D        move.w  #$d, D3
00556A: 6000 FCB4        bra     5220
00556E: 4E75             rts

0019B2: 0C00 0000        cmpi.b  #$0, D0        - compare the last byte of current score
0019B6: 6608             bne     19c0           - if not 0, go to end
0019B8: 2B40 52EE        move.l  D0, ($52ee,A5) - if no continues and no disputes, update hiscore
0019BC: 4EF8 5522        jmp     $5522.w        - and jump back to main routine
0019C0: 4E75             rts                    - this rts substitutes the one at $556E

:sf2ce:20B00000:000019B2:0C000000:FFFFFFFF:Hiscore only for fair games
:sf2ce:20910000:000019B6:00006608:0000FFFF:Hiscore only for fair games
:sf2ce:20B10000:000019B8:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2ce:20B10000:000019BC:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2ce:20910000:000019C0:00004E75:0000FFFF:Hiscore only for fair games
:sf2ce:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games
This will affect *only* the hiscore displayed during a game, in the middle of screen. The hiscore table (where you enter your name) still works the same way so you can have 2 different hiscores rules. The hiscore visible all the time is for the skilled players, a honor to their feat, while the hiscore table is for everything else.

I hope you find this cheat useful :-)
Bugfinder
------------------------------------------
If there's a bug, I'm gonna find it!
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Re: Game patch for Street Fighter II'

Post by stephh »

Bugfinder wrote: Many players think it's not fair to achieve a hiscore by the use of continues and disputing fights with other players. Most players (not only nitpickers) think the hiscore should be left to scores achieved in only one coin.

Code: Select all

0019B2: 0C00 0000        cmpi.b  #$0, D0        - compare the last byte of current score
0019B6: 6608             bne     19c0           - if not 0, go to end
0019B8: 2B40 52EE        move.l  D0, ($52ee,A5) - if no continues and no disputes, update hiscore
0019BC: 4EF8 5522        jmp     $5522.w        - and jump back to main routine
0019C0: 4E75             rts                    - this rts substitutes the one at $556E

That looks weird for me (even if you may be right) : this assumes that the LSB of D0 is affected ONLY when you continue a game (so normal score is muliple of 100) ...

If I'm right, you would need to :

- use another register (D1 for example) to save D0 (save D1 on the stack before)
- perform a "andi.b #$f, D0" to extract the last digit
- make the test and jump to the end or not
- save the contents of D1 to $52ee,A5
- at the end, restore the original value for D0 and D1 (for this one, use the stack)

And have you thought of what could happen if people were crazy enough to continue 100 times (10 times with my routine) ? Are you sure that there isn't a counter elsewhere which could me more appropriated ?

Of course, what I've mentioned are only improvements to something I wouldn't have liked to touch with a 10 feet pole :x
I hope you find this cheat useful :-)
It will be completely useful if ALL clones could have a similar cheats :roll:

I know it's HARD work, but that's the problem with the ROM cheats as you CAN'T assume that the addresess for the routines are same for the clones ... But you can think you are VERY lucky that you're not working on a CPS2 game :wink:

Steph from The Ultimate Patchers

Visit Image The Ultimate Patchers' site Image
Bugfinder
Posts: 168
Joined: Tue Sep 25, 2001 1:00 am
Location: Rio de Janeiro, Brasil

Re: Game patch for Street Fighter II'

Post by Bugfinder »

stephh wrote:That looks weird for me (even if you may be right) : this assumes that the LSB of D0 is affected ONLY when you continue a game (so normal score is muliple of 100) ...
That's correct, the last byte is the number of continues/disputes on that game.
If I'm right, you would need to :

- use another register (D1 for example) to save D0 (save D1 on the stack before)
- perform a "andi.b #$f, D0" to extract the last digit
- make the test and jump to the end or not
- save the contents of D1 to $52ee,A5
- at the end, restore the original value for D0 and D1 (for this one, use the stack)
This isn't necessary, as the last byte itself is just to store this information. The contents of the registers are just the same, I don't change anything (best of all). I make a byte compare with $0 and if it's not $0, it will go to the end. I have followed the step-by-step of this routine in action with many different values and situations for both p1 and p2 and it performs as intended :-)
And have you thought of what could happen if people were crazy enough to continue 100 times (10 times with my routine) ?
In that excepcional case, the counter will not stop at 99, becoming 00 and adding 1 to the next byte. The only solution to this would be to not let it go more than 99. Perhaps not that tricky, as that value is increased only when another player starts playing during in a game, and for both scores. Will see what I can do. My main problem is I don't know the opcodes for this processor, it's a pain in the ass... :cry:
Are you sure that there isn't a counter elsewhere which could me more appropriated ?
I haven't properly looked for this yet, thanks for asking!
Of course, what I've mentioned are only improvements to something I wouldn't have liked to touch with a 10 feet pole :x
I'll give it some more thought over the 99+ continues/disputes.
It will be completely useful if ALL clones could have a similar cheats :roll:

I know it's HARD work, but that's the problem with the ROM cheats as you CAN'T assume that the addresess for the routines are same for the clones ... But you can think you are VERY lucky that you're not working on a CPS2 game :wink:

Steph from The Ultimate Patchers
I promise I'll take care of it :lol:
Bugfinder
------------------------------------------
If there's a bug, I'm gonna find it!
Bugfinder
Posts: 168
Joined: Tue Sep 25, 2001 1:00 am
Location: Rio de Janeiro, Brasil

Re: Game patch for Street Fighter II'

Post by Bugfinder »

stephh wrote:And have you thought of what could happen if people were crazy enough to continue 100 times (10 times with my routine) ?
I found a better way. There is a flag at $FF831D that is $00 all the time during a one-player game. If any continues or disputes happen, it will change to $01 and stay that way until the end of that game. I'm pretty sure it has something to do with special character endings. There might be another flag like that to signal if the player lost any round against the machine too. I use the index ($31d,A5) to reach the address content as A5 is used during all code as a fixed reference to $FF8000.

Code: Select all

0019B2: 0C2D 0000 031D   cmpi.b  #$0, ($31d,A5) - only one coin used during that game?
0019B8: 6608             bne     19c2           - if it's not 0, go to end
0019BA: 2B40 52EE        move.l  D0, ($52ee,A5) - if no continues and no disputes, update hiscore
0019BE: 4EF8 5522        jmp     $5522.w        - and jump back to main routine
0019C2: 4E75             rts                    - this rts substitutes the one at $556E

:sf2ce:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2ce:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2ce:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2ce:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2ce:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2ce:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games
St?phane, I will check this for the clones and then post it here.
Are you sure that there isn't a counter elsewhere which could me more appropriated ?
Thank you for asking! Now my cheat is better, bug-proof (no more wraparound at 100 continues).
Bugfinder
------------------------------------------
If there's a bug, I'm gonna find it!
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Re: Game patch for Street Fighter II'

Post by stephh »

Bugfinder wrote: I found a better way. There is a flag at $FF831D that is $00 all the time during a one-player game. If any continues or disputes happen, it will change to $01 and stay that way until the end of that game. I'm pretty sure it has something to do with special character endings. There might be another flag like that to signal if the player lost any round against the machine too. I use the index ($31d,A5) to reach the address content as A5 is used during all code as a fixed reference to $FF8000.
That's REALLY much better ! :D So, if I've understood correctly, the hi-score (on the middle of the screen) will only be updated when performing a one player game without continues nor fights against another player ... Does that work if you start a game with player 2 too ?
St?phane, I will check this for the clones and then post it here.
There isn't much hurry for me :wink:

Steph from The Ultimate Patchers

Visit Image The Ultimate Patchers' site Image
Bugfinder
Posts: 168
Joined: Tue Sep 25, 2001 1:00 am
Location: Rio de Janeiro, Brasil

Re: Game patch for Street Fighter II'

Post by Bugfinder »

stephh wrote:That's REALLY much better ! :D So, if I've understood correctly, the hi-score (on the middle of the screen) will only be updated when performing a one player game without continues nor fights against another player ... Does that work if you start a game with player 2 too ?
In sf2, sf2ce and clones you can't start a stand-alone game as P2. The address $FF831D starts as $00, if the player continues or P2 kicks in, it'll receive $01. This is true even if you start a 2 players game with only one coin inserted (sf2t has this option on dipswitch).

Here are the cheats for sf2ce and clones - they're all the same except sf2t and sf2tj. Cheats for sf2 and clones will be posted tomorrow.

Code: Select all

:sf2ce:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2ce:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2ce:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2ce:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2ce:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2ce:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games
:sf2ce:64004000:0000006E:00000000:00000000:

:sf2ceua:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2ceua:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2ceua:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2ceua:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2ceua:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2ceua:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games

:sf2ceub:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2ceub:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2ceub:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2ceub:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2ceub:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2ceub:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games

:sf2cej:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2cej:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2cej:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2cej:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2cej:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2cej:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games

:sf2rb:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2rb:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2rb:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2rb:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2rb:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2rb:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games

:sf2rb2:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2rb2:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2rb2:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2rb2:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2rb2:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2rb2:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games

:sf2red:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2red:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2red:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2red:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2red:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2red:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games

:sf2v004:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2v004:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2v004:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2v004:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2v004:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2v004:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games

:sf2accp2:20B00000:000019B2:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2accp2:20B10000:000019B6:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2accp2:20B10000:000019BA:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2accp2:20B10000:000019BE:4EF85522:FFFFFFFF:Hiscore only for fair games
:sf2accp2:20910000:000019C2:00004E75:0000FFFF:Hiscore only for fair games
:sf2accp2:20B10000:0000551E:4EF819B2:FFFFFFFF:Hiscore only for fair games

:sf2t:20B00000:000014C8:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2t:20B10000:000014CC:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2t:20B10000:000014D0:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2t:20B10000:000014D4:4EF8245E:FFFFFFFF:Hiscore only for fair games
:sf2t:20910000:000014D8:00004E75:0000FFFF:Hiscore only for fair games
:sf2t:20B10000:0000245A:4EF814C8:FFFFFFFF:Hiscore only for fair games

:sf2tj:20B00000:000014C8:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2tj:20B10000:000014CC:031D6608:FFFFFFFF:Hiscore only for fair games
:sf2tj:20B10000:000014D0:2B4052EE:FFFFFFFF:Hiscore only for fair games
:sf2tj:20B10000:000014D4:4EF8245E:FFFFFFFF:Hiscore only for fair games
:sf2tj:20910000:000014D8:00004E75:0000FFFF:Hiscore only for fair games
:sf2tj:20B10000:0000245A:4EF814C8:FFFFFFFF:Hiscore only for fair games
Bugfinder
------------------------------------------
If there's a bug, I'm gonna find it!
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

...err?

Post by ianpatt »

Not trying to burst anyone's bubble, but remember that enabling cheats should disable high score saving at the same time...
Bugfinder
Posts: 168
Joined: Tue Sep 25, 2001 1:00 am
Location: Rio de Janeiro, Brasil

Re: ...err?

Post by Bugfinder »

ianpatt wrote:Not trying to burst anyone's bubble, but remember that enabling cheats should disable high score saving at the same time...
Man! I was going to post about this right now :-)

Of course I must mention that since this cheat involves hiscore, to make it work properly you need to recompile your MAME after modifying src\cheat.c to allow hiscore saving EVEN when cheating. Look for this line, change 1 to 0:

Code: Select all

he_did_cheat = 1;
sf2 and clones follow...

Code: Select all

:sf2:20B00000:000000C0:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2:20B10000:000000C4:03216608:FFFFFFFF:Hiscore only for fair games
:sf2:20B10000:000000C8:2B405302:FFFFFFFF:Hiscore only for fair games
:sf2:20B10000:000000CC:4EF854C4:FFFFFFFF:Hiscore only for fair games
:sf2:20910000:000000D0:00004E75:0000FFFF:Hiscore only for fair games
:sf2:20B10000:000054C0:4EF800C0:FFFFFFFF:Hiscore only for fair games

:sf2ua:20B00000:000000C0:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2ua:20B10000:000000C4:03216608:FFFFFFFF:Hiscore only for fair games
:sf2ua:20B10000:000000C8:2B405302:FFFFFFFF:Hiscore only for fair games
:sf2ua:20B10000:000000CC:4EF854A2:FFFFFFFF:Hiscore only for fair games
:sf2ua:20910000:000000D0:00004E75:0000FFFF:Hiscore only for fair games
:sf2ua:20B10000:0000549E:4EF800C0:FFFFFFFF:Hiscore only for fair games

:sf2ub:20B00000:000000C0:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2ub:20B10000:000000C4:03216608:FFFFFFFF:Hiscore only for fair games
:sf2ub:20B10000:000000C8:2B405302:FFFFFFFF:Hiscore only for fair games
:sf2ub:20B10000:000000CC:4EF854C4:FFFFFFFF:Hiscore only for fair games
:sf2ub:20910000:000000D0:00004E75:0000FFFF:Hiscore only for fair games
:sf2ub:20B10000:000054C0:4EF800C0:FFFFFFFF:Hiscore only for fair games

:sf2ue:20B00000:000000C0:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2ue:20B10000:000000C4:03216608:FFFFFFFF:Hiscore only for fair games
:sf2ue:20B10000:000000C8:2B405302:FFFFFFFF:Hiscore only for fair games
:sf2ue:20B10000:000000CC:4EF854E0:FFFFFFFF:Hiscore only for fair games
:sf2ue:20910000:000000D0:00004E75:0000FFFF:Hiscore only for fair games
:sf2ue:20B10000:000054DC:4EF800C0:FFFFFFFF:Hiscore only for fair games

:sf2ui:20B00000:000000C0:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2ui:20B10000:000000C4:03216608:FFFFFFFF:Hiscore only for fair games
:sf2ui:20B10000:000000C8:2B405302:FFFFFFFF:Hiscore only for fair games
:sf2ui:20B10000:000000CC:4EF86104:FFFFFFFF:Hiscore only for fair games
:sf2ui:20910000:000000D0:00004E75:0000FFFF:Hiscore only for fair games
:sf2ui:20B10000:00006100:4EF800C0:FFFFFFFF:Hiscore only for fair games

:sf2j:20B00000:000000C0:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2j:20B10000:000000C4:03216608:FFFFFFFF:Hiscore only for fair games
:sf2j:20B10000:000000C8:2B405302:FFFFFFFF:Hiscore only for fair games
:sf2j:20B10000:000000CC:4EF860FC:FFFFFFFF:Hiscore only for fair games
:sf2j:20910000:000000D0:00004E75:0000FFFF:Hiscore only for fair games
:sf2j:20B10000:000060F8:4EF800C0:FFFFFFFF:Hiscore only for fair games

:sf2ja:20B00000:000000C0:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2ja:20B10000:000000C4:03216608:FFFFFFFF:Hiscore only for fair games
:sf2ja:20B10000:000000C8:2B405302:FFFFFFFF:Hiscore only for fair games
:sf2ja:20B10000:000000CC:4EF854C4:FFFFFFFF:Hiscore only for fair games
:sf2ja:20910000:000000D0:00004E75:0000FFFF:Hiscore only for fair games
:sf2ja:20B10000:000054C0:4EF800C0:FFFFFFFF:Hiscore only for fair games

:sf2jc:20B00000:000000C0:0C2D0000:FFFFFFFF:Hiscore only for fair games
:sf2jc:20B10000:000000C4:03216608:FFFFFFFF:Hiscore only for fair games
:sf2jc:20B10000:000000C8:2B405302:FFFFFFFF:Hiscore only for fair games
:sf2jc:20B10000:000000CC:4EF8614A:FFFFFFFF:Hiscore only for fair games
:sf2jc:20910000:000000D0:00004E75:0000FFFF:Hiscore only for fair games
:sf2jc:20B10000:00006146:4EF800C0:FFFFFFFF:Hiscore only for fair games
Thanks for the reminder, Ian!
Bugfinder
------------------------------------------
If there's a bug, I'm gonna find it!
Post Reply