Anyone here handy with a disassembler like IDA Pro?

Kai Robinson

TinkerDifferent Board President 2023
Staff member
Founder
Sep 2, 2021
1,041
1
1,074
113
42
Worthing, UK
Specifically, i'm trying to run Macintosh ROM's through it.

While it can decode snippets of functions - it dumps a lot of 'data' it thinks - it can't determine what's code and what's not. Also, the references, while they line up, seem to be scattered around, and the visual graph looks like spaghetti. I'm pretty sure the first 4 bytes of the ROM are a checksum, as per https://www.bigmessowires.com/2016/06/10/rom-hacking-tutorial-with-rom-inator-ii/ with the base address being 0x0 - but i'm a bit lost here. I can spend all day expanding 'unknown' chunks into code, but whether that's actually supposed to BE code or if it's just trying to turn something irrelevant INTO code.
 

cy384

New Tinkerer
Nov 18, 2021
18
18
3
USA
www.cy384.com
The first four bytes are a checksum, the next four bytes contain the address to start execution. So that's the address to start decoding at. Unfortunately there's tons of data mixed into the ROM, a full disassembly will take a lot of work. I used Ghidra a little to help with my ROM hacks. The process was basically: start at something that seems correct, try to disassemble a little more, undo when it gets funky, mark stuff that seems like data, repeat until satisfied/bored.
 
  • Like
Reactions: Kai Robinson

cy384

New Tinkerer
Nov 18, 2021
18
18
3
USA
www.cy384.com
So while I was doing some other stuff I found out that Apple published a bunch of ROM map files with MPW, which have the addresses in ROM for a bunch of stuff, for all(?) 68k Mac ROMs. I converted them into a format that Ghidra can import, and some quick instructions, you can find them here on github. I am fairly confident it works and these are being loaded correctly. It's really only a starting point, but at least you get a bunch of labels to work with.

Also I know fdisasm has some partial disassembly for several Macs.

Ghidra screenshot of a Mac SE ROM with the labels:
Screenshot from 2022-04-15 14-42-49.png
 
Last edited:
  • Like
Reactions: bakkus