diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-13 07:28:03 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-13 07:28:03 +0000 |
| commit | d34b4220bde29d7937d927e9d17a50470a36c500 (patch) | |
| tree | 8f81f19f16f8fd5f72a8ae7c3eb16a83fd1a9942 /libpcsxcore | |
| parent | a58cfdac407bc1d8fedc11acd924b275ba28cc51 (diff) | |
| download | pcsxr-d34b4220bde29d7937d927e9d17a50470a36c500.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@64535 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
| -rw-r--r-- | libpcsxcore/cdrom.c | 27 | ||||
| -rw-r--r-- | libpcsxcore/sio.c | 4 |
2 files changed, 22 insertions, 9 deletions
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index 4be39d22..888de49f 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -115,7 +115,8 @@ unsigned char Test23[] = { 0x43, 0x58, 0x44, 0x32, 0x39 ,0x34, 0x30, 0x51 }; #define STATUS_ROTATING (1<<1) // 0x02 #define STATUS_ERROR (1<<0) // 0x01 - +#define XA_ATTENUATE 0
+#define CDDA_ATTENUATE 1 // 1x = 75 sectors per second // PSXCLK = 1 sec in the ps @@ -480,7 +481,7 @@ static void ReadTrack( u8 *time ) { } -static void CDXA_Attenuation( s16 *buf, int size, int stereo ) +static CDXA_Attenuation( s16 *buf, int size, int stereo, int attenuate_type ) { s16 *spsound; s32 lc,rc; @@ -508,8 +509,14 @@ static void CDXA_Attenuation( s16 *buf, int size, int stereo ) for( i = 0; i < size / 2; i += 2 ) { - lc = (spsound[i+0] * cdr.AttenuatorLeft[0] + spsound[i+1] * cdr.AttenuatorRight[1]) / 128; - rc = (spsound[i+1] * cdr.AttenuatorRight[0] + spsound[i+0] * cdr.AttenuatorLeft[1]) / 128; + // Chronicles of the Sword - cutscene (xa), speech (cdda)
+ if( attenuate_type == XA_ATTENUATE ) {
+ lc = (spsound[i+0] * cdr.AttenuatorLeft[0] + spsound[i+1] * cdr.AttenuatorLeft[1]) / 128;
+ rc = (spsound[i+1] * cdr.AttenuatorRight[0] + spsound[i+0] * cdr.AttenuatorRight[1]) / 128;
+ } else if( attenuate_type == CDDA_ATTENUATE ) {
+ lc = (spsound[i+0] * cdr.AttenuatorLeft[0] + spsound[i+1] * cdr.AttenuatorRight[1]) / 128;
+ rc = (spsound[i+1] * cdr.AttenuatorRight[0] + spsound[i+0] * cdr.AttenuatorLeft[1]) / 128;
+ } if( lc < -32768 ) lc = -32768; if( rc < -32768 ) rc = -32768; @@ -887,8 +894,8 @@ void cdrPlayInterrupt() if( CDR_readCDDA ) { CDR_readCDDA( cdr.SetSectorPlay[0], cdr.SetSectorPlay[1], cdr.SetSectorPlay[2], cdr.Transfer ); - - CDXA_Attenuation( (short *) cdr.Transfer, 2352, 1 ); + + CDXA_Attenuation( (short *) cdr.Transfer, 2352, 1, CDDA_ATTENUATE ); } @@ -990,7 +997,9 @@ void cdrInterrupt() { Set_Track(); Find_CurTrack(); ReadTrack( cdr.SetSectorPlay ); - +
+ // Chronicles of the Sword - getlocp timing
+ Create_Fake_Subq();
// GameShark CD Player: Calls 2x + Play 2x if( cdr.FastBackward || cdr.FastForward ) { @@ -1613,9 +1622,9 @@ void cdrReadInterrupt() { // Duke Nukem - Time to Kill - speech, music volume control // Tekken 3 - post-match fade out if( cdr.Xa.stereo == 0 ) - CDXA_Attenuation( cdr.Xa.pcm, cdr.Xa.nsamples * 2, cdr.Xa.stereo ); + CDXA_Attenuation( cdr.Xa.pcm, cdr.Xa.nsamples * 2, cdr.Xa.stereo, XA_ATTENUATE ); else - CDXA_Attenuation( cdr.Xa.pcm, cdr.Xa.nsamples * 4, cdr.Xa.stereo ); + CDXA_Attenuation( cdr.Xa.pcm, cdr.Xa.nsamples * 4, cdr.Xa.stereo, XA_ATTENUATE ); // fix mono xa attenuation diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c index 1659b73a..454081d8 100644 --- a/libpcsxcore/sio.c +++ b/libpcsxcore/sio.c @@ -710,6 +710,10 @@ void sioWrite8(unsigned char value) { return; case 0x81: // start memcard StatReg |= RX_RDY; +#if 0
+ // Chronicles of the Sword - no memcard = password options + if( Config.Memcard == 1 ) return;
+#endif
memcpy(buf, cardh, 4); parp = 0; bufcount = 3; |
