Subject: Re: Calculating CheckSums WAS: Re: CheckSum Question
From: "Grant Schenck" <[email-masked]>
Date: Fri, 22 May 1998 10:26:13 -0400
Newsgroups: rec.games.pinball

Instructions on Modifying WPC ROM Images

1) Load the ROM image into a binary editor or ROM programmer.
2) Make any modfications to the ROM image you want to.
3) Set the current  checksum located at 0x7FFEE & 0x7FFEF both to zero.
4) Calculate the check sum (use Bill Ung's Program, located at
http://www.flippers.com/romsum.exe).
5) Set the check sum back into into the ROM image at 0x7FFEE & 0x7FFEF.
6) Subtract the checksum from 0xFFFF.
7) Locate two bytes currently set to 0xFF (hopefully unused.)
8) Set the result from step 6 into these location.
9) Save the image and  recalc the check sum.  It should match the value you
got from step 4.

So, as an example, if I want to change a TZ 9.2 ROM to say "SAY YO TO DRUGS"
I'd do the following:

1) Load the image into a binary editor.
2) Seach for "DRUGS"
3) Locate the adjacent "NO".
4) Change the 'N' to a 'Y' (in TZ 9.2 it's at 0x3A90B.)
5) Now jump to the end of the image to address 0x7FFEE where you should see
the current check sum 0x9392.
6) Modify the check sum to be 0x0000.
7) Save the image
8) Calc the images check sum.  I get 0x9278.
9) Load the image back into the binary editor and jump back to the check
sum.
10) Set the check sum to the newly calculated check sum.
11) Locate some unused area of the ROM that contains 0xFFFF.  I used 0x7FF8E
& 0x7FF8F.
12) Subtracting the check sum, 0x9278 from 0xFFFF yields 0x6D87.
13) Set this resulting value into the location that contained the 0xFFFF,
i.e., 0x7FF8E & 0x7FF8F.
14) Save the image and re-calc the checksum.  It should match.  If it
doesn't, you made an error.
---
Grant Schenck
[email-masked]

Bill Bumgarner wrote in message ...
>
>What algorithms are used to cacluate a checksum?
>
>Can I theoretically modify a ROMs contents, burn it, then plop it in my
>pin and have everything work correctly?
>
>thanks,
>b.bum
>