← All cores
Arcade-NMK16_Macross2
Cites hardware documentation that MAME's driver does not — 3
- rtl/nmk_irq/nmk_irq.sv:29 Verified via a live MAME debugger capture (breakpoints at mustang's own IRQ1-4 ISR entry addresses, resolved from the ROM's own autovector table, printing the debugger's `beamy` pseudo-symbol) against mustang's real, dumped V-PROM (`10.bpr`
- rtl/tdragon2/tdragon2_core.sv:1792 BG RAM display page: the TD2 schematic's U5 (74LS174, clocked by NMK005's BACKBANK.MUX = this register) latches D0-D1 to the BG ROM bank (BACK.ROM.A18/A19) and D2-D3 to BACK.A13/A14.MUX, which U4 (74LS157) puts on BG RAM A13/A14 during disp
- README.md:77 | `NMK16_Afega` | The Afega derivative boards: 12 MHz 68000 with address-scrambled program ROMs decoded per fetch, Z80 + YM2151 + OKI or twin-OKI sound, an 8bpp
Cites hardware references or measurements that MAME's driver also gives — 1
Says it was checked on “real hardware” — 1
- NMK16_Macross2.sv:30 - Player input bit mapping (joystick_0/1 -> IN0/IN1) is now cross-checked bit-for-bit against nmk16.cpp's own INPUT_PORTS_START(tdragon2)/(macross2) (see in0_i/in1_i's own comment below — macross2's own IN0/IN1 layout is confirmed a strict
Notes where it differs from MAME — 1
- README.md:100 | `tdragonb2` | *"runs too quickly, Oki sounds terrible (IRQ problems?)"* | Not attempted — it would mean diverging from MAME's own known-broken timing. |
Cites MAME source — 121
- NMK16_Macross2.sv:30 - Player input bit mapping (joystick_0/1 -> IN0/IN1) is now cross-checked bit-for-bit against nmk16.cpp's own INPUT_PORTS_START(tdragon2)/(macross2) (see in0_i/in1_i's own comment below — macross2's own IN0/IN1 layout is confirmed a strict
- NMK16_Macross2.sv:86 tdragon2 is a vertical (MAME ROT270) game drawn on its side by the board; the two "Vert" choices both present it upright through the framebuffer, as MAME does — "Vert 270" (the MAME-correct rotate_ccw direction) and "Vert 90" (the opposite
- NMK16_Macross2.sv:147 "DIP;" is where MiSTer inserts the DIP-switch submenu it builds from the loaded .mra's <switches>/<dip> entries (releases/*.mra declare every DSW1/DSW2 option from nmk16.cpp).
- NMK16_Macross2.sv:318 Player inputs — cross-checked bit-for-bit against INPUT_PORTS_START(tdragon2) (nmk16.cpp:2890-2917).
- NMK16_Macross2.sv:319 Also verified against INPUT_PORTS_START(macross2) (nmk16.cpp:2801-2826): IN0 is identical, and IN1 is a strict SUBSET (same R/L/D/U/Button1/Button2/ Start/Coin bit positions, just missing tdragon2's own Button3 — that bit is simply IPT_UNKN
- NMK16_Macross2.sv:327 IN0: bit0=COIN1 bit1=COIN2 bit2=SERVICE1 bit3=START1 bit4=START2 bits[7:5]=unused IN1: bit0=P1_RIGHT bit1=P1_LEFT bit2=P1_DOWN bit3=P1_UP bit4=P1_BUTTON1 bit5=P1_BUTTON2 bit6=P1_BUTTON3(tdragon2 only) bit7=unused; bits[14:8]=same 7-bit patt
- NMK16_Macross2.sv:334 joystick_0/1 bit convention (MiSTer standard): [0]=Right [1]=Left [2]=Down [3]=Up, then buttons assigned sequentially starting at [4] in the SAME order CONF_STR's own "J1,..." list declares them above (Button1=[4], Button2=[5], Button3=[6],
- NMK16_Macross2.sv:347 Keyboard: MAME's default key bindings, always active, ORed with the joysticks.
- NMK16_Macross2.sv:352 P1: Up/Down/Left/Right arrows, B1 LCtrl, B2 LAlt, B3 Space, Start 1 P2: R/F/D/G, B1 A, B2 S, B3 Q, Start 2 Coin 1 = 5, Coin 2 = 6, Service (IPT_SERVICE1) = 9 Test / Service Mode = F2: a TOGGLE, as in MAME, flipping DSW1 SW1:8 (PORT_SERVICE_
- NMK16_Macross2.sv:359 button 4 (powerins): Left Shift / W, MAME's defaults
- NMK16_Macross2.sv:442 Bit 7 of each player byte is BUTTON4 on Power Instinct (nmk16.cpp INPUT_PORTS_START(powerins)); tdragon2/macross2 leave it unused (the port is active low, so an undriven bit reads 1 = released), which is why it is only driven in the powerin
- NMK16_Macross2.sv:456 Both tdragon2.mra and macross2.mra pack DSW1 at status[7:0] and DSW2 at status[15:8] (byte order matches the core's own address decode, sel_dsw1 before sel_dsw2 — same for both games, see either .mra's own header for the derivation), so thi
- NMK16_Macross2.sv:571 F2 toggles it like MAME's Service Mode key, on top of whatever the OSD DIP setting is.
- NMK16_Macross2.sv:632 VTIMING_FILE: nmk_irq.sv's own V-PROM (tdragon2's own "10.bpr", ROM_START(tdragon2), nmk16.cpp:8357-8358) has no HW_ROMS gating at all — it's always loaded via $readmemh, baked into the bitstream at synthesis time rather than through ioctl_
- NMK16_Macross2.sv:640 Without this, vtiming_prom is never initialized (stays all-zeros), silently breaking frame-IRQ/ sprite-DMA-trigger timing on real hardware despite a clean compile — this file must exist locally at quartus_map time (generated the same way th
- NMK16_Macross2.sv:744 Cheats (rtl/cheats.sv) — Pugsy's MAME cheat database, seven fixed slots with this game's addresses supplied by the .mra as <rom index="5">.
- NMK16_Macross2.sv:1236 tdragon2 is ROT270 in MAME, i.e. the board's image has to be turned counter-clockwise to stand upright, which is screen_rotate's rotate_ccw=1 case ("Vert 270"); "Vert 90" is rotate_ccw=0, the opposite quarter-turn, for cabinets whose vertic
- rtl/bjtwin/video_timing.sv:7 Reset-time raster phase: `vcount` resets to `VACTIVE_END` (240, the first scanline of vblank), not 0 — confirmed directly against real MAME's own screen device (Family D bring-up investigation, tdragon1): `screen.vpos()` at machine time 0 s
- rtl/bjtwin/video_timing.sv:11 Measured two independent ways that agree: (1) a MAME Lua memory-read tap on the protection MCU's own P5 register (`screen.vpos()>>2`, the *exact* value real game code observes) showed vpos in [44,47] at real time 5.260ms after machine start
- rtl/bjtwin/video_timing.sv:41 MAME's manybloc_scanline fires off screen vpos, and vpos 0/248 line up with vcount 0/248 exactly under this window.
- rtl/cheats.sv:1 Cheat engine — applies Pugsy MAME-database pokes to work RAM once a frame.
- rtl/cheats.sv:23 Poke semantics follow MAME's "run" state: the value is written every frame for as long as the cheat is enabled, which is what makes "infinite" cheats hold against the game decrementing the counter.
- rtl/macross2/video_macross2.sv:2 Confirmed directly from the reference: `VIDEO_START_MEMBER(nmk16_state,macross2)` (nmk16_v.cpp:150-162) creates a `common_get_bg_tile_info<0,1>`-driven, `tilemap_scan_pages`-mapped, 256x32-tile (16x16 px) BG tilemap — the SAME BG geometry `
- rtl/macross2/video_macross2.sv:16 **No NMK214 descrambling** — macross2 has no protection MCU at all (`init_banked_audiocpu` only, nmk16.cpp:10736); bgtile/sprites ROM data is read directly, unlike video_macross.sv's own two live nmk214 instances.
- rtl/macross2/video_macross2.sv:20 **5-bit sprite colour, not 4** — `macross2()`'s own machine config uses `get_colour_5bit` (nmk16.cpp:5457, `colour &= 0x1f`), not `get_colour_4bit` every single prior port in this project has used.
- rtl/macross2/video_macross2.sv:23 `gfx_macross2`'s own GFXDECODE_START (nmk16.cpp:4194-4198) confirms the palette layout this requires: sprites at colour base `0x100` with **32** colours (`0x100-0x2FF`, matching the 5-bit index exactly), NOT `0x200` like macross's/gunnail's
- rtl/macross2/video_macross2.sv:34 Per-scanline raster scroll: macross2/tdragon2 (RASTER_SCROLL=0) have a single `scroll_w<0>` register (nmk16.cpp:1094) — `bg_xscroll`/ `bg_yscroll` below are frame-constant register inputs.
- rtl/macross2/video_macross2.sv:36 raphero (RASTER_SCROLL=1, VIDEO_START gunnail) instead has the two 256-word tables gunnail_scrollram/scrollramy, applied per bitmap line by nmk16_v.cpp bg_update(): for bitmap line y (16..239, i == y1 there), yscroll = scrollramy[0] + scrol
- rtl/macross2/video_macross2.sv:76 Sizes the sim array and the tile-code wrap (MAME draws code % elements, elements = bytes/128); the powerins mode's 16-bit code never wraps.
- rtl/macross2/video_macross2.sv:86 NMK214=1: BG bytes and sprite words pass through the two NMK214 descramblers (nmk16.cpp base_nmk214_215), configured by the protection MCU through nmk214_cfg_we/data.
- rtl/macross2/video_macross2.sv:148 HW_ROMS=1: 1 = the sprite region streams in ROM_LOAD16_WORD_SWAP (or odd-chip-first byte-pair) order, so the byte cache inverts address bit 0 (see the sprite cache comment); 0 = a plain ROM_LOAD byte ROM in MAME's own order (bioship, strahl
- rtl/macross2/video_macross2.sv:192 1 = every tile byte's nibbles are swapped (MAME's *_packed_lsb layouts: gfx_powerinsc).
- rtl/macross2/video_macross2.sv:196 Afega boards (2026-09-13, Family H on the Gunnail rbf): bg_8bpp: the BG is MAME's tilelayout_8bpp — the ROM region's two halves each hold a col_2x2_group 4bpp tile; MAME's decoder puts plane 0 in the pixel's MSB, so the FIRST half is the hi
- rtl/macross2/video_macross2.sv:207 bg_code_mod12k: the 8bpp region holds 12288 tiles per half (a 3 MB region: bubl2000) — MAME's gfx element indexing wraps the code modulo the element count, which a power-of-two mask cannot do.
- rtl/macross2/video_macross2.sv:214 Family E bootlegs (2026-09-14, Gunnail rbf): static byte bitswaps MAME applies to the raw GFX ROMs once at init, applied here to every fetched tile byte before the nibble extraction instead (the .mra streams the raw files): gfx_swap34 = dec
- rtl/macross2/video_macross2.sv:261 The real board's sprite DMA holds the 68000 off the bus for the ~200us the copy takes; MAME copies the whole table in an instant.
- rtl/macross2/video_macross2.sv:276 bgvideoram_w<Layer>/scroll_w<Layer> (nmk16.cpp:465-503): macross2's own bgvideoram is FOUR "banks" of the same 8192-tile-position tilemap (0x10000 bytes vs. every other port's own 0x4000 — see module header), selected by bits[5:4] of the sc
- rtl/macross2/video_macross2.sv:318 pixel readback for the testbench (mirrors MAME's screen:pixel(x,y))
- rtl/macross2/video_macross2.sv:331 set_scrolldx(28+64,28+64) and the sprite generator's videoshift(28+64) — both in MAME BITMAP coordinates, see BITMAP_X0 below
- rtl/macross2/video_macross2.sv:332 MAME positions tilemaps and sprites in BITMAP coordinates: the bitmap spans the whole raster (512x278) and the visible area starts at bitmap (28,16) — the hblank/vblank widths.
- rtl/macross2/video_macross2.sv:334 scrolldx(92) therefore means tilemap x = bitmap_x - 92 + scrollx = screen_x + 28 - 92 + scrollx (hence MAME's own "leftmost 64 pixels have to be retrieved from the other side" comment), tilemap y = screen_y + 16 + scrolly, and a sprite at X
- rtl/macross2/video_macross2.sv:350 MAME set_screen_midres (nmk16.cpp): raw 448 x 278 at 7 MHz, visible x 60..379 (320 px) — bitmap origin (60,16), the same 64 us line as the 512 x 8 MHz raster this module's callers run (448/7 MHz = 512/8 MHz), so the raster is unchanged and
- rtl/macross2/video_macross2.sv:355 Sprite generator: set_mask(0x3ff, 0x3ff) — 10-bit coordinates, wrap modulus 1024 (nmk16spr.cpp: `if (sx > max_x) sx -= xpos_max`), against 0x1ff/512 for the hi-res boards; max_sprite_clock 448*263.
- rtl/macross2/video_macross2.sv:514 Layer B's prefetch stream shares port B with the sprite fetch, real-time stream first: the sprite pass is a background compositing pass that simply runs slower while a two-layer game is drawing (its MAME budget is 25 % smaller on the lowres
- rtl/macross2/video_macross2.sv:591 Sprite ROM byte order on the hardware path: the ROMs are ROM_LOAD16_WORD_SWAP, and MAME's graphics decoder reads the region BYTE-wise from the swapped memory image, where byte b is raw file byte b^1 (the sim's $readmemh array is built that
- rtl/macross2/video_macross2.sv:681 Palette decode: RRRRGGGGBBBBRGBx (emupal.cpp RRRRGGGGBBBBRGBx_decoder)
- rtl/macross2/video_macross2.sv:761 cfg_rt: the full 14-bit (bank[1:0], code[11:0]) masked to the ROM's tile count (MAME: code % elements, a power of two for every board but the sprites' — see spr_units); the parameter form is the same for the two masks it can express.
- rtl/macross2/video_macross2.sv:782 one 256-colour bank: tilelayout_8bpp's planes 0-3 (the FIRST half, layer A) are MAME's pixel bits 7-4, planes 4-7 (the second half, layer B) bits 3-0
- rtl/macross2/video_macross2.sv:826 Found by comparing real-hardware captures against MAME snapshots, see docs/hw-bringup.md.
- rtl/macross2/video_macross2.sv:897 MAME copies the table atomically at the trigger (`sprite_dma()` from the scanline timer), as real hardware does.
- rtl/macross2/video_macross2.sv:1103 powerins mode only (get_flip_extcode_powerins, attr bit 12): the unit's SOURCE columns are mirrored (nmk16spr.cpp draws each tile with flipx through gfx->transpen) and the units are placed right to left (sx += delta*w, xinc negated) while t
- rtl/macross2/video_macross2.sv:1119 Tile code wraps modulo the ROM's element count (MAME: gfx_element does code %= total_elements).
- rtl/macross2/video_macross2.sv:1123 hachamf draws its big character sprite (the one over GAME OVER, and on the name-entry screen) with code 0x81D6 = 33238 against spr_units = 8192: MAME gives tile 33238 % 8192 = 470, the old chain gave 33238 - 2*8192 = 16854, which is not jus
- rtl/macross2/video_macross2.sv:1176 NMK214 descramble (NMK214=1) — per-fetch, exactly what MAME's decode_nmk214() precomputes: BG byte at byte address A becomes decode_byte(A, rom[A]); the big-endian sprite word at word address W becomes decode_word(W, word).
- rtl/macross2/video_macross2.sv:1181 Address bitswap tables: nmk16.cpp nmk214_bg_address_bitswap / nmk214_sprites_address_bitswap.
- rtl/macross2/video_macross2.sv:1444 Tiles that lie wholly outside the screen are skipped on their first pixel (MAME clips them too); the game keeps plenty of off-screen objects in its table, and walking their 256 pixels each (and fetching their ROM data) was a large part of w
- rtl/macross2/video_macross2.sv:1522 Reference (nmk16_v.cpp screen_update_macross draws m_spriteram_old2, sprite_dma() shifts old2 <- old <- mainram at line 242, the frame is rendered at VBOUT 240 before that DMA): frame j shows the table from DMA j-2.
- rtl/macross2/video_macross2.sv:1525 Pure RTL measurement — no MAME frame-index alignment involved.
- rtl/nmk112/nmk112.sv:6 Register interface: 8 write-only bank-select registers, addressed offset 0-7 (`okibank_w(offset,data)`, nmk112.cpp:86-98).
- rtl/nmk112/nmk112.sv:12 Address remap: PURE address-range decode, no awareness of which of jt6295's own 4 internal ADPCM channels issued a given fetch — confirmed directly from nmk112.cpp's own `oki_map()`/`oki_bank` (nmk112.cpp: 105-130): each OKI's own logical 0
- rtl/nmk112/nmk112.sv:23 Confirmed by reading jt6295's own internal channel round-robin (`rtl/third_party/jt6295/ hdl/jt6295_serial.v`'s own `ch` register) — it is NOT exposed on jt6295's own top-level port list, and (per the address-only nature of nmk112.cpp's own
- rtl/nmk112/nmk112.sv:31 Paged mode ("sample address table" independent per-voice banking, nmk112.cpp:6-9's own header comment): `is_paged(chip) = BIT(m_page_mask,chip)`, and the device's own default constructor value is `m_page_mask(0xff)` — since none of this pro
- rtl/nmk112/nmk112.sv:36 In paged mode, the FIRST 0x400 bytes of the chip's own ENTIRE logical address space (not per-window — confirmed: `map(0x00000,0x000ff)`..`map(0x00300,0x003ff)` are absolute, not offset by any bank window) are overlaid: sub-range N*0x100..N*
- rtl/nmk112/nmk112.sv:79 The core drives `hold` = "a gated cen is passing this clock"; the write is captured and applied on the next clock, after the latch — a 25 ns shift, far inside MAME's own sub-sample write/fetch ordering.
- rtl/nmk112/nmk112.sv:109 nmk112.cpp:93/96 mask every written page index with `data & m_bankmask[chip]` before storing it (m_bankmask is size-1 for a power-of-two page count, which every real OKI ROM in this hardware family is — 0x80000/0x100000/0x200000/0x400000 al
- rtl/nmk_irq/nmk_irq.sv:10 MAME's own nmk_irq_device does NOT consume the H-timing PROM at all (commented out in nmk_irq.h/.cpp, and that file's own "TODO: Horizontal timing generator emulation?") — screen geometry instead comes from the fixed per-resolution-class pi
- rtl/nmk_irq/nmk_irq.sv:18 Every game using this hardware calls set_interrupt_timing() in nmk16.cpp unconditionally with the SAME fixed configuration (prom_start_offset=0x75, vtiming_prom_usage=0x100) — only the V-PROM's own 256-byte contents vary per game — so those
- rtl/nmk_irq/nmk_irq.sv:29 Verified via a live MAME debugger capture (breakpoints at mustang's own IRQ1-4 ISR entry addresses, resolved from the ROM's own autovector table, printing the debugger's `beamy` pseudo-symbol) against mustang's real, dumped V-PROM (`10.bpr`
- rtl/rom_cache_n.sv:7 Why (docs/hw-bringup.md, "Slowdown"): the real board and MAME run the 68000 with zero wait states from EPROM.
- rtl/rom_cache_n.sv:8 Through the 1-line rom_cache1 56% of ROM bus cycles missed (the instruction stream and the game's ROM data-table reads thrash a single pair) and each miss is a ~10 clk_sys SDRAM round trip, 1-2 wait states — 13-20% of every frame spent stal
- rtl/savestate/savestate_ui.sv:4 Slot 2 is on F5 and NOT F2 because every top level here already uses F2 for the Service Mode toggle (MAME's binding), and both were acting on the same press -- found on the board in the sibling Sand Scorpion core, 2026-09-20, which shares t
- rtl/tdragon2/tdragon2_core.sv:11 This merge exists because `tdragon2()` and `macross2()`'s own machine configs (nmk16.cpp:5490-5533 / 5444-5488) are BYTE-FOR-BYTE IDENTICAL (same 68000/Z80 clocks, same macross2_sound_map/io_map — literally the same functions — same gfx_mac
- rtl/tdragon2/tdragon2_core.sv:36 Difference (the one genuine runtime behavior split) — mainram address-line swap (nmk16.cpp:280-288,1100-1104): `tdragon2_map` is `macross2_map(map)` plus one override, `map(0x1f0000,0x1fffff).rw(mainram_swapped_r,mainram_swapped_w)`, which
- rtl/tdragon2/tdragon2_core.sv:49 CRITICAL: this swap applies ONLY to the 68000 CPU-facing bus handler (mainram_swapped_r/w, both directions) — it does NOT apply to MAME's own sprite-DMA snapshot mechanism.
- rtl/tdragon2/tdragon2_core.sv:51 Confirmed directly: `sprite_dma()` (nmk16.cpp:4518-4524, the SAME shared function every game in this driver uses, including tdragon2 via nmk_irq's own sprite_dma_cb) does a raw C++ `memcpy(m_spriteram_old.get(), m_mainram + m_sprdma_base/2,
- rtl/tdragon2/tdragon2_core.sv:192 MAME runs it silent (no YM2203 on the PCB, "needs emulation of the mechanism used to simulate the missing YM2203's IRQs"); the PCB works with a YM fitted and the sound program is tdragon2's, so this core keeps the YM2203 and plays the full
- rtl/tdragon2/tdragon2_core.sv:206 game_pi_gfxlsb (powerinsc): gfx_powerinsc — every tile byte's nibbles swapped (packed_lsb), the 8x8 layer's ROM at +0x280000 of the BG region, the sprite ROMs loaded as byte pairs (MAME marks the set not working: its sprite format is undeci
- rtl/tdragon2/tdragon2_core.sv:308 per-source audio taps (sim level checks against MAME's routes)
- rtl/tdragon2/tdragon2_core.sv:330 pixel readback for the testbench (mirrors MAME's screen:pixel(x,y))
- rtl/tdragon2/tdragon2_core.sv:363 IN0 (nmk16.cpp tdragon2/macross2 INPUT_PORTS): coin/start/service, active low, low byte only.
- rtl/tdragon2/tdragon2_core.sv:654 MAME has 4 MHz with a "?" (nmk16.cpp macross2()), but the TD2 schematic clocks the Z80 (U52 pin 6, SND.CLOCK) from U67A's 12 MHz/2 output through U49C -- the same 6 MHz node U48A/U48B divide by 4 for the YM2203's known 1.5 MHz -- and the pa
- rtl/tdragon2/tdragon2_core.sv:687 MAME clocks both OKIs at XTAL(16MHz)/4 with pin 7 LOW (nmk16.cpp's macross2/tdragon2 config: `OKIM6295(config, m_oki[n], XTAL(16'000'000) / 4, PIN7_LOW)`), i.e. a 4MHz/165 = 24.24kHz sample rate, and jt6295's `cen` IS the chip clock (its ow
- rtl/tdragon2/tdragon2_core.sv:692 This used to be 1MHz (40MHz/40): every sample played four times too slow and two octaves too low — the "muddled" drums, voices and effects heard on real hardware; measured as the hardware spectrum sitting ~4-6 dB below MAME's at 2-4kHz and
- rtl/tdragon2/tdragon2_core.sv:803 powerins_map differs (nmk16.cpp:1193): 1 MB ROM, palette 0x120000- 0x120FFF (2048 entries), bgvram 0x140000-0x143FFF, mainram 0x180000- 0x18FFFF, 0x100016 a plain nopw (no Z80 reset), no soundlatch2 read.
- rtl/tdragon2/tdragon2_core.sv:924 16 pairs + next-pair prefetch instead of rom_cache1's single pair: see rtl/rom_cache_n.sv (68000 slowdown vs MAME).
- rtl/tdragon2/tdragon2_core.sv:1798 MAME takes the page from scroll X hi [5:4] instead (scroll_w); both agree whenever the game writes both.
- rtl/tdragon2/tdragon2_core.sv:1804 powerins: plain scroll_w<0>, one 8192-word VRAM, no bank; tdragon3h: MAME's scroll_w (own PCB, unverified)
- rtl/tdragon2/tdragon2_core.sv:1897 powerins_sound_map (nmk16.cpp:1219): 0000-BFFF flat ROM (no bank register, no A000 hole), C000-DFFF RAM, E000 soundlatch read; no soundlatch2 and E001 is a nop (the driver writes it once).
- rtl/tdragon2/tdragon2_core.sv:1933 tdragon3h: tdragon2's, with the single OKI's data (MAME "oki2") in the oki1 slot (0x6C0000) — no 2 MB filler for the absent chip.
- rtl/tdragon2/tdragon2_core.sv:2000 oki_rom_cache (16 four-byte lines, next-line prefetch), not the 1-line rom_cache1_byte: Macross II's music driver already spends ~83% of each YM2203 Timer A period in its tick handler at 4 MHz (measured in MAME), so a few WAIT cycles per mi
- rtl/tdragon2/tdragon2_core.sv:2079 Its old compressed ~29 dB curve put Macross II's SSG lines, which only use volumes 1-7, ~9 dB too loud (the PCB owner's "high notes too pronounced"); with COMP 5 the SSG lands within 0.4 dB of MAME (MAME's YM2203 write log replayed into jt0
- rtl/tdragon2/tdragon2_core.sv:2131 oki1_rom (chip 1 / MAME tag "oki2") is sized 0x200000/ 21-bit-addressed for both games (macross2's own real chip is half that — harmless, see header); its own OKI2_ROM_FILE simply loads into the low half when macross2's own smaller image is
- rtl/tdragon2/tdragon2_core.sv:2323 Audio mix — mono (no separate panning info anywhere in this driver): jt03's FM and SSG outputs (scaled to MAME's FM:SSG routes below) plus both OKI chips' own 14-bit `sound`, summed in a wider accumulator then saturated to 16 bits rather th
- rtl/tdragon2/tdragon2_core.sv:2328 Balance follows MAME's routing for these boards: FM at 1.20, each OKI at 0.10 (nmk16.cpp macross2 config).
- rtl/tdragon2/tdragon2_core.sv:2329 MAME's OKI stream is a 16-bit full-scale signal, i.e. jt6295's 14-bit `sound` x4, so the OKI-to-FM ratio is (4 x 0.10) / 1.20 = 1/3 of the 14-bit value; 3/8 below is the nearest cheap shift-add.
- rtl/tdragon2/tdragon2_core.sv:2332 The previous mix put each OKI at x4 — full 16-bit scale next to the FM, ~12x louder than MAME — which, together with the wrong OKI clock above, is what swamped the music.
- rtl/tdragon2/tdragon2_core.sv:2339 x 3/2 (was 3/8 -- measured 8-13dB quiet vs MAME's real OKI:FM balance); tdragon3h: chip not fitted
- rtl/tdragon2/tdragon2_core.sv:2341 YM2203: FM (16-bit, same scale as MAME's stream) plus the SSG sum (3 x 0..255).
- rtl/tdragon2/tdragon2_core.sv:2342 MAME routes FM 1.20 and each SSG channel 0.50 with a 16382 full scale, so one channel at full volume = 16382 x 0.5/1.2 = 6826 FM units = 255 x 26.8 -> x27.
- rtl/tdragon2/tdragon2_core.sv:2568 The games read their Flip Screen DIP and write bit 0 of the flipscreen register (nmk16_v.cpp flipscreen_w -> flip_screen_set + m_spritegen->set_flip_screen); the register was being latched here and then ignored, so the DIP did nothing on an
- rtl/tdragon2/tdragon2_core.sv:2572 MAME flips the tilemaps and mirrors the sprite coordinates internally, but for a full-screen window the net result is exactly a 180-degree rotation of the visible area -- measured, not assumed: tdragon2 frame 600 with the DIP on is bit-iden
- rtl/tdragon2/tdragon2_core.sv:2577 So the readback coordinates are mirrored here, which reproduces MAME by construction and leaves the tilemap/sprite/prefetch pipeline alone.
- README.md:23 Sets MAME flags `MACHINE_NOT_WORKING` are out of scope until MAME can run them.
- README.md:26 Verify against MAME as the golden reference before hardware bring-up: MAME Lua tracers dump bus cycles, frames and RAM state, and Verilator testbenches diff the
- README.md:28 Hardware is then compared to MAME with HDMI screenshots and audio captures.
- README.md:31 MAME is used as a behavioural reference only.
- README.md:31 No MAME code is part of the built core.
- README.md:72 | Core (`releases/*.rbf`) | Hardware | Games (MAME set names) |
- README.md:74 | `NMK16_Macross2` | 68000 + Z80 sound, YM2203, 2x OKIM6295 with NMK112 banking; hi-res and Power Instinct's 320-px board as runtime modes, plus the bootleg boa
- README.md:76 | `NMK16_Gunnail` | NMK004 sound MCU, YM2203, 2x OKIM6295; NMK-215/113/110 protection MCUs with dual NMK214; hi-res per-line scroll (GunNail), the nine lowres N
- README.md:81 Audio is compared band by band against MAME captures.
- README.md:91 The four that do not ship are all `MACHINE_NOT_WORKING` in MAME itself, for reasons MAME states on its own `GAME` lines, and are outside this project's goal unt
- README.md:96 | Set | MAME's reason | Here |
- README.md:99 | `macrossbl` | *"not looked at yet"* | Not attempted — MAME has not characterised this bootleg at all, so there is nothing to port against. |
- README.md:126 Player inputs follow MAME's default key layout.
- README.md:226 The simulations read ROM images built from the MAME zips with the scripts in `tools/`.
- README.md:246 | `sim/oracle/`, `sim/compare/` | MAME Lua tracer and trace comparison |
- README.md:287 jt6805 is a **microcoded** design, and the control store is not jotego's. `rtl/m68705/6805.uc` (4096 x 39 bits) and the `6805.vh` / `6805_param.vh` headers that
- README.md:315 The behavioural reference is [MAME](https://github.com/mamedev/mame), in particular `src/mame/nmk/nmk16.cpp`, `nmk16_v.cpp`, `nmk16spr.cpp`, `nmk214.cpp`, `nmk0
- README.md:324 The project structure and the simulate-against-MAME methodology follow [kaneko16-mister](https://github.com/alphanu1/kaneko16-mister) and the MiSTer-devel arcad
- README.md:339 The MAME source tree and the arcade ROM images are not part of this repository and are not covered by this licence.
Says it matches, follows or was checked against MAME — 7
- rtl/bjtwin/video_timing.sv:22 This was NOT assumed or guessed: every prior port's own polling loops tolerated the old vcount=0 reset silently (it only ever showed up as an already- documented, bounded residual cycle-cost mismatch in verification), and this project spent
- rtl/bjtwin/video_timing.sv:64 see header — matches MAME's own reset-time raster phase
- rtl/macross2/video_macross2.sv:340 Before this conversion the whole picture sat 28 pixels right and 16 lines down of MAME's (measured: shifting a sim frame by (-28,-16) matched MAME's snapshot on 96.5% of all pixels), pushing the rightmost 28 columns and bottom 16 rows off-s
- rtl/macross2/video_macross2.sv:1361 Latching in the same cycle as the address change (as this once did) delivered every word one offset late — the visible flag from the previous slot's colour word, the size from the flag word, the code from the size word — which is why moving
- rtl/nmk_irq/nmk_irq.sv:24 Phase calibration (empirically verified, not derived from documentation alone): MAME's own screen.vpos() — the `y` the reference's address formula uses directly — is NOT the same numbering as this project's own video_timing.sv `vcount` (bot
- rtl/tdragon2/tdragon2_core.sv:1667 vid_mainram_addr/dout is DELIBERATELY UNSWAPPED — see header ("Difference 1"): it mirrors MAME's own raw sprite_dma() memcpy, which bypasses the swapped bus handler entirely.
- README.md:79 Each core is pixel-identical to MAME in simulation for the whole attract sequence that timing allows, and pixel-identical in hardware screenshots of static scen
Says it was translated, ported or taken from MAME — 2
- rtl/nmk112/nmk112.sv:2 Ported directly from mame/src/devices/machine/nmk112.cpp (131 lines, read in full before implementing — every detail below is confirmed against that source, not assumed).
- rtl/nmk_irq/nmk_irq.sv:5 Ported directly from mame/src/mame/nmk/nmk_irq.cpp's own scanline_callback() — see that file's extensive header comment for the hardware background (dual counters + H/V timing PROMs inside the NMK902 custom chip).
Shares text with the MAME driver without saying so — 13
- rtl/macross2/video_macross2.sv:3 `VIDEO_START_MEMBER(nmk16_state,macross2)` (nmk16_v.cpp:150-162) creates — shares text with nmk/nmk16_v.cpp:150
- rtl/macross2/video_macross2.sv:4 a `common_get_bg_tile_info<0,1>`-driven, `tilemap_scan_pages`-mapped, — shares text with nmk/nmk16_v.cpp:123
- rtl/macross2/video_macross2.sv:331 set_scrolldx(28+64,28+64) and the sprite generator's videoshift(28+64) — both in MAME BITMAP coordinates, see BITMAP_X0 below — shares text with nmk/nmk16_v.cpp:160
- rtl/macross2/video_macross2.sv:336 scrollx (hence MAME's own "leftmost 64 pixels have to be retrieved — shares text with nmk/nmk16_v.cpp:159
- rtl/macross2/video_macross2.sv:648 BG tile-fetch address — gfx_8x8x4_col_2x2_group_packed_msb layout: — shares text with nmk/nmk16.cpp:4184
- rtl/macross2/video_macross2.sv:737 tilemap_scan_pages: (row&0xf) | ((col&0xff)<<4) | ((row&0x10)<<8) — shares text with nmk/nmk16_v.cpp:36
- rtl/macross2/video_macross2.sv:752 common_get_bg_tile_info<0,1>: (code&0xfff)|(m_bgbank<<12) — 14-bit — shares text with nmk/nmk16_v.cpp:123
- rtl/macross2/video_macross2.sv:788 palette base and tile ROM; common_get_bg_tile_info<1, Gfx> — the — shares text with nmk/nmk16_v.cpp:107
- rtl/macross2/video_macross2.sv:829 TILEMAP_SCAN_COLS 8,8,32,32 — 256 logical px, the whole screen), so — shares text with nmk/nmk16_v.cpp:108
- rtl/macross2/video_macross2.sv:1182 nmk214_bg_address_bitswap / nmk214_sprites_address_bitswap. — shares text with nmk/nmk16.cpp:5700
- rtl/tdragon2/tdragon2_core.sv:40 applies `bitswap<16>(offset,15,14,13,12,11,7,9,8,10,6,5,4,3,2,1,0)` to the — shares text with nmk/nmk16.cpp:282
- rtl/tdragon2/tdragon2_core.sv:54 `memcpy(m_spriteram_old.get(), m_mainram + m_sprdma_base/2, 0x1000)` — — shares text with nmk/nmk16.cpp:4522
- rtl/tdragon2/tdragon2_core.sv:810 tdragon3h_map: "bootleg has these 2 swapped" — DSW2 at 0x10000E, the — shares text with nmk/nmk16.cpp:1106