← All cores
Kaneko16 (alphanu1)
Cites hardware documentation that MAME's driver does not — 1
- README.md:27 | Protection | CALC3 or TBSOP01/02 MCU on later titles, neither with a dumped program ROM |
Says it was checked against the original PCB — 4
- Kaneko16.sv:664 12 MHz is PCB-verified — MAME annotates explbrkr's 68000 as XTAL(12'000'000) "verified on pcb".
- Kaneko16.sv:795 Two YM2149s at 12 MHz / 6, "verified on pcb".
- Kaneko16.sv:1353 Every game this core runs is HIGH, and two of the three are marked "verified on pcb" in kaneko16.cpp -- bakubrkr and mgcrystl at 12 MHz/6, wingforc at 16 MHz/16.
- rtl/video/kaneko_video_timing.sv:19 And 6 MHz is exactly the PCB-verified 68000 crystal halved: explbrkr and mgcrystl are annotated XTAL(12'000'000) "verified on pcb", and 12/2 = 6.
Notes where it differs from MAME — 3
- Kaneko16.sv:1395 MAME does not model that chip, but it does honour the RAM, so a read gives back what was written.
- Kaneko16.sv:2697 This core renders that list with ONE engine into a 320-wide bitmap, which covers the same area — but unlike MAME it has a real per-frame time budget.
- rtl/cpu/kaneko_bus.sv:209 The board carries two VU-002 chips and this is the second one's register window; MAME does not model the chip but it does honour the RAM, so a read returns what was written.
Cites MAME source — 134
- Kaneko16.sv:760 The fourth word: Explosive Breaker has a port at e00006 that MAME declares and leaves entirely empty, so it reads 0x0000, not 0xffff.
- Kaneko16.sv:829 Both chips are routed to the same speaker at the same gain in MAME (add_route(ALL_OUTPUTS, "mono", 0.5) each), so a plain sum is the right mix and the 0.5 is just MAME avoiding clipping its own bus.
- Kaneko16.sv:893 jt6295's sample is 14-bit and jt51's is 16-bit, so the YM2151 board is 4x louder before any gain, and MAME widens that further: Blaze On routes its YM2151 at 1.0 while Explosive Breaker routes everything at 0.5.
- Kaneko16.sv:934 kaneko16.cpp, wingforc():
- Kaneko16.sv:949 MAME's weights, applied directly.
- Kaneko16.sv:971 MAME's weights are OKI 0.5 against YM2151 0.2 -- the effects two and a half times LOUDER than the music -- and applying those numbers literally was wrong, because the two chips do not start from the same scale.
- Kaneko16.sv:978 Scaling by 2 puts the PEAKS at 16,384 against 6,656, MAME's 2.5 to 1 within 2% -- and on hardware that was still barely audible, exactly as Explosive Breaker was before its mix was boosted.
- Kaneko16.sv:988 THE BALANCE IS SET BY EAR AGAINST MAME; THE LEVEL IS SET BY THE HEADROOM.
- Kaneko16.sv:990 The balance that sounds right against the oracle is about 9.6 to 1 by peak -- far more than MAME's nominal 2.5, because the OKI's full scale is theoretical while jt51 genuinely uses its range, the same reason the 68000 board's mix is booste
- Kaneko16.sv:1027 MAME's read handler is
- Kaneko16.sv:1032 Both boards read the EEPROM this way: bakubrkr and mgcrystl each wire m_ym2149[1]->port_a_read_callback() to it, with MAME's own comment reading "inputs A: 0,EEPROM bit read".
- Kaneko16.sv:1076 MAME passes the whole port B byte to cs_write(), so any bit asserts it.
- Kaneko16.sv:1093 jt6295 documents cen as 1 MHz; at 2 MHz every rate doubles and the sample rate lands on 2 MHz / 132 = 15.15 kHz, which is what MAME runs.
- Kaneko16.sv:1106 Bank 7 aliases bank 6 — MAME fills the entries past max_bank with the last block, because the ROM is 1 MB and only seven banked windows fit above the fixed one.
- Kaneko16.sv:1177 Measured in MAME with tools/mame_wf_sound.lua, Wing Force writes this latch only a handful of times a minute and not once during the attract demo: the Z80 runs that sequence itself.
- Kaneko16.sv:1228 MAME sends this pair at the transition into the attract demo:
- Kaneko16.sv:1244 MAME's sequence into the attract demo is 01, 05, 01, 01, 17 -- five commands in six seconds -- and two is not enough to line ours up against it.
- Kaneko16.sv:1263 4 MHz, from MAME: Z80(config, m_audiocpu, 4000000) on Blaze On and XTAL(16'000'000)/4 on Wing Force, which is the same number.
- Kaneko16.sv:1297 The YM2151's IRQ is not wired on this board — MAME sets no irq_handler, so the program polls the status register for its timers.
- Kaneko16.sv:1335 The YM2151 is stereo on this board — MAME routes channel 0 left and 1 right, unlike every other Kaneko sound chip, which is mono to one speaker.
- Kaneko16.sv:1353 Every game this core runs is HIGH, and two of the three are marked "verified on pcb" in kaneko16.cpp -- bakubrkr and mgcrystl at 12 MHz/6, wingforc at 16 MHz/16.
- Kaneko16.sv:1401 ours 980004 R ffff mame 980004 R 0000
- Kaneko16.sv:1509 MAME's census on wingforc, per second, is the thing to compare against:
- Kaneko16.sv:1556 MAME says the game spins in an idle loop at 01f820 -- 2.7 million fetches in 600 frames -- and does all of its work in the handlers, so "no interrupts" is a complete explanation of the black screen either way.
- Kaneko16.sv:1563 kaneko_irq HOLDS a request until it is acknowledged, the way MAME's HOLD_LINE does, so a request the CPU never answers asserts ONCE and then stays asserted -- no further edges, a per-frame count of zero, and a reading identical to never ass
- Kaneko16.sv:1596 Z80 SOUND-PORT CENSUS, to diff against MAME's on the same title.
- Kaneko16.sv:1618 Edges, because the Z80 holds its strobes for a whole 4 MHz bus cycle -- a dozen clk_sys ticks -- and a level would count each access twelve times and be incomparable with MAME's per-access figures.
- Kaneko16.sv:1638 MAME's Wing Force polls this about 120 times a frame and sees 0x02 -- Timer B set, Timer A clear -- for 87% of them.
- Kaneko16.sv:1647 Latched on the read, and counted two ways: how often bit 0 is set, and how often the byte is anything other than MAME's dominant 0x02.
- Kaneko16.sv:1754 The two rows above proved the Z80 writes the chip at MAME's rate while the board is silent, so the question moved downstream: is jt51 producing anything, and does it survive the mix?
- Kaneko16.sv:1838 blazeon_map has at least one window this core does not decode — 0x980000, the second VU-002's registers, which MAME backs with plain RAM because the game touches it.
- Kaneko16.sv:1936 In MAME's draw order: chip0 layer 0, chip0 layer 1, chip1 layer 0, chip1 layer 1.
- Kaneko16.sv:2016 LATCHED ONCE PER FRAME, AS MAME DOES
- Kaneko16.sv:2018 kaneko_tmap.cpp reads these in prepare_common(), which runs once before the frame is rendered.
- Kaneko16.sv:2044 Layer 1's dx is two further along than layer 0's: MAME sets scrolldx to -(m_dx + 2) for tmap[1].
- Kaneko16.sv:2046 That is REAL VIEW2 behaviour, straight from MAME:
- Kaneko16.sv:2063 A switch, not an edit: the offset is correct per MAME and Explosive Breaker depends on it, so it must not be quietly removed to make one game look right — hard rule 9.
- Kaneko16.sv:2069 +2 what MAME does, and what the code has always done 0 no offset at all -2 the opposite offset +4 twice MAME's
- Kaneko16.sv:2191 MAME:
- Kaneko16.sv:2201 Held in its own register rather than read out of the register file, because MAME only updates it on a write to register 0's LOW byte and starts it false.
- Kaneko16.sv:2213 ------------------------------------------------------------- sprites The sprite surface is indexed in MAME's screen coordinates, where the visible area starts at visarea().min_y — the parser folds that offset into every record, and the fra
- Kaneko16.sv:2228 screen_y is ALREADY in MAME's coordinate space — kaneko_video_timing documents it as "V_START ..
- Kaneko16.sv:2275 MAME clips sprite drawing to the visible area — and the visible area is PER GAME.
- Kaneko16.sv:2329 bits 2-7 unused DIPs bit 10 P1 left bit 11 P1 right bit 12 P1 button 1 bit 13 P1 button 2 e00002 P2 bits 8-13, the same for player 2; low byte unused e00004 SYSTEM bit 8 start 1 bit 12 service (no toggle) bit 9 s
- Kaneko16.sv:2384 This is the board's Flip_Screen DIP -- bit 0 of the word at c00000/e00000, active low, so 1 is Off, which is what MAME defaults it to.
- Kaneko16.sv:2430 A bit MAME never mentions in INPUT_PORTS_START reads ZERO; a bit declared IPT_UNKNOWN with IP_ACTIVE_LOW reads ONE.
- Kaneko16.sv:2472 From MAME's INPUT_PORTS_START(blazeon), the port defines only the high byte:
- Kaneko16.sv:2481 Undefined bits in a MAME port read ZERO.
- Kaneko16.sv:2481 This core returned all ones, and the bus-trace diff against MAME caught it as the first divergence past the self-test:
- Kaneko16.sv:2485 ours c00006 R ffff mame c00006 R ff00
- Kaneko16.sv:2562 The fault is upstream, in the Z80 not producing sound at all at those moments, and Wing Force's music is the YM2151 rather than the OKI (MAME writes the YM 232-540 times a second continuously; the OKI only during the demo).
- Kaneko16.sv:2568 Expected per frame, from MAME:
- Kaneko16.sv:2575 Rows 4-6 near MAME's numbers with no sound means the chips are being driven and the fault is past them.
- Kaneko16.sv:2583 The census answered its question: with Wing Force silent, the Z80 wrote the YM about 15 times a frame and polled its status a hundred-odd times, which is MAME's rate (8-18 and ~107-120).
- Kaneko16.sv:2585 The CPU, its ROM cache -- measured at a 0.5% miss rate against a real MAME fetch trace -- and the command path are all healthy, and the fault is past the chip's write port.
- Kaneko16.sv:2599 WHICH REGISTERS, against MAME's own figures for the same title.
- Kaneko16.sv:2628 MAME's Z80 drives the chip perfectly well there -- measured with tools/mame_z80_ports.lua, 2 to 54 writes a second to port 0a with bank writes on 0c -- so the game is not simply quiet.
- rtl/cpu/kaneko_bus.sv:6 Decode is transcribed from bakubrkr_map (kaneko16.cpp:314), which explbrkr and Explosive Breaker's siblings use.
- rtl/cpu/kaneko_bus.sv:90 Each register sits at its own address (kaneko16.cpp ym2149_r: address_w(offset) then data_r()), so ym_addr is just a[4:1].
- rtl/cpu/kaneko_bus.sv:112 MAME maps it as map(0xe00000, 0xe00000).w(soundlatch) — the EVEN byte of the word, so it is qualified by UDS and never by LDS.
- rtl/cpu/kaneko_bus.sv:173 From MAME:
- rtl/cpu/kaneko_bus.sv:216 ours 980004 R ffff mame 980004 R 0000
- rtl/cpu/kaneko_bus.sv:238 A MAME nopr() returns ZERO.
- rtl/cpu/kaneko_bus.sv:238 This core left them undecoded, and its unmapped default is 0xffff — which the bus-trace diff against MAME caught as the first and only value divergence in 100,000 accesses:
- rtl/cpu/kaneko_bus.sv:242 ours e40000 R ffff mame e40000 R 0000
- rtl/cpu/kaneko_bus.sv:247 0xe80000 is commented out in the driver and only ever written here, so it is deliberately NOT decoded — decoding an address MAME does not is the opposite mistake.
- rtl/cpu/kaneko_bus.sv:294 A byte write to an odd address carries the low half, to an even address the high half — "the registers are mapped to odd addresses, except one!" (kaneko16.cpp ym2149_w).
- rtl/cpu/kaneko_bus.sv:506 MAME promotes data_r() to u16, so the high half is zero; the game only reads the low half, but matching it keeps the bus traces comparable.
- rtl/cpu/kaneko_bus.sv:513 MAME's watchdog_timer_device reset16_r returns 0, and this was the first place the core's bus trace differed from MAME's during boot — 55,400 data accesses in, everything before it identical.
- rtl/cpu/kaneko_bus.sv:524 A read of e00000 is an IRQ acknowledge on this board, not the latch: MAME has it as nopr().
- rtl/cpu/kaneko_bus.sv:540 Found by the bus-trace diff against MAME, not by reading the map:
- rtl/cpu/kaneko_bus.sv:542 ours c00006 R ffff mame c00006 R ff00
- rtl/cpu/kaneko_irq.sv:7 kaneko16.cpp, kaneko16_state::interrupt — a scanline timer configured with `configure_scanline(..., "screen", 0, 1)`, so it runs once per raw scanline and `param` is vpos:
- rtl/cpu/kaneko_irq.sv:17 The driver sets `set_size(256, 256)` with `set_visarea(0, 255, 16, 239)`, so MAME's vpos counts from the top of the blanked frame with the visible area starting at 16 — exactly what kaneko_video_timing does with V_START = 16.
- rtl/cpu/kaneko_irq.sv:21 They are parameters anyway, because the frame is 264 lines here and 256 in MAME and the timing is not PCB-verified (design study §9).
- rtl/cpu/kaneko_irq.sv:31 MAME asserts each level with HOLD_LINE, which keeps the line asserted until the CPU acknowledges it.
- rtl/io/kaneko_eeprom93c46.sv:16 MODELLED ON eepromser.cpp, NOT ON THE DATASHEET
- rtl/io/kaneko_eeprom93c46.sv:22 It is open-drain with a pull-up, so outside a read it reads 1, not 0 (eepromser.cpp:288, m_do_tristate = ASSERT_LINE).
- rtl/io/kaneko_eeprom93c46.sv:28 * WHILE WAITING FOR A START BIT, DO IS THE READY/BUSY STATUS, not the idle level (eepromser.cpp:658, the 93Cxx override).
- rtl/io/kaneko_eeprom93c46.sv:32 93Cxx enables streaming, so after the sixteenth bit the address auto-increments and the next word follows with no new command (eepromser.cpp:415).
- rtl/io/kaneko_eeprom93c46.sv:36 Timings are MAME's (eeprom.cpp:42-45) and are close to a real part: a write takes 1750 us, an erase 1000 us, and erase-all/write-all 8000 us.
- rtl/io/kaneko_eeprom93c46.sv:40 Verified two ways: a directed testbench for the protocol, and a replay of MAME's own captured CLK/DI/CS sequence checking every value the game reads back — 20,910 reads, zero mismatches (`make eetest`).
- rtl/io/kaneko_eeprom93c46.sv:117 S_WAIT_DONE is eepromser.cpp's STATE_WAIT_FOR_COMPLETION.
- rtl/io/kaneko_eeprom93c46.sv:118 It matters because DO reads HIGH throughout it — not the ready/busy status, which only applies while waiting for a start bit (eepromser.cpp:658).
- rtl/io/kaneko_eeprom93c46.sv:120 Sending the status here instead reported busy where MAME reported 1, on every programming cycle the game performed.
- rtl/io/kaneko_eeprom93c46.sv:143 eepromser.cpp:658 — a 93Cxx returns the ready/busy status while it waits for a start bit, and the ordinary DO level otherwise.
- rtl/io/kaneko_eeprom93c46.sv:248 The address wraps at 64, so a host that keeps clocking walks the array and comes back round, which is what MAME does.
- rtl/io/kaneko_eeprom93c46.sv:273 A write attempted while locked does not wait for a completion it is never going to make; it resets (eepromser.cpp execute_write_command).
- rtl/io/kaneko_gamecfg.sv:18 EVERYTHING HERE IS READ FROM MAME
- rtl/io/kaneko_gamecfg.sv:110 Undefined bits in a MAME port read zero, which is where that came from, but these bits are NOT undefined -- they are declared IPT_UNKNOWN and active low, so they read as ones.
- rtl/io/kaneko_gamecfg.sv:122 MAME's GAME() lines: explbrkr ROT90, wingforc ROT270, mgcrystl and blazeon ROT0.
- rtl/io/kaneko_gamecfg.sv:236 kaneko_spr.cpp bounds every sprite code before it fetches:
- rtl/mem/kaneko_vmem.sv:12 VIEW2 window 0x4000 bytes each: vram_1 at 0x0000, vram_0 at 0x1000, scroll_1 at 0x2000, scroll_0 at 0x3000 (kaneko_tmap.cpp vram_map).
- rtl/mem/kaneko_vmem.sv:18 A tile entry is two adjacent words, attr then code (kaneko_tmap.cpp:126), and kaneko_tmap_fetch wants both in a single 32-bit read; and each layer needs its own scroll word in the same cycle.
- rtl/video/kaneko_mixer.sv:11 MAME draws in eight category passes, and within each pass in a fixed layer order:
- rtl/video/kaneko_mixer.sv:37 Four tile layers, in MAME's draw order: chip0 L0, chip0 L1, chip1 L0, chip1 L1.
- rtl/video/kaneko_mixer.sv:91 Background is pen 0 — MAME's fill_bitmap uses pen 0 for sprite type 0.
- rtl/video/kaneko_regs16.sv:14 WHAT THE VIEW2 REGISTERS MEAN (kaneko_tmap.cpp:214-227)
- rtl/video/kaneko_regs16.sv:26 Layer control bits (reg 4), from kaneko_tmap.cpp prepare_common():
- rtl/video/kaneko_spr_sys.sv:32 MAME clears the two surfaces separately:
- rtl/video/kaneko_spr_sys.sv:84 VU-002 "keep sprites on screen": sprite register 0 bit 2, INVERTED — MAME's `m_keep_sprites = BIT(~new_data, 2)`.
- rtl/video/kaneko_tmap.sv:12 MAME names them FG and BG in its register documentation but wires them the other way round in the device, which is a trap worth stating once:
- rtl/video/kaneko_tmap.sv:19 See vram_map() in kaneko_tmap.cpp.
- rtl/video/kaneko_tmap.sv:29 **linescroll is indexed by map_y, not screen_y.** MAME's rowscroll index is a *tilemap* row: draw_instance() places tilemap row r at screen line r + ypos, and the scroll for row r is rowscroll[r].
- rtl/video/kaneko_tmap.sv:36 **dx differs by 2 between the layers.** MAME sets scrolldx to -dx for tmap[0] and -(dx+2) for tmap[1]; the caller passes the already-adjusted value here.
- rtl/video/kaneko_tmap.sv:55 14 bits so the three-term sum cannot itself overflow; only the final truncation to 9 bits is meant to lose information, and that truncation IS the mod 512 (two's complement wrap gives the same answer as MAME's clamp-into-range in effective_
- rtl/video/kaneko_tmap.sv:76 Wraps at 16 bits exactly as MAME's u16 addition does.
- rtl/video/kaneko_tmap.sv:106 Tile attribute word, from kaneko_tmap.cpp:
- rtl/video/kaneko_tmap.sv:116 Note the flip assignment: MAME writes TILE_FLIPXY(attr & 3), and TILE_FLIPXY SWAPS the two bits (tilemap.h: ((xy & 2) >> 1) | ((xy & 1) << 1)).
- rtl/video/kaneko_tmap.sv:122 [15:11] documented "unused?" in MAME and
- rtl/video/kaneko_tmap_fetch.sv:6 Wraps the (MAME-verified) combinational address engine in kaneko_tmap.sv with the memory accesses it implies, at one pixel per clock.
- rtl/video/kaneko_video_timing.sv:9 MAME never calls set_raw() for any Kaneko16 game, so the pixel clock and blanking are unrecorded — the design study lists this as an open gap and docs/findings.md carries it.
- rtl/video/kaneko_video_timing.sv:11 What MAME does give is one precise refresh rate, for Wing Force: set_refresh_hz(59.1854).
- rtl/video/kaneko_video_timing.sv:19 against MAME's 59.1854 — four decimal places.
- rtl/video/kaneko_video_timing.sv:74 The tilemap and sprite maths expect the coordinate MAME uses, so screen_x has to start there too -- exactly the reason screen_y carries v_start rather than counting from the top of the window.
- rtl/video/kaneko_video_timing.sv:131 The tilemap maths adds the per-game dy and expects the same coordinate MAME uses, where visarea starts at 16 rather than 0.
- rtl/video/kaneko_vuspr.sv:11 Order matters and cannot be parallelised: MAME's own comment is explicit that sprites "*must* be parsed from the first in RAM to the last, because of the multisprite feature", and separately that they must be *drawn* last-to-first for prior
- rtl/video/kaneko_vuspr.sv:39 Addition is congruent mod 2^16, so 16-bit wrapping arithmetic throughout is exact — MAME's use of `int` for the intermediates makes no difference to the result.
- rtl/video/kaneko_vuspr.sv:114 [10] is blank in MAME's format table and unread
- rtl/video/kaneko_vuspr.sv:155 B.Rap Boys is the only game wanting the latter, and MAME flags it as not properly understood.
- rtl/video/kaneko_vuspr.sv:254 Update the latches exactly where MAME does.
- rtl/video/kaneko_vuspr_draw.sv:10 Two ordering rules from MAME, and they interact:
- rtl/video/kaneko_vuspr_draw.sv:46 This board's screen is 256x256 (MAME's set_size for bakubrkr and mgcrystl); the Blaze On board is 320x240.
- rtl/video/kaneko_vuspr_draw.sv:104 MAME clips sprite drawing to it.
- rtl/video/kaneko_vuspr_draw.sv:139 kaneko_spr.cpp, and the reason it matters is that two of these games' element counts are NOT powers of two -- 18432 for Explosive Breaker and 20480 for Magical Crystals -- so a mask cannot stand in for it.
- README.md:44 | ROM line cache | 16 lines x 4 words, 0.1% miss; CPU back to MAME's bus rate |
- README.md:50 | EEPROM (93C46) | working; 20,910 reads replayed against MAME, zero mismatches |
- README.md:82 **`Layer1 dx`** selects the offset the VIEW2 chip applies to its second tilemap layer; `+2` is MAME's value and the default, and the alternatives are wrong for
- README.md:86 M0 frame gate, RTL rendered against a frame MAME actually produced:
- README.md:111 CPU gate, the core's 68000 bus trace against MAME's on explbrkr:
- README.md:114 ours 100000 accesses, 22897 after dropping instruction fetches mame 100000 accesses, 22898 after dropping instruction fetches MATCH over all 22897 compared acce
- README.md:206 MAME is needed as well for the oracle gates below, but not to compile.
- README.md:253 The design study was written before any source was vendored, and reading MAME has since corrected it on several checkable points — tile priority bits, the BG di
- README.md:270 | **MAME team** | The behavioural oracle for every part of this project. `src/mame/kaneko/` is by **Luca Elia** and **David Haywood**; the tilemap, sprite and M
Says it matches, follows or was checked against MAME — 15
- Kaneko16.sv:243 The override exists so the rest of the core is testable meanwhile: the game table, the per-game map, the geometry and the inputs are all verified against MAME and none of them has ever been exercised on hardware, because the selector that r
- Kaneko16.sv:664 12 MHz is PCB-verified — MAME annotates explbrkr's 68000 as XTAL(12'000'000) "verified on pcb".
- Kaneko16.sv:1208 The commands, their order and their sender all match MAME exactly -- 01,01,17,01 with 0x17 starting the attract audio.
- Kaneko16.sv:1758 The counts already match MAME; the content is the open question, and two registers decide whether anything is audible at all.
- Kaneko16.sv:2675 This exists because "there is no fire button" is not answerable from the RTL: the wiring matches MAME's INPUT_PORTS exactly, so the question is which bits the pad actually produces, and that is only visible here.
- Kaneko16.sv:2681 The unmapped-access diagnostic that borrowed this row did its job: the memory map is now verified from three directions — the MAME bus trace, the per-game page table, and the register readout — and nothing is unmapped that should not be.
- rtl/cpu/kaneko_bus.sv:454 The graphics path is built around exactly that order and is pixel-exact against MAME, so the stream is right and must not be changed.
- rtl/io/kaneko_gamecfg.sv:20 Memory-map pages from each game's address_map, video constants from its machine_config and from the frame gate's table, which renders pixel-exact against MAME captures on three of the four.
- rtl/video/kaneko_regs16.sv:9 That cost nothing while the video path was not driven from them — every register access explbrkr makes in its first 300,000 bus cycles is a write, so the traces still matched MAME exactly — and it costs everything the moment the pixel path
- rtl/video/kaneko_vuspr.sv:118 Reset at the start of every pass, the same as MAME's locals in draw_sprites().
- rtl/video/kaneko_vuspr.sv:222 It was missing because the testbench modelled sprite RAM combinationally while claiming to model it synchronously, so the parser matched MAME in simulation and read the wrong word of every record against the real memory.
- rtl/video/kaneko_vuspr_draw.sv:26 Pixel format matches MAME's sprite bitmap: {priority[1:0], pen[13:0]}, with pen = colour*16 + c. Pen 0 means nothing here.
- README.md:4 Not an emulator: RTL that behaves as the original silicon did, verified against MAME as an oracle.
- README.md:14 That was treated as a defect for a long time before it was checked: counting OKI writes in MAME alongside screenshots taken at the same instant gives 183 writes
- README.md:43 | 68000 (fx68k) + bus decode | running on hardware; matches MAME exactly over 100k bus accesses |
Says it was translated, ported or taken from MAME — 3
- rtl/video/kaneko_mixer.sv:6 Behaviour transcribed from MAME: kaneko16_v.cpp screen_update_common (the category passes), kaneko_tmap.cpp render_tilemap / render_tilemap_alt (which priority value each chip writes), and kaneko_spr.cpp copybitmap_common (the sprite compar
- rtl/video/kaneko_tmap.sv:6 Behaviour transcribed from MAME's kaneko_view2_tilemap_device (src/mame/kaneko/kaneko_tmap.cpp, BSD-3-Clause, Luca Elia and David Haywood) together with the tilemap scroll semantics in src/emu/tilemap.cpp and the tile layout gfx_8x8x4_row_2
- rtl/video/kaneko_vuspr.sv:6 Behaviour transcribed from MAME's kaneko16_sprite_device / kaneko_vu002_sprite_device (src/mame/kaneko/kaneko_spr.cpp, BSD-3-Clause, Luca Elia and David Haywood).
Shares text with the MAME driver without saying so — 30
- Kaneko16.sv:665 annotates explbrkr's 68000 as XTAL(12'000'000) "verified on pcb". — shares text with kaneko/kaneko16.cpp:1761
- Kaneko16.sv:830 same gain in MAME (add_route(ALL_OUTPUTS, "mono", 0.5) each), so a plain sum — shares text with kaneko/kaneko16.cpp:1736
- Kaneko16.sv:936 m_ymsnd->add_route(ALL_OUTPUTS, "mono", 0.2); — shares text with kaneko/kaneko16.cpp:1927
- Kaneko16.sv:937 m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.5); — shares text with kaneko/kaneko16.cpp:1744
- Kaneko16.sv:1029 u8 kaneko16_state::eeprom_r() { return m_eeprom->do_read(); } — shares text with kaneko/kaneko16.cpp:218
- Kaneko16.sv:1034 m_ym2149[1]->port_a_read_callback() to it, with MAME's own comment reading — shares text with kaneko/kaneko16.cpp:1807
- Kaneko16.sv:1035 "inputs A: 0,EEPROM bit read". — shares text with kaneko/kaneko16.cpp:1807
- Kaneko16.sv:1101 is laid out by common_oki_bank_install(0, 0x20000, 0x20000): — shares text with kaneko/kaneko16.cpp:2327
- Kaneko16.sv:1952 runs (rule 9). explbrkr: set_offset(0x5b, -0x8, 256, 240), m_view2_2_pri set, — shares text with kaneko/kaneko16.cpp:1724
- Kaneko16.sv:1960 KANEKO_VU002_SPRITE, set_priorities(8,8,8,8), set_color_base(0) — shares text with kaneko/kaneko16.cpp:1794
- Kaneko16.sv:2049 m_tmap[0]->set_scrolldx(-m_dx, ...) — shares text with kaneko/kaneko_tmap.cpp:165
- Kaneko16.sv:2050 m_tmap[1]->set_scrolldx(-(m_dx+2), ...) — shares text with kaneko/kaneko_tmap.cpp:166
- Kaneko16.sv:2195 m_sprite_flipx = BIT(new_data, 1); — shares text with kaneko/kaneko_spr.cpp:540
- Kaneko16.sv:2196 m_sprite_flipy = BIT(new_data, 0); — shares text with kaneko/kaneko_spr.cpp:541
- Kaneko16.sv:2198 m_keep_sprites = BIT(~new_data, 2); — shares text with kaneko/kaneko_spr.cpp:544
- rtl/cpu/kaneko_bus.sv:234 map(0xe00000, 0xe00001).nopr(); // "Read = IRQ Ack ?" -- sel_snd — shares text with kaneko/kaneko16.cpp:357
- rtl/cpu/kaneko_bus.sv:235 map(0xe40000, 0xe40001).nopr(); // "IRQ Ack ?" — shares text with kaneko/kaneko16.cpp:359
- rtl/cpu/kaneko_bus.sv:236 map(0xec0000, 0xec0001).nopr(); // "Lev 4 IRQ Ack ?" — shares text with kaneko/kaneko16.cpp:361
- rtl/cpu/kaneko_bus.sv:295 the high half — "the registers are mapped to odd addresses, except one!" — shares text with kaneko/kaneko16.cpp:184
- rtl/io/kaneko_gamecfg.sv:218 MACHINE_RESET_OVERRIDE(kaneko16_shogwarr_state, mgcrystl) -- the CALC3 — shares text with kaneko/kaneko16.cpp:2197
- rtl/io/kaneko_gamecfg.sv:238 const u8 *source_base = gfx->get_data(code % gfx->elements()); — shares text with kaneko/kaneko_spr.cpp:252
- rtl/io/kaneko_gamecfg.sv:241 sprite is gfx_8x8x4_row_2x2_group_packed_msb, whose gfx_layout ends — shares text with kaneko/kaneko_spr.cpp:93
- rtl/video/kaneko_regs16.sv:28 12 layer 0 DISABLE enable(BIT(~layers_flip_0, 12)) — shares text with kaneko/kaneko_tmap.cpp:194
- rtl/video/kaneko_regs16.sv:29 4 layer 1 DISABLE enable(BIT(~layers_flip_0, 4)) — shares text with kaneko/kaneko_tmap.cpp:195
- rtl/video/kaneko_spr_sys.sv:34 m_sprites_maskmap[m_buffer].fill(0, clip); // always — shares text with kaneko/kaneko_spr.cpp:597
- rtl/video/kaneko_spr_sys.sv:36 m_sprites_bitmap[m_buffer].fill(0, clip); // only when not keeping — shares text with kaneko/kaneko_spr.cpp:600
- rtl/video/kaneko_spr_sys.sv:85 MAME's `m_keep_sprites = BIT(~new_data, 2)`. When set, the sprite — shares text with kaneko/kaneko_spr.cpp:544
- rtl/video/kaneko_video_timing.sv:21 XTAL(12'000'000) "verified on pcb", and 12/2 = 6. — shares text with kaneko/kaneko16.cpp:1761
- rtl/video/kaneko_vuspr_draw.sv:16 if (pri[x] == 0) dest[x] = ...; — shares text with kaneko/kaneko_spr.cpp:325
- rtl/video/kaneko_vuspr_draw.sv:137 const u8 *source_base = gfx->get_data(code % gfx->elements()); — shares text with kaneko/kaneko_spr.cpp:252