notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aecb7f5
)
misc: allow slow-booting to cdda or whatever
author
notaz
<notasas@gmail.com>
Thu, 21 Mar 2024 22:52:37 +0000
(
00:52
+0200)
committer
notaz
<notasas@gmail.com>
Thu, 21 Mar 2024 22:53:41 +0000
(
00:53
+0200)
notaz/pcsx_rearmed#335
libpcsxcore/misc.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/misc.c
b/libpcsxcore/misc.c
index
0848c26
..
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