Put the ring on the 68000, and find the disc stops whenever the player is not asking
ROADMAP P5. The loader moved in session 21 and the frame clock in 22; the ring producer was the last policy living outside the machine. src/player/ring.i does `aligned` placement, the descriptor ring, a prefill, 51.2's slack rule and a seek, and the host keeps only the transport. It needed a container change. `aligned` asks whether the next record fits before the end of the ring -- a length asked BEFORE the record is fetched -- and every reader in this tree answered that by walking the frame stream, which is exactly what a player streaming off a disc cannot do. DLX4 carries nframes u16 record lengths in the scene header. Frame payloads are byte-identical to the DLX3 encode, so no fitted constant moves; the scene header goes 5,920 to 6,164 B. The producer reproduces the host's tiling exactly: 18 wraps, 14.7 KB mean hole, pixel-exact, a third independent implementation of the same policy. What it exposed is bigger than the item. A channel only moves bytes while it has a request and only the CPU can issue one, so the disc stands still between records by an amount the PLAYER sets, not the medium -- and no host-filled run could see it. At 488 KB/s in a 256 KB ring a one-deep request queue gives away 6.8% of the pipe and underruns 59 of 120 frames; two-deep gives away 3.4% and underruns none. The container's whole surplus over the wire is 8.7%, so the player's own loop was spending most of the slack a branch point saves up. Prefill is the weaker lever: six records of it still leaves 24 underruns. Three silent bugs are recorded in FINDINGS 55.7 -- all produced wrong pixels or a desync rather than a fault -- plus a rig one: MAME renders a screen line by line, so snapshotting the frame the decoder finished in captures a tear that reads exactly like a decoder bug. check.sh gains the machine-owned ring and a seek with the decode after it. decode.bin is unchanged at 1,296 B and a host-filled run executes none of the new code, so every FINDINGS 49/51 figure stands. ALL GREEN before and after. Claude-Session: https://claude.ai/code/session_01194oWYW8DQXK1SZ2DnChW6
This commit is contained in:
@@ -338,4 +338,72 @@ grep -q "^OK" tmp/selfpace_check.log || {
|
||||
echo " frames start; if it changed WHAT they draw, the interrupt is"
|
||||
echo " corrupting decoder state."; tail -4 tmp/selfpace_check.log; exit 1; }
|
||||
|
||||
echo "--- session 23: the 68000 fills its own ring (FINDINGS 55) ---"
|
||||
# ROADMAP P5. Until now the RING was filled by tools/bench/stream.lua: the host
|
||||
# held the record index, chose where each record went, wrote the descriptor and
|
||||
# advertised it. A player has no host. src/player/ring.i does all of that on the
|
||||
# 68000, out of the DLX4 record index in the scene header, and this script keeps
|
||||
# only the part that is not the CPU's -- a transport that answers one request at
|
||||
# a time at a modelled rate.
|
||||
#
|
||||
# WHAT IS GATED:
|
||||
# * pixel-exact, which is the only test that can see a wrong placement: the
|
||||
# block loop reads with a monotonically increasing a0 and no bounds check,
|
||||
# so a record placed over one the decoder has not finished corrupts pixels
|
||||
# rather than faulting (49.2);
|
||||
# * the host AUDITS every placement against its own index and its own list of
|
||||
# live records, and refuses the run on the first disagreement;
|
||||
# * the wrap policy still produces the SAME 18 wraps and 14.7 KB mean hole the
|
||||
# host producer produced in FINDINGS 49.4 -- a third independent
|
||||
# implementation of `aligned` landing on the same tiling;
|
||||
# * zero underruns at a two-deep request queue, which is the finding: a
|
||||
# one-deep queue leaves the channel idle between records and underran 59 of
|
||||
# 120 frames on this same container and rate.
|
||||
DLX_PACE=2 DLX_RINGOWN=1 DLX_QDEPTH=2 bash tools/bench/pace_run.sh 256 488 \
|
||||
> tmp/ringown_check.log 2>&1 || {
|
||||
echo "FAIL: the machine-owned ring pass did not complete."
|
||||
tail -10 tmp/ringown_check.log; exit 1; }
|
||||
grep -aE "MACHINE-OWNED|PREFILL:|CHANNEL IDLE|UNDERRUNS|SEEK SLACK" tmp/ringown_check.log \
|
||||
| sed "s/\[STR\] / /"
|
||||
grep -q "MISPLACED" tmp/ringown_check.log && {
|
||||
echo "FAIL: the 68000 placed a record over one the decoder still owned."
|
||||
exit 1; }
|
||||
grep -q "UNDERRUNS: 0/120" tmp/ringown_check.log || {
|
||||
echo "FAIL: the machine-owned ring underran at a two-deep queue. That is the"
|
||||
echo " configuration FINDINGS 55 says keeps the channel busy; if it no"
|
||||
echo " longer does, the poll site in src/player/stream.s moved."
|
||||
exit 1; }
|
||||
grep -q "ring: 18 wraps" tmp/ringown_check.log || {
|
||||
echo "FAIL: the machine's own \`aligned\` no longer tiles this container the"
|
||||
echo " way FINDINGS 49.4's host producer did (18 wraps). The policy is"
|
||||
echo " meant to be the SAME policy in a different place."
|
||||
exit 1; }
|
||||
grep -q "^OK" tmp/ringown_check.log || {
|
||||
echo "FAIL: the machine-owned ring pass was not pixel-exact -- a record was"
|
||||
echo " placed or described wrongly."; tail -4 tmp/ringown_check.log
|
||||
exit 1; }
|
||||
|
||||
echo "--- session 23: a seek, and the decode after it (FINDINGS 55) ---"
|
||||
# The branch point rehearsed. A second pass over the scene begins with a real
|
||||
# seek in src/player/ring.i: the channel is waited quiet, the ring is declared
|
||||
# empty, the disc address of record 0 comes out of the index rather than from a
|
||||
# walk, and the whole lookahead 51.3 says takes seconds of play to accumulate is
|
||||
# thrown away and rebuilt from the prefill. What is gated afterwards is the one
|
||||
# thing that can see a wrong seek: the last frame of the SECOND pass has to be
|
||||
# pixel-exact, and a SKIP block is a claim about the previous frame, so it is
|
||||
# only right if every frame after the seek was.
|
||||
DLX_PACE=2 DLX_RINGOWN=1 DLX_QDEPTH=2 DLX_ITER=2 \
|
||||
bash tools/bench/pace_run.sh 256 488 > tmp/ringseek_check.log 2>&1 || {
|
||||
echo "FAIL: the seek pass did not complete."; tail -10 tmp/ringseek_check.log
|
||||
exit 1; }
|
||||
grep -aE "SEEK PASS|CHANNEL IDLE|UNDERRUNS" tmp/ringseek_check.log | sed "s/\[STR\] / /"
|
||||
grep -q "SEEK PASS 2" tmp/ringseek_check.log || {
|
||||
echo "FAIL: no second pass -- the seek never happened, so this gated nothing."
|
||||
exit 1; }
|
||||
grep -q "UNDERRUNS: 0/120" tmp/ringseek_check.log || {
|
||||
echo "FAIL: the pass after the seek underran."; exit 1; }
|
||||
grep -q "^OK" tmp/ringseek_check.log || {
|
||||
echo "FAIL: the decode after the seek was not pixel-exact."
|
||||
tail -4 tmp/ringseek_check.log; exit 1; }
|
||||
|
||||
echo "ALL GREEN"
|
||||
|
||||
Reference in New Issue
Block a user