Commit Graph
25 Commits
Author SHA1 Message Date
zanacandClaude Opus 5.5 34988bc120 Namco System 22 / Super System 22 from current MAME (#2206)
Replaces the old namcos22 driver (no DSPs, every game not working) with a
C89 backport of the current MAME driver:

- new Namco C71 core (TMS320C25 with internal ROM) for the master and
  slave DSPs: MAME's tms320c2x instructions, a page table memory system;
- Super System 22 (68EC020, M37710 MCU with C352 and MB87078 volume) and
  System 22 (68020, C74 MCU with internal BIOS);
- the video: display list simulation, z-sorted polygons and sprites,
  text layer, fog, fades, alpha, spot RAM, gamma; MAME's rasterizer
  rules, single threaded, with 1/z every 8 pixels and fast paths;
- the "Threaded Video" option (was "ST-V Threaded Video") draws the
  frame in bands on 2 to 4 threads (3D scene, text layer, mix, gamma),
  same picture;
- M37710: timer A event counters count up or down (output pin or up/down
  register, as MAME), for the Prop Cycle pedal and the Armadillo Racing
  trackball;
- C352: optional routing of the four outputs to the stereo stream (rear
  speakers, cabinet speakers), as current MAME maps them to stereo; off
  unless a driver asks for it, System 11/12 unchanged;
- game I/O as MAME: driving games and Cyber Commando on System 22,
  Alpine Racer steplock motor, Alpine Surfer ROM banking, Armadillo
  Racing trackball, default EEPROMs.

System 22 sets (namcoc74 BIOS): ridgerac, ridgeraca, ridgeracb,
ridgeracc, ridgeracj, ridgera2, ridgera2j, ridgera2ja, ridgera28,
cybrcomm, raverace, raveracej, raveraceja, acedrive, victlap, victlapa,
victlapj.

Super System 22 sets: alpinerd, alpinerc, alpinerjc, airco22b, cybrcycc,
cybrcyccj, dirtdash, dirtdasha, dirtdashb, dirtdashj, timecris,
timecrisa, timecrisj, propcycl, propcyclj, alpines, tokyowar, tokyowarj,
aquajet, alpinr2b, alpinr2a, adillor, adillorj.


Claude-Session: https://claude.ai/code/session_01N3fzdsnzkQVtgYtYzqepjX

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-05 13:08:58 -05:00
arcadez2003 daf2acebc9 Merge pull request #2143 from zanac/mwalk
Moonwalker: the original System 18 board (FD1094 + 8751)
2026-10-25 19:38:30 +00:00
VanniandClaude Opus 5.5 127a425837 Toaplan 2: NEC V25 sound CPU (Dogyuun, Knuckle Bash, FixEight, Grind Stormer / V-Five, Batsugun)
New NEC V25 CPU core (src/cpu/nec/v25.c), a port of MAME 0.264's v25.cpp
and v25sfr.cpp, with the opcode decryption tables of the Toaplan chips.

The Toaplan 2 games with a V25 now run their sound program as in MAME
0.264, in place of the sample tables (Knuckle Bash, Batsugun) or no sound
(Dogyuun, Grind Stormer, V-Five). FixEight works: its V25 reads the inputs
and the EEPROM holding the settings and the region.

- 68000 and V25 memory maps, clocks, shared RAM, the V25 reset (coin
  register and RESET instruction), DIP switches and jumpers read by the V25.
- The GP9001 video status as in MAME (blank in the horizontal sync too):
  the boot RAM tests of these games now take the same time as in MAME.
- Sets and names of MAME 0.264: new dogyuuna, dogyuunb, dogyuunt, kbashk,
  kbashp, batsuguna, batsugunc, batsugunb, 13 FixEight regional sets;
  grindsta -> grindstma, batugnsp -> batsugunsp, fixeighb -> fixeightbl;
  grindstm is now the parent of vfive; new ROMs for dogyuun and batsugun.
- Memory: no save state zone for a CPU without a memory region.
- Metadata (xml, history, cheats, catver) and frontend list updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013Vje3pEtpLHubqCGwCgoQX
2026-10-25 17:00:58 +01:00
VanniandClaude Opus 5.5 3a553e7fb4 Moonwalker: the original System 18 board, with FD1094 and 8751
The original sets now run: mwalk, mwalku and mwalkj (FD1094 encrypted 68000)
and their decrypted versions mwalkd, mwalkud and mwalkjd, as in MAME 0.264.
moonwalk and moonwlka are renamed to the current MAME names (mwalk, mwalku).

- machine/fd1094.c: FD1094 decryption (the algorithm of MAME's fd1094.cpp,
  BSD-3-Clause). The decrypted opcodes are cached per state and fetched
  through the 68000 opcode base; the state follows CMPI.L #imm,D0, the
  interrupts and RTE through new hooks in the C 68000 core (NULL unless an
  FD1094 game runs).
- system18.c: the 8751 (315-5437) drives the game through the 315-5195
  mapper registers (68000 interrupts, 68000 memory reads and writes, sound
  CPU latches, 68000 reset), as MAME's system18_i8751. The game uses the
  segaic16 video like ddcrew, with the 171-5874 tile banking.

The FD1094 sets give the same frames as the decrypted ones, and the attract
mode and the first 2140 frames of a scripted game match MAME 0.264 pixel for
pixel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013Vje3pEtpLHubqCGwCgoQX
2026-10-25 08:59:27 +01:00
Claude d53b244990 Acclaim ZN-1: NBA Jam Extreme, RAX sound board, ADSP-2181
NBA Jam Extreme (ver. 1.10I and 1.04) as in current MAME, with the RAX
sound board: an ADSP-2181 (new in the ADSP-2100 core: its I/O space,
memory overlays, interrupts and instructions), byte DMA from the sound
ROM and two DACs fed by SPORT0 autobuffering.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
2026-10-22 20:58:14 +02:00
zanacandClaude 7d9da4e99a Taito FX-1B playable with the Taito Zoom sound board, PSX GPU missing GP0 commands (#2101)
Taito FX-1B (zn.c): the 12 sets of current MAME (raystorm, raystormo,
raystormu, raystormj, ftimpcta, ftimpact, ftimpactu, ftimpactj, gdarius2,
gdarius, gdariusu, gdariusj) on the FX-1 board of #2095, with 2 MB VRAM on
G-Darius, 512 bytes of FRAM kept with the EEPROM, and the Taito Zoom sound
board. The old FX-1B sets and machine are replaced; taitofx1 stays as the
parent of beastrzb.

Taito Zoom (sndhrdw/taitozoom.c): MN10200 sound CPU, ZSG-2 and TMS57002 DSP,
as MAME taito_zm. The DSP runs one sample at a time from the stream, kept
going while its FIFO drains so the FIFO-empty line (MN10200 IRQ 1) falls as
on the board. Save states keep the time left on that kick.

New chips, ported from current MAME to C89:
- cpu/mn10200: Panasonic MN10200. A timer nobody sees (irq disabled with
  the request up, nothing cascaded on it) sleeps instead of firing: the
  Zoom program runs one as a 240 kHz baud clock, which cut the timeslices
  of every CPU. It keeps its phase and wakes when its irq control or the
  timer above it change.
- sound/zsg2: ZOOM ZSG-2.
- cpu/tms57002: TI TMS57002 DASP (API prefixed tms57002dsp_, Konami GX has
  its own tms57002_ stubs). Output identical to the MAME C++ core on the
  same recorded input.

PSX GPU (psx_vidhrdw.c): the GP0 commands missing from the parser, as MAME
(0x42/43, 0x4a/4e, 0x51/53, 0x5a/5e, 0x69-6b, 0x6c-6f textured dot,
0x70-73 and 0x78-7b flat 8x8 / 16x16 rectangles, 0x75/76, 0x7d/7e). Their
words were taken as commands: Ray Storm turned them into huge fills
(15 fps), other ZN games lost bits of their HUD. Lines and dots also do
semi-transparency now.


Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ

Co-authored-by: Claude <[email protected]>
2026-10-22 03:21:24 -04:00
5262c77700 Hard disks: read CHDs with libchdr, drop the legacy CHD code (#2072)
* Hard disks: read CHDs with libchdr, drop the legacy CHD code

The legacy MAME CHD code read CHD v1-v3 only; current MAME sets are v5
(LZMA/zlib/Huffman/FLAC), which it rejected as an unsupported version.

- src/lib/libchdr: libchdr (rtissera, BSD) with LZMA SDK 19.00. libchdr
  reads every CHD version, so existing v3 CHDs keep working unchanged.
  Local changes for C89/MSVC (see MAME2003PLUS.txt); zstd is left out.
- src/lib/mame-chd/chd.c/.h removed (mame_sha1.c stays, hash.c uses it).
- harddisk.c opens the CHD through libchdr on top of the core's file
  layer, and keeps the sectors the game writes in its own differencing
  file (save/diff/<disk>.dif). The format is described at the top of
  harddisk.c: a header that identifies the disk data, then one record
  per written hunk. A .dif in the old CHD format, or made for another
  disk, is replaced by a new one.
- The disk handle drivers get is now the hard disk itself (IDE, 53CF96).
- Disk checksums: the data hashes (MD5+SHA1 for v1-v3, the raw data
  SHA1 for v4/v5) or the SHA1 of a v5 image, so the hashes listed by
  the drivers match the same dump in any CHD version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016PwPGTj4SDjmvPp3DRm9j5

* Hard disks: import differencing files from older versions of the core

Older versions of the core kept what the game wrote to the disk in an
uncompressed CHD v3 that used the disk as its parent. Instead of starting
a new, empty differencing file, the core now copies the hunks that file
holds into the new format, so saved settings, bookkeeping and high
scores survive the update.

- The old file is kept next to the new one as <name>.dif.old.
- Only the hunks the old file holds itself are imported (uncompressed,
  mini and self-referencing entries, with their CRC checked); the ones
  it takes from the parent are already in the CHD.
- The old file must have been made for the same disk data: its parent
  SHA1 is compared with the SHA1 of the disk data (MD5 for CHD v1/v2),
  so it also works after the CHD has been converted to v5.
- The v3 header is read directly: libchdr can't open these files, since
  it guesses the sector size from hard disk metadata they do not have.
- osd_rename() added to the file layer for the .old copy.

Tested with sfrush: an old-format file written by the legacy CHD code
(the same calls the previous core made) is imported byte for byte, a
second start reads the new file without importing again, a file made
for another disk is kept as .old and not imported, and a real file
written by the previous core while playing imports cleanly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ

---------

Co-authored-by: Vanni <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-20 03:45:36 -04:00
f32b6d8a95 Backport Namco System 11/12 (Tekken series, Soul Calibur) with sound, MIPS recompiler - C89/MSVC/ARM (#2070)
* Namco System 11/12: Tekken series, Soul Calibur and the rest of the System 11/12 library

Rebased on the current master as one change (branch tektagt, 38 commits,
including the review fixes of #2064):

- Namco System 11 and System 12 drivers as current MAME: Tekken, Tekken 2,
  Tekken 3, Tekken Tag Tournament, Soul Edge, Soul Calibur, Ehrgeiz,
  Dunk Mania, Xevious 3D/G, Point Blank 2, Mr. Driller and the other
  System 11/12 sets, with the C76 (M37702) and H8/3002 sound CPUs and the
  C352
- PSX CPU, GTE, GPU, root counters and DMA as current MAME; MIPS
  recompiler (sljit) for the PSX CPU, core option "MIPS Dynarec"
- metadata (cheats, history, categories, XML DAT) for the new set names

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016PwPGTj4SDjmvPp3DRm9j5

* Namco System 11/12: MSVC and C89 build lanes

- PSX GPU NEON paths only with GCC/clang (they use GCC attributes); MSVC,
  ARM included, takes the C code
- no MIPS recompiler with MSVC before 2013 (the 2003-2010 lanes): the
  interpreter is used there; sljit is still built for MSVC 2013+ and
  GCC/clang on x86 and ARM

All System 10/11/12 sources pass gcc -std=c89 -pedantic with
-Werror=declaration-after-statement and -Werror=variadic-macros, and
compile for aarch64 and armv7 (ARM/NEON, Thumb/VFP).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016PwPGTj4SDjmvPp3DRm9j5

* Namco System 11/12: drop the GitHub Actions workflow

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016PwPGTj4SDjmvPp3DRm9j5

---------

Co-authored-by: Vanni <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-19 16:43:27 -04:00
ce908de1c1 System 1: emulate the 8751 MCU for Shooting Master and Choplifter (#1934) (#2074)
Add an MCS-51 CPU core (backport of MAME 0.139 mcs51, Steve Ellenoff /
Couriersud) to the 0.78 cpu_interface: internal RAM and SFRs live in the
CPU context, MOVX goes through per-CPU driver handlers, P0-P3 are ports
0-3, timers support counter mode on T0/T1. DS5002FP/80C52 variants dropped.

Hook up the real 8751 on Sega System 1 as in current MAME (system1.cpp):
- MCU P1: bit 6 BUSREQ halts the Z80, bit 0 drives the Z80 /INT,
  bits 3-4 select the MOVX space (Z80 program / banked ROM / Z80 I/O)
- VBLANK -> MCU INT0, videomode bit 6 -> MCU INT1, Z80 INTACK -> MCU T0
- the firmware pulses /INT for a few machine cycles; the release is
  delivered in the Z80's own time so the pulse is not lost when the Z80
  runs ahead of the MCU within a timeslice

shtngmst: drop the fixed jump-table hack (broke in round 2), load
315-5159a.ic74. chplft: load 315-5151.ic74, protection now emulated.
Clones chplftb/chplftbl keep the unprotected board.


Claude-Session: https://claude.ai/code/session_013Vje3pEtpLHubqCGwCgoQX

Co-authored-by: Vanni <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-19 13:39:51 -04:00
fdb7a57451 Backport PolyGame Master (PGM) (#2067)
* DoDonPachi II - Bee Storm: IGS027A ARM7 protection, all current MAME sets

DoDonPachi II (ddp2) did not work: the IGS027A protection (an ARM7 with
an internal ROM) was not emulated, and that ROM had not been dumped.
It now runs as in current MAME (pgmprot_igs027a_type2.cpp):

- New CPU core: ARM7 (ARM7TDMI, with Thumb), the MAME 0.139 core (C)
  with the cpu interface of this version: the state in one static
  structure, memory through the 32-bit little endian handlers
  (cpu_readmem32ledw...), save states. No MMU or coprocessors are
  used. Built only where a driver uses it (CPUS+=ARM7@).
- PGM "type 2" protection hookup: the ARM7 at 20 MHz with its internal
  ROM, the encrypted external ROM (decrypted with the XOR table the
  internal ROM uploads at 0x50000000), 64KB of RAM shared with the
  68000 (0xd00000) and the latch at 0xd10000 (a 68000 write raises the
  ARM's FIRQ, the ARM's read clears it). The two idle loops of current
  MAME are skipped (ARM and 68000). pgm_ddp2_decrypt no longer applies
  the fixed table: the ARM uploads it.
- The 18 current MAME sets (World, Hong Kong, Korea, Japan, Taiwan,
  China; ver. 100, 101, 102) with their ROM names; the game region
  comes from the internal ROM of each set.

Tested (x86-64): ddp2, ddp2j and ddp2100c boot to their own region
warning and title and play, with sound; runs are deterministic; a save
state taken in game and loaded later gives the same frames as running
on (with the GAME_IMPERFECT_SOUND flag removed for the test: in this
version that flag also disables save states, GAME_DOESNT_SERIALIZE).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016PwPGTj4SDjmvPp3DRm9j5

* PGM: Knights of Valour 2 / 2 Plus, Martial Masters, Dragon World 2001 / Pretty Chance

The other games on the IGS027A "type 2" ARM protection of DoDonPachi II,
as in current MAME: the same ARM7 hookup, with each game's decryption
(pgm_kov2_decrypt, pgm_kov2p_decrypt, pgm_mm_decrypt, pgm_dwpc_decrypt,
ported from current MAME's pgmcrypt.cpp with the IGS27_CRYPT steps) and
the ARM at 22 MHz for Martial Masters and Dragon World (MDRV_CPU_REPLACE
of the "arm7" CPU).

The 20 current MAME sets (kov2 and 7 clones, kov2p and 4 clones,
martmast and 3 clones, dw2001, dwpc, dwpc101j), converted from current
MAME: the 68000 program after the BIOS, the internal ARM ROM, the
external ARM ROM, and the text/background tiles at 0x400000 after the
BIOS ones as the other PGM games here; the region sizes are those of
the ROMs.

Also ported for the following commits: the decryptions of Demon Front,
The Gladiator, Killing Blade Plus, S.V.G., Happy 6-in-1 and Photo Y2K.

Tested (x86-64, 2400 frames with coin and start): kov2 (intro), kov2p
(mode select), martmast (in a fight), dw2001 and dwpc101j (in game).
dwpc (China) stops at "ASIC27 NOT DETECT": only the Japanese internal
ROM is dumped (current MAME patches it to boot); marked not working.
The other PGM games are unchanged (orlegend, kov, ket, ddp3, espgal:
same video and audio as the libretro master).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016PwPGTj4SDjmvPp3DRm9j5

* PGM: Demon Front, The Gladiator, S.V.G., Killing Blade Plus, Happy 6-in-1

IGS027A (55857G) ARM7 protection ("type 3"), ported from current MAME's
pgmprot_igs027a_type3.cpp: banked shared RAM, FIRQ from the 68000, the
replacement code for the undumped execute-only area of the internal
ROMs, region patches, speedups, Happy 6 graphics/sample descrambling.
All 19 current MAME sets.

The ARM7 core now acknowledges FIRQ/IRQ through the irq callback so
HOLD_LINE works (the 68000 pulses the FIRQ).

Sprite mask regions of the new sets (types 2 and 3) use current MAME's
power-of-2 sizes: the video code masks the offsets with the region size,
a 0xa00000 region scrambled the sprites. GFX1 regions get MAME's size
too, zero filled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016PwPGTj4SDjmvPp3DRm9j5

* PGM: Knights of Valour Super Heroes, Photo Y2K with the real ARM protection

IGS027A (55857E) ARM7 protection ("type 1") as in current MAME
(pgmprot_igs027a_type1.cpp): the internal ROMs are fully dumped, the ARM
talks to the 68000 through a polled latch and 64 bytes of shared RAM.

kovsh and photoy2k didn't start (old dumps, simulated protection): their
sets are replaced with current MAME's, with the clones (kovsh103/102/
101/100, photoy2k104/103j/102j). kovsh becomes a parent, as in current
MAME. The Japanese board set gets the Japan region.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016PwPGTj4SDjmvPp3DRm9j5

---------

Co-authored-by: Vanni <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-18 23:00:01 -04:00
Apaczer 558ef7258f cyclone: use HAVE_ARMv6 flag for backward asm compatibility (#1922) 2025-02-25 05:46:17 -05:00
mahoneyt944 cd49b89ede namcos2 split build wip - required reduction to build (#1600) 2023-06-05 22:33:30 -04:00
mahoneyt944 16f6c696d9 more split drivers (#1599) 2023-06-04 20:24:18 -04:00
mahoneyt944 ae4e3ecac1 split drivers (#1584) 2023-05-13 23:56:26 -04:00
mahoneyt944 7454b53f05 split drivers (#1583) 2023-05-12 23:58:16 -04:00
mahoneyt944 7bbcf469b1 split drivers (#1582) 2023-05-11 20:34:51 -04:00
mahoneyt944 ba41a3defe split drivers (#1580)
start "b" drivers
2023-05-11 13:53:40 -04:00
mahoneyt944 26437fde9b finish "a" split drivers (#1579) 2023-05-09 18:28:33 -04:00
mahoneyt944 07485ae940 split drivers (#1575) 2023-05-08 21:36:57 -04:00
mahoneyt944 cafc5561fe split drivers (#1574) 2023-05-07 19:45:20 -04:00
mahoneyt944 89fb66229c 4 more split drivers (#1573) 2023-05-06 23:58:14 -04:00
mahoneyt944 bd51a0b1fe split drivers (#1572) 2023-05-04 23:20:51 -04:00
mahoneyt944 c58084c51a More split drivers (#1570) 2023-05-03 23:07:05 -04:00
mahoneyt944 7400d8290b add more split drivers (#1567) 2023-05-03 17:38:38 -04:00
mahoneyt944 a9d71ca339 Wii skeleton core (#1566) 2023-05-02 18:31:47 -04:00