← コア一覧
Arcade-XNZN1TaitoFX1B (XelaNotPu)
MAMEのソースを引用 — 139
- ZN1.sv:358 The game strobes it by toggling bit5 of the bank register (0x1FB40000); the MB3773 re-arms on the FALLING edge (MAME: mb3773->write_line_ck(BIT(data,5)), 5s timeout, machine().schedule_soft_reset() on expiry).
- ZN1.sv:950 The DSP internal ROM is 4K words (8KB); only the first 0x2000 file bytes are used (MAME loads dsp region 0x2000; jtdsp16 prog_addr is [12:0]).
- ZN1.sv:1295 Real hardware enforces these; MAME's interpreter may not.
- ZN1.sv:1888 The MRA loads the ROM STRAIGHT, so the byte select is INVERTED vs FX-1A to reproduce MAME's ROM_LOAD16_WORD_SWAP ordering (odd byte address -> low half, even -> high half).
- rtl/gpu.vhd:712 Per MAME: 109 bank switches during cube attract (game code at 0x800504F0 loads assets from banks).
- rtl/gpu.vhd:729 Tests whether DMA can carry MAME's expected R=31 for cube CLUT entries.
- rtl/gpu.vhd:2329 Cube attract drives global drawMode[3:0] to 0xA (TexPage X=640) or 0xB (X=704) per MAME ground truth.
- rtl/gpu.vhd:2345 B125/B126 (Y=482 exact) showed write_R=read_R=0, suggesting cube CLUT might use different Y. Y∈[460,500] covers Y=462 (text font) + Y=480-487 (cube CLUT band per MAME).
- rtl/gpu_cpu2vram.vhd:76 Three stickys distinguish where it goes: A any_ever — any such upload ever (sanity) B y482_ever — and copyDstY=482 (MAME ground truth) C y488_ever — and copyDstY=488 (FPGA's existing in_cube guess)
- rtl/gpu_cpu2vram.vhd:253 This tells us what data accompanies the suspect upload: if it's MAME's cube CLUT (entry0=0x0000, entry1=0x7FFF), only the position is wrong.
- rtl/gpu_cpu2vram.vhd:417 GREEN = h49_fifo_data(24:16) — entry 1 (upper halfword) bits 8:0 (includes R[4:0] in 4:0) BLUE = anchor sticky — fired at first WRITING+copySizeX=16+copySizeY=1+copyDstY∈[472..476] MAME-expected values (cube CLUT first FIFO word = 0x7FFF00
- rtl/gpu_pixelpipeline.vhd:115 Expected entries 0..3 (MAME-verified): 0x0000, 0x7FFF, 0x023F, 0x3FFF.
- rtl/gpu_pixelpipeline.vhd:220 MAME ground truth says CLUT[3] != 0x0003.
- rtl/gpu_poly.vhd:536 MAME stream for DoA++ shows 267 of 2270 textured polys use extended Y CLUTs (Y >= 512) via bit 15 of polygon CLUT word.
- rtl/gpu_rect.vhd:243 MAME stream for DoA++ shows 267 textured polys use bit 15 of CLUT word to address Y>=512 in extended VRAM.
- rtl/joypad.vhd:418 HARDWARE EVIDENCE (MAME src/mame/sony/zn.cpp, authoritative): the ZN-1 machine config attaches NO controller port to SIO0 on either port.
- rtl/joypad.vhd:421 Compare src/mame/sony/psx.cpp, which does instantiate PSXCONTROLLERPORTS + PSX_CONTROLLER_PORT(port1/port2) and a sio0.dtr_handler().
- rtl/memorymux.vhd:147 Capcom 4-button title (MAME capcom4b, e.g. starglad): KICK harness carries only 2 buttons at bit0/bit1, fed from core buttons 3/4 (joy[6..7]) so they sit contiguously after the 2 punch buttons.
- rtl/memorymux.vhd:154 MB3773 watchdog strobe (Taito FX only): single-cycle pulse on the FALLING edge of bank-register bit5, mirroring MAME taito_fx bank_w -> mb3773->write_line_ck(BIT(data,5)).
- rtl/memorymux.vhd:161 MAME src/mame/sony/zn.cpp taito_fx1b_state: 0x1FB80000 reg_data_w / 0x1FB80002 reg_address_w (global volume, 16-bit) 0x1FBA0000 sound_irq_w -> MN10200 IRQ0 doorbell 0x1FBC0000 sound_irq_r -> 0 (handled by BUSREAD_SNDSTUB) 0x1FBE0000-0x1F
- rtl/memorymux.vhd:354 In MAME (sony/zn.cpp taito_fx1z_state) it is a PLAIN memory-mapped array at 0x1FB00000-0x1FB003FF (umask 0x00ff00ff), read/written via trivial fram_r/fram_w (NOT a serial/bit-banged protocol).
- rtl/memorymux.vhd:363 Power-up state is 0x00 (no init) rather than MAME's 0xFF, which is harmless: gdarius checksums and REINITS the region on any invalid content, and writes now persist, so it self-heals to a valid state and boots.
- rtl/memorymux.vhd:366 (For byte-exact MAME parity / true persistence, an ioctl-loaded MIF + save path is the follow-up — same NVRAM infra the FX-1A EEPROM needs.)
- rtl/memorymux.vhd:963 Per MAME capcom_zn_state::maincpu_program_map: 0x1f000000-0x1f3fffff .rom() region(bankedroms,0) 0x1f400000-0x1f7fffff bankr(rombank) [4MB banks, ofs 0x400000+] SDRAM byte = 0x800000 + EB*0x400000 + addr[21:0]; EB=0 for the fixed window (ad
- rtl/memorymux.vhd:990 Capcom ZN-1 country/program ROM (512KB @0x1FB80000), MAME .rom() region "countryrom" (the game's "_04" program ROM — executable).
- rtl/memorymux.vhd:1156 VRAM destination (per MAME): X=256, Y=482, 4-bit CLUT 16×1.
- rtl/memorymux.vhd:1157 MAME 20s trace shows NO direct CPU read at 0x1F7B61CC, so the load likely happens via I/D-cache fill of a 32-byte line, or via a bulk DMA copy.
- rtl/memorymux.vhd:1217 Taito FX bank register write: MAME taito_fx uses only bits[1:0] (BIT(data,0,2)); bit5 is the MB3773 watchdog strobe, bit2 unused.
- rtl/memorymux.vhd:1221 MB3773 watchdog: kick on the falling edge of bit5 (MAME parity).
- rtl/memorymux.vhd:1230 MAME atlus_zn_state::bank_w uses data & 3 (2 bits); was bits[18:16].
- rtl/memorymux.vhd:1238 Per MAME's analysis, 109 bank switches happen during cube attract via game code at 0x800504F0.
- rtl/memorymux.vhd:1246 Capcom ZN-1 bank register: byte write @0x1FB00000, rombank = data & 0x0F (MAME capcom_zn_state::bank_w).
- rtl/memorymux.vhd:1254 Capcom QSound sound latch: byte write @0x1FB60000 (MAME capcom_zn_state generic_latch_8 -> Z80 /NMI).
- rtl/memorymux.vhd:1264 Capcom ZN-1 country/program ROM (512KB @0x1FB80000, MAME region "countryrom").
- rtl/memorymux.vhd:1281 build #79 fix: Raizing bank is data & 3 (bits[1:0]) per MAME raizing_zn_state::znsecsel_w.
- rtl/memorymux.vhd:1326 MAME: unknown_r() returns 0x0000FFFF for all ZN platforms
- rtl/memorymux.vhd:1331 Taito Zoom global-volume registers (MAME zn.cpp taito_fx1b): one 32-bit word carries two 16-bit ports, +0 = reg_data_w and +2 = reg_address_w.
- rtl/memorymux.vhd:1349 sound_irq_w: MAME asserts and immediately clears MN10200 IRQ0.
- rtl/memorymux.vhd:1372 Capcom ZN-1 KICK1 (0x1FB40010) / KICK2 (0x1FB40020) button harness (MAME capcom_zn_state maps these as portr("KICK1"/"KICK2")).
- rtl/memorymux.vhd:1390 Two addresses matter to the main CPU's sound dispatcher (game code at 0x800B2A34): 0x1FBC0000 sound_irq_r : MAME returns 0; game does andi 1 / bne — if bit0 reads 1 the dispatcher bails WITHOUT draining its command queue (0x800B2A48-58), w
- rtl/memorymux.vhd:1401 Both stubs mirror MAME's ground-truth handshake WITHOUT the sound CPU.
- rtl/memorymux.vhd:1601 MAME capcom6b/4b: bit0=BUTTON4, bit1=BUTTON5, bit2=BUTTON6, rest=1.
- rtl/memorymux.vhd:1626 Mirrors MAME sound_irq_r()==0.
- rtl/mn10200.sv:5 MAME is cited in-file only as the behavioral ground-truth reference, not as a source of code.
- rtl/mn10200.sv:16 Timing model: MAME runs this CPU at clock/2 == 6.25 MHz, so one m_cycles unit == 160 ns.
- rtl/mn10200.sv:17 The core keeps a 64-bit `cyc` counter that is advanced by exactly the amount MAME decrements m_cycles, and always *before* the instruction's memory writes are issued (that is the order MAME uses, so a bus-write timestamp of cyc*160ns reprod
- rtl/mn10200.sv:25 Internally decoded: 0x00FC00-0x00FFFF on-chip peripheral registers (io_control_r/w) 0x000000-0x00FBFF internal RAM if INTRAM_KB>0, else unmapped (== MAME, whose taito_zoom map leaves this region unmapped) Everything else is issued on the
- rtl/mn10200.sv:59 out | (dir ^ 0xff), as MAME emits
- rtl/mn10200.sv:70 peripheral-write trace (for validating against MAME's MN10200_IOLOG)
- rtl/mn10200.sv:449 `cyc` is driven by the decoder's cycle counts, not by FSM clocks, so MAME timing is unaffected; only the clk-per-cycle ratio moves, and peripheral reads are ~4K/s. Self-clearing on address change / access end, so no FSM state needs to know
- rtl/mn10200.sv:694 Costs +1 clk per S_SEQ visit, which the pacing accumulator absorbs (5.42 clk/MAME-cycle available, 2.84 used).
- rtl/mn10200.sv:867 DMA block 0x280-0x2fd: store and ignore, like MAME
- rtl/mn10200.sv:928 MAME pushes the PRE-entry PSW
- rtl/psx_top.vhd:718 build #150: sticky latches for CPU PC at the cube CLUT PIO upload site (MAME PC 0x8003CB20).
- rtl/psx_top.vhd:2458 HW-accurate: MAME znmcu_device drives DSR on select the same way.
- rtl/psx_top.vhd:2482 X=768 is the ONLY CLUT at X>=512 in lpadv's entire stream (MAME log: CLUT X in {0,256,768}), so a sticky latch firing == the cubes.
- rtl/psx_top.vhd:2523 RED = h40_cube_clut_loaded_ever — CLUTwrenA + CLUTaddrA=0 + vram_DOUT[31:16]=0x7FFF + vram_DOUT[47:32]=0x023F (cube CLUT word 0 loaded into dpram with the EXACT MAME-verified values) GREEN = h40_clut_read_7fff_ever — any CLUTDataB lane
- rtl/psx_top.vhd:2568 Display origin is at Y=240 per MAME GP1 0x05 trace, so screen shows the empty front buffer.
- rtl/psx_top.vhd:3062 Banking + MRA ROM layout were proven correct vs MAME (byte-for-byte), so the upstream ROM->SDRAM->banked-read path is clean.
- rtl/psx_top.vhd:3064 The classification now happens in gpu.vhd gated on the cube CLUT's UNIQUE VRAM destination (X<256, Y=488 = MAME's exact cube-CLUT upload), removing the value/address ambiguity that contaminated builds #40-43.
- rtl/taito_zoom_top.sv:5 MAME is cited in-file only as the behavioral ground-truth reference, not as a source of code.
- rtl/taito_zoom_top.sv:23 AUDIO CHAIN (MAME taito_zm.cpp / TMS57002_HDL_SPEC.md §1): ZSG-2 mix0 --x128--> TMS si0 (reverb send) ZSG-2 mix1 --x128--> TMS si1 (chorus send) ZSG-2 mix2 --x256--> TMS si2 (direct L) ZSG-2 mix3 --x256--> TMS si3 (direct R) TMS so2
- rtl/taito_zoom_top.sv:35 MAME glue: src/mame/sony/taito_zm.cpp.
- rtl/taito_zoom_top.sv:60 CPU PACING: MAME runs the MN10200 at 25MHz/2/2 = 6.25 M cycles/s. The core FSM needs ~2.87 clk per MAME cycle plus 1 clk per bus access (~9.4 M/s), i.e. ~27.3 M clk/s of the 33.8688 M available.
- rtl/taito_zoom_top.sv:228 M66220FP mailbox - 128 x 16 true dual port port A: PSX maincpu (0x1FBE0000-0x1FBE01FF, umask32 00ff00ff) port B: MN10200 (0xE00000-0xE000FF) MAME maps byte N of the 256-byte array to maincpu address 0x1FBE0000 + 4*(N>>1) + 2*(N&1), i.e.
- rtl/taito_zoom_top.sv:412 MAME zsg2_read_memory() returns 0 past the end of the sample region; enforce the same here so a bad page byte can never read another DDR3 tenant.
- rtl/taito_zoom_top.sv:442 ZSG-2 CPU-side sample memory readback (MAME zsg2 control regs 0x1c-0x1f,0x14)
- rtl/taito_zoom_top.sv:444 The MN10200 reads sample headers straight out of the ZSG-2 ROM window: write 0x31C/0x31D -> 30-bit word read_address (control_w 0x1c/0x1d) read 0x314 -> "memory bus busy" (poll until low 8 bits == 0) read 0x31E/0x31F -> low/high
- rtl/taito_zoom_top.sv:648 CPU-side ROM readback registers (MAME zsg2 control_r 0x14/0x1e/0x1f); everything else comes from the zsg2 core (which returns 0 for globals).
- rtl/taito_zoom_top.sv:667 MAME's zsg2_device::write only accepts full 16-bit accesses
- rtl/taito_zoom_top.sv:701 * host port: MN10200 port 1 bit0 = PLOAD, bit1 = CLOAD, both ACTIVE LOW (MAME taito_zm.cpp: pload_w(data & 1), cload_w(data & 2)); the data port is the byte write at 0xC00000.
- rtl/taito_zoom_top.sv:704 * IRQ1 is the empty_callback INVERTED, i.e. asserted while the coefficient update FIFO is NOT empty (taito_zm.cpp:237).
- rtl/taito_zoom_top.sv:722 MAME: si[k] = s32(route_gain * sample * 32768 * 256) & 0xffffff with the ZSG-2 mix accumulators already clamped to +-32768, which is exactly x128 for the two 0.5-gain sends and x256 for the two 1.0-gain direct paths.
- rtl/taito_zoom_top.sv:786 IRQ0 doorbell from the maincpu MAME asserts then immediately clears the line; the MN10200 latches the transition, so the level must be held across at least two CPU-enabled clocks for the edge detector to see both edges.
- rtl/taito_zoom_top.sv:825 readback, as MAME's tms_ctrl_r
- rtl/taito_zoom_top.sv:836 Global volume (taito_zm reg_address 0x04 / 0x05, 6-bit) and output scaling MAME: tms57002 output gain 2/3 = (data & 0x3f) / 63.
- rtl/taito_zoom_top.sv:846 MAME default output gain 1.0
- rtl/taito_zoom_top.sv:857 MAME's stream output is s32(so << 8) / 2^31, so the audible 16-bit sample is so[23:8]; the 6-bit volume is applied to the FULL 24 bits (spec §1) and the >>8 is folded into the final shift, i.e. out16 = (so * gain * 1040) >> 24 with gain/63
- rtl/tms57002.sv:5 MAME is cited in-file only as the behavioral ground-truth reference, not as a source of code.
- rtl/tms57002.sv:44 Instruction slots per sample period (MAME: 12.5 MHz / 32552 Hz).
- rtl/tms57002.sv:162 crm() is forced to 0 while the update FIFO is non-empty (tms57kdec.cpp)
- rtl/tms57002.sv:257 MAME advances the output pipeline (macc_read = macc_write) BEFORE the cat2a op runs, so a cat2a %mo/%mv in S_A must already see the new value.
- rtl/tms57002.sv:826 MAME's pload_w() sets pc = ca = 0 and then execute_run() refuses to start another instruction, so the reset always sticks.
- rtl/tms57002.sv:834 (The in-flight instruction is still allowed to finish, which is what MAME does too: pload_w is called between TMS instructions.)
- rtl/tms_delay_m10k.sv:5 MAME is cited in-file only as the behavioral ground-truth reference, not as a source of code.
- rtl/tms_delay_m10k.sv:38 MAME's golden captures were taken with TMS_ZEROINIT=1 and the DSP reads the delay line long before it has written every location (the longest tap is ~24.5 k samples = 0.75 s), so the delay RAM MUST start all-zero or the first second of ever
- rtl/zn1_io.vhd:103 build #117b: store the full znsecsel byte for verifiable readback (MAME returns whatever was written).
- rtl/zn1_io.vhd:163 Real AT28C16 returns inverted bit 7 during 200μs write cycle (per MAME at28c16_device::read).
- rtl/zn1_io.vhd:195 Per MAME zn.cpp: Taito FX-1A/FX-1B (coh1000t*) AND Capcom coh1000c both use zn1_1mb_vram(config) -> CXD8561Q with 0x100000 (1MB) -> boardconfig_r bit3=0 (0x61).
- rtl/zn1_io.vhd:228 MAME at28c16_device::write(): the busy/data-poll window (and the write) only engage when the new byte DIFFERS from what is stored (read_byte(offset) != data).
- rtl/zn1_io.vhd:298 Per MAME: read returns m_last_write XOR 0x80 during write-in-progress.
- rtl/zn1_io.vhd:322 build #115: initialize EEPROM BRAM to 0xFF (AT28C16 factory state per MAME nvram_default).
- rtl/zn1_io.vhd:436 0x060000 zn2_spu_hack (MAME toggles bit 3 each read)
- rtl/zn1_io.vhd:439 MAME: noprw/nopr returns 0 for unrecognised ZN I/O addresses
- rtl/zn_sio.vhd:9 sec_select[2:0] = {data_write[7], data_write[3], data_write[2]} from BIOS write to 0x1FA10300: sec_select="000" (0x00: bit3=0,bit2=0) → BOTH chips active (wired-AND TXD) ← Tecmo BIOS sec_select="101" (0x84: bit7=1,bit3=0,bit2=1) → KN02 onl
- rtl/zn_sio.vhd:34 ZN security select (from zn1_io register 0x1FA10300) [2]=data[7], [1]=data[3], [0]=data[2]; ZNMCU when all three bits set ("111"=0x8C per MAME logic)
- rtl/zn_sio.vhd:50 Expected 0xFF per MAME exchange 0.
- rtl/zn_sio.vhd:51 Expected 0xAF per MAME psyforce exchange 8.
- rtl/zn_sio.vhd:57 MAME ground truth for BR2 Ex1 with et01 motherboard key: byte0 = 0xFF, byte3 = 0x0A.
- rtl/zn_sio.vhd:64 1-cycle strobe emitted ~50us after the ZNMCU is selected (and again after byte0), mirroring MAME znmcu_device's DSR line.
- rtl/zn_sio.vhd:75 tondemo runs its game-side CAT702 driver at JOY_BAUD=2 (~2 MHz, byte=16 clk) and bounds its I_STAT-bit7 poll to ~81 iterations; the old fixed DELAY1=1200 exceeded that budget, so every byte "timed out", the driver aborted (RX path itself wa
- rtl/zn_sio.vhd:209 ZNMCU state (MAME reference: src/mame/sony/znmcu.cpp znmcu_device) MAME protocol: select is active when (znsecsel & 0x8C) == 0x8C.
- rtl/zn_sio.vhd:224 The Taito FX-1 BIOS polls JOY_STAT bit7 for that pulse (BFC0B0A0..BFC0B11C) but falls through after a bounded 0x2710-iteration timeout and clocks the byte anyway, so the missing pre-byte pulse is non-fatal (verified via MAME debugger trace)
- rtl/zn_sio.vhd:231 While set, receive_valid/ack are asserted as LEVELS so that port-1 (JOY_CTRL bit13=0) transfers — sampled by joypad.vhd's internal baud engine ~JOY_BAUD*8 cycles after beginTransfer, long before this FSM's SNAC pulses at DELAY1 — still pick
- rtl/zn_sio.vhd:241 ===== PROPOSED FIX (Tecmo ZNMCU boot-hang) ===== MAME znmcu_device arms a 50us timer on select-active that drives DSR low (raising SIO0 IRQ7 / I_STAT bit7), then re-arms after each byte while the transferred byte index < databytes.
- rtl/zn_sio.vhd:244 In this core databytes is always 1 (standard digital mode, see header), so MAME emits exactly TWO DSR pulses per session: one on select (before byte0) and one after byte0 (before byte1).
- rtl/zn_sio.vhd:274 B123: capture KN02 byte at index 50 (= MAME's last).
- rtl/zn_sio.vhd:393 Per-chip CAT702 reset: mirrors MAME cat702_device::write_select(0).
- rtl/zn_sio.vhd:408 ZNMCU newly selected: mirrors MAME znmcu_device::select(0), which resets the bit/byte counters on the select-active edge (znsecsel write where bits 7,3,2 all become set, e.g. 0x8C).
- rtl/zn_sio.vhd:415 Mirrors MAME znmcu.select(0) arming the 50us DSR timer.
- rtl/zn_sio.vhd:436 ZNMCU mode (MAME src/mame/sony/znmcu.cpp): the response never depends on the TX byte, so unlike CAT702 it can (and must) be loaded immediately: port-1 transfers are consumed by joypad.vhd's internal baud engine within ~JOY_BAUD*8 cycles of
- rtl/zn_sio.vhd:441 byte0 = (databytes<<4)|(dsw&0xF) = 0x10|dsw[3:0] (standard mode, databytes=1 — znsecsel bits 4/5 not wired, see header) byte1..n = 0x00 (MAME m_send[] is zero-filled; bytes beyond databytes shift out 0 bits, NOT 0xFF)
- rtl/zn_sio.vhd:467 ZNMCU mode: sec_select="111" (0x8C, all bits set) activates ZNMCU per MAME znmcu.select((data & 0x8C) == 0x8C).
- rtl/zn_sio.vhd:518 51st event (first spurious after MAME's 50)
- rtl/zn_sio.vhd:550 MAME emits DSR before byte0 (armed on select) and before byte1 (armed here after byte0).
- rtl/zsg2.sv:5 MAME is cited in-file only as the behavioral ground-truth reference, not as a source of code.
- rtl/zsg2.sv:12 Implements MAME src/devices/sound/zsg2.cpp (0.277) behaviour.
- rtl/zsg2.sv:77 That error accumulated ~39 samples of skew every 2.4s against MAME, which is exactly the residual drift that made late-window correlation (+0.415) lag the early window (+0.854).
- rtl/zsg2.sv:86 MAME's (m_sample_count & 1): ramp every OTHER sample
- rtl/zsg2.sv:93 sample_phase is MAME's (m_sample_count & 1), i.e. parity of RENDERED SAMPLES.
- rtl/zsg2.sv:111 MAME emits its stream at EXACTLY the fixed rate.
- rtl/zsg2.sv:132 gain table: gain_tab[i] = 10^(-(31-i)/20) * 65535, gain_tab[0] = 0 (MAME zsg2.cpp:149-154).
- rtl/zsg2.sv:148 get_ramp(val): frac = ((sext12(val<<12) >> 12) ^ 8) << (val>>4); return frac>>4 (MAME zsg2.cpp get_ramp).
- rtl/zsg2.sv:154 MAME: ((int16_t(val<<12) >> 12) ^ 8) << (val>>4) — the >>12 is an ARITHMETIC shift, so the low nibble is SIGN-extended (0xC -> -4, not +12).
- rtl/zsg2.sv:161 ramp(current, target, delta) with directional clamp (MAME zsg2.cpp ramp)
- rtl/zsg2.sv:241 Regs 3/9/B return live internal state, everything else the raw register file (MAME chan_r).
- rtl/zsg2.sv:298 mix accumulators All four MAME mix accumulators.
- rtl/zsg2.sv:382 FS_MIXL -> FS_MIXR -> FS_RAMP is the only path into either state, nothing between them reads s_vol (FS_MIXR's dbg_vol capture is non-blocking and therefore still sees the PRE-ramp value, as MAME's log point requires), and no extra state is
- rtl/zsg2.sv:411 int16-truncated interpolation delta (MAME parity)
- rtl/zsg2.sv:617 key-on delta persists (MAME)
- rtl/zsg2.sv:636 MAME: fixed 0x0400 at key on
- rtl/zsg2.sv:706 MAME: page | cur_pos (page 23:16, pos 15:0)
- rtl/zsg2.sv:729 emphasis IIR over the 4 decoded samples (MAME filter_samples)
- rtl/zsg2.sv:743 MAME: sample += (uint16(step_ptr<<2) * int16(samples[pos+1] - sample)) >> 16 The delta is cast to int16_t, so it WRAPS when it exceeds 16-bit range.
- rtl/zsg2.sv:810 MAME ramps when (m_sample_count & 1).
- README.md:50 **MN10200 / ZSG-2 / TMS57002** — original FPGA re-implementations of the Taito Zoom sound board, developed with reference to MAME's hardware documentation.
- README.md:51 **The MAME project** — the hardware documentation and reference behavior used to develop the ZN-1 board support (per-manufacturer boot ROM, CAT702 security, ROM
- README.md:95 The FPGA logic is an original re-implementation of the ZN-1 board's behavior, developed from observation and from publicly available documentation and reference
- README.md:99 This core re-implements that logic for interoperability and preservation, in the same manner as MAME and comparable FPGA cores.
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 20
- ZN1.sv:367 Verified in MAME (raystorm, attract): the strobe arrives roughly every ~3s, comfortably inside the 5s window, so a faithful 5s timeout never fires during normal play.
- ZN1.sv:2072 The DL-1425 emits genuine full-scale 16-bit audio; in real gameplay (8-16 simultaneous PCM voices) its output reaches ~40-75% FS (verified against MAME's qsound HLE, derived from the same dl-1425.bin our jtdsp16 runs).
- rtl/gpu.vhd:1390 reset to 1023, matching real hardware (MAME: n_drawarea_x2=1023)
- rtl/gpu.vhd:1391 reset to 1023, matching real hardware (MAME: n_drawarea_y2=1023)
- rtl/gpu_cpu2vram.vhd:60 Cube CLUT is uploaded at copyDstX=256, copyDstY=482 (verified via MAME GP0 stream).
- rtl/memorymux.vhd:1298 ZN-1 has no CD-ROM: return 0xFF for reads (matches MAME open-bus), ignore writes
- rtl/mn10200.sv:21 The FSM may take any number of clk cycles per instruction; all on-chip timers and IRQ scheduling are expressed in `cyc`, so behaviour matches MAME regardless of the FSM's clock budget.
- rtl/mn10200.sv:36 0 == unmapped, matches MAME
- rtl/mn10200.sv:1521 Results and flag expressions are bit-identical to the original functions, including MAME's deliberately under-masked 32-bit result.
- rtl/taito_zoom_top.sv:12 Board glue around the three validated cores: rtl/mn10200.sv Panasonic MN1020012A sound CPU (A3, MAME-exact) rtl/tms57002.sv TMS57002 "DASP" effects DSP (B2, bit-exact vs MAME)
- rtl/taito_zoom_top.sv:15 rtl/zsg2.sv Zoom Corp ZSG-2 48-ch PCM (A2, bit-exact vs MAME)
- rtl/taito_zoom_top.sv:136 The DSP reads delay-RAM locations it has not yet written for the first ~0.75 s (the longest tap is ~24.5 k samples), so the delay line must START all-zero to match MAME's TMS_ZEROINIT golden.
- rtl/tms57002.sv:13 Ground truth: MAME src/devices/cpu/tms57002/ (tms57002.cpp + tmsinstr.lst as expanded by tmsmake.py) and the raystorm/gdarius2/ftimpcta golden captures in zoom_gt/tms_gt.
- rtl/tms_delay_m10k.sv:32 The DSP tolerates far more: Stage B2 proved the core bit-exact against the MAME golden at an injected latency of 8, and the microcode's 24 transfers/pass sit inside a 1040-clk sample period, so anything under ~32 is free.
- rtl/zn1_io.vhd:17 Input bit encoding for P1/P2 (active-low, matches ZN MAME driver):
- rtl/zn1_io.vhd:152 Board config register value (matches MAME zn_state::boardconfig_r): [7:5] = "011" → rev=1 (always for ZN-1) [3] = vmem (1=2MB, 0=1MB) — set by m_gpu->vram_size() in MAME [2] = smem (1=2MB SPU SGRAM) — MAME never sets this; left 0 [1:0]
- rtl/zn1_io.vhd:395 FIX (loading): toggle bit 3 of the zn2_spu_hack reg (0x1FA60000) exactly once per read (rising edge of read_en at that address), matching MAME's `m_zn2_spu_hack ^= 8` so the load's poll exits.
- rtl/zn_sio.vhd:271 build #119/120/121/122/123 diagnostics B119-121: verified KN02 bytes 1-4 = AF, 95, 94, 14 match MAME exchange 8 exactly B122: FPGA count=58 vs MAME=50 → 8 EXTRA KN02 byte events on FPGA.
- rtl/zsg2.sv:337 The channel DATAPATH (decode/emphasis/lerp/filter/mix) is UNCHANGED: the block bytes delivered to FS_DECODE for a given (page,cur_pos) are identical whether they came from a live fetch or the prefetch buffer, so channel output values stay b
- rtl/zsg2.sv:797 debug capture here = BEFORE the ramp, matching MAME's log point
MAMEから移植・書き写した、または取り入れたと記載 — 2
- rtl/mn10200.sv:12 Literal port of MAME src/devices/cpu/mn10200/mn10200.cpp, including MAME's 32-bit-wide (deliberately under-masked) D/A registers and its exact flag rules (do_add / do_sub / test_nz16 and the extended X flag set).
- rtl/zn1_io.vhd:432 build #117b: return full byte (MAME returns m_znsecsel verbatim)
MAMEの近似をそのまま採用 — 3
- rtl/zn1_io.vhd:106 MAME's zn2_spu_hack_r TOGGLES bit 3 (^=8) on every read; DoA++ (and likely other ZN titles) poll this register during the post-coin load waiting for that bit to change.
- rtl/zn1_io.vhd:111 Replicate MAME: return spu_hack_reg, toggling bit 3 once per read.
- rtl/zn1_io.vhd:395 FIX (loading): toggle bit 3 of the zn2_spu_hack reg (0x1FA60000) exactly once per read (rising edge of read_en at that address), matching MAME's `m_zn2_spu_hack ^= 8` so the load's poll exits.
MAMEドライバと同じ文言を含む(出典の明記なし) — 3