This cheeky little hack stops USB from crashing on a Mac mini without a
working PMU. Calls from the USB controller class driver to
PMActivateTimer are nopped out by replacing bctr with blr at the end of
the glue function. Temporary!
The DeRezzed files in Misc (*.rsrc and GoNativeResources) will be Rezzed
from their own data forks when EasyBuild notices that they have an empty
resource fork.
Running the Make/CreateBuildResultsFolders script after a clone, or
after clobbering BuildResults/, was a pain. Now a clean build can be
guaranteed with:
rm -rf BuildResults
git checkout BuildResults
The names of the NanoKernel MP calls made by this 68k ROM library were
found by inspecting the PowerPC MPLibrary, which makes these and many
other MP calls. The document "Adding Multitasking Capability to
Applications Using Multiprocessing Services" gave some background
information. It also helped to determine the function signatures of the
MP calls and of these ROM wrappers.
The sources needed no changes (how embarrassing), except to remove an
unnecessary dependence on a nonexistent SoundPrivate.a. Lastly.lib had
an incorrect position for SIDESOUNDBUFFER, which has been fixed.
The unlinker's new ISLANDGUESS HIDE' option removes autogenerated BSR.L
from the binary dumps and makes tweaks that will cause them to be
regenerated by the linker. MPW's linker seems to have the correct branch
island placement policy, because round-tripping is preserved. When
building from edited sources, there is a remote possibility that the
arrangement of branch islands inside a dumped file will be changed,
disrupting references within that file.
Previously these were lumped in with Lastly. Now they are unlinked and
correctly labelled, and Lastly contains only a small amount of PowerPC-
specific code.
The unlink tool now REFGUESSes branches between object files, with some
manual guidance. If you patch the ROM enough to change its function
offsets, it should still work fine.
(One potential exception: if the linker needs to put a new "BSR.L"
island module *within* a pre-built object file, that module file's
internal references *may* be disrupted. This situation is fairly
unlikely, but with improved reversal it will be addressed.)
"DeVectorize" was a hideous several-thousand-line Python script that
split 70% of the ROM into barely passable MPW object files. The new
unlinker, "unlink", produces much nicer files and enjoys a clean
separation of code from data. Using DumpObj, you can get a very readable
listing of a given object file (GoNativeROMLib.o has improved a great
deal). With a bit more work, unlink will be superior to FDisasm for all
68k Mac ROM reversal.
The ExpansionBusDispatch trap (AAF3) is implemented in ROM using a
DispatchHelper table. Using a header from the embryonic Expansion Bus Mgr in
CubeE (rather suspect) and from the Universal Interfaces (solid), the names of
24 of the 47 dispatch selectors have been found. This commit updates the
dumped ExpansionBusMgr.lib with new symbol names.
All but two of the 47 dispatch selectors are Vectorized, so this commit also
updates VectorTable.a with selector numbers and, where possible, names. The
two non-Vectorized dispatch selectors (27 and 28) both point to the same 'nop'
function immediately before ExpansionBusDispatch.
SANE is the Standard Apple Numeric Environment (a float library deprecated in
favour of the native PowerPC float unit). The only change to the PACK 7
resource was in the vicinity of a _StripAddress call. SANE also had to be
added to the reconstructed Toolbox.make file.
The "RomLink" bytecode language can be used to link a tree of binary chunks
into a flat file. The bytecode specifying each binary chunk lives in a
Resource Manager resource. The RomLink's only purpose is to flatten
DeclData.rsrc into a "Slot 0" (motherboard) DeclData, so it seems like
overkill. Nonetheless, DeclData.rsrc is very complicated (and so are its
antecedents, DeclData.r and the include file RomLink).
This implementation is incomplete. It is just enough to build the vestigial
DeclROM that TNT and later machines retain for Open Transport.
Git works better with LFs but MPW mostly requires CRs.
ConvertLineEndings acts only on TEXT files, so run SuggestFileTypes
first. Then:
:Make:ConvertLineEndings > "{TempFolder}FixLines" ; "{TempFolder}FixLines"
ConvertLineEndings is both an MPW script and a C program. The script
builds the fast MPW C Tool, and suggests a command that will use the
Tool to fix all the line endings in the repository.
CreateBuildResultsFolders is necessary because git does not track empty
directories (fair enough) despite the build system requiring their presence.
SuggestFileTypes is necessary because git does not track Finder metadata.
Both scripts are flexible in how they are run and robust -- important in a
newly cloned repo.
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.
The Tools directory, containing mostly junk, is also excluded.