← コア一覧
Arcade-Midway-T-Unit (Gm0rk)
MAMEとの相違点を記載 — 1
- rtl/midway_tunit.sv:4 TMS34010 plus everything on its local bus (MAME midtunit.cpp main_map; 34010 bit addresses, unmapped reads return 0xFFFF as in MAME): 0x00000000-0x003FFFFF frame store (VRAM, in DDR3), entries 0-0x7FFFF 0x01000000-0x013FFFFF main RAM, 512
MAMEのソースを引用 — 98
- Arcade-Midway-T-Unit.sv:60 The ADPCM Sound CPU Speed option is left out of the OSD while it is being finished: SPEED_OSD is 0, which holds the speed at 100 % whatever a saved configuration has (the option's line, "P2O[18:17],ADPCM Sound CPU Speed, 100% (MAME),102%,10
- Arcade-Midway-T-Unit.sv:248 the core runs once a complete ROM set has arrived; main RAM is cleared after each ROM load (MAME starts with it zeroed)
- Arcade-Midway-T-Unit.sv:329 sound CPU hidden RAM windows and 34010 protections: MAME init_*
- Arcade-Midway-T-Unit.sv:385 SDRAM layout (byte addresses): 0x0000000 program ROM, 1 MB } index 0, as the MRA sends it 0x0100000 graphics ROM, up to 12 MB } 0x0D00000 sound ROMs, up to 3 MB index 3 (0xD00000 + offset) 0x1000000 main RAM, 512 KB (not
- Arcade-Midway-T-Unit.sv:484 B1-B6 are MAME's BUTTON1-BUTTON6 of each game, except MK and MK2: High Punch, Low Punch, High Kick, Low Kick, Block (B6 unused).
- Arcade-Midway-T-Unit.sv:486 Ports are active low; the layouts follow MAME's input ports (midtunit.cpp).
- Arcade-Midway-T-Unit.sv:493 {R, L, D, U} as MAME's bit order up, down, left, right
- Arcade-Midway-T-Unit.sv:538 B1 high punch, B2 low punch, B3 high kick, B4 low kick, B5 block; B6 not used (MAME's Block 2, a second block input, stays up)
- Arcade-Midway-T-Unit.sv:697 Every option's first value is MAME's default: a configuration with all the bits clear has the default switches.
- Arcade-Midway-T-Unit.sv:1274 ADPCM board (MK, NBA Jam / TE, Judge Dredd): MAME's sound_w hands it data & 0xff with bit 8 as the reset line, so bit 9 (the IRQ strobe on other boards) is always low and every command interrupts.
- Arcade-Midway-T-Unit.sv:1276 The 34010 never reads it back (MAME fakes the status).
- rtl/dcs/adsp2105.sv:13 MAME runs one instruction per 10 MHz clock and charges nothing for memory or interrupt entry.
- rtl/dcs/adsp2105.sv:14 Here an instruction takes three steps of `ce` (boundary/fetch, decode/address, execute), more while a sound ROM read waits for SDRAM; the board (tunit_dcs) charges each instruction one 10 MHz cycle against a cycle debt and lets the next one
- rtl/dcs/adsp2105.sv:50 I register side port (dcs.cpp set_state_int on I0-I7), while held
- rtl/dcs/adsp2105.sv:55 SPORT1 transmit (dcs.cpp sound_tx_callback(1, ...))
- rtl/dcs/adsp2105.sv:83 MSTAT timer bit (dcs.cpp timer_fired)
- rtl/dcs/adsp2105.sv:85 DAG registers (dcs.cpp state_int / get_ibase)
- rtl/dcs/adsp2105.sv:101 core registers (MAME adsp_core), two banks; MSTAT bit 0 selects the active one (MAME swaps the structures, the same thing)
- rtl/dcs/adsp2105.sv:111 I0-I7 (MAME keeps them unmasked after a wrap)
- rtl/dcs/adsp2105.sv:169 Tables and arithmetic (MAME create_tables, 2100ops.hxx)
- rtl/dcs/adsp2105.sv:240 MAME works on 32-bit ints made from the 16-bit operands; bits 16-0 decide the result and the flags, so every arithmetic operation is P + Q + carry in 17 bits
- rtl/dcs/adsp2105.sv:385 MAME's res is a uint32_t: the comparison with -SB is unsigned
- rtl/dcs/adsp2105.sv:1047 the I / base register write port (besides the DAG steps): an I or L register write, TX1's alignment of the autobuffer I, or the board's side port (set_state_int: update_i), which also works while the CPU is held in reset (MAME's suspended C
- rtl/midway_tunit.sv:41 The 34010 core charges MAME's cycle counts and pays them off against the real time taken, so memory latency only matters when it runs longer than the instruction's own time.
- rtl/midway_tunit.sv:251 Holding the CPU until then makes it start together with its raster, as in MAME; starting it at once left it waiting ~270 machine cycles for its reset vector while the raster ran, a phase difference that shows up as input and interrupt timin
- rtl/midway_tunit.sv:400 A main RAM entry (a game variable) applies only while the CPU has interrupts enabled: the games read these variables from their processes (all reads seen in MAME: ST.IE 1), while the RAM tests (NBA Jam 2.00's at every power-up, the diagnost
- rtl/midway_tunit.sv:452 The game's writes are untouched (it goes on adjusting its own copy, which the option does not show it), so Off hands the game's own value back at once, and in the diagnostics' RAM test (interrupts off, MAME) the word reads what the test wro
- rtl/midway_tunit.sv:541 protection windows (MAME init_mktunit, init_nbajam_common, init_jdreddp, init_mk2).
- rtl/midway_tunit.sv:753 Graphics ROM read-back (MAME midtunit_gfxrom_r): two 4 MB windows, the second always at 0x400000, the first at 0 or (MK2, control bit 7) 0x800000
- rtl/midway_tunit.sv:766 Protection state (MAME midtunit_m.cpp)
- rtl/midway_tunit.sv:777 ADPCM boards: MAME's fake sound status count
- rtl/midway_tunit.sv:788 MK Turbo counter GAL (MAME returns random numbers; any changing value does)
- rtl/midway_tunit.sv:1116 MAME wraps an index past the end
- rtl/midway_tunit.sv:1197 find the written value in the table (MAME mk_prot_w)
- rtl/midway_tunit.sv:1283 MAME's fake status: busy (0) for 128 reads after a command
- rtl/midway_tunit.sv:1316 MAME nbajam_prot_w: the written word, then the four bytes of the table entry for this address, each << 9
- rtl/midway_tunit.sv:1405 two entries per CPU word: pixel bytes carry the DMA palette register along (MAME midtunit_vram_w), palette bytes leave the pixels alone
- 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:178 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:202 They read as zero until written, which makes XY addressing collapse to the X term, as in MAME.
- rtl/tms34010/tms34010.sv:216 Raster operations used by single-pixel writes (MAME raster_op_1..21)
- rtl/tms34010/tms34010.sv:612 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:619 Otherwise each axis keeps the values it had - after power-up, when all registers are zero, the T-Unit's 506x289 raster as MAME's screen has it (vertical blank from line 274 to 19) - so the display stays locked.
- rtl/tms34010/tms34010.sv:624 That is MAME's behaviour too: its screen keeps the visible area it had and the scanline callback draws nothing between HEBLNK and HSBLNK.
- rtl/tms34010/tms34010.sv:702 REFCNT: MAME returns (total cycles / 16) & 0xfffc
- rtl/tms34010/tms34010.sv:705 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:716 CPU writes follow MAME's io_register_w.
- rtl/tms34010/tms34010.sv:796 the beam starts at the start of vertical blank (line 274 of the T-Unit raster), where MAME starts its screen: the CPU then meets its display interrupts and the frame-by-frame inputs at the same instructions as in MAME
- rtl/tms34010/tms34010.sv:833 MAME get_display_params: coladdr = ((dpyadr & 0x7c) << 4) | DPYTAP
- rtl/tms34010/tms34010.sv:845 ---- sequencer side effects ---- bit by bit, as MAME's IOREG(REG_INTPEND) |= ...: a whole-register write here would undo the display interrupt the line wrap above sets in the same cycle
- rtl/tms34010/tms34010.sv:998 ALU flag helpers (MAME SET_NZCV_ADD / SET_NZCV_SUB semantics)
- rtl/tms34010/tms34010.sv:1023 leftmost-one: number of leading zeros (0 for a zero operand, as in MAME).
- rtl/tms34010/tms34010.sv:1105 How far behind MAME's cycle count the CPU may fall and still catch up.
- rtl/tms34010/tms34010.sv:1106 Instructions that need several memory accesses (multi-word fetches, long writes to main RAM) can take longer here than the cycles MAME charges, most of all in tight loops; the time is caught up afterwards by instructions that run faster tha
- rtl/tms34010/tms34010.sv:1109 The floor bounds that catching up to about ten scanlines (4096 machine cycles): enough for the longest loops seen in the T-Unit games, so the CPU meets interrupts and inputs at the same instructions 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/tunit_dma.sv:8 - sources are a bit stream: 1-8 bits per pixel (command bits 12-14, 0 = 8), read at any bit address - "skip" compression (command bit 7): every row starts with a byte whose low and high nibbles are the pixels left out at the start and the e
- rtl/tunit_dma.sv:31 A row state machine does what MAME does once per row (skip byte, the divisions of the scaled skips, clipping, end skip, the source advance to the next row).
- rtl/tunit_dma.sv:33 The pixels of a row then run through a two-stage pipeline at up to one pixel per clock: stage 1 extracts the pixel at bit address o from a two-line window of source data and steps o, the X accumulator and the destination column stage 2 de
- rtl/tunit_dma.sv:42 Source data comes from SDRAM as 8-byte lines (byte addresses of MAME's "video" region, little endian); a line and its successor are kept so a pixel or skip byte that straddles two lines can be read.
- rtl/tunit_dma.sv:89 Registers (MAME's m_dma_register, 18 words; 16 and 17 are the left/right clips reached through offsets 12/13 in register bank 0)
- rtl/tunit_dma.sv:106 reads: register 0 reads as register 1 (MAME, for Rampage/Open Ice)
- rtl/tunit_dma.sv:193 Blit parameters (latched at the start, as MAME's m_dma_state)
- rtl/tunit_dma.sv:223 source bit address (MAME's o)
- rtl/tunit_dma.sv:288 pixels of the row to draw (MAME's width >> 8)
- rtl/tunit_dma.sv:315 MAME: a start arriving while the previous blit is still drawing waits
- rtl/tunit_dma.sv:319 stage 1 continue condition: MAME's "while (ix < width)" in integer pixels
- rtl/tunit_dma.sv:333 stage 2: what to write (MAME's PIXEL_SKIP / PIXEL_COLOR / PIXEL_COPY)
- rtl/tunit_dma.sv:368 MAME row advance: source pixels of a compressed row (width - pre - post), for the row just drawn (w_left) and for a skipped row's skip byte (w_skip)
- rtl/tunit_dma.sv:373 graphics offset relocation (MAME dma_w): small-ROM boards see the ROM at 0x2000000 in the offset space; offsets from 0xF8000000 wrap to 0
- rtl/tunit_dma.sv:484 MAME dma_w: fill in m_dma_state from the registers
- rtl/tunit_dma.sv:511 graphics offset relocation, in MAME's order
- rtl/tunit_dma.sv:549 41 ns per pixel = 3.9375 clk at 96 MHz; nothing if the source was out of range (MAME skips the draw: 0 pixels)
- rtl/tunit_dma.sv:673 width -= post; then the end skip limit (MAME compares whole pixels: (width >> 8) > m_dma_state.width - endskip)
- rtl/tunit_dma.sv:731 MAME: next destination row; ty = source rows to move on
- rtl/tunit_dma.sv:772 skipped compressed rows (Y scaled down): each has its own skip byte, used here as whole pixels (MAME leaves out the << 8 in this loop)
- rtl/tunit_dsw.sv:4 Each option's value 0 is MAME's default, so all-zero status bits are the default switches.
- rtl/tunit_dsw.sv:5 Bits no option has keep MAME's default.
- rtl/tunit_video.sv:4 Turns the frame store into pixels the way MAME's midtunit scanline_update does: - 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 consecut
- rtl/tunit_video.sv:206 MAME's pal5bit: 5-bit colour to 8 bits
- rtl/tunit_vram.sv:4 The T-Unit frame store is MAME's m_local_videoram: 1 MB of 16-bit entries (low byte: the pixel the blitter or CPU wrote, high byte: the palette page it carried).
- rtl/tunit_vram.sv:18 A blitter row is a window of 256 beats (1024 entries) starting at its row, because the blitter's X position has 10 bits: like MAME, pixels at X 512 to 1023 land in the following row.
- README.md:3 **AI disclosure:** this core was developed using AI and MAME as a reference.
- README.md:31 | Protection | Per-game security chips on the 34010 bus and hidden RAM on the ADPCM board, as in MAME |
- README.md:85 MAME T-Unit driver and video: Alex Pasadyn, Zsolt Vasvari, Ernesto Corvi, Aaron Giles (thanks to Kurt Mahan); MAME TMS34010 core, Williams ADPCM sound board, DC
- README.md:106 The Mortal Kombat and Mortal Kombat II lists were found in the games' programs and played in MAME; MKKomplete's [Mortal Kombat](https://icemantraveler.github.io
- README.md:115 The cheats for these games come from the MAME cheat collection (the cheat.txt of the 27 July 2025 release, for MAME 0.279; [mamecheat.co.uk](https://www.mameche
- README.md:136 The ADSP-2105 and DCS board ports follow MAME code under BSD-3-Clause.
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 2
- rtl/dcs/adsp2105.sv:21 Interrupts are checked at every instruction boundary (MAME checks when a timeslice starts, after IMASK/ICNTL/IFC writes and after a status pop; external lines change only at timeslice ends, so that is the next boundary).
- rtl/tunit_dma.sv:5 It follows MAME's midtunit_video_device::dma_w and dma_draw (midtunit_v.cpp) step for step:
MAMEから移植・書き写した、または取り入れたと記載 — 2
- rtl/dcs/adsp2105.sv:4 A port of MAME's ADSP-21xx core (src/devices/cpu/adsp2100/adsp2100.cpp and 2100ops.hxx, ADSP-2105 variant): the same registers, the same instruction semantics in the same order, the same flag arithmetic (32-bit ints, the MAC product taken a
- rtl/dcs/adsp2105.sv:37 Based on MAME's adsp2100 core, copyright Aaron Giles (BSD-3-Clause).
MAMEの近似をそのまま採用 — 1
MAMEドライバと同じ文言を含む(出典の明記なし) — 3