From 485432c1988ab203ca85cd122f03118dcc2d9f8d Mon Sep 17 00:00:00 2001 From: iCatButler Date: Thu, 30 Jun 2016 11:49:11 +0100 Subject: Initialise GTE and CPU regsiters (invalidate) --- libpcsxcore/pgxp_cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libpcsxcore/pgxp_cpu.c') diff --git a/libpcsxcore/pgxp_cpu.c b/libpcsxcore/pgxp_cpu.c index 17853afc..f2fff96e 100644 --- a/libpcsxcore/pgxp_cpu.c +++ b/libpcsxcore/pgxp_cpu.c @@ -20,6 +20,12 @@ PGXP_value* CP0_reg = CP0_reg_mem; #define rs(_instr) ((_instr >> 21) & 0x1F) // The rs part of the instruction register #define imm(_instr) (_instr & 0xFFFF) // The immediate part of the instruction register +void PGXP_InitCPU() +{ + memset(CPU_reg_mem, 0, sizeof(CPU_reg_mem)); + memset(CP0_reg_mem, 0, sizeof(CP0_reg_mem)); +} + // invalidate register (invalid 8 bit read) void InvalidLoad(u32 addr, u32 code, u32 value) { -- cgit v1.2.3