Crash Bandicoot: boots, plays and reaches level 3 - #2
Merged
Merged
Conversation
…ride is unrecoverable
…ecompressor corrections
…ROM hand-off was serialised
…dd env-gated tracing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Crash Bandicoot now boots, plays and reaches level 3. This branch collects the
recompiler, runtime and tooling work that got it there, plus the fixes found by
playing it.
What changed
Recompiler. Computed in-function jumps now resolve against local labels,
including the 8-byte stride form and the case where the stride is unrecoverable
from the code near the jump. A function whose
$rais hijacked resumes insideitself instead of unwinding past its own epilogue. Every indirect jump and call
carries its originating guest address, and an unresolved dispatch prints that
address plus a host stack: the guest
$rais stale on direct-JAL paths and hadsent more than one investigation to the wrong function.
Analyzer. A PsyQ hash match is only marked HLE when the runtime actually
registers a body for it, so detection stays broad while substitution stays
narrow. Linear sweep with validation recovers functions the prologue scan
misses, and computed jump-array slots are treated as entry points.
Runtime. Three defects that each blocked play:
read its sector buffer, so a sector could be spliced from two reads. That fed
the LZ decompressor a corrupt page, its terminating count was never reached,
and it wrote bytes until it had wrapped 2 MB of guest RAM. Measured: 10
crashes in 38 runs before, 0 in 16 after serialising the hand-off. The
decompressor drain suppression that had been papering over this is gone.
to the compositor. Play sessions measured between 32 and 54 presented frames
per second, so the clock Crash reads for velocity lost up to a third of its
rate and the game moved in slow motion. It now runs off the wall clock:
measured 58.5 hardware ticks per second across runs presenting between 21.8
and 56.5 frames per second.
every projected vertex collapsed onto the origin. Measured: 99.6% of ~800k
triangles degenerate.
Sound effects work: the SPU transfer address register now reads back, which is
what the driver polls before programming DMA, and the DMA writes through that
address instead of restarting every upload at sound RAM zero.
Memory card. Implemented against the psx-spx protocol: read, write and get
ID, with the acknowledge bytes, the confirmed address echo, checksum rejection
and the directory-unread flag. A fresh card is formatted as a real one is.
Cards live in
memcards/and a written sector is flushed immediately, becauseshutdown skips destructors.
Diagnostics. A write guard that reports every distinct writer to a span of
guest RAM with the value written, a stall sampler that names the function the
game thread is stuck in, per-voice SPU counters and callback-registration
counters. All are off unless their environment variable is set.
Testing
707 tests pass. New coverage for the GTE divide, pad polarity, the memory card
protocol byte by byte, the SPU transfer address and key latch, the CD-ROM
sector hand-off, and the indirect-site reporting.
Play-tested to level 3, including the bonus round and the save point.
Known gaps
are never keyed on while effects on 16-19 work.
command at all, so the call never reaches the card.