← コア一覧
Klax
MAMEのドライバにない実基板の資料を引用 — 45
- Klax.sv:259 Leaving self-test resetting the game is authentic, not a defect: the test code stops petting the watchdog, the LS197 @5B bites and reboots the board.
- rtl/klax_addr_decode.v:7 Transcribed from the DUMPED production decode PAL: GAL16V8 136075-1000 at 11C (136075-1000.11c.bin, jedutil) feeding the 74F138 at 11B (schematic Sheet 3).
- rtl/klax_addr_decode.v:9 The schematic draws a 24-pin PAL20L10 at 11C, but Sheet 3 notes "USE 16L8 IF SLAPSTIK IS NOT USED" — production Klax has no slapstic, and the 16L8-class GAL at 11C is exactly what MAME dumped.
- rtl/klax_addr_decode.v:24 MA16 sub-selects color RAM (0x3E pages, /CTIME path, F257 @5N) vs the single 8Kx16 video RAM (2X/2Y).
- rtl/klax_addr_decode.v:89 74F138 @11B: Y = {SELC,SELB,SELA} pin levels.
- rtl/klax_addr_decode.v:108 /VRAM sub-decode (video side, Sheets 4/5/8): MA16=0 -> color RAM (/CTIME = MA16 during the CPU slot, F257 @5N) MA16=1 -> 8Kx16 video RAM; chip select VRA14=MA14, MA15 unused.
- rtl/klax_audio_filter.v:5 Klax Analog Audio Output Filter (board-level, Sheet 4)
- rtl/klax_audio_filter.v:7 The MSM6295 @14D drives a 6779.44 Hz zero-order-hold DAC.
- rtl/klax_audio_filter.v:14 SILICON REFERENCE - Klax schematic package, Figure 5-1 Sheet 4 of 9 (the sheet spans two pages: MSM6295 + first stage, then the rest):
- rtl/klax_cpu_bus.v:12 DTACK (schematic Sheet 2): every bus cycle COMPLETES on real hardware — there is no such thing as a stalling unmapped access.
- rtl/klax_cpu_bus.v:13 The LS163A at 10B (clock RCLOCK = the 7.16 MHz pixel/CPU clock, sync-cleared while BAS is idle) loads {D,C,B,A} = {+5V, PVCPU|/VRAM, /PCM, /EEPROM} once per cycle (LD/ENP self-sequenced from QD) and counts to 15; RCO -> DTACK -> /DTACK.
- rtl/klax_cpu_bus.v:23 PVCPU comes from the VRAM arbitration state machine: the dumped 9W GAL (136075-1003 "MOBL2", registered at 14.318 MHz) generates the pre-VAS slot code from the H-counter phase; PVCPU = PVAS0 & PVAS1 & VREQ (LS11 @10U), VREQ = NOR(DTACK, /VR
- rtl/klax_cpu_bus.v:31 Interrupt acknowledge: VPA = NAND(BAS,FC2,FC1,FC0) (F20 @9B) asserts combinationally during an IACK cycle, while DTACK needs at least one RCLOCK edge — VPA always wins the race and the 68000 autovectors.
- rtl/klax_cpu_bus.v:119 Input mapping (schematic Sheet 5 + the 6W dump for the markers): i2=VREQ i3/i4/i5=1H/2H/4H (SOS hcnt bits = (hc+12) mod 8) i6=RCLOCKB i7=HBLANK (hc>=336) i8=NXL^NXLDL line-boundary marker i9=/PFHST (low hc 430..445, from the dumped 6W /P
- rtl/klax_cpu_bus.v:199 Combinational PVAS outputs (o13/o18) at the RCLOCK sample point (tick0 inputs: i6=0, i8=nxlmark_t0) and PVCPU (LS11 @10U).
- rtl/klax_cpu_bus.v:212 LS163A @10B wait-state counter (RCLOCK cadence).
- rtl/klax_irq.v:7 Schematic Sheets 5 and 2: an LS74 at 5K with D = P = +5V, clocked by CK = VBLANK | ~32V (LS32 @10N + LS04 @9N), cleared by /VACK (the 0x360000 write).
- rtl/klax_irq.v:9 /Q = /VINT drives IPL2 through the LS08 @7B (the other input is the pulled-up /SINT from the unstuffed AUX connector); IPL1/IPL0 are tied high, so /VINT is IRQ level 4.
- rtl/klax_palette.v:7 Silicon (schematic Sheet 8): one 2Kx8/35 SRAM at 11J holds TWO banks of 512 IRGB_1555 entries.
- rtl/klax_playfield.v:190 Silicon DAC truth (schematic Sheet 9): each channel is a 6-bit R/2R ladder whose LSB is the shared intensity bit — channel = {color5, I}.
- rtl/klax_sys.v:174 VPA = NAND(BAS,FC2,FC1,FC0) on the board (F20 @9B), so the CPU autovectors; klax_cpu_bus suppresses DTACK for these cycles.
- rtl/klax_sys.v:276 === Output Latch (0x260000 write) === Documented in the Klax manual memory map (Figure 5-2, "LATCH").
- rtl/klax_sys.v:294 Silicon notes (schematic Sheet 2): the latch is an LS174 at 2A clocked by /LATCH = R//W | /PAR — i.e. ANY write anywhere in the 0x26 page (P1 and P2 word addresses alike) clocks it, so the strobe below covers cs_input_p1 and cs_input_p2.
- rtl/klax_sys.v:301 D13 = CBANK, the color-RAM bank select (color RAM A9, Sheet 8) — routed to the palette below; the game never sets it.
- rtl/klax_sys.v:320 === OKI MSM6295 ADPCM Sound === u_oki is the chip (bit-exact vs MAME); u_audio_filter is the board's analog output stage around it (Sheet 4).
- rtl/klax_sys.v:346 === Analog output filter (LM324 18C sections, Sheet 4) === 5-pole low-pass between the DAC pin and the speaker: -3 dB at 790 Hz, -49.6 dB at the 6779.4 Hz first image.
- rtl/klax_sys.v:358 === EEPROM === sys_reset: the write-unlock latch (LS74 @5K) is cleared by /SYSRES on the PCB, so a watchdog bite re-locks it.
- rtl/klax_top_mister.v:137 The SOS-2 custom chip (9Y) emits the 1H..256H counter taps; the 6W PAL decodes /PHSYNC = hc 352..379 (28 px) and HBLANK (336 visible).
- rtl/klax_top_mister.v:141 VSYNC/VBLANK are generated inside the SOS-2 custom chip (not in any dumped PAL), so exact placement needs a scope capture.
- rtl/klax_top_mister.v:145 The PCB delays it through the LS174 @17K (2H clock, R102 tap = stage 3 stuffed, Sheet 8) before the monitor: +10 px.
- rtl/klax_top_mister.v:654 Silicon DAC truth (schematic Sheet 9): 6-bit R/2R ladder per channel, LSB = the shared intensity bit ({color5, I}); MAME's IRGB_1555 decoder is identical (pal6bit((c << 1) | i)).
- rtl/klax_watchdog.v:7 Schematic Sheet 2: an LS197 4-bit counter at 5B clocked by VBLANK (QA ripples into CK2), with data inputs {D,C,B,A} = {+5V,GND,GND,GND}, count/load pin driven by /WDOG (the 0x2E0000 write, gated by the WDIS service jumper), async /CLR = POW
- README.md:8 It was built from the PCB schematics and the dumped on-board PALs, with MAME as a cross-reference rather than as the specification.
- README.md:133 What makes this core worth having is how much of it came off the schematics and the dumped PALs rather than out of an emulator:
- README.md:138 A production board makes that concrete: 11C carries a 20-pin GAL sitting in the 24-pin socket the documentation draws, and both the slapstic socket at 9E and th
- README.md:148 **Every bus cycle completes.** DTACK comes from the LS163A at 10B, loaded from the decode: 0 wait states by default, +1 for EEPROM, +2 for the OKI, and 0-or-4 f
- README.md:151 IACK is handled too — `VPA` from the F20 at 9B always beats DTACK.
- README.md:153 **IRQ from the LS74 at 5K**, clocked by `VBLANK | ~32V` and cleared by `/VACK`, giving IRQ4 at scanlines 64, 128, 192 and 240 only.
- README.md:157 **LS197 watchdog at 5B**, fully modelled including its power-on state: it clears to 0, which holds the board in reset for 8 frames before the game starts.
- README.md:173 **DAC-exact colour.** Sheet 9 is a 6-bit R/2R ladder per channel whose LSB is a shared intensity bit, so the output follows the ladder rather than a naive bit e
- README.md:178 **JAMMA-accurate HSync.** `/PHSYNC` from the dumped 6W PAL is delayed through the LS174 at 17K — only the stage-3 tap is stuffed — for +10 pixels, putting monit
- README.md:183 **OKI MSM6295 ADPCM** decoding that is bit-exact against a MAME-0.288 golden model, plus — unlike MAME, which models none — the PCB's **analog audio output filt
- README.md:209 It appears in no dumped PAL, so it needs a scope capture on the 9Y VSync pin.
- README.md:230 | Address decode, DTACK, IACK | Dumped GAL equations transcribed and replicated, then exercised by the real 68000 core in simulation | Reset-vector fetch throug
- README.md:237 | Analog audio filter | Against a golden model re-derived from the Sheet 4 component values. The generator also asserts that the coefficient literals in the RTL
MAMEのドライバにもある実基板の情報・測定値を引用 — 7
「実機」で確認したと記載 — 1
- README.md:213 Production boards leave that socket empty — verified on hardware — so it is not implemented.
MAMEとの相違点を記載 — 5
- Klax.sv:261 MAME cannot reproduce that at all - its Klax watchdog is instantiated but never enabled, so MAME gets stuck in self-test forever (verified: frames 699-1900 byte-identical).
- rtl/klax_addr_decode.v:15 Headline hardware facts modeled here (all differ from MAME's klax_map): - MA22/MA23 reach no decoder: the whole map MIRRORS x4 across the 24-bit space (only cpu_addr[21:0] participates below).
- README.md:10 Where the two disagree, the silicon wins — so a few behaviours here deliberately differ from MAME.
- README.md:96 MAME cannot reproduce this, because its Klax watchdog is never enabled.
- README.md:183 **OKI MSM6295 ADPCM** decoding that is bit-exact against a MAME-0.288 golden model, plus — unlike MAME, which models none — the PCB's **analog audio output filt
MAMEのソースを引用 — 52
- Klax.sv:7 Debuted 1989; MAME dates every set 1990 from the ROMs' own internal build stamps (parent set: 13FEB1990 11:10:09), and the MRAs follow.
- Klax.sv:232 JAMMA "Button 2" is an alternative pin, not a second function, which is why MAME declares only BUTTON1 per player.
- rtl/klax_addr_decode.v:9 The schematic draws a 24-pin PAL20L10 at 11C, but Sheet 3 notes "USE 16L8 IF SLAPSTIK IS NOT USED" — production Klax has no slapstic, and the 16L8-class GAL at 11C is exactly what MAME dumped.
- rtl/klax_cpu_bus.v:39 MAME differs on both counts (no wait states, unmapped reads return 0) — silicon over MAME.
- rtl/klax_eeprom.v:8 MAME map: 0x0E0000-0x0E0FFF, .umask16(0x00ff) 0x1F0000-0x1FFFFF write unlock
- rtl/klax_inputs.v:8 P1 bit 11 is the active-high screen vblank status line from MAME's P1 port definition.
- rtl/klax_inputs.v:11 MAME reference: klax.cpp input_ports, P1/P2 definitions.
- rtl/klax_irq.v:22 MAME divergence (intentional, silicon over MAME): MAME's scanline timer (klax.cpp scanline_update, every 32 lines, "(scanline & 32) == 0 && !vblank") fires an EXTRA IRQ4 at scanline 0 that the real circuit cannot generate.
- rtl/klax_mob_ram.v:7 CPU-visible storage from the MAME Klax map: 0x3F0F80-0x3F0FFF: Motion object SLIP RAM, 128 bytes / 64 words 0x3F2000-0x3F27FF: Motion object RAM, 2 KB / 1024 words
- rtl/klax_motion_objects.v:23 mame/sprite.h draw_async() — sprite bitmap sized to the
- rtl/klax_motion_objects.v:25 mame/klax.cpp s_mob_config — all field masks; gfx layout
- rtl/klax_motion_objects.v:28 Coordinate model (equivalent to MAME's clipping; proved in simulation against the atarimo.cpp reference quoted above): top9 = (0 - (yfield + height*8)) & 511 delta9 = (line - top9) & 511, covers iff delta9 < height*8 X writes wrap mod 51
- rtl/klax_motion_objects.v:42 Measured over the attract-mode gameplay demo (MAME, frames 2400-3600): Klax peaks at only 4 motion objects on any scanline (<=14 distinct/frame), vs the 1024-link iteration cap (MAME's MAX_PER_BANK, implemented below) and the time budget (p
- rtl/klax_motion_objects.v:145 Decoded object (atarimo.cpp render_object field extraction)
- rtl/klax_motion_objects.v:155 Y coverage (verified atarimo.cpp math, 9-bit domain)
- rtl/klax_motion_objects.v:180 Tile column draw position: with hflip the first code is drawn at the rightmost column (atarimo.cpp:479-484)
- rtl/klax_oki6295.v:7 MAME reference (0.288): okim6295.cpp / okiadpcm.cpp; klax.cpp configures OKIM6295(config, "oki", 14.318181 MHz / 4 / 4, PIN7_HIGH) and maps byte read/write at 0x270001 on the 68000 lower data lane.
- rtl/klax_oki6295.v:25 - The MAME region is 0x40000 bytes with only 0x00000-0x1FFFF loaded from ROM; the rest is zero-filled, so byte reads above 128KB return 0x00 (phrases reaching there decode silence-ish ramps, busy stays set for the programmed length).
- rtl/klax_oki6295.v:32 This is the integer-exact equivalent of MAME's float stream (add_int scale 2048, stream unit mapped to 32768).
- rtl/klax_oki6295.v:42 - The busy bit rises a few hundred ns after the second command byte (phrase table fetch); MAME models it as instant.
- rtl/klax_oki6295.v:80 Phrase addresses are 18 bits (masked to 0x3FFFF like MAME); nibble addresses carry one extra LSB.
- rtl/klax_oki6295.v:203 Byte feeding the decoder: addresses above the 128KB ROM load read as 0x00 (MAME zero-fills the unloaded top half of the 0x40000 region).
- rtl/klax_oki6295.v:406 Any byte is consumed here, even one with bit 7 set (MAME: the voice mask is simply bits 7:4).
- rtl/klax_oki6295.v:462 signal * volume_fraction with MAME's truncate-toward-zero rounding then a >>>5 scale.
- rtl/klax_oki6295.v:475 clamp(16 * sum, -32768, +32767): one full-volume voice spans the full output range; concurrent loud voices saturate, exactly like MAME's stream conversion.
- rtl/klax_oki6295.v:611 MAME okim6295 volume table: ~3dB steps, indexes >= 9 are silent.
- rtl/klax_palette.v:15 The game never sets CBANK, so bank 0 is the only one it ever uses — MAME models exactly that slice (1KB byte palette at 0x3E0000-0x3E07FF on the upper data lane, klax.cpp .umask16(0xff00)).
- rtl/klax_playfield.v:15 Tile entry format (from MAME klax.cpp:125-132): data1 = pf_ram[tile_index]: [12:0] = tile code (0..8191, indexes into tile ROM) [15] = flip_x (horizontal flip) data2 = pfx_ram[tile_index]: [11:8] = color bank (0..15)
- rtl/klax_playfield.v:35 MAME references: klax.cpp:125-132 get_playfield_tile_info klax.cpp:405 TILEMAP config: TILEMAP_SCAN_COLS, 60, 32 klax.cpp:403 PALETTE: IRGB_1555, 512 entries, 8-bit membits klax.cpp:366 GFXDECODE: tiles at palette base 2
- rtl/klax_playfield.v:122 Klax hardware has NO playfield scroll registers: the tilemap is drawn at a fixed origin (MAME agrees - klax.cpp instantiates TILEMAP_SCAN_COLS 60x32 and never calls set_scrollx/set_scrolly), and all three klax_playfield instantiations tie s
- rtl/klax_playfield.v:192 MAME is identical: IRGB_1555 -> pal6bit((c << 1) | i).
- rtl/klax_prog_rom.v:46 Convert the flat MRA stream to the MAME/68000 byte layout in hardware.
- rtl/klax_sys.v:155 See klax_watchdog.v for the silicon reference and the note on MAME leaving its watchdog disabled.
- rtl/klax_sys.v:280 D10 coin counter 2 (right) D11 coin counter 1 (left) D12 spare D13 color-RAM bank select MAME models the write as a no-op (klax.cpp latch_w() is empty).
- rtl/klax_sys.v:282 A MAME trace of a full boot+attract+demo run shows the game only ever drives D8 -- written 0 then 1 once at boot (pc 0x005c7c/94, ~frame 6) and never touched again; D13 is never set and the coin counters only click an external mechanical me
- rtl/klax_sys.v:322 Keeping them separate keeps the chip model pure and independently verifiable against MAME.
- rtl/klax_top_mister.v:654 Silicon DAC truth (schematic Sheet 9): 6-bit R/2R ladder per channel, LSB = the shared intensity bit ({color5, I}); MAME's IRGB_1555 decoder is identical (pal6bit((c << 1) | i)).
- README.md:8 It was built from the PCB schematics and the dumped on-board PALs, with MAME as a cross-reference rather than as the specification.
- README.md:150 MAME models no wait states at all.
- README.md:154 **MAME fires an extra IRQ4 at scanline 0 that the silicon cannot produce**; this core follows the silicon.
- README.md:159 MAME leaves its Klax watchdog disabled, so it never fires at all.
- README.md:165 Traced against MAME's cycle-exact m68000 over 40 frames of boot and attract on the real program, with the board's wait states subtracted, it takes exactly the s
- README.md:171 With the wait states MAME lacks, the core makes 285–293 idle-loop passes per frame, against 297–304 in MAME.
- README.md:206 These cannot be settled from dumps, schematics or MAME, and would need measurement on a real PCB.
- README.md:231 | 68000 instruction timing | Per-instruction clock trace of the real program over 40 frames of boot and attract, compared against MAME 0.288's cycle-exact m6800
- README.md:232 | Playfield renderer | MAME-dumped tilemap and palette RAM rendered through the RTL pipeline, compared against MAME's own frame | Pixel-exact |
- README.md:233 | Motion objects | MAME-dumped MOB, SLIP, tilemap and palette RAM rendered through the full MiSTer top, compared against MAME at 336 × 240 | 98.50 % match at of
- README.md:235 | Tile pixel decode | Compared pixel-by-pixel against the MAME tile formula | Exact |
- README.md:236 | OKI MSM6295 | Sample-for-sample against a MAME-0.288-equivalent golden model, driven by the real sample ROMs | Bit-exact in audio and status, zero mismatches
- README.md:335 Klax debuted in 1989; the ROMs' own internal build stamps read 1990, which is why MAME dates every set 1990 and the MRAs follow.
- README.md:343 **The MAME team** — `klax.cpp` (Aaron Giles), `atarimo.cpp`, `okim6295.cpp` and `okiadpcm.cpp` were the cross-reference for everything the schematics do not set
- README.md:345 References in the RTL comments of the form `mame/klax.cpp` point at MAME's own sources.
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 7
- rtl/klax_motion_objects.v:13 Behavior is implemented from verified MAME 0.288 sources: mame/atarimo.cpp build_active_list() — SLIP[line>>3] start link, linked walk on word0[7:0], visited-array stop, MAX_PER_BANK=1024 iteration cap (maxperline=0) mame/atarimo.cpp ren
- rtl/klax_motion_objects.v:46 The line abort is therefore unreachable by Klax content (~250x margin); MAME models no time-based dropout (maxperline=0 -> the 1024 cap only), so the RTL matches MAME in every case the game produces.
- rtl/klax_oki6295.v:12 Verified bit-exact against a MAME-0.288-equivalent golden model by a sample-for-sample parity testbench driven by the real Klax sample ROMs.
- rtl/klax_oki6295.v:16 Behavioral contract (matches MAME exactly): - Command protocol: a byte with bit 7 latches a pending sample number; the next byte (any value, even with bit 7 set) is the second half: voice mask in bits 7:4, volume index in bits 3:0.
- rtl/klax_sys.v:320 === OKI MSM6295 ADPCM Sound === u_oki is the chip (bit-exact vs MAME); u_audio_filter is the board's analog output stage around it (Sheet 4).
- rtl/klax_top_mister.v:135 Totals/visible: verified from MAME klax.cpp set_raw.
- README.md:183 **OKI MSM6295 ADPCM** decoding that is bit-exact against a MAME-0.288 golden model, plus — unlike MAME, which models none — the PCB's **analog audio output filt
MAMEドライバと同じ文言を含む(出典の明記なし) — 1