← All cores
Arcade-Midway-Wolf-Unit (Gm0rk)
Cites hardware documentation that MAME's driver does not — 1
- rtl/dcs_audio.sv:9 DSP memory map (dcs_8k_program_map / dcs_8k_data_map): program 0000-03FF ADSP-2105 internal RAM (in the core) 0800-1FFF external RAM, 6K x 24 3000-3003 the latches again (MAME input_latch32_r / output_latch32_w: data in bits 23-8) data
Cites hardware references or measurements that MAME's driver also gives — 1
Cites MAME source — 128
- Arcade-Midway-Wolf-Unit.sv:507 MRA ROM index 1: byte 0 the game id, bytes 1-8 where each 4 MB slot of MAME's graphics region went in the ROM image (FF: not present), byte 9 FF, bytes 10-11 where a patched copy of the program ROM starts (8 KB units, little endian; 0: none
- Arcade-Midway-Wolf-Unit.sv:543 UMK3: MAME's palette-ring penalty
- Arcade-Midway-Wolf-Unit.sv:568 ROM layout (byte addresses, the same in the MRA and in SDRAM): 0x000000 program, 1 MB (16-bit little endian) 0x100000 DCS sound ROMs, 4 x 1 MB 0x500000 security PIC program, 8 KB 0x502000 graphics, the used 4 MB slots of MAME's video re
- Arcade-Midway-Wolf-Unit.sv:783 The layouts follow MAME's input ports (midwunit.cpp): IN0 holds players 1 and 2 (stick and three buttons each), IN1 the fighting games' other three buttons or players 3 and 4, IN2 the coins, starts and cabinet switches.
- Arcade-Midway-Wolf-Unit.sv:792 {R, L, D, U} as MAME orders them (bit 0 up, 1 down, 2 left, 3 right)
- Arcade-Midway-Wolf-Unit.sv:797 the three IN0 / IN1 buttons of the team sports and Rampage: MAME's button 2 (shoot / punch) at bit 4, button 3 (pass / kick) at bit 5, button 1 (turbo / jump) at bit 6.
- Arcade-Midway-Wolf-Unit.sv:838 B1 high punch, B2 low punch, B3 high kick, B4 low kick, B5 block, B6 run; MAME's IN0 has high punch, block, high kick (bits 4-6), IN1 low punch, low kick, run (bits 0-2)
- Arcade-Midway-Wolf-Unit.sv:888 Build 93: and in attract mode (the game's state variable 1, game_state): the demo fights set a level of their own (UMK3's Rain against Shao Kahn 9), and at another one that demo freezes and the game resets (Gm0rk; MAME: at level 0, every ti
- Arcade-Midway-Wolf-Unit.sv:936 Each option's first setting is MAME's default for that game (MK3 / UMK3 0xFD7D, WWF 0x7FFD, the Hangtimes 0x7F7D, Open Ice 0xEBBE, Rampage 0xFBBE).
- Arcade-Midway-Wolf-Unit.sv:938 Options of the same name share status bits across games; games without one (names left off a game's list) keep MAME's default:
- Arcade-Midway-Wolf-Unit.sv:942 124-120 Coinage (each game's list, MAME's order) 125 Coinage Source
- Arcade-Midway-Wolf-Unit.sv:986 UMK3 Plus has no Counters, Coinage, Coinage Source or Bill Validator lines: those bits are its VS kodes' buttons (see Kombat Kodes), and the game gets MAME's defaults (Two counters, USA-1, CMOS coinage, Bill Validator Off; its service menu
- Arcade-Midway-Wolf-Unit.sv:1153 Their status bits are the ones nothing else on Plus uses (rtl/wunit_kodesel.sv, tools/kombat_kodes.py PLUS_BITS): 15, 109-112 (Open Ice's Secret Code List uses 110 on its own game), 119-126 (the DIP lines Plus does not have: Counters, Coina
- rtl/adsp2105/adsp2105.sv:4 The instruction set follows MAME's core (devices/cpu/adsp2100: adsp2100.cpp, 2100ops.hxx) exactly, including its arithmetic quirks (MAC products are formed in 32 bits, MAC rounding looks at the product's low half, MR2 is kept as a 16-bit fi
- rtl/adsp2105/adsp2105.sv:9 The chip's control registers, timer and SPORT1 autobuffering follow MAME's DCS driver (mame/shared/dcs.cpp), which emulates them for the CPU core (so SPORT1 behaves as MAME's DCS boards make it).
- rtl/adsp2105/adsp2105.sv:17 The real chip runs one instruction per cycle at 10 MHz, as MAME counts it.
- rtl/adsp2105/adsp2105.sv:20 When memory is slow (the board's ROM is in SDRAM) tokens pile up and the following instructions run back to back until the core has caught up, so on average the program runs at exactly 10 MIPS and keeps MAME's timing.
- rtl/adsp2105/adsp2105.sv:23 The most the DCS programs owe is about 2700, just after a boot: MAME loads a boot page in no time, here it takes up to 200 us, and the new program starts by copying code out of the sound ROM.
- rtl/adsp2105/adsp2105.sv:63 Byte 3 gives the length, (n + 1) x 8 words of 4 bytes with the opcode in bytes 0-2 (MAME load_boot_data).
- rtl/adsp2105/adsp2105.sv:65 Registers keep their values over a reset, as in MAME.
- rtl/adsp2105/adsp2105.sv:67 Control registers (MAME dcs.cpp adsp_control_r/w): writes are stored and read back, except 3FE5 program flags (MAME's toggling bits 1-2) 3FEF SPORT1 autobuffer: bit 1 off stops transmission 3FF1 SPORT1 SCLK divider, 3FF2 SPORT1 control (
- rtl/adsp2105/adsp2105.sv:77 SPORT1 transmit with autobuffering is the DCS's DAC output, done the way MAME's DCS driver does it (dcs.cpp sound_tx_callback, dcs_irq) so the program sees exactly what it sees there.
- rtl/adsp2105/adsp2105.sv:79 Writing TX1 while SPORT1 and its autobuffer are on starts it (the word written is not sent): the autobuffer's I register (AUTOBUF bits 11-9; M = {I bit 2, bits 8-7}, L = the same number as I) is rounded down to a multiple of 16, and from th
- rtl/adsp2105/adsp2105.sv:87 These moments count instruction cycles, as MAME's timer does, so they fall between the same two instructions as there.
- rtl/adsp2105/adsp2105.sv:99 IDLE does nothing: MAME only ends its time slice there and carries on with the next instruction.
- rtl/adsp2105/adsp2105.sv:110 lets it play out, as MAME's DAC buffer does)
- rtl/adsp2105/adsp2105.sv:188 Helper functions (MAME 2100ops.hxx)
- rtl/adsp2105/adsp2105.sv:199 circular buffer base mask for a length (MAME m_mask_table)
- rtl/adsp2105/adsp2105.sv:218 post-modify with circular wrap (MAME modify_address): {wrapped up, new I}
- rtl/adsp2105/adsp2105.sv:273 ALU (MAME alu_op_ar / alu_op_af): {flags, result}
- rtl/adsp2105/adsp2105.sv:355 MAC product (MAME mac_op_*): the product formed in 32 bits, shifted left once in fractional mode
- rtl/adsp2105/adsp2105.sv:449 SPORT1 autobuffer (MAME dcs.cpp: m_ireg, m_incs, m_size, the half-buffer timer)
- rtl/adsp2105/adsp2105.sv:459 MAME's reg while moving
- rtl/adsp2105/adsp2105.sv:541 a register move (MAME write_reg)
- rtl/adsp2105/adsp2105.sv:555 Instruction classes (MAME execute_run switch on op[23:16]), decoded as the opcode comes in
- rtl/adsp2105/adsp2105.sv:592 Interrupt selection (MAME adsp2101 check_irqs)
- rtl/adsp2105/adsp2105.sv:617 MAME read_reg0-3 (no side effects; TOPPCSTACK's pop is done by the caller; decode only)
- rtl/adsp2105/adsp2105.sv:665 Shifter (MAME shift_op / shift_op_imm): {SS, SE, SB, SR} after the op
- rtl/adsp2105/adsp2105.sv:746 MAME res = cnt - 1
- rtl/adsp2105/adsp2105.sv:805 MAC accumulate (MAME: rounding looks at the product).
- rtl/adsp2105/adsp2105.sv:813 per data register slot: a dual read's memory word, else the move's value (MAME write_reg0: SE and MR2 sign-extend 8 bits, MR1 also sets MR2 to its sign; SB 5 bits), else the ALU / MAC / shifter / divide result
- rtl/adsp2105/adsp2105.sv:839 counter stack push (MAME cntr_stack_push), the new value goes to CNTR
- rtl/adsp2105/adsp2105.sv:876 loop stack pop (MAME loop_stack_pop)
- rtl/adsp2105/adsp2105.sv:891 counter stack pop (MAME cntr_stack_pop)
- rtl/adsp2105/adsp2105.sv:904 status stack pop (MAME stat_stack_pop)
- rtl/adsp2105/adsp2105.sv:931 SPORT1 off (MAME: timer reset, DAC disabled)
- rtl/adsp2105/adsp2105.sv:945 register writes (MAME write_reg0-3) other than to the data registers (group 0 and SB: the write back's plan does those).
- rtl/adsp2105/adsp2105.sv:966 TX1 (MAME sound_tx_callback)
- rtl/adsp2105/adsp2105.sv:1009 control register write (MAME dcs.cpp adsp_control_w)
- rtl/adsp2105/adsp2105.sv:1102 count = size / (2 incs) for the half buffer (MAME m_size / (2 * m_incs))
- rtl/adsp2105/adsp2105.sv:1126 reset (MAME device_reset) and boot load
- rtl/adsp2105/adsp2105.sv:1187 half buffer due (MAME dcs_irq): its words from I on
- rtl/adsp2105/adsp2105.sv:1217 MAME generate_irq: push PC and status, vector, mask
- rtl/adsp2105/adsp2105.sv:1263 opcode arrives: next PC, DO-loop end (MAME, before the instruction)
- rtl/adsp2105/adsp2105.sv:1452 DAG post-modify (MAME modify_address)
- rtl/adsp2105/adsp2105.sv:1644 a half-buffer word to the FIFO (MAME: reg += m_incs, no wrap)
- rtl/adsp2105/adsp2105.sv:1766 instruction cycles (as MAME counts them): the timer, the half-buffer timer (the instruction starting now is counted)
- rtl/dcs_audio.sv:4 MAME mame/shared/dcs.cpp, dcs_audio_8k_device (REV_DCS1): an ADSP-2105 at 10 MHz (rtl/adsp2105), 8K words of external RAM, the sound ROMs (up to 4 x 1 MB, 8 bits wide) behind a bank register, the latches to the 34010 and a 16-bit DAC on the
- rtl/dcs_audio.sv:9 DSP memory map (dcs_8k_program_map / dcs_8k_data_map): program 0000-03FF ADSP-2105 internal RAM (in the core) 0800-1FFF external RAM, 6K x 24 3000-3003 the latches again (MAME input_latch32_r / output_latch32_w: data in bits 23-8) data
- rtl/dcs_audio.sv:25 Boot: the DSP boots from the bank's 4K bytes (MAME dcs_boot: page = the data bank at that moment).
- rtl/dcs_audio.sv:30 Host interface (MAME dcs_audio_device): data_w the byte goes to the input latch, which raises IRQ2 (level) until the DSP reads it data_r the output latch's low byte; reading empties it control_r bit 11 input latch empty, bit 10 out
- rtl/dcs_audio.sv:44 The DSP runs at MAME's 10 MHz on average: a 10 MHz tick from clk_sys (x 5 / 48) feeds the core's instruction tokens and clocks the DAC words out, so the DAC's 31250 Hz comes out exact; the timer and the half-buffer moves count instruction c
- rtl/dcs_audio.sv:63 latch control (MAME control_r)
- rtl/dcs_audio.sv:264 MAME dcs_reset: bank 0, both latches empty
- rtl/midway_wunit.sv:4 TMS34010 plus everything on its local bus (MAME midwunit.cpp main_map): 0x00000000-0x003FFFFF frame store (VRAM, in DDR3) entries 0-0x7FFFF 0x01000000-0x013FFFFF main RAM, 512 KB (SDRAM, through a cache) 0x01400000-0x0145FFFF CMOS,
- rtl/midway_wunit.sv:21 What changes is the map above and: - main RAM is 4x larger, too large for block RAM next to everything else, so it sits in SDRAM behind a 16 KB write-through cache - VCLK is 8 MHz: one pixel per VCLK (the Y Unit had two) - the I/O block can
- rtl/midway_wunit.sv:241 MAME charges 100 machine cycles for every write to the ring's pointers (words 0x0106A06-0x0106A09, bit address 0x0106A060-0x0106A09F); here the next 100 machine-cycle ticks are withheld from the CPU, which delays it exactly as 100 more cycl
- rtl/midway_wunit.sv:327 power-up raster, until the game programs the CRT controller: MAME's 506-dot line with the picture at 101-500 (pixels, one per VCLK) and lines 20-273, the values the games then program themselves
- rtl/midway_wunit.sv:605 one write allowed (MAME m_cmos_write_enable)
- rtl/midway_wunit.sv:672 MAME's "video" region is 32 MB; the MRA packs the 4 MB slots that hold data, and gfx_slots says where each one went.
- rtl/midway_wunit.sv:690 I/O block (MAME io_r / io_w)
- rtl/midway_wunit.sv:697 Word 3 is the watchdog, which MAME leaves off (MK3 resets with it on).
- rtl/midway_wunit.sv:722 WWF WrestleMania's I/O orders (MAME wwfmania_io_0_w); 0 and anything above 4 leave the identity order.
- rtl/midway_wunit.sv:748 Control register (MAME midwunit_control_w): bits 8-9 graphics ROM bank for CPU read-back, bit 11 selects what CPU VRAM accesses see (1: pixel bytes, 0: palette bytes)
- rtl/tms34010/tms34010.sv:5 Instruction semantics, flag behaviour and cycle counts follow MAME's tms34010 core (Alex Pasadyn, Zsolt Vasvari, Aaron Giles) because that is the behaviour every supported game has been tested against.
- rtl/tms34010/tms34010.sv:18 The next instruction only starts once the debt is paid, so the program sees the same timing as on the real chip (and in MAME) while memory latency stays hidden.
- rtl/tms34010/tms34010.sv:191 MAME treats any PSIZE other than 1/2/4/8/16/32 as 1 bit for pixel access, and uses a pixel shift of 0 for PSIZE=32 (the 34010 has no such case).
- rtl/tms34010/tms34010.sv:215 They read as zero until written, which makes XY addressing collapse to the X term, as in MAME.
- rtl/tms34010/tms34010.sv:229 Raster operations used by single-pixel writes (MAME raster_op_1..21)
- rtl/tms34010/tms34010.sv:625 The display address handling copies MAME's scanline callback: VCOUNT is published, the display interrupt fires on DPYINT, DPYADR reloads from DPYSTRT at VSBLNK, and every visible line hands the board its row/column then steps DPYADR.
- rtl/tms34010/tms34010.sv:668 REFCNT: MAME returns (total cycles / 16) & 0xfffc
- rtl/tms34010/tms34010.sv:671 Live HCOUNT read value: MAME scales the beam position and offsets it by HEBLNK; returning the true counter is what the hardware does.
- rtl/tms34010/tms34010.sv:682 CPU writes follow MAME's io_register_w.
- rtl/tms34010/tms34010.sv:959 ALU flag helpers (MAME SET_NZCV_ADD / SET_NZCV_SUB semantics)
- rtl/tms34010/tms34010.sv:984 leftmost-one: number of leading zeros (0 for a zero operand, as in MAME).
- rtl/tms34010/tms34010_gfx.sv:8 The loops are a direct translation of MAME's pixblt / pixblt_r / pixblt_b / fill templates (34010gfx.hxx), including the order of word reads and writes.
- rtl/tms34010/tms34010_gfx.sv:15 Clipped-away and window-mode-1 operations cost nothing, as in MAME.
- rtl/tms34010/tms34010_gfx.sv:82 MAME's pixelsize_lookup: PSIZE & 0x1f -> 1/2/4/8/16 bits (so 32 means 1)
- rtl/tms34010/tms34010_gfx.sv:108 MAME s_pixel_op_timing_table
- rtl/tms34010/tms34010_gfx.sv:115 Pixel processing ops (MAME pixel_op00..21), evaluated on 32-bit operands
- rtl/tms34010/tms34010_gfx.sv:235 MAME keeps m_gfxcycles between operations; an operation entered with P set (resumed after an interrupt, or P set by software) only pays what is left.
- rtl/tms34010/tms34010_gfx.sv:237 Here the work is always finished in one go, so a resume charges the last operation's figure again, exactly as MAME's step-at-a-time path does.
- rtl/tms34010/tms34010_gfx.sv:651 PIXBLT R works it out per row; PIXBLT B and FILL use the first row's figures for every row, as MAME does.
- rtl/tms34010/tms34010_muldiv.sv:10 Results follow MAME's arithmetic (C truncating division, remainder takes the sign of the dividend), which is what the games were verified against.
- rtl/tms34010/tms34010_pkg.sv:3 Generated from the MAME tms34010 opcode dispatch table (34010tbl.hxx) so the HDL decode is a one-to-one image of the reference emulator.
- rtl/wunit_dma.sv:5 Behaviour follows MAME's midtunit_v.cpp (dma_w, dma_draw, dma_done), including: - register 1 (command) bit 15 starts a blit and reads back set until the blit's time is up; any write to it drops the completion interrupt - reading register 0
- rtl/wunit_dma.sv:29 MAME has separate scaled and unscaled routines, but with steps of 1.0 the scaled formulas give exactly the unscaled ones (row and pixel advance, pre-skip, start skip), so the general form is used throughout.
- rtl/wunit_dma.sv:34 Graphics ROM: MAME's 32 MB "video" region is one little-endian bit stream (pixel n of a b-bit image is bits offset + n*b and up).
- rtl/wunit_dma.sv:41 Each drawn pixel is written into the row RAM on its own (four 16-bit lanes) with a valid bit per entry, so when a scaled row runs past 1024 columns and wraps over itself the later pixel wins, as in MAME.
- rtl/wunit_dma.sv:52 Known difference: MAME stores pixels at x 512-1023 into the next row of its frame store (its row pointer has no column wrap); here they are dropped.
- rtl/wunit_dma.sv:77 graphics ROM, 8-byte lines of MAME's video region
- rtl/wunit_dma.sv:120 register write mapping (MAME register_map)
- rtl/wunit_dma.sv:311 MAME draws a blit the moment it is started; here drawing takes time, so a second start that arrives while the first is still drawing is held off.
- rtl/wunit_dma.sv:557 the clocks already gone since the command write come off (MAME's timer starts at the write)
- rtl/wunit_finish.sv:19 The MRA says which (config byte 14: 0 none, 1 the shared table, 2 MK3 1.x); tools/lua/finishing_moves.lua plays every program in MAME at each distance to check it.
- rtl/wunit_finish.sv:42 In a set whose MRA says its distance windows hold (config byte 15 bit 2: the sets measured in MAME, and UMK3 Plus, measured in HBMAME) a direct move waits until the winner is at a distance the game takes it at: the window win_q has for the
- rtl/wunit_finish.sv:104 Build 84: the windows are the game's own, exactly (tools/finishing_moves.py EXACT: the move's condition routine, or measured one pixel at a time in MAME where it has none).
- rtl/wunit_finish.sv:106 Before, the stock sets' windows were 9 pixels wider on each side than the steps of 10 that MAME measured, and a move started in that margin was refused by the game, its firing button going in as an ordinary attack that ended the FINISH HIM
- rtl/wunit_finish.sv:394 the inputs as the winner's IN0 / IN1 bits (MAME's midwunit.cpp MK3 ports: IN0 P1 U D L R HP BL HK in bits 0-6, P2 in bits 8-14; IN1 P1 LP LK RN in bits 0-2, P2 in bits 4-6)
- rtl/wunit_finish.sv:663 Measured in MAME, so only in the sets whose MRA says its rules were (fd_gate, not UMK3 Plus, which keeps entering it)
- rtl/wunit_kodes.sv:173 the button of each digit, digit 0 in the low 16 bits (MAME's midwunit.cpp MK3 ports: IN0 P1 HP 0010 BL 0020 HK 0040, P2 HP 1000 BL 2000 HK 4000; IN1 P1 LP 0001 LK 0002, P2 LP 0010 LK 0020)
- rtl/wunit_macro.sv:9 Codes (IN0 bits as MAME numbers them, see midwunit.cpp):
- rtl/wunit_macro.sv:55 EJB menu: 29 presses of a Block button, 4 frames down and 4 up (the game takes 2 to 6 frame presses in MAME)
- rtl/wunit_pic.sv:9 This is MAME's midway_serial_pic_device: the PIC's answers are worked out once and handed out a byte per clock, without running the PIC's own code.
- rtl/wunit_pic.sv:11 MAME uses it for the sets whose PIC was never dumped (MK3, WWF, Open Ice) with the serial number prefix 528, which is development PIC code that every Wolf game accepts besides its own; this core uses it for every game.
- rtl/wunit_pic.sv:15 Protocol (MAME write()/read()/status_r()/reset_w()): - a write sets status to the clock bit (data bit 4); on a write with the clock low, a non-zero command nibble is echoed back (the self-test writes 1F, 0F and expects F), command 0 clocks
- rtl/wunit_pic.sv:23 Serial data (generate_serial_data): serial number 528123456 (prefix 528, MAME's 123450 base and its default low digit 6), date 11 December of the game's year.
- rtl/wunit_pic.sv:25 MAME fills bytes 12 and 13 from its random number generator; they only scramble the encoding, so this core uses 0 for both.
- rtl/wunit_pic.sv:36 the game's year (MAME GAME() line)
- rtl/wunit_video.sv:4 Turns the frame store into pixels the way MAME's scanline_update does (midtunit_v.cpp): - at the start of every displayed line the row the 34010 points at (DPYADR) is fetched from VRAM into a line buffer - pixels from HEBLNK to HSBLNK read
- rtl/wunit_video.sv:137 HCOUNT has already moved on with the ce_pix that started this pipeline; the blanking captured with it was worked out from the same count, so the first unblanked pixel (HCOUNT = HEBLNK) shows the first entry, as MAME's x = heblnk does.
- rtl/wunit_vram.sv:5 The display and the blitter use 512 x 512 entries (512 KB); the CPU's window (0x00000000-0x003FFFFF) reaches twice that, 0x80000 entries, as MAME's 1 MB local_videoram does.
- README.md:3 **AI disclosure:** this core was developed using AI and MAME as a reference.
- README.md:82 MAME Wolf Unit driver and T-Unit video: Alex Pasadyn, Zsolt Vasvari, Ernesto Corvi, Aaron Giles (thanks to Kurt Mahan); MAME TMS34010 core, DCS and Midway IC em
- README.md:90 Move List special moves: MAME's command.dat (Command List by Fabricio Coroquer, revised by AntoPISA); UMK3 Plus's list: MKKomplete's "Ultimate Mortal Kombat 3 P
- README.md:102 The cheats for these games come from the MAME cheat collection ([mamecheat.co.uk](https://www.mamecheat.co.uk)), kept by Martin Pugh (Pugsy) with the cheat find
- README.md:104 The Cheats menu offers the ones chosen for each game; the games' MAME files are not used as they are: the core runs their addresses and values itself.
- README.md:110 | Game | Credit in the MAME files |
Says it matches, follows or was checked against MAME — 2
Keeps a MAME approximation — 5
- rtl/midway_wunit.sv:67 ring pointers (MAME umk3_palette_hack_w)
- rtl/midway_wunit.sv:237 UMK3 palette ring (MAME umk3_palette_hack_w): the game queues palette changes in a 17-entry ring that the display interrupt empties.
- rtl/midway_wunit.sv:238 The real chip's instruction cache makes the CPU slow enough that the ring rarely wraps; MAME's 34010 timing (which this core charges) assumes a full cache, so the ring wraps often and palettes are lost (wrong colours).
- rtl/tms34010/tms34010_gfx.sv:14 Cycle counts are MAME's approximations; they are returned in `cycles` and charged to the CPU's cycle budget.
- rtl/wunit_finish.sv:38 The Mercy waits for a FINISH HIM in which the loser has won a round (round 3 of a 1-1 match): the game refuses it in any other, even typed on the real controls (Build 61: message 14 once, the move stays set; in the sets measured in MAME, no
Shares text with the MAME driver without saying so — 5