[Core/CD] CD timings should be initialized during CD hardware initialization (fixes broken Mode 1 support)

This commit is contained in:
EkeEke 2016-07-06 23:09:15 +02:00
parent 38753afaa5
commit 36da8a2453
5 changed files with 3 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -1506,6 +1506,9 @@ void scd_init(void)
cdc_init(); cdc_init();
gfx_init(); gfx_init();
/* Initialize CD hardware master clock count per scanline */
scd.cycles_per_line = (uint32) (MCYCLES_PER_LINE * ((float)SCD_CLOCK / (float)system_clock));
/* Clear RAM */ /* Clear RAM */
memset(scd.prg_ram, 0x00, sizeof(scd.prg_ram)); memset(scd.prg_ram, 0x00, sizeof(scd.prg_ram));
memset(scd.word_ram, 0x00, sizeof(scd.word_ram)); memset(scd.word_ram, 0x00, sizeof(scd.word_ram));

View File

@ -1105,12 +1105,6 @@ void get_region(char *romheader)
/* force PAL/NTSC master clock if requested */ /* force PAL/NTSC master clock if requested */
if (config.master_clock == 1) system_clock = MCLOCK_NTSC; if (config.master_clock == 1) system_clock = MCLOCK_NTSC;
else if (config.master_clock == 2) system_clock = MCLOCK_PAL; else if (config.master_clock == 2) system_clock = MCLOCK_PAL;
/* reinitialize CD unit master clock count per scanline */
if (system_hw == SYSTEM_MCD)
{
scd.cycles_per_line = (uint32) (MCYCLES_PER_LINE * ((float)SCD_CLOCK / (float)system_clock));
}
} }
/**************************************************************************** /****************************************************************************