stm_send is a tool to send and execute binary data from a modern computer to old 68k macs using their "Diagnostic mode" through the "Modem" serial port.
While researching technical details about the Macintosh SE/30, I discovered on mac68k.info that there is a "Diagnostic Mode" available on the "Modem" serial port on some 68k Macintoshes. This mode is used by TechStep, a device for testing the various components of a Macintosh.
An easy way to access this mode is to use the mac's interrupt button (the “Programmer's Interrupt switch”) before the computer starts the OS.
Beyond the possibilities of testing the hardware of the machine, this mode has two very interesting elements:
- the "*D" command allowing to drop data, and therefore also code, in the memory of the target computer
- the "*G" command to launch the execution of the code on the target computer at a given address
These commands are also highlighted in the section "TechStep Requests CPUID on IIsi", on the page of mac68k.info, where the TechStep sends a small program to retrieve the CPUID of the target.
stm_send uses these commands to upload binary data in the memory of the mac and to execute it. The transfer being done in hexadecimal at 9600 baud is not very fast. The settings made on the serial port are specific to linux.
It would be possible to speed up the transfers by doing it in two stages: first send a program which puts the SCC at a higher speed before returning control to "Service Mode", then send the data.
To upload the binary to the mac, after compilation, the procedure is as follows:
- connect the serial port of the mac "Modem" to a computer using a null modem cable
- turn on the mac
- when the mouse cursor appears press the interrupt button
- run the stm_send program with apropriate parameters
You can find a sample program which can be run on a Macintosh SE/30 through this method here.
I see two interesting things that could emerge thanks to this method:
- create boot floppies with only one machine without OS
- install a basic OS on a SCSI disk without having the installation disks
- My Original post in French (google translated to english)
- Details about the Diagnostic mode on mac68k.info
- Example program to upload here