Repository navigation
v0.0.146
rePIU v0.0.146
이전 릴리스 v0.0.143 이후의 변경입니다. 이번 구간은 후기 PIU 타깃 지원과 PIU10
사운드 보드 HLE에 집중했습니다. pumpito, pumpitc, pumpitpc, pumpite에서 원본 게임
코드를 그대로 실행하면서 MP3 음악과 화면 진행을 함께 처리하는 경로가 추가되었습니다.
새 타깃과 CHD 지원
- MAME CHD profile에 **
pumpito,pumpitc,pumpitpc,pumpite**를 추가했습니다.
기존pumpit1,pumpit2,pumpit3와 함께 총 7개pumpit*profile을 선택할 수 있습니다. - Mode1 cooked-sector CHD와 data-track LBA/ISO extent 보정을 지원하여
pumpite처럼 data
track이 디스크 시작점에 있지 않은 이미지도 ISO9660 mount할 수 있습니다. - mount cache는 CHD identity가 같으면 재사용하며, 실행 파일은 각 profile의
build/runtime_mounts/<target>/PIU/PIU.EXE에서 시작합니다. - JAMMA 입력 보드는 모든
pumpit*profile에, PIU10 ISA flash·CAT702·MP3 capability는
실제 하드웨어를 사용하는pumpito,pumpitc,pumpitpc,pumpite에만 활성화됩니다.
PIU10 ISA 보드 HLE
- PIU10의 20-bit flash address, read-only
piu10.u8, 목적지 선택, status source와
CAT702 PIU 직렬 보안 장치를 플랫폼 공용 HLE로 구현했습니다. - ROM ZIP에서
piu10.u8과<target>.cat702를 CRC 검증 후 추출합니다. 지원하지 않는
profile에는 이 장치를 노출하지 않으므로pumpit1~pumpit3의 기존 경로와 분리됩니다. - 구현은 원본 실행 파일이나 게임 로직을 수정하지 않고 ISA port I/O 경계만 대체합니다.
MAS3507D MP3 streaming HLE
- PIU10이 보내는 MPEG byte stream을 minimp3 + SDL3로 재생합니다. MAME의 MAS3507D
구현은 장치 계약 참고에만 사용했으며 코드는 포함하지 않았습니다. - 완전한 곡을 받은 뒤 재생하는 방식이 아니라 MPEG frame이 준비되는 대로 decode합니다.
persistent decoder와 별도 audio worker를 사용하므로 음악 재생 중에도 원본 게임과 화면이
계속 진행됩니다. - 세 개의 호환 header로 stream sync를 확정하고 정확히 한 frame만 decoder에 전달하여,
FIFO 경계의 불완전한 다음 header가 현재 frame을 손상시키지 않게 했습니다. - MAS3507D
DEMAND는 4 KiB physical ring뿐 아니라 worker staging까지 포함한 compressed
inflight를 기준으로 계산합니다. 이 backpressure는 guest가 HLE 출력보다 수 초 앞서
데이터를 밀어 넣어 곡 중간에 재생이 끊기던 문제를 해결했습니다. - frame-sync status는 decode-ahead 시점이 아니라 SDL queue의 실제 재생 위치에 맞춰
전이합니다.
DAC3350A 출력 제어
- PIU10 destination
0x010의 SDA/SCL transaction에서 DAC3350A AVOL을 복원합니다. - AVOL의 mute와 dB 단계를 SDL audio-stream gain에 반영합니다. 이미 queue된 PCM에도 출력
시점의 gain이 적용되며, 압축 FIFO나 MPEG decoder 상태는 변경하지 않습니다. - MP3 pause는 구현하지 않았습니다.
MP3 입력 성능과 범용화
- 반복적인
OUT DX,ALfeeder tail을 한 번에 전송하여 byte마다 HLE dispatcher를 왕복하던
병목을 줄였습니다. - batch matcher는 target 이름, 고정 EIP, LE object 번호나 data offset을 사용하지 않습니다.
현재 명령의 load/increment/store alias와 register def-use, branch 경계를 검증하므로 서로
다른 compiler register allocation에도 같은 장치 계약을 적용합니다. - 실기 로그에서
pumpitc는 전체 MP3 입력의 약 98.6%,pumpite는 첫 checkpoint의
**약 98.7%**를 batch 처리했습니다. 검증에 실패하면 guest 상태를 바꾸지 않고 기존 scalar
byte path로 복귀합니다.
MP3 지연과 진단
- 모든 PIU10 profile의 MP3 시작 지연 기본값은 0 ms입니다.
- 필요하면
REPIU_PIU10_MP3_LATENCY_MS=0..500으로 실행별 무음 지연을 지정할 수 있습니다. REPIU_PIU10_DAC_AUDIT=1은 DAC transaction 시점의 PCM queue, device buffer, compressed
ring, decoder pending과 inflight를 기록합니다.REPIU_PIU10_MP3_STREAM_AUDIT=1은 producer와 consumer stream을 독립적인 4 KiB hash로
비교합니다. 두 진단 기능은 기본적으로 꺼져 있습니다.
서드파티와 라이선스
- PIU10/CAT702 장치 계약은 BSD 3-Clause인 MAME 소스를 참고했습니다.
- MP3 frame decode에는 CC0 1.0 Universal인 upstream minimp3 고정 commit을 사용합니다.
- MAME emulator, CPU/machine framework 또는 MAS3507D wrapper 코드는 포함하지 않습니다.
알려진 제한
- 저작권이 있는 ROM ZIP과 CHD는 배포하지 않으며 사용자가 합법적으로 보유한 자산을 직접
배치해야 합니다. - CI에는 게임 자산이 없으므로 실제 음악·화면 동시 진행은 로컬 실기 검증 대상입니다.
- 프로젝트는 여전히 연구·개발 단계이며 완성된 게임 런처가 아닙니다.
포함된 버전
v0.0.144 · v0.0.145 · v0.0.146
rePIU v0.0.146
Everything since the previous release, v0.0.143. This stretch focuses on later PIU targets
and PIU10 sound-board HLE. pumpito, pumpitc, pumpitpc, and pumpite now have a path that
keeps the original game code running while MP3 music and rendering progress concurrently.
New targets and CHD support
- Added MAME CHD profiles for
pumpito,pumpitc,pumpitpc, andpumpite, bringing the
selectablepumpit*profiles to seven together withpumpit1,pumpit2, andpumpit3. - Added cooked Mode1 CHD sectors plus data-track LBA and ISO-extent correction, allowing ISO9660
mounts for images such aspumpite, whose data track does not begin at disc LBA zero. - Mount caches are reused while CHD identity is unchanged. Each profile launches
build/runtime_mounts/<target>/PIU/PIU.EXE. - JAMMA input is enabled for every
pumpit*profile. PIU10 ISA flash, CAT702, and MP3 capability
is enabled only for the hardware-appropriatepumpito,pumpitc,pumpitpc, andpumpite.
PIU10 ISA-board HLE
- Added platform-neutral HLE for the PIU10 20-bit flash address, read-only
piu10.u8, destination
selection, status source, and CAT702 PIU serial-security device. piu10.u8and<target>.cat702are extracted from the matching ROM ZIP with CRC validation.
The board is not exposed to unsupported profiles, keeping thepumpit1throughpumpit3
paths separate.- Only the ISA port-I/O boundary is replaced; original executable and gameplay logic remain
authoritative.
MAS3507D MP3 streaming HLE
- PIU10 MPEG byte streams are played through minimp3 and SDL3. MAME's MAS3507D implementation
informed the device contract only; no MAME MAS3507D code is included. - Frames are decoded as they become available instead of waiting for a complete song. A persistent
decoder and dedicated audio worker let original game execution and rendering continue during
playback. - Stream sync requires three compatible headers, and exactly one parser-validated frame is passed
to the decoder, preventing an incomplete next header at a FIFO boundary from invalidating the
current frame. - MAS3507D
DEMANDis based on compressed inflight across both the 4 KiB physical ring and worker
staging. This backpressure fixes mid-song interruption caused by the guest running seconds ahead
of HLE output. - Frame-sync status follows actual SDL queue playback position rather than decode-ahead time.
DAC3350A output control
- DAC3350A AVOL transactions are reconstructed from destination-
0x010SDA/SCL traffic. - AVOL mute and dB steps control SDL audio-stream gain, including PCM already queued for output,
without changing the compressed FIFO or MPEG decoder state. - MP3 pause is not implemented.
MP3 input performance and generalization
- Batches the repeated
OUT DX,ALfeeder tail, removing a per-byte HLE dispatcher round trip. - The matcher uses no target name, fixed EIP, LE object number, or data offset. It validates the
current instructions' load/increment/store aliases, register def-use, and branch boundaries, so
equivalent compiler register allocations share one device contract. - Live logs batch about 98.6% of MP3 input on
pumpitcand about 98.7% at the first
pumpitecheckpoint. Any validation failure preserves guest state and falls back to the scalar
byte path.
MP3 latency and diagnostics
- Every PIU10 profile now defaults to 0 ms MP3 startup latency.
REPIU_PIU10_MP3_LATENCY_MS=0..500can request per-run silence compensation when needed.REPIU_PIU10_DAC_AUDIT=1records PCM queue, device buffer, compressed ring, decoder pending,
and inflight state at each DAC transaction.REPIU_PIU10_MP3_STREAM_AUDIT=1compares producer and consumer streams with independent 4 KiB
hashes. Both diagnostics are off by default.
Third-party code and licensing
- PIU10 and CAT702 contracts are informed by BSD-3-Clause MAME sources.
- MP3 frame decoding uses a pinned upstream minimp3 commit under CC0 1.0 Universal.
- No MAME emulator, CPU/machine framework, or MAS3507D wrapper code is included.
Known limitations
- Copyrighted ROM ZIP and CHD assets are not distributed; users must supply legally owned copies.
- CI has no game assets, so concurrent music/rendering behavior remains a local live-validation
responsibility. - rePIU remains research-stage software rather than a finished game launcher.
Versions included
v0.0.144, v0.0.145, v0.0.146.