otherwise glitches happen if certain games are ran in a row.
cdr.CurTrack = 1;
cdr.File = 1;
cdr.Channel = 1;
+ memset(&stat, 0, sizeof(stat));
}
int cdrFreeze(gzFile f, int Mode) {
u32 chcr;
};
-struct {
+static struct {
u32 reg0;
u32 reg1;
u16 * rl;
}
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
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);
_psxRcntWcount( i, 0 );
}
+ hSyncCount = 0;
+ spuSyncCount = 0;
+
psxRcntSet();
}