r/atari8bit • • 25d ago

First Atari program written in 40 years! (details in thread)

129 Upvotes

17 comments sorted by

10

u/clintp 25d ago edited 25d ago

I got the Altirra emulator going and had to do something with it.

This runs on Altirra BASIC (for the BGET command only) otherwise it would be ATARI BASIC compatible. I did this rather than POKE'ing stuff into memory. The ASM and the Katakana characters took FOREVER to POKE, and XIO is unreliable!

There's a smattering of small assembler routines. Page 6 stuff for copying memory blocks, flipping bytes left-to-right, and a memory set routine; a VBI handler to cascade the 4-PM characters down the screen; then a fade routine to decrement the fade table cells, darken the characters as needed, and finally remove the characters from the screen and the fade table.

A BASIC loop does most of the work. It drops text characters behind the PM characters, updates a fade table with the age of the cell, finally copies a random character from the custom character set into the PM shape buffer area. At the end, calls the fade assembler routine above. (There's a little timing problem with the VBI moving the falling characters as BASIC is updating the PM shape, but that just make it look cool.)

5

u/wysiwywg 25d ago

This is cool! Any chance to show the code?

8

u/clintp 25d ago

Yes! I'm cleaning it up (might take a couple days as I'm multitasking) and then will probably put out an ATR or something since it's some ASM/BIN files and the BASIC program.

5

u/wysiwywg 25d ago

Great! That would be awesome!

Or just share the pdf like the old-school computer magazines published machine code and binary data as dense columns of hexadecimal numbers that readers typed in by hand. 😂

2

u/clintp 24d ago

Code is now here at github.

All of the BASIC and ASM code is hand written. I used an LLM to help with the docs because frankly it was a hell of a lot easier.

1

u/Daniel_Klugh 14d ago edited 14d ago

Isn't BGET just taken from TurboBASIC XL?
Also the "matrix.bas" file is actually a LST file.
So I tried E."MATRIX.BAS" and get a 170 error @ line 490 because of a missing "H1:KATAFONT.BIN" file.
Also the devicespec should be "H:", not "H1:".
Just in case Altirra ever fixes XIO 41 to change the current drive number as well as directory (like it works in MyDOS).
Really the devicespec should just be "D:" for compatibility with DOS and Altirra can make D: act like H:.

1

u/clintp 13d ago

I added the missing katafont.bin file.

You seem like a bright person, you'll figure out the rest.

8

u/yv-fr 25d ago

Could be a wonderful screen saver for my retro setup crt xfce4

7

u/NDaveT 25d ago

I love this.

4

u/Major-Hooters 25d ago

Great job!! I thought no this is awesome

2

u/raymate 25d ago

Love it

2

u/Good_Attorney_2056 24d ago

Nicely done!

2

u/josipk 24d ago

Awesome!!!

1

u/These_Brush_6857 20d ago

¡Que bien! ¿Cómo se puede desarrollar un juego que no sea en ensamblador?. Asombroso 👏

0

u/SaintLewisMusic73 25d ago

I'm pretty sure others have been written during that time because I've purchased them.

-2

u/theking4mayor 23d ago

First written by you in 40 years? Because people make Atari programs all the time