DLudwig255
Member
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):
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!
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):
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!