notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into master
[pcsx_rearmed.git]
/
libpcsxcore
/
cdrom.c
diff --git
a/libpcsxcore/cdrom.c
b/libpcsxcore/cdrom.c
index
38fecf7
..
17d65ab
100644
(file)
--- a/
libpcsxcore/cdrom.c
+++ b/
libpcsxcore/cdrom.c
@@
-24,6
+24,7
@@
#include "cdrom.h"
#include "ppf.h"
#include "psxdma.h"
#include "cdrom.h"
#include "ppf.h"
#include "psxdma.h"
+#include "arm_features.h"
/* logging */
#if 0
/* logging */
#if 0
@@
-126,7
+127,7
@@
unsigned char Test23[] = { 0x43, 0x58, 0x44, 0x32, 0x39 ,0x34, 0x30, 0x51 };
#define STATUS_ERROR (1<<0) // 0x01
/* Errors */
#define STATUS_ERROR (1<<0) // 0x01
/* Errors */
-#define ERROR_NOT
_READY
(1<<7) // 0x80
+#define ERROR_NOT
READY
(1<<7) // 0x80
#define ERROR_INVALIDCMD (1<<6) // 0x40
#define ERROR_INVALIDARG (1<<5) // 0x20
#define ERROR_INVALIDCMD (1<<6) // 0x40
#define ERROR_INVALIDARG (1<<5) // 0x20
@@
-984,7
+985,7
@@
void cdrInterrupt() {
case DRIVESTATE_PREPARE_CD:
SetResultSize(2);
cdr.Result[0] = cdr.StatP | STATUS_ERROR;
case DRIVESTATE_PREPARE_CD:
SetResultSize(2);
cdr.Result[0] = cdr.StatP | STATUS_ERROR;
- cdr.Result[1] = ERROR_NOT
_
READY;
+ cdr.Result[1] = ERROR_NOTREADY;
cdr.Stat = DiskError;
break;
}
cdr.Stat = DiskError;
break;
}
@@
-1006,7
+1007,7
@@
finish:
#endif
}
#endif
}
-#ifdef
__ARM_ARCH_7A__
+#ifdef
HAVE_ARMV7
#define ssat32_to_16(v) \
asm("ssat %0,#16,%1" : "=r" (v) : "r" (v))
#else
#define ssat32_to_16(v) \
asm("ssat %0,#16,%1" : "=r" (v) : "r" (v))
#else
@@
-1413,13
+1414,15
@@
void psxDma3(u32 madr, u32 bcr, u32 chcr) {
psxCpu->Clear(madr, cdsize / 4);
pTransfer += cdsize;
psxCpu->Clear(madr, cdsize / 4);
pTransfer += cdsize;
-
- // burst vs normal
if( chcr == 0x11400100 ) {
if( chcr == 0x11400100 ) {
+ HW_DMA3_MADR = SWAPu32(madr + cdsize);
CDRDMA_INT( (cdsize/4) / 4 );
}
else if( chcr == 0x11000000 ) {
CDRDMA_INT( (cdsize/4) / 4 );
}
else if( chcr == 0x11000000 ) {
- CDRDMA_INT( (cdsize/4) * 1 );
+ // CDRDMA_INT( (cdsize/4) * 1 );
+ // halted
+ psxRegs.cycle += (cdsize/4) * 24/2;
+ CDRDMA_INT(16);
}
return;
}
return;
@@
-1514,6
+1517,12
@@
int cdrFreeze(void *f, int Mode) {
SysPrintf("cdrom: fixing up old savestate\n");
cdr.Reg2 = 7;
}
SysPrintf("cdrom: fixing up old savestate\n");
cdr.Reg2 = 7;
}
+ // also did not save Attenuator..
+ if ((cdr.AttenuatorLeftToLeft | cdr.AttenuatorLeftToRight
+ | cdr.AttenuatorRightToLeft | cdr.AttenuatorRightToRight) == 0)
+ {
+ cdr.AttenuatorLeftToLeft = cdr.AttenuatorRightToRight = 0x80;
+ }
}
}
}
}