The Universal Atari Disassembler

rg-dis

Free universal 680x0 and DSP 56k disassembler for Atari binaries.

Key features

  • Motorola DSP56001 Disassembly: Full unified support for the Atari Falcon030 DSP coprocessor across all key output formats and mixed-mode embedded microkernels in 680x0 executables. Features indirect jump table detection and symbolic reconstruction, hardware DO loop analysis, on-chip peripheral annotations, and execution cycle timing.
  • Byte-Identical Re-assembly: Generates clean source code whose code and data sections re-assemble byte-for-byte through rg-asm --no-opt-size (680x0) and rg-asm --cpu 56001 (DSP56001), tested against a large range of Atari binaries.
  • Atari OS Trap Annotations: Automatic trap-call decoding for GEMDOS, BIOS, XBIOS, AES, VDI and Line-A calls, annotating function names, stack arguments, and return values.
  • Hardware & System Annotation: Built-in knowledge of Atari hardware registers (MFP, Blitter, YM2149, VIDEL, DSP Host Interface & peripherals), system vectors and TOS variables.
  • Smart Labelling: Derives contextual names for strings, system variables, hardware vectors, and trap return points to make disassembled code easier to read.
  • VT-52 Annotations: Decodes and annotates VT-52 terminal escape sequences (cursor positioning, clearing, styles) in data strings with contextual VT52_ smart labels.
  • Symbol Tables: Supports embedded symbols across Atari toolchains — DRI/Alcyon, Devpac/HiSoft GST, ELF, and VBCC a.out, plus external .sym sidecars for raw images.
  • String Extraction: Extracts readable strings, filtering out the opcode noise in decoded instruction regions, with quality scoring, ASCII decoding, and Atari ST character set recognition.
  • Floppy & Boot Sector Disassembly: Disassembles executable boot sectors or raw tracks directly from .ST, .MSA, and Pasti .STX disk images — ideal for custom loaders, demos, and games.
  • Floppy & Image Inspection: Inspects disk geometry, executable boot blocks, FAT12 filesystem health, cluster allocations, and file directory trees (--inspect disk) across .ST, .MSA, and Pasti .STX floppy images.
  • Direct Archive & Disk Extraction: Disassembles files nested inside .ZIP, .LZH, or floppy disk images in memory without unpacking them first.
  • Instruction Cycle Annotations: Annotates each instruction line with right-aligned CPU and DSP cycle execution costs (--annotate-cycles) dynamically calculated for 68000, 68030, and DSP56001 architectures.
  • Binary Formats: Handles GEMDOS .TOS/.PRG executables, standalone DSP binaries (.P56, .LOD, .OUT, cooked), ELF objects, DRI/GST relocatables, VBCC a.out, static .a libraries, and raw binary dumps.
  • Function & Cycle Metrics: Maps routine extents and estimates 68000 cycle costs per function as formatted terminal tables or structured JSON.
  • Native Multi-Platform & Free: Cross-disassemble on modern host machines. Native standalone binaries for Linux, macOS (Apple Silicon + Intel), and Windows. Completely free, no runtime dependencies.

Frequently asked questions

Is rg-dis free?

Yes. rg-dis is completely free to download and use on modern platforms.

Does rg-dis produce re-assemblable source code?

Yes. The central design contract of rg-dis is round-trip fidelity: disassembled 680x0 and DSP56001 output re-assembles byte-for-byte to the original binary via rg-asm.

Can rg-dis disassemble Falcon DSP56001 code?

Yes. rg-dis provides unified disassembly for Motorola DSP56001 binaries (.P56, .LOD, cooked DSP images) as well as embedded DSP microkernels found within Atari Falcon TOS executables.

Which host operating systems are supported?

rg-dis ships as standalone native binaries for Linux (x64, arm64), macOS (Apple Silicon, Intel x64), and Windows (x64). No dependencies or runtimes required.

rg-dis; OS trap argument decode & hardware memory map
$ rg-dis GAME.TOS
 
  █▀▀▄ █▀▀▀
  █▀█▄ █ ▀█   RESERVOIR GODS
  ▀  ▀ ▀▀▀▀   rg-dis · m68k disassembler
 
  ✓ Disassembling GAME.TOS (564,066 bytes)
  ✓ Disassembled 564,066 bytes in 1.69s
 
_start:
    MOVE.L    4(A7),A5                   ; basepage pointer
    MOVE.L    $0C(A5),D0                  ; text size
    ADD.L     $14(A5),D0                  ; data size
    ADD.L     $1C(A5),D0                  ; bss size
    ADDI.L    #$0100,D0                   ; basepage header (256 bytes)
    MOVE.L    D0,-(A7)                    ; newsiz - new size in bytes
    MOVE.L    A5,-(A7)                    ; block - start of block to shrink
    CLR.W     -(A7)                       ; zero - reserved, must be 0
    MOVE.W    #74,-(A7)                   ; Mshrink - shrink a memory block
    TRAP      #1                          ; GEMDOS #74 (Mshrink)
    LEA       $C(A7),A7
    CLR.L     -(A7)                       ; Super(0) -> enter supervisor mode
    MOVE.W    #32,-(A7)                   ; GEMDOS #32 (Super)
    TRAP      #1                          ; GEMDOS #32 -> D0 = old SSP
    LEA       6(A7),A7
    MOVE.W    #$0000,($FFFF8240).W        ; write palette[0]
    MOVE.B    #$00,($FFFF8260).W          ; sshiftmod - ST low resolution
    …
$ 

Quick start

rg-dis game.tos -o game.s                        # disassemble executable → .s
rg-dis game.tos --annotate-cycles -o game.s       # per-instruction CPU cycle costs
rg-dis dsp_prog.p56                              # disassemble DSP56001 binary (.p56 / .lod / .out)
rg-dis game.tos --inspect embedded-dsp           # scan Falcon binary for embedded DSP microkernels
rg-dis game.tos --inspect cpu                    # minimum CPU & FPU requirements
rg-dis game.tos --inspect functions,cycles       # function sizes & 68000 cycles
rg-dis game.tos --inspect strings                # scored string extraction
rg-dis cuddly.msa --bootsector                   # extract & disassemble boot block
rg-dis cuddly.msa                                # floppy image: auto-routed to the disk pipeline
rg-dis game.st --disk 10/0/1..10/1/9             # floppy track & sector range
rg-dis AUTO/GAME.PRG --container game.msa        # direct in-container extraction
rg-dis tos.img --org 0xFC0000 --sym tos.sym      # ROM image with DRI/GST symbol map

Verify

After unzipping, check the extracted files (the archive includes SHA256SUMS):

sha256sum -c SHA256SUMS

Learn more