Two annotation types control how 9900dis interprets and outputs specific lines: data hints force a word to be treated as raw data instead of an instruction, and inline comments let you add human-readable notes that survive re-runs. Together they let you progressively document a ROM without losing your work on every pass.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/caljer1/9900dis/llms.txt
Use this file to discover all available pages before exploring further.
Data hints
What is a data hint?
Thef:data hint tells 9900dis to emit a DATA directive for that word instead of attempting to decode it as a TMS9900 instruction. This is essential for ROM headers, jump tables, interrupt vectors, and any constant data that happens to share a binary pattern with a valid opcode.
Without the hint, the disassembler will decode the word as whatever instruction it most closely resembles — often producing nonsense output that throws off the decoding of the words that follow.
Adding a data hint
Addf:data after the w:>XXXX field in the comment on the target line:
SOCB @>028a,r2) is what the first pass decoded — it doesn’t matter. On the next run, 9900dis reads back the f:data annotation and forces that address to emit a DATA directive regardless of the word’s bit pattern:
f:data annotation persists in the comment column on every subsequent run, so you only need to add it once.
Effect on subsequent words
When 9900dis decodes a word as a regular instruction, it may consume one or two additional parameter words from the ROM stream (for instructions with memory-direct or immediate operands). Marking the first word asDATA prevents this consumption — the parameter words are left in the stream and decoded independently on the next pass.
This often uncovers real instructions that were previously hidden as operand bytes. A common pattern when annotating a ROM header:
Before (header words misread as instructions):
How data hints are parsed
Inhints.py, deconstruct_notes splits the comment field on spaces and reads the 4th token (index 3):
f equals "f:data", the annotation is stored in self.annotations[pc]. During disassembly, handleFormatHint in rom.py checks this table before any instruction decoder runs:
handleFormatHint is the first handler in the dispatch list, f:data always takes priority over instruction decoding.
Inline comments
Adding an inline comment
Place any user note after a second semicolon on the line. Everything from the second; to the end of the line is treated as your comment:
Go back to title screen is extracted, stored, and re-emitted on every subsequent run.
Comment preservation
Comments are keyed to the PC address extracted from thepc:>XXXX field, not to the line’s position in the file. In hints.py:
f:data hint that was causing the word to be treated differently — the comment reappears in the output unchanged.
Comments in the output format
The full output line format is defined inrom.py at line 421:
| Column | Width | Content |
|---|---|---|
| Label | 6 chars, left-aligned | Symbol name, or empty |
| Tab | — | Field separator |
| Instruction | 24 chars, left-aligned | Mnemonic and operands |
; | — | Literal separator |
pc:>XXXX | — | Program counter in hex |
w:>XXXX | — | Raw word value in hex |
| Format hint | — | f:data if set, otherwise empty |
| User comment | — | \t; {text} if set, otherwise empty |
; in self.comments, but is emitted with a tab and semicolon prefix by hints.comment():