Classic Mac OS debugging output: Difference between revisions

From Computers Wiki
Jump to navigationJump to search
(→‎Notes: Note the "Off to MacOS." message)
(Rewrite instructions)
Line 1: Line 1:
You can make the Classic Mac OS dump a bunch of debugging output to Open Firmware during boot and sometimes the screen after boot.
You can make the Classic Mac OS dump a bunch of debugging output during boot.


== Instructions ==
To do this, open Open Firmware during boot with Command-Option-O-F and enter <code>dev / 3013FFF encode-int " AAPL,debug" property</code>. Then, boot with <code>mac-boot</code>.


# Boot into Open Firmware (Command-Option-O-F).
If you want a log of this output, you should hook your machine up to the local network, then run this, replacing the IP address with whatever is available for the machine to use:
# Since log output is massive, consider logging over the network instead of to the screen:

dev /packages/telnet
## Run <code>dev /packages/telnet</code>.
" enet:telnet,192.168.18.10" io
## Run <code>" enet:telnet,192.168.18.10" io</code>, substituting the IP address as necessary.
##* On-screen text input and output will end.

## On another computer, telnet into that IP address.
Then connect to your machine via Telnet before booting.
##* The screen will blank itself until booting begins.
# Use the [[#Bitflags]] table to choose a debugging configuration.
# Run <code>dev / 3013FFF encode-int " AAPL,debug" property</code>, substituting the hexadecimal number as necessary.
# Run <code>mac-boot</code>.


== Bitflags ==
== Bitflags ==
Line 42: Line 46:
== Notes ==
== Notes ==
* This does not work on a tray-loading iMac G3 because <code>/packages/telnet</code> does not exist.
* This does not work on a tray-loading iMac G3 because <code>/packages/telnet</code> does not exist.
* The screen will become blank after connecting from the client machine. The screen will come back to life once booting begins.
* Telnet output starts about two seconds after the screen turns gray. Output then ends, before the Happy Mac even appears.
* Telnet output starts about two seconds after the screen turns gray. Output then ends, before the Happy Mac even appears.
** When this happens, the following is printed to the screen: <code>Off to MacOS. The next (and last) call into OpenFirmware is quiesce().</code>
** When this happens, the following is printed to the screen: <code>Off to MacOS. The next (and last) call into OpenFirmware is quiesce().</code>

Revision as of 05:35, 26 September 2025

You can make the Classic Mac OS dump a bunch of debugging output during boot.

Instructions

  1. Boot into Open Firmware (Command-Option-O-F).
  2. Since log output is massive, consider logging over the network instead of to the screen:
    1. Run dev /packages/telnet.
    2. Run " enet:telnet,192.168.18.10" io, substituting the IP address as necessary.
      • On-screen text input and output will end.
    3. On another computer, telnet into that IP address.
      • The screen will blank itself until booting begins.
  3. Use the #Bitflags table to choose a debugging configuration.
  4. Run dev / 3013FFF encode-int " AAPL,debug" property, substituting the hexadecimal number as necessary.
  5. Run mac-boot.

Bitflags

From the beginning of the debugging output:

AAPL,debug bit settings (-OR- bits together):
       1 * = Print general informative messages.
       2 * = Print formatted Mac OS tables (except config/universal info).
       4 * = Print formatted config info table.
       8 * = Dump Mac OS tables (except config/universal info).
      10 * = Print node names while copying the device tree.
      20 * = Print property info while copying the device tree.
      40 * = Print interrupt-related info.
      80 * = Print interrupt tree traversal info.
     100 * = Print address resolution info.
     200 * = Print NV-RAM info.
     400 * = Print Mac OS "universal" info.
     800 * = Print "special" node info.
    1000 * = Load EtherPrintf utility via parcel for post FCode debugging.
    2000 * = Print BOOTP/DHCP/BSDP information.
    4000   = Allocate writable ROM aperture.
    8000   = Mark Toolbox image as non-cacheable.
   10000 * = Print parcel info while copying the device tree.
   20000   = Print information on device tree data checksums.
 1000000 * = Enable the Nanokernel debugger.
 2000000 * = Display the Nanokernel log during boot.
10000000   = Dont attempt to unhibernate system.
40000000   = Halt after end of FCode (useful if outputting to screen).

Adding all the bitflags together that enable logging (anything with an asterisk) gives 3013FFF.

Notes

  • This does not work on a tray-loading iMac G3 because /packages/telnet does not exist.
  • Telnet output starts about two seconds after the screen turns gray. Output then ends, before the Happy Mac even appears.
    • When this happens, the following is printed to the screen: Off to MacOS. The next (and last) call into OpenFirmware is quiesce().
  • After telnet output ends, a separate NanoKernel Log will appear on screen, get covered by the Welcome to Mac OS dialog, then appear a second time before disappearing entirely with the "Starting up..." text.