Bastion Raid: isometric scrolling shooter, graphics scroll and border
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>
This commit is contained in:
1 parent
743071cff3
commit
62d0883a7f
19 files changed
+1807
-163
No files matched your search
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# Build Bastion Raid: raid.ihx, Intel HEX for tools/send-hex.py.
|
||||
# The program runs at 8600h with its variables at D000h, inside BASIC's
|
||||
# program area (8482h-D6D5h) and clear of the RAID loader program at its start.
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
mkdir -p out
|
||||
python3 gen.py out/data.h
|
||||
sdasz80 -plosgff out/crt0.rel crt0.s
|
||||
sdcc -mz80 --opt-code-size --max-allocs-per-node 20000 --std-sdcc11 -Iout -c -o out/raid.rel raid.c
|
||||
sdcc -mz80 --no-std-crt0 --code-loc 0x8620 --data-loc 0xD000 -o out/raid.ihx out/crt0.rel out/raid.rel
|
||||
python3 - <<'EOF'
|
||||
import re
|
||||
m = open("out/raid.map").read()
|
||||
def sym(n):
|
||||
return int(re.search(r"([0-9A-F]{8})\s+" + n + r"\b", m).group(1), 16)
|
||||
code_end = sym("s__CODE") + sym("l__CODE")
|
||||
data_end = sym("s__DATA") + sym("l__DATA")
|
||||
init = sym("l__INITIALIZED") + sym("l__INITIALIZER")
|
||||
print("code 8600-%04X (%d bytes), variables D000-%04X" % (code_end - 1, code_end - 0x8600, data_end - 1))
|
||||
assert code_end <= 0xD000, "code runs into the variables"
|
||||
assert data_end <= 0xD6D6, "variables run past BASIC's program area"
|
||||
assert init == 0, "initialised variables are not supported"
|
||||
EOF
|
||||
cp out/raid.ihx raid.ihx
|
||||
Reference in new issue
Block a user