Previous 15994 Revisions Next

r12428 Sunday 31st July, 2011 at 22:17:22 UTC by Angelo Salese
Fixed track resume, it was restarting CD-DA tracks instead of resuming (for example: the pause state in Darius Gaiden)
[src/mame/machine]stvcd.c

src/mame/machine/stvcd.c
r12427r12428
693693         {
694694            cd_stat = CD_STAT_PAUSE;
695695            cd_curfad = 150;
696            //cur_track = 1;
696697            fadstoplay = 0;
697698            in_buffer = 0;
698699            buffull = 0;
r12427r12428
838839                  fadstoplay = (cdrom_get_track_start(cdrom, 0xaa)) - cd_curfad;
839840               printf("track mode %08x %08x\n",cd_curfad,fadstoplay);
840841            }
841            else /* Galaxy Fight calls 10ff ffff ffff ffff, resume/restart previously called track */
842            else
842843            {
843               cd_curfad = cdrom_get_track_start(cdrom, cur_track-1);
844               fadstoplay = cdrom_get_track_start(cdrom, cur_track) - cd_curfad;
844               /* resume from a pause state */
845               /* TODO: Galaxy Fight calls 10ff ffff ffff ffff, but then it calls 0x04->0x02->0x06->0x11->0x04->0x02->0x06 command sequence
846                  (and current implementation nukes start/end FAD addresses at 0x04). I'm sure that this doesn't work like this, but there could
847                  be countless possible combinations ... */
848               if(fadstoplay == 0)
849               {
850                  cd_curfad = cdrom_get_track_start(cdrom, cur_track-1);
851                  fadstoplay = cdrom_get_track_start(cdrom, cur_track) - cd_curfad;
852               }
845853               printf("track resume %08x %08x\n",cd_curfad,fadstoplay);
846854            }
847855         }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team