11 Commits
Author SHA1 Message Date
Federico Pereira e05caba0aa The Simpsons: save the banks, banked RAM and the K053260 in save states (#2050) 2026-10-09 06:08:59 -04:00
Federico Pereira 9d9d1ed901 Galaga: save the stars, the Namco custom I/O and the 54XX in save states (#2052)
* Galaga: save the star field scroll and the graphics bank in save states

* Namco custom I/O: save each chip's state in save states

* Namco 54XX: save the explosion sound generator in save states
2026-10-09 06:05:01 -04:00
Federico Pereira 155d68254c Aliens: save the banks, palette RAM, the K051960 and the K007232 in save states (#2051) 2026-10-09 06:02:54 -04:00
Federico Pereira 0fe5665808 Sound: keep the sound identical after loading a save state (#2049)
* sndintrf: save the sound latches in save states

* cpuexec: save each CPU's local time and cycle count in save states

* mixer: save the channels' pending samples and resampling state in save states
2026-10-09 03:46:51 -04:00
Federico Pereira 97cb277199 cpuint: save the interrupt event queue in save states (#2048) 2026-10-09 03:07:45 -04:00
Federico Pereira d73ba22c26 Konami CPU: save its registers in save states (#2046) 2026-10-08 23:53:22 -04:00
Federico Pereira 64de9b21ed YM3812: keep the registers and write them back when loading a save state (#2045) 2026-10-08 21:56:59 -04:00
Federico Pereira 1104e225f9 Namco wave sound: save the voices and the sound enable in save states (#2044) 2026-10-08 20:10:41 -04:00
Federico Pereira 21c9f8ffd4 QSound games: keep the sound when loading a save state (#2043)
* QSound: save the channels and the data latch in save states

* CPS1/CPS2: save the QSound Z80 ROM bank in save states

* cpuexec: save each CPU's lasting suspend state (reset, halt, disable)
2026-10-08 13:38:21 -04:00
Federico Pereira 10315f744e YM2151: save the timers in save states (#2042)
The YM2151 timers are MAME timers, which MAME 0.78 save states do not keep. After loading, a timer that was running never fires again, so a sound CPU that takes its interrupt from a YM2151 timer (CPS1: Street Fighter II) or polls its flag stops, and the game is silent until it is reset.

Save the time left to each timer's next overflow (-1 when it is stopped) in a presave callback, and start the timers again with it in the existing postload callback.
2026-10-08 04:36:54 -04:00
Federico Pereira b52156ee5d YM2151: fix swapped arguments to set_connect when loading a save state (#2041)
ym2151_postload_refresh called set_connect(op, connect[j], j), but
set_connect takes the channel first and the algorithm second, as the
register write path does (set_connect(op, r&7, v&7)). After loading a
state every FM channel was rebuilt with the wrong algorithm until the
game wrote that register again (X-Men's music played wrong for a few
seconds after a load).
2026-10-07 01:39:18 -04:00