Repository navigation
v0.0.159
rePIU v0.0.159
이전 릴리스 v0.0.156 이후의 변경입니다. 이번 릴리스는 호스트 키보드를 게임에 전달하는
경로를 정리합니다. 게임 창의 키 입력이 BIOS INT 16h로 전달되고, PIUIO 발판과 캐비닛 버튼의
키 매핑을 롬셋별 설정 파일에서 바꿀 수 있으며, EEPROM이 롬셋마다 분리 저장됩니다.
창 키보드 BIOS 입력
- 게임 창의 SDL key down/up event를 원본 게임이 프레임마다 조회하는
INT 16hBIOS 경로에
연결했습니다. 기존 JAMMA 입력 경로는 그대로 병행 동작합니다. - 플랫폼 공용
hle::BiosKeyboard가 실기 BIOS data area와 같은 15-entry FIFO, legacy/enhanced
AX 쌍, shift/lock 상태를 소유합니다. SDL host thread가 producer이고 guest thread가
consumer이므로 짧은 mutex 임계 구역으로 보호합니다. - Win32 SDL adapter가 US 101-key scan code, ASCII, Shift/Caps/Ctrl/Alt 조합,
function/navigation/numeric keypad를 변환합니다. key repeat는 DOS typematic keystroke로
enqueue하고, 포커스를 잃으면 눌린 modifier를 해제하되 lock toggle은 유지합니다. AH=00h/10h가 FIFO head를 소비하고AH=01h/11h는 소비 없이 ZF로 유무를 알리며,
AH=02h/12h가 실제 shift flags를 반환합니다.
롬셋별 설정 파일
cfg/<롬셋 ID>.ini의[Input]섹션에서 PIUIO 발판과 캐비닛 버튼의 호스트 키를 롬셋마다
바꿀 수 있습니다. 키 이름은 실제 발판 위치를 따릅니다:P1_UP_LEFT,P1_DOWN_RIGHT,
TEST,SERVICE,CLEAR,COIN1등 14개.- 설정 파일이 없으면 첫 실행에 만들어집니다. 모든 항목이 주석 처리된 템플릿이고 주석의
값은 현재 적용 중인 설정이므로, 바꾸려는 줄의;만 지우면 됩니다. 기존 파일은 절대
덮어쓰지 않습니다. - 쉼표로 여러 키를 걸 수 있고(
P2_UP_LEFT = Keypad7, Home),Ctrl+F1같은 조합키를
지원합니다. 수식키를 붙인 설정은 정확히 일치해야 하고, 수식키가 없는 설정은 같은 키를 두고
겹치지 않는 한 수식키를 따지지 않습니다. NumLock/CapsLock/ScrollLock은 어떤 설정에도 영향을
주지 않습니다. - 값을 비우면 그 입력이 꺼집니다.
TEST =로 적으면 어떤 키로도 TEST가 동작하지 않습니다. - 롬셋 파일은 부모 롬셋 파일 위에 키 단위로 얹힙니다. 공용 설정은
cfg/pumpitup.ini에
두면 모든 타이틀에 적용됩니다. - 설정 파일 오타는 경고만 남기고 실행을 막지 않습니다. 로더 로그가 파일 이름과 줄 번호를
알려줍니다. - 사용법은 docs/guides/romset-config-files.md에 있습니다.
입력 매핑 구조 정리
- 같은 키 매핑이 세 곳에 서로 다른 표현으로 중복되어 있던 것을 바인딩 표 하나로 합쳤습니다.
ScanJammaPort8와CaptureCurrentJammaPressedMask는 Win32 가상키로, SDL event 경로는 SDL
keycode로 각자 정의하고 있어 한 곳만 고치면 조용히 어긋나는 구조였습니다. - 정식 키 타입은
SDL_Keycode, 수식키 마스크는SDL_Keymod입니다. SDL event 경로는 변환 없이
직접 비교하고, 폴링 경로만 가상키 변환 하나를 씁니다. - 포트·비트·논리 입력·로그 이름을 한 표로 합쳤습니다. 로그가 비트
0x02를P1-UpRight로
부르면서 코드 열거는kP1Down이던 불일치를 정정했고, 열거 순서는 타임라인 비트 위치이므로
바꾸지 않았습니다. - 기본 설정에서 호스트 키 조회 횟수는 이전과 동일합니다. 조합키를 쓰지 않으면 수식키를 아예
읽지 않으므로, Task 403이 측정한 포트 I/O 비용이 그대로 유지됩니다.
롬셋별 NVRAM
- 93C46 EEPROM 이미지를 MAME처럼
nvram/<롬셋 ID>/eeprom.dat에 저장합니다. 이전에는 22개
롬셋이 작업 디렉터리의eeprom.dat하나를 공유해, 한 타이틀에서 저장한 캐비닛 설정이 다른
타이틀에도 그대로 보였습니다. - 기존
eeprom.dat가 있으면 롬셋 디렉터리로 한 번 복사해 승계합니다. 지금까지 맞춰 둔 캐비닛
설정이 유지되며, 원본은 지우지 않습니다. REPIU_EEPROM_PATH전체 경로 오버라이드는 의미가 그대로입니다. 벤치마크 스크립트와 측정
가이드의 실행별 EEPROM 격리가 계속 동작합니다.cfg/와nvram/을.gitignore에 추가했습니다.
검증
- Win32 x86 Debug의
repiu_exe,repiu,repiu_aot_probe빌드가 성공했습니다. repiu_aot_probe --romset-config: checks=94 failures=0. INI 파싱, 별칭과 입력 끄기,
이름 표 건전성, 조합키 파싱과 거부 형태, 수식키 판정과 경쟁 규칙과 lock 비트 배제,
레이어링, 생성 파일 왕복과 미덮어쓰기를 덮습니다. 회귀 가드로 구현 이전의 하드코딩 매핑을
직접 전사해 가상키 단위로 대조합니다.repiu_aot_probe --nvram-path: checks=14 failures=0. 오버라이드 우선순위, 디렉터리 실제
생성, 롬셋 간 경로 분리, 기존 파일 승계와 내용 일치와 원본 보존을 덮습니다.repiu_aot_probe --bios-keyboard-input: 성공.
translated=true,fifo=true,modifiers=true,overflow=1.repiu_aot_probe build/runtime_mounts/pumpit1/PIU/PIU.EXE전체 단정이 exit 0으로
통과했습니다.- 사용자가 실제
pumpipx3실행에서 설정 파일 생성과 키 매핑 동작을 확인했습니다. - 기존 C4819 코드 페이지 경고만 남았습니다.
알려진 제한
COIN2와 캐비닛 입력 포트0x02AB는 지원하지 않습니다. 해당 I/O 포트 비트가 확정되지
않았습니다.- 조합키는 캐비닛 버튼용입니다. 발판 입력에 걸면 창 이벤트 경로에서 수식키 판정이 기본 키를
누른 순간으로 고정되므로 권장하지 않습니다. [Input]외의 섹션은 아직 없습니다. 인식하지 않는 섹션은 조용히 무시되므로, 나중 버전용
파일이 이전 빌드를 막지 않습니다.- 롬셋별 NVRAM의 런타임 확인(실행 후 파일 생성과 설정 승계)은 아직 사용자 환경에서 검증되지
않았습니다.
rePIU v0.0.159
Changes since v0.0.156. This release reworks how the host keyboard reaches the game:
window key input is delivered to the BIOS INT 16h path, PIUIO panel and cabinet button
mappings are configurable per ROM set, and the EEPROM is stored separately per ROM set.
Window keyboard BIOS input
- SDL key down/up events from the game window now reach the
INT 16hBIOS path the
original game polls every frame. The existing JAMMA input path keeps working alongside it. - The platform-neutral
hle::BiosKeyboardowns the same 15-entry FIFO a real BIOS data
area has, the legacy/enhanced AX pairs, and shift/lock state. The SDL host thread is the
producer and the guest thread the consumer, so a short mutex critical section guards it. - The Win32 SDL adapter translates US 101-key scan codes, ASCII, Shift/Caps/Ctrl/Alt
combinations, and the function, navigation, and numeric keypad groups. Key repeat is
enqueued as a DOS typematic keystroke, and losing focus releases held modifiers while
retaining lock toggles. AH=00h/10hconsume the FIFO head,AH=01h/11hpeek without consuming and report
presence through ZF, andAH=02h/12hreturn the real shift flags.
Per-ROM-set configuration files
- The
[Input]section ofcfg/<rom-set-id>.iniremaps the host keys for the PIUIO panels
and cabinet buttons per ROM set. Names follow the physical panel positions:
P1_UP_LEFT,P1_DOWN_RIGHT,TEST,SERVICE,CLEAR,COIN1, and the rest of the
fourteen. - A missing file is created on first run as a commented-out template whose comments
carry the values currently in effect, so changing a binding means deleting the leading
;on that line. An existing file is never overwritten. - Several keys can drive one input (
P2_UP_LEFT = Keypad7, Home), and combinations such as
Ctrl+F1are supported. A binding with modifiers must match exactly, while one without
ignores modifier state unless another binding contends over the same key. NumLock,
CapsLock, and ScrollLock never affect any binding. - An empty value turns the input off: written as
TEST =, no key drives TEST at all. - A ROM set's file layers over its parent's per key, so shared settings placed in
cfg/pumpitup.iniapply to every title. - A typo warns rather than stopping the run, and the loader log names the file and line.
- Usage is documented in
docs/guides/romset-config-files.md.
Input mapping consolidation
- The same key mapping previously lived in three places in three vocabularies —
ScanJammaPort8andCaptureCurrentJammaPressedMaskin Win32 virtual keys, the SDL
event path in SDL keycodes — so changing one silently desynchronized the others. They now
share one binding table. SDL_Keycodeis the canonical key type andSDL_Keymodthe modifier mask. The SDL event
path compares directly with no translation; only the polling path uses a virtual key
table.- Port, bit, logical input, and log name were merged into one table. That corrected a
mismatch where the log called bit0x02P1-UpRightwhile the code enumerator was
kP1Down; the enumerator order is unchanged because the timeline uses it as a bit
position. - The host key query count is unchanged under the default configuration. With no
combination in use, modifiers are never read, so the port I/O cost Task 403 measured
stands.
Per-ROM-set NVRAM
- The 93C46 EEPROM image is stored at
nvram/<rom-set-id>/eeprom.datthe way MAME does.
All 22 ROM sets previously shared oneeeprom.datin the working directory, so cabinet
settings saved under one title were what another read back. - An existing
eeprom.datis copied into the ROM set's directory once, carrying accumulated
cabinet settings forward. The original is not deleted. - The
REPIU_EEPROM_PATHfull-path override keeps its meaning, so the per-run EEPROM
isolation used by the benchmark scripts and measurement guides still works. cfg/andnvram/were added to.gitignore.
Verification
- Win32 x86 Debug builds of
repiu_exe,repiu, andrepiu_aot_probesucceeded. repiu_aot_probe --romset-config: checks=94 failures=0, covering INI parsing, alias lists
and turning an input off, name table health, combination parsing and its rejected shapes,
modifier matching with the contention rule and lock-bit exclusion, layering, and generated
file round trip and no-overwrite. The regression guard transcribes the pre-change
hardcoded mapping directly and compares virtual key for virtual key.repiu_aot_probe --nvram-path: checks=14 failures=0, covering override precedence,
directory creation, separation between ROM sets, and carry-forward with matching contents
and a preserved original.repiu_aot_probe --bios-keyboard-inputpassed with
translated=true,fifo=true,modifiers=true,overflow=1.- The complete
repiu_aot_probe build/runtime_mounts/pumpit1/PIU/PIU.EXEassertion set
exited zero. - The user confirmed config file generation and key mapping on a real
pumpipx3run. - Only the existing C4819 code-page warnings remain.
Known limitations
COIN2and the cabinet input port0x02ABare unsupported; their I/O port bits are not
identified.- Combinations are meant for cabinet buttons. Binding one to a stage panel is not
recommended, because the window event path fixes the modifier test at the instant the base
key goes down. - No sections beyond
[Input]exist yet. Unrecognized sections are silently ignored so a
file written for a later version does not stop an earlier build. - Per-ROM-set NVRAM has not yet been confirmed at runtime in a user environment: file
creation after a run and carry-forward of existing settings remain unverified.