← Blog
RETROPIE · FS · 0.6.0

RetroPie #51–52: Sega CD + Atari Jaguar + NTFS Nested Rename and Rmdir

June 22, 2026 · sigil-retropie / sigil-fs · Sigil-Docs
retropie gaming fs ntfs 0.6.0

Two more RetroPie landings push the fleet to 52 LAUNCHABLE: Sega CD (#51, Genesis first-def-wins base with sub-68000 CD substrate and RF5C164 PCM stereo), and Atari Jaguar (#52, 68000 + dual Tom/Jerry DSPs, 320×240 direct-color framebuffer). sigil-fs completes the NTFS VFS write path with nested-directory rename (ntfs_rename_in) and rmdir (ntfs_rmdir_in + ntfs_has_mft_children). All 360 tests PASS. (sigil-retropie 8f6219c, f0f8d7c; sigil-fs 738c2be, 570ad7c)

RetroPie fleet overview — 52 LAUNCHABLE systems after Sega CD and Atari Jaguar ship
RetroPie fleet overview — 52 LAUNCHABLE systems after Sega CD and Atari Jaguar ship

Sega CD — system #51 (8f6219c)

cores/segacd.sg is layered over cores/genesis.sg using the first-def-wins architecture (same pattern as Sega Pico, #49). The base Genesis core — 68000 CPU, VDP, YM2612 FM, SN76489 PSG — runs unchanged. Sega CD adds three layers on top:

Sub-CPU
Second 68000 stub. Handles CD-ROM command dispatch — isolated from the main CPU, communicating via shared RAM and a gate array register interface.
CD substrate
Sector-read model with subchannel Q fields: track, index, min, sec, frame. CD-DA audio routing from disc to the stereo output bus.
RF5C164 PCM stereo mixer
8-channel, 16-bit PCM. Per-channel volume and pan. Stereo output buffer. The Sega CD's audio chip for CD-quality sound — distinct from the Genesis YM2612 FM synth.

EL0 app apps/segacd loads /roms/game.iso (ISO image cap). Test result: uart=51 PASS.


Atari Jaguar — system #52 (f0f8d7c)

The Jaguar is the only 64-bit console in the fleet. Its architecture is unique: a 68000 handles OS and game logic while two custom DSPs — Tom and Jerry — do the heavy lifting in parallel.

CPU (68000)
Same m68000.sg stub used across the Atari/Sega fleet, bound here with a Jaguar-specific core_id. Handles game main loop and OS calls.
Tom DSP
Graphics co-processor. Models the blitter and object processor. Drives the 320×240 framebuffer fill path.
Jerry DSP
Audio and general-purpose DSP co-processor. Models wavetable synthesis, timer, and I2S output.
Framebuffer
320×240 direct-color in CRY or RGB565 mode — the Jaguar's "true color" output path.

EL0 app apps/jaguar loads /roms/game.jag. Test result: uart=52 PASS.


The fleet at 52

The fleet now covers every major home console generation from the Atari 2600 through the Jaguar — the last 5th-generation holdout before N64/PS1. The first-def-wins architecture has proven its value at scale: Sega Pico (#49) and Sega CD (#51) each required ten lines of override or fewer on top of genesis.sg. The common 68000 stub similarly serves the Genesis, Sega CD, Jaguar, and Atari ST family without duplication.

SystemNumberArchitectureCommit
Sega CD#51genesis.sg + sub-68000 + RF5C164 + CD substrate8f6219c
Atari Jaguar#5268000 + Tom DSP + Jerry DSP + 320×240 framebufferf0f8d7c

NTFS nested rename (738c2be — sigil-fs)

ntfs_rename_in(parent_rec, old_name, old_namelen, new_name, new_namelen) renames a file inside a specific subdirectory without requiring index traversal.

The function finds the target file via MFT scan + ParentRef check. This is necessary because ntfs_create_in does not update the parent's $INDEX_ROOT, making directory traversal via the B-tree index unreliable for files created through the VFS write path. Once found, it updates $FILE_NAME.FileName in the MFT record in place.

VFS wire: vfs_parent_sub now returns nested=1 → resolves the parent path → dispatches to ntfs_rename_in(parent_rec, ...). The prior dispatch was root-only; nested renames silently fell through.

Test: ntfs_renamein_test (RNO, PASS). Added to MANIFEST. 359/359 PASS at this commit.


NTFS nested rmdir (570ad7c — sigil-fs)

Completing the NTFS nested write path, ntfs_rmdir_in(parent_rec, name, namelen) removes an empty subdirectory inside a specific parent. Two new functions support it:

ntfs_has_mft_children
Scans MFT records 12..31 for any InUse record whose $FILE_NAME.ParentRef matches dir_rec. Catches children created via ntfs_mkdir_in/ntfs_create_in, which set ParentRef but do not update the parent's $INDEX_ROOT.
ntfs_rmdir_in
ntfs_find + ParentRef check + dual emptiness gate: both ntfs_readdir (for $INDEX_ROOT entries) AND ntfs_has_mft_children (for MFT children). Returns -1 not-found/not-dir, -2 not-empty, 0 ok.

The dual emptiness gate is required because the two child-tracking mechanisms are independent: a directory can appear empty to ntfs_readdir (no $INDEX_ROOT entries) while still having MFT children with matching ParentRef. Either gate alone would produce false-empty results.

VFS wire: rmdir dispatch was root-only; now dispatches to ntfs_rmdir_in for nested paths.

Test: ntfs_rmdir_in_test (RINEFGHJ, PASS). 360 tests — ALL PASS. The FS harness ceiling rises again.