• Please review our updated Terms and Rules here

6800 development tools for Atari pinball

dluck

Experienced Member
Joined
Feb 9, 2015
Messages
116
Location
Campbell, CA
Hi all,
II have some assembly code that runs a pinball game that I would like to assemble and create a new set of roms for the game.
The pinball game is called Space Riders, made by Atari in 1978.
Here is snippet of the code:
.ASECT
.RADIX 16
.SBTTL RAM ALLOCATION
;*DISPLAY
DISP: .BLKB 10
;*TEMPS
TEMP1: .BLKB 2
TEMP2: .BLKB 2
...
LTHLMP =3D42. ;L THUMPER
RTHLMP =3D43. ;R THUMPER
...
;*CHECK PROGRAM STATUS
;*
STATCK: LDAA RTEST ;CHECK RAM TEST
CMPA I,0AA
BNE BADCK ;FAIL
LDAA RTEST+1
CMPA I,55
BNE BADCK ;FAIL
TSX
LDAA X,0
CMPA I,6F ;PC IN RANGE?

I can use either windows or linux to do the work.
vi and command line assembler, linker, etc. can work.

Suggestions?
 
Well as I didn't recall seeing a .SBTTL directive and thinking TTL might be something to do with pintables an logic I googled
".sbttl" 6800 assembler
and it came up with the ASXXXX cross assemblers which were originally included written for PDP11 and VAX which makes sense.
Its also says .SBTTL is to set the sub-title so I was way off.

I found a modern port here:-


but there may be better versions elsewhere.
 
For many years I've used A68, in fact I use a few of the Axx range, A68 (MC6800), A18 (RCA1802), A48 (Intel 8047/8048), AZ80 (duh!)...
https://www.retrotechnology.com/restore/a68.html
Phil,
That is a great assembler if you were starting from scratch, but I feel it will be challenging to use with the sample code above. It does not have any of the directives, and the above code has colon terminated labels. I think it was written for those cross assemblers, which use a very non-standard source format, and it could be a lot of work to re-edit the source to assemble with A68.
Dave
 
Atari wrote their own macro assembler and linker for the 6502,6800 and 6809
that ran under RT-11. The syntax was similar to MACRO-11
 
Last edited:
ASECT RADIX and SBTTL are pseudo-ops that are usually specific to only a few assemblers. If you see enough various 8-bit assembly language code, you will get familiar with them.

In this case RADIX 16 means numbers are hexadecimal by default (most people just used $xxxx for hexadecimal on 68xx instead of a radix directive), and SBTTL puts a sub-title on the listing pages (having paper listings was a big thing back then). BLKB means to put a raw data byte.

Also different assemblers had different syntax rules. Some of them (particularly ones from Motorola) would let you put comments at the end of a line without needing to start with a semicolon (';'), but others consider it a syntax error. I also see that the code you had didn't use a '#' for immediate operands (CMPA I,0AA / CMPA I,55 instead of CMPA #$AA / CMPA #$55). For that matter "LDAA X,0" looks wrong too, probably should be "0,X" in normal 6800 syntax. Yeah, if this was Atari source code, it seems their assembler had more than a few quirks. That happens when someone has to write their own assembler, and because it's the 1970s, your best choice for programming language is FORTRAN, not famous for good string handling.

ASECT sounds like a code section directive, so it probably used a linker. That allows you to build each separate module just once when it changes, to save compute and disk time. Not all assemblers use a linker (mine doesn't), you just include all the various files and build everything each time. It runs slower, but with a modern computer and 8-bit code everything is done in an instant anyhow.

If it was me, I'd normalize it to a more common style if I wanted to maintain the code to make changes. Even better yet, I'd find the original binary, disassemble it (now that I have a good disassembler) and start with that. It would be much easier than trying to fix up that weird syntax.
 
Phil,
That is a great assembler if you were starting from scratch, but I feel it will be challenging to use with the sample code above. It does not have any of the directives, and the above code has colon terminated labels. I think it was written for those cross assemblers, which use a very non-standard source format, and it could be a lot of work to re-edit the source to assemble with A68.
Dave
Most assemblers have their own native quirks, but for an assembler programmer its not a monumental task Dave, its just trivial search & replace, I do it frequently!
 
Most assemblers have their own native quirks, but for an assembler programmer its not a monumental task Dave, its just trivial search & replace, I do it frequently!
I know that, I can, but these days don't often, write assembler. I wrote a lot of 6809 code, when I had a 6809 for radio contest logging. So whilst I agree that generally what you say is true, as Al pointed out:-

Atari wrote their own macro assembler and linker for the 6502,6800 and 6809
that ran under RT-11. The syntax was similar to MACRO-11

and Macro-11 is rather different to normal Assemblers. If they used any of the Macro facilities it will be a challenge to fix for a less capable assembler.
 
and Macro-11 is rather different to normal Assemblers. If they used any of the Macro facilities it will be a challenge to fix for a less capable assembler.

They were pretty creative with the use of Macro-11
Here is a 2901 micro-assembler in Macro-11

The original toolchain Dale needed is now up at http://bitsavers.org/bits/Atari/arcade which are needed for all of those Atari game sources in historicalsource
 
Back
Top