68k ROM Replacement, sans Apple code

Hello all,

Inspired in part by Jon Sharp's Bare-metal Mac project, and pipe-dream of trying to port the classic-MacOS rewrite + emulator, Executor, to 68k Mac emulators, I did a bit of exploratory work on getting C++ code running under an emulated, 68k Mac.  Using a g++ cross compiler (to m68k), along with some extra, non-m68k, helper tools, I was able to get PCE's macplus emulator to boot, sans any Apple-copyrighted code.

The replacement "ROM", if one could call it that, does nothing more than display a 1-bit bitmap on-screen.  It is mostly C++, with a bit of inline assembly mixed in, mainly to help setup a stack pointer, and to help sit in a busy loop, after writing the bitmap to video memory.

I've posted the code online at https://github.com/DavidLudwig/MacRomPicture , under fairly liberal copying terms (CC0; public domain), in case anyone is interested in looking at it, or modifying it.  I've tried commenting the source code up a bit, to explain some of the non-obvious parts.  Suggestions for modifications welcome.  I'll admit, there is a *TON* of stuff regarding Mac 68k internals that I still don't know about!

Here's a screenshot, albeit a bit of a fuzzy one (macOS Preview.app keeps wanting to blend the colors, when sizing it down):

33515412-01677e18-d731-11e7-95be-aea5e60dd69d.png.aafc0d128f982881f1f8e5e4fefe7842.png


A bootable .rom file is also online, at: https://github.com/DavidLudwig/MacRomPicture/releases .  It boots for me within a copy of PCE's macplus emulator, using a 4 MB Mac Plus (the 4MB part is important, with regards to where video memory starts!).  It also boots when PCE is configured to emulate either a Mac Classic, or a Mac SE.

I'm thinking of trying to extend this code a bit, perhaps adding in the ability to output text via serial, for future, printf-style debugging.

Comments, suggestions, questions, or critiques welcome, if anyone has any!  :-)

Cheers!

 
On 2nd thought, my next task with this might be timing, rather than serial.  I'm reading that serial drivers in earlier model Macs, such as the Mac Plus, need to wait a bit in-between serial IO operations.

It'd also be pretty cool to have an image bounce around the screen.  :-)

Suggestions for resources on such definitely welcome.  Otherwise, I'll probably be diving into one or more of the following:


 
Back
Top