Skip to main content

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.

9900dis is invoked as a single command with two required flags and several optional ones. The tool reads a binary ROM file and produces a plain-text assembly listing that can be fed back into the tool on subsequent runs to incorporate your annotations.

Usage

When running from the binary release, the program name is 9900dis (or 9900dis.exe on Windows). When running from source with python src/disassem/main.py, the help output shows main.py as the program name. All options are identical either way.
Usage: 9900dis [OPTIONS]

  TMS9900 disassembler by Jedimatt42

Options:
  --rom PATH      ROM file to disassemble  [required]
  --listing PATH  listing file to generate  [required]
  --aorg ADDRESS  the address of the first byte in the input ROM. Specified in
                  hex such as 0x0000
  --cpu TEXT      cpu type, one of 9900 or 9995. Defaults to 9900
  --version       Show the version and exit.
  --help          Show this message and exit.

Options

--rom
PATH
required
Path to the binary ROM file to disassemble. The file must exist on disk before 9900dis is invoked — the CLI validates existence at startup and exits with an error if the path is not found.
--listing
PATH
required
Path to the assembly listing file to generate. If the file already exists, 9900dis reads it first to extract annotations — labels, equates, format hints, and inline comments — before overwriting it with a freshly generated listing that incorporates those annotations.
--aorg
ADDRESS
default:"0x0000"
The memory address of the first byte in the ROM, expressed in hexadecimal (e.g. 0x0000, 0x6000, 0xA000). Use this when the ROM is mapped at a non-zero location in the CPU’s address space. The value is written as an AORG directive at the top of the listing and is used to compute correct pc:>XXXX annotations for every instruction.
--cpu
TEXT
default:"9900"
CPU variant to target. Accepted values are 9900 (TMS9900, the default) and 9995 (TMS9995). Selecting 9995 enables decoding of the additional signed-arithmetic instructions MPYS and DIVS, and the workspace-pointer instructions LST and LWP, which are not present in the base TMS9900 instruction set.
--version
flag
Print the 9900dis version number and exit immediately without processing any ROM.
--help
flag
Print the help message showing all available options and exit.

Examples

Basic disassembly — ROM mapped at address >0000:
9900dis --rom console.bin --listing console.asm
ROM mapped at a non-zero address — cartridge space starting at >6000:
9900dis --aorg 6000 --rom sys.bin --listing sys.asm
TMS9995 ROM — enables MPYS, DIVS, LST, and LWP decoding:
9900dis --cpu 9995 --aorg A000 --rom cart.bin --listing cart.asm
When --listing points to a file that already exists, 9900dis reads that file for annotations before regenerating it. This means your labels, equates, format hints, and inline comments are preserved across runs. See Iterative disassembly workflow for the full annotation cycle.

Build docs developers (and LLMs) love