====== Star Battle Expanded Pattern ====== //Star Battle// uses the [[hardware:magic system#Magic Register]]'s [[hardware:magic system#expander|Expander]] function to pack its fighter patterns in half the ROM space. The XOR function 'merges' the fighter with the background. ; XPAND load (code portions omitted for clarity) ; [...] L2650: LD A,$08 OUT ($19),A ; write 00001000B to XPAND (foreground color = 10, background = 00) ; [...] SYSSUK WRITP ; UPI WRITe with Pattern size lookup DB $7C ; ... X = 124 DB $00 ; ... Y = 0 DB $28 ; ... Magic Register = 0010 1000B (XOR, Expand) DW $26EC ; ... Pattern Address ; [...] ; Small H-Fighter Graphic L26EC: DB 10000100B ; X . . . . X . . DB 10110100B ; X . X X . X . . DB 11111100B ; X X X X X X . . DB 10110100B ; X . X X . X . . DB 10000100B ; X . . . . X . . ; [...]