← コア一覧
Arcade-SegaSystem32Multi (zakk4223)
MAMEのドライバにない実基板の資料を引用 — 4
- README.md:59 | Scroll hardware | Sega schematics, sheet 2; Sega 315-5387 | Four tilemap layers and dual-port VRAM in [`s32_tilemap.sv`](rtl/video/s32_tilemap.sv) |
- README.md:61 | Colour/video output | Sega schematics, sheet 5; [315-5242 silicon evidence](https://github.com/furrtek/SiliconRE/tree/master/Sega/315-5242) | Palette, priorit
- README.md:62 | I/O, EEPROM, and OutRunners wheel vibration | Sega schematics, sheet 6; [OutRunners service manual](https://www.arcade-museum.com/manuals-videogames/O/Out-Run
- README.md:104 **Sega, Nemesis1207, and System 32 researchers** - original hardware and public schematic material.
「実機」で確認したと記載 — 1
- rtl/video/s32_mixer.sv:23 Shadow/blank on real silicon is output-enable gating into an analog resistor network (BEXU/BUBU signals), not a digital halving; MAME's `>>1` shadow model is a software abstraction of that already validated against real hardware over decade
MAMEのソースを引用 — 224
- Arcade-SegaSystem32Multi.sv:305 This is a model-consistency fix, not a turbo: the alternative consistent choice (both sides at 16.108 MHz) was measured to make Dark Edge's gameplay countdown advance every 70 frames against MAME's 35.
- Arcade-SegaSystem32Multi.sv:519 GA2's 315-5296 player ports follow MAME: {left,right,up,down,unused,button3,button2,button1}, active low.
- Arcade-SegaSystem32Multi.sv:534 The 24-count dead zone is below the MAME joystick's normal digital threshold and avoids centre jitter.
- Arcade-SegaSystem32Multi.sv:625 MAME's Attack and Brake inputs are active low while Wheelie is active high; map them to MiSTer's A/B/X buttons without touching the unused port bits.
- Arcade-SegaSystem32Multi.sv:651 Stadium Cross has three cabinet buttons in MAME (Attack/Wheelie/Brake), while MiSTer also exposes an assignable digital accelerator and the two handlebar pitch buttons above.
- Arcade-SegaSystem32Multi.sv:674 OutRunners routes PLAYER 1's music keys through the P2_A port (MAME INPUT_PORTS_START(orunners): P2_A bit0 = P1 DJ/music, bit1 = P1 track <<, bit2 = P1 track >>).
- Arcade-SegaSystem32Multi.sv:733 OutRunners is a two-cockpit cabinet: P2 gets its own wheel/pedal set on the second joystick's analog axes, read through the ADC's bank-1 slots (segas32.cpp in2_analog_read/in3_analog_read select m_analog_ports[bank*4+2/3] -- see the s32_msm
- Arcade-SegaSystem32Multi.sv:776 MAME system32_generic: port C is unused; port E/SERVICE12 is {unknown[7:6], start2, start1, coin2, coin1, test, service}, active low.
- Arcade-SegaSystem32Multi.sv:824 GA2's 4-player i8255 port C is MAME EXTRA3 (ppi.in_pc_callback -> "EXTRA3").
- Arcade-SegaSystem32Multi.sv:910 Second cockpit (Player 2, joystick_1): P1_B bits 1:0 = P2 shift up/down, P2_B bits 2:0 = P2 DJ/music + track <</>> (MAME INPUT_PORTS_START(orunners) P1_B/P2_B).
- Arcade-SegaSystem32Multi.sv:972 Original = the 4:3 arcade monitor (MAME's default for both 320- and 416-wide System 32 modes); the old 13:7 square-pixel ratio stretched holo's 320 mode.
- rtl/audio/s32_audio_mix.sv:5 Exact MAME route gains (segas32.cpp): cross-routed YM 0.15 + MultiPCM 0.35, divide by 20.
- rtl/audio/s32_multipcm.sv:4 Register, descriptor, pitch and PCM semantics follow MAME multipcm.cpp and gew.cpp (base class gew_pcm_device shared by the GEW family).
- rtl/audio/s32_multipcm.sv:5 This revision adds an envelope generator, LFO (vibrato/tremolo) and 12-bit packed-sample playback, all MAME-behavioural: no silicon reverse engineering exists for 315-5560, so every curve below is reconstructed from MAME's gew.cpp/gew.h (en
- rtl/audio/s32_multipcm.sv:12 Provenance notes for the tables/logic added in this revision: - Envelope generator: state_t {ATTACK,DECAY1,DECAY2,RELEASE} and the update/calc functions in gew.cpp (envelope_generator_update, envelope_generator_calc, get_rate).
- rtl/audio/s32_multipcm.sv:15 BASE_TIMES[64] and the attack/decay-release step-per-sample formulas (envelope_generator_init) are reproduced exactly, evaluated offline for a 44100 Hz-class per-voice update rate (HYPOTHESIS: this design's 224-ce-tick voice cadence, 28 slo
- rtl/audio/s32_multipcm.sv:23 - TL table: gew.cpp's per-level dB curve (-24dB over 64 steps) used to build m_left_pan_table/m_right_pan_table, taken as a standalone 128- entry linear gain table (TL_GAIN_ROM) here; the pan attenuation stays the pre-existing shift-based a
- rtl/audio/s32_multipcm.sv:27 - LFO: LFO_FREQ[8]/PHASE_SCALE_LIMIT[8]/AMPLITUDE_SCALE_LIMIT[8] and the m_pitch_table/m_amplitude_table piecewise-linear waveform generators in gew.cpp's lfo_init() are reproduced exactly.
- rtl/audio/s32_multipcm.sv:29 The depth (vibrato/ tremolo register bits 2:0) to linear-gain conversion is NOT MAME's raw powf()-derived 256-entry-per-depth table (2048 entries would be synthesis-heavy for a 28-voice multiplex); it is re-derived analytically from the sam
- rtl/audio/s32_multipcm.sv:39 Both are HYPOTHESIS-labelled approximations of MAME's exact float table, not bit-exact ports.
- rtl/audio/s32_multipcm.sv:41 - 12-bit sample fetch: gew.cpp's sound_stream_update() bit layout for format&4 (two 12-bit samples packed into 3 bytes) is reproduced exactly: read_byte(adr)<<8 | (read_byte(adr+1)&0xf)<<4 for the even sample, read_byte(adr+2)<<8 | (read_by
- rtl/audio/s32_multipcm.sv:92 s_env_vol is the raw EG_SHIFT=16 fixed-point volume accumulator (0..0x3ff<<16); s_env_gain is the EXP_VOL_ROM-converted linear gain (Q12, matching gew.cpp's m_linear_to_exp_volume) latched once per voice per output-sample tick and consumed
- rtl/audio/s32_multipcm.sv:152 The real 315-5560 runs a FIXED 224-clock sample frame (MAME models its stream at clk/224); ROM access is interleaved into that fixed slot schedule and can never stretch it.
- rtl/audio/s32_multipcm.sv:219 Envelope-generator rate tables (gew.cpp envelope_generator_init, called as envelope_generator_init(BASE_TIMES, 14.32833)).
- rtl/audio/s32_multipcm.sv:220 Values below are BASE_TIMES[64] evaluated through MAME's exact formula step[i] = (0x400<<EG_SHIFT) / (BASE_TIMES[i] * srate/1000) (attack) step[i] = (0x400<<EG_SHIFT) / (BASE_TIMES[i]*14.32833 * srate/1000) (decay/release
- rtl/audio/s32_multipcm.sv:229 m_linear_to_exp_volume: gew.cpp builds this as db = -(96 - 96*i/1024); exp_volume = 10^(db/20); table[i]=round(exp_volume*4096) for i = 0..1023, TL_SHIFT=12.
- rtl/audio/s32_multipcm.sv:234 TL_GAIN_ROM: gew.cpp's per-level total-level curve, -24dB over 64 steps (i.e. -0.375dB/step), i.e. gain(level) = 10^(level*-24/64/20); stored as a pure Q10 linear gain (1024 = unity) rather than MAME's pan-table-fused form, since this desig
- rtl/audio/s32_multipcm.sv:241 LFO_FREQ[8] phase-step-per-voice-tick (gew.cpp lfo_compute_step: step = LFO_FREQ[freq]*256/srate, LFO_SHIFT=8), evaluated for the assumed srate=44100 with 16 extra fractional bits (this design's choice, see s_lfo_phase comment above).
- rtl/audio/s32_multipcm.sv:247 PITCH_K_ROM: per-depth linear-in-cents coefficient reproducing gew.cpp's PHASE_SCALE_LIMIT[8]/128 * ln2/1200, Q24 fixed point (see file header LFO provenance note for the approximation this stands in for).
- rtl/audio/s32_multipcm.sv:426 MAME update_step: base=(1+pitch/1024), exponent=(signed octave-1).
- rtl/audio/s32_multipcm.sv:427 This RTL position uses sixteen fractional bits instead of MAME's TL_SHIFT.
- rtl/audio/s32_multipcm.sv:439 gew.cpp envelope_generator_calc: rate = (octave + key_rate_scale)*2 + pitch_bit9, unless key_rate_scale==0xf (key scaling disabled -> rate=0).
- rtl/audio/s32_multipcm.sv:462 gew.cpp get_rate(): val==0 -> step[0] (=0, infinite time); val==0xf -> step[0x3f] (fastest); otherwise clamp(4*val+rate_base, 0, 63).
- rtl/audio/s32_multipcm.sv:495 gew.cpp lfo_init(): m_pitch_table piecewise-linear triangle, stored as an offset+128 value 1..255 (so it can index a scale table built for i in -128..127); returned here already converted back to a signed -127..127 offset for direct use in
- rtl/audio/s32_multipcm.sv:561 MAME uses a 3 dB exponential step, represented here as the exact Q10 table.
- rtl/audio/s32_multipcm.sv:567 9..15 attenuate right using MAME's inverted distance.
- rtl/audio/s32_multipcm.sv:686 gew.cpp write(): key-off just sets envelope_gen.m_state=RELEASE; the voice keeps playing (s_active stays set) while the release rate ramps m_volume to zero, matching envelope_generator_update()'s RELEASE case which only clears m_playing at
- rtl/audio/s32_multipcm.sv:714 multipcm.cpp init_sample(): attack/decay1 in byte 8, decay2/decay_level in byte 9, key_rate_scale/release in byte 10 (release already latched above).
- rtl/audio/s32_multipcm.sv:750 gew.cpp retrigger_sample()+envelope_generator_calc: restart the envelope from ATTACK/vol=0 and recompute the key-scaled rate base.
- rtl/audio/s32_multipcm.sv:788 12-bit samples (gew.cpp sound_stream_update, format&4): even index -> {byte(adr), nibble(adr+1), 4'b0}; odd index -> {byte(adr+2), nibble(adr+1)[7:4], 4'b0}.
- rtl/audio/s32_multipcm.sv:1015 --- Envelope generator: one update per voice per output-sample tick, matching gew.cpp's envelope_generator_update() call cadence.
- rtl/audio/s32_soundsys.sv:217 MAME installs the Z80's 0xE000-0xFFFF onto the V60's 0x700000 window with 8-bit handlers on BOTH byte lanes and no umask16, so V60 byte k maps to Z80 0xE000+k (byte granularity, 8 KB mirror).
- rtl/audio/s32_soundsys.sv:247 RF5C68 removed: the real Multi 32 board carries one 315-5560 MultiPCM at this window and no RF5C68 (confirmed by physical board photos and MAME's device config).
- rtl/audio/s32_soundsys.sv:283 One YM3438: the real Multi 32 board carries a single YM3438 (physical board photos, MAME device config) -- port 0x90-0x9F is unmapped hardware, not a second FM chip.
- rtl/audio/s32_soundsys.sv:307 slot 3 = mask reg (MAME: m_sound_irq_control[3])
- rtl/audio/s32_soundsys.sv:310 only YM #1 wired (MAME)
- rtl/audio/s32_soundsys.sv:372 Stadium Cross drives both MultiPCM bank halves from the same three-bit latch (MAME scross_bank_w).
- rtl/audio/s32_soundsys.sv:389 MAME maps D0-D3 mirrored only at D4-D7.
- rtl/audio/s32_soundsys.sv:418 multipcm_device::read() always returns 0x00 in MAME -- the real 315-5560 register window is write-only.
- rtl/cpu/v60/s32_v60.sv:5 Behavioral contract is MAME's v60 core (BSD-3-Clause, Farfetch'd / R. Belmont): opcode dispatch per optable.hxx, addressing modes per am1-3.hxx, exception entry per v60.cpp.
- rtl/cpu/v60/s32_v60.sv:13 the fill/stop variants (MOVC*/CMPC*/SCHC*/SKPC*), TASI, bit ops, GETPSW/UPDPSW, TRAP/TRAPFL/BRK/BRKV, CHLVL, task save/load, privileged register moves (LDPR/STPR), and MAME-defined decimal/bit- string/bit-field groups.
- rtl/cpu/v60/s32_v60.sv:20 - Not implemented (reserved-instruction exception, logged in sim): the un-dispatched 0x5C/0x5F sub-opcodes (MAME UNHANDLED).
- rtl/cpu/v60/s32_v60.sv:21 MMU/TLB effects are absent like MAME, but CLRTLB still decodes its complete operand.
- rtl/cpu/v60/s32_v60.sv:31 V60/V70 reset PC (MAME m_start_pc; audit V60-21)
- rtl/cpu/v60/s32_v60.sv:129 PSW fields (MAME bit layout: Z=b0,S=b1,OV=b2,CY=b3,IE=b18,EL=b25:24,IS=b28)
- rtl/cpu/v60/s32_v60.sv:682 C-style truncating divide-by-8 of a signed bit offset (MAME bamoffset/8)
- rtl/cpu/v60/s32_v60.sv:772 stack switch on IS change, or EL change while IS=0 (MAME v60WritePSW)
- rtl/cpu/v60/s32_v60.sv:1015 dim 3 = qword (MOVD): the V60 steps autoincrement/ autodecrement by the full 8-byte operand (MAME v60 m_moddim==3).
- rtl/cpu/v60/s32_v60.sv:1212 primary dispatch (per MAME optable.hxx)
- rtl/cpu/v60/s32_v60.sv:1217 BRK — MAME skips this opcode (A4)
- rtl/cpu/v60/s32_v60.sv:1237 ---- Bcc disp8 (0x60-0x6a,0x6c-0x6f) / disp16 equivalent ---- 0x6B/0x7B are holes in MAME's authoritative primary dispatch table, not branch-condition encodings.
- rtl/cpu/v60/s32_v60.sv:1297 MAME opDBcc: reg ALWAYS decrements; branch iff cond true and decremented reg != 0.
- rtl/cpu/v60/s32_v60.sv:1403 JMP/JSR/TASI: MAME sets moddim=0 — the dim scales INDEXED modes' index register, and ga2's jump tables (3-byte BR entries, `JMP [PC+d](rN)`) rely on the unscaled index (found by real-ROM boot: dim=2 quadrupled the index and jumped mid-table
- rtl/cpu/v60/s32_v60.sv:1429 RETI adj (halfword, MAME moddim=1)
- rtl/cpu/v60/s32_v60.sv:1453 MAME F7a/F7b decode with dim 0 (0x58 byte) / 1 (0x5A half): autoincrement/indexed AMs step and scale by the element size, and F7b immediates size accordingly — not dword.
- rtl/cpu/v60/s32_v60.sv:1473 MAME implements ADDDC/SUBDC/SUBRDC/CVTDPZ/CVTDZP (radm timer); remaining subops are reserved there too.
- rtl/cpu/v60/s32_v60.sv:1562 Unhandled sub-opcodes still take the reserved-instruction vector exactly as MAME's op5C/op5F UNHANDLED entries fatalerror.
- rtl/cpu/v60/s32_v60.sv:1604 RSR (A9): pop PC ONLY (MAME opRSR: PC=[SP]; SP+=4)
- rtl/cpu/v60/s32_v60.sv:1609 MAME/NEC floating-exception test: enabled TKCW causes are intersected with the PSW floating-status field.
- rtl/cpu/v60/s32_v60.sv:1638 F12: plan operands per instflags (MAME F12DecodeOperands)
- rtl/cpu/v60/s32_v60.sv:1647 MOVEA takes op1 as an ADDRESS (MAME ReadAMAddress) — decoding it as a value loaded SP with a byte read instead of the EA and sent ga2's boot stub off a cliff (found by real-ROM boot)
- rtl/cpu/v60/s32_v60.sv:1756 The generic value path left flag1=0, so exec's memory-source branch dereferenced R0's VALUE as the qword address; OutRunners' boot RAM-clear (`mov.d R0,[R10+]` at 0x5AE, R0=0) then copied the reset-vector instruction bytes over 0x20E000+ in
- rtl/cpu/v60/s32_v60.sv:2290 MAME opDIVX/opDIVUX set only S/Z and leave OV unchanged; do not clear it.
- rtl/cpu/v60/s32_v60.sv:2322 MAME opROTC*: the carry bit enters the active operand's LSB; bits above a byte/halfword operand are not part of the ring.
- rtl/cpu/v60/s32_v60.sv:2609 pops (8) + frame-destroy operand (MAME: SP += amout), then the PSW write may bank-switch SP — order matters: adjust THEN switch.
- rtl/cpu/v60/s32_v60.sv:2651 push highest set register first (MAME pushes from r31 down?
- rtl/cpu/v60/s32_v60.sv:2699 TASI sets flags as SUBB(old, 0xFF, 0) before writing 0xFF (MAME opTASI).
- rtl/cpu/v60/s32_v60.sv:2736 R27 (dst) / R28 (src) updated at completion (MAME MOVSTR).
- rtl/cpu/v60/s32_v60.sv:2745 Element-size dim for both (MAME dim 0 byte / 1 half — see decode).
- rtl/cpu/v60/s32_v60.sv:2762 V60-15: down-direction search (subop[0]=1, MAME opSEARCHD*).
- rtl/cpu/v60/s32_v60.sv:2764 The down form scans the range in descending order from MAME's start index: byte reads op1+len1 down to op1 (len1+1 reads; the first read is one past the buffer, exactly as opSEARCHDB does), half reads op1+(len1-1)*2 down to op1 (len1 reads)
- rtl/cpu/v60/s32_v60.sv:2789 MOVCD/MOVCFD (down copy) transfers the ascending range base..base+min-1 in descending element order (MAME opMOVSTRD): start at the TOP of that range and decrement, instead of walking physically below the base as the old code did (audit R20
- rtl/cpu/v60/s32_v60.sv:2798 CMPCS (0x02): stop mode starts with CY=1, cleared when a fill (R26) byte is met in the compare (MAME opCMPSTR bStop).
- rtl/cpu/v60/s32_v60.sv:2801 CMPCF (0x01): fill the SHORTER operand's tail with R26 BEFORE the compare (MAME bFill); MOVC fill happens AFTER the copy.
- rtl/cpu/v60/s32_v60.sv:2830 Down exhaustion: the scan ran off the bottom to i=-1 (MAME opSEARCHD*), so Z=0, R27=0xFFFFFFFF, and str_src has already reached op1-step.
- rtl/cpu/v60/s32_v60.sv:2845 CMPC exhausted the common prefix (all min elements equal): R28=len1+min*step, R27=len2+min*step, and S/Z from the length compare (MAME opCMPSTR tail).
- rtl/cpu/v60/s32_v60.sv:2880 Z follows MAME's post-loop test i==len1: up never breaks at i==len1 (Z=0), down does so only at its one-past-the-top byte read (str_cnt==len1+1).
- rtl/cpu/v60/s32_v60.sv:2919 CMPC (MAME opCMPSTR): compare source(op1) vs dest(op2).
- rtl/cpu/v60/s32_v60.sv:3178 BAM: bit addressing modes for the 0x5B/0x5D groups (MAME BAMTable1/2 implemented subset — everything MAME fatalerrors on traps here too).
- rtl/cpu/v60/s32_v60.sv:3652 exception / interrupt entry (MAME v60_do_irq): switch to interrupt context, push old PSW, push PC, PC = vector
- rtl/cpu/v60/s32_v60.sv:3887 per-opcode dim helpers (operand sizes per MAME op12 handlers)
- rtl/cpu/v60/s32_v60.sv:3889 F12 ops whose FIRST operand is an effective address, not a value (MAME F12DecodeFirstOperand(ReadAMAddress, ...)): MOVEA and IN
- rtl/cpu/v60/s32_v60.sv:3910 NOTE: ROTH (8b) / ROTCH (9b) must NOT appear here — their op1 is the rotate COUNT, a byte (MAME ReadAM dim 0); listing them in the half group made `ROT.H #imm8, r6` decode one byte long and holo's EEPROM write loop entered mid-instruction (
- rtl/cpu/v60/s32_v60.sv:3948 These read op2 as a VALUE (MAME ReadAM), so a memory operand must be loaded into op2val before exec; otherwise the exec fell back to the effective address / a stale op2val (audit R20 V60-18).
- rtl/cpu/v60/s32_v60.sv:4034 MOVC completion (MAME opMOVSTRU*/opMOVSTRD*): publish R28/R27 for the final element index `idx`, and — for the fill variants (MOVCFU/MOVCFD) with the source shorter than the destination — kick off the R26 tail-fill phase.
- rtl/cpu/v60/s32_v60.sv:4057 MAME pads the destination tail elements [idx, lenop2) with R26; the down form uses op2+dest+(lenop2-j-1) for bytes and op2+(lenop2-j-1)*2 for halves.
- rtl/cpu/v60/s32_v60.sv:4138 MAME MOV sets no flags?
- rtl/cpu/v60/s32_v60.sv:4259 A zero count must clear CY (MAME); the old code left it unchanged (audit R20 V60-7).
- rtl/cpu/v60/s32_v60.sv:4286 MAME defines CY from the post-rotate wrap bit: LSB after a positive (left) rotate, MSB after a negative (right) rotate.
- rtl/cpu/v60/s32_v60.sv:4297 MAME clears CY for a zero count; nonzero counts retain the final shifted-out bit, so only bypass the iterative state for zero.
- rtl/cpu/v60/s32_v60.sv:4358 MAME divide-by-zero: destination unchanged and no trap, but Z/S are still set from the (unchanged) destination = the dividend, and OV is cleared (audit R20 V60-8); the old code left flags stale.
- rtl/cpu/v60/s32_v60.sv:4391 MAME sets OV and leaves the destination unchanged (audit R20 V60-8); the old code always cleared OV and wrote the wrapped quotient.
- rtl/cpu/v60/s32_v60.sv:4409 MAME opMULX/opMULUX leave OV unchanged
- rtl/cpu/v60/s32_v60.sv:4425 MAME: no zero-divide trap
- rtl/cpu/v60/s32_v60.sv:4497 MAME opCALL: SP-=4; [SP]=AP; AP=op2; SP-=4; [SP]=retPC; PC=op1.
- rtl/cpu/v60/s32_v60.sv:4534 MAME opTRAP: the operand's HIGH nibble is a Bcc-encoded condition (cond 0xB never traps); only trap when it evaluates true, else fall through.
- rtl/cpu/v60/s32_v60.sv:4784 SHA left-shift overflow (MAME SHIFTLEFT_OV op12.hxx): OV is set when the top `count` bits of the width-sized value are not all equal to the sign bit — i.e. a bit different from the sign is shifted out through the top.
- rtl/cpu/v60/s32_v60.sv:4786 MAME masks exactly `count` bits (((1<<count)-1) << (bitsize-count)); using count+1 here spuriously set OV (e.g. SHA.B #1,0x40 gave OV=1 vs MAME OV=0), misbranching a following signed Bcc (S^OV).
- rtl/cpu/v60/s32_v60.sv:4797 count > width: MAME's macro is UB here (bitsize-count<0); any nonzero value overflowed
- rtl/cpu/v60/s32_v60.sv:4873 MAME opMUL/opMULU: OV = (product >> width) != 0 on the product's unsigned bit pattern (signed product for MUL, unsigned for MULU).
- rtl/cpu/v60/s32_v60.sv:4875 For byte/half MAME shifts the 32-bit value; for word, the 64-bit one.
- rtl/cpu/v60/s32_v60.sv:4898 MAME clears OV for REM/REMU (audit R20 V60-8)
- rtl/cpu/v60/s32_v60.sv:4907 Behavioral contract is MAME op2.hxx/op5.hxx, which use host `float` — round-to-nearest-even, with gradual underflow (subnormals) and IEEE special values.
- rtl/cpu/v60/s32_v60.sv:4923 NEGFS/ABSFS are NOT: MAME does ReadAMAddress + store only (no load) — they operate on op1 and must not read a possibly read-sensitive destination.
- rtl/cpu/v60/s32_v60.sv:5099 Deliberate divergence from the pinned MAME for |n| > 30: MAME computes `appf * / (1 << n)` with the host's shift-count masking (&31, and 1 << 31 = INT_MIN there), so e.g. SCLFS(31) flips the sign and SCLFS(32) is a no-op on x86.
- rtl/cpu/v60/s32_v60.sv:5156 Pinned MAME converts (uint32_t)(int64_t)val on its x86 host: NaN and out-of-int64-range saturate the hardware convert to INT64_MIN, whose low 32 bits are 0.
- rtl/cpu/v60/s32_v60.sv:5179 MAME stores the LOW 32 BITS of the int64 truncation, not a clamp: well-defined in C for e in [31,62]; e >= 63 saturates the x86 convert to INT64_MIN (low 32 = 0).
- rtl/cpu/v60/s32_v60.sv:5190 (MAME: (_S && val>=0) || (!_S && val<=-1); |val| >= 1 here).
- rtl/cpu/v60/s32_v60.sv:5305 MAME materializes the subtraction: same-signed infinities give inf-inf = NaN, so they compare Z=0/S=0 like unordered operands.
- rtl/io/s32_io.sv:51 MAME device_reset: m_cnt = 0
- rtl/io/s32_io.sv:52 MAME device_reset: m_dir = 0
- rtl/io/s32_io.sv:56 Ports A-H = 0-7, CNT = 0xE, direction = 0xF (per MAME map).
- rtl/io/s32_io.sv:539 MAME WAIT_FOR_COMPLETION: CS ends it
- rtl/io/s32_io.sv:571 MAME's d7_r returns shift_register[7] before applying the side-effecting left shift.
- rtl/io/s32_io.sv:607 MAME interrupt_control_16_w: BOTH byte lanes are registers — even byte -> ctl[offset*2], odd byte -> ctl[offset*2+1] (ga2 programs vectors 0..4, the ack reg 7, and the timer highs 9/11 on both lanes; found by real-ROM boot: dropped acks mad
- rtl/io/s32_io.sv:669 MAME device_reset (memset(m_v60_irq_control,0xff)) leaves the pending byte (index 7) = 0xff -> all 5 sources pending, but ctl[6]=0xff below masks them so no IRQ is delivered until the game unmasks.
- rtl/io/s32_io.sv:681 MAME/device-reset contract: the complete 16-byte register file starts at FF.
- rtl/io/s32_io.sv:732 n == 0: MAME only re-arms `if (duration)` — the write stores the register byte and leaves an in-flight one-shot running.
- rtl/io/s32_io.sv:741 MAME/hardware: 0x100*N ticks at exactly 50 MHz/16.
- rtl/io/s32_io.sv:748 n == 0: register write only, armed one-shot keeps running (MAME parity — see timer 0 above).
- rtl/io/s32_io.sv:756 MAME int_control_r/hardware-visible readback
- rtl/mem/s32_fb_if.sv:6 Services (per DESIGN.md): - erase_line(y): fill line with 0xFFFF - write_run(...): pixel run writes from the sprite renderer; wr_shadow runs RMW dest &= 0x7fff instead (MAME shadow sprites clear framebuffer bit 15) - read_line(y):
- rtl/s32_core.sv:12 In a captured pre-fix Dark Edge build, running both sides from ce_cpu made its displayed gameplay countdown advance every 70 frames instead of MAME's measured 35-frame writes to 0x20a112 at PC 0x087080, consistent with alternate VBlank work
- rtl/s32_core.sv:282 IS_V70=1: the real chip is a NEC D70632R-20 (V70), confirmed by physical board marking and MAME device config, not a V60.
- rtl/s32_core.sv:288 MAME reset PC (audit R20 V60-21)
- rtl/s32_core.sv:318 MAME's regular System 32 map exposes the communication-board CN and FG flip-flop registers at 0x801000/0x801002.
- rtl/s32_core.sv:319 They are byte registers, not open-bus locations: reset reads 0xFE from both, CN stores bit 0, and FG stores bit 0 only while CN is enabled (s32comm.cpp).
- rtl/s32_core.sv:327 MAME's I/O mirrors ignore A19:A7 (System 32) or A18:A7 (Multi 32).
- rtl/s32_core.sv:361 OutRunners uses neither -- MAME's init_orunners() installs no protection -- so port B is tied inactive rather than carried as dead arbitration logic.
- rtl/s32_core.sv:670 The sprite engine keeps its own width bit (ctl_latched[6][0]) for sprite-side clipping, exactly MAME's split (games program both consistently).
- rtl/s32_core.sv:945 The regular-PCB machine config instantiates S32COMM (MAME segas32_regular_state::device_add_mconfig), so this window behaves as byte-wide RAM even with no link partner: a game that writes then reads the share area must read its own data bac
- rtl/s32_core.sv:949 Only D[7:0] is mapped (MAME maps 0x800000-0x800fff share_r/w with umask16 0x00ff); the cn/fg link registers at 0x801000/2 retain their disconnected-link status semantics, and the rest of the 0x80xxxx page reads link-not-connected (0xFFFF).
- rtl/s32_core.sv:989 MAME's s32comm cn_w(0) invokes device_reset(), clearing FG too.
- rtl/s32_core.sv:1015 MAME wires DO to bit 7 of BOTH SERVICE34_A and SERVICE34_B on Multi 32 (segas32.cpp INPUT_PORTS_START(system32_generic)'s SERVICE34_A base definition is inherited unmodified by multi32_generic, and SERVICE34_B carries its own identical do_r
- rtl/s32_core.sv:1032 Multi 32 EEPROM DO is read on the SECOND I/O chip's SERVICE34_B bit 7 (MAME io_chip_1.in_pf = SERVICE34_B, do_read on bit 7); previously io1 got constant 0xff there, so Multi 32 NVRAM boot never converged (audit R23-F1).
- rtl/s32_core.sv:1037 cnt1 = screen-B display enable (MAME io_chip_1 out_cnt1 -> display_enable_w<1>).
- rtl/s32_core.sv:1080 MAME wires only ADC channels 2/3 through the 4053 bank mux (sega_multi32_analog_state::in2_analog_read/in3_analog_read, m_analog_ports[bank*4+2/3]); channels 0/1 are fixed to ANALOG1/ANALOG2 (adc.set_input_tag<0/1>) regardless of bank.
- rtl/s32_core.sv:1124 OutRunners is unprotected hardware (MAME's init_orunners() installs no protection responder) and Multi 32 has no V25 MCU (that chip is exclusive to Golden Axe: Revenge of Death Adder / Arabian Fight's standard-board revision).
- rtl/s32_core.sv:1214 MAME: map(0xf00000, 0xffffff).rom().region("maincpu", 0) — the top window mirrors the FIRST megabyte (the V60 reset stub at 0xFFFFF0 lives at maincpu offset 0xFFFF0).
- rtl/s32_core.sv:1293 MAME returns machine().rand() (full-width, uncorrelated).
- rtl/s32_core.sv:1336 MAME s32comm returns 0xFE | CN for CN and 0xFE | FG for FG with the unconnected ZFG held low; only the rest of 0x80xxxx remains open bus.
- rtl/s32_core.sv:1354 0xA00000-0xAFFFFF (V25/protection window) is open-bus: OutRunners has neither (MAME leaves this range unmapped, audit R20 PF-7).
- rtl/s32_core.sv:1361 MSM6253 serial output is wired to D7, not D0 (MAME msm6253 d7_r); audit R20 IO-3.
- rtl/s32_pkg.sv:92 MAME mirrors the controller's 2-bit bank selection modulo that physical count.
- rtl/video/s32_mixer.sv:9 This module implements MAME mix_all_layers' effective-priority scheme evaluated directly per pixel: - first = topmost non-transparent layer (the winner) - second = the scan continued below the winner (blend partner) - blend = (first*(7-f)
- rtl/video/s32_mixer.sv:23 Shadow/blank on real silicon is output-enable gating into an analog resistor network (BEXU/BUBU signals), not a digital halving; MAME's `>>1` shadow model is a software abstraction of that already validated against real hardware over decade
- rtl/video/s32_mixer.sv:29 That is a board-to-connector question the M71064 Verilog itself cannot answer (its internal R/G naming is self-consistent either way) and MAME's channel order -- which this mixer follows -- is the higher-confidence source absent a real-hard
- rtl/video/s32_mixer.sv:84 MAME video_start memsets mixer_control to 0xFF: unwritten registers read 0xFFFF, giving priority 0xF.
- rtl/video/s32_mixer.sv:137 sprite pixel semantics (MAME mix loop, exactly): transparent when (pix & 0x7fff) == 0x7fff (covers 0xFFFF erase + 0x7FFF) shadow source a: bit15 CLEAR when reg 0x4C bit2 set (RMW shadow sprites) shadow source b: masked pen == sprshadow (0x7
- rtl/video/s32_mixer.sv:168 A layer pixel is a mix candidate only when drawn (bit13, "opaque") and its layer's programmed priority is nonzero — plain MAME mix_all_layers semantics.
- rtl/video/s32_mixer.sv:188 disabled layers never mix (MAME enablemask) — a disabled layer's line buffer keeps stale pixels, so it must be gated here
- rtl/video/s32_mixer.sv:271 backdrop pixel (MAME update_background): per line.
- rtl/video/s32_mixer.sv:363 MAME uses the raw pixel-derived group for the per-layer sprite blend mask.
- rtl/video/s32_mixer.sv:368 shadow applies when the scan passes the sprite layer's order slot: scan 1 (always): sprite at/above the winner scan 2 (only when the winner has blends): sprite below winner, at/above the partner — MAME's second loop re-evaluates shadow iden
- rtl/video/s32_mixer.sv:400 MAME reads mixer control once per frame, after the frame is complete.
- rtl/video/s32_mixer.sv:472 pixel pipeline: two palette lookups per pixel, then MAME's 5-bit-domain arithmetic.
- rtl/video/s32_mixer.sv:513 This is the standard pal5bit expansion used by MAME: replicate the upper three bits into the low three bits so 5'b11111 becomes 8'hff (not 8'hf8).
- rtl/video/s32_mixer.sv:521 MAME applies signed color offsets before blending and clamps only after the weighted sum.
- rtl/video/s32_mixer.sv:661 With the bubble a pixel took 13 clk_ram edges from the display-X change — one more than the 12-edge 416-wide pixel period — so the display sampled the previous pixel and the whole 416-wide picture came out one column right of MAME.
- rtl/video/s32_mixer.sv:686 Preserve MAME's order: offset, blend, then shadow.
- rtl/video/s32_palette.sv:60 Disabled bits therefore remain from each half's own old word (MAME paletteram_w), rather than being copied from the source half.
- rtl/video/s32_splitscreen_composer.sv:34 Still no MAME/Verilator differential regression on the full core with Splitscreen enabled, and no hardware verification.
- rtl/video/s32_sprite.sv:79 MAME m_sprite_render_count (0/1)
- rtl/video/s32_sprite.sv:120 MAME exposes only selected-buffer bit 0.
- rtl/video/s32_sprite.sv:122 MAME reg 0 bit0 = (SPRITES.num < SPRITES_2.num): reads 1 at power-up (6<8) and toggles to 0 after the first swap — the exact complement of the internal displaying-buffer selector, which resets to 0 and reads 1 after the first swap.
- rtl/video/s32_sprite.sv:163 MAME's controller model bounds a frame to the 0x20000-byte sprite RAM divided by one 16-byte command (8192 commands).
- rtl/video/s32_sprite.sv:197 MAME controller model uses 16.16 zoom
- rtl/video/s32_sprite.sv:200 wide MAME int-domain origin; no 12-bit wrap
- rtl/video/s32_sprite.sv:204 The MiSTer SDRAM port is the only part of the Golden Axe sprite path that cannot be reproduced by the cycle-exact MAME/RTL replays.
- rtl/video/s32_sprite.sv:225 MAME visits every word even if strong downscale emits no pixel from it.
- rtl/video/s32_sprite.sv:247 Scaling setup is not on the pixel-rate path, so share one restoring divider across Y then X. The 25-bit numerators preserve MAME's unsigned 16.16 controller math.
- rtl/video/s32_sprite.sv:267 MAME transparency_masks[ctl4 & 3][ctl5 & 3]
- rtl/video/s32_sprite.sv:336 MAME never misses because its render is instantaneous.
- rtl/video/s32_sprite.sv:364 Automatic mode uses MAME's 0/1 down-counter exactly, including mode changes between 60 Hz and 30 Hz.
- rtl/video/s32_sprite.sv:373 audit R20 SP-2: on the 30Hz skip frame MAME leaves m_sprite_control[0] untouched (m_sprite_render_count-- != 0), so a CPU-written manual command still executes.
- rtl/video/s32_sprite.sv:519 MAME: bit12 of word0 gates clip-in (words 0-3: y0,y1,x0,x1 sext12); bit13 gates clip-out (words 4-7)
- rtl/video/s32_sprite.sv:528 MAME changes clip-out only when bit 13 is set.
- rtl/video/s32_sprite.sv:553 MAME uses int arithmetic after sign-extending both 12-bit values.
- rtl/video/s32_sprite.sv:606 MAME: entry & (bpp8 ?
- rtl/video/s32_sprite.sv:614 Flip reverses the DESTINATION sweep while the source reads forward (hardware/MAME model) — end codes and word transparency track source order regardless of flip.
- rtl/video/s32_sprite.sv:648 MAME applies latched controller flip while scanning the displayed sprite framebuffer.
- rtl/video/s32_sprite.sv:726 MAME consumes m_spriteram_32bit MSB-first.
- rtl/video/s32_sprite.sv:771 MAME clips the trailing xtarget before its source loop.
- rtl/video/s32_sprite.sv:784 This keeps end_scan_word out of the 96.6 MHz cache/mux path while preserving MAME's sequential end-code scan.
- rtl/video/s32_sprite.sv:871 MAME: first/last pixel of each 32-bit word uses transp (0x0f/0xff, or 0 when opaque); middle pixels use 0.
- rtl/video/s32_tilemap.sv:2 System 32 scroll/tilemap engine — 315-5387 (DESIGN.md §6.2, Appendix C) Renders one scanline of each enabled layer into per-layer line buffers: NBG0/1: MAME-exact 12.20 X/Y zoom and fractional scroll ($1FF10-1E, $1FF50-56, 0x200=1.0) NBG2/3
- rtl/video/s32_tilemap.sv:63 to the mixers (MAME enablemask, inverted)
- rtl/video/s32_tilemap.sv:66 layer enable logic: $1FF02 low bits + $1FF8E second disable set (+ $1FF00 bits 12/13 disable NBG2/NBG3 — MAME update_tilemaps)
- rtl/video/s32_tilemap.sv:100 MAME source coordinate/step, 12.20 modulo 2^32
- rtl/video/s32_tilemap.sv:111 MAME's update_tilemap_rowscroll (segas32_v.cpp) hoists exactly these out of its inner loop: `xscroll`/`yscroll` and the flip flags are computed once for the layer, and each row resolves its effective source Y and its pair of page pixmaps (`
- rtl/video/s32_tilemap.sv:143 NBG0/1 use MAME's exact (0x200 << 20)/zoom calculation on both axes.
- rtl/video/s32_tilemap.sv:208 layer clip windows (MAME compute_clipping_extents, per-pixel form): rect i = clips[4i..4i+3] = {min_x[8:0], min_y[7:0], max_x[8:0], max_y[7:0]} (max inclusive); pixel drawn iff !enable | (inside-union ^ clipout)
- rtl/video/s32_tilemap.sv:242 Text layer name address: MAME's get_text_tile_info uses the full five-bit page selector $1FF5C[8:4] (<<11 words).
- rtl/video/s32_tilemap.sv:349 MAME uses zoom X for both axes unless independent Y zoom is selected by $1FF00 bit 14.
- rtl/video/s32_tilemap.sv:352 MAME treats the destination center as signed 9-bit at neutral zoom and signed 10-bit whenever that axis is zoomed.
- rtl/video/s32_tilemap.sv:433 V-2 (MAME update_tilemap_zoom): exact 12.20 reciprocal step, with destination zoom floored at 0x80.
- rtl/video/s32_tilemap.sv:575 MAME 0.289 keeps that reading permanently disabled, and Title Fight proves it on hardware: the game holds $1FF8E=$0C00 while the ring floor is the per-line backdrop; an opaque NBG2/NBG3 pen 0 would bury the floor under CRAM[$1800]=black (re
- rtl/video/s32_tilemap.sv:676 ---- bitmap layer (MAME update_bitmap) ---- 4bpp: 512x512, row = 128 words, y wraps 9 bits 8bpp: 512x256, row = 256 words, y wraps 8 bits color = (reg 0x1FF8C << 4) masked above the pen bits
- rtl/video/s32_tilemap.sv:776 Each quotient takes 30 clocks and truncates toward zero exactly like MAME's unsigned integer division.
- rtl/video/s32_vram.sv:143 register file powers up 0 (Cyclone V flops); $1FF00 gets the MAME device_start default.
- rtl/video/s32_vram.sv:146 416-wide default (MAME device_start)
- README.md:70 **OutRunners (World):** MAME set `orunners`
- README.md:71 **OutRunners (US):** MAME set `orunnersu`, parent `orunners`
- README.md:72 **OutRunners (Japan):** MAME set `orunnersj`, parent `orunners`
- README.md:73 **Title Fight (World):** MAME set `titlef`
- README.md:74 **Title Fight (US):** MAME set `titlefu`, parent `titlef`
- README.md:75 **Title Fight (Japan):** MAME set `titlefj`, parent `titlef`
- README.md:76 **Hard Dunk (World):** MAME set `harddunk`
- README.md:77 **Hard Dunk (Japan):** MAME set `harddunkj`, parent `harddunk`
- README.md:78 **Stadium Cross (World):** MAME set `scross`
- README.md:79 **Stadium Cross (US):** MAME set `scrossu`, parent `scross`
- README.md:106 **MAME developers** - [System 32/Multi 32 behavioural reference](https://github.com/mamedev/mame).
- README.md:117 Intel Quartus, Verilator, Icarus Verilog, ModelSim, and MAME tool authors.
- README.md:134 Place the required MAME ROM ZIPs in `/media/fat/games/mame/`, then launch a game from the MiSTer Arcade menu.
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 10
- Arcade-SegaSystem32Multi.sv:591 p_dig4 matches the MAME byte layout exactly: buttons 1..4 occupy bits 0..3 and the 8-way directions occupy bits 4..7.
- Arcade-SegaSystem32Multi.sv:766 Channel layout matches MAME's fixed ANALOG1/2 + banked ANALOG3/4 (bank 0) and ANALOG7/8 (bank 1) -- see the s32_msm6253 instantiation comment.
- rtl/audio/s32_multipcm.sv:510 gew.cpp lfo_init(): m_amplitude_table, unipolar triangle 0..255 (tremolo only ever attenuates, matching AMPLITUDE_SCALE_LIMIT being <=0 in MAME).
- rtl/cpu/v60/s32_v60.sv:17 - Single-precision FP (0x5C/0x5F: CMPF/MOVFS/NEGFS/ABSFS/SCLFS/ADDFS/SUBFS/ MULFS/DIVFS/CVTWS/CVTSW): a binary32 unit (round-to-nearest-even, gradual underflow) matching MAME's host-float contract; no System 32 game uses it.
- rtl/cpu/v60/s32_v60.sv:2941 Equal AND matches the stop byte: MAME clears CY and breaks; S/Z stay 0 (i != dest), R28/R27 at the current index.
- rtl/cpu/v60/s32_v60.sv:4798 1 <= count <= width: exact MAME SHIFTLEFT_OV mask (count==width uses the full-width mask, matching MAME's count==bitsize case, e.g. SHA.B #8,-1 -> OV=0)
- rtl/io/s32_io.sv:30 Matches MAME 315_5296.cpp read()/write() in MAME's 315_5296 device.
- rtl/s32_core.sv:668 TM-1: CRT/tilemap screen-width authority is VRAM $1FF00 bit 15, matching MAME screen_update_system32 / multi32_update, which set the visible area to 52*8 (416) when that bit is set and 40*8 (320) otherwise.
- rtl/s32_core.sv:1065 Power up at bank 0 to match MAME device_start (m_analog_bank = 0); System 32 analog games never write 0xC00060 so it would otherwise stay X in simulation and undefined at cold boot (audit R20 IO-15).
- rtl/video/s32_sprite.sv:710 Repack each pair to the same byte layout as a sprite-ROM burst (matching the 315-5386/MAME controller model).
MAMEドライバと同じ文言を含む(出典の明記なし) — 7