Article: 120488 of rec.games.pinball
From: "Grant Schenck" <schenck@compuserve.com>
References: <1998052019405500.PAA28287@ladder01.news.aol.com> <1998052021491700.RAA12015@ladder01.news.aol.com> <Pine.NXT.3.96.980521112317.3531S-100000@pathos>
Subject: Re: Calculating CheckSums WAS: Re: CheckSum Question
Date: Fri, 22 May 1998 10:26:13 -0400
Lines: 53
X-Newsreader: Microsoft Outlook Express 4.72.2106.4
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Message-ID: <u93mD0Yh9GA.137@ntawwabp.compuserve.com>
Newsgroups: rec.games.pinball
Path: news.iupui.edu!news.indiana.edu!vixen.cso.uiuc.edu!howland.erols.net!feed2.news.erols.com!erols!WCG!arl-news-svc-3.compuserve.com!news-master.compuserve.com!nntp-ntawwabp.compuserve.com
Xref: news.iupui.edu rec.games.pinball:120488

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
schenck@compuserve.com


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
>




