← コア一覧
Propcycle (spacestate1)
MAMEのドライバにない実基板の資料を引用 — 2
- Propcycle.sv:2000 Kept in the history, not in the netlist -- a dead signal that still LOOKS meaningful is how this project manufactured a four-build phantom video freeze.
- rtl/propcycle_main.sv:486 The CPU then never reaches its per-frame C00000 clear, the master DSP spins at 45DD polling for it, every INT0 is dropped (c25_missed saturates at 65535) and the 3D goes black for good.
「実機」で確認したと記載 — 1
- Propcycle.sv:1102 Live, the renderer walks from geo_head = 0x300 as soon as vblanks arrive, so it DREW THE TEST FRAME -- verified on hardware 2026-08-24 against sim/dumps/snap3d/propcycl/0001.png, visible ~30 s. Zero the array once the BIST verdict is latche
MAMEのソースを引用 — 69
- Propcycle.sv:4 TG68K.C (020 mode, write-stream proven vs MAME on hardware) runs the full 4 MB program from SDRAM through the bench-proven pc_prog_bus; syscon vblank IRQ, factory- preloaded EEPROM, and protocol-spec DSP/MCU stubs take the boot toward POST;
- Propcycle.sv:203 Layer isolation, the hardware equivalent of MAME's mixer byte 0x82401f.
- Propcycle.sv:616 {text, sprites, poly} -- MAME 0x82401f bit order
- Propcycle.sv:656 Signed8 +-127 -> +-317 around 0x1FF = 0xC2..0x33C, inside MAME's 0xBF..0x33F ADC range.
- Propcycle.sv:657 MAME's ADC.0 (X) is PORT_REVERSE.
- Propcycle.sv:734 MCU input words (encoding from the MAME differential, RESEARCH "inputs").
- Propcycle.sv:735 Handlebar: left-analog scaled x2.5 around neutral 0x1FF (signed8 +-127 -> +-317, inside MAME's 0xBF..0x33F range); X is PORT_REVERSE in MAME, so negate.
- Propcycle.sv:1167 master_enable / dsp_irq_enabled: syscon byte 0x1A on SS22 (namcos22.cpp syscon_dspcontrol) -- 0 disables, 1 enables both, 0xFF is upload mode (master runs, no interrupt).
- Propcycle.sv:1410 MAME hardcodes nothing: pdp_handle_commands dispatches nine command codes, each consuming a different number of words, so the prologue length is DATA.
- Propcycle.sv:1418 The record's payload[k] lives at 0x0306+k, and MAME parses src[6] as camera_zoom, src[7..a] as vr/vl/vu/vd.
- Propcycle.sv:1427 payload[6] ZOOM (MAME f2400: 294548)
- Propcycle.sv:1911 MAME gets this for free -- draw_sprites runs at a defined point in the frame -- so anchor to the same place.
- Propcycle.sv:2170 MAME's attract header word 0 is 0x00060000, so slot 63 must read exactly that.
- Propcycle.sv:2173 Word 0 already proved correct on hardware (0x00060000, exactly MAME's attract value), and the open question is word 2: the blitter computes num = word[2] - base + 1 and gets 1 on every attract frame, while MAME's own list is 5, 3, 9 and 6 a
- Propcycle.sv:2388 This core is natively 640x480 progressive at 31.45 kHz (ce_pix 25.6 MHz, HTOTAL 814, VTOTAL 525 -- MAME's exact namcos22 timing, namcos22.cpp:1104-1112).
- rtl/pc_c25.sv:10 Every semantic mirrors tools/pc_tms_interp.py (the executable spec, locksteppable against MAME's core).
- rtl/pc_c25.sv:14 Memory map, now MAME's exactly (namcos22.cpp master_dsp_program / master_dsp_data): data 0x0000-0x3FFF RAM.
- rtl/pc_c25.sv:16 MAME maps only 0x1000-0x3FFF plus the chip's internal blocks, but modelling the whole range as flat RAM matches the interpreter (which the core is gated against) and costs one BRAM.
- rtl/pc_c25.sv:55 Preloading extram with the program MAME's master ends up running, plus the two pieces of state the boot leaves behind, reproduces the post-upload machine exactly and lets the per-frame transformation run for real.
- rtl/pc_c25.sv:69 The whole machine is now captured from MAME at its idle loop (tools/pc_dump_mstate.lua) -- 16K words of data RAM plus ACC, all eight ARs and both status words -- and the interpreter seeded that way runs 60 frames and 24 M instructions clean
- rtl/pc_c25.sv:157 BLKP source pointer (MAME's m_PFC).
- rtl/pc_c25.sv:664 MAME tms32025.cpp subc(): oldacc = ACC; GETDATA(15, SXM); ACC -= ALU; if (oldacc >= ALU) ACC = ACC<<1 | 1; // UNSIGNED else ACC = oldacc<<1; and GETDATA sign-extends to 32 bits per SXM BEFORE the shift.
- rtl/pc_c25.sv:674 The master's float routine at 0x473F runs it fourteen times in a banz loop, so a wrong SUBC gives a wrong mantissa, which is the viewport zoom reading 0x320000 instead of MAME's 0x294548 (37x over-scaling).
- rtl/pc_c25.sv:713 MAME dispatch row /*58*/ is tblr tblw sqrs lts, and row /*38*/ is mpy SQRA mpya mpys.
- rtl/pc_c25.sv:722 MAME tblr(): PFC = ACC.w.l; ALU = program[PFC]; PUTDATA(ALU); PFC++ ea was already computed in F_ADDR and is the DESTINATION; the source is program memory, which set_pm_ra selects between the c71 BIOS and extram exactly as a fetch does.
- rtl/pc_c25.sv:828 SFR: LOGICAL shift right, sign replicated only when SXM is set (MAME sfr()).
- rtl/pc_c25.sv:862 MAME tms32025.cpp norm(): if (ACC != 0 && (int32)(ACC ^ (ACC<<1)) >= 0) { CLR1(TC); ACC <<= 1; MODIFY_AR_ARP(); } else SET1(TC); The ACC==0 guard is not cosmetic: the master's float routine runs RPTK 0Fh + NORM *-, so with ACC zero this dec
- rtl/pc_c25.sv:916 BV (0xF0) is still a loud halt -- it needs the OV latch and has an out-of-program target; validate against MAME before adding.
- rtl/pc_c25.sv:934 MAME dispatch row /*F8*/ is bbz bbnz bioz banz BLKP blkd call br, so 0xFC is BLKP and BNV is 0xF7 -- HANDOFF recorded FC80 as "likely BNV" and that guess was wrong.
- rtl/pc_geo.sv:4 Implements tools/pc_geo_fixed.py EXACTLY (the validated fixed-point re-model of MAME's simulate_slavedsp chain): record walk from polygonram 0x304 -> camera/view/object handlers -> blit_polyobject -> blit_quads -> per-quad Q15 transform, cu
- rtl/pc_geo.sv:307 The real head is polygonram[0x7FFF] (the value the master writes every frame, MAME pdp_begin_r), plus the FFFE prologue that sits in front of the first record: the walk starts at ptr+4 because the list opens {FFFE, arg, code, ...} and the r
- rtl/pc_live_regs.sv:6 MAME's own dumps at the title-logo frame (480) and the gameplay frame (2400) differ in exactly two things beyond the text palette: czattr[4] (per-bank fog enable) is 0x0000 in the sky scenes and 0x4444 in the canyon, and the mixer's fog col
- rtl/pc_live_regs.sv:16 WHAT IT DOES: shadows the eight czattr words and mixer bytes 0x00-0x1F off the exported video write bus, and derives what MAME derives (namcos22_v.cpp namcos22s update_mixer, ~line 2445):
- rtl/pc_live_regs.sv:30 The shadows themselves start at zero, MAME's reset state; the game writes the whole mixer block during boot init (slot 13 counts ~93k mixer writes), so by the time a live frame is rendered every byte has been written.
- rtl/pc_live_regs.sv:35 Byte-lane convention copied from pc_video_s22's mixer decode: mixer byte n lives in 16-bit word n>>1, even n on the upper (uds) lane, odd n on the lower (lds) lane -- MAME's nthbyte() order for a big-endian CPU.
- rtl/pc_live_regs.sv:38 czattr word k is at 0x810000 + 2k (MAME: u16 handler, offset = word).
- rtl/pc_live_regs.sv:74 Sprite alpha keying (namcos22_v.cpp update_mixer): the FACTOR is per-sprite (src[3] >> 8 & 0xff), not a mixer byte -- only the two key bytes live here.
- rtl/pc_live_regs.sv:124 ---- derive (MAME update_mixer) ----------------------------------------
- rtl/pc_pdp.sv:4 Kicked by the master's IN PA$2 (pdp_begin); walks the command list at polygonram[polygonram[0x7FFF] & 0x7FFF] with MAME's pdp_handle_commands semantics (reference/mame/namcos22.cpp:2122): FFF0 nop; FFF5 point-RAM write (dropped, point RAM i
- rtl/pc_pdp.sv:131 record code: MAME returns
- rtl/pc_pixel.sv:26 The ayx swizzle is NOT a memory: MAME builds the table from a pure flip/swap of the coordinates (init_tables), so it is computed combinationally here.
- rtl/pc_pixel.sv:372 ayx swizzle (MAME init_tables): flips by attr[2]/attr[1], then swap by attr[3]; value = (iy<<4)|ix AFTER the swap
- rtl/pc_poly.sv:19 * C25 -- the dspram window, MAME namcos22_dspram16_r/w semantics: bank 0 = low half, bank 1 = high half, bank 2 = low half while latching the high half (that latch is what the next bank-2 write puts back), bank 3 = reads 0 / writes dropped
- rtl/pc_sprite.sv:9 Why this subset: the attract title logo was decoded from MAME at frame 480 before a line of this was written, and it is the simplest case the model supports --
- rtl/pc_sprite.sv:19 Building the zoom and alpha paths first would have been work with nothing on screen to show for it, and the model still owes MAME a fixed-point extent walker for the zoom case (its own note) -- that has to be settled in the MODEL before RTL
- rtl/pc_sprite.sv:75 ---- sprite ALPHA ----------------------------------------------------- namcos22_v.cpp renderscanline_sprite: alphafactor = extra.alpha (the queue already stored 0xff - sprite.alpha), applied when alphafactor != 0xff && (alpha_enabled || pe
- rtl/pc_sprite.sv:286 src[3] = {sw[6], sw[7]}, so MAME's (src[3] >> 8) & 0xff is sw[7][15:8].
- rtl/pc_text_layer.sv:10 Geometry (namcos22_v.cpp, vendored copy): - 64x64 tiles of 16x16 px, TILEMAP_SCAN_ROWS - tile word [15:12] palette [11] flipy [10] flipx [9:0] code - char row = 8 bytes = 16 packed 4bpp pixels, even pixel in the high nibble (CPU byte ord
- rtl/pc_video_s22.sv:3 3D and sprites come later; the background is the mixer's background color, exactly what MAME shows when only the text layer draws.
- rtl/pc_video_s22.sv:7 Timing (namcos22.cpp): pixel 25.6 MHz (doubled progressive for the interlaced 640x480), HTOTAL 814 (visible 0..639), VTOTAL 525 (visible 0..479) -> 59.90 Hz.
- rtl/pc_video_s22.sv:54 LAYER ENABLES, in MAME's own bit order for the mixer byte 0x82401f: bit0 poly/3D, bit1 sprites, bit2 text.
- rtl/pc_video_s22.sv:383 NOTE: measured against MAME's text-only render, our frame sits 2 px right and 1 line down (shifting it back gives a 100.00% EXACT pixel match, so the CONTENT is bit-perfect).
- rtl/pc_video_s22.sv:574 MAME's tilemap is SPACE-filled at every frame sampled from 1800 to 9000 -- ~3900-4070 cells of 0x0020 out of 4096 and EXACTLY ZERO cells of 0x0000, ever.
- rtl/propcycle_main.sv:4 TG68K.C in 020 mode (write-stream proven against MAME, see RESEARCH.md "GO" verdict) on the full namcos22s memory map: 4 MB program via pc_prog_bus/SDRAM (bench-proven), 256 KB work RAM, syscon with the vblank interrupt, EEPROM preloaded wi
- rtl/propcycle_main.sv:86 Found by differential against MAME: holding the SERVICE switch changes exactly ONE stable byte in COM RAM, A0BD01 00 -> 80 -- the same MCU status byte this stub already drives for the boot ack.
- rtl/propcycle_main.sv:89 Bit 7 there unlocks the game's built-in diagnostics (namcos22.cpp:80 lists them: MD-DOWNLOAD, MD-EXTERNAL-RAM, C-RAM CHECK BY MD, PDP LOOP TEST, PDP BLOCK MOVE, POINT RAM, SD ROM-PRG, SD EXTERNAL-RAM, DATA FLOW 1/2, POINT ROM).
- rtl/propcycle_main.sv:95 MCU input words, fully formed by the top level (encoding learned by MAME differential, RESEARCH "inputs"): BD02 buttons (bit0 coin, bit8 coin-activity, bit10 service, bit11 test), BD04 start (bit8), BD0A/BD0C handlebar X/Y (10-bit, neutral
- rtl/propcycle_main.sv:114 wrcount AT the derail -> MAME op index
- rtl/propcycle_main.sv:125 Only FOUR such writes exist in the entire MAME trace, so four entries hold the whole story: either they landed with the right data/lanes and something else zeroed the register (a reset pulse -- see the top-level rstcnt), or a fifth, clobber
- rtl/propcycle_main.sv:455 EEPROM: byte device on the UPPER lane of each word (umask32 ff00ff00); preloaded from the download stream with MAME's factory image
- rtl/propcycle_main.sv:479 eeprom_wait_write_cycle @ 0x01992C is the game's EEPROM write-cycle delay: it reads 0x8A000A as a SCANLINE counter and 0x8A000E as a frame parity, and spins until the line has advanced by 0x184 (388 lines, ~6.4 ms) across at most one parity
- rtl/propcycle_main.sv:484 With ANY constant it never exits: MAME's 0x8000 gives -32768 < -32380 forever, our old default 0 gave 0 < 388 forever.
- rtl/propcycle_main.sv:766 MAME's ss22_syscon_w has it at case 0x1a, but the pc-reverse decompile of the actual game (dsp_init @ 0x22C7E) writes 0x70001C=0 / 0x70001C=1 around the polygonram init -- and PC_live1's telemetry agreed: dsp_ctrl read from 0x1A stayed 00 f
- rtl/propcycle_main.sv:780 DSW at 0x440000: SW4:1-8 live in bits 23:16 of the 32-bit word (MAME propcycl "DSW", all documented Unknown, active low); every other bit reads 1.
- rtl/propcycle_main.sv:798 keycus (RNG in MAME; 0 here)
- rtl/propcycle_main.sv:801 idles HIGH -- MAME trace R 450008 = 0x0001 @2246E
- rtl/propcycle_main.sv:815 Three things are frozen at the derail so the capture describes the crime rather than the aftermath: dbg_lastgood/dbg_firstbad the transition itself dbg_wrfreeze the write count AT that moment, which indexes straight into MAME
- README.md:60 MAME is the oracle: dumps come from the Lua scripts in `tools/`, the same inputs go to the RTL under Verilator, and the two are compared exactly — a pass is 0 m
- README.md:77 `reference/mame/` — MAME sources used as the specification (`namcos22.cpp`, `namcos22_v.cpp`, `c352.cpp`, `namco_dsp.cpp`, `namcomcu.cpp`, `poly.h`), BSD-3-Clau
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 5
- Propcycle.sv:1416 The list HEAD is now proven identical to MAME's capture (FFFE,0 / FFFE,400 / FFFD,21 / bb0003), so pc_geo's +4 prologue skip is CORRECT and is NOT the over-scaling.
- rtl/pc_text_layer.sv:4 The reference is tools/render_text.py, itself proven 100.00% pixel-exact against MAME's own rendering of the propcycl title and attract screens (2026-08-10).
- rtl/pc_video_s22.sv:18 Pixel-exact reference: tools/render_text.py, 100.00% vs MAME twice over.
- rtl/propcycle_main.sv:498 Bit 15 is held at 1 to match MAME's 0x8000 for anything that tests it ("dirtdash has slowdowns if high bit is clear").
- README.md:17 **Text layer** 100.00% pixel-exact vs MAME.
MAMEから移植・書き写した、または取り入れたと記載 — 1
- rtl/pc_sprite.sv:4 Executable spec: tools/pc_sprite_model.py (a port of MAME's draw_sprites -> draw_sprite_group -> render_sprite -> renderscanline_sprite), which is pixel-exact on both canonical frames.
MAMEドライバと同じ文言を含む(出典の明記なし) — 3