mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 02:56:36 -04:00
5c64071155
The .cue parser only extracted the FILE line and the CD model hardcoded a single data track: GetTN always returned 01..01 and GetTD returned LBA 0 for any track. Multi-track discs with a CD-DA audio track (Tomba 2: TRACK 02 AUDIO @ 38:48:74) therefore reported a bogus TOC. - iso_reader: parse TRACK/INDEX lines into a CDTrack table; synthesize a single data track for bare .bin/.iso. New TrackCount/TrackStartLBA/TrackIsAudio + iso_track_* C wrappers. - cdrom.c GetTN returns first=1/last=track_count (BCD); GetTD returns each track's real start MSF (lead-out via 0xAA/track 0 unchanged). Framework fix for every CD-DA title. NOTE: does not by itself unblock Tomba 2's boot — that still stalls in a GetStat/GetID/Init disc-init loop (display toggles, reading=0) which does NOT call GetTN/GetTD; next is an oracle CD command/response diff at that loop (and the hardcoded GetID region "SCEI" vs USA "SCEA" is a candidate). cdrom_trace_dump floods with DMA 'D' events — fix that (Rule 15) before the diff. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>