Mac68k Forums

Home


Welcome, Guest
Guest Settings
Help

Mac68k Forums » Development » Software Hacking

Thread: Disassemble Mac ROM


Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Pages: 1 - Last Post: Jan 23, 2018 9:46 PM Last Post By: fraveydank
rickyzhang

Posts: 2
Registered: 8/18/14
Disassemble Mac ROM
Posted: Aug 23, 2017 6:11 PM
Click to report abuse...   Click to reply to this thread Reply
I'm reading Basilisk II ROM patching code. So I disassemble the original ROM with cxmon from BII and radare2 -- https://github.com/cebix/macemu/wiki/ROM-Analysis-in-Basilisk-II-Emulation#disassemble-original-68k-mac-rom

Both of them are not quite great. It didn't annotate data correctly in the ROM.

I want to try to disassemble ROM as binary file in IDA. But I have to hit command C to the place that I think is code segment to disassemble small related portion. I know that ROM starts at 0x2a. But this didn't give a whole picture of ROM. I want to disassemble the whole things.

Any suggestion?
jduerstock

Posts: 10
Registered: 6/30/13
Re: Disassemble Mac ROM
Posted: Aug 31, 2017 11:39 AM   in response to: rickyzhang in response to: rickyzhang
Click to report abuse...   Click to reply to this thread Reply
So depending on which ROM you want to disassemble, there are a few things to keep in mind:

Most 68020+ ROMs start at 0x40800000, not 0x0.

In IDA Pro, you want to set the CPU type to 68040.

Here's a 60 second crash course in IDA keyboard shortcuts:

u - undefine
c - code
d - data -- pressing a second time will change from byte to word, and a third time will change from word to 32-bit int
control-o -- pointer
alt-r -- offset

Let me know more details on where you get stuck and I'll see if I can add anything more to help.
rickyzhang

Posts: 2
Registered: 8/18/14
Re: Disassemble Mac ROM
Posted: Sep 3, 2017 2:15 PM   in response to: jduerstock in response to: jduerstock
Click to report abuse...   Click to reply to this thread Reply
I studied Performa 630 ROM with MD5 hash af343f3f1362bf29cefd630687efaa25.

The location of ROM in memory doesn't really matters to me because I runs in Basilisk II emulation. I also found that ROM is position independent code.

But I will give a try to specify starting address in IDA. BTW, thanks for your crash course.

I will definitely come back to you if I get stuck.
fraveydank

Posts: 73
Registered: 4/23/15
Re: Disassemble Mac ROM
Posted: Jan 23, 2018 9:46 PM   in response to: rickyzhang in response to: rickyzhang
Click to report abuse...   Click to reply to this thread Reply
IDA is great! I haven't used it for 68k (not sure if it's supported yet), but radare2 is pretty great as well, and free. However, if you really want to disassemble 68k ROM, MacNosy is absolutely your best bet, and Steve Jasik still sells it for $99 (which comes with his famous debugger and CoverTest, an excellent test coverage tool for vintage Mac code). I bought my copy a year or two ago; given its pedigree and my history with all of the above, I was more than happy to pay.

Point your RSS reader here for a feed of the latest messages in all forums