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
Fix fgets param
[pcsx_rearmed.git]
/
libpcsxcore
/
cdrom.c
diff --git
a/libpcsxcore/cdrom.c
b/libpcsxcore/cdrom.c
index
556b512
..
43d25d3
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
@@
-538,6
+539,7
@@
void cdrInterrupt() {
int start_rotating = 0;
int error = 0;
int delay;
int start_rotating = 0;
int error = 0;
int delay;
+ unsigned int seekTime = 0;
// Reschedule IRQ
if (cdr.Stat) {
// Reschedule IRQ
if (cdr.Stat) {
@@
-876,7
+878,8
@@
void cdrInterrupt() {
}
cdr.Result[0] |= (cdr.Result[1] >> 4) & 0x08;
}
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;
cdr.Stat = Complete;
break;
@@
-908,6
+911,8
@@
void cdrInterrupt() {
case CdlReadN:
case CdlReadS:
if (cdr.SetlocPending) {
case CdlReadN:
case CdlReadS:
if (cdr.SetlocPending) {
+ seekTime = abs(msf2sec(cdr.SetSectorPlay) - msf2sec(cdr.SetSector)) * (cdReadTime / 200);
+ if(seekTime > 1000000) seekTime = 1000000;
memcpy(cdr.SetSectorPlay, cdr.SetSector, 4);
cdr.SetlocPending = 0;
}
memcpy(cdr.SetSectorPlay, cdr.SetSector, 4);
cdr.SetlocPending = 0;
}
@@
-947,7
+952,7
@@
void cdrInterrupt() {
// - fix cutscene speech (startup)
// ??? - use more accurate seek time later
// - fix cutscene speech (startup)
// ??? - use more accurate seek time later
- CDREAD_INT((
cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime * 1
);
+ CDREAD_INT((
(cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime * 1) + seekTime
);
} else {
cdr.StatP |= STATUS_READ;
cdr.StatP &= ~STATUS_SEEK;
} else {
cdr.StatP |= STATUS_READ;
cdr.StatP &= ~STATUS_SEEK;
@@
-1006,7
+1011,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
@@
-1497,7
+1502,9
@@
int cdrFreeze(void *f, int Mode) {
pTransfer = cdr.Transfer + tmp;
// read right sub data
pTransfer = cdr.Transfer + tmp;
// read right sub data
- memcpy(tmpp, cdr.Prev, 3);
+ tmpp[0] = btoi(cdr.Prev[0]);
+ tmpp[1] = btoi(cdr.Prev[1]);
+ tmpp[2] = btoi(cdr.Prev[2]);
cdr.Prev[0]++;
ReadTrack(tmpp);
cdr.Prev[0]++;
ReadTrack(tmpp);