← コア一覧
Arcade-Silkroad (ppriest)
「実機」で確認したと記載 — 1
- README.md:155 Pause (with CPU suspended): done, checked on hardware
MAMEとの相違点を記載 — 1
- README.md:196 Graphics layout: `scripts/gfx_layout_check.py`, 0 of 1,049,344 pixels differ from MAME's decode.
MAMEのソースを引用 — 57
- Silkroad.sv:3 Top-level HPS/DIP/video glue for the Unico SR2001A board (MAME silkroad.cpp), wiring rtl/silkroad_top.sv into the MiSTer framework.
- Silkroad.sv:6 Input layout is silkroad.cpp's INPUT_PORTS (339-415): one 32-bit port at $C00000, and the DIP switches in bits 31-16 of $C00004.
- Silkroad.sv:42 Signed 16-bit stereo: silkroad.cpp routes the YM2151's left and right to two speakers and both OKIs to each (461-473).
- Silkroad.sv:225 silkroad.cpp INPUT_PORTS_START( silkroad ), all IP_ACTIVE_LOW (hence the `~`: hps_io's joystick bits are active high): bits 31-24 P1 UP, DOWN, RIGHT, LEFT, B1, B2, B3, unused bits 23-16 P2 UP, DOWN, RIGHT, LEFT, B1, B2, B3, unused bits 15
- Silkroad.sv:231 TEST is the test switch (PORT_SERVICE_NO_TOGGLE, 345), on the Service button (bit 13) and F2; SERVICE1 and 2 are service coins, on keys 9 and 0, as MAME has them.
- Silkroad.sv:236 MAME's default keys alongside the pads (rtl/mame_keys.sv): arrows, LCtrl LAlt Space, 1 start, 5 coin for player 1; R F D G, A S Q, 2, 6 for player 2; P pause, F2 test, 9 and 0 service.
- Silkroad.sv:260 DIP switches: silkroad.cpp's DSW port has SWA in bits 23-16 and SWB in 31-24 (380-415); bits 15-0 have no fields and read 0.
- Silkroad.sv:325 Freeze the 68020 so a frame can be captured and compared against a MAME dump of the same moment.
- rtl/cpu/maincpu.sv:1 Main CPU: 68EC020 at 16 MHz (silkroad.cpp:445).
- rtl/cpu/maincpu.sv:1 Drives the vendored TG68KdotC_Kernel directly (rtl/cpu/tg68k/, PROVENANCE.md; every kernel signal needs an explicit zero initializer, github.com/TobiFlex/TG68K.C/issues/21), plus address decode, BRAM-region ports and the held, autovectored
- rtl/cpu/maincpu.sv:6 The decode is silkroad.cpp's cpu_map (314-331).
- rtl/cpu/maincpu.sv:7 Unmapped reads return 0, MAME's default for a map without unmap_value_high; the video registers are write-only (329) and read 0.
- rtl/cpu/maincpu.sv:11 The 68EC020 has a 32-bit bus in MAME; TG68K's here is 16 bits, so a long access is two word cycles.
- rtl/cpu/maincpu.sv:15 sim/maincpu_tb/tb_maincpu.sv (from the Psikyo core) checks ROM req/valid, the BRAM regions, the input-port read and the vblank IRQ; sim/boot_tb runs silkroad's own boot against MAME's bus trace.
- rtl/cpu/maincpu.sv:38 palette RAM: 0x600000-0x603FFF, the upper word of each long only (umask32 0xffff0000, silkroad.cpp:318), 4096 entries
- rtl/cpu/maincpu.sv:45 tilemap VRAM, 8192 words each: layer 0 0x800000-0x803FFF, layer 1 0x804000-0x807FFF, layer 2 0x808000-0x80BFFF (silkroad.cpp:319-321).
- rtl/cpu/maincpu.sv:56 video registers 0xC0010C-0xC00123, 12 words, write-only (silkroad.cpp:329)
- rtl/cpu/maincpu.sv:71 Sound, all bytes (silkroad.cpp:324-327): OKI 1 at 0xC00025, the YM2151 at 0xC00029 (address) and 0xC0002D (data), OKI 2 at 0xC00031 -- the odd byte of their words -- and OKI 1's bank at 0xC00034, the even byte.
- rtl/cpu/maincpu.sv:82 Gates the 16 MHz clock enable, so the 68020 simply stops stepping; video timing and the debug overlay keep running, which is what makes a frame comparable against a MAME dump.
- rtl/cpu/maincpu.sv:88 MAME's copy takes no time.
- rtl/cpu/maincpu.sv:121 ---- 16 MHz CPU clock enable ---- The board clocks the 68EC020 at 32 MHz / 2 = 16 MHz (silkroad.cpp:445).
- rtl/cpu/maincpu.sv:347 bank 3 is ignored (silkroad.cpp:297)
- rtl/mame_keys.sv:1 MAME's default keys (src/emu/inpttype.ipp) in hps_io's joystick layout, to OR into joystick_0/1: right, left, down, up at bits 0-3, buttons 1-6 at 4-9, Start, Coin, Pause, Service at the J1 line's own positions (parameters).
- rtl/mame_keys.sv:7 P1 arrows, LCtrl LAlt Space LShift Z X, 1 start, 5 coin P2 R F D G, A S Q W E (MAME gives P2 no sixth key), 2 start, 6 coin F2 service (test) switch, 9 and 0 service coins 1 and 2, P pause
- rtl/mame_keys.sv:24 MAME's Service 1, 2: wire to the board's SERVICE1/2 bits, if any
- rtl/memory/silkroad_sdram_top.sv:226 OKI 1's 256 KB space maps onto its 512 KB ROM as oki_map (silkroad.cpp:334-337): below 0x20000 directly, 0x20000-0x3FFFF to ROM 0x20000 + bank x 0x20000 (machine_start, 439).
- rtl/memory/silkroad_sdram_top.sv:260 Byte swap at the maincpu-specific seam: sdram_narrow_bridge.sv packs 16-bit words little-endian (EVEN byte address in the LOW byte), but the image holds the program as the 68020 sees it, byte n at address n (MAME's big-endian "maincpu" regi
- rtl/silkroad_core.sv:3 CPU + video core for the Unico SR2001A board (silkroad.cpp): rtl/cpu/maincpu.sv on the block RAMs, the video registers (rtl/video/silkroad_vregs.sv), the sound (rtl/sound), and the video: three tilemaps (rtl/video/silkroad_tilemaps.sv) and
- rtl/silkroad_core.sv:60 YM2151 and both OKIs, mixed as silkroad.cpp does, signed 16-bit per side
- rtl/silkroad_core.sv:308 ---- video registers (silkroad.cpp:329) ----
- rtl/silkroad_core.sv:323 The sprite snapshot after the game's last sprite write: MAME's writes end ten lines into its 16-line vblank (docs/write_timing_mame.txt), here vblank starts at line 224 and the copy runs at line 248, 2048 clk, before line 0's render at line
- rtl/silkroad_core.sv:328 Flip screen: line y shows source line 223 - y, column x source column 379 - x, for every layer and the sprites alike (silkroad.cpp has no flip; the core's is the unflipped frame turned 180 degrees).
- rtl/video/silkroad_spriteram.sv:3 Sprite RAM (0x40C000-0x40CFFF, 2048 words, silkroad.cpp:317) and the snapshot the sprite line engine draws from.
- rtl/video/silkroad_spriteram.sv:6 silkroad.cpp draws from live sprite RAM at vblank start (186); the game writes the list only in the first ten lines of vblank (docs/write_timing_mame.txt).
- rtl/video/silkroad_spriteram.sv:7 copy_start, after those writes, copies the RAM to the snapshot one word a clock (copy_busy meanwhile; silkroad_core holds a 68020 sprite RAM write until it ends), so each displayed line pairs with the list MAME's frame uses.
- rtl/video/silkroad_sprites.sv:3 silkroad.cpp's sprites (draw_sprites, 192-232) drawn a line ahead into a double-buffered line buffer, from silkroad_spriteram's snapshot.
- rtl/video/silkroad_sprites.sv:12 MAME's pixel op (prio_transpen, emu/drawgfxt.ipp 189-200) lets the first opaque sprite pixel at a position claim it, shown or hidden by the layers: so each position here keeps the first opaque pixel, {priority, colour, pen}, and the composi
- rtl/video/silkroad_tilemaps.sv:3 silkroad.cpp's three tilemaps (252-258, get_tile_info 236-247), rendered a line ahead into double-buffered line buffers.
- rtl/video/silkroad_tilemaps.sv:19 scripts/gfx_layout_check.py proves this against MAME's decode.
- rtl/video/silkroad_vregs.sv:3 The video registers at 0xC0010C-0xC00123 (silkroad.cpp:329): six 32-bit words, write-only, held here as twelve 16-bit halves (half 2n is regs[n] bits 31-16, 2n+1 bits 15-0).
- rtl/video/silkroad_vregs.sv:4 The scroll values are taken as silkroad.cpp's screen_update does (266-273):
- rtl/video/silkroad_vregs.sv:11 The other halves (regs[1] 15-0, regs[3], regs[4], regs[5] 15-0) are stored, unused by MAME, and readable through the debug dump.
- rtl/video/video_timing.sv:1 H total 512 and V total 262 at 8 MHz, chosen in docs/HACKS.md (15.625 kHz, 59.637 Hz against MAME's 60 Hz).
- rtl/video/video_timing.sv:2 380 x 224 visible, silkroad.cpp's visible area (454).
- README.md:3 A MiSTer FPGA core for Unico's SR2001A arcade board, The Legend of Silkroad (MAME's `unico/silkroad.cpp`), built with Quartus Prime 17.0.2 Lite for the DE10-nan
- README.md:40 Both of MAME's sets of the one game; a 32 MB SDRAM module holds their 27 MB image.
- README.md:47 | Name | Year | Manufacturer | MAME set | Notes |
- README.md:66 | YM2151 3.579545 MHz | FM, stereo | jt51; with the OKIs, correlation 0.912 with MAME's output over a second of play (Verification) |
- README.md:67 | 2 x OKI M6295 1 and 2 MHz | ADPCM | jt6295, OKI 1 banked; mixed into both sides as MAME does |
- README.md:72 MAME has no raw timing for this board (60 Hz, a 512 x 256 bitmap); these numbers are a choice, not a measurement (`docs/HACKS.md`).
- README.md:116 Two players, an 8-way stick and three buttons each: **Attack**, **Jump**, **Select Magic** (named from what each does in MAME; no manual or flyer was found).
- README.md:163 [x] YM2151 (Phase 4), against MAME in a bench
- README.md:188 MAME is the accuracy reference, with its own acknowledged uncertainties noted where they matter.
- README.md:198 Sound: MAME's writes to the YM2151, both OKIs and the bank register replayed through the RTL and the real SDRAM path (`sim/snd_trace_tb`): over 30-31 s of play,
- README.md:209 The **MAMEdev team** — David Haywood and R. Belmont — for `silkroad.cpp` and the device emulations that are this core's specification.
- README.md:229 | `debug` | reference captures from MAME used as ground truth (gitignored) |
- README.md:230 | `roms` | your own MAME sets (gitignored, never committed) |
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 13
- rtl/cpu/maincpu.sv:355 Match MAME's irq4_line_hold: assert on the RISING edge, hold until acknowledged, and let the acknowledge win.
- rtl/memory/silkroad_sdram_top.sv:85 gfx region A: thirds 0 and 1 of MAME's "gfx" interleaved by 32 bits, so a tile row's planes 5-2 are one 8-byte granule at tile * 128 + row * 8; region B: third 2 as it is, planes 1-0 at tile * 64 + row * 4 (docs/ROADMAP.md, Memory plan; che
- rtl/silkroad_core.sv:15 Mixing (the model is scripts/render_model.py, pixel-identical to MAME on 26 scenes): the backdrop is pen 0x7C0 (264); layers 0, 1, 2 drawn in order over it, pen 0 transparent; the layers' priority codes 0, 1, 2 are ORed where opaque, so onl
- README.md:6 Both sets boot and play on a DE10-nano, the video matching MAME's frames.
- README.md:7 The sound matches MAME's in a bench; it has not been judged by ear on hardware.**
- README.md:64 | MC68EC020 16 MHz | main CPU | TG68K.C, vendored via the DreamWorld and Psikyo cores; the boot matches MAME's bus trace (Verification) |
- README.md:65 | 2 x Actel A40MX04 | three tilemaps, sprites | written here from `silkroad.cpp`; identical to MAME's frames in simulation |
- README.md:89 The first two (`3982a3c`) are identical to or within the blinking text of a MAME frame; the others are from play.
- README.md:144 Flip screen, HDMI and analog, from the OSD or the fake DIP: done; through the fake DIP on hardware, the picture turned back matches MAME's frames; the OSD optio
- README.md:156 Sound: done, the YM2151 in stereo and both OKIs; checked against MAME in a bench
- README.md:162 [x] Hardware check of the video: attract matched to MAME frames, flip, Pause, test switch
- README.md:191 CPU: from reset through MAME's first 2,000,000 bus accesses (seven frames), 74,256 of 74,256 writes and 14,242 of 14,242 I/O reads match MAME's trace (`sim/boot
- README.md:193 Video model: `scripts/render_model.py`, 26 of 26 scenes pixel-identical to MAME's frames.
MAMEから移植・書き写した、または取り入れたと記載 — 1
- README.md:131 `docs/MAME_KLUDGES.md` lists what is taken from MAME as behaviour and what is known not to be right.