Ensure CPU clock scale is only applied when changed and reset on game unload.
Currently this core calls cpunum_set_clockscale each frame with the value that is currently set by the CPU core option.
This in theory could cause a minor bug when a cheat code later alters the value of a CPU as some of them do. I haven't experienced this bug personally.
My PR also helps make it easier to reintegrate the legacy MAME menu for setting CPU clock values.
One thing I think I'm discovering is that MAME 0.78 doesn't seem to save CPU clock value settings in a file in order to persist. Possibly I am not understanding how that is persistent, yet.
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]>
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]>
- 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]>
- 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]>
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
- 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
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]>
- 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]>
- 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
- 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
* 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]>
- 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]>
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]>
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]>
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]>
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]>
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]>
* 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]>
osd_get_joy_list() rebuilt the whole list (4 players x all codes) at every
call, and the input code calls it at every key check: about 100 times a
frame, some 750k instructions a frame whatever the game. It is now built
again only when a port's layout changes.
doapp, 600 frames (callgrind): retro_run 15.02 G -> 14.57 G instructions
(-3%), video and audio identical frame by frame. The saving is per frame,
so it is a larger share on lighter games.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
The MIPS Dynarec option was offered and turned on only for Namco System
11/12; zn.c already calls psxcpu_set_jit() when the option is on, but the
option stayed off, so the ZN games always ran the interpreter.
Video and audio identical frame by frame, recompiler vs interpreter, 4000
frames: the 17 Tecmo TPS sets and the 9 Taito FX-1A sets (branch
taito-fx1a).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
The first displayed line goes at disstart - 16 and the lines out of the
range are black. Super Football Champ sets 24..248 (224 lines): the picture
was 8 lines too high with 16 lines of off-screen VRAM below it. With the
usual 16..256 range nothing changes: doapp, glpracr2, tekken3, psyforce
identical frame by frame over 2500 frames.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
YM2610_save_state leaves out the global envelope and LFO counters, the key
state, the SSG-EG negation, the envelope output and the algorithm memory
of the FM part, and the counters, envelope and noise generator of the SSG
(the AY8910 has no save state, and the YM postload rewrites its registers,
which restarts the envelope). With YM2610_timer_state_register() these are
now kept in a copy and put back after the chip postload. Other YM2610
drivers: unchanged.
Save state, 600 frames after same-session and cross-session load:
- sfchamp: video and audio identical
- psyforce: audio identical (was: all 600 frames differ)
- mgcldtex, mgcldate: video identical; audio differs only in the first
26-27 frames, by at most 103/32768, decaying to 0 (was: 470 frames)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
The core does not save its timers, so after a load the two FM timers of
the YM2610 kept the state of the running session and the sound CPU drifted
(sfchamp: audio differed 2 s after a reload). A driver can now ask for the
timers to be saved with YM2610_timer_state_register() in its init; the
other YM2610 drivers keep their save state layout.
sfchamp: video and audio identical over 600 frames after same-session and
cross-session load.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
The Taito FX-1A games on the ZN-1 board code from #2081, with the sets
and file names of current MAME. Replaces the old non-working sets.
- zn.c: FX-1A board (1 MB VRAM, 8 MB game ROM banks at 0x1f000000, bank
register at 0x1fb40000), CAT702 keys read from the TT01 / TTnn dumps in
the sets, Z80 with a YM2610B and the TC0140SYT at 0x1fb80000, plus the
PSX SPU.
- taitosnd.c: optional reset and save state registration for the
TC0140SYT (used by the FX-1A only; other drivers unchanged).
- Sets: coh1000t (BIOS), sfchamp/o/u/j, psyforce/j/x, mgcldtex, mgcldate
(MAME names: the old mgcldate is now mgcldtex, the old mgcldtea is now
mgcldate). Old sound player and FX-1A machine removed.
- FX-1B sets (raystorm, ftimpcta, gdarius, gdarius2) unchanged for now.
- metadata/mame2003-plus.xml: FX-1A entries regenerated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
The Tecmo TPS games on the ZN-1 board code from #2081, with the sets and
file names of current MAME. Replaces the old non-working tps sets.
- zn.c: TPS board (2 MB VRAM, 8 MB game ROM banks at 0x1f000000, bank
register at 0x1fb00006, four coin counters), CAT702 keys read from the
MG01 / MGnn dumps in the sets, PSX SPU sound.
- Cool Boarders Arcade Jam: sound board with a Z80, a YMZ280B and the two
IDT7202 FIFOs to the main CPU.
- 1 on 1 Government: the factory EEPROM of the set is used when there is
no NVRAM yet (else: "loading backup data failed").
- Gallop Racer 2 Link HW: link board ROM in the set, CPU not emulated
(not connected to anything in MAME either).
- Old protection hack and link machine removed; BIOS is coh1002m (was tps).
- metadata/mame2003-plus.xml: TPS entries regenerated.
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
Co-authored-by: Claude <[email protected]>
CarnEvil (#1659): MIPS III recompiler and native FPU on the Seattle games
that were checked (CarnEvil, SF Rush, The Rock: identical frames to the
interpreter), Voodoo blitters for their common modes, IDE and Galileo DMA
straight into RAM, VBLANK latch, Galileo timers and IDE seek timing as
current MAME, 54.123711 Hz. Same frame cadence as current MAME.
Seattle driver toward current MAME: machine configurations and refresh
rates, I/O ASIC values, Voodoo clipping, LFB formats, dithering, alpha
blending, depth bias and alpha test, wheel board and latched shifter,
SMC91C94 ethernet on the Flagstaff board (SF Rush's race waited for it),
49-way joysticks on Blitz '99/2000 (I40) and Blitz, ROM names, disk SHA1s,
descriptions and clones of current MAME (mace 1.0ce, macea, wg3dhfe,
blitz99a), San Francisco Rush: The Rock.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016PwPGTj4SDjmvPp3DRm9j5
A store into a 64-byte granule holding translated code flushed the whole
translation cache. 1 on 1 Government keeps a variable next to code: 285
flushes and about 300000 recompiled blocks in 3000 frames, so the
recompiler was slower than the interpreter (220 vs 300 fps). The code map
now has one entry per 4-byte word (4 MB table, 16 MB of host addresses):
only a store over an instruction that was actually translated flushes.
A flush is still never missed, an aliased entry only flushes more.
1on1gov with the recompiler: 220 -> 360 fps; frames identical to the
interpreter on all the Tecmo TPS sets.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MEgow1uRCv8pxMErKhmoHZ
A C89 port of current MAME's cps3.cpp and cps3_a.cpp: MAME's 53 sets
without the multi-game bootlegs, plus sfiii4n, the 3rd Strike "4rd
Arrange Edition 2013" hack that FBNeo has and MAME does not.
- Encryption with the per-game keys, through the new SH-2 hooks.
- Flash SIMMs (Fujitsu 29F016A), EEPROM, inputs, save states.
- Video: sprites with zoom, tilemaps, text layer, shadow/highlight,
full screen zoom; palette and character DMA.
- The 16-voice sample chip (sndhrdw/cps3_sndhrdw.c).
- No CD drive: the BIOS no-CD flag is always set, so the CD sets run
from the SIMMs; the Red Earth / Warzard CD BIOSes, with no such flag,
start the game straight from the SIMMs.
- A "Region" DIP switch patches the cart's region byte at reset:
Europe by default, USA on 2nd Impact (no European release), any
region or "As BIOS" selectable.
- Idle loop skip per game (FBNeo's addresses).
Docs in docs/capcom-cps3.md, sets in metadata/mame2003-plus.xml.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013Vje3pEtpLHubqCGwCgoQX
Merged sets keep the files of the clones in subfolders of the parent's zip,
with the same names (sfiii3n/sfiii3-simm1.0, sfiii3nr1/sfiii3-simm1.0); the
loader matched the name only and took the first one, the wrong revision.
Loading and verifying now look for the expected CRC first, then for the
name. Split and non-merged sets load as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013Vje3pEtpLHubqCGwCgoQX
Two optional callbacks in struct sh2_config, for the CPS-3 custom SH-2:
- opcode_read: the opcode fetch, for a CPU that decrypts its opcodes
- dma_read_hook: sees and can change each unit the internal DMA reads
Both are NULL in the other SH-2 drivers, which run as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013Vje3pEtpLHubqCGwCgoQX