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
gpulib: fix frameskip on weird lists
[pcsx_rearmed.git]
/
libpcsxcore
/
misc.c
diff --git
a/libpcsxcore/misc.c
b/libpcsxcore/misc.c
index
e652cc4
..
889639d
100644
(file)
--- a/
libpcsxcore/misc.c
+++ b/
libpcsxcore/misc.c
@@
-362,6
+362,7
@@
int LoadCdromFile(const char *filename, EXE_HEADER *head, u8 *time_bcd_out) {
int CheckCdrom() {
struct iso_directory_record *dir;
int CheckCdrom() {
struct iso_directory_record *dir;
+ struct CdrStat stat = { 0, 0, };
unsigned char time[4];
char *buf;
unsigned char mdir[4096];
unsigned char time[4];
char *buf;
unsigned char mdir[4096];
@@
-369,17
+370,22
@@
int CheckCdrom() {
int i, len, c;
FreePPFCache();
int i, len, c;
FreePPFCache();
+ memset(CdromLabel, 0, sizeof(CdromLabel));
+ memset(CdromId, 0, sizeof(CdromId));
+ memset(exename, 0, sizeof(exename));
time[0] = itob(0);
time[1] = itob(2);
time[2] = itob(0x10);
time[0] = itob(0);
time[1] = itob(2);
time[2] = itob(0x10);
+ if (!Config.HLE && Config.SlowBoot) {
+ // boot to BIOS in case of CDDA ir lid open
+ CDR_getStatus(&stat);
+ if ((stat.Status & 0x10) || stat.Type == 2 || !CDR_readTrack(time))
+ return 0;
+ }
READTRACK();
READTRACK();
- memset(CdromLabel, 0, sizeof(CdromLabel));
- memset(CdromId, 0, sizeof(CdromId));
- memset(exename, 0, sizeof(exename));
-
strncpy(CdromLabel, buf + 52, 32);
// skip head and sub, and go to the root directory record
strncpy(CdromLabel, buf + 52, 32);
// skip head and sub, and go to the root directory record
@@
-677,6
+683,10
@@
int SaveState(const char *file) {
assert(!psxRegs.branching);
assert(!psxRegs.cpuInRecursion);
assert(!misc->magic);
assert(!psxRegs.branching);
assert(!psxRegs.cpuInRecursion);
assert(!misc->magic);
+
+ f = SaveFuncs.open(file, "wb");
+ if (f == NULL) return -1;
+
misc->magic = MISC_MAGIC;
misc->gteBusyCycle = psxRegs.gteBusyCycle;
misc->muldivBusyCycle = psxRegs.muldivBusyCycle;
misc->magic = MISC_MAGIC;
misc->gteBusyCycle = psxRegs.gteBusyCycle;
misc->muldivBusyCycle = psxRegs.muldivBusyCycle;
@@
-687,9
+697,6
@@
int SaveState(const char *file) {
misc->frame_counter = frame_counter;
misc->CdromFrontendId = CdromFrontendId;
misc->frame_counter = frame_counter;
misc->CdromFrontendId = CdromFrontendId;
- f = SaveFuncs.open(file, "wb");
- if (f == NULL) return -1;
-
psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, NULL);
SaveFuncs.write(f, (void *)PcsxHeader, 32);
psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, NULL);
SaveFuncs.write(f, (void *)PcsxHeader, 32);