The GameDrive's file/dir functions were stubs returning -1, so software
that keeps its data on the SD card (JagOS 'Spot', streamed assets,
screenshots) could not run. Blob functions 9-16, 20-23 and 26 now work
against <save dir>/jaggd-sd (system dir fallback), per the new core
option virtualjaguar_jgd_sd (Read/write default, Read-only, Disabled).
- Call path: each of those blob slots is one backdoor write, $C000 |
function. The core services the call during that write: it reads the
68K's d0/d1/a0/a1 and leaves the result in d0 via m68k_set_reg. Safe
because the 68K's JERRY writes are synchronous and the stub's
move.w #imm,abs.l never touches d0; only a 68K writer triggers it.
Paths and buffers move through JaguarRead/WriteByte, bounds-checked.
- src/core/jaggd_fs.c: FatFs semantics, matching RetroHQ's published
gdbios.h (facts only, none of their files vendored): FA_* open
dispositions, write/create needs a writable card, short reads succeed,
FILINFO records big-endian (22/278 bytes). End of directory returns -1
with a zeroed record. Sandbox: .., drive letters, FAT-invalid chars
and symlinks refused; components matched case-insensitively.
- Savestate v17 (first bump of the v3.8.0 cycle): trailing "JGF1" chunk
with card-relative path, access and position per handle. Restore
reopens with the original access only (never create/truncate/append),
re-seeks a handle already open on the same file, closes deleted ones.
- Blob grows 208 -> 338 bytes (limit 510).
Tests: test_jgd's probe now drives the file API through the real blob
(size 7 and the read buffer are values only the host can produce;
sandbox escape returns -1); new host test test_jaggd_fs covers every
disposition, read-only cards, sandbox refusals, FILINFO layout,
directories, the handle limit and savestate restore.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
docs/jgd-interface-notes.md is the research pass over RetroHQ's
published JagGD sources (gdbios_bindings.s), JagStudio v1.11 and the
BigPEmu binary that the implementation in src/core/jaggd.c follows;
savestate-compat.md gains the v8 GameDrive chunk row and its pre-v8
degradation contract.
Co-Authored-By: Claude Opus 5 <[email protected]>