mirror of
https://github.com/libretro/mame2003-plus-libretro.git
synced 2026-11-07 04:16:07 -10:00
DrZ80(snd) and Cyclone+DrZ80(snd) only replaced the Z80s flagged CPU_AUDIO_CPU, and many sound Z80s are not flagged (CPS2, Taito, Toaplan, the Mega Drive based boards...): those games kept the C Z80 with no sign in the log. Now, on a board with no flagged CPU whose first CPU is not a Z80, its first Z80 is taken as the sound CPU too, except where DrZ80 can't run it: a Z80 with a daisy chain (DrZ80 has none), the CPS1 QSound Z80 (Kabuki-encrypted opcodes) and the Tatsumi sound Z80 (Round Up 5 hangs). The log says which Z80s are replaced and which are kept. frontend_list.h: removed the entries that could do nothing, with the same result for every game: 82 names not in the core, 531 games with neither a 68000 nor a Z80, and a second zzyzzyx2 entry never reached. Claude-Session: https://claude.ai/code/session_01N3fzdsnzkQVtgYtYzqepjX Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
b8afd2ddde
commit
af0f783b1e
2 files changed
+29
-618
No files matched your search
File diff suppressed because it is too large.
Load diff
+29
-4
@@ -1809,16 +1809,41 @@ static void configure_cyclone_mode (int driverIndex)
|
||||
}
|
||||
}
|
||||
|
||||
/* Replace Z80 with DRZ80 only for sound CPUs */
|
||||
/* Replace Z80 with DRZ80 only for sound CPUs: the ones flagged
|
||||
CPU_AUDIO_CPU and, on a board with no flagged CPU whose first CPU
|
||||
is not a Z80 (68000, 6809, V30...), its first Z80: the sound CPU
|
||||
of many drivers not flagged, such as CPS2, Taito, Toaplan and the
|
||||
Mega Drive based boards. Not when DrZ80 can't run that Z80:
|
||||
- one with a daisy chain (Z80 CTC, PIO...): DrZ80 has none;
|
||||
- the CPS1 QSound Z80: its opcodes are encrypted (Kabuki), and
|
||||
DrZ80 reads the operands from the decrypted opcodes;
|
||||
- the Tatsumi sound Z80 (Round Up 5): with DrZ80 the game hangs */
|
||||
if (use_drz80_snd)
|
||||
{
|
||||
int guess_sound_z80 = (Machine->drv->cpu[0].cpu_type != CPU_Z80)
|
||||
&& !strstr(drivers[driverIndex]->source_file, "cps1.c")
|
||||
&& !strstr(drivers[driverIndex]->source_file, "tatsumi.c");
|
||||
|
||||
for (i=0;i<MAX_CPU;i++)
|
||||
if (Machine->drv->cpu[i].cpu_flags & CPU_AUDIO_CPU)
|
||||
guess_sound_z80 = 0;
|
||||
|
||||
for (i=0;i<MAX_CPU;i++)
|
||||
{
|
||||
unsigned int *type=(unsigned int *)&(Machine->drv->cpu[i].cpu_type);
|
||||
if (*type==CPU_Z80 && Machine->drv->cpu[i].cpu_flags&CPU_AUDIO_CPU)
|
||||
if (*type==CPU_Z80)
|
||||
{
|
||||
*type=CPU_DRZ80;
|
||||
log_cb(RETRO_LOG_INFO, LOGPRE "Replaced Z80 sound\n");
|
||||
if ((Machine->drv->cpu[i].cpu_flags & CPU_AUDIO_CPU) || (guess_sound_z80 && !Machine->drv->cpu[i].reset_param))
|
||||
{
|
||||
*type=CPU_DRZ80;
|
||||
guess_sound_z80 = 0;
|
||||
log_cb(RETRO_LOG_INFO, LOGPRE "Replaced Z80 sound (CPU %d)\n", i);
|
||||
}
|
||||
else
|
||||
{
|
||||
guess_sound_z80 = 0;
|
||||
log_cb(RETRO_LOG_INFO, LOGPRE "Z80 (CPU %d) kept on the C core\n", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user