mirror of https://github.com/PCSX2/pcsx2.git
CDVD: Redesign and fix the Fast CDVD speedhack
Rather than setting it to a constant cycle count, it just halves all cycle counts being passed to it which aren't full seeks.
This commit is contained in:
parent
65ce152e2c
commit
d0d58ded29
|
@ -47,14 +47,25 @@ static __fi void SetResultSize(u8 size)
|
||||||
cdvd.sDataIn &= ~0x40;
|
cdvd.sDataIn &= ~0x40;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void CDVDDMA_INT(u32 eCycle)
|
||||||
|
{
|
||||||
|
if (EmuConfig.Speedhacks.fastCDVD)
|
||||||
|
{
|
||||||
|
if (eCycle < Cdvd_FullSeek_Cycles && eCycle > 1)
|
||||||
|
eCycle *= 0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
PSX_INT(IopEvt_CdvdDMA, eCycle);
|
||||||
|
}
|
||||||
|
|
||||||
static void CDVDREAD_INT(u32 eCycle)
|
static void CDVDREAD_INT(u32 eCycle)
|
||||||
{
|
{
|
||||||
// Give it an arbitary FAST value. Good for ~5000kb/s in ULE when copying a file from CDVD to HDD
|
// Give it an arbitary FAST value. Good for ~5000kb/s in ULE when copying a file from CDVD to HDD
|
||||||
// Keep long seeks out though, as games may try to push dmas while seeking. (Tales of the Abyss)
|
// Keep long seeks out though, as games may try to push dmas while seeking. (Tales of the Abyss)
|
||||||
if (EmuConfig.Speedhacks.fastCDVD)
|
if (EmuConfig.Speedhacks.fastCDVD)
|
||||||
{
|
{
|
||||||
if (eCycle < Cdvd_FullSeek_Cycles)
|
if (eCycle < Cdvd_FullSeek_Cycles && eCycle > 1)
|
||||||
eCycle = 3000;
|
eCycle *= 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
PSX_INT(IopEvt_CdvdRead, eCycle);
|
PSX_INT(IopEvt_CdvdRead, eCycle);
|
||||||
|
@ -993,7 +1004,7 @@ __fi void cdvdReadInterrupt()
|
||||||
pxAssert((int)cdvd.ReadTime > 0);
|
pxAssert((int)cdvd.ReadTime > 0);
|
||||||
|
|
||||||
if (HW_DMA3_CHCR & 0x01000000)
|
if (HW_DMA3_CHCR & 0x01000000)
|
||||||
PSX_INT(IopEvt_CdvdDMA, DMATime);
|
CDVDDMA_INT(DMATime);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1004,7 +1015,7 @@ __fi void cdvdReadInterrupt()
|
||||||
{
|
{
|
||||||
int DMATime = (cdvd.BlockSize / 2) * 40;
|
int DMATime = (cdvd.BlockSize / 2) * 40;
|
||||||
|
|
||||||
PSX_INT(IopEvt_CdvdDMA, DMATime);
|
CDVDDMA_INT(DMATime);
|
||||||
|
|
||||||
cdvd.Status = CDVD_STATUS_PAUSE; // Needed here but could be smth else than Pause (rama)
|
cdvd.Status = CDVD_STATUS_PAUSE; // Needed here but could be smth else than Pause (rama)
|
||||||
// All done! :D
|
// All done! :D
|
||||||
|
|
Loading…
Reference in New Issue