ec82764bef
RTL (GS rasterizer, EE core stub, platform bridge, LPDDR4B path), sim regression (272 TBs), docs, and tooling. Copyrighted PS2 content (BIOS, game code, GS dumps, and all dump-derived textures/traces) is excluded via .gitignore and stays local. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
66 lines
5.8 KiB
Bash
Executable File
66 lines
5.8 KiB
Bash
Executable File
#!/bin/sh
|
|
# retroDE_ps2 — Ch331 FEEDER EXPRESSIVENESS silicon proof (variable-size multi-tile scenes).
|
|
#
|
|
# Ch330 proved runtime command ingestion exists (a fixed 4-prim list, repositionable). This proves
|
|
# it SCALES: variable-size HPS-staged scenes rendered in ONE pass via the end-of-list flush, with
|
|
# no rebuild/reset. Streams three scenes of DIFFERENT sizes across the 4x4 tile grid:
|
|
# C1 : 3 prims in tiles {0,5,10} (< the old fixed threshold of 4)
|
|
# C2 : 6 prims in tiles {0,3,5,9,12,15} (> 4 — one pass, NOT split across clears)
|
|
# C3 : 8 prims in tiles {0,1,2,3,12,13,14,15} (== FIFO_DEPTH, the current max scene size)
|
|
# Ends on C3 (top + bottom rows lit) — visibly distinct from the power-up scene.
|
|
#
|
|
# REQUIRES the Ch331 feeder bitstream: ./scripts/select_de25_profile.sh feeder (then re-fit).
|
|
# Register map identical to ps2_feeder_test.sh (BASE 0x40000000):
|
|
# 0x0D8 R ready / W staging addr ; 0x0DC W lo ; 0x0E4 W hi(commit+inc)/R records ; 0x0E8 W go/R waits
|
|
|
|
set -u
|
|
BASE="${PS2_BRIDGE_BASE:-0x40000000}"
|
|
DEVMEM="${DEVMEM:-busybox devmem}"
|
|
OFF_STATUS=0x0D8; OFF_LO=0x0DC; OFF_HI=0x0E4; OFF_GO=0x0E8
|
|
|
|
w() { $DEVMEM $(printf "0x%X" $(( BASE + $1 ))) w "$2" >/dev/null; }
|
|
r() { $DEVMEM $(printf "0x%X" $(( BASE + $1 ))) w; }
|
|
|
|
SCENE_C1="0000000000000003 0000000000010000 0000000000000044 0000000000050000 0000000000000002 0000000888004040 0000000000000053 00000000ff000000 0000000000000000 0000500000100010 00000000ff000000 0000000000000030 00005000001000e0 00000000ff000000 00000000000c0000 0000500000e00010 00000000ff000000 0000000000000000 0000510001100110 00000000ff000000 0000000000000030 00005100011001e0 00000000ff000000 00000000000c0000 0000510001e00110 00000000ff000000 0000000000000000 0000520002100210 00000000ff000000 0000000000000030 00005200021002e0 00000000ff000000 00000000000c0000 0000520002e00210"
|
|
SCENE_C2="0000000000000006 0000000000010000 0000000000000044 0000000000050000 0000000000000002 0000000888004040 0000000000000053 00000000ff000000 0000000000000000 0000500000100010 00000000ff000000 0000000000000030 00005000001000e0 00000000ff000000 00000000000c0000 0000500000e00010 00000000ff000000 0000000000000000 0000510000100310 00000000ff000000 0000000000000030 00005100001003e0 00000000ff000000 00000000000c0000 0000510000e00310 00000000ff000000 0000000000000000 0000520001100110 00000000ff000000 0000000000000030 00005200011001e0 00000000ff000000 00000000000c0000 0000520001e00110 00000000ff000000 0000000000000000 0000530002100110 00000000ff000000 0000000000000030 00005300021001e0 00000000ff000000 00000000000c0000 0000530002e00110 00000000ff000000 0000000000000000 0000540003100010 00000000ff000000 0000000000000030 00005400031000e0 00000000ff000000 00000000000c0000 0000540003e00010 00000000ff000000 0000000000000000 0000550003100310 00000000ff000000 0000000000000030 00005500031003e0 00000000ff000000 00000000000c0000 0000550003e00310"
|
|
SCENE_C3="0000000000000008 0000000000010000 0000000000000044 0000000000050000 0000000000000002 0000000888004040 0000000000000053 00000000ff000000 0000000000000000 0000500000100010 00000000ff000000 0000000000000030 00005000001000e0 00000000ff000000 00000000000c0000 0000500000e00010 00000000ff000000 0000000000000000 0000510000100110 00000000ff000000 0000000000000030 00005100001001e0 00000000ff000000 00000000000c0000 0000510000e00110 00000000ff000000 0000000000000000 0000520000100210 00000000ff000000 0000000000000030 00005200001002e0 00000000ff000000 00000000000c0000 0000520000e00210 00000000ff000000 0000000000000000 0000530000100310 00000000ff000000 0000000000000030 00005300001003e0 00000000ff000000 00000000000c0000 0000530000e00310 00000000ff000000 0000000000000000 0000540003100010 00000000ff000000 0000000000000030 00005400031000e0 00000000ff000000 00000000000c0000 0000540003e00010 00000000ff000000 0000000000000000 0000550003100110 00000000ff000000 0000000000000030 00005500031001e0 00000000ff000000 00000000000c0000 0000550003e00110 00000000ff000000 0000000000000000 0000560003100210 00000000ff000000 0000000000000030 00005600031002e0 00000000ff000000 00000000000c0000 0000560003e00210 00000000ff000000 0000000000000000 0000570003100310 00000000ff000000 0000000000000030 00005700031003e0 00000000ff000000 00000000000c0000 0000570003e00310"
|
|
|
|
wait_ready() {
|
|
i=0
|
|
while [ $i -lt 300 ]; do
|
|
st=$(r $OFF_STATUS); [ $(( st & 1 )) -eq 1 ] && return 0
|
|
i=$(( i + 1 )); sleep 0.01 2>/dev/null || true
|
|
done
|
|
echo " !! feeder never reported ready (0x0D8 bit0) — is this the feeder bitstream?"; return 1
|
|
}
|
|
|
|
stage_and_go() { # $1 label $2 words $3 expected-records
|
|
label="$1"; words="$2"; exp="$3"
|
|
echo "[$label] waiting for feeder ready ..."
|
|
wait_ready || return 1
|
|
echo "[$label] streaming the list, then GO ..."
|
|
w $OFF_STATUS 0x0
|
|
n=0
|
|
for word in $words; do
|
|
lo=$(printf '%s' "$word" | cut -c9-16); hi=$(printf '%s' "$word" | cut -c1-8)
|
|
w $OFF_LO 0x$lo; w $OFF_HI 0x$hi; n=$(( n + 1 ))
|
|
done
|
|
badr=$(r $OFF_LO)
|
|
echo "[$label] wrote $n words; bridge staging addr now=$(( badr )) (expect $n)"
|
|
wait_ready || return 1
|
|
w $OFF_GO 0x1
|
|
wait_ready || return 1
|
|
rec=$(r $OFF_HI); wts=$(r $OFF_GO)
|
|
echo "[$label] records=$(( rec )) (expect $exp) fifo_wait_cycles=$(( wts ))"
|
|
[ $(( rec )) -eq $exp ] || { echo " !! records != $exp — scene not fully emitted"; return 1; }
|
|
echo "[$label] OK — look at HDMI."
|
|
sleep 2 2>/dev/null || true
|
|
}
|
|
|
|
echo "=== Ch331 feeder expressiveness — variable multi-tile scenes C1(3) -> C2(6) -> C3(8) ==="
|
|
stage_and_go "C1 (3 prims: tiles 0/5/10 diagonal)" "$SCENE_C1" 3 || exit 1
|
|
stage_and_go "C2 (6 prims: tiles 0/3/5/9/12/15)" "$SCENE_C2" 6 || exit 1
|
|
stage_and_go "C3 (8 prims: top+bottom rows 0-3/12-15)" "$SCENE_C3" 8 || exit 1
|
|
echo "=== done — ENDS ON C3: triangles in the top row AND bottom row should be lit."
|
|
echo " Variable-size scenes (3, 6, 8 prims) each rendered in one pass, no rebuild/reset. ==="
|