You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added SNES mouse support. PS/2 and USB mice both work as a SNES mouse on controller port 2. Enables Cannon Fodder, Mario Paint, Lemmings, and other mouse titles.
Replaced the PS/2 keyboard driver with a unified PS/2 driver that handles keyboard and mouse on separate PIO instances. Keyboard moved to PIO2; mouse lives on PIO1 next to audio, matching the proven frank-wolf layout.
Fixed the snes9x 0x4017 serial read path. The original port truncated to 16 bits; mice need the full 32-bit packet, so dx/dy bytes now reach the game instead of being read as 1s.
Added a SNES MOUSE toggle on the main Settings page, directly under Button Mapping. Default is on. Saved to /snes/settings.ini.
USB mouse fixes ported from frank-wolf: accept short HID reports via a zero-padded copy, detect mouse via HID_USAGE_DESKTOP_MOUSE in the descriptor for protocol=NONE devices, route generic reports through the descriptor dispatcher so generic-HID mice are not swallowed by the gamepad path.
Axes normalized for the on-board mouse orientation. Raw dy maps to screen -x; raw dx maps to screen +y. Same transform applied to USB and PS/2 so both feel identical.
Free-running mouse accumulator. The pointer no longer clamps at [0..255, 0..223], so motion after reaching a screen edge still registers (fixes "can't move left after hitting the left edge").
SuperFX / DOOM fixes
Fixed the cold-boot regression from 1.05 where DOOM (and other SuperFX games needing a 6 MB ROM buffer) rendered a single garbage scanline on first launch and only worked after a selector round-trip. Root cause: the 57 KB sub-screen transparency buffer was allocated inside the permanent PSRAM arena after psram_mark_session, which pushed S9xInitGFX's 22 KB LocalState allocation past the ceiling and silently returned NULL. GFX.OBJLines then stayed NULL and the PPU dereferenced it from frame one. The buffer is now parked at a fixed offset inside the 512 KB scratch region, which is outside the session lifecycle, so it survives across ROM launches and never competes with ROM data. S9xInitGFX's return value is now checked and fatal-logged.
Fixed SuperFX rendering for DOOM and other non-Star-Fox SuperFX titles. Three bugs were conspiring: VRAM/RAM/SRAM/FillRAM were malloc'd instead of calloc'd, so DOOM's tilemap referenced never-DMA'd tile indexes and rendered PSRAM garbage as a red/blue houndstooth over the viewport. FxEmulate was hard-capped to 350/700 cycles per HBlank (a Star Fox-specific hack); DOOM needs the GSU to run to STOP within the frame, so this is now FxEmulate(~0) matching snes9x2005. NO_WINDOW_CLIPPING skipped ComputeClipWindows entirely, which SuperFX games rely on to mask the 3D viewport borders — the optimization is now conditional on !Settings.SuperFX. GSU opcode handlers also moved to .time_critical SRAM.
Performance
Moved the hot emulation code out of XIP-cached flash into .time_critical SRAM sections. XIP cache misses during opcode dispatch were the dominant overhead. Tagged: all 478 65816 opcode handlers and the five 256-entry dispatch tables in cpuops.c, the SPC700 APUExecute switch (called every HBlank), S9xGet/SetPPU and S9xGet/SetCPU (hit on every $21xx/$42xx/$43xx access), S9xDoDMA, S9xSetAPUDSP, S9xMixSamplesMono, S9xUpdateScreen, and S9xDoHBlankProcessing.
Moved the 96 KB SPC700 echo buffer from static .bss to PSRAM via snes_malloc, freeing SRAM for the hot sections above. Echo is read/written at most once per sample and only when enabled, so PSRAM latency is not measurable.
Dev-build USB CDC wait: block until the host terminal opens the port, then pause 3 seconds before the first LOG(...). Full boot log now lands in the console.
build.sh accepts USB_HID_ENABLED as an environment override (USB_HID_ENABLED=ON ./build.sh M2).
Downloads
frank-snes_m1_1_07.uf2 — M1 board variant
frank-snes_m2_1_07.uf2 — M2 board variant
metadata.zip — SD-card metadata bundle (drop into / of your SD card)