aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpcsxcore/cdrom.c1
-rw-r--r--libpcsxcore/mdec.c9
-rw-r--r--libpcsxcore/psxbios.c11
-rw-r--r--libpcsxcore/psxcounters.c3
4 files changed, 19 insertions, 5 deletions
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c
index ae59a63..0e033db 100644
--- a/libpcsxcore/cdrom.c
+++ b/libpcsxcore/cdrom.c
@@ -1123,6 +1123,7 @@ void cdrReset() {
cdr.CurTrack = 1;
cdr.File = 1;
cdr.Channel = 1;
+ memset(&stat, 0, sizeof(stat));
}
int cdrFreeze(gzFile f, int Mode) {
diff --git a/libpcsxcore/mdec.c b/libpcsxcore/mdec.c
index 629816b..b25b961 100644
--- a/libpcsxcore/mdec.c
+++ b/libpcsxcore/mdec.c
@@ -219,7 +219,7 @@ struct _pending_dma1 {
u32 chcr;
};
-struct {
+static struct {
u32 reg0;
u32 reg1;
u16 * rl;
@@ -436,11 +436,10 @@ static void yuv2rgb24(int *blk, u8 *image) {
}
void mdecInit(void) {
+ memset(&mdec, 0, sizeof(mdec));
+ memset(iq_y, 0, sizeof(iq_y));
+ memset(iq_uv, 0, sizeof(iq_uv));
mdec.rl = (u16 *)&psxM[0x100000];
- mdec.reg0 = 0;
- mdec.reg1 = 0;
- mdec.pending_dma1.adr = 0;
- mdec.block_buffer_pos = 0;
}
// command register
diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c
index b135b52..005e1bb 100644
--- a/libpcsxcore/psxbios.c
+++ b/libpcsxcore/psxbios.c
@@ -2545,6 +2545,17 @@ void psxBiosInit() {
memset(Thread, 0, sizeof(Thread));
Thread[0].status = 2; // main thread
+ jmp_int = NULL;
+ pad_buf = NULL;
+ pad_buf1 = NULL;
+ pad_buf2 = NULL;
+ pad_buf1len = pad_buf2len = 0;
+ heap_addr = NULL;
+ heap_end = NULL;
+ CardState = -1;
+ CurThread = 0;
+ memset(FDesc, 0, sizeof(FDesc));
+
psxMu32ref(0x0150) = SWAPu32(0x160);
psxMu32ref(0x0154) = SWAPu32(0x320);
psxMu32ref(0x0160) = SWAPu32(0x248);
diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c
index ebfe629..c9f2931 100644
--- a/libpcsxcore/psxcounters.c
+++ b/libpcsxcore/psxcounters.c
@@ -461,6 +461,9 @@ void psxRcntInit()
_psxRcntWcount( i, 0 );
}
+ hSyncCount = 0;
+ spuSyncCount = 0;
+
psxRcntSet();
}