Actually fixed track seek, fixes regression with Zero Divide

This commit is contained in:
Angelo Salese 2013-02-22 17:43:28 +00:00
parent c3440702e6
commit 2c9983b2de
2 changed files with 17 additions and 3 deletions

View File

@ -493,7 +493,7 @@
Horde, The (Japan) [T-15902G] | (hordej)
Horror Tour (Japan) [T-24301G] | (horror)
Houkago Ren-ai Club: Koi no Etude (Japan) [T-19713G] | (houkago)
Houkago Ren-ai Club: Koi no Etude (Japan) (Genteiban) [T-19714G] | houkagogen)
Houkago Ren-ai Club: Koi no Etude (Japan) (Genteiban) [T-19714G] | (houkagogen)
Houma Hunter Lime: Perfect Collection (Japan) [T-2001G] | (hhuntlim)
House of the Dead, The (Japan) [GS-9173] | (hotdj)
House of the Dead, The (Japan) (Satakore) [GS-9207] | @@

View File

@ -2450,13 +2450,27 @@ void saturn_state::cd_playdata( void )
{
if ((cd_stat & 0x0f00) == CD_STAT_SEEK)
{
INT32 fad_diff;
//printf("PRE %08x %08x %08x %d\n",cd_curfad,cd_fad_seek,cd_stat,cd_fad_seek - cd_curfad);
fad_diff = (cd_fad_seek - cd_curfad);
/* Zero Divide wants this TODO: timings. */
if((cd_fad_seek - cd_curfad) > (750*cd_speed))
if(fad_diff > (750*cd_speed))
{
//printf("PRE FFWD %08x %08x %08x %d %d\n",cd_curfad,cd_fad_seek,cd_stat,cd_fad_seek - cd_curfad,750*cd_speed);
cd_curfad += (750*cd_speed);
else if((cd_fad_seek - cd_curfad) < (-750*cd_speed))
//printf("POST FFWD %08x %08x %08x %d %d\n",cd_curfad,cd_fad_seek,cd_stat,cd_fad_seek - cd_curfad, 750*cd_speed);
}
else if(fad_diff < (-750*cd_speed))
{
//printf("PRE REW %08x %08x %08x %d %d\n",cd_curfad,cd_fad_seek,cd_stat,cd_fad_seek - cd_curfad, -750*cd_speed);
cd_curfad -= (750*cd_speed);
//printf("POST REW %08x %08x %08x %d %d\n",cd_curfad,cd_fad_seek,cd_stat,cd_fad_seek - cd_curfad, -750*cd_speed);
}
else
{
//printf("Ready\n");
cd_curfad = cd_fad_seek;
cd_stat = CD_STAT_PLAY;
}