The Universal Atari Disassembler

rg-dis

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

Key features

  • Byte-Identical Re-assembly: Generates clean 680x0 and DSP 56001 source that re-assembles byte-for-byte through rg-asm.
  • Motorola DSP 56001 & Mixed-Mode: Disassembles standalone Falcon DSP binaries and automatically detects embedded DSP microkernels inside 68k executables.
  • OS Trap & Hardware Annotations: Decodes Atari OS traps and arguments automatically, with built-in knowledge of ST/STE/TT/Falcon hardware registers and system vectors.
  • C, GFA-BASIC & STOS Disassembly & Decompilation: Compiler-aware annotations for Atari C, GFA-BASIC, and STOS, turning runtime calls, arguments, line numbers, and variables back into readable code — plus --decompile to lift compiled STOS executables back into recompilable STOS BASIC source.
  • Smart Labelling & String Analysis: Names subroutines, branch targets, variables, text strings, and VT-52 sequences from how they are used.
  • Cycle Annotations & Metrics: Annotates instructions with 68000/68030 cycle costs and exports per-function byte and cycle rollups.
  • Floppy Images, Boot Sectors & Containers: Inspects and disassembles boot sectors, raw tracks, and files directly inside .ST, .MSA, .STX, and archive containers.
  • Symbol Recovery & Binary Formats: Handles TOS executables, ROMs, objects, and static libraries, recovering embedded symbol tables where present.
rg-dis; OS trap argument decode & hardware memory map
$ rg-dis GAME.TOS
 
  █▀▀▄ █▀▀▀
  █▀█▄ █ ▀█   RESERVOIR GODS
  ▀  ▀ ▀▀▀▀   rg-dis · 680x0 & DSP 56k 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 Falcon DSP 56001 binary
rg-dis game.tos --inspect                        # inspect header, requirements & sections
rg-dis demo.msa --bootsector                     # extract & disassemble floppy boot sector

Verify

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

sha256sum -c SHA256SUMS

Learn more