Commit Graph
5677 Commits
Author SHA1 Message Date
arcadez2003 3e2c0db497 hvyunit sets 2026-10-25 00:17:01 +01:00
arcadez2003 e49db47d7d paletteram_xxxxRRRRGGGGBBBB split types 1 and 2 2026-10-25 00:02:40 +01:00
arcadez2003 d87508ce4f New paletteram split types 2026-10-24 23:59:34 +01:00
arcadez2003 4fd1c76422 Merge pull request #2135 from zanac/seibuspi-v2
Seibu SPI and SYS386I: driver and i386 CPU from current MAME (57 sets)
2026-10-24 17:17:44 +01:00
zanacandClaude c262d4a4b6 Random numbers: the generator of current MAME, in the save states (#434, #445, #212) (#2132)
The drivers used the C library's rand() for game logic (protection,
hardware reads, the 4-way joystick restrictor). Its numbers:
- differ between C libraries (glibc, MSVC, bionic, macOS), so two netplay
  machines on different systems get different numbers;
- come from one sequence shared by the whole process: the frontend and the
  core's own drawing and sound code take numbers from it too, so how many
  the game gets depends on them;
- are not in the save states, so after a load (RunAhead, netplay rollback,
  rewind) the game gets other numbers than the first time.

mame_rand() is now the generator of current MAME (running_machine::rand()
in src/emu/machine.cpp): a linear congruential generator with MAME's seed,
rotated by 16 bits, whose 32-bit state is in the save states. It replaces
the Mersenne Twister of 0.78, whose state was not saved. mame_rand_int()
gives the same range as rand(). The rand() calls that change the state of
the emulation now use it; the ones that only draw, make sound noise or fill
memory at startup are unchanged.


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

Co-authored-by: Claude <[email protected]>
2026-10-24 12:08:55 -04:00
zanacandClaude c47cda1f40 Save states: timer system and CPU scheduling (#434, #445, #212) (#2133)
A save state did not include the timer system: after a load, every timer
(interrupts, sound chip timers, CPU synchronizations, driver timers) went on
from where the running emulation was, not from the state. The CPU
scheduling state was also missing. So a loaded state ran differently from
the run it was saved from: RunAhead, netplay rollbacks and rewind replayed
the frames with other timings.

- timer.c: the timer pool and lists are saved, with the same fields as
  current MAME (param, enabled, period, start, expire). Pointers are saved
  as pool indexes and callbacks as their distance from timer_init(), which
  is the same on every machine running the same build; a fingerprint of the
  build is saved with them, and a state from another build loads without
  the timers, with a warning. Unlike current MAME, temporary timers
  (timer_set) are saved too: 0.78 drivers use them across frames. A new
  timer takes the lowest free slot, so a machine reset allocates the same
  slots again.
- cpuexec.c: suspend and eat-cycles states, trigger, interrupt loops,
  vblank countdown and frame number, as current MAME saves them in
  device_execute_interface, restored when the timers were loaded.
- cpuint.c: no second interrupt event timer after a load.
- Z80: the cycles taken by an interrupt. AY8910: the chip state.
- Input ports: the 4-way joystick states, the impulse and pressed states and
  the analog positions, which depend on the previous frames.
- libretro: retro_unserialize() refused to load at frame number 0, to block
  the automatic state loading at startup. A machine reset also sets the
  frame number to 0, so a rollback over the frame after a reset failed. It
  now refuses only until the first frame has run.


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

Co-authored-by: Claude <[email protected]>
2026-10-24 12:08:34 -04:00
bc75df8087 Vector resolution: applied while the game runs (#435) (#2130)
Changing the Vector Resolution core option no longer needs a restart. At
the next frame the core resizes the display and gives the frontend the new
size with RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO (it can grow past the old
maximum).

- mame.c: vector_resize_display() does what vh_open() does for the
  display: the size from the option, the artwork, a new screen bitmap,
  the visible area again.
- artwork.c: artwork_resize_display() keeps the loaded artwork and makes
  again what depends on the size: the layer bitmaps, the scaled pieces,
  a driver's generated overlays (drawn at the game's size), the UI areas;
  the next frame is drawn whole, not from the vector dirty pixels. The
  palette lookup is allocated once per game.
- vector.c: the pixels drawn on the old bitmap are forgotten, and the next
  refresh does not compare with the old vector list.
- common.c: auto_free_ptr() / auto_bitmap_free() free one auto_malloc
  block before its tag ends, so the old bitmaps don't pile up.
- core_options.c: the option is applied only when it really changes (other
  options no longer reset the size the artwork chose).

The frames after a change are identical to a game started at that
resolution (Lunar Lander: no artwork, .art backdrop/overlay, a generated
overlay with disks; 640x480, 1600x1200, original), memory stays flat over
61 changes, and without a change the output matches master.


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-24 12:01:06 -04:00
zanacandClaude ea58c97b57 GAME_DOESNT_SERIALIZE: own flag bit, it was IMPERFECT_SOUND | WRONG_COLORS (#212) (#2131)
GAME_DOESNT_SERIALIZE was 0x0420, which is GAME_IMPERFECT_SOUND (0x0400)
plus GAME_WRONG_COLORS (0x0020). state_get_dump_size() tests
flags & GAME_DOESNT_SERIALIZE, so every game flagged with imperfect sound
or wrong colors (323 games) reported a save state size of 0: no save
states, rewind, RunAhead or netplay, and the startup warning said the
game doesn't support save states. No driver uses the flag itself.

It now has its own bit, 0x0800, which no other flag uses.


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

Co-authored-by: Claude <[email protected]>
2026-10-24 11:58:08 -04:00
Claude 14e3abc89f Seibu SPI and SYS386I: driver and i386 CPU from current MAME (57 sets)
- i386 CPU core: the C core of MAME 0.139 (mame2010-libretro), on the
  0.78 CPU interface, with save states. Fast memory: the driver gives
  its plain RAM and ROM, which the CPU fetches, reads and writes
  directly (a cached region per kind of access) instead of through
  the memory handlers.
- Seibu SPI driver from current MAME: the SXX2C main board with its
  cartridges, the SXX2E / SXX2F / SXX2G single boards and SYS386I.
  Senkyu / Battle Balls, Viper Phase 1, Raiden Fighters, Raiden
  Fighters 2 and Raiden Fighters Jet, 57 sets.
- Video, the CRTC, the tile and sprite decryption (SEI252, RISE10,
  RISE11) as current MAME.
- DS2404 RTC from current MAME. Its 256 Hz tick keeps the time it had
  left across a save state.
- intelfsh: 8-bit chips, the E28F008SA of the SPI main board.
- YMF271: the clock in the interface (16.384MHz on SXX2G).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
2026-10-24 17:54:15 +02:00
arcadez2003 ac620b3686 Merge pull request #2134 from zanac/ikarijpb-dualstick
Closes #1581. **Ikari (joystick hack bootleg)** (`ikarijpb`) can now be played with two sticks
2026-10-24 15:59:23 +01:00
Claude bd64b9de5e ikarijpb: dual stick aiming with the right stick, as a DIP switch (#1581)
The bootleg has no rotary joystick: the game reads the direction the
player faces, and fires to, in the upper nibble of the joystick port, and
snk_rot8_ikarijpb() sets it from the joystick, so the player fires where
he walks. A new 'Aim with Right Stick' setting (a DIP switch that is not on
the board, Off by default) makes a pushed right stick set it instead: the
player walks with the left stick and aims with the right stick, in 8
directions. With the right stick released, the direction follows the
joystick again.

The right stick inputs (P1 Aim, P2 Aim) default to the right analog stick
of each player, and to I/J/K/L for player 1. They are read only by the
driver, not by the game. With the setting Off the game runs as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N3fzdsnzkQVtgYtYzqepjX
2026-10-24 15:19:06 +02:00
zanacandClaude 196f1d69d3 libretro: ignore controller ports past the 8 players of the core (#445) (#2129)
retro_set_controller_port_device() wrote options.active_control_type[in_port]
for any port. That array has MAX_PLAYER_COUNT (8) entries, but RetroArch
sets the device of all its users, and on a netplay client it sets all 16
netplay ports (the host's devices, in NETPLAY_CMD_SYNC). Ports 8-15 then
overwrote the options that follow the array: restrict_4_way, tate_mode,
crosshair_enable/appearance, mame_remapping, samplerate, use_samples /
mips_dynarec / adsp_dynarec / use_alt_sound and brightness.

On a netplay client this turned on the alternate 4-way restrictor and TATE
mode, so with the same inputs a 4-way game ran differently on the client
than on the host (desync). Ports past MAX_PLAYER_COUNT are now ignored.


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

Co-authored-by: Claude <[email protected]>
2026-10-24 04:52:48 -04:00
grant2258 2173c6021d llander map thruster too up/down (#2128) 2026-10-23 22:34:30 -04:00
arcadez2003 ab56912e49 Merge pull request #2127 from zanac/ymf271-stereo
The YMF271 sends its left output to the right speaker and its right output to the left one. This PR swaps them back.
2026-10-23 23:37:56 +01:00
Claude bf0dc9c8c0 YMF271: left and right outputs were swapped
The stream channels took the interface volumes in the wrong order:
channel 0 (the chip's left output) got the high 16 bits of
YM3012_VOL, the right one. Regression of #2100: before it the chip
output the same mix on both channels, so the order did not show.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
2026-10-23 23:45:22 +02:00
zanacandClaude 03fc843ad8 Namco System 10: MEM(M), MEM(N) and EXIO(G) boards from current MAME (14 sets) (#2125)
The PSone based board with its ROM boards, from current MAME namcos10.cpp,
ns10crypt.cpp and nandflash.cpp:
- MEM(M): the Intel 28F640J5 flash (new in intelfsh, with the StrataFlash
  write buffer), the mask ROM banks, the type 1 decrypter (Mr. Driller 2)
- MEM(N): the Samsung K9F2808U0B NAND flashes, DMA channel 5, the type 2
  decrypter with the tables of each game
- the scramble of the data and of the boot loader copied to the BIOS space
- the I/O registers (inputs, DIP switches, EXIO ident, I2C, IRQ 10 at 100Hz)
- EXIO(G) without its MCU: the light gun counters of Point Blank 3 and
  Gunbalina
- the PSX DMA can end the GPU linked lists after 500 system clocks as MAME,
  for the drivers that ask for it (the movies of Point Blank 3)

Sets: mrdrilr2, mrdrilr2j, mrdrilr2u, gjspace, knpuzzle, mrdrilrg, chocovdr,
gamshara, gamsharao, panikuru, startrgn, konotako, ptblank3, gunbalina.


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

Co-authored-by: Claude <[email protected]>
2026-10-23 15:07:52 -04:00
zanacandClaude 652fd97a6d n8080: Helifire uses 8 bits per gun output (#1150) (#2123)
The sky and sea gradients of Helifire are 256-level red and blue ramps.
Without VIDEO_NEEDS_6BITS_PER_GUN the core outputs RGB565, so they show
as 32 color bands. The flag makes the core use XRGB8888 for this machine.


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

Co-authored-by: Claude <[email protected]>
2026-10-23 12:33:59 -04:00
arcadez2003 b79eb3e9fa Merge pull request #2118 from zanac/taito-gnet
Taito G-NET: the 39 games of current MAME, PC card games copied into flash, Zoom sound
2026-10-23 16:16:56 +01:00
arcadez2003 c0de8d54ba Merge pull request #2122 from zanac/asurabus-sets
Asura Buster: fix repeated sounds (YMF278B key on), sets and DIP switches from current MAME (#911)
2026-10-23 15:45:56 +01:00
Claude ce92716fca fuukifg3: Asura Buster sets and DIP switches from current MAME, fix repeated sounds (#911)
Sound: the sound program of Asura Buster and Asura Blade writes the key
on of a PCM slot again about once a second while the sound plays, with
the key already on. The 0.78 YMF278B restarted the sample on every key
on write, so voices and sound effects were repeated. As in current MAME,
the key on bit is now tracked per slot and a sample is only started on
a key off -> key on change. The YMF262 (the FM part of the OPL4) runs at
33.8688MHz / 2.375 = 14260547 Hz, as in MAME 0.143u3.

Sets as in current MAME:
- asurabus: USA set (new, parent)
- asurabusj: Japan set 1 (the set that was `asurabus`)
- asurabusja: Japan set 2 (new)
- asurabusjr: Japan, ARCADIA review build (new); P1 button 4 pauses
  the game, so its inputs have a 4th button per player

DIP switches as in current MAME, for Asura Blade too:
- "Demo Sounds & Music" (SW1:3,4), was two "Unknown" switches
- Difficulty, Damage and Max Rounds labels and defaults fixed: the old
  Max Rounds default ($0040) is shown as "Error" in the service mode
- Coin A/B: 1C_2C to 1C_5C and "2C Start / 1C Continue" added
- DIP locations as comments (the core has no PORT_DIPLOCATION)

Metadata: XML entries from the core's generator, hiscore and catver
entries for the new sets, CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N3fzdsnzkQVtgYtYzqepjX
2026-10-23 15:51:13 +02:00
Claude 453b679c80 Taito G-NET: the 39 games of current MAME (PC card games in flash, Zoom sound)
New: Intel/Sharp 16-bit flash memories (intelfsh.c), the RF5C296 PC card
controller with the ATA flash card and the three Taito locked cards
(ataflash.c), the G-NET board in zn.c (flash bank, control registers,
COM_DELAY, ZN-2 SPU toggle, the MCU protocol for analog and trackball
inputs, mahjong panel, Mawasunda handles), the Zoom board in flash mode
(samples read from the flashes), CHD metadata (CIS, IDNT, KEY), and a
PC hook in the PSX CPU for the IRQ hack of Space Invaders Anniversary
and Kollon. JP1 "Auto" for the mod BIOS and Compact Flash games.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
2026-10-23 13:38:36 +02:00
zanacandClaude ffc68e38d9 epos: Tristar 9000 board from current MAME - The Dealer, Revenger '84, Beastie Feastie (#2117)
The Dealer was marked not working: the Tristar 9000 part of the driver was
an early draft. It now follows current MAME:

- program decryption: 4 keys for 0x0000-0x5fff, selected by a counter
  changed by writes to ports 0x20-0x24
- U04 banked at 0x6000-0x6fff by the PPI port C (bit 0); kept at 0x16000
  in the region, as 0x7000-0x7fff is RAM and uses the region there
- RAM based palette (ports 0x00-0x0f), no color PROM
- battery backed RAM at 0x7000-0x7fff with the default image of each game
- two input groups selected by the PPI port C (bits 5-6), DIP switches on
  the AY8910 port A, flip screen and DIP multiplexer on the AY8910 port B
- AY8910 at 0x34/0x38/0x3c, watchdog at 0x40, 22.1184 MHz clocks

New sets on this board: Revenger '84 (newer) `revngr84`, Revenger '84
(older) `revenger` (bad dump, not working, as in MAME) and Beastie Feastie
`beastf`. As in current MAME, the Pac-Man conversion of Beastie Feastie
is renamed `beastfp`; its hiscore and cheat entries follow it.

The Dealer's "Play" button is on START: BUTTON9 also opens the core menu.

Save states: the PPI port C, the banks and the flip screen are saved and
restored, and the screen bitmap is redrawn after a load. The redraw also
fixes the Tristar 8000 games, whose screen was not redrawn after a load.

The Tristar 8000 games (megadon, suprglob, theglob, theglob2, theglob3,
igmo, eeekk, catapult) are bit-identical to master over 6000 frames.


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

Co-authored-by: Claude <[email protected]>
2026-10-23 06:10:29 -04:00
zanacandClaude 080e2f8916 pacman: Ali Baba mystery item clock from current MAME (#2116)
Ali Baba and 40 Thieves and its bootleg were marked as unemulated
protection. Current MAME emulates the mystery item clock instead:

- a write to 0x5080 starts/stops the clock (d0) and shows it (d1)
- the clock advances every 64 frames (VBLANK), and the mystery item
  lights up when it reaches 24 (0x50c1 read; was a free running counter)
- the clock is drawn in the middle of the maze from ab7.bin, now loaded
  as graphics (REGION_GFX2, reordered at init as in MAME)
- the sprites are clipped as in MAME's alibaba screen update

The Pac-Man sprite drawing is moved to a function shared by
VIDEO_UPDATE( pacman ) and the new VIDEO_UPDATE( alibaba ); the other
Pac-Man games draw exactly as before (Eggor: bit-identical frames and
audio over 9000 frames).

The clock state is saved in save states. Both sets are now marked as
working, as in MAME.


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

Co-authored-by: Claude <[email protected]>
2026-10-23 06:08:47 -04:00
zanacandClaude 65d2272c9b Namco System 12: the current MAME sets, light guns, Golgo 13, Kart Duel; PSX fixes they need (#2115)
- 24 new sets: the Tekken 3 and Tekken Tag clones, Libero Grande, Toukon
  Retsuden 3, Super World Stadium '98 and 2000, Tenkomori Shooting, Point
  Blank 2 / Gunbarl, Ghoul Panic / Oh! Bakyuuun, Golgo 13 Kiseki no Dandou,
  Kart Duel, with the ROMs of current MAME.
- Light guns as MAME ptblank2_state and golgo13_state, with crosshairs.
  Golgo 13 now boots (the gun on the H8/3002 ADC, coh700b, alt bank).
- AT28C16 EEPROM: an erased chip reads 0xff, factory contents when the set
  has them; EEPROM, shared RAM and scratchpad in the save state.
- PSX GPU: texture flip of the rectangles and raw textured sprites (type 2
  GPU), as MAME.
- PSX MDEC: the output DMA as MAME (one macroblock handed out in pieces).
- PSX recompiler: a store over translated code drops only the blocks that
  hold the word, instead of the whole cache.
- Point Blank 2: the System 12 set is the parent, the placeholder goes.


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

Co-authored-by: Claude <[email protected]>
2026-10-23 06:06:20 -04:00
zanacandClaude db6bffdae0 ZN: Beastorizer bootleg as MAME beastrzrb, drop the taitofx1 placeholder, BIOS sets in the XML (#2113)
- beastrzb is now beastrzrb (current MAME name), clone of beastrzr, on the
  COH-1002E board without its sound board, with the MAME ROM layout. It
  plays (no sound: the bootleg sound CPU is undumped, as in MAME).
- The taitofx1 placeholder, the old generic zn machine and the Taito
  serial protection hack it used are removed: nothing else used them.
- info.c: the BIOS sets coh1000w, coh1001l, coh1002e and coh1002v are
  printed in the XML, as the other ZN BIOS sets.


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

Co-authored-by: Claude <[email protected]>
2026-10-22 16:37:27 -04:00
markwkidd c6a547a379 add dotron artwork (#2114) 2026-10-22 16:36:52 -04:00
arcadez2003 17c28f93c1 Merge pull request #2112 from zanac/nbajamex-zn
Acclaim ZN-1: NBA Jam Extreme playable with sound (RAX board, ADSP-2181), 1.9x faster than MAME
2026-10-22 20:08:57 +01:00
arcadez2003 da65b34feb Merge pull request #2111 from zanac/kinst-fix
Killer Instinct: no crash on exit, and save states that load
2026-10-22 20:08:31 +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
Claude 5865842962 Killer Instinct: no crash on exit, save states that load
- ADSP recompiler: at exit, adsp_jit_exit() freed the translations
  through adsp_jit_flush(), which then scans the ADSP program memory
  again through OP_ROM. There is no active CPU at that point: closing
  Killer Instinct or Killer Instinct 2 with the ADSP recompiler on
  crashed. The exit now only frees the translations.
- MIPS3: its registers were not in the save state, so after a load the
  CPU went on with the registers of the moment of the load and crashed.
  They are saved now, and the Compare interrupt timer is set again
  after a load.
- Killer Instinct: the control registers and the end of the IRQ 0 pulse
  are saved too; the displayed buffer is set again after a load.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
2026-10-22 20:52:38 +02:00
mahoneyt944 9525caa7e8 Add files via upload 2026-10-22 13:12:04 -04:00
zanacandClaude 483d854518 Acclaim ZN-1 (COH-1000A): Judge Dredd, light guns (#2110)
Judge Dredd (Rev C and Rev B) as in current MAME: the BIOS set coh1000a,
the sets jdredd and jdreddb with their hard disks, the IDE controller on
the game board, and the two light guns read through the PSX GPU, with
their crosshairs.


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

Co-authored-by: Claude <[email protected]>
2026-10-22 12:42:08 -04:00
zanacandClaude 4e96962446 Atari ZN-1 (COH-1000W): Primal Rage II, and PSX fixes it needs (#2109)
- the Time Warner BIOS set coh1000w and primrag2, with the names and files of
  current MAME: 8MB of RAM, 2MB of game ROM, the VT83C461 IDE controller with
  the hard disk (registers, 32-bit data port, interrupt enable, DMA channel 5),
  the factory EEPROM, inputs as MAME
- PSX DMA: a block write to the SPU (channel 4) takes 24000 system clocks, as
  in MAME
- PSX SPU: a repeat address written while the voice plays is no longer
  changed by the loop start flags of its blocks, until the next key on
- save states: the root counters keep the clocks into their current count;
  the root counter and SPU DMA timers restored after a load no longer start
  late by the local time of the CPU; the delayed IDE events are on timers
  kept in the save state


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

Co-authored-by: Claude <[email protected]>
2026-10-22 12:19:53 -04:00
arcadez2003 67e99574d4 Merge pull request #2108 from zanac/atlus
Atlus ZN-1 (COH-1001L): Heaven's Gate playable with sound, 2.2x faster than MAME
2026-10-22 14:48:08 +01:00
Claude ca0dc1a147 Atlus ZN-1 (COH-1001L): Heaven's Gate, current MAME sets
- the Atlus BIOS set coh1001l and hvnsgate, with the names and files of current MAME
- 4 banks of 8MB of game ROM, selected by the byte at 0x1fb00002
- sound: a 68000 at 10MHz with a YMZ280B; 16-bit command latch at 0x1fb00000
  holding 68000 IRQ 3, YMZ280B on IRQ 2; and the PSX SPU

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
2026-10-22 15:34:36 +02:00
arcadez2003 45d3576576 Merge pull request #2107 from zanac/capcom-zn
Capcom ZN-1 / ZN-2: the sets of current MAME, 1.7x to 3.1x faster than MAME
2026-10-22 14:18:09 +01:00
Claude 8ff668596c Capcom ZN-1 / ZN-2: the sets of current MAME, CAT702 keys from the sets, QSound at 250Hz
- the 45 sets and 2 BIOS sets of current MAME, with its names and files
- the CAT702 keys are read from the dumps in the sets (CP01/CP10, CPnn)
- inputs of current MAME (capcom6b, capcom4b, glpracr, plsmaswd, strider2, tgmj)
- game ROM bank: 16 banks, as in MAME
- QSound Z80: 250Hz interrupt, as in MAME; its phase and the Z80 ROM bank
  are in the save state
- GAME_IMPERFECT_GRAPHICS and GAME_NO_SOUND (glpracr) removed

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
2026-10-22 14:55:10 +02:00
arcadez2003 1c23227c79 Merge pull request #2106 from zanac/visco
Video System ZN-1 (COH-1002V): Aero Fighters Special and Sonic Wings Limited playable, about 3x faster than MAME
2026-10-22 12:12:20 +01:00
Claude 39fcb104e2 Video System (COH-1002V): Aero Fighters Special and Sonic Wings Limited, current MAME sets
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
2026-10-22 12:48:23 +02:00
d8ddd5b9f5 SH-2: FRT clock / 128 and MAC saturation as the hardwareSh2 fixes (#2105)
* SH-2: FRT internal clock / 128 as the hardware

The FRT clock select 2 (internal clock / 128) counted at / 8, sixteen
times too fast. VF Kids times its tasks with the FRT and, believing the
frame overloaded, never drew the old man's tea can. The resync also
keeps the cycles that don't make a whole count yet, as MAME.

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

* SH-2: MAC.L and MAC.W saturation as MAME

With the S bit set MAC.L only added the low 16 bits of MACH, losing the
sign of the 48-bit accumulator; it now accumulates on 64 bits and
saturates to the 48-bit range. MAC.W sets MACH bit 0 on overflow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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-22 06:20:02 -04:00
zanacandClaude a514e1f0ac Eighting / Raizing (COH-1002E): the MAME sets, 68000 + YMF271 sound (#2104)
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ

Co-authored-by: Claude <[email protected]>
2026-10-22 06:19:19 -04:00
zanacandClaude d0dd053834 PSX SPU: ADSR envelopes, SPUSTAT, end and repeat flags (#2103)
- ADSR envelopes as the hardware (nocash specifications): attack, decay,
  sustain, release, linear and exponential, the level readable in the
  voice ADSR volume register. Before, a voice in release was silenced at
  once: Bloody Roar 2 keys its attract movie sound on and off two frames
  later, with a release of some 17 seconds, and was silent.
- SPUSTAT: bits 0-5 follow SPUCNT, bits 7-9 the transfer mode, bit 6 the
  IRQ flag (cleared with the IRQ enable). Bloody Roar 2 waits for it after
  its first transfer, and skipped the voice set-up without it.
- An end flag with the loop start flag too (flags 7) no longer stops the
  voice: it jumps to the repeat address; only without the repeat flag is
  the voice released at level 0. ENDX (0x1f801d9c) reads the voices that
  reached an end flag. A write to the repeat address takes effect while
  the voice plays.
- A voice released to 0 is no longer decoded: with the SPU IRQ on, only
  its address moves on (IRQ address, flags); without, it is skipped.


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

Co-authored-by: Claude <[email protected]>
2026-10-22 04:37:47 -04:00
zanacandClaude 73fcfe418d astrocde: draw each frame once and drop the per-pixel modulo (faster Gorf) (#2102)
Every Astrocade game drew each line twice per frame: once in
interrupt_common(), at each of the 256 scanline interrupts, and once more
in VIDEO_UPDATE( astrocde ), which redraws all the lines over the same
area at the end of the frame. The first drawing was always overwritten,
so it is removed.

wow_update_line() computed (rngoffs + x + CLOCKS_PER_LINE*line) % RNG_PERIOD
for each star/sparkle pixel. Both terms are below RNG_PERIOD, so a single
subtraction gives the same index. The per-line values are read once per
line.

Frames and audio are bit-identical to master (gorf, wow, spacezap, ebases,
seawolf2, robby; attract and gameplay, every frame). Gorf gameplay: 39%
fewer instructions; about 30% less time with the platform=rpi3 build.

Helps #675.


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

Co-authored-by: Claude <[email protected]>
2026-10-22 04:21:37 -04:00
e36928faac SH-2: print the 64-bit division trace without the C99 %lld format (#2099)
Legacy MSVC does not support %lld; print the dividend and divisor
registers as 32-bit hex words instead.


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-22 03:29:47 -04: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
zanacandClaude 0f2695d091 Jaleco Mega System 32: driver, video and YMF271 as current MAME, F-1 Super Battle, current MAME sets (#2100)
The MS32 driver, video and sound brought up to current MAME, on the
MAME 0.78 core:

- ms32.c: system control (CRTC, VBLANK / field / programmable timer
  interrupts, acks), irq priority as the V70 sees it, sound CPU (Z80 at
  8 MHz with its own RAM bank, sound latch NMI, irq back to the main
  CPU), inputs as current MAME (mahjong key matrix, F-1 Super Battle
  wheel / pedals), start at the first VBLANK as current MAME; the
  F-1 Super Battle "jalfpu" coprocessors ported to C.
- ms32_vidhrdw.c: tile layers, ROZ (simple and per-line "super" mode),
  sprites (zoom and non-zoom cores), per-pixel priority RAM mixing,
  brightness, F-1 Super Battle road plane and mixer.
- ymf271.c: YMF271 (OPX) with FM, PCM, timers, external memory and IRQ.
- Sets and names as current MAME: hayaosi2 (ex hayaosi1), hayaosi3,
  hayaosi3a, suchie2 / suchie2o (ex 47pie2 / 47pie2o), p47acesa,
  akissa, kirarasta, wpksocv2 added; f1superb now playable with sound.
- Speed: opt-in idle loop fast-forward in the V60 core
  (v60_set_idle_loops, only ms32.c sets a table), YMF271 EG / LFO-PM
  caches and silent operators skipped, video row opacity flags and a
  mixer without the per-pixel switch. Output bit-identical with and
  without them.
- Save states: all the driver, video, Z80 RAM and YMF271 state plus the
  time left on the timers, so a loaded state goes on exactly.


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

Co-authored-by: Claude <[email protected]>
2026-10-22 03:20:06 -04:00
zanacandClaude b96cd8c43a Street Fighter Zero 3 Mix v0.32 (sfz3mix): CPS2Turbo driver (#2097)
Zero800's Street Fighter Zero 3 Mix runs on his CPS2Turbo, an extended
CPS2 (https://sfz3mix.github.io/). Ported from his MAME 0.261 driver
and from FBNeo, romset sfz3mix with the FBNeo ROM names:

- 68000 at 23.6MHz (32MHz with the usual CPS2 slowdown) and Z80 at 16MHz
- 416x234 display; the "Aspect Ratio" DIP switch of FBNeo (16:9, 4:3,
  112:81) sets the aspect ratio sent to the frontend
- 6MB program space, object output moved to 0x665000 (also at 0xfffff0)
- 64MB sprite ROM: bit 12 of the sprite Y selects the upper half
- 16MB QSound sample ROM: one more bank bit, only for ROMs over 8MB
- optional music samples (samples/sfz3mix.zip, L01..R3F): the hacked Z80
  program leaves the tune number in its shared RAM, the sample replaces
  the QSound music; the tune is saved in the states and restarted on load

Other games are unchanged: the decryption buffer is still 4MB for them,
the QSound bank mask is still 7 bits up to 8MB, and sfa3 renders and
sounds bit-identical to master.


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

Co-authored-by: Claude <[email protected]>
2026-10-21 22:07:27 -04:00
zanacandClaude 76a64e85dd segas32: Stadium Cross with the sets of current MAME (scross, scrossa, scrossu) (#2098)
The scross set used old ROM names and 2MB graphics and PCM dumps, so the
sets made for current MAME didn't load. Those 2MB files were the real
1MB ROMs twice (checked: each old CRC is the CRC of the new ROM doubled).

- scross now uses the ROM names, sizes and CRCs of current MAME, plus the
  comms board ROM epr-15033.ic17 that its set carries (not emulated, kept
  in REGION_USER1 like the other comms board ROMs in this driver)
- ROM_RELOAD fills the second half of each region, so the memory of the
  game is byte for byte what it was with the old dumps
- new clones from current MAME: scrossa (World, linkable) and scrossu (US)

Tested: the old set rebuilt from the new ROMs on master and the new set on
this branch give bit-identical frames and audio over 4000 frames (attract,
coin, start, race); scrossa and scrossu boot and race.


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

Co-authored-by: Claude <[email protected]>
2026-10-21 22:06:33 -04:00
zanacandClaude Opus 5.5 d9ef30cf14 Core: add set_display_aspect_ratio() to change the display aspect ratio at run time; CPS-3 wide mode in 16:9 and sfiii3ws (#2096)
* Add set_display_aspect_ratio(): change the display aspect ratio at run time

Some drivers choose the shape of their display while the game runs
(DIP switches, monitor setups, wide video modes), but the core has no
call to change the aspect ratio after the game starts: it is computed
once from the machine driver, and the frontend only receives the
geometry again when the visible area changes. Drivers that need it
write the OSD video_config by hand (segas32.c multi32), which only
reaches the frontend if the visible area changes in the same frame.

set_display_aspect_ratio(x, y) updates the aspect ratio and flags the
display like set_visible_area() does, so the frontend gets the new
geometry (RETRO_ENVIRONMENT_SET_GEOMETRY) with the next display update,
through the existing GAME_VISIBLE_AREA_CHANGED path. Same ratio: no-op,
so drivers can call it every frame. No driver is changed here.

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

* cps3: 16:9 for the wide video mode, "Wide Screen Aspect" setting; add sfiii3ws

First users of set_display_aspect_ratio().

Street Fighter III 2nd Impact has a wide video mode (Test Menu >
Configuration > Game > Screen Mode = Wide): the display goes from 384 to
495 pixels. VIDEO_UPDATE( cps3 ) already followed it with
set_visible_area(), but the aspect ratio stayed 4:3, so the wide picture
was squeezed. Now the wide mode is shown 16:9, which keeps the pixel shape
of the normal mode (like FBNeo); the new "Wide Screen Aspect" setting
(16:9 / 4:3, bit 0x10 of the fake region port, only in the sets that use
the wide mode) keeps the 4:3 of the arcade monitor instead. The setting
can be changed while the game runs.

Also adds sfiii3ws, Bank Bank's widescreen hack of 3rd Strike (20220908):
new program SIMM 1 on the 990608 game, ROM names as in FBNeo. Its program
switches the CRTC to the wide mode by itself, so no per-set code is needed.

Tested:
- sfiii2: Screen Mode = Wide switches to 495x224 at once and sends 16:9;
  saved in NVRAM, the next boot goes wide by itself; changing the setting
  from the MAME DIP menu sends 4:3 and 16:9 again; attract and fights in
  the wide mode
- sfiii3ws: wide from frame 161, attract, character select and fights;
  16:9 and 4:3
- sfiii2 in the normal mode: frames and audio bit-identical to master
- cps3.c / driver.c: gcc -std=c89 -pedantic, clang (osx flags), armhf,
  aarch64, PowerPC big-endian

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

---------

Co-authored-by: Claude <[email protected]>
2026-10-21 20:19:36 -04:00
mahoneyt944 1a3ae77e39 Increase description length 2026-10-21 18:50:32 -04:00