← コア一覧
BladesOfSteel (Eggsecutioner528)
MAMEのドライバにない実基板の資料を引用 — 2
- README.md:64 The real board was studied from the schematics, the MAME driver (`bladestl.cpp`) and the sibling Battlantis and Rack 'Em Up cores, which share the K007342 and K
- README.md:82 This core was developed with substantial assistance from **Claude** (Anthropic's AI assistant), used for RTL implementation, cross checking against the MAME dri
「実機」で確認したと記載 — 2
- BladesOfSteel.sv:209 Same fix as Battlantis (Test 230, confirmed on real hardware) and Rack 'Em Up.
- rtl/k007420.v:587 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のソースを引用 — 71
- BladesOfSteel.sv:71 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.
- BladesOfSteel.sv:91 Factory defaults: with every option on its first entry the DIP switches read exactly as MAME's bladestl defaults (Upright, bonus time 30 secs, difficulty Normal, demo sounds On, coinage 1 coin 1 credit on both slots, so each of two players
- BladesOfSteel.sv:236 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
- BladesOfSteel.sv:242 - 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
- BladesOfSteel.sv:250 MAME's HOLD_LINE is cleared only when that specific interrupt is taken.
- BladesOfSteel.sv:278 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,
- BladesOfSteel.sv:281 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
- BladesOfSteel.sv:305 Sound command latch (0x2e80, main CPU write) -- confirmed from bladestl_mame.cpp: a generic_latch_8_device with `set_separate_acknowledge (true)`, so the sound CPU must explicitly acknowledge (sound_map 0x5000 write) to clear the pending/IR
- BladesOfSteel.sv:328 Fixed ROM window (CPU 0x8000-0xffff) maps to the UPPER 32KB of the 64KB image (ROM offset 0x8000-0xffff, MAME's plain identity-mapped `map(0x8000,0xffff).rom()`) -- {1'b1, cpu_addr[14:0]} forces that high bit; a bare cpu_addr[14:0] would al
- BladesOfSteel.sv:351 Address decode -- full map confirmed from bladestl_mame.cpp's main_map(), see design_notes/chip_inventory.md for the derivation.
- BladesOfSteel.sv:387 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
- BladesOfSteel.sv:432 051733 NMI TIMER (Round 50) -- MAME k051733_device::nmiclock_w() and write(), ported 1:1.
- BladesOfSteel.sv:436 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
- BladesOfSteel.sv:462 MAME: `!m_nmi_timer--`
- BladesOfSteel.sv:512 MAME bladestl: port A drives the UPD7759's data pins (the sample number in standalone mode), port B bits 5 to 3 select the UPD7759 ROM bank (128 KB each, 6 banks) and bits 2 to 0 switch the SSG output RC filters (analog, not modelled).
- BladesOfSteel.sv:518 bank = port B bits 5..3, 128 KB per bank (MAME: set_rom_bank((data & 0x38) >> 3))
- BladesOfSteel.sv:702 5-pass draw order (layer1 opaque base -> sprites -> layer1-priority overlay -> layer0, unconditionally on top of everything) behind this explicit mode select, confirmed directly from bladestl_mame.cpp's own screen_update() -- see the port's
- BladesOfSteel.sv:775 confirmed from bladestl_mame.cpp -- see k007420.v's own port comment.
- BladesOfSteel.sv:846 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")`.
- BladesOfSteel.sv:865 Bit layouts confirmed directly from bladestl_mame.cpp's INPUT_PORTS_START(bladestl_joy) and, for the exact KONAMI8_B123/KONAMI_COINAGE_ALT_LOC macro expansions (not visible in the driver file itself), MAME's shared design_notes/konamipt.h (
- BladesOfSteel.sv:880 Keyboard (MAME default keys): coin 5 and 6, start 1 and 2, player 2 on R F D G (up down left right) and A S Q (Pass, Shoot, Fight).
- BladesOfSteel.sv:927 MAME bladestl: PORT_DIPNAME(0x80, 0x00, Demo_Sounds) with 0x80 = Off and 0x00 = On (default On), and the OSD option is `Demo Sounds,On,Off` (value 0 = On).
- BladesOfSteel.sv:962 Trackball (0x2f00-0x2f03): confirmed from trackball_r() -- each axis is its own free-running 8-bit position counter, incremented by MiSTer's own spinner delta each time hps_io reports a new sample (edge-detected via the toggle bit spinner_N
- BladesOfSteel.sv:993 X moves TRACKBALL.1, Y moves TRACKBALL.0 (MAME marks that axis PORT_REVERSE, the OSD option Trackball Y flips it if the direction feels wrong).
- BladesOfSteel.sv:1066 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).
- BladesOfSteel.sv:1091 Address map confirmed directly from bladestl_mame.cpp's sound_map(): 0x0000-0x07ff sound RAM, 0x1000-0x1001 YM2203, 0x3000 UPD7759 control (write), 0x4000 UPD7759 busy (read), 0x5000 soundlatch acknowledge (write), 0x6000 soundlatch read, 0
- BladesOfSteel.sv:1165 YM2203 (jt03 -- FM+SSG, no PSG I/O port A/B emulation in this core, see Round 8's TASKS.md note: bladestl_mame.cpp's own port_b_w -- UPD7759 ROM bank select and SSG RC-filter enables -- is driven through the YM2203's GPIO port B, which jt12
- BladesOfSteel.sv:1194 ym_irq_n is not wired to the sound CPU's own IRQ line -- real hardware doesn't connect the YM2203's own IRQ output for this game (its NMI/IRQ pins are unused per bladestl_mame.cpp's device config), matching the soundlatch-only IRQ source al
- BladesOfSteel.sv:1232 standalone mode: the sample number comes from YM2203 port A (MAME: port_a_write_callback -> upd7759 port_w)
- BladesOfSteel.sv:1240 MAME: speech_busy_r() returns busy_r() ?
- BladesOfSteel.sv:1241 The old `~upd_busy_n` reported busy as 1, so the sound program saw "busy" whenever the chip was idle, polled forever after the first sample and never started sample 11 or any bank 1 sample (verified: the simulated CPU's busy reads climbed s
- BladesOfSteel.sv:1278 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:13 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:24 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:40 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:208 Reads return VRAM[0]–[7] because the address decoder is incomplete (real hardware behaviour confirmed in MAME).
- rtl/k007342.v:323 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:482 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:487 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:550 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:601 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:608 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:829 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:861 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:14 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:540 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:585 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:598 `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:729 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:732 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:735 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:744 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:753 reserved 101/110/111 -> MAME default (8x8)
- rtl/k007420.v:759 reserved 101/110/111 -> MAME default (8x8)
- rtl/k007420.v:761 13-bit base 8x8 tile index based exactly on MAME's battlnts_state::sprite_callback:
- rtl/k007420.v:765 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:771 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:785 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:795 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:812 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:889 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:899 13-bit base 8x8 tile index based exactly on MAME's battlnts_state::sprite_callback:
- rtl/k007420.v:913 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:1207 MAME exact spec: oy = 256 - m_ram[offs+0]
- rtl/k007420.v:1255 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:1265 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:1353 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:1362 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.
- README.md:64 The real board was studied from the schematics, the MAME driver (`bladestl.cpp`) and the sibling Battlantis and Rack 'Em Up cores, which share the K007342 and K
- README.md:82 This core was developed with substantial assistance from **Claude** (Anthropic's AI assistant), used for RTL implementation, cross checking against the MAME dri
- README.md:92 **The MAME project** (mamedev.org): `bladestl.cpp`, `k007342.cpp`, `k007420.cpp`, `k051733.cpp` and `konamipt.h` were the authoritative reference for the ROM la
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 16
- BladesOfSteel.sv:877 Wired to a fixed default (4, matching MAME's own 0x80 reset default) since it's minor and not worth an OSD entry of its own yet.
- BladesOfSteel.sv:928 The old `~status[15]` told the game "Demo Sounds: Off" by default, so it never queued the title music or any attract mode sound command (the sound queue stayed empty, verified against MAME frame by frame).
- BladesOfSteel.sv:1265 FM (jt03 output as is): verified against a MAME recording of the attract mode, median RMS ratio 1.0.
- BladesOfSteel.sv:1266 UPD7759: jt7759 gives the raw 9 bit sample (peak 247 in the demo), MAME multiplies the chip's sample by 128 and routes it at 0.60, a gain of 76.8; x77 here (64 + 8 + 4 + 1) puts its peak at about 19,000, the same as MAME's recording in the
- rtl/jt051733/jt051733.v:57 The LFSR is a genuine 16-bit shift register with XOR feedback taps at bits 1, 8, and 12 (matching MAME's `u16 m_lfsr` and `clock_lfsr()` exactly), clocked on every bus access to this chip -- read or write, any address -- not just when addre
- rtl/k007342.v:316 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:9 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:228 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:707 V-total = 264 lines (0-263), matching MAME screen.set_raw spec
- rtl/k007420.v:714 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:767 spr_flags is OAM byte 4, spr_zoom is OAM byte 5, matching MAME's byte layout exactly.
- rtl/k007420.v:891 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:905 8x16 (y contributes to bit1, matches MAME yoffset={0,2,8,10})
- rtl/k007420.v:906 16x8 (Match MAME mask ~1)
- rtl/k007420.v:1267 The title logo letters and every sprite crossing that edge disappeared (verified against a MAME algorithm reference over 215 states).
- README.md:65 The CPU, sound, speech and math chip cores were brought in from open projects (see the credits) and checked against MAME frame by frame: a software reference re
MAMEから移植・書き写した、または取り入れたと記載 — 2
- BladesOfSteel.sv:1265 Round 52: levels taken from MAME.
- rtl/jt051733/jt051733.v:49 2026-09-12: real Konami 051733 LFSR and collision/angle logic, ported directly from MAME's own k051733_device (see the Blades of Steel project's design_notes/k051733_mame.cpp + .h, and design_notes/jt051733_vs_mame_k051733.md for the full c
MAMEドライバと同じ文言を含む(出典の明記なし) — 4