← コア一覧
metro (decoryah)
MAMEのドライバにない実基板の資料を引用 — 1
- README.md:227 Verilator benches in `sim/` (run in WSL): the video chip against dumped MAME states (`tools/vtest.sh`), the whole board through the SDRAM model (`sim/run_sys.sh
実基板での測定値を記載 — 2
- rtl/metro_vdp.sv:481 Frame total: MEASURED at 261 lines (60.2408 Hz with the 424-dot line at 6.6665 MHz) from two PCB recordings by three agreeing methods (docs/plan_refresh_measurement.md, ACCURACY.md 3.6); the game itself only ever programs 261 raster lines.
- rtl/metro_vdp.sv:841 v14: the game runs TWO write disciplines (measured in sim and with the silicon write-landing histogram, 2026-07-19).
MAMEとの相違点を記載 — 1
- README.md:198 Sankokushi (`metro`): while a picture slides in, the game blits ~10,000 words a frame, more than the log holds: those frames are drawn live as before (replay: 1
MAMEのソースを引用 — 162
- Metro.sv:5 Written for MiSTer from MAME 0.289's driver (src/mame/metro/metro.cpp, src/devices/video/imagetek_i4100.cpp).
- Metro.sv:177 MAME's DSW0 is one 16-bit port: byte 0 = SW1 (bits 0-7), byte 1 = SW2 (bits 8-15), ioctl index 254, bit 0 first, a 1 = MAME's default.
- Metro.sv:187 keyboard: 1/2 start, 5/6 coin, 9 service, F2 the test switch (MAME's defaults; the test switch is a button only on the I4300 boards, the others have a Service Mode DIP)
- Metro.sv:189 the mahjong panel (family D): letters A-N, Kan = Left Ctrl, Reach = Left Shift, Chi = Space, Pon = Left Alt, Ron = Z (MAME's defaults); 1 = start
- Metro.sv:233 metro.cpp `dharma`: IN0 (0xC00000) bit 0 service1, 1 tilt, 2 coin1, 3 coin2, 4 start1, 5 start2 (active low), bit 7 = sound busy (set in the core); IN1 (0xC00002) P1 in the low byte, P2 in the high byte: up, down, left, right, button 1, but
- Metro.sv:304 The file is MAME's nvram/<set>/eeprom (128 bytes, little-endian words), so a MAME save can be copied over.
- Metro.sv:541 the OSD's volume steps (Normal / -6 / -12 / +6 dB) on MAME's own level
- Metro.sv:653 The vertical games (MAME ROT90: Lady Killer, Moeyo Gonta; ROT270: Sky Alert) are rotated through a framebuffer in DDR3 (screen_rotate, from the framework's arcade_video.v): the scaler then shows the framebuffer instead of the core's video.
- rtl/metro_blitter.sv:92 METRO: one start that arrives while a blit runs (or is held) is kept and runs next (MAME executes every blit the moment the register is written; the chip would drop it).
- rtl/metro_blitter.sv:152 invalid tilemap: stay idle, no done (MAME: return, no IRQ)
- rtl/metro_eeprom.sv:1 Written from the chip's data sheet (and MAME's eeprom_serial_93cxx behaviour: the bits are clocked by the 68000's accesses, metro.cpp dokyusp_eeprom_* / gakusai_eeprom_*).
- rtl/metro_eeprom.sv:10 The contents at power-up come from the image: the loader sends the 128 bytes (big-endian words) of MAME's "eeprom" region (i_ld_*).
- rtl/metro_eeprom.sv:10 The saved file (the MRA's <nvram>, Metro.sv) is MAME's nvram/<set>/eeprom: 128 bytes, little-endian words (i_nv_* writes it in, o_nv_rdata reads it back for the save, o_written marks a write of the game).
- rtl/metro_eeprom.sv:22 the saved file, one byte per clock: byte address 0..127, little-endian words (MAME's nvram file)
- rtl/metro_es8712.sv:1 Excellent System ES8712 sound controller + OKI MSM6585 ADPCM decoder (Varia Metal), after MAME 0.289's es8712.cpp and msm5205.cpp.
- rtl/metro_es8712.sv:3 The ES8712 is a programmable address counter: the 68000 writes a start and an end address (20 bits each) and a "go"; it then streams the sample ROM (2 MB, two banks of 1 MB, selected by the board's control register) a nibble per VCK pulse o
- rtl/metro_es8712.sv:7 Per VCK, as in MAME (msm5205_device::update_adpcm, es8712_device::msm_int): the ES8712 first hands over the next nibble (or stops: end reached -> MSM reset, IRQ asserted), then the MSM decodes.
- rtl/metro_es8712.sv:9 Play with start >= end while playing: stops and asserts the IRQ, the MSM keeps running on its last nibble (MAME does the same).
- rtl/metro_es8712.sv:27 21 bits: 0x100000 = past the bank (MAME stops there)
- rtl/metro_loader.sv:2 * the 32-byte configuration block arrives first (image offset 0): board id, rotation, GFX scramble mode, GFX size are captured here; * the GFX ROM (image offset 0x100000, 4 MB slot) is passed through the driver's init permutation (init_dhar
- rtl/metro_main.sv:1 Metro main board (Dharma Doujou, metro.cpp 0.289 `dharma_map`): the 68000 (fx68k, 12 MHz via the phase enables), its program ROM port, 64 KB work RAM, the Imagetek I4220 (metro_vdp), the I/O ports, and the sound-CPU command latch.
- rtl/metro_main.sv:5 0x000000-0x03FFFF program ROM (256 KB) read through rom_req/rom_addr/rom_ack/rom_data 0x400000-0x40FFFF work RAM 64 KB, mirrored every 0x10000 up to 0x4FFFFF 0x800000-0x87FFFF Imagetek I4220 (metro_vdp, v2 map) 0x878
- rtl/metro_main.sv:27 1: show chip lines 0..223 like MAME instead of the CRTC window
- rtl/metro_main.sv:46 inputs (active low as MAME's ports; bit 7 of IN0 is replaced by snd_busy)
- rtl/metro_main.sv:71 the EEPROM's saved file (the MRA's <nvram>, MAME's nvram file: little-endian words): written in, read back for the save
- rtl/metro_main.sv:129 Sankokushi (13) and Mouse Shooter GoGo (22): the picture is built the way MAME builds it (tile RAM log, blits through it)
- rtl/metro_main.sv:157 Memory maps (metro.cpp) and I/O layouts, chosen by the board id (tools/metro_rom.py BOARDS).
- rtl/metro_main.sv:211 gakusai: ROM 512 K, VDP 0x200000, RAM 0xF00000 (metro.cpp gakusai_map)
- rtl/metro_main.sv:237 Bang Bang Ball, Battle Bubble: MAME runs them at 60 Hz ("doesn't like 58.2 Hz"), 263 lines of 380 dots here
- rtl/metro_main.sv:256 family F (metro.cpp blzntrnd_state::main_map): 0xE00000 DSW0, 0xE00002 DSW1 (a write: the sound command, upper byte), 0xE00004 IN0, 0xE00006 IN1, 0xE00008 IN2; the 053936: 0x400000..43FFFF tile map RAM (256 KB), 0x500000..500FFF line RAM (w
- rtl/metro_main.sv:264 family D: the ports sit inside the video chip's window (VDP + 0x78880), the sound chips and OKI banks at 0xC00000 / 0xD00000 / 0x800000 / 0xA00000 (metro.cpp dokyusei_map, mouja main_map)
- rtl/metro_main.sv:529 OKI sample ROM address: dokyusei: 256 KB banks (bank = low 3 bits + 8 * high bit, the region is 1 MB: 4 banks); mouja: the first 128 KB fixed, the upper 128 KB of the 256 KB window banked (8 banks of 128 KB, metro.cpp mouja_state::oki_map /
- rtl/metro_render.sv:9 Per line: three sequential tilemap passes (layer 2 -> 1 -> 0, keep the lowest priority value, later pass wins ties => lowest layer wins), then one sprite pass in list order keeping the smallest priority group per pixel (first writer wins wi
- rtl/metro_render.sv:36 METRO: 1 = I4220 / I4300 (8bpp tiles and 16x16 tiles), 0 = I4100 (4bpp 8x8 only: MAME's has_ext_tiles)
- rtl/metro_render.sv:834 First: flipped, MAME places a sprite at max - x - floor(w*zoom) and draws round(w*zoom) pixels, so the mirrored position is the unflipped one minus (round - floor) in x and y (0 or 1 pixel: bit 15 of the 16.16 product, which owf_q/ohf_q car
- rtl/metro_romif.sv:5 So the words are kept in a direct-mapped cache of 512 words (METRO, 2026-10-09: 2048 words, a 512-word cache still waited on 19.5 % of the program-ROM cycles of Lady Killer's attract, 13 % of them for two wait states, about 10 % of the CPU'
- rtl/metro_roz.sv:1 Konami 053936 ("PSAC2") rotate / zoom plane of Blazing Tornado and Grand Striker 2 (metro.cpp 0.289 family F), drawn as MAME draws it: k053936_device::zoom_draw into tilemap_t::draw_roz without wrap-around (blzntrnd_state::screen_update), t
- rtl/metro_roz.sv:3 tools/metro_roz.py is the executable specification; MAME's own frames are reproduced by it pixel for pixel.
- rtl/metro_roz.sv:8 simple (ctrl[7] bit 6 clear) one transform for the frame: start (ctrl 0, 1), per row (2, 3), per dot (4, 5), ctrl[6] bits 14 / 6: x256 super_m (bit 6 set) a start and a dot step per row from the line RAM (4 words a row at (row - YO
- rtl/metro_roz.sv:224 frame parameters: the steps (with the x256 modes), then the start with the plane's offsets, <<5 as MAME's draw_roz arguments
- rtl/metro_sndf.sv:1 Family F's sound board (Blazing Tornado, Grand Striker 2; metro.cpp blzntrnd_state::sound_map / sound_io_map): a Z80 at 8 MHz, a YM2610 (jt10) at 8 MHz and the command latch of the 68000.
- rtl/metro_sndf.sv:194 What MAME's resampler delivers is their average over the sample period (YM_DIV * 144 clk_snd clocks): the box average here.
- rtl/metro_sndf.sv:208 MAME's routes: SSG 0.75; Blazing Tornado FM / ADPCM left 1.0 to the left and right 1.0 to the right (64 / 64 here), Grand Striker 2 both 0.25 to the one output
- rtl/metro_sound.sv:1 The Metro sound board (Dharma family and the YM2151 family): uPD78C10 (rtl/upd78c10.sv) + 2 KB RAM + the board's glue of metro.cpp (metro_upd7810_state), a YM2413 or (i_ym2151, Daitoride / Pururun / Gun Master / Puzzli) a YM2151, and an OKI
- rtl/metro_sound.sv:12 The CPU's timing is MAME's (see upd78c10.sv): 12 MHz crystal / 3 = 4 MHz state clock, the engine steps at a quarter of the 96 MHz clock.
- rtl/metro_sound.sv:13 YM2413 3.579545 MHz and OKI 1.2 MHz (24 MHz / 20, pin 7 high: 9090.9 Hz) as in MAME.
- rtl/metro_sound.sv:13 The mix follows MAME's routing (YM2413 0.90, OKI 0.10 on a mono channel); the absolute levels are calibrated in docs/status.md.
- rtl/metro_sound.sv:18 YM2151 board mix gains (x256), fitted to MAME's audio with tools/audio_fit.py (docs/status.md): YM2151 1.52 (Pururun's YM-only windows 1.516,
- rtl/metro_sound.sv:19 all windows 1.54), OKI 6.36 = 4 x Dharma's 1.59 (MAME's routes 0.40 / 0.10; Gun Master's OKI-only windows give 6.2)
- rtl/metro_sound.sv:25 output level (OSD): 0 = x4 (+12 dB over MAME), 1 = x2, 2 = x1 (MAME's level), 3 = x8; YM2151 boards: all one step of 8 lower (x0.5 ...
- rtl/metro_sound.sv:33 1: the OKI is routed louder (MAME 0.25 against 0.10 on the uPD78C10 boards)
- rtl/metro_sound.sv:36 Varia Metal: the ES8712 / MSM6585's output, mixed in at MAME's level (full scale of the MSM is 16 bits x 0.5)
- rtl/metro_sound.sv:37 1: a board whose MAME mix is loud (the ES8712's route is 1.0): scaled down by 4 (the YM2151 boards by 8), the OSD steps start there
- rtl/metro_sound.sv:50 the chips' outputs before the mix (calibration against MAME, tools/audio_cmp.py)
- rtl/metro_sound.sv:304 The two gains are FITTED to MAME's own output of the same session (tools/audio_fit.py: per half second E_mame = a^2 E_ym + b^2 E_oki over 14 s of Dharma, residual within a few percent): a = 6.35 for the YM2413 accumulator, b = 1.59 for the
- rtl/metro_sound.sv:309 1625 / 256 = 6.35 = MAME's 0.90 route; 2.00 / 0.90 = 2.222
- rtl/metro_sound.sv:312 YM2151 boards are far louder in MAME than the YM2413 boards (MAME's own output peaks at 12-25 thousand against 3 thousand for Dharma: YM2151 and OKI routes 0.40 against 0.10; the first hardware test of 20261007c: "much louder", Gun Master "
- rtl/metro_sound.sv:315 Varia Metal (i_loud) is only half as loud as that: its default is MAME's own level (user, hardware test of 20261009c: "a bit low" at x0.5).
- rtl/metro_vdp.sv:30 1 = Metro as MAME 0.289 drives it: bit 0 (vblank) at the start of line P_VBL_LINE, bit 2 (blitter done) as upstream, bit 4 every P_TICK_LINES lines (MAME: the 68000's periodic interrupt at 8 x 60 Hz = every ~32 lines).
- rtl/metro_vdp.sv:35 MAME's timing for the Metro boards is 392 x 263 (6.0 MHz dot clock = 24 MHz / 4 -> 58.2328 Hz, i.e. P_H_TOTAL = 392, P_VLAST = 262).
- rtl/metro_vdp.sv:46 METRO model: > 0 = the periodic tick (bit 4) every this many clocks (MAME: 8 x 60 Hz = 200000 at 96 MHz), 0 = every P_TICK_LINES lines
- rtl/metro_vdp.sv:49 (MAME encodes the same fact by forcing the enable register OR 0xFD.)
- rtl/metro_vdp.sv:58 METRO (family F): 1 = the frame-synchronous layer RAM (see "P_VLOG" below the CPU bus decode): the 68000's writes to the three tile layers and the tile table are kept in a log and applied at the instant the sprite list and the scroll regist
- rtl/metro_vdp.sv:105 METRO: 1 = ignore the CRTC first-visible-line and show chip lines 0..223 as MAME does (0 = follow the game's CRTC programming, which for Dharma is line 11).
- rtl/metro_vdp.sv:134 METRO: 1 = 304 pixels wide picture (MAME's i4220_config_304x224: Varia Metal)
- rtl/metro_vdp.sv:135 METRO: 1 = 384 pixels wide picture (MAME's i4300_config_384x224: Mahjong Doukyuusei Special)
- rtl/metro_vdp.sv:136 METRO: 1 = 360 pixels wide picture (the I4100 boards of MAME's i4100_config_360x224), 0 = 320
- rtl/metro_vdp.sv:137 METRO: 1 = 240 lines (Karate Tournament, Lady Killer, Sankokushi: MAME's visible area 0..239), the vblank interrupt then comes at line 240; 0 = 224
- rtl/metro_vdp.sv:138 METRO: 1 = external vblank interrupt (cause bit 5): Karate Tournament, Lady Killer, Last Fortress VG460, Sankokushi (metro.cpp karatour_vblank_irq)
- rtl/metro_vdp.sv:140 METRO: 1 = 380 dots a line instead of P_H_TOTAL (392): 263 lines at 60.03 Hz, MAME's 60 Hz of Bang Bang Ball / Battle Bubble (set_refresh_hz(60))
- rtl/metro_vdp.sv:141 METRO: Puzzli's interrupt model (metro.cpp bangball_scanline): no periodic tick; at line 224 causes 4 + 0, on every line before it cause 1 while enable bit 1 is clear
- rtl/metro_vdp.sv:144 I4300: the cause bit the vblank sets (MAME's set_vblank_irq_level, 1)
- rtl/metro_vdp.sv:184 METRO: the visible size is the board's (MAME i4100_config_360x224 / i4220_config_320x240 ...): static, registered.
- rtl/metro_vdp.sv:190 METRO: the tile table copy (below) is also used on the I4300 boards (Doukyuusei, Mouja, Doukyuusei Special): their games change the whole picture by rewriting the 1024-word table between lines 79 and 137 while the beam is drawing (MAME show
- rtl/metro_vdp.sv:267 MAME draws a frame from the palette as it is at the end of the frame, never half-way.
- rtl/metro_vdp.sv:287 With one shadow copied after the last displayed line (line 238 with the game's window of 11) a game that starts clearing a palette bank at line ~238 - 239 of every sixth frame (Doukyuusei Special's portraits, MAME's trace: zeros from line 2
- rtl/metro_vdp.sv:373 I4300 boards (20261014b): MAME draws the frame once, at line v_vis, with the registers as they are then.
- rtl/metro_vdp.sv:373 The renderer here samples these live, line by line, so a register the game writes in the vblank handler (Mahjong Doukyuusei's credits: the sprite colour offset and the background pen at line ~233, the figure turned into a black silhouette a
- rtl/metro_vdp.sv:385 Karate Tournament and Lady Killer rewrite the window registers in the middle of the picture every frame (lines 87-120 in MAME's timeline), Doukyuusei the scroll registers; MAME draws a frame from the finished values, the live registers tore
- rtl/metro_vdp.sv:494 Measured on silicon (ladder probe, 2026-07-18): the game parks a scratch accumulator in the scroll registers across vblank and its frame-top write flurry lands during line 1, by (1,h160) - later than any simulation shows, because the SDRAM-
- rtl/metro_vdp.sv:508 A real monitor therefore shows chip lines 2..225; lines 0/1 are a hidden work area (the scratch accumulator and the boss-zone outlier live there), which is why a PCB's top of screen is clean while MAME - which latches these registers but ig
- rtl/metro_vdp.sv:532 The game's CRTC window starts at chip line crtc_vfirst_q (11 on every Metro board so far), so the last displayed chip line is 223 + vfirst and the renderer kicks lines up to there, while MAME's vblank interrupt (and the default here) is at
- rtl/metro_vdp.sv:535 Build 20261007d did that move and the hardware test did not get better (tearing and flashes stayed), and MAME's write trace argues against it: the games do their per-frame tile / sprite work in chip lines 0-10 (bucket A of work/b2/whenwr.lu
- rtl/metro_vdp.sv:537 So the default is 0 (MAME's timeline).
- rtl/metro_vdp.sv:542 i_spr_early (Puzzli, MAME trace work/b2/sprlog.lua): the game writes the DEMO PLAY letters (8 sprites at sprite RAM 0x600) in lines 3-7 and wipes sprite RAM 0x600-0x7f8 in lines 227-230 (all 64 entries, f8f8), so the copy at the last line (
- rtl/metro_vdp.sv:546 METRO: the 240-line boards (i_tall: Karate Tournament, Lady Killer, ...) take the vblank interrupt at line 240, so the game's per-frame sprite work is not finished at the last line (262): MAME's write trace of Karate's explosion has the spr
- rtl/metro_vdp.sv:551 (MAME's own timeline lands the last count write at line 271.1 = 9.1 of the next frame.) METRO (family F, i_roz_en): MAME's sprite RAM of these boards is BUFFERED (set_spriteram_buffered(true): the list is copied at the start of the vblank,
- rtl/metro_vdp.sv:553 A copy at the last line (262) sees a half-written new list: the blocks / shards of the hardware video (replay of MAME frames 1160-1360: 53 of 100 pictures more than 500 pixels off, 7 with the copy at 224).
- rtl/metro_vdp.sv:554 The copy is taken as soon as the renderer has kicked the last displayed line (v_vis + crtc_vfirst: 224 with MAME's window, 235 with the game's CRTC window of 11).
- rtl/metro_vdp.sv:556 METRO (20261014b, I4300 boards with 240 lines: Mahjong Gakuensai 1 / 2): the game rewrites the whole sprite list (the speech bubbles of the tutorial are sprites) from line ~250 of one frame to line ~46 of the next, and MAME draws the frame
- rtl/metro_vdp.sv:557 A copy at crtc_vfirst of the next frame caught the list half rewritten: holes in the bubbles, the HUD icons missing for a frame (replay of MAME frames 6700 - 6900: 20 of 200 pictures off, 0 with the copy at v_vis; 11700 - 11900 (play): 11 o
- rtl/metro_vdp.sv:565 I4300 boards (and fsync_e): MAME's render line (see below)
- rtl/metro_vdp.sv:568 Lady Killer and Karate Tournament rewrite the whole 2 KB tile table with the 68000 every frame (tile definitions read from the graphics ROM through the CPU window with the bank register toggled 26 times; MAME's trace: 2048 writes between li
- rtl/metro_vdp.sv:572 The copy is taken just after the last line the renderer draws (v_vis + vfirst + 2), one word a clock through the live table's idle port B (1026 clocks, the renderer is idle then); the picture then uses the table as it was at the end of the
- rtl/metro_vdp.sv:609 A game that clears and reloads a palette bank across the vblank and the first lines of a frame (Doukyuusei Special's portraits: zeros written from line 239 of one frame to line 81 of the next, every sixth frame) showed a black frame with th
- rtl/metro_vdp.sv:615 MAME's render instant: the copy goes to the shadow the picture is not reading
- rtl/metro_vdp.sv:638 METRO: MAME's periodic interrupt is exactly 480 Hz; a line count (32 lines = 2.0894 ms, 2.0833 ms wanted) drifts 0.3 % and put a tick-driven fade of Pururun one step off MAME's at frame 250.
- rtl/metro_vdp.sv:639 With P_TICK_CLKS the tick is a clock count of its own (it restarts at reset, like MAME's device time).
- rtl/metro_vdp.sv:677 METRO model (MAME 0.289)
- rtl/metro_vdp.sv:795 The window is MAME's 0..223 while flipped.
- rtl/metro_vdp.sv:796 MAME's flip mirrors the whole 392 x 263 raster, so unaided the layer scroll gets +72 (X) / +39 (Y) = raster minus visible size (tools/metro_flipcheck.py) and the 72 columns / 39 rows of off-screen margin come into view (garbage tiles on a r
- rtl/metro_vdp.sv:798 MAME's own flip offsets (set_tmap_flip_x/yoffsets, set for Varia Metal as raster minus visible size, "aligned properly") cancel exactly that shift: the layers mirror about the visible area like the sprites do.
- rtl/metro_vdp.sv:799 FLIP_MAME_SHIFT = 1 gives MAME's default.
- rtl/metro_vdp.sv:807 METRO: i_tmap_dx = the board's tilemap X offset (MAME set_tmap_xoffsets, 2 on Daitoride / Puzzli; MAME sets the flip offset to its negative, so the layers' X scroll gets +i_tmap_dx flipped and not).
- rtl/metro_vdp.sv:880 window stable per frame (METRO: i_win_mame forces MAME's 0..223)
- rtl/metro_vdp.sv:1000 METRO: upstream only had the buffered path (copy at vblank start, so sprites show one frame late; Hyper Duel's MAME model).
- rtl/metro_vdp.sv:1001 Metro boards use MAME's UNBUFFERED sprite RAM (live at render time).
- rtl/metro_vdp.sv:1113 The portrait animations of Doukyuusei / Doukyuusei Special / Mouja are blits into the tile RAM that the game starts at line ~137 (MAME's trace: the blitter registers at 136.8 - 145) while the picture is drawn; MAME shows the finished state,
- rtl/metro_vdp.sv:1118 METRO (I4300 boards, 20261014): the blit queue below feeds the blitter (bq_go + bq_h_*) and raises the done interrupt like MAME's 500 us timer.
- rtl/metro_vdp.sv:1324 MAME runs a blit the moment its trigger register (0x7884C) is written, and renders a frame at line v_vis: the picture holds every blit started before that line and none after it, whole.
- rtl/metro_vdp.sv:1330 The done interrupt follows the trigger by 500 us, as MAME's timer does (a trigger within the 500 us re-arms it).
- rtl/metro_vdp.sv:1341 the done interrupt of MAME's 500 us timer: the I4300 boards and the i_fsync boards
- rtl/metro_vdp.sv:1349 MAME's render instant (the palette snapshot's line)
- rtl/metro_vdp.sv:1372 fsync_e boards: MAME's timer too (their blits take 4 - 5 clocks a word through the log; the game's interrupt handler and its main loop both program blits, and the order of the two depends on when the done interrupt comes)
- rtl/metro_vdp.sv:1437 METRO (family F): MAME copies the sprite RAM at one instant (line 224); this chip's copy takes 2,050 clocks (cp_run) and the game keeps writing its list through the frame: a word written during the copy reaches the copy if it lies ahead of
- rtl/metro_vdp.sv:1452 MAME draws a frame once, at the end of the frame, from whatever the RAM holds then.
- rtl/metro_vdp.sv:1453 A game that rewrites a layer during the visible lines (Blazing Tornado's continue screen: 3,980 words of the tile table and layers 1 and 2 in one frame, one word every ~180 clocks, a band where the beam is; Grand Striker 2's title: the top
- rtl/metro_vdp.sv:1455 Here the layer RAM does too: the 68000's writes are kept in a log and written to the RAM after that same copy instant, once the renderer has finished the last line of the frame (its kick FIFO holds nothing of the frame and it is idle), so e
- rtl/metro_vdp.sv:1539 fsync_e: the 68000's tile write waits for the blit in progress (its words are in the log first, as MAME's blit is done at the trigger)
- rtl/metro_vdp.sv:1554 ---- the instant of the copy (same condition as cp_run's start), the renderer being done with the frame, the deadline I4300 boards: the instant is MAME's render line v_vis (the sprite list and the registers are copied there too), not the sp
- rtl/metro_vdp.sv:1556 262, 0 ...) belong to MAME's NEXT frame and must not be applied before this picture is done.
- rtl/metro_vdp.sv:1644 fsync_e: a blit is whole in one picture (MAME runs it at its trigger): the cut waits for the one in progress
- rtl/metro_vdp.sv:1763 The I4300's register map (imagetek_i4100.cpp v3_map) folded onto the I4220's: `ra` is the register address the decode below sees.
- rtl/metro_vout.sv:3 The video chip scans a 392 x 263 raster at a 6.0 MHz dot clock (16 clocks of the 96 MHz machine clock per dot; that is what keeps the game's own timing = MAME's).
- rtl/metro_ymf.sv:1 Wrapper of the YMF278B (OPL4) for family C (Mouse Shooter GoGo, Bal Cube, Daitoride's YMF278B version, Bang Bang Ball): the 68000's byte writes to its six ports and the status read, the chip clock (33.8688 MHz from the 96 MHz machine clock)
- rtl/metro_ymf.sv:5 The engine (rtl/ymf278b.sv, srg320's, derived from MAME) is paced by a chip-clock enable that is held back only when the byte it is about to sample has not arrived from the SDRAM (CAP_NEXT): its own memory timing gives 8 chip clocks (22.7 m
- rtl/metro_ymf.sv:72 MAME's map: ROM 0 ..
- rtl/metro_ymf.sv:92 mono: MAME routes every output to one speaker (gain 1.0)
- rtl/upd78c10.sv:1 Instruction-atomic, like MAME 0.289's upd7810 (BSD-3-Clause, Juergen Buchmueller), whose code this follows: the instruction handlers are generated from MAME's source by sim/upd78c10/gen_rtl.py (upd78c10_ops.svh, upd78c10_tab.svh, upd78c10_
- rtl/upd78c10.sv:5 Timing is MAME's: every instruction takes the state count of its table entry (one state = 3 clocks of the 12 MHz crystal = 4 MHz) and the peripherals advance by that count before the instruction executes.
- rtl/upd78c10.sv:23 ports: what the chip drives (MAME's callback values) and what the board puts on port A
- rtl/upd78c10.sv:96 ------------------------------------------------------------------------------------------ ports (RP / WP / read_pc / write_pc of upd7810.cpp)
- rtl/upd78c10.sv:251 INTF2: set_input_line sets IRR when the logical level rises (upd7810.cpp execute_set_input)
- rtl/ymf278b.sv:1 license:BSD-3-Clause (PCM engine derived from MAME's ymf278b) YMF278B (OPL4) PCM wavetable engine by srg320 (Arcade-PsikyoSH2_MiSTer, rtl/PSH2/YMF278B.sv), derived from MAME's ymf278b.
- rtl/ymf278b.sv:2 Changes for the Metro core (family C: Mouse Shooter GoGo, Bal Cube, Daitoride's YMF278B version, Bang Bang Ball): * the FM side has no synthesis (the games' own writes to it are the chip's initialisation and its two timers: the tick of thei
- rtl/ymf278b.sv:157 11 samples after its wave number write; MAME / ymfm load the whole header at the write and the game's own writes to those registers (which follow the wave number write) win.
- rtl/ymf278b.sv:301 Metro: the wave header of a wave number from 384 up is in the bank register 0x02 bits 4:2 selects (bank * 512 KB + (number - 384) * 12), the game's own samples at 0x200000 (MAME / ymfm; the original read every header at number * 12)
- rtl/ymf278b.sv:434 Metro: 12 bit: the even sample takes b1's low nibble, the odd one its high nibble (MAME / ymfm; the original had them the other way round)
- rtl/ymf278b.sv:647 the total level fades to its target: more attenuation 19/1024 per sample (max -> min volume 156 ms), less 38/1024 (as ymfm / MAME); the original compared the other way round (it ran away from the target, wrapping the 7 bits), which only mat
- rtl/ymf278b.sv:815 the status read (port 0) returns the chip ID the first time after reset / after NEW2 is set (as MAME's ymfm)
- rtl/ymf278b_pkg.sv:1 license:BSD-3-Clause (PCM engine derived from MAME's ymf278b)
- rtl/ymf278b_pkg.sv:303 -1 steps (the left side's table mirrored: MAME / ymfm), the original had one step less
- rtl/ymf278b_pkg.sv:317 Metro: MAME's ymfm scales a channel's output by (volume * sample) >> 15 with a 13-bit volume whose full scale is 8168: 0.249 of the wave; this was 127/128 (>> 7).
- rtl/ymf278b_pkg.sv:318 >> 9 (0.248) keeps the sum of 24 channels inside the 18 bit accumulator and gives MAME's level
- README.md:3 Written from MAME 0.289's `metro.cpp` and `imagetek_i4100.cpp`; MAME was the oracle for everything (video chip state, 68000 bus writes, sound), and the result i
- README.md:18 Not supported: Puzzlet (an H8/3007 board that MAME 0.289 does not run either), Metabee Shot (its protection MCU has no dump) and Poitto!
- README.md:23 The titles of the three core files: their title or attract screens, as MAME 0.289 draws them (to show what kind of games these are).
- README.md:134 `tools/make_mra.py` writes the MRAs from MAME's ROM lists and `-listxml` DIP switches; `tools/mra_verify.py` checks that each builds the same image as the one t
- README.md:153 | Display window | Game's CRTC, MAME | the chip's own CRTC window or MAME's fixed lines 0 - 223 (flipped, the window is always MAME's) |
- README.md:162 Its 128 bytes are laid out as MAME's `nvram/<set>/eeprom`, so settings made in MAME can be copied over (and back).
- README.md:186 **Release 20261018a** (`metro` and `metrod64` changed; the two fixes confirmed on the boards; 20261015a was withdrawn for Mouse Shooter GoGo): Sankokushi and Mo
- README.md:187 In simulation, with MAME's own writes, Mouse Shooter GoGo's title and its four theatre screen changes equal MAME in every picture (before: one picture of each c
- README.md:189 Both games show the picture one frame (16.7 ms) later, as MAME does.
- README.md:190 **Release 20261018c** (`metro` and `metrod64` changed; confirmed on the boards: the F2 test switch, the saved settings, the 60 Hz; 20261018b was not tested and
- README.md:200 The family C boards' 68000 gets its program through the SDRAM cache: ROM reads wait 2 clocks on average (99.9 % within 8 clocks in simulation), and a loop of Ga
- README.md:205 The picture is MAME's: a 392 x 263 raster at 6.0 MHz dots (58.23 Hz) with the I4220's 320 x 224 (the 360-pixel games are re-timed for a CRT, `rtl/metro_vout.sv`
- README.md:227 Verilator benches in `sim/` (run in WSL): the video chip against dumped MAME states (`tools/vtest.sh`), the whole board through the SDRAM model (`sim/run_sys.sh
- README.md:229 `tools/lua/` has the MAME scripts that dump states and drive inputs; `tools/metro_ref.py` is the Python reference renderer.
- README.md:229 The tools find MAME's source and executable through `tools/paths.py` (`METRO_BASE`, `METRO_MAME`).
- README.md:242 | `docs/` | `hardware.md` (what MAME says about the boards), `status.md` (results and process notes) |
- README.md:247 **MAME** (the metro driver by Luca Elia and David Haywood, `imagetek_i4100` by them and Angelo Salese, `upd7810` by Juergen Buchmueller, `k053936`, `ymf278b`, a
- README.md:253 **srg320** (the YMF278B / OPL4 PCM engine of Arcade-PsikyoSH2_MiSTer, derived from MAME's `ymf278b`, BSD-3-Clause; `rtl/ymf278b.sv`, with the Metro changes list
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 8
- rtl/metro_blitter.sv:6 Semantics verified against the MAME-port oracle (sim/oracle/metro_blitter_oracle.py) by sim/tb/tb_blitter.sv.
- rtl/metro_blitter.sv:19 A start with an invalid destination tilemap returns to idle without o_done, matching MAME.
- rtl/metro_render.sv:7 Semantics as verified against the M1 oracle and real MAME frame dumps.
- rtl/metro_render.sv:49 Recipe verified against MAME in tools/metro_flipcheck.py.
- rtl/metro_vdp.sv:101 Video timing: 0 = measured 261-line frame (60.2408 Hz, hardware -verified), 1 = legacy MAME 262-line frame (60.011 Hz) for displays that reject 60.24 Hz in sync-locked HDMI modes.
- rtl/upd78c10.sv:9 Verified against MAME's code compiled standalone (sim/upd78c10/model.cpp) instruction by instruction: state, flags, interrupt requests, port writes.
- README.md:170 **Verification.** MAME 0.289 is the reference.
- README.md:170 In simulation (Verilator, the games' real programs, the real SDRAM path): the video chip's memories and registers equal MAME's word for word after a coin and a
MAMEから移植・書き写した、または取り入れたと記載 — 2
- rtl/metro_vdp.sv:142 METRO: 1 = frame-synchronous picture on a board that is not an I4300 (Sankokushi): the tile RAM log (the blitter's writes go through it, in order), the sprite list and the registers copied at MAME's render line
- rtl/metro_vdp.sv:286 METRO: TWO shadow palettes, the picture reads one while the next is copied into the other at MAME's own instant (line v_vis, the start of the vblank), and the two swap after the last displayed line.
MAMEの近似をそのまま採用 — 1
- rtl/metro_vdp.sv:484 i_compat60 selects the legacy MAME-assumed 262-line frame (60.011 Hz) for displays that reject 60.24 Hz in sync-locked HDMI modes.
MAMEドライバと同じ文言を含む(出典の明記なし) — 2