https://gitlab.synchro.net/main/sbbs/-/commit/da866ee25b900b7b41615540
Added Files:
src/doors/syncretro/test_axis.c
Modified Files:
src/doors/syncretro/CMakeLists.txt syncretro_binds.c syncretro_binds.h syncretro_input.c test_binds.c
Log Message:
syncretro: reach a twin-stick cabinet's second stick from the keyboard
MAME 2003-Plus binds a cabinet's second stick -- Battlezone's right tread, Robotron's aim -- to the RetroPad's RIGHT analog stick and nowhere else. Not a button, not the d-pad, and no core option moves it: mame_remapping, input_interface and digital_joy_centering were each measured against it and changed nothing. The arcade profile had no key that produced an analog value, so half of Battlezone's control panel was unreachable -- the tank pivoted on its one live tread and could never drive straight or reverse.
Add SR_ACT_AXIS: a bind row whose id is a state slot ABOVE the last RetroPad button id, so it rides the pad's existing press / release / auto-release-dwell machinery rather than duplicating it, and sr_pad_get() answers it only as an analog deflection. I and K deflect the right stick, on the arcade profile alone.
Deliberately NOT by turning sr_profile_analog() on for the arcade: that flag means "this console's stick IS the Intellivision disc and keypad", and setting it here would hand the right stick to sr_keypad_analog() and let a disc sweep suppress the d-pad.
Three guards keep the blast radius contained. A negative-array-size typedef fails the BUILD if an axis slot ever collides with a button id -- a collision no test can catch, because the compiler has already resolved it. test_axis drives the REAL input path end to end (bytes in through sr_input_pump(), value out through sr_pad_get(), only the platform read seam stubbed) and asserts
that a gamepad profile still reads a centred stick from I and K, so the two cartridge consoles sharing this binary are unaffected. The audio_bytes golden-byte capture still passes.
Measured with probe_core against the real romset: W alone swings the heading 115px, the old one-tread pivot; W and I together rotate not at all while the scene still moves -- straight ahead, which the door could not do before.
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net