X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fcdrom.c;h=fb526b4073c06882c6ccc1fa3efa7c1ee9eeb9e4;hb=9cf790343a0788535b4ab2b2ce576662860d0188;hp=2b30e89d43524af5281d785992ace5ddb9865096;hpb=d9a0249331e3f0da8820e158baaafa69e3a534ac;p=pcsx_rearmed.git diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 2b30e89d..fb526b40 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -624,10 +624,10 @@ void cdrPlaySeekReadInterrupt(void) if (!cdr.Irq && !cdr.Stat && (cdr.Mode & (MODE_AUTOPAUSE|MODE_REPORT))) cdrPlayInterrupt_Autopause(); - if (CDR_readCDDA && !cdr.Muted && !Config.Cdda) { + if (!cdr.Muted && !Config.Cdda) { cdrAttenuate(read_buf, CD_FRAMESIZE_RAW / 4, 1); - if (SPU_playCDDAchannel) - SPU_playCDDAchannel(read_buf, CD_FRAMESIZE_RAW); + SPU_playCDDAchannel(read_buf, CD_FRAMESIZE_RAW, psxRegs.cycle, cdr.FirstSector); + cdr.FirstSector = 0; } cdr.SetSectorPlay[2]++; @@ -756,6 +756,7 @@ void cdrInterrupt(void) { Find_CurTrack(cdr.SetSectorPlay); ReadTrack(cdr.SetSectorPlay); cdr.TrackChanged = FALSE; + cdr.FirstSector = 1; if (!Config.Cdda) CDR_play(cdr.SetSectorPlay); @@ -1018,7 +1019,8 @@ void cdrInterrupt(void) { } cdr.Result[0] |= (cdr.Result[1] >> 4) & 0x08; - strncpy((char *)&cdr.Result[4], "PCSX", 4); + /* This adds the string "PCSX" in Playstation bios boot screen */ + memcpy((char *)&cdr.Result[4], "PCSX", 4); cdr.Stat = Complete; break; @@ -1070,39 +1072,6 @@ void cdrInterrupt(void) { // - fixes new game ReadTrack(cdr.SetSectorPlay); - - // Crusaders of Might and Magic - update getlocl now - // - fixes cutscene speech - { - u8 *buf = CDR_getBuffer(); - if (buf != NULL) - memcpy(cdr.Transfer, buf, 8); - } - - /* - Duke Nukem: Land of the Babes - seek then delay read for one frame - - fixes cutscenes - C-12 - Final Resistance - doesn't like seek - */ - - /* - By nicolasnoble from PCSX Redux : - "It LOOKS like this logic is wrong, therefore disabling it with `&& false` for now. - For "PoPoLoCrois Monogatari II", the game logic will soft lock and will never issue GetLocP to detect - the end of its XA streams, as it seems to assume ReadS will not return a status byte with the SEEK - flag set. I think the reasonning is that since it's invalid to call GetLocP while seeking, the game - tries to protect itself against errors by preventing from issuing a GetLocP while it knows the - last status was "seek". But this makes the logic just softlock as it'll never get a notification - about the fact the drive is done seeking and the read actually started. - - In other words, this state machine here is probably wrong in assuming the response to ReadS/ReadN is - done right away. It's rather when it's done seeking, and the read has actually started. This probably - requires a bit more work to make sure seek delays are processed properly. - Checked with a few games, this seems to work fine." - - Gameblabla additional notes : - This still needs the "+ seekTime" that PCSX Redux doesn't have for the Driver "retry" mission error. - */ CDRPLAYSEEKREAD_INT(((cdr.Mode & 0x80) ? (cdReadTime) : cdReadTime * 2) + seekTime); SetPlaySeekRead(cdr.StatP, STATUS_SEEK); @@ -1247,7 +1216,7 @@ static void cdrReadInterrupt(void) int ret = xa_decode_sector(&cdr.Xa, cdr.Transfer+4, cdr.FirstSector); if (!ret) { cdrAttenuate(cdr.Xa.pcm, cdr.Xa.nsamples, cdr.Xa.stereo); - SPU_playADPCMchannel(&cdr.Xa); + SPU_playADPCMchannel(&cdr.Xa, psxRegs.cycle, cdr.FirstSector); cdr.FirstSector = 0; } else cdr.FirstSector = -1;