Atariscne.org

rg-dis is a companion to our recent rg-asm; the McCartney to its Lennon; the Sporty Spice to its, err, Ginger Spice. Whilst rg-asm puts things together, rg-dis pulls them apart.


The unique thing about rg-dis is its deep knowledge of Atari hardware. It understands the full memory map of the machine; all the hardware registers, system vectors and operating system variables. It has full understanding of all the GEMDOS, BIOS and XBIOS calls. It knows all about AES and VDI and their data structures.

With this knowledge, it can annotate all operating system calls; input arguments and outputs.

And as it also understands assembly language, it can track how registers are stored and loaded, and assign contextually aware names to functions, making the disassembly far more readable.

It can also detect strings; both raw strings and VT52 enhanced ones (which it annotates), and gives them meaningful labels too.

Based on the same library that powers rg-asm, it can also show you cycle timing for instructions.

rg-dis has convenience functionality that allows you to disassemble files directly from containers like ZIP files without unzipping them. It also understands common Atari disk image formats, and you can disassemble files directly from them.

Another useful disk based feature - it can disassemble bootsectors directly, or full raw disk images, or any range of tracks and sectors you specify. Very handy for working with raw disk images.

rg-dis is a single binary with no dependencies - just unzip and run.

This is the second in our range of tools for Atari developers. More to come.


๐Ÿ”—ย https://rg.atari.org/tools/rg-dis/index.htmlย 

Comments

Tord
Monday, 21 September 2026 17:52
This comes very handy. I'm about to disassemble one of my earlier projects which I lost the source code for in order to make an update. :)

Thanks!
Quote
AdamK
Tuesday, 22 September 2026 12:05
It would be nice if the tool could recognize common C standard libraries.
Quote
Pink
Tuesday, 22 September 2026 23:06
@Tord - glad it will be useful. Let me know if you come across any bugs :)

@AdamK - good idea. Put together a new release which will now detect the common C libraries of popular Atari C compilers (VBCC, PureC etc). It stores binary signatures for library functions, so can identify then and give them function names. It also understands the calling convention (fastcall vs stdcall) so can annotate arguments passed to standard C library functions.
Quote
Cyprian
Wednesday, 23 September 2026 11:54
nice tool. Disassembling looks easier than in Ghidra/TT Digger.
Would it be possible to export source code compatible with Devpac?
Quote
Cyprian
Wednesday, 23 September 2026 12:15
Issue #1: "4e5e" - unlink A6

MOVE.W D0,-2(A6)
BRA.S _L642A
dc.w $4E5E
RTS

#2 "0238 / FFFD / 0484" - andi.b #$fd.$484.W


ADDQ.L #6,A7
MOVE.L D0,-8(A6)
_L9890:
dc.w $0238
dc.w $FFFD
dc.w $0484
MOVE.L -4(A6),D0
BNE.S _L98AC
MOVE.L -8(A6),-(A7)
MOVE.W #32,-(A7)
JSR (_L50B76).L

and more
Quote
Pink
Wednesday, 23 September 2026 22:52
@Cyprain - Have added a dialect option, so now you can output the disassembly in Devpac format (or other popular assembler formats).

Decoding of the two opcodes above has also been fixed.

Following up on AdamK's idea, starting to add detection of GFA basic executables, and annotation of GFA core library function names.

As ever, this is a pre-1.0 release, so if you spot any more bugs, let me know :)
Quote
Cyprian
Wednesday, 23 September 2026 23:21
thanks, still some issues , like ".dc.b" or "dc.w $4E5E"
Are you on discord?
Quote
Cyprian
Thursday, 24 September 2026 10:13
continuing Devpac dialec
".dc.b" => "dc.b"
".dc.l" => "dc.l"
".ds.b" => "ds.b"
"LINEA #3" => "LINEA 3"

checked in "0.9.4"
Quote
Cyprian
Thursday, 24 September 2026 22:57
0.9.7 and Devpac dialect issues/suggestions:

"LINEA #3" => "LINEA 3"
"LINEA #5" => "LINEA 5"
"ANDI.B #$FFFD,($484).W" => "ANDI.B #$FD,($484).W"
"MOVE.B #$FFFA,(_D56B2C).L" => "MOVE.B #$FA,(_D56B2C).L"
"MOVE.B #$FFE5,(A0,D0.L)" => "MOVE.B #$E5,(A0,D0.L)"
Quote
Pink
Friday, 25 September 2026 01:56
@Cyprian - thank you for these reports. Very useful.

Have been working through all the issues that you are raising and pushing fixes.

I'm not on discord, but am around on IRC.

Will also take a look at anything you post here.
Quote
Cyprian
Friday, 25 September 2026 10:33
@Pink
0.9.9: disassembled and assembled Sound Designer II - 103K asm lines. no issues.
thanks
Quote
Cyprian
Saturday, 26 September 2026 09:03
@Pink BTW, is there a chance for DSP56K disassembler?
Quote
Pink
Saturday, 26 September 2026 14:01
@Cyprian - happy it is working well for you now :)

And yes, we are building some other tools around the DSP56K; including a dis-assembler. More news soon.
Quote
Grazey
Saturday, 26 September 2026 15:55
Hi Mr Pink, nice one, really need an alternative to EasyRider v4 which I still use. Couple of issues, I'm using the --dialect devpac2 directive. However, it still creates source which can not be assembled - the main culprits are instructions with PC :

movea.l 4(pc,d2),a2 similarly jmp $42(pc,d1)

One feature request, can you add the option to use tabs rather than hard spacing? Devpac 2.25 only allows 999kb :) at the moment I have to run the source through Stew's source convertor.

Cheers
Quote
Pink
Saturday, 26 September 2026 19:38
Hi Grazey,

Devpac 2.25? You know they have now released Devpac 3, right? ;)

Anyway, I have fixed the source code emission for PC relative addressing for devpac2 dialect.

Have also enhanced the --tabs option so it is used for all spacing, not just line indentation. This should reduce source code size, so you can squeeze more into your devpac2 buffer.
Quote
earx
Sunday, 27 September 2026 16:27
testing. first impression: super cool.

does rg-dis also generate label names? meaning labels like: SAVED_PHYSBASE, SAVED_LOGBASE, VBL_HANDLER.. it makes sense that a tool could detect these label names.
Quote
earx
Sunday, 27 September 2026 18:09
ah yes, read the readme ;) awesome tool, already putting it to use :)
Quote
Cyprian
Sunday, 27 September 2026 18:53
@Pinky DSP56K tools sounds great. waiting impatiently.

Regarding Labels, would it be possible to use them from an external file?
Quote
Pink
Monday, 28 September 2026 11:39
@earx - yes, the tool knows system variables, vectors and os call output; and has full knowledge of 68k instructions, so it can trace stores through registers or addressing modes and give readable label names.

@cyprian - the tool already loads embedded symbols and sidecars (DRI/GST), but now label file loading has been added (you can add your own TSV file of address,label_name pairs), or specify labels directly on the command line. More details in the readme.
Quote
Grazey
Monday, 28 September 2026 18:33
@pink - thanks, though it still doesn't assemble in Devpac, the absolute offset address needs a label. See the RG disassemble compared to ER :

https://photos.app.goo.gl/kw5PdzcRyzKQ6Z7p8 RG
https://photos.app.goo.gl/x2Tcs69Nfv9Ssrci7 ER

GRZ
Quote
Pink
Monday, 28 September 2026 22:35
@grazy - thanks for that report, very clear repro of the issue.

Should all be fixed in the latest version now.
Quote
earx
Tuesday, 29 September 2026 20:34
RG-DIS is even useful to disassemble .. AMIGA .. binaries ;)
Quote
Pink
Wednesday, 30 September 2026 09:51
Amiga? HERESY! Mods, please ban earx.
Quote
Pink
Wednesday, 30 September 2026 09:52
But yes, you can use this to disassemble 68k binaries from any platform. You just won't get all the nice annotations.
Quote
earx
Thursday, 01 October 2026 09:20
having great fun with rg-dis!

a little bug report. rs-dis 0.9.16 hope this helps!

org $184FA
OR.B $0001(PC),D3 ; rg-dis output for bytes 863A 0001

vasm -m68020 -no-opt produces 863B 0170 FFFE 7B05.

The same happens with MOVEA.L $0006(PC,D0.W),A0 (207B 0006).
Quote
earx
Thursday, 01 October 2026 09:37
sorry for spamming. i saw there was 0.9.30 so i jumped on it.

my original reported issue was already finished. my buddy claude still finds the following issues. using VASM and 68020:

What still happens in 0.9.30:

Issue 2: .cpu / .text / .globl are still emitted, so the sed rewrite stays.
Issue 3: 16 byte immediates like ORI.B #$86EE,D1 still don't reassemble.
Issue 4: the target of BRA.W at $9FA4 ($9EBE) is still left as data.
Issue 7: the pointer table at $184E4 still has its last four entries decoded as instructions (now OR.B *+3(PC),D3). The sine table also still decodes as code.
Quote
Cyprian
Thursday, 01 October 2026 10:55
@earx "863A 0001" Steem SSE debugger shows as "or.b $1(PC),D3"
Quote
earx
Thursday, 01 October 2026 11:34
@Cyprian: i think that bug was already fixed?? bugfixes seem to happen at rapid fire pace. i used a version from 1 week ago.
Quote
Pink
Thursday, 01 October 2026 15:46
@earx thanks for the bug reports. Will look into it.

Is there a specific executable you are disassembling that shows the issues that you could share?
Quote
earx
Thursday, 01 October 2026 17:01
i can share, but not in public :D great you update this thing every day!
Quote
Cyprian
Thursday, 01 October 2026 21:09
@Pink, would it be possible to add prgflags as "COMMENT HEAD" for Devpac dialec?
Now in disassembled code I see:
; prgflags: $00000007 (fastload, ttramload, ttrammem)

But it would be cool to have something like this:
Fastload EQU 1
Quote
Cyprian
Thursday, 01 October 2026 21:10
Fastload EQU 1
Quote
Cyprian
Thursday, 01 October 2026 21:11
third time lucky

Fastload EQU 1
Quote
Cyprian
Thursday, 01 October 2026 21:13
no lucky :(
Fastload EQU 1
TTRAM_RUN EQU 2
TTRAM_Malloc EQU 4
COMMENT HEAD=Fastload+TTRAM_RUN+TTRAM_Malloc
Quote
Pink
Friday, 02 October 2026 01:05
@earx: most of those issues should be fixed in the latest version; for anything not fixed, a few small snippets of contextual code is handy, as main challenge revolves around classifying bytes as either data or code, and the surrounding context informs that.

The ori.b #$86ee,d1 assembles fine in rg-asm (and some other assemblers) as it is actually legal code; this instruction has a full word for its immediate value. Of course the instruction itself only uses the lowest 8 bits of the immediate, so you may wonder why you have all these unused bytes sitting around in your source code, what possible use could they have .. and then you see something like tIn's compofylla ...

@cyprian - have added devpac compatible prgflags, will be automatically inserted in your code when you have that dialect selected.
Quote
Cyprian
Friday, 02 October 2026 19:53
thanks
Quote

Add comment

Submit

ยฉ 2025-2026 The Atariscne Collective | info@atariscne.org