Homebrew Mega Play conversion of The Addams Family ARCADE (v77).
- INPUT_PORTS mp_addams with DSW C (1UP every, lives)
- megaplay_nvram: megaplay + NVRAM handler for the BIOS battery RAM
(Z80 0x6800-0x77ff: credits, bookkeeping, per-slot game areas)
- ROM set epr-26013.ic1 (game) / epr-15175-20.ic2 (instruction ROM)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018jUxoG1TREth88C39ZMWSV
Mariusz Wojcieszek improved the ST-V Emulation:
Changes to sprites color calculation. I fixed it using in color bank modes by using color offset register from VDP2. Now shienryu kludge is no longer needed and also sprite colors in Winter Heat and Virtua Fighter Kids are correct.
Changes for Princess Clara Daisakusen (prikura) so that game is playable now (as far I tested it).
Prikura tried to render distorted sprites with xsize = 0 or ysize = 0 and this caused crash. As these values are prohibited according to manual, I ignore distorted sprites with xsize = 0 or ysize = 0.
I found that missing MINIT for slave to run the sprites is done by using address 0x01406f40 instead of 0x01000000. I'm not sure if my change is a hack or real hardware behaves in that way, but in my opinion it is possible that whole range of addresses (0x01000000 - 0x017fffff) is used for MINIT. I added MINIT only for one address used by prikura.
Bad sprite colors were fixed in point 1.
Small change for vdp2: commented out a call to usrintf_showmessage().
* K054539: save where each channel plays in save states
* YM2151: save the register the data port writes to in save states
* X-Men: save the EEPROM count and the tilemap select in save states
* 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
* 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
* 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)
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.
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).