The debugger is really an invaluable tool :-)

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

The debugger is really an invaluable tool :-)

Post by Bugfinder »

Plus it's helping me to improve my machine language understanding! Because of that I got to make a cheat for calling the diamond in spf2t much better than the ones in the cheat file (which I am the author too, by the way). No more cheats for diamond 1, 2, 3... etc. Now you can use these:

Code: Select all

:spf2t:00000001:FF84F4:00000000:000000FF:Get diamond Now! PL1
:spf2t:00010001:FF84F5:00000001:000000FF:Get diamond Now! PL1
:spf2t:00010001:FF84F6:00000000:000000FF:Get diamond Now! PL1
:spf2t:00010001:FF84F7:00000002:000000FF:Get diamond Now! PL1
:spf2t:00000001:FF88F4:00000000:000000FF:Get diamond Now! PL2
:spf2t:00010001:FF88F5:00000001:000000FF:Get diamond Now! PL2
:spf2t:00010001:FF88F6:00000000:000000FF:Get diamond Now! PL2
:spf2t:00010001:FF88F7:00000002:000000FF:Get diamond Now! PL2
Stored in addresses $FF84F4 and $FF84F5 are the number of pieces dropped, and in the next two addresses are stored the number of pieces needed to get the next diamond. All this cheat does is to store number 2 on the goal and number 1 on the current number of pieces dropped, so the next piece has a diamond.
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: The debugger is really an invaluable tool :-)

Post by stephh »

Bugfinder wrote: Plus it's helping me to improve my machine language understanding!
How do you think I've "learnt" the M68000 assembly language ? :wink:

Anyway, it's cool that you get the good habit of using the debugger : this way, you might try to find a way to get cheats for these games :

Code: Select all

; [ MYSTIC RIDERS (WORLD) ]
; The addresses change depending on how fast you insert a coin ...
; They also change on each level and are different for each player ...
; In fact, invulnerability = [BP + 006Ch] and lives = [BP + 0040h]
; (BP is a register of the V33 CPU - you need to use the debugger)
; Invulnerability is a timer coded on 1 byte (01-FFh then 00 when OFF)
mysticri:0:00000:00:999:[Invulnerability = BP + 006C]
mysticri:0:00000:00:999:[Unlimited lives = BP + 0040]
;============================================================================

; [ GUN HOHKI (JAPAN) ]
; The addresses change depending on how fast you insert a coin ...
; They also change on each level and are different for each player ...
; In fact, invulnerability = [BP + 006Ch] and lives = [BP + 0040h]
; (BP is a register of the V33 CPU - you need to use the debugger)
; Invulnerability is a timer coded on 1 byte (01-FFh then 00 when OFF)
gunhohki:0:00000:00:999:[Invulnerability = BP + 006C]
gunhohki:0:00000:00:999:[Unlimited lives = BP + 0040]
;============================================================================

FYI, the games use a Nec V33 CPU and 'gunhohki' is a clone of 'mysticri' ...

Steph from The Ultimate Patchers

Visit Image The Ultimate Patchers' site Image
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

I have one question: the blocks thatthe CPU gives you in spf2t is (without cheats) the same for both players (ie. the first block each is given will be the same, and so on).

Thus, we can suspect that the order of the blocks given to the two players is fixed, to the extent that it is randomly determined before each round. Your cheats earlier seems to indicate that you only get ten diamonds in the match.

Of course, this cheat gives a diamond, but will it reset/alter/move forward the order in which you receive the blocks?

To make it easier to understand, let me make an example.

Say that the order that both players receive the blocks is this (both players in spf2t receive the same blocks, no matter what, so you can't blame yourself losing because of the fact that the other player had better blocks):

Blah
Blah
Blah
Diamond
Block A
Block B
...so on

If you activate the cheat, will the cheat introduce the side effect that the block that follows the diamond will always be whatever's "Block A", or will it function identical to activating the next "Get Diamond Now!" cheat?
kelvSYC's Guide to the Cheat Engine - http://members.shaw.ca/kelvsyc/cheatguide.html

The New Move List Cheat Collection - http://mamecheat.co.uk/forums/viewtopic.php?p=6469

Underscore Command - What better game is there?
Bugfinder
Posts: 168
Joined: Tue Sep 25, 2001 1:00 am
Location: Rio de Janeiro, Brasil

Re: The debugger is really an invaluable tool :-)

Post by Bugfinder »

Code: Select all

; [ MYSTIC RIDERS (WORLD) ]
; The addresses change depending on how fast you insert a coin ...
; They also change on each level and are different for each player ...
; In fact, invulnerability = [BP + 006Ch] and lives = [BP + 0040h]
; (BP is a register of the V33 CPU - you need to use the debugger)
; Invulnerability is a timer coded on 1 byte (01-FFh then 00 when OFF)
mysticri:0:00000:00:999:[Invulnerability = BP + 006C]
mysticri:0:00000:00:999:[Unlimited lives = BP + 0040]
I'm having problems to understand it; by [BP + 0040h] you mean I add $40 to BP then look inside the resulting address, right? Like if BP = $0480, then the contents of ($4C0) has the number of lives. But it falls in the ROM area, and RAM seems to be after $E0000. Another problem is BP changes all the time!

I don't understand much about how the processors handle "memory pages". Also V3 opcodes looks like Z80 but there are lots of differences I'm not used to. Wish to know more :-(
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

Post by Bugfinder »

I have one question: the blocks thatthe CPU gives you in spf2t is (without cheats) the same for both players (ie. the first block each is given will be the same, and so on).
That's correct.
Thus, we can suspect that the order of the blocks given to the two players is fixed, to the extent that it is randomly determined before each round.
Yep, I suspect that too :-)
Your cheats earlier seems to indicate that you only get ten diamonds in the match.
I agree that those cheats could make one think that way. But that's not correct actually, you can get many more diamonds, it's just that after 25 x 10 pieces the game is so fast that probably you will have lost way before :\
Of course, this cheat gives a diamond, but will it reset/alter/move forward the order in which you receive the blocks?
No, the blocks are still random and both players still receive the same blocks (but the diamond of course).
If you activate the cheat, will the cheat introduce the side effect that the block that follows the diamond will always be whatever's "Block A", or will it function identical to activating the next "Get Diamond Now!" cheat?
That's right, to the extent of my knowledge. After your post, I tried some more just to be sure, thanks for asking :-)

If you know how to use the debugger, place a watch breakpoint at $FF84F5 waiting for $19 (the first diamond will appear at the 25th position) and you'll see how the game handles it. There is a sequence of "goals" stored in ROM, starting at $124B8, this is maybe related to the game difficulty. The first word is $0019 (25), second is $0032 (50) and so on until the 24th at $124E6, containing $258 (600). Then the next 4 are $320 (800), $352 (850), $384 (900) and $3B6 (950).
Bugfinder
------------------------------------------
If there's a bug, I'm gonna find it!
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

So I see that every 25th block (up to block #600, and then with #800 and every 50th block to #950, but we're getting ahead of ourselves) contains a diamond. So with the cheat, will the 26th block always be next, or will it be something like the 26th block next after the first application, the 51st block after the second use, and so on? Or is it just a simple diamond replacement (like you activate the cheat on the very first block, and after both drop, both players get the same second block, that is, when you get diamonds really has nothing to do with how many blocks you have played)?

On a side note, where can I get info on how to use the debugger?
kelvSYC's Guide to the Cheat Engine - http://members.shaw.ca/kelvsyc/cheatguide.html

The New Move List Cheat Collection - http://mamecheat.co.uk/forums/viewtopic.php?p=6469

Underscore Command - What better game is there?
Bugfinder
Posts: 168
Joined: Tue Sep 25, 2001 1:00 am
Location: Rio de Janeiro, Brasil

Post by Bugfinder »

kelvSYC wrote:So I see that every 25th block (up to block #600, and then with #800 and every 50th block to #950, but we're getting ahead of ourselves) contains a diamond. So with the cheat, will the 26th block always be next, or will it be something like the 26th block next after the first application, the 51st block after the second use, and so on? Or is it just a simple diamond replacement (like you activate the cheat on the very first block, and after both drop, both players get the same second block, that is, when you get diamonds really has nothing to do with how many blocks you have played)?
After using this cheat, the diamond counter located at $FF84F9 will be increased. The contents of this address will be multiplied by 2 and then added to $124B8, that is the index of the "diamond goals". So if you activate the cheat when you have only 3 pieces, the number at $FF84F9 will be increased from $00 to $01 and the game will normally award the next diamond at 50th piece. If you activate it again at 10th piece, the game will now award a new diamond only at 75th position. What you do is to abbreviate this.
On a side note, where can I get info on how to use the debugger?
As for this, I don't know. I started to use it by experimenting... Run the game, press tilde to get to the debugger, press F12 to return to the game. While in the debugger, press F1 to see the available commands... That's the little I know, enough to get me running :-)
Bugfinder
------------------------------------------
If there's a bug, I'm gonna find it!
Post Reply