Avenging spirit

This is the tutorial for the game Avenging Spirit (rom name :- avspirit), from a scale of 1 to 10, I would rate this game a 2 in difficulty finding the highscore data.

First of all you need to compile a version of mame with a debugger enabled, go to www.mame.net/compile.html or www.mameworld.net/dosmame to find out how to compile mame (dos version)

All screen shots on this page have been taken using mame32 with debugger enabled but I reccomend using a dos version of mame. some screen shots will look a bit different if you are using dos mame.

So lets start, load up avenging spirit with debugger enabled and press any key to start game. if the debugger is enabled you now enter the debugger screen. Press escape to exit the debugger and enter the game.

Let the game run for a while until it starts the attract mode see screen shot below:-

 

Notice that the top score is displayed in the top centre of the screen. Now leave the game to run until it diplays the highscore table. See below :-

As you can see the top score is 100,000 and the bottom score is 10,000 , the top score`s initials are JAL and this is what we will look for first. so press the ` key (left of number 1) to enter the debugger and check that the focus of the debugger is in cpu #0 by looking at the top right hand box , it should say cpu #0 in yellow letters, if it does you are in cpu#0. If it does not say this press f6 untill it does. see screen shot below :-

Now press the insert key (left of letter Q) 3 times to get the curser in the bottom left box and press the S key to search and a box will open up , type 4a 41 4c ( JAL in ascii code ) and press return. See screen shot below.(Ascii code and hexadciamal tables at bottom of this page).

The first search comes up with 4a 41 4c in the games rom memory, this we are not interested in. An easy way of finding out if the memory is rom ( read only ) or ram ( editable ) just try typing a number eg. 1234 on the keyboard (not number pad) and if it enters ok then the memory is ram (where all highscore `s , lives, etc.. are stored), if it will not , then its rom memory.

See screen shot below , first search result :-

The cursor is flashing on the 4a of the 4a 41 4c we are searching for. As this is in rom memory it is not what we are looking for, also note that its the highscore table you have found in rom memory, this data is copied into ram memory so it can be overwritten with new highscore entries.

Press S again to search and with the letters 4a 41 4c still in the search box just press return.

This time the search results in another find, this time 4a 41 4c is found again but in rom memory again so press S and return to continue search.see result below :-

This time the search has found 4a 41 4c in ram memory, you can edit this memory as much as you like. If you press the down cursor key about 8 times you will see the complete highscore table in ram memory. see screen shot below.

As you can see the highscore table starts at add$ 79df6 (memory address 79df6), Just after the highscore table start you can see 4a 41 4c this is the top scores initials JAL , then still on that line is the start of the second highest score 0009 = 90,000 (the score continues on the next line down). On the next line down you cam see 422e 5200 = B.R the second highest score`s initials. if you check the highscore table further up this page the 10th score is 10,000 and initials are BUT.on the screenshot above the T of the BUT is ringed - 54 or T in ascii code. Also note that the highscore data is just before the start of the highscore data add$ 79df2 - 79df5 (0010 0000) = 100,000.

To see if the above data is correct, edit the top score into something like this :-

What you have done is to change the top score and initials into 12345677 and AAA. Press escape to enter the game and start a game, The top score should have changed see screeenshot below.

Now kill yourself and wait until the highscore displays and it should look like this :-

When you press ` to enter the debugger the top score should have changed to 12345678.

Now that we know that we have found the highscore its time to write down the highscore & top score start and end memory addresses and what the values are when the game is turned on.So press escape to get back in the game, then f3 to reset the game and wait untill the highscore displays itself again, it should now be at its default values eg 100,000 JAL for the top score & initials.press the ` key to go into the debugger and it should look like the screenshot below :-

The start of the data we need is in adress 79df2 (top score start add$) and the end of the data is in address 79e44 (highscore end add$) the value of these are 00 and 54.

The highscore.dat file data will look something like this:-

;*******megasys1.c (avenging spirit) - game driver information (not important)

avspirit: - rom name (tells mame what game the data applies to)

0:79df2:53:00:54 - cpu# , start of data , no. of bytes to end of data + 1 , start value , end value

for much more information on the highscore.dat and calculation side of things check out the bells & whistles tutorial as this tutorial goes into depth on how to work out and enter the highscore.dat data.

Below are some ascii & hexadeciaml conversion tables

 

Back to Main Page