Previous 15994 Revisions Next

r10459 Wednesday 16th February, 2011 at 04:08:58 UTC by R. Belmont
[PSX] More fixes. Don't try to falsely enforce sector limit (FF7 intro). Return MSF addresses in proper form; games try to play CD-DA now but there's apparently a byte order problem.
[src/mess/machine]psxcddrv.c

src/mess/machine/psxcddrv.c
r10458r10459
174174   {
175175      // The sector we want is in the last block in the prefetch buffer
176176      // which might still be loading, check if the sector we want is loaded
177
177#if 0 // we do not load async in MESS
178178      INT64 trans=pf_status->bytes_transferred();
179179      unsigned int secmod=pfsec%num_pf_sectors,
180180                         needbytes=(secmod+1)*native_sector_size;
r10458r10459
185185
186186         return false;
187187      } else
188#endif
188189      {
189190         // The sector is loaded
190191
r10458r10459
402403   printf("mess: read %d sectors from %d (secsize %d)\n",numsec,startsec,secsize);
403404   #endif
404405
405   if ((startsec>=0) && ((int)startsec<num_sectors))
406   if ((startsec>=0)) // && ((int)startsec<num_sectors))
406407   {
407408//      fin->seek((INT64)startsec*(INT64)bin_sector_size);
408409
r10458r10459
452453
453454      sector_to_msf(trkstart, address);
454455
455      address[0] = decimal_to_bcd(address[0]);
456      address[1] = decimal_to_bcd(address[1]);
457      address[2] = decimal_to_bcd(address[2]);
456      address[0] = address[0];
457      address[1] = address[1];
458      address[2] = address[2];
458459
459460//      printf("get_track_address %d = %02x:%02x:%02x\n", track, address[0], address[1], address[2]);
460461
r10458r10459
471472{
472473   const cdrom_toc *toc = cdrom_get_toc(m_cd);
473474   UINT32 track = cdrom_get_track(m_cd, sector);
475   int start;
474476
475   *start_sector = cdrom_get_track_start(m_cd, track);
476   *end_sector = *start_sector + toc->tracks[track].frames;
477   start = cdrom_get_track_start(m_cd, track);
477478
478//   printf("find_track: track %d start %d end %d\n", track, *start_sector, *end_sector);
479   if (start_sector != NULL)
480   {
481      *start_sector = start;
482   }
479483
484   if (end_sector != NULL)
485   {
486      *end_sector = start + toc->tracks[track].frames;
487   }
488
489   printf("find_track: track %d start %d end %d\n", track, start, *end_sector);
490
480491   return -1;
481492}
482493

Previous 15994 Revisions Next


© 1998-2018 The MESS Team