Skip to main content
Home Forums 68kMLA Mac ROM Checksum Computation? — #12
Post #12 by techfury90
Source Forum68kMLA
Category68k
Post DateThu, 25 Feb 2010 - 03:22
Original URLhttps://68kmla.org/bb/threads/mac-rom-checksum-computation.19981/
Post
I guess it makes sense to me that the beginning of ROM is not mapped to address $0000 0000. These very low addresses are often reserved for internal registers and ports of the processor. Maybe we can assume that the ROM starts at address location $40 0000. That seems logical.
It looks like it skips the first 32-bit word by incrementing A0 before the loop. (i.e. skips the recorded checksum at the beginning) Then it adds all following words, except it also skips the last word as well by setting D3 8 bytes less than the length of ROM. (4 bytes go to what was skipped at the beginning, the remaining 4 skip the last word in ROM.)

I'm going to see if I can whip something together that can verify the checksum successfully. Maybe I'll make it pretty and share it so people can verify their Mac ROM dumps!
Just a heads up, the beginning of address space in 68ks is used for vector addresses. In particular, the first 32 bits are used to hold the initial value of the A7 register, then the next 32 (addresses 4- 8) are used to hold the initial value of the program counter. For this reason, many 68k systems have their ROM at 0x0. (At least Apollo workstations do)

Disclaimer: I only know this from writing an Apollo DN3500 emulator.

mp.ls