These are parts of code in Brataccas that may have been written originally targeting the 68008 processor of the Sinclair QL before they were ported to the Atari ST

After some cursory scanning of the Brataccas code, some patterns emerged:

Case 1: Bit-reversal lookup table

This seems unusual and suggests graphics conversion between platforms with different pixel bit-ordering. The QL stored pixels in a different bit order than the ST - this table appears to be useful to convert graphics assets that were originally in Sinclair QL format.

; Bit-Reversal Table (L00A0-L00A4)

L00A0:DS.W 128,0
L00A2:LEA L00A0(PC),A0
MOVE.W #$FF,D7
L00A3:MOVE.B D0,D1
MOVEQ #6,D2
ROXR.B #1,D1
ROXL.B #1,D4
L00A4:ROXR.B #1,D1
ROXL.B

Case 2 Excessive byte operations

Throughout the code, there's an unusual preference for byte operations:

MOVE.B (A0)+,D0
MOVE.B (A0)+,D1

On the 68000 (ST/Amiga/Mac), word operations are typically preferred for performance. But the QL's 68008 CPU had an 8-bit external bus - byte vs word operations had similar performance. This coding style hints at optimisation for the 68008, not the 68000.

The disassembly available at the Brataccas website seems to have been produced from a QL to Atari ST port, not the Amiga as I originally thought.
https://www.brataccas.com/Page28.php

The first part of the code (first 1000-1500 lines or so) is a music tracker, and it's clearly a separate module from the rest, clearly designed to be reusable. There are hints that the I/O ports are Atari-specific and that the engine allows for developers to perform hot-editing of music notes via the MIDI port, which was something incredibly sophisticated for 1985. Some other parts of the code deal with vibrato, legato, and effects during realtime play.

After that block there's what seems to be a sprite blitting engine, but that's as far as I got.

To be continued...

#brataccas #retrocomputing #retrogaming #m68k #SinclairQL #QL #asm #assembler #m68008

Brataccas :: A HISTORY OF THE GAME

Brataccas fan site. Created and Hosted by juncmodule.