System Error Alert Table: Difference between revisions
(→Notes: Note the Power Macintosh text location) |
m (→Reading it: Add line numbers) |
||
| Line 13: | Line 13: | ||
<div class="toccolours mw-collapsible mw-collapsed"> |
<div class="toccolours mw-collapsible mw-collapsed"> |
||
'''<code>dsat.py</code> contents''' |
'''<code>dsat.py</code> contents''' |
||
<syntaxhighlight lang="python" class="mw-collapsible-content"> |
<syntaxhighlight lang="python" line class="mw-collapsible-content"> |
||
from argparse import ArgumentParser |
from argparse import ArgumentParser |
||
from pathlib import Path |
from pathlib import Path |
||
Latest revision as of 20:12, 10 November 2025
The System Error Alert Table (resource type DSAT, allegedly short for Deep Shit Alert Table) describes startup text and fatal error dialogs for the classic Mac OS.
Specification
Reading it
ResEdit doesn't support DSAT and only shows a hex editor despite having a custom icon for the resource type.
Here is an extremely rough Python script for dumping the alerts, their IDs, and their error messages. Despite DSAT definitions being polymorphic, there is no type information, so this script determines what is an alert by process of elimination (correct size, text pointers are valid, pointed-to text is ASCII). Copy-paste the hex editor output from ResEdit into a text file, then pass its filename to this script:
dsat.py contents
from argparse import ArgumentParser
from pathlib import Path
import struct
from typing import NamedTuple
parser = ArgumentParser()
parser.add_argument('hexfilepath')
buffer = bytes.fromhex(Path(parser.parse_args().hexfilepath).read_text())
offset = 0
def read_short():
global offset
number = int.from_bytes(buffer[offset:offset + 2])
offset += 2
return number
definition_count = read_short()
definitions: dict[int, 'Definition']
class Alert(NamedTuple):
text1_id: int
text2_id: int
icon_id: int
proc_id: int
button_layout_id: int
@property
def text1(self):
return definitions[self.text1_id].as_text().replace('/', '\n') if self.text1_id else None
@property
def text2(self):
return definitions[self.text2_id].as_text().replace('/', '\n') if self.text2_id else None
@property
def text(self):
if not self.text1:
return None
if self.text2:
return self.text1 + '\n' + self.text2
return self.text1
class Definition(NamedTuple):
id: int
data: bytes
def as_alert(self):
return Alert(*struct.unpack('>HHHHH', self.data))
def as_text(self):
return self.data[4:-1].decode('ascii')
def read_definition():
global offset
id = read_short()
length = read_short()
data = buffer[offset:offset + length]
offset += length
return Definition(id, data)
default_alert = read_definition().as_alert()
definitions = {(definition := read_definition()).id: definition
for _ in range(definition_count)}
for error_id, definition in definitions.items():
if len(definition.data) == 10:
alert = definition.as_alert()
try:
print(error_id, '-', alert.text)
except (KeyError, UnicodeDecodeError):
pass
print('Default - ', default_alert.text)
Notes
- The System Error Alert Table isn't just for fatal errors! The text below shows that the Force Quit dialog, among other things, is implemented here.
- Sometimes, there is no error text, or the text is cut off; this is due to a custom procedure being used for that alert.
- Post-boot (when
DSATID = 2 is loaded), "out of memory", "unimplemented trap", and friends are printed by a procedure.
- Post-boot (when
- Entries in the table are not in order.
- The "Power PC" and "System" (instead of Mac OS for >= 7.6) typos are in the original text.
- The PC Card warning exists on the PowerBook version of Mac OS 8.6 but not the generic version of Mac OS 7.6.1 (on a PowerBook 5300c) or Mac OS 9.2.2 (on a Power Mac G4).
- Is this a one-off for this version, or does this table get dynamically generated at install time?
- Mac OS 7.6.1 has a beta message in
DSATID = 0 despite being the production release. - In System 7.1.2, both the System suitcase and PowerPC Enabler have
DSATresources, but only the PowerPC Enabler version has the "Welcome to Power Macintosh" text.
Contents in different system versions
System Software 6.0.8
| Error ID | Text |
|---|---|
| 65526 | MacsBug installed. |
| 65525 | |
| 102 | This startup disk will not work on this Macintosh model. Use the latest Installer to update this disk for this model. (System 6.0.8 does not work on this model; you need a newer version that does.) |
| 103 | This Macintosh is set for 32-bit addressing. You may switch to 24-bit addressing and use this disk or restart and use a newer startup disk. (System 6.0.8 does not work with 32-bit addressing.) |
| 101 | Sorry, a system error occurred.
RAM parity |
| Default | Welcome to Macintosh. |
| Error ID | Text |
|---|---|
| 30 | Please insert the disk: |
| 28 | Sorry, a system error occurred. |
| 26 | The following application is busy or damaged: |
| 42 | You may now switch off your Macintosh safely. |
| 20000 | If you wish to continue using your Macintosh, press Restart. If not, press Shut Down. |
| 20001 | You may now switch off your Macintosh safely. If you wish to continue using your Macintosh, press Restart. |
| 20002 | Unsaved changes will be lost. |
| 101 | Sorry, a system error occurred.
RAM parity |
| Default | Sorry, a system error occurred. |
Mac OS 7.6.1
| Error ID | Text |
|---|---|
| 40 | Just figured out what BETA stands for. |
| 65526 | |
| 65525 | |
| 65523 | |
| 102 | This startup disk will not work on this Macintosh model. Use the latest Installer to update this disk for this model. |
| 104 | This disk must be unlocked in order to perform one-time housekeeping. If you wish to use this disk to start your Macintosh, unlock it. |
| 105 | System 7.6.1 needs more memory to start up. |
| Default | Sorry, a system error occurred. |
| Error ID | Text |
|---|---|
| 28 | Sorry, a system error occurred. |
| 25 | Not enough memory is available while using |
| 42 | It is now safe to switch off your Macintosh. |
| 20000 | If you wish to continue using your Macintosh, press Restart. If not, press Shut Down. |
| 20001 | It is now safe to switch off your Macintosh. If you wish to continue using your Macintosh, press Restart. |
| 20002 | Unsaved changes will be lost. |
| 99 | The System file on this startup disk may be damaged. The Installer can be used to repair this disk. |
| 98 | The System file on this startup device does not contain the resources necessary to boot this Macintosh. Please use the Installer to update the System file. |
| 101 | Sorry, a system error occurred.
RAM parity |
| 20010 | Hard Disk Cable Warning
You must first shutdown the Macintosh before attaching any SCSI hard disk cables. Disconnect the cable from the back of the machine right now. |
| 1010 | Code Fragment could not be prepared. |
| 1011 | Internal Mixed Mode failure. |
| Default | Sorry, a system error occurred. |
Mac OS 8.6 (PowerBook G3)
| Error ID | Text |
|---|---|
| 102 | This startup disk will not work on this Macintosh model. Use the latest Installer to update this disk for this model. |
| 104 | This disk must be unlocked in order to perform one-time housekeeping. If you wish to use this disk to start your Macintosh, unlock it. |
| 116 | This startup disk will not work on this computer. A Power PC based computer is required to startup from this disk. |
| 118 | The system software on the startup disk only functions on the original media, not if copied to another drive. |
| 105 | System 8.6 needs more memory to start up. |
| Default | Sorry, a system error occurred. |
| Error ID | Text |
|---|---|
| 28 | Sorry, a system error occurred. |
| 25 | Not enough memory is available while using |
| 42 | |
| 20000 | If you wish to continue using your Macintosh, press Restart. If not, press Shut Down. |
| 20001 | It is now safe to switch off your Macintosh. If you wish to continue using your Macintosh, press Restart. |
| 20002 | Clicking Force Quit causes you to lose any unsaved changes. To avoid further problems, restart your computer after you click Force Quit. |
| 99 | The System file on this startup disk may be damaged. The Installer can be used to repair this disk. |
| 98 | The System file on this startup device does not contain the resources necessary to boot this Macintosh. Please use the Installer to update the System file. |
| 101 | Sorry, a system error occurred.
RAM parity |
| 20010 | Hard Disk Cable Warning
You must first shutdown the Macintosh before attaching any SCSI hard disk cables. Disconnect the cable from the back of the machine right now. |
| 29205 | Please reinsert the PC Card
It is currently in use and must be reinserted immediately to prevent damaging a document, file or the card. Before ejecting a PC Card, you must close all documents and applications using the PC Card. |
| 1010 | Code Fragment could not be prepared. |
| 1011 | Internal Mixed Mode failure. |
| Default | Sorry, a system error occurred. |
Mac OS 9.2.2
| Error ID | Text |
|---|---|
| 102 | This startup disk will not work on this Macintosh model. Use the latest Installer to update this disk for this model. |
| 104 | This disk must be unlocked in order to perform one-time housekeeping. If you wish to use this disk to start your Macintosh, unlock it. |
| 116 | This startup disk will not work on this computer. A Power PC based computer is required to startup from this disk. |
| 118 | The system software on the startup disk only functions on the original media, not if copied to another drive. |
| 105 | System 9.2.2 needs more memory to start up. |
| Default | Sorry, a system error occurred. |
| Error ID | Text |
|---|---|
| 28 | Sorry, a system error occurred. |
| 25 | Not enough memory is available while using |
| 42 | |
| 20000 | If you wish to continue using your Macintosh, press Restart. If not, press Shut Down. |
| 20001 | It is now safe to switch off your Macintosh. If you wish to continue using your Macintosh, press Restart. |
| 20002 | Clicking Force Quit causes you to lose any unsaved changes. To avoid further problems, restart your computer after you click Force Quit. |
| 99 | The System file on this startup disk may be damaged. The Installer can be used to repair this disk. |
| 98 | The System file on this startup device does not contain the resources necessary to boot this Macintosh. Please use the Installer to update the System file. |
| 101 | Sorry, a system error occurred.
RAM parity |
| 20010 | Hard Disk Cable Warning
You must first shutdown the Macintosh before attaching any SCSI hard disk cables. Disconnect the cable from the back of the machine right now. |
| 1010 | Code Fragment could not be prepared. |
| 1011 | Internal Mixed Mode failure. |
| Default | Sorry, a system error occurred. |