Re: [stella] Question about Distella

Subject: Re: [stella] Question about Distella
From: "B. Watson" <atari@xxxxxxxxxxxxxx>
Date: Fri, 10 Jun 2005 09:28:40 -0400
On Thu, 9 Jun 2005, David Galloway wrote:

> I found it a pain to have to search through the
> output to find the loads from COLUPF and change them to loads from
> INPT0. Changing the disassembler seemed a better option.

If it's a load, it must be INPT0. If it's a store, it's COLUPF...

That said, it wouldn't be hard to fix the Distella output with a short
perl script:

#!/usr/bin/perl -w

%replacements = (
 		VSYNC => 'CXM0P',
 		VBLANK => 'CXM1P',
 		WSYNC => 'CXP0FB',
 		RSYNC => 'CXP1FB',
 		NUSIZ0 => 'CXP1FB',
 		NUSIZ1 => 'CXM0FB',
 		COLUP0 => 'CXBLPF',
 		COLUP1 => 'CXPPMM',
 		COLUPF => 'INPT0',
 		COLUBK => 'INPT1',
 		CTRLPF => 'INPT2',
 		REFP0 => 'INPT3',
 		REFP1 => 'INPT4',
 		PF0 => 'INPT5',

LINE: while(<>) {
 	for my $k (keys %replacements) {
 		if(/ld[axy]\W+$k/i) {
 			next LINE;

Save in a file, and run with:

 	perl disasm.asm > fixed.asm

It's not the prettiest code ever, and definitely not the fastest, but
it took under 10 minutes to write :)

Archives (includes files) at
Unsub & more at

Current Thread