Build the 68k part of the NewWorld Mac ROM
Go to file
Elliot Nunn 77023fea0f Add Unix shell script to wrap EasyBuild 2018-05-21 15:29:31 +08:00
BuildResults Identify most DisplayMgr entry points 2018-01-22 10:40:44 +08:00
DeclData Correct the hard-coded DeclData build date 2017-12-26 09:52:53 +08:00
Drivers Update the EDisk (RAM Disk) driver 2017-12-26 09:52:52 +08:00
Interfaces Reverse the two new functions in StartInit.a 2018-01-08 20:09:24 +08:00
Internal Annotate ExpandMemRec field offsets 2017-12-26 09:53:21 +08:00
Libs Bring in CubeE sources 2017-12-26 09:52:23 +08:00
LinkedPatches Bring in CubeE sources 2017-12-26 09:52:23 +08:00
Make Add a Unix shell script to set file types 2018-02-10 19:38:27 +08:00
Misc Add a Unix shell script to set file types 2018-02-10 19:38:27 +08:00
OS Neaten up terrible DrawBeepScreen disassembly 2018-02-03 09:05:59 +08:00
Patches Build updated MainCode image (matches Mac OS ROM 9.6.1+) 2017-12-26 09:52:25 +08:00
ProcessMgr Bring in CubeE sources 2017-12-26 09:52:23 +08:00
QuickDraw Reverse 68k Color QuickDraw 2017-12-26 09:52:55 +08:00
Resources Update list of resources in ROM 2017-12-26 09:52:53 +08:00
SuperMarioSources Bring in CubeE sources 2017-12-26 09:52:23 +08:00
Tidbits Bring in CubeE sources 2017-12-26 09:52:23 +08:00
Toolbox Build Data Access Mgr stub from source 2017-12-26 09:53:19 +08:00
Tools/ToolSource Fix bug where RomLink handles weren't locked 2018-02-03 11:40:54 +08:00
.gitignore Add .gitignore 2018-02-03 11:47:09 +08:00
EasyBuild Add Unix shell script to wrap EasyBuild 2018-05-21 15:29:31 +08:00
EasyBuild.sh Add Unix shell script to wrap EasyBuild 2018-05-21 15:29:31 +08:00
README.md Add Unix shell script to wrap EasyBuild 2018-05-21 15:29:31 +08:00

README.md

The 68k ROM for NewWorld Macs

This repo is part of the CDG5 project. It contains reversed sources and unlinked object files sufficient to build a 3 MB 68k ROM for a NewWorld Mac (that's a "ROM-in-RAM" Mac). The build result is a byte-perfect copy of the ROM inside the final "Mac OS ROM" release.

Fixing line endings

MPW requires old-style Mac line endings (CR), while Git works better with Unix line endings (LF). Git filters can be used to convert between the two. Files committed to the repo are "cleaned" (LF-ed), and then "smudged" (CR-ed) when they hit the working tree. After cloning, append these snippets to your Git config.

Append this to .git/config:

[filter "maclines"]
	clean = LC_CTYPE=C tr \\\\r \\\\n
	smudge = LC_CTYPE=C tr \\\\n \\\\r

Append this to .git/info/attributes:

* filter=maclines
*.lib -filter
*.o -filter
*.sh -filter
.gitignore -filter

Finally, do a once-off "re-smudge":

rm -rf ../mac-rom/*
git checkout .

Setting type and creator codes

Some MPW Tools require their input files to have the correct Mac OS file type ("TEXT" or "OBJ "), but Git does not save Mac OS type and creator codes. This shell script will correct the file types in a freshly cloned repo:

sh Misc/SetFileTypes.sh

Building

This code is built with the Macintosh Programmer's Workshop (MPW), which runs on the Classic Mac OS. To satisfy the memory requirements of the build process, the MPW Shell should get a memory partition of at least 16 MB. Once you have MPW set up, the build process is not particularly fussy.

Not many computers run the Classic Mac OS any more. Here are a few workarounds:

  • Just find a Mac running Mac OS 7.5-9.2. (Not much fun if it's also your test machine.)
  • Use the Classic environment on a PowerPC Mac running Mac OS X 10.4 or earlier. (A small PowerBook or iBook is perfect.)
  • Use EMPW ("Emulated MPW"), a package of command-line tools, emulators and OS images that lets you run MPW commands straight from your macOS Terminal. This is my preferred solution.

Once MPW is set up, the build command is:

EasyBuild

Using EMPW, that's:

empw EasyBuild

Even nicer is this Unix shell script, which avoids unnecessary launches of the emulator:

./EasyBuild.sh

The 3 MB image will be at BuildResults/RISC/Image/RomMondo.

What's next?

The 3 MB 68k ROM needs to be linked into a 4 MB PowerPC ROM before it can be compressed inside a bootable Mac OS ROM file. So on to https://github.com/elliotnunn/powermac-rom.