Chasing the Bee: The development of Phased and Aztez Ride

Introduction:

Right after Revision (and the associated work on our RE:FORM demo that I released under the Rivals label there), I needed a little break from working on a large production, so this seemed like a great opportunity to focus on some smaller sizecoding projects again.

Furthermore, It seemed that Outline 2025 was looking to be more Atari focused again with various well known Atarians signing up to visit the party, so I decided to focus on entering the oldschool tiny intro competitions with some Atari ST focused intros.

Phased (128 Bytes, Atari ST):

Last year at Sillyventure 2024 I was able to get my feet wet with some realtime-ish pixel effect in the for of Galaktyka (2024). However the original release did not have any backbuffering, so i just tweaked the number of stars to a number that gave me the least amount of flickering. However in the aftermath of the compo I found a way to do backbuffering on a sizebudget by grabbing the current screenadress from the register at startup and and XOR-ing this adress directly into the $ffff8200.w register each frame. So with this trick in the bag, i set about creating another 128 byte intro.

Having a working backbuffer ment I could get a few more pixels onscreen using Line-A without it turning it into a flickering mess. So with this in mind I designed my next intro. Furthermore I had just updated my singen68k sine generation routines to be a little more efficient (14 bytes) and since I had not used my own singen in a production before, I figured this would be a nice opportunity.

Visuals:

I always kinda liked those twisted pixel bars as seen in Mortal Coil by F#READY as well as a few other Atari 8-bit demos which work by starting with a vertical loop across the height of the screen which acts as the Y-Position of each pixel and then read some values from a sinetable and do calculations on them for your that would then be used as your X-Position. This way I was already assured I wouldn't go overboard on the number of pixels I needed to use for this effect + I wouldn't need any code for clipping because all the pixels were guaranteed to be on screen.

After experimentation I ended up with the following shape where D7 is our vertical count / Y-position and D1 will be our X-position for drawing the pixel.

; basesin d1 = sintab[d0 = (y+t+t) & 510]
move d7,d0
add d4,d0
add d4,d0
and.w #510,d0
move.w (a5,d0),d1

; second phase
add d5,d6
and.w #510,d6

; x = ((d1*sintab[phase2]) >> 16 + tilt) >> 2 + 128
muls.w (a5,d6),d1
swap d1
add d7,d1 ; tilt
asr.w #2,d1
add.w #128,d1

With this setup I could use and change the D5 register as a 'stepsize' through the sine tables to create various '3d looking' shapes. I've added 95 so you already have a nice big step at the startup and get to some interesting shapes quickly.

; put timer into vars
move.l $466.w,d6
move d6,d4 ; backup to d4 for later use in drawing calculations
; Calculate our stepsize in D5
move d6,d5 ; d5=d6/128
asr #7,d5
moveq #95,d7
add d7,d5 ; +95

The final bit was adding some interesting color palette. For this I used the value of #$20 available in D7 after the supervisor mode init and shift that up to get a red tinted background and a more purple/gold type of palette which are otherwise harder to generate out of the box.

lea $ffff8240.w,a0 ; VID_COLOR0
asl #3,d7 ; make bg red-tinted (32<<3) + gold/purple palette
palloop:
move.w d7,(a0)+
add.w #$1112,d7
bcc.s palloop

Amiga version:

In development.

Aztec Ride (256 Bytes, Atari ST):

This intro was originally planned for Sommarhack 2025, but then got moved to Outline 2025 to support the party. The intro works by projecting 160 * 64 dots to the screen each frame using by using 2 loops to cover 64 Depth-steps and 160 Horizontal steps that are displaced vertically. Basically like a deluxe depth-based pixel landscape of sorts.

In theory this effect could be done realtime with maybe slightly reduced X or Z steps on any slightly capable retro machine like Amiga or Atari, but since we are on a extremely tight sizebudget, i'm using a little bit of precalc for this one to generate a few different frames to work with. Fortunately because the calculations are fairly easy this doesn't take up too much time.

Visuals:

Code for the shape is not extremly complex once you have in mind what you'd want in terms of shapes. Lets say our framenumber or time is in D7, our Z-Position (0..63) in D6 and our X position (0..159, mirrored horizontally) is in D5.

Then we can just go:
; start projecting a little further down from the screen d3=z+8
move d6,d3
addq #8,d3

; get a repeated Depth position with added time in d1 = (d7+d7+d6) & 15
move d7,d1
add d7,d1
add d6,d1
and #15,d1

; column height extraction = d0 = (d4 * d3 / 128) XOR d1
move d5,d0
muls d3,d0
lsr #7,d0
eor d1,d0

; Projected y = d4 = ((64-d0) * 64) / d3
moveq #64,d1
move d1,d4
sub d0,d4
muls d1,d4
divs d3,d4
; add some extra 'its really around the next corner' bending for that artistic vogue
add d3,d4

Then plot the pixels both at 160+D5,D4 and 160-D5,D4 and bob is your uncle.

Then upon execution we have a camera move up and down through the scene by copying selected parts of the scene to the screen, which makes the effect a little more dynamic and hopefully less boring to watch.

Sound:

The sound was done via MIDI output, which is triggered in the precalculation phase to let the audience know stuff is happening and build a little anticipation, and then upon the intro started is triggered every 16 frames. The audio data itself is 8 bytes MIDI commands for triggering the kickdrum, setting a string instrument on channel 1 and playing a note on channel one.

Palette:

The color palette in this is the same one used in Algorift. Its a warm grayscale type of palette which uses the #$20 from the supervisor init as a iteration counter to break off the color generation early. You can find more details about it in my blogpost about algorift..

Conclusion:

We had a great time at Outline 2025 where we got to release this crazy wild entry with Trepaan as well as support the party with these two Atari ST intros that tool first place in their respective compos.

For more information, you can check out the intros at demozoo:
Phased (2025)
Aztec Ride (2025)

Return to blog overview