← コア一覧
SDGundamPS
MAMEのドライバにない実基板の資料を引用 — 2
- rtl/GundamSD/GundamSD_main_top.sv:31 Memory map SD Gundam (da MAME dcon.cpp + SD Gundam override): $000000-$07FFFF ROM 68K (512KB) $080000-$08BFFF Main RAM (48KB) $08C000-$08C7FF BG tile RAM (2KB) $08C800-$08CFFF FG tile RAM (2KB) $08D000-$08D7FF MG tile RAM
- rtl/GundamSD/GundamSD_maincpu_map.sv:29 Memory map SD Gundam (da MAME dcon.cpp + sdgndmps_map override): $000000-$07FFFF ROM 68K (512KB) → SDRAM via bridge $080000-$08BFFF Main RAM (48KB) → BRAM $08C000-$08C7FF BG tile RAM → BRAM dual-port $08C800-$
実基板での測定値を記載 — 1
MAMEのソースを引用 — 45
- GundamSD.sv:297 --- Joystick to SD Gundam input mapping --- MAME P1_P2 port ($E0002): active low.
- GundamSD.sv:625 ── Flip screen (CRTC reg 0x1A bit 0) ─────────────────────────────────────── MAME: BIT(reg_1a, 0) → flip_screen.
- GundamSD.sv:667 SD Gundam Text scroll fissi: 128 X (MAME), 16 Y (centratura HW reale)
- GundamSD.sv:707 MAME +128 X + offset HW Y +16 (centratura calibrata su PCB Seibu D-Con)
- GundamSD.sv:812 Pixel pipeline con sprite + priority callback (MAME pri_cb dcon.cpp).
- GundamSD.sv:813 pri_code semantics (MAME pri_mask 0xF0/0xFC/0xFE/0): pri=3 → sprite ABOVE ALL (mask=0, copre Text/FG/MG/BG, INSERT COIN, HUD) pri=0 → sprite ABOVE FG (copre FG, MG, BG; coperto solo da Text) pri=1 → sprite ABOVE MG (copre MG, BG; coperto
- rtl/GundamSD/GundamSD_audio_z80.sv:25 Spec da MAME (reference/mame_seibu/seibusound.cpp + dcon.cpp): - Z80A @ 14.31818 MHz / 4 = 3.579545 MHz - YM2151 (jt51) @ 14.31818 / 4 = 3.579545 MHz - OKI M6295 (jt6295) @ 20 MHz / 16 = 1.25 MHz, PIN7=LOW
- rtl/GundamSD/GundamSD_audio_z80.sv:173 MAME audiocpu region layout (sdgndmps):
- rtl/GundamSD/GundamSD_audio_z80.sv:257 ─── ROM bank register (Z80 0x4007: bit0 → bank 0/1) ───────────────────── MAME seibu_sound_device::bank_w: m_rom_bank->set_entry(BIT(data,0))
- rtl/GundamSD/GundamSD_audio_z80.sv:328 Main writes to 0xA0008 (MAME offset 4) → assert RST18 snd_addr = bus_addr[3:1], 0xA0008 → bit[3:1]=100 = 4
- rtl/GundamSD/GundamSD_audio_z80.sv:354 ─── Soundlatch main_w/r logic ────────────────────────────────────────── snd_addr = bus_addr[3:1] = offset/2 (0=word 0, 1=word 1, 2=word 2, 3=word 3, 4=word 4, 5=word 5, 6=word 6) MAME usa byte access (umask16 0x00ff = byte basso).
- rtl/GundamSD/GundamSD_audio_z80.sv:356 Mappa offset MAME → snd_addr: offset 0 (0xA0000) → snd_addr 0 offset 1 (0xA0002) → snd_addr 1 offset 2 (0xA0004) → snd_addr 2 offset 3 (0xA0006) → snd_addr 3 offset 5 (0xA000A) → snd_addr 5 offset 6 (0xA000C) → snd_addr 6
- rtl/GundamSD/GundamSD_audio_z80.sv:372 Main writes (MAME seibu_sound_device::main_w): case 0/1: m_main2sub[offset] = data case 4: update_irq_lines(RST18_ASSERT) — gestito sopra case 2/6: pending flags (sub2main=0, main2sub=1)
- rtl/GundamSD/GundamSD_audio_z80.sv:380 MAME case 2/6
- rtl/GundamSD/GundamSD_audio_z80.sv:387 Z80 reads soundlatch (→ MAME implicit: nessun side effect) Z80 writes sub2main
- rtl/GundamSD/GundamSD_audio_z80.sv:401 MAME sdgndmps_sound_comms_r override (dcon.cpp:288): offset 5 hardcoded 1.
- rtl/GundamSD/GundamSD_main_top.sv:31 Memory map SD Gundam (da MAME dcon.cpp + SD Gundam override): $000000-$07FFFF ROM 68K (512KB) $080000-$08BFFF Main RAM (48KB) $08C000-$08C7FF BG tile RAM (2KB) $08C800-$08CFFF FG tile RAM (2KB) $08D000-$08D7FF MG tile RAM
- rtl/GundamSD/GundamSD_main_top.sv:251 VBLANK IRQ4 — MAME dcon.cpp: m_maincpu->set_vblank_int(irq4_line_hold) Rising edge di vblank → assert IRQ4 pending; IACK CPU → clear.
- rtl/GundamSD/GundamSD_main_top.sv:399 XOR 0x400 lato CPU per allineare BRAM[N] = MAME text_vram[N] (renderer parte da addr 0).
- rtl/GundamSD/GundamSD_main_top.sv:407 Quindi MAME palette[N] sta in vram_addr = (N + 0x400) & 0x7FF.
- rtl/GundamSD/GundamSD_main_top.sv:408 Per allineare BRAM[N] = MAME palette[N] applichiamo XOR 0x400 SOLO al lato CPU (a_addr).
- rtl/GundamSD/GundamSD_main_top.sv:409 Il renderer passa pen_index MAME nativo (BG=0x400+, MG=0x500+, ecc) e la BRAM è già allineata.
- rtl/GundamSD/GundamSD_maincpu_map.sv:29 Memory map SD Gundam (da MAME dcon.cpp + sdgndmps_map override): $000000-$07FFFF ROM 68K (512KB) → SDRAM via bridge $080000-$08BFFF Main RAM (48KB) → BRAM $08C000-$08C7FF BG tile RAM → BRAM dual-port $08C800-$
- rtl/GundamSD/GundamSD_maincpu_map.sv:160 ─── GFX bank register ─────────────────────────────────────────────────── MAME dcon.cpp gfxbank_w: SOLO bit0 → m_gfx_bank_select = 0x1000 oppure 0.
- rtl/GundamSD/GundamSD_palette.sv:25 MAME: PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048); Address space CPU: 0x08E800..0x08F7FF (4 KB = 2048 word).
- rtl/GundamSD/GundamSD_palette.sv:34 Espansione 5→8 bit con replica top-bits (standard MiSTer / MAME palette_device).
- rtl/GundamSD/GundamSD_palette.sv:86 xBGR_555 → RGB888 con replica bit alti (5→8 standard MiSTer/MAME)
- rtl/GundamSD/GundamSD_seibu_crtc.sv:23 Seibu CRTC fedele a MAME (src/mame/seibu/seibu_crtc.cpp).
- rtl/GundamSD/GundamSD_seibu_crtc.sv:117 MAME mappa: bit0=screen0(BG), bit1=screen2(MG), bit2=screen1(FG), bit3=screen3(Text) (vedi seibu_crtc.cpp commento "screen 0=BG, screen 1=FG, screen 2=MG, screen 3=Text") In SD Gundam dcon.cpp layer_en_w gira la maschera così: ~layer_en bit
- rtl/GundamSD/GundamSD_seibu_crtc.sv:126 Il dispatcher MAME usa "if (BIT(~m_layer_en, n))" per saltare = layer disabilitato quando il bit è 1.
- rtl/GundamSD/GundamSD_sprite_renderer.sv:27 Format word (formato "comune", non alt_format) da MAME src/mame/seibu/sei021x_sei0220_spr.cpp: w0 bit 15 = enable (0=skip, 1=draw) w0 bit 14 = flip_x w0 bit 13 = flip_y w0 bit 12..10 = sizex (3-bit, +1) → 1..8 tile larghezza
- rtl/GundamSD/GundamSD_sprite_renderer.sv:42 Multi-tile: tile_code += 1 per sub-tile (TODO: ordine x-major o y-major da verificare con dump MAME — assunto x-major per ora).
- rtl/GundamSD/GundamSD_sprite_renderer.sv:45 Priority callback dcon.cpp::pri_cb: pri=0 → above FG pri=1 → above MG pri=2 → above BG pri=3 → above Text (= sotto Text)
- rtl/GundamSD/GundamSD_sprite_renderer.sv:134 SEI0211 get_coordinate (MAME sei021x_sei0220_spr.h): coord &= 0x1ff; return (coord >= 0x180) ?
- rtl/GundamSD/GundamSD_sprite_renderer.sv:181 Tile code finale Y-MAJOR (MAME draw_internal: ax=outer, ay=inner, code++): sub_index = ax*sizey + ay → cur_tile = code + eff_tile_x*sp_h + eff_tile_y
- rtl/GundamSD/GundamSD_text_renderer.sv:25 Specifiche da MAME (src/mame/seibu/dcon.cpp):
- rtl/GundamSD/GundamSD_text_renderer.sv:183 --- Stage 3: pen decode --- MAME readbit: bit MSB-first → src[bn/8] & (0x80 >> (bn%8)) In Verilog LSB-first, bit position = 7 - (bn%8).
- rtl/GundamSD/GundamSD_tile_layer.sv:25 Differenze fra layer (da MAME dcon.cpp):
- rtl/GundamSD/GundamSD_tile_layer.sv:277 MAME readbit: src[bitnum/8] & (0x80 >> (bitnum%8)) (MSB-first) Verilog è LSB-first: bit posizione = 7 - (bitnum%8).
- rtl/GundamSD/GundamSD_video_timing.sv:35 Active area da MAME (sdgndmps_map): visarea 0..40*8-1, 2*8..30*8-1 quindi 320×224, V offset = 16 (top blank).
- README.md:9 This core reimplements the hardware in SystemVerilog from MAME references (`seibu/dcon.cpp`, `seibu/seibu_crtc.cpp`), the Seibu CRTC documentation, the main 680
- README.md:48 MAME-accurate Seibu CRTC (scroll, layer enable, flip screen) and SEI0211 sprite priority
- README.md:63 YM2151 FM (jt51) + OKI M6295 ADPCM (jt6295) with MAME-accurate mixer
- README.md:135 | Custom video CRTC| Seibu CRTC (legionna.cpp / seibu_crtc.cpp) |
- README.md:216 The **MAME** project for invaluable hardware reference (`seibu/dcon.cpp`, `seibu/seibu_crtc.cpp`).
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 1
- GundamSD.sv:305 SD Gundam SYSTEM port ($E0004) — verified MAME dcon.cpp:345-356 bit0 = START1 (active LOW) bit4 = START2 (active LOW) bit8 = SERVICE (active LOW) PORT_SERVICE_NO_TOGGLE altri = UNKNOWN/UNUSED → tied 1 Coin inputs NON sono qui
MAMEドライバと同じ文言を含む(出典の明記なし) — 6