sigil-retropie 38bc419 wires P2 local controller input for NES, SNES, Genesis, and SMS — the four systems with two-player support. EL0 apps now read P2 via sys3(44, 1, 0, 0) (syscall 44, port=1) and route to core_set_input_port(1, btn2). Genesis and SMS cores gained full P2 hardware register implementations; NES and SNES already had core_set_input_port internally and only needed the EL0 wiring update.
Core changes
cores/genesis.sg — P1+P2 I/O stub fix
Before
38bc419, gn_read8 returned 0 for all pad reads — 0 in Genesis I/O means all buttons pressed, so P1 was stuck in an always-all-buttons state. This commit adds core_set_input_port(port, buttons) for port 0 (P1) and port 1 (P2). gn_pad_lo(port) converts the 6-bit active-high bitmask (B/C/A/Right/Left/Down/Up) to Genesis active-low byte format (bit inverted per button). gn_read8 at $A10002 now returns gn_pad_lo(0) for P1; $A10004 returns gn_pad_lo(1) for P2. Per Genesis hardware ABI: 6-button mapping, active-low.cores/sms.sg — P2 port wiring
SMS uses a shared I/O space.
$DC carries U/D for both P1 and P2 (P1 in bits 0-1, P2 in bits 6-7). $DD carries L/R/TL/TR for P1 (bits 0-3) and P2 (bits 4-7). Previously only P1 was wired. core_set_input_port(0, btn) routes P1 to $DC bits 0-1 + $DD bits 0-3; core_set_input_port(1, btn2) routes P2 to $DC bits 6-7 + $DD bits 4-7. Full hardware ABI compliance per SMS I/O map.EL0 wiring
sys3(44, 1, 0, 0) — P2 input read
Syscall 44 is
cap_read_input(port, reserved, reserved). Port 0 = P1 (already wired in all apps), port 1 = P2. All four EL0 apps updated: el0/{nes,snes,genesis,sms}_app.sg now call sys3(44, 1, 0, 0) to read P2 state each frame, then core_set_input_port(1, btn2). Xbox One BT mapping (buttons → standard bitmask) is handled OS-side in the controller driver — EL0 sees a normalized bitmask regardless of physical controller type.NES/SNES note
NES and SNES cores already implemented
core_set_input_port internally (for SRDX Mode-2 netplay P2 injection). 38bc419 only adds the EL0 syscall read + the core_set_input_port(1, btn2) call — no core changes needed. The NES app also updated its P1 path from the old core_set_input shim to core_set_input_port(0, btn) for consistency.PARITY.md update
38bc419 adds a launcher feature-complete summary to docs/PARITY.md: lists EV_SELECT launch wiring (cd41f53), Smart Folder navigation (5a4a286), and 2P local input (38bc419) as the three components that complete the RetroPie launcher feature set for 0.7.0.