← コア一覧
RackEmUp_20261010_v1.1 (Eggsecutioner528)
MAMEのドライバにない実基板の資料を引用 — 2
- README.md:77 The real board was studied from the schematics and the MAME driver (`battlnts.cpp`, which covers the whole GX765 and GX777 family).
- README.md:87 This core was developed with substantial assistance from **Claude** (Anthropic's AI assistant) and, earlier in the project, Google's **Gemini**, used for RTL im
「実機」で確認したと記載 — 2
- RackEmUp.sv:273 Same fix as Battlantis (Test 230, confirmed on real hardware) and Rack 'Em Up.
- rtl/k007420.v:591 The OLD flat approach here (a single zoom_unit_step = floor(1024/zoom_raw), multiplied by n) is NOT the same value in general -- for most single, isolated sprites the drift is sub-pixel and invisible, but for MULTI-PIECE composites (e.g. th
MAMEのソースを引用 — 62
- RackEmUp.sv:88 Round 9 (2026-09-12): real DIP switches, confirmed directly from bladestl_mame.cpp's INPUT_PORTS_START(bladestl_joy)/konamipt.h's KONAMI_COINAGE_ALT_LOC macro.
- RackEmUp.sv:123 Factory defaults: with every option on its first entry the DIP switches read exactly as MAME's rackemup defaults (3 balls, 20s to aim, difficulty Normal, demo sounds On, upright with single controls, coinage 1 coin 1 credit).
- RackEmUp.sv:300 IRQ/FIRQ/NMI: confirmed from bladestl_mame.cpp's vblank_w() (Round 7): `if (state && m_k007342->is_int_enabled()) m_maincpu->set_input_line( HD6309_FIRQ_LINE, HOLD_LINE);` -- K007342's vblank interrupt drives the CPU's FIRQ line specificall
- RackEmUp.sv:306 - NMI: the real 051733 has its own NMI timer (`set_nmi_cb()` in bladestl_mame.cpp) that jt051733.v does not implement (a known, documented gap -- see design_notes/jt051733_vs_mame_k051733.md's "NMI timer/enable (0x10-0x13) entirely unimplem
- RackEmUp.sv:314 MAME's HOLD_LINE is cleared only when that specific interrupt is taken.
- RackEmUp.sv:342 Main CPU program ROM: one contiguous 64KB image, loaded verbatim from ioctl_addr 0x00000-0x0FFFF -- matches the real 27512 EPROM exactly (confirmed from bladestl_mame.cpp: ROM_LOAD("797-t01.19c", 0x00000, 0x10000, ...), a single 64KB file,
- RackEmUp.sv:345 CPU addr 0x8000-0xffff maps straight to ROM offset 0x8000-0xffff (MAME's `map(0x8000, 0xffff).rom();`, no bank offset); CPU addr 0x6000-0x7fff is a banked 8KB window into ROM offset [bank*0x2000 : +0x2000], bank 0-3 selected by bankswitch_w
- RackEmUp.sv:368 MAME battlnts: bankswitch_w, bits 6 and 7 select the 16 KB bank
- RackEmUp.sv:369 MAME battlnts: spritebank_w
- RackEmUp.sv:447 Address decode (MAME battlnts.cpp main_map).
- RackEmUp.sv:468 Confirmed from bladestl_mame.cpp's machine_config: pixel clock 24MHz/4 = 6MHz (48MHz clk_sys / 8), 384 total H / 256 visible, 264 total V / 16-240 visible -- the exact same convention already proven correct for Battlantis/Rack 'Em Up (same
- RackEmUp.sv:513 051733 NMI TIMER (Round 50) -- MAME k051733_device::nmiclock_w() and write(), ported 1:1.
- RackEmUp.sv:517 MAME: on every vblank start the 16 bit timer is decremented; if it was 0 and reg $12 bit 0 is set, NMI is pulsed for 4 chip clocks (about one CPU E cycle; held for 20 clk_sys here so the CPU's E-clocked NMI sampling always sees it), then th
- RackEmUp.sv:700 Rack 'Em Up uses only tilemap 0 (layer 1 is CPU scratch RAM), per MAME screen_update
- RackEmUp.sv:766 MAME gfx_battlnts_spr: colour base 64 (4 * 16)
- RackEmUp.sv:832 PALETTE RAM (0x2400-0x245f, 96 bytes = 48 entries x 2-byte xBGR_555) -- confirmed exact size from bladestl_mame.cpp: `map(0x2400, 0x245f).ram().w(...).share("palette")`.
- RackEmUp.sv:850 PLAYER INPUTS / DIP SWITCHES (MAME battlnts.cpp INPUT_PORTS rackemup, konamipt.h macros)
- RackEmUp.sv:970 MAME decides transparency on the raw pixel only, so those pixels are drawn black; here they were dropped: every sprite lost its black outline pixels (228 of 280 test states, median 1125 pixels).
- RackEmUp.sv:973 MAME redraws the priority (category 1) tiles OPAQUE over the sprites, pixel 0 included
- RackEmUp.sv:994 SOUND (Z80 + two YM3812), rtl/rackemup_sound.v. Z80 at 24 MHz / 6 = 4 MHz, YM3812 at 24 MHz / 8 = 3 MHz (MAME battlnts.cpp).
- RackEmUp.sv:1026 DE and the colour gating used the undelayed active_area, so the first 2 output pixels of every line were stale and the last 2 picture pixels were cut off (measured against MAME: tiles and sprites both dh = +2).
- rtl/k007342.v:15 2026-09-12 (Round 12, Blades of Steel bring-up): selects between two real, different compositing behaviors this chip supports depending on how a specific game's own screen_update() sequences its tilemap/ sprite draws: 0 (default) -- Battlan
- rtl/k007342.v:26 1 -- Blades of Steel's own behavior, confirmed directly from bladestl_mame.cpp's screen_update(): `tilemap_draw(1,OPAQUE)` (layer1 as the opaque BASE) -> `sprites_draw()` -> `tilemap_draw (1,cat1,OPAQUE)` (layer1's own priority tiles redraw
- rtl/k007342.v:42 This is the game's own MAME `tile_callback`, so it differs per game: 0 -- Battlantis / Rack 'Em Up: code |= ((attr & 0x0f) << 9) | ((attr & 0x40) << 2) => tile code = {attr[3:0], attr[6], tile[7:0]} (the original, proven layout) 1 -- Bla
- rtl/k007342.v:210 Reads return VRAM[0]–[7] because the address decoder is incomplete (real hardware behaviour confirmed in MAME).
- rtl/k007342.v:325 The old `v_cnt + 1` for every fetch put every tile but the first one scanline early (measured against MAME: tile layer dv = -1, sprites dv = 0).
- rtl/k007342.v:484 Chosen offline over 146 MAME attract-mode screens (title, roster and demo gameplay): 0 over-subscribed sets on every screen, including the full 64x32 maps of both layers, versus up to 6 sets with the plain index.
- rtl/k007342.v:489 Re-chosen offline on the cache lookups the chip really makes (tap log of the chip testbench, hblank columns excluded, see tap_col_visible) over 162 MAME states (146 attract, 7 earlier dumps, 9 fight) and checked on 136 more from an autoplay
- rtl/k007342.v:552 Bit 7 of this same register is the real K007342's sprite Y-wrap enable flag (k007342_mame.cpp: `m_sprite_wrap_y_cb(BIT(data,7))` on this exact register write) -- tells the K007420 sprite chip to also draw a sprite a second time, offset a fu
- rtl/k007342.v:603 MAME uses ROM_LOAD16_WORD_SWAP for Battlantis graphics, so the correct sequence to un-swap the bytes during fetch is 2'd1 (B,A,D,C).
- rtl/k007342.v:610 Tile flip attributes (MAME k007342 get_tile_info: flags = TILE_FLIPYX((attr & 0x30) >> 4), i.e. attr[4] = flip X, attr[5] = flip Y, for every game).
- rtl/k007342.v:831 Real hardware doesn't do this: `battlnts_mame.cpp`'s `tile_callback` sets `color = 0` unconditionally (never touches attr[7]/bit 0x80), and priority is handled entirely separately via MAME's tilemap draw- category mechanism, not by changing
- rtl/k007342.v:863 MAME's bladestl screen_update has no such rule: tiles cover sprites only through the layer 1 attribute bit 7 and through layer 0, which is drawn last.
- rtl/k007420.v:18 Simplification: MAME's dy sign depends on m_flipscreen, which this core doesn't yet forward dynamically (see task #16) -- assumes non-flipped (dy=-256) for now, correct for normal upright play.
- rtl/k007420.v:544 bladestl's own MAME driver (design_notes/bladestl_mame.cpp) builds an indirect palette table where sprite pens 0x20-0x11f (16 colors x 16 pixel values) each look up a byte in this PROM: `ctabentry = (color_prom[color*16+pixel] & 0x0f) | 0x2
- rtl/k007420.v:589 Real hardware (k007420_mame.cpp) computes each tile's destination boundary individually: `zoom = 0x10000*128/zoom_raw` (a truncated reciprocal) then `boundary(n) = (zoom*n + 4096) >> 13`.
- rtl/k007420.v:602 `floor((1024*n + zoom_raw/2) / zoom_raw)` is algebraically exact to MAME's real double-truncated formula for every zoom_raw (verified by hand for several values before generating these tables) because 8388608 (MAME's 0x10000*128) is an exac
- rtl/k007420.v:738 2026-08-13 (Gemini + Claude): all 5 of MAME's real size codes (000/001/ 010/011/100) are now enumerated explicitly, rather than lumping 000 (16x16) into an implicit "everything else" default alongside the 3 genuinely-reserved/unused codes (
- rtl/k007420.v:741 MAME's own switch handles the same 5 real cases explicitly and falls back to 8x8 ONLY for the 3 reserved ones (k007420_mame.cpp, `m_ram[offs+4]&0x70` default case: width=height=1).
- rtl/k007420.v:744 The previous version's single shared default (15) meant any reserved code got treated exactly like 16x16 -- a real, verified discrepancy that would render a sprite in a box ~4x the area MAME/real hardware uses (correct tile/animation, wrong
- rtl/k007420.v:753 This version explicitly enumerates 000 and 001/010 (whichever a given ternary doesn't already cover) at their correct MAME values, so only the 3 truly-reserved codes reach the new 8x8 fallback.
- rtl/k007420.v:762 reserved 101/110/111 -> MAME default (8x8)
- rtl/k007420.v:768 reserved 101/110/111 -> MAME default (8x8)
- rtl/k007420.v:770 13-bit base 8x8 tile index based exactly on MAME's battlnts_state::sprite_callback:
- rtl/k007420.v:774 Native MAME Konami K007420 Zoom Logic (full 10-bit register): zoom_raw = ram[offs+5] | ((ram[offs+4] & 0x03) << 8); 0x080 (128) = 1:1 scale, < 0x80 enlarges, > 0x80 reduces.
- rtl/k007420.v:780 MAME's real sprites_draw() (k007420_mame.cpp) does NOT scale a multi- tile sprite as one continuous texture -- it loops over each 8x8 source tile independently, computing THAT tile's own destination start position and width in whole destina
- rtl/k007420.v:794 This only agrees with MAME's independent per-tile rounding when zoom_raw==128 (1:1, no scaling) -- at any other zoom factor the two approaches drift apart across a multi-tile sprite's boundaries, producing a visible seam (a duplicated or sk
- rtl/k007420.v:804 That fix (a single flat zoom_unit_step multiplied by tile index) was itself only an approximation of MAME's real per-tile rounding, close enough to fix a single sprite's own internal tile seam but not exact enough for multi-sprite composite
- rtl/k007420.v:821 Y axis: which source tile row true_y_diff (destination-relative Y) falls into, that tile's own destination-space start, and the LOCAL per-pixel source mapping within just that tile (restarting at 0, per MAME's independent per-tile stretch).
- rtl/k007420.v:898 spr_attr[3:0] is bladestl's sprite_callback's `color` (MAME: `color = 0 + (color & 0x0f)`), held stable for this whole sprite's draw.
- rtl/k007420.v:908 13-bit base 8x8 tile index based exactly on MAME's battlnts_state::sprite_callback:
- rtl/k007420.v:922 Signed X position (spr_flags[7] is X MSB: 1 = sprite offset by -256 pixels per MAME ox = spr_x - 256 spec)
- rtl/k007420.v:1216 MAME exact spec: oy = 256 - m_ram[offs+0]
- rtl/k007420.v:1264 Removed the (spr_code_lsb != 0 || spr_attr != 0) clause (2026-08-13, Gemini + Claude collaboration): MAME's real sprites_draw() (see k007420_mame.cpp) has no code==0/color==0 skip -- it only skips on zoom==0.
- rtl/k007420.v:1274 MAME skips a sprite only when its zoom is 0; a sprite whose Y byte is 0 sits at oy = 256, i.e. just below the bottom edge, and with the Y wrap enabled (K007342 register 2 bit 7, always on in Blades of Steel) its copy at oy - 256 = 0 covers
- rtl/k007420.v:1362 Round 53: sprite_x_past_edge is true for the first pixel BEYOND the sprite (pix_x == width); that pixel used to be drawn too (with the clamped last texture column), so every sprite was one column wider than MAME's. On the fight screen the d
- rtl/k007420.v:1371 MAME's sprite_callback zeroes the runtime `color` param, but GFXDECODE_ENTRY("sprites", ..., 4*16, 1) hardcodes color_base=64 (colors 64-79 = palette bank 4) for Battlantis specifically.
- rtl/rackemup_sound.v:4 Same behaviour as the long diagnostic version this replaces (rtl/rackemup_sound.v, kept in the repo history): MAME battlnts.cpp sound map 0x0000-0x7fff ROM, 0x8000-0x87ff RAM, 0xa000-0xa001 YM3812 #1, 0xc000-0xc001 YM3812 #2, 0xe000 sound l
- README.md:33 Put the three zips in `/media/fat/games/mame/`.
- README.md:77 The real board was studied from the schematics and the MAME driver (`battlnts.cpp`, which covers the whole GX765 and GX777 family).
- README.md:87 This core was developed with substantial assistance from **Claude** (Anthropic's AI assistant) and, earlier in the project, Google's **Gemini**, used for RTL im
- README.md:97 **The MAME project** (mamedev.org): `battlnts.cpp`, `k007342.cpp`, `k007420.cpp` and `konamipt.h` were the authoritative reference for the ROM layout, the chip
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 12
- rtl/k007342.v:318 2026-08-16: wrap point matches Battlantis.sv's v_cnt counter, which now wraps at 263 (V-total = 264, fixed to match MAME's real raster -- was 261/V-total=262).
- rtl/k007420.v:13 When set, a sprite positioned such that it would normally be off the visible 0-255 row range also gets tried at a position one full screen height (256px) away, so it doesn't pop in/out abruptly at the top/bottom scroll edge -- matching MAME
- rtl/k007420.v:232 Explicitly excludes anything flagged 32x32 (checked via the real size mask `spr_flags & 8'h70 == 8'h40`, matching MAME's own size switch -- NOT an exact-value check against 0x40, which a first attempt at this used and which incorrectly let
- rtl/k007420.v:711 V-total = 264 lines (0-263), matching MAME screen.set_raw spec Sprite line adjust (SPRITE_Y_ADJ, 0 or 1).
- rtl/k007420.v:712 2026-10-10 GPU frame diffs against MAME: Rack 'Em Up draws every sprite one scanline LATE with 0 (title logo, pool player cutscene and table scene improve from 1.5 to 4.2 percent mismatch to 0.7 percent with 1), while Battlantis demo gamepl
- rtl/k007420.v:723 If the direct position is off the visible 0-255 range and wrap_y is enabled, retry 256px earlier (matches MAME's non-flipped dy=-256); only one of the two positions can ever be on-screen at once for a given sprite.
- rtl/k007420.v:776 spr_flags is OAM byte 4, spr_zoom is OAM byte 5, matching MAME's byte layout exactly.
- rtl/k007420.v:900 The transparency check below still tests the RAW cur_pixel (0 = transparent), matching MAME's own gfx decode order: the indirect lookup only decides which of the sprite's 16 hardware palette entries a non-transparent pixel uses, not whether
- rtl/k007420.v:914 8x16 (y contributes to bit1, matches MAME yoffset={0,2,8,10})
- rtl/k007420.v:915 16x8 (Match MAME mask ~1)
- rtl/k007420.v:1276 The title logo letters and every sprite crossing that edge disappeared (verified against a MAME algorithm reference over 215 states).
- README.md:78 The CPU, sound and chip cores were brought in from open projects (see the credits) and checked against MAME frame by frame, using a GPU accelerated pixel compar
MAMEドライバと同じ文言を含む(出典の明記なし) — 6