mirror of
https://github.com/libretro/mame2003-plus-libretro.git
synced 2026-11-07 04:16:07 -10:00
SCSP (also used by Model 2): - The slot engine from current MAME: key off goes to the release, the envelope tables and the dB curve of the decay, pitch, interpolation, the four loop modes, FM from the ring buffer, noise (SSCTL), SBCTL, LPSLNK, STWINH/SDIR; 8-bit samples read in big-endian byte order. - The monitor register 0x408 returns CA, SGC and EG of the slot set in MSLC: the sound drivers look there for a free slot, and Winter Heat played every voice on slot 0, each one cutting the previous. - Real timers for timers A, B and C, as in MAME: counting them with the generated samples delayed every interrupt until the next stream update. - Interrupts as in MAME: each source raises its own level until it is acknowledged in SCIRE, and an acknowledged expired timer is pending again with no new interrupt. Reading MIBUF drops the MIDI interrupt: left raised, the sound CPU took it again on an empty FIFO and read stale bytes as MIDI data, which broke music commands in Model 2 (Fighting Vipers, Dead or Alive, Manx TT). - The DMA used the common registers 0x412 words past them, inside the slots: now as in MAME. - The common registers are 0x400-0x42f only (0x500 is not a mirror), the ring buffer at 0x600 can be read and written, the LFO saw wave and rate as in MAME. - ST-V: a 16-bit access of the SH-2 touches only its half of the SCSP registers. Batman Forever: the Acclaim RAX sound board (ADSP-2181), moved from zn.c to sndhrdw/acclaim_rax.c and shared by NBA Jam Extreme and Batman Forever, which writes its commands to 0x04800000 as in MAME. docs/sega-model2.md: the MIDI interrupt of the sound link. Fixes #2194. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013Vje3pEtpLHubqCGwCgoQX