← コア一覧
HeavySmash (yaguboo)
MAMEのソースを引用 — 85
- third_party/cpu/amber_a23/a23_register_bank.v:85 Real silicon powers up with garbage and the game does not care (it saves and restores registers it has never written), but a golden comparison does: MAME starts them at 0, and the boot's first context save at 0x3B4B0 stored deadbeef where M
- third_party/cpu/amber_a23/a23_register_bank.v:89 Zero here = deterministic on the board and byte-comparable against MAME.
- projects/dataeast/heavy_smash/rtl/hs_top.sv:307 ---------------------------------------------------------------- sprite DMA The real DE-0385-2 latches the sprite list: the game writes spriteram throughout the first quarter of the frame, pokes 0x1D0000, then polls 0x1D0010 for completion
- projects/dataeast/heavy_smash/rtl/hs_top.sv:325 MAME's frame-end snapshot sees the same bytes: writes after the first 25 % of the frame measured ZERO.
- projects/dataeast/heavy_smash/rtl/hs_top.sv:351 The PCB copies ON the poke; the game polls 0x1D0010 for it, so the transfer is long enough to be worth waiting for, and MAME implements neither.
- projects/dataeast/heavy_smash/rtl/hs_top.sv:357 A PCB would not show those; this and MAME both do.
- projects/dataeast/heavy_smash/rtl/hs_top.sv:470 MAME shows the game reading 0xFFFFFFFF here (all inputs released, DO=1) -- tools/eepdump.lua.
- projects/dataeast/heavy_smash/rtl/hs_top.sv:472 A BLANK 93C46 reads all ones, and that is the state the game expects to find on a fresh board: MAME fills an absent dump with ~0 (eeprom.cpp:216) and hvysmsh's dump is commented out.
- projects/dataeast/heavy_smash/rtl/hs_top.sv:518 ---- bring-up liveness, second byte: the write/read strobes MAME's healthy boot produces in order (D1: ctl_w=18 by f3, vram_w=3840 by f3, oki0_r=1/frame).
- projects/dataeast/heavy_smash/rtl/memory/hs_sdram.sv:71 The DE156's program ROM is 32 bits wide on the real board -- two 16-bit mask ROMs in parallel (hvysmsh.cpp's ROM_LOAD32_WORD pair) -- so an instruction there costs one ROM access.
- projects/dataeast/heavy_smash/rtl/cpu/hs_de156.sv:4 This is the transform of references/upstream/mame/src/mame/dataeast/ deco156.cpp:43-124, factored so it can sit in the CPU fetch path.
- projects/dataeast/heavy_smash/rtl/cpu/hs_de156.sv:24 deco156.cpp:47 -- addr = (a & 0xff0000) | 0x92c6; the index's bits 17:16 pass STRAIGHT THROUGH to the source address, only the low 16 bits are XOR-chained.
- projects/dataeast/heavy_smash/rtl/cpu/hs_de156.sv:70 bitswap<32>(v ^ const, b31..b0) from deco156.cpp:90-119, result bit i = v'[b_i].
- projects/dataeast/heavy_smash/rtl/cpu/hs_a23_mem.sv:14 Acking it performs the access twice -- the bench caught it on the second store of the boot: MAME writes 0x180000 then 0x120000, Amber-over-Wishbone wrote 0x180000 twice (sim/tb_amber_boot.sv, DEBUG_LOG D12).
- projects/dataeast/heavy_smash/rtl/cpu/hs_arm2.sv:4 MAME instantiates it as `de156_cpu_device : arm2_cpu_device` with ARCHFLAG_MODE26 | ARCHFLAG_ONLY26 (arm7.h:638, arm7.cpp:2000) and FBNeo runs it on its 26-bit ARM2 core.
- projects/dataeast/heavy_smash/rtl/cpu/hs_bus.sv:2 Heavy Smash -- ARM bus decode (hvysmsh_map, hvysmsh.cpp:164-179)
- projects/dataeast/heavy_smash/rtl/cpu/hs_bus.sv:9 Alignment rules follow MAME's mem_mask behaviour exactly: - 16-bit device areas (vram/rowscroll/spriteram/control) take the LOW halfword of a word or halfword write at offset +0 only; anything at +2 is dropped (mask &= 0x0000ffff makes it a
- projects/dataeast/heavy_smash/rtl/cpu/hs_bus.sv:75 The game writes 0x1D0000 once a frame and then polls 0x1D0010 for completion -- hvysmsh.cpp maps the poll as nopr and calls it "Check for DMA complete?", and MAME implements no DMA at all, drawing instead from a frame-end snapshot of sprite
- projects/dataeast/heavy_smash/rtl/cpu/hs_bus.sv:218 ---- CPU-side addresses for the shared BRAMs (combinational) --------------- Sizes are MAME's map, each window holding ONE 16-bit value per 32-bit slot (hvysmsh.cpp:155-162, :178): PF vram +0x10000-0x11FFF = 0x2000 bytes -> 0x800 words
- projects/dataeast/heavy_smash/rtl/cpu/hs_bus.sv:239 MAME at the title screen has {_,_,_,_,_,8080,0080,0001}; we had {0080,0,...}.
- projects/dataeast/heavy_smash/rtl/cpu/hs_bus.sv:241 Same fault as hs_video's rd_x, found the same way -- by diffing our tilegen state against MAME's (sim/tb_frame.sv write_vram vs tools/vramdump.lua).
- projects/dataeast/heavy_smash/rtl/video/hs_deco56.sv:4 decocrpt.cpp deco_decrypt, on the fly per 16-bit ROM word: phys_word = (i & ~0x7ff) | address_table[i & 0x7ff] word = bitswap16(sdram[phys] ^ xor_masks[xor_table[phys & 0x7ff]], swap_patterns[swap_table[i & 0x7ff]]) Table lookup takes
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:4 Reference: MAME src/mame/shared/decospr.cpp, draw_sprites_common, the !m_alt_format path.
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:5 That file is NOT in this factory's sparse MAME checkout by default -- src/mame/shared was missing, which is why the first version of this module was written without it.
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:7 Add it with git -C references/upstream/mame sparse-checkout add src/mame/shared
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:10 hvysmsh specifics (hvysmsh.cpp:104-118, 328-339): - pri_cb IS set, so MAME walks the list 0x7FC DOWN to 0 and draws through prio_transpen.
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:26 prio_transpen sets `pmask |= 1 << 31` (drawgfx.cpp:933, "high bit of the mask is implicitly on") and its pixel op writes `priority = 31` for every non-transparent pixel (drawgfxt.ipp:216-226), so the next sprite over that pixel is dropped.
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:30 The first entry of MAME's descending walk -- the HIGHEST spriteram offset -- keeps the pixel.
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:112 MAME's own gate (ypos <= cliprect.bottom() && ypos >= cliprect.top()-16) is implied once the line is inside the stack AND visible, so it is not repeated.
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:128 decospr.cpp:296-304.
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:143 decospr.cpp:345: the double-wing partner is (sprite - m*inc) - mult2
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:148 MAME's gfx has 65536 elements because RGN_FRAC(1,2) of the 8 MB region is 0x400000 bytes, but the upper half of each plane is the ROM_REGION gap and reads as zero -- a blank tile.
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:159 ---- pixel nibble -------------------------------------------------------- Same gfx_layout as the tiles (hvysmsh.cpp:285-304, gfx_hvysmsh_spr uses tilelayout): planeoffset { half+8, half, 8, 0 } with planeoffset[0] as the MSB, xoffset { STE
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:4 hvysmsh config (hvysmsh.cpp:360-372): both layers 64x32, colour banks 0x00 (PF1 fg) / 0x10 (PF2 bg), colour mask 0xf, tile bank = (bankval & 0x70) << 8, 8x8 and 16x16 gfx share the ROM.
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:8 Per line, per playfield, following deco16ic.cpp custom_tilemap_draw (:321-432), which covers plain / row-scroll / simultaneous row+col: src_y = (ly + scrolly) & hmask xbase = scrollx + rowscroll[src_y / row_type] per tile col: src_x = (xbas
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:15 Tile word: code = w & 0xfff | bank; colour = w >> 12; bit 15 with ctl1[0]/[1] gives x/y flip and cuts colour to 3 bits (deco16ic.cpp:279-308).
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:86 These cannot change inside a line anyway: MAME's control_w calls update_partial, and a tap over the whole attract shows every control write landing in the first 10% of a frame.
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:103 hvysmsh.cpp bank_callback: (bank & 0x70) << 8, i.e. bankval[6:4] << 12.
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:160 ---- logical ROM word for the fetch in flight ----------------------------- MAME's gfx_element does `code %= elements()`: the 16x16 decode has RGN_FRAC(1,2)/64 = 16384 elements and the 8x8 one 65536, so the 16x16 path keeps 14 bits of code
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:210 ---- pixel nibble ------------------------------------------------------------- Derived from MAME's gfx_layout, not from prose (hvysmsh.cpp:285-304):
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:289 ---- VRAM index ---------------------------------------------------------- The two tilemaps of a playfield are created with DIFFERENT mappers (deco16ic.cpp:229-233): the 16x16 one with deco16ic_device::scan_rows (:273-277) and the 8x8 one w
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:418 PF2 is drawn with TILEMAP_DRAW_OPAQUE and PF1 without (hvysmsh.cpp:111-116), so PF2's pen 0 is a REAL colour -- colour*16 + 0 of its bank -- and not a hole.
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:420 Writing it as 0 put palette entry 0 (black) under the whole screen: 51658 of 76800 pixels at the title screen, 67% of the picture, where MAME has 0x100/0x110/0x120.
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:424 A disabled layer (control0 bit 7, deco16ic.cpp:585-600) draws nothing at all, and under PF2 that leaves bitmap.fill(0) showing: index 0 either way.
- projects/dataeast/heavy_smash/rtl/video/hs_video.sv:4 320x240 visible inside a 396x272 frame at 6.25 MHz pixel clock (100 MHz / 16) = 58.05 Hz refresh (MAME: 58 Hz, PCB note :467).
- projects/dataeast/heavy_smash/rtl/video/hs_video.sv:6 MAME visarea is (0..319, 8..247); visible line = vcount - 8.
- projects/dataeast/heavy_smash/rtl/video/hs_video.sv:13 Composition order (hvysmsh.cpp:104-118): PF2 opaque, sprites, PF1 transparent.
- projects/dataeast/heavy_smash/rtl/video/hs_video.sv:95 IRQ: HOLD for the first 8 lines of blanking (~2 x MAME's 529 us, safe side), CLEAR at vcount 256 (hvysmsh.cpp:318-321 vblank_interrupt).
- projects/dataeast/heavy_smash/rtl/video/hs_video.sv:102 MAME's screen is 320x256 with set_visarea(0, 319, 8, 247) (hvysmsh.cpp:350-353): the tilemap and the sprites are drawn into that 256-line bitmap and only rows 8..247 are shown, so the first visible line reads tilemap row 8 + scrolly, not sc
- projects/dataeast/heavy_smash/rtl/video/hs_video.sv:106 Handing the renderers 0..239 put the whole picture 8 lines down; a (dx,dy) alignment search against MAME's own frame picked dy=-8 at every dx (77.2% at dx=-16 vs 69.1% at 0,0).
- README.md:32 MAME 의 표준 ROM 세트를 그대로 읽습니다.
- README.md:36 | MAME 세트 | 공식 명칭 | 상태 |
- README.md:45 같은 MAME 드라이버 파일에 들어 있는 **World Cup Volley '95** (`wcvol95`, `wcvol95j`, `wcvol95x`) 는 지원하지 않습니다.
- README.md:61 직접 마련한 MAME ROM 세트 zip 을 SD 카드의 `/games/mame/` 에 넣습니다.
- README.md:63 zip 은 MAME 세트 이름 그대로 두고, 압축을 풀지 않습니다.
- README.md:115 MAME 드라이버(`hvysmsh.cpp`)와 그것이 부르는 장치 소스(`deco16ic.cpp`, `decospr.cpp`, `deco156.cpp`, `decocrpt.cpp`, OKI, EEPROM, ARM 코어)를 먼저 옮겨 적고, 메모리 맵·클럭·인터럽트·화면·ROM 배치를 표
- README.md:120 두 복호화 엔진은 실제 ROM 덤프를 MAME 의 변환과 대조해 확인했습니다 (복호 결과 0 번지가 ARM 부트 코드 `EA00000D`).
- README.md:131 **2026-09-21 — CPU 교체, 그리고 MAME 와 같은 그림**
- README.md:133 실기에서 CPU 가 이상하게 죽는 원인을 추적하다가, DE156 이 ARM7TDMI 가 아니라 **26 비트 ARM2** 라는 것을 확인했습니다 (MAME 는 `de156_cpu_device` 를 `arm2_cpu_device` 로, 26 비트 전용 플래그와 함께 만듭니다).
- README.md:141 CPU+버스+EEPROM 이 부팅·초기화 전체에서 MAME 의 쓰기 스트림과 **172,594 건 전부** 순서·주소·데이터·폭까지 일치했습니다.
- README.md:143 렌더러를 MAME 그림과 픽셀 단위로 대조하는 시뮬레이션을 만들어 결함 여러 개를 고쳤고, 어트랙트 6 프레임이 모두 **76,800/76,800 픽셀 일치**했습니다.
- README.md:145 실기 화면도 MAME 프레임과 대조해 같은 그림임을 확인했습니다.
- README.md:146 OKI 샘플 ROM 주소(두 번째 칩의 비트 회전 방향, 뱅크 크기)를 MAME 와 대조해 바로잡았습니다.
- README.md:153 실기에서 게임이 MAME 의 약 0.55 배 속도로 돌았습니다.
- README.md:162 BGM 이 MAME 와 다르게 들리던 원인은 볼륨이 아니라, 두 OKI 가 서로 다른 샘플레이트로 돌아 계단파의 재구성 이미지가 칩마다 30 배 차이 났던 것이었습니다.
- README.md:164 칩별 선형 보간과 약한 프리엠퍼시스를 넣어 대역별 에너지 분포를 MAME 에 3.5 배 가깝게 맞췄습니다.
- README.md:182 먼저 **MAME 팀**에 깊이 감사드립니다.
- README.md:182 이 코어의 거의 모든 동작 — 메모리 맵, 두 단계의 암호화, 타일·스프라이트 포맷, 사운드 배선 — 은 MAME 개발자들이 수십 년에 걸쳐 분석하고 소스로 남겨 둔 지식 위에 서 있습니다.
- README.md:184 실제 기판을 대신해 "정답 그림"과 "정답 쓰기 순서"를 내어 준 것도 MAME 였습니다.
- README.md:188 https://github.com/mamedev/mame
- README.md:202 jt6295 는 MAME 의 OKI 모델과 샘플 단위로 거의 완전히 일치했고, jt9346 은 그대로 끼워 넣기만 하면 됐습니다.
- README.md:209 DE156·DECO 56 복호화의 상수와 표 (`deco56_*.hex`)는 MAME 소스의 데이터를 옮긴 것입니다.
- README.md:212 참고한 MAME 소스
- README.md:214 | MAME 파일 | 라이선스 | copyright-holders | 참고한 내용 |
- README.md:216 | `src/mame/dataeast/hvysmsh.cpp` | BSD-3-Clause | Bryan McPhail | 드라이버 전체: 메모리 맵, 클럭, 인터럽트, 화면, 입력·EEPROM 포트, OKI 뱅크·사운드 게인, ROM 배치 |
- README.md:217 | `src/mame/dataeast/deco156.cpp` | BSD-3-Clause | Bryan McPhail | DE156 프로그램 ROM 복호화 (주소 XOR 체인, 데이터 XOR·비트 순열) |
- README.md:218 | `src/mame/dataeast/decocrpt.cpp` | BSD-3-Clause | Nicola Salmoria | DECO 56 그래픽 복호화 표 (주소·XOR·스왑) |
- README.md:219 | `src/mame/dataeast/deco16ic.cpp` | BSD-3-Clause | Bryan McPhail | DECO 141 타일 생성기: 제어 레지스터, 타일 크기, 뱅크, 행·열 스크롤 |
- README.md:220 | `src/mame/shared/decospr.cpp` | BSD-3-Clause | Bryan McPhail, David Haywood | DECO 52 스프라이트 리스트 포맷, 순회 순서, 우선순위 |
- README.md:221 | `src/emu/drawgfx.cpp` | BSD-3-Clause | Nicola Salmoria, Aaron Giles | 투명 픽셀·플립 처리 규칙 |
- README.md:223 | `src/devices/cpu/arm7/arm7.cpp` | BSD-3-Clause | Steve Ellenoff,R. Belmont,Ryan Holtz | DE156 의 아키텍처 플래그와 동작 차이 |
- README.md:225 | `src/devices/machine/eeprom.cpp` | BSD-3-Clause | Aaron Giles | EEPROM 초기 상태와 동작 |
- README.md:227 **FBNeo** (`d_deco156.cpp` 등) 는 MAME 에서 읽은 사실을 독립적으로 교차 확인하는 용도로만 읽었습니다 — 인터럽트 시점, 스프라이트 우선순위, 팔레트, 사운드 샘플 주소 처리 등.
- README.md:252 메인 CPU 는 25 MHz 로 돕니다 (MAME 가 쓰는 28 MHz 의 약 89 %).
- README.md:258 사운드 재구성(선형 보간 + 프리엠퍼시스)과 VBlank 스프라이트 복사는 MAME 의 결과에 맞춘 구현이며, 실제 기판의 회로를 그대로 옮긴 것은 아닙니다.
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 4
MAMEドライバと同じ文言を含む(出典の明記なし) — 7
- projects/dataeast/heavy_smash/rtl/video/hs_deco56.sv:5 phys_word = (i & ~0x7ff) | address_table[i & 0x7ff] — 共通の文言: dataeast/decocrpt.cpp:618
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:13 - set_flip_screen(true): "sprites are flipped relative to tilemaps". — 共通の文言: dataeast/hvysmsh.cpp:106
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:113 gate (ypos <= cliprect.bottom() && ypos >= cliprect.top()-16) is implied — 共通の文言: shared/decospr.cpp:321
- projects/dataeast/heavy_smash/rtl/video/hs_decospr.sv:162 the MSB, xoffset { STEP8(8*2*16,1), STEP8(0,1) } so x=8..15 live in the — 共通の文言: dataeast/hvysmsh.cpp:301
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:13 yy = (src_y + colscroll[0x200 + (src_x&0x1ff)/col_type]) & hmask — 共通の文言: dataeast/deco16ic.cpp:390
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:213 tilelayout planeoffset { RGN_FRAC(1,2)+8, RGN_FRAC(1,2), 8, 0 } — 共通の文言: dataeast/hvysmsh.cpp:289
- projects/dataeast/heavy_smash/rtl/video/hs_deco141.sv:214 xoffset { STEP8(8*2*16,1), STEP8(0,1) } — 共通の文言: dataeast/hvysmsh.cpp:301