Ports 35h-37h scroll the graphics layer (wrapping at 320 x 240); bit 1 of 36h hides a border (4 columns, 2 rows) where a program draws the strip coming into view unseen. The video loads its own column/row counters from the scroll registers each line and frame. CLS resets both. Testbench checks scroll, wrap and border. games/raid: an original Zaxxon-style game in C - fly over a fortress that scrolls diagonally, climb over low walls and through doorways in tall ones, shoot turrets, fuel tanks, radar and fighters, destroy the reactor. The world is drawn pixel by pixel from a formula, two columns and a row a frame (about 40% of the Z-80). test-raid.py flies the level with an autopilot and checks the frame budget; tools/boardemu.py is now shared by both games' tests. send-hex.py sets the date before saving. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
963 B
ArmAsm
38 lines
963 B
ArmAsm
; Start-up for a machine-code program that BASIC CALLs at 8600h: clear the
|
|
; variables, run main, and return to BASIC. The program has no initialised
|
|
; variables (gen.py's tables are const, so they stay in the code).
|
|
.module crt0
|
|
.globl _main
|
|
.globl s__DATA, l__DATA
|
|
|
|
.area _HEADER (ABS)
|
|
.org 0x8600
|
|
start:
|
|
ld hl, #s__DATA
|
|
ld bc, #l__DATA
|
|
ld a, b
|
|
or c
|
|
jr z, go
|
|
ld (hl), #0
|
|
dec bc
|
|
ld a, b
|
|
or c
|
|
jr z, go
|
|
ld d, h
|
|
ld e, l
|
|
inc de
|
|
ldir
|
|
go:
|
|
jp _main ; main's RET goes back to BASIC
|
|
|
|
.area _HOME
|
|
.area _CODE
|
|
.area _INITIALIZER
|
|
.area _GSINIT
|
|
.area _GSFINAL
|
|
.area _DATA
|
|
.area _INITIALIZED
|
|
.area _BSEG
|
|
.area _BSS
|
|
.area _HEAP
|