the idea here was to disable them to avoid drifting from pcsx-reloaded,
but there doesn't seems to be much need for syncing.
OBJS += libpcsxcore/gte_neon.o
endif
libpcsxcore/gte.o libpcsxcore/gte_nf.o: CFLAGS += -fno-strict-aliasing
OBJS += libpcsxcore/gte_neon.o
endif
libpcsxcore/gte.o libpcsxcore/gte_nf.o: CFLAGS += -fno-strict-aliasing
-libpcsxcore/cdrom.o libpcsxcore/misc.o: CFLAGS += -Wno-pointer-sign
-libpcsxcore/misc.o libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
+libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
# dynarec
ifeq "$(USE_DYNAREC)" "1"
# dynarec
ifeq "$(USE_DYNAREC)" "1"
static struct CdrStat stat;
static struct CdrStat stat;
-static unsigned int msf2sec(char *msf) {
+static unsigned int msf2sec(u8 *msf) {
return ((msf[0] * 60 + msf[1]) * 75) + msf[2];
}
return ((msf[0] * 60 + msf[1]) * 75) + msf[2];
}
-static void sec2msf(unsigned int s, char *msf) {
+static void sec2msf(unsigned int s, u8 *msf) {
msf[0] = s / 75 / 60;
s = s - msf[0] * 75 * 60;
msf[1] = s / 75;
msf[0] = s / 75 / 60;
s = s - msf[0] * 75 * 60;
msf[1] = s / 75;
}
void cdrWrite1(unsigned char rt) {
}
void cdrWrite1(unsigned char rt) {
#define READTRACK() \
if (CDR_readTrack(time) == -1) return -1; \
#define READTRACK() \
if (CDR_readTrack(time) == -1) return -1; \
- buf = CDR_getBuffer(); \
- if (buf == NULL) return -1; else CheckPPFCache(buf, time[0], time[1], time[2]);
+ buf = (void *)CDR_getBuffer(); \
+ if (buf == NULL) return -1; \
+ else CheckPPFCache((u8 *)buf, time[0], time[1], time[2]);
#define READDIR(_dir) \
READTRACK(); \
#define READDIR(_dir) \
READTRACK(); \
READTRACK(); \
memcpy(_dir + 2048, buf + 12, 2048);
READTRACK(); \
memcpy(_dir + 2048, buf + 12, 2048);
-int GetCdromFile(u8 *mdir, u8 *time, s8 *filename) {
+int GetCdromFile(u8 *mdir, u8 *time, char *filename) {
struct iso_directory_record *dir;
struct iso_directory_record *dir;
struct iso_directory_record *dir;
u8 time[4], *buf;
u8 mdir[4096];
struct iso_directory_record *dir;
u8 time[4], *buf;
u8 mdir[4096];
// not the best place to do it, but since BIOS boot logo killer
// is just below, do it here
// not the best place to do it, but since BIOS boot logo killer
// is just below, do it here
if (GetCdromFile(mdir, time, exename) == -1) {
sscanf((char *)buf + 12, "BOOT = cdrom:%256s", exename);
if (GetCdromFile(mdir, time, exename) == -1) {
if (GetCdromFile(mdir, time, exename) == -1) {
sscanf((char *)buf + 12, "BOOT = cdrom:%256s", exename);
if (GetCdromFile(mdir, time, exename) == -1) {
- char *ptr = strstr(buf + 12, "cdrom:");
+ char *ptr = strstr((char *)buf + 12, "cdrom:");
if (ptr != NULL) {
ptr += 6;
while (*ptr == '\\' || *ptr == '/') ptr++;
if (ptr != NULL) {
ptr += 6;
while (*ptr == '\\' || *ptr == '/') ptr++;
int LoadCdromFile(const char *filename, EXE_HEADER *head) {
struct iso_directory_record *dir;
u8 time[4],*buf;
int LoadCdromFile(const char *filename, EXE_HEADER *head) {
struct iso_directory_record *dir;
u8 time[4],*buf;
- u8 mdir[4096], exename[256];
+ u8 mdir[4096];
+ char exename[256];
sscanf(filename, "cdrom:\\%256s", exename);
sscanf(filename, "cdrom:\\%256s", exename);
- memcpy((void *)PSXM(addr), buf + 12, 2048);
+ mem = PSXM(addr);
+ if (mem)
+ memcpy(mem, buf + 12, 2048);
size -= 2048;
addr += 2048;
size -= 2048;
addr += 2048;
int CheckCdrom() {
struct iso_directory_record *dir;
int CheckCdrom() {
struct iso_directory_record *dir;
- unsigned char time[4], *buf;
+ unsigned char time[4];
+ char *buf;
unsigned char mdir[4096];
char exename[256];
int i, c;
unsigned char mdir[4096];
char exename[256];
int i, c;
if (GetCdromFile(mdir, time, "SYSTEM.CNF;1") != -1) {
READTRACK();
if (GetCdromFile(mdir, time, "SYSTEM.CNF;1") != -1) {
READTRACK();
- sscanf((char *)buf + 12, "BOOT = cdrom:\\%256s", exename);
+ sscanf(buf + 12, "BOOT = cdrom:\\%256s", exename);
if (GetCdromFile(mdir, time, exename) == -1) {
if (GetCdromFile(mdir, time, exename) == -1) {
- sscanf((char *)buf + 12, "BOOT = cdrom:%256s", exename);
+ sscanf(buf + 12, "BOOT = cdrom:%256s", exename);
if (GetCdromFile(mdir, time, exename) == -1) {
char *ptr = strstr(buf + 12, "cdrom:"); // possibly the executable is in some subdir
if (ptr != NULL) {
if (GetCdromFile(mdir, time, exename) == -1) {
char *ptr = strstr(buf + 12, "cdrom:"); // possibly the executable is in some subdir
if (ptr != NULL) {