• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Figuring Out How a CDEV Resource Works

Paralel

68020
If I wanted to study a CDEV resource inside the resource fork of a CDEV, as shown by ResEdit, what would be the best way to approach it?

My programing background is limited, but I understand the basics (not Basic).

I'm looking to try and figure out how a particular instruction is executed by this CDEV resource.

 
The following resources document control panels:

Inside Macintosh: Operating System Utilities, Chapter 5

Inside Macintosh: Volume VI, Chapter 10

Inside Macintosh: Volume V, Chapter 18

The cdev resource is a code resource that is jumped to by the Finder in System 7, and by the control panel desk accessory in System 6. The the arguments to the cdev are passed in registers.

 
Ugh, this is looking much more ugly than I thought...

Software wise, what environment would be my best choice for starting to make sense out of what is there? With ResEdit, I get the hex dump, but that isn't much of a starting point for me.

 
Grab your favorite 68k disassembler and have at it.

I use macsbug for anything in memory, and fdisasm for everything else. Ye Olde Resorcerer can also disassemble some resources.

 
How do emulators work for debugging? If you have to reboot a Mac a bunch of times, doing it on a modern machine would only take a few seconds.

 
Terrible.

BII and SheepShaver don't work with macsbug, the system crashes when triggering a macsbug breakpoint.

MESS can run macsbug, but there's other issues. 1) there's no power button or NMI interface in MESS to break into the debugger. 2) keyboard and mouse inputs in MESS are a bit flakey and unreliable. It makes trying to code/debug/really use the emulator frustrating at best.

 
MESS does and the others don't. However, MESS' is setup for debugging MESS and the emulated environment, not for developing code locally. You'll have to enjoy decoding call stacks and debug symbols by hand if you want to use MESS' debugger.

 
I'm actually surprised that Basilisk II lacks a debugger given how mature of an emulator it is. It should be fairly trivial to emulate a native "debug switch" and its NMI though.

 
I eventually ended up using Super ResEdit. However, I dumped the project after a few days of staring at the code since it was way over my head. I just bought the software. I guarantee for you guys what was needed would probably have been quite simple, but you only use your powers for good.

 
Back
Top