← コア一覧
Arcade-KonamiHornet_area-perf (ppriest)
MAMEのドライバにない実基板の資料を引用 — 1
MAMEとの相違点を記載 — 2
- rtl/board/hornet_board.sv:1112 clutData: index in bits 31:24; MAME ignores it while fbiInit1 holds video timing reset
- rtl/board/hornet_icache.sv:3 The PPC's instruction fetches through a 1 KB two-way cache of 8-word lines, on port A (the PPC403GA has a 2 KB instruction cache; MAME does not model it, so neither its size nor its timing is the chip's).
MAMEのソースを引用 — 128
- KonamiHornet.sv:137 MAME's default keys beside the pads (rtl/mame_keys.sv), in the J1 line's layout: F2 the test switch, 9/0 the service coins
- KonamiHornet.sv:207 gradius4's defaults (hornet.cpp), Monitor Type 15KHz
- KonamiHornet.sv:277 the M48T58's clock takes the host's time as the board leaves reset (MAME: once, at start)
- KonamiHornet.sv:363 players 1 and 2: J1's bits 0-3 right, left, down, up; 4-6 Power Up, Shot, Missile (buttons 1-3); 7 Start, 8 Coin, 9 Service, 10 Test (hornet.cpp INPUT_PORTS hornet: active low); 11 Pause, a toggle
- rtl/board/hornet_board.sv:3 Konami Hornet, one CG board (gradius4): PPC403GA, ADSP-21062 and Voodoo 1 with the glue between them, from MAME's hornet.cpp and konppc.cpp, and the picture (hornet_video.sv: the Voodoo's displayed buffer under the K037122 tilemap).
- rtl/board/hornet_board.sv:22 Video timing comes from the Voodoo's hSync/vSync/backPorch/videoDimensions registers, taken from the SHARC's writes to them, as MAME's recompute_video_timing does (voodoo.cpp:2746): a frame is vSync.off + vSync.on lines; vertical blank runs
- rtl/board/hornet_board.sv:219 Stand-in for the 68000's side of the K056800 (HACKS.md): once SNDRES (sysreg 4 bit 7) lets it run, its 344.5 Hz timer (hornet.cpp:1405) counts the low nibble of snd_to_host[0]; a sound interrupt (host register 7) is answered SND_ACK clocks
- rtl/board/hornet_board.sv:222 MAME's boot: 0x05..0x0C, command, 0x8D within 511 polls (debug/gradius4-bootlog); in play 0x85 (frame 7500).
- rtl/board/hornet_board.sv:225 the 68000's interrupt handler, well inside MAME's 511 polls
- rtl/board/hornet_board.sv:236 konppc drops CG-board accesses for board ids it does not have (konppc.cpp:131-150)
- rtl/board/hornet_board.sv:277 M48T58: 8 KB, 4 bytes a PPC word (MAME's 8-bit handlers on the 32-bit bus: a word access is 4 consecutive bytes, byte 0 in bits 31:24)
- rtl/board/hornet_board.sv:349 port A address of a PPC address, and whether it is on port A (hornet.cpp:947-963)
- rtl/board/hornet_board.sv:396 Cheats: once a frame, each code's byte written through port A (lowest priority), OR-ed into the byte read first when its flags' bit 0 is set (MAME's "pb@a = v | (pb@a BAND ~v)"); a write drops the instruction cache's line, as a PPC store do
- rtl/board/hornet_board.sv:521 board devices (hornet.cpp:947-963, konppc.cpp:131-222)
- rtl/board/hornet_board.sv:537 reg 0x14 reads 0x3fa (k037122.cpp reg_r)
- rtl/board/hornet_board.sv:640 the shared RAM, the SHARC's half-words (konppc.cpp:291-313: odd offset low half, even high): the address the first clock (a write then), the answer the second
- rtl/board/hornet_board.sv:779 SHARC data map (hornet.cpp:1057-1066), word addresses
- rtl/board/hornet_board.sv:798 shared RAM, the SHARC's half-words (konppc.cpp:291-313): odd offset low half, even high
- rtl/board/hornet_board.sv:825 hornet.cpp:1060
- rtl/board/hornet_board.sv:878 power-on: konppc's init (konppc.cpp:49-58), the SHARC held in reset (hornet.cpp:1352)
- rtl/board/hornet_board.sv:892 konppc.cpp cgboard_dsp_comm_w_ppc
- rtl/board/hornet_board.sv:898 RESET released: MAME resets the SHARC then (diexec.cpp:717-729), with its EPROM boot from shared RAM
- rtl/board/hornet_board.sv:909 sysreg 7 (hornet.cpp:798-819): bit 6 clears IRQ0, bits 5-4 the CG board id
- rtl/board/hornet_board.sv:960 konppc.cpp dsp_comm_sharc_w, CGBOARD_TYPE_HORNET
- rtl/board/hornet_board.sv:965 k033906.cpp: PCI registers or 256 words of RAM
- rtl/board/hornet_board.sv:1069 until the Voodoo's vSync is written, MAME's screen keeps hornet.cpp's 428 lines and the Voodoo's vblank starts and stops at line 0 (m_vsyncstart 0, voodoo.cpp:2527-2603)
- rtl/board/hornet_board.sv:1074 MAME takes the line rate whose frame is nearest its current one, hornet.cpp's 58.05 Hz when the game writes the timing (voodoo.cpp:2759-2790): under 333 lines 15.75 kHz, else 25 kHz (31.5 kHz from 480 lines; no set asks for it).
- rtl/board/hornet_board.sv:1081 sync from the Voodoo's registers: the hSync pulse ends the line, the window at backPorch after it; vSync from line vSync.off to the frame's end (hornet.cpp's 428 lines' last 6 until written)
- rtl/board/hornet_board.sv:1090 the SHARC's (or loader's) writes to hSync, vSync, backPorch, videoDimensions and clutData (voodoo.cpp:2403-2445)
- rtl/board/hornet_board.sv:1098 hornet.cpp's screen until the Voodoo's timing is written: 512 x 384 from (41, 27); the sync pulse gradius4's
- rtl/board/hornet_rtc.sv:3 The M48T58's clock (MAME timekpr.cpp, m48t58_device): bytes 0x1FF8-0x1FFF are registers here, the rest of the 8 KB is hornet_board's RAM.
- rtl/board/hornet_rtc.sv:9 set loads the counters from the host's time (hps_io's RTC, MSM6242B layout: BCD seconds, minutes, hours, date, month, year, then the day of the week 0-6) and copies them into the bytes, as MAME does once at start.
- rtl/board/hornet_rtc.sv:53 February: 29 when the year is a multiple of 4 (MAME: the binary year % 4).
- rtl/board/hornet_video.sv:3 Hornet's picture: the Voodoo's displayed buffer through its CLUT, with the K037122's rotate/zoom tilemap over it (hornet.cpp screen_update: voodoo update, then k037122 tile_draw).
- rtl/board/hornet_video.sv:6 Screen: the board's line of pixels (hpix, a pixel every 4 or 5 clocks); 512 x v_height visible from the Voodoo's back porch (xoffs, yoffs), as MAME's recompute_video_timing sets its screen (voodoo.cpp:2749-2750).
- rtl/board/hornet_video.sv:12 K037122 per pixel, the tilemap position (cx, cy) = start + x * incx + y * incy in 16.16, x and y the raster position (x from xoffs) (k037122.cpp tile_draw, tilemap.cpp draw_roz_core without wraparound): outside the map, or pen 0, is transp
- rtl/board/hornet_video.sv:20 The K037122 draws from the registers as they are when a line is built; MAME draws the whole frame with the registers at the end of it.
- rtl/board/hornet_video.sv:23 Voodoo colours go through the CLUT as MAME's voodoo update builds its pens: per channel, the 33 CLUT entries interpolated at 1/8 steps (voodoo.cpp:858-889), rebuilt after a CLUT write.
- rtl/board/hornet_video.sv:37 K037122 registers (k037122.cpp: 0x20 scroll, 0x24 incyx/incyy, 0x28 incxx/incxy, 0x30 control, 0x34 origin and CLUT position)
- rtl/board/hornet_video.sv:62 backPorch.horizontal + 2 (voodoo.cpp:2418)
- rtl/board/hornet_video.sv:105 MAME's clut[32] kludge: 0 with clut[31] non-zero reads as white (voodoo.cpp:862-863)
- rtl/board/hornet_video.sv:121 MAME's power-on CLUT (voodoo.cpp:994-996): a grey ramp of pal5bit(n), entry 32 white.
- rtl/board/hornet_video.sv:122 gradius4 runs with it: MAME snapshots at frames 140, 195, 625 and 2150 all hold it.
- rtl/board/hornet_video.sv:181 K037122 frame parameters (k037122.cpp tile_draw)
- rtl/board/hornet_video.sv:190 the 128x128 map takes incyx unshifted (k037122.cpp:170), MAME_KLUDGES.md
- rtl/board/hornet_video.sv:231 character byte: tile * 128 + row * 16 + {2,0,6,4,10,8,14,12}[column] after the flips, in MAME's host byte order (little-endian words; k037122.cpp gfx layout, MSB-first planes)
- rtl/cpu/ppc403/ppc403_core.sv:3 IBM PowerPC 403GA integer core, written from MAME's model (src/devices/cpu/powerpc, ppccom.cpp and ppcdrc.cpp, PPCCAP_4XX).
- rtl/cpu/ppc403/ppc403_core.sv:5 MAME's semantics are followed where they differ from the IBM manual; each such place is marked "MAME:" and listed in docs/MAME_KLUDGES.md.
- rtl/cpu/ppc403/ppc403_core.sv:173 pending external interrupt, as MAME computes irq_pending (ppccom.cpp:2573-2577)
- rtl/cpu/ppc403/ppc403_core.sv:178 EXISR level mask from IOCR (ppccom.cpp:2556-2563)
- rtl/cpu/ppc403/ppc403_core.sv:190 MAME gates every interrupt on MSR[EE] (ppcdrc.cpp:805-811)
- rtl/cpu/ppc403/ppc403_core.sv:283 4xx write protection (ppccom.cpp:1336-1344): 1 = the write faults.
- rtl/cpu/ppc403/ppc403_core.sv:434 MAME: MQ reads 0 (ppcdrc.cpp:4248)
- rtl/cpu/ppc403/ppc403_core.sv:435 MAME: alignment writes the OEA DAR
- rtl/cpu/ppc403/ppc403_core.sv:442 MAME: PVR = PPC_MODEL_403GA (ppc.h:193)
- rtl/cpu/ppc403/ppc403_core.sv:449 MAME: the written value, not a count
- rtl/cpu/ppc403/ppc403_core.sv:671 external interrupt lines: edge-set, level-mirror (ppccom.cpp:2539-2572)
- rtl/cpu/ppc403/ppc403_core.sv:692 MAME fires one tick after the timebase crosses a multiple of the period
- rtl/cpu/ppc403/ppc403_core.sv:706 MAME clears only WRC; the rest is power-on zero
- rtl/cpu/ppc403/ppc403_core.sv:725 external / timer interrupt (ppcdrc.cpp:1069-1100)
- rtl/cpu/ppc403/ppc403_core.sv:851 MAME restarts the PIT when PIE changes (ppccom.cpp:2206-2208)
- rtl/cpu/ppc403/ppc403_core.sv:861 MAME: each timebase half write zeroes the other half (ppccom.cpp:2224-2229)
- rtl/cpu/ppc403/ppc403_core.sv:897 MAME: undefined cases give 0, OV, CR0 = EQ (ppcdrc.cpp:3549-3566)
- rtl/cpu/ppc403/ppc403_core.sv:923 MAME: m_cache_line_size = 32 (ppccom.cpp:715)
- rtl/cpu/ppc403/ppc403_core.sv:927 MAME: cache operations are no-ops; dcread/icread write 0 to rD
- rtl/cpu/ppc403/ppc403_core.sv:953 MAME: stwcx.
- rtl/cpu/ppc403/ppc403_core.sv:1020 MAME: lmw skips rA except when rA is r31 (ppcdrc.cpp:2937)
- rtl/cpu/ppc403/ppc403_core.sv:1034 MAME: the first byte clears the register (ppcdrc.cpp:1675)
- rtl/cpu/sharc/sharc_fp_pkg.sv:3 ADSP-2106x floating-point operations as MAME computes them (src/devices/cpu/sharc/compute.hxx).
- rtl/cpu/sharc/sharc_fp_pkg.sv:4 MAME uses the host's IEEE single arithmetic, round to nearest even, and flushes denormals only where compute.hxx says so: the ALU flushes its inputs and its result, the multiplier flushes neither.
- rtl/cpu/sharc/sharc_fp_pkg.sv:6 These functions reproduce that bit for bit, flags included; every departure from the chip that this inherits is MAME's and is listed in docs/MAME_KLUDGES.md.
- rtl/cpu/sharc/sharc_fp_pkg.sv:245 MAME adds in a C int: the sum wraps at 32 bits (compute.hxx:409-410)
- rtl/cpu/sharc/sharc_fp_pkg.sv:319 MAME assigns the integer pattern to the float member here, so the register gets that integer converted to float (compute.hxx:386, 391)
- rtl/cpu/sharc/sharc_fp_pkg.sv:332 uint32 -> single, round to nearest even (for the MAME slip above)
- rtl/cpu/sharc2/sharc2_alu.sv:230 FADD_FSUB's two infinite operands: MAME stores the integer pattern converted (compute.hxx:386)
- rtl/cpu/sharc2/sharc2_core.sv:3 ADSP-21062 SHARC, v2: v1's MAME transcription (rtl/cpu/sharc) as an in-order pipeline, docs/SHARC_V2.md.
- rtl/cpu/sharc2/sharc2_core.sv:6 F PM address: the next instruction of MAME's fetch queue (daddr, faddr, nfaddr), with the loop end's jump back predicted D PM data; decode; R operands read with forwarding from X and W; interlock on a result that is not ready (float, fixe
- rtl/cpu/sharc2/sharc2_core.sv:17 X is where the architectural state changes, in program order; the instruction in X checks that it is the one MAME's queue names and is squashed otherwise, so the fetch side only predicts.
- rtl/cpu/sharc2/sharc2_core.sv:23 With DMA_LOCK (MAME's order, the benches) the next instruction's end waits for it; without (the board), an instruction ends while the engine works and the next quantum starts after the next instruction that finds it free (docs/HACKS.md).
- rtl/cpu/sharc2/sharc2_core.sv:25 `serial` (benches): one instruction in the pipeline at a time and DMA between them, so that the state at dbg_exec is MAME's before the instruction, as v1's.
- rtl/cpu/sharc2/sharc2_core.sv:58 benches: IOP reads return dbg_iop_val (MAME's DMA status)
- rtl/cpu/sharc2/sharc2_core.sv:98 the sequencer's registers (MAME's sharc_internal_state without R, the DAGs, the PC, loop and status stack arrays and the DMA transfer state)
- rtl/cpu/sharc2/sharc2_core.sv:699 MAME's b + l, 32 bits
- rtl/cpu/sharc2/sharc2_core.sv:838 An instruction is MAME's micro-ops in order: the pc shift and the loop end (its first clock), a jump's clear-interrupt, the handler (compute, accesses), the stack operations, the jump, RTI, the universal-register write, the interrupt check,
- rtl/cpu/sharc2/sharc2_core.sv:963 The vector's first instruction skips the interrupt part: MAME takes the interrupt and runs it in one step
- rtl/cpu/sharc2/sharc2_core.sv:1052 the loop end (sharc.cpp:1286-1335), after the pc shift: the PC is Q.daddr
- rtl/cpu/sharc2/sharc2_core.sv:1315 MAME's queue after this clock's X from the registered state: an X change of this clock is seen a clock later (the queue's window covers the shift; a loop or jump change mispredicts once, and X squashes)
- rtl/cpu/sharc2/sharc2_core.sv:1581 after the last DMA quantum, as MAME orders them
- rtl/cpu/sharc2/sharc2_core.sv:1945 device_reset's state after the boot DMA (sharc.cpp:935-1000)
- rtl/cpu/sharc2/sharc2_pkg.sv:4 The arithmetic is v1's (rtl/cpu/sharc/sharc_core_ops.svh alu_fixed, shift_op, compute), which follows MAME's compute.hxx and sharcops.hxx; flags are returned as the bits to clear and the bits to set, applied in instruction order by the core
- rtl/cpu/sharc2/sharc2_pkg.sv:225 AC is the 33-bit sum's carry: MAME's r < x (add) and r <= x (subtract) with its two exceptions (x + 0xFFFFFFFF + 1; x - 0xFFFFFFFF + 0 - 1) are exactly that
- rtl/cpu/sharc2/sharc2_pkg.sv:344 shifter_ref is MAME's form for form (compute.hxx), kept for sim/shifter_tb
- 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/raster/vraster.sv:3 Hornet rasteriser: the Voodoo 1 subset Gradius IV uses (docs/RASTER.md), written from MAME's model (src/devices/video/voodoo.cpp, voodoo_render.cpp, voodoo_regs.h).
- rtl/raster/vraster.sv:4 Ports as SpinalVoodoo's CoreHornet, so that hornet_board does not change; the frame buffer and texture memory are laid out as MAME's (2 MB frame buffer at FB_BASE, TMU memory at TEX_BASE).
- rtl/raster/vraster.sv:8 register port -> FIFO -> command processor: register writes (MAME's alias map, the float registers converted to fixed point), and the commands in order: fast fill, swap buffer, triangle; status and register reads answered at once.
- rtl/raster/vraster.sv:18 FB_BASE + 3 MB: above MAME's 2 MB frame buffer
- rtl/raster/vraster.sv:235 MAME m_vblank_count, saturating at 250
- rtl/raster/vraster.sv:287 the register a FIFO entry names, after MAME's alias map (voodoo.cpp:229) when remapped
- rtl/raster/vraster.sv:341 MAME triangle(): the sub-pixel adjustment, written back to the registers (products here, sums in C_ADJ, added in C_ADJ2)
- rtl/raster/vraster.sv:375 vblank start (MAME vblank_start): count, then swap if one is due
- rtl/raster/vraster.sv:387 MAME counts swap commands as they enter the FIFO (map_register_w) and as they are done
- rtl/raster/vraster.sv:399 status (MAME reg_status_r) and the readable registers
- rtl/raster/vraster.sv:416 Fast fill (MAME rasterizer_fastfill): the clip rectangle, colour from color1 dithered, depth from zaColor, a burst a row
- README.md:3 A MiSTer FPGA core for Konami's Hornet arcade hardware (MAME's `konami/hornet.cpp`), built with Quartus Prime 17.0.2 Lite for the DE10-nano.
- README.md:91 | MAME description | Why |
- README.md:93 | Teraburst and clones | GN680 board; `MACHINE_NOT_WORKING` in MAME |
- README.md:94 | Thrill Drive (Hornet LAN sets) | LAN board; `MACHINE_NOT_WORKING` in MAME |
- README.md:95 | Silent Scope, Silent Scope 2 and Voodoo 2 variants | two 3D boards or a Voodoo 2; `MACHINE_NOT_WORKING` in MAME |
- README.md:103 | 3dfx Voodoo 1 | rasteriser, 2 MB frame buffer, 4 MB texture memory | written here (`vraster`) for the subset Gradius IV uses, from MAME's model; frame and tex
- README.md:104 | K037122 | tilemap overlay and the 8192-colour palette | written here from MAME's model; the overlay's rotate and zoom are built, Gradius IV does not use them
- README.md:105 | K033906 | the Voodoo's PCI configuration | written here from MAME's model |
- README.md:107 | konppc glue, sysreg | shared RAM, comm registers, interrupts, inputs | written here from `hornet.cpp` and `konppc.cpp` |
- README.md:108 | MC68000, K056800, RF5C400 | sound | on the HPS ([MiSTer_ArcadeSoundServer](https://github.com/ppriest/MiSTer_ArcadeSoundServer)): Musashi and MAME's RF5C400 a
- README.md:123 MAME's `set_raw()` declares 644 dots per line (24.84 kHz, 58.05 Hz) and doubts its own input clock; at run time MAME picks 15.75 or 25 kHz from the Voodoo's reg
- README.md:163 Put the MAME `gradius4` set in `games/mame`
- README.md:275 MAME is the accuracy reference, with its own acknowledged uncertainties noted where they matter.
- README.md:278 **PPC403GA:** 1,000,000 instructions from reset, 743,505 at frame 3000 (attract) and 2,000,000 at frame 7500 (stage 1) against MAME's trace; PC and 37 registers
- README.md:280 **SHARC:** 300,000 instructions at frame 3000 and 2,000,000 at frame 7500 against MAME's trace; PC and 56 registers identical.
- README.md:281 Floating point against MAME's host-float code: 9,200,000 vectors, 0 mismatches.
- README.md:283 **Voodoo (`vraster`):** frames 2150, 7500 and 3000 replayed from MAME's state: 150, 5 and 0 of 196,608 pixels differ (fixed-point perspective divide, `docs/HACK
- README.md:292 **Hardware against MAME:** the Voodoo's texture memory read back from the DE10-nano's DDR3 (`/dev/mem`) compared word for word with MAME's; the title screen aga
- README.md:301 The **MAMEdev team** — Ville Linde for `hornet.cpp`, `konppc.cpp` and the SHARC; Aaron Giles and R. Belmont for the PowerPC; Aaron Giles for the Voodoo; Fabio P
- README.md:306 **Karl Stenerud** for [Musashi](https://github.com/kstenerud/Musashi), the 68000 in `arcsnd`; Ville Linde for MAME's RF5C400 and K056800, which `arcsnd` runs.
- README.md:321 | `debug` | reference captures from MAME used as ground truth (gitignored) |
- README.md:322 | `roms` | your own MAME sets (gitignored, never committed) |
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 4
- rtl/cpu/sharc2/sharc_fadd.sv:3 Float add / subtract in two stages, bit-exact to sharc_fp_pkg::f_add / f_sub (MAME's host arithmetic with the ALU's input and result flush).
- README.md:101 | IBM PPC403GA @ 32 MHz | main CPU | written here from MAME's PowerPC model; 1,000,000 instructions from reset and 2.7 M in two game windows match MAME's trace
- README.md:102 | ADSP-21062 SHARC @ 36 MHz | geometry DSP | written here from MAME's model; 2.3 M instructions in two game windows match MAME's trace in PC and 56 registers, f
- README.md:285 **Whole board in Verilator** from MAME snapshots: at frame 7500 the screen matches MAME's in 7501 (0 of 196,608 pixels differ) and the buffer swaps keep step; f
MAMEから移植・書き写した、または取り入れたと記載 — 1
- README.md:215 `docs/MAME_KLUDGES.md` lists what is taken from MAME as behaviour and what is known not to be right.
MAMEの近似をそのまま採用 — 2