Skip to main content
Home▸ Forums▸ 68kMLA▸ Plus Too: a DIY Mac clone project (128k -> Plus) — #53
Post #53 by dougg3
Source Forum68kMLA
CategoryHardware
Post DateThu, 6 Oct 2011 - 02:39
Original URLhttps://68kmla.org/bb/threads/plus-too-a-diy-mac-clone-project-128k-gt-plus.23753/
Post
The Altera DE1 board that I'm using is $150. It's a great place to start, but isn't perfect for this project. It has only 512K of SRAM, and no way to hook up a mouse and keyboard at the same time. It also has some other components I don't need that just raise the cost. Eventually I hope to create a custom Plus Too board with Mac-specific parts. If there's enough interest, I guess I could sell additional boards or kits, kind of like dougg3's doing with the IIci ROM design. I'm not sure how much they might cost... maybe about the same as the DE1 board.
Nifty! I'm actually a backer of this project on Kickstarter, which is supposed to be for Arduino stuff but it also seems like it would be useful as a cool Xilinx FPGA dev board with VGA and two PS/2 ports. It's also limited to 512K of SRAM, so it's probably not the best choice either, and it's too late to back the project now, but I just thought I'd point it out (I'm sure he's going to be selling more)!

If you ever decide to make a board/kit, count me down as interested in one! I have a Plus, but haven't tried booting it in a long time. I'm almost afraid to try...haha

I used a tool that's part of Mini vMac to disassmble the ROM, which provides a dump of all the CPU instructions in the ROM routines. The tool also adds trap names, some constant names, routine names, and a few comments, all of which I believe were derived by Paul Pratt from his analysis. So for example, most references to the VIA appear using the constant "VIA" instead of the literal address $EFE1FE, and several key routines have meaningful names like P_mBootBeep.
Oh wow! I did some of that by hand by copying a list of traps from Inside Macintosh and doing a find/replace thing--I think it was in Perl. FDisasm seems like it's a very useful tool, much more powerful than what I was doing! I wish he had versions for some of the later Macs like the later II series...

I don't know if this is useful at all (maybe FDisasm already handles it all), but MPW comes with some Mac ROM maps. The Plus's ROM is one of them. It has a bunch of labels for routines and their addresses. MPW is long gone from Apple's site, but there is a mirror of their old FTP site here.

That's been a tremendous help, but it still left many huge blocks of hundreds or thousands of instructions whose purpose was totally unknown to me. Most of what I've been doing during the past few weeks is digging slowly through those, trying to reverse engineer the pieces that look relevant to the boot process. As their purpose becomes clearer, I've been adding lots more comments and assigning names to previously unnamed entry points, like P_ShowHappyMac.
It occurs to me now that I should probably contact Paul Pratt to share what I've learned, or find some other way of preserving and sharing it. Unfortunately I can't publish my commented ROM disassembly for the same reason you can't publish the ROM contents. But I've put a lot of work into reverse-engineering a documenting the purpose of many of the routines in ROM, and it might eventually be of interest or use to someone else, so maybe there's a way I can share it.
Oh definitely -- that has to be very tedious to comment all that! I thought commenting the sound code was tedious enough, but you're doing the entire boot process! Yikes! Haha. You're probably right about not being able to share the commented disassembly. That's too bad because it would be a useful thing for people to have, but at the same time, it definitely makes sense that you can't share it since it's Apple's copyrighted code. :(