From 3ac053c33d8bfae6758d7d5011d2890a74ac3ca8 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Wed, 8 Mar 2017 12:19:31 -0500 Subject: [PATCH] Update 6502 reset --- BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs | 2 +- BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs b/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs index 9b9d67653f..9def223102 100644 --- a/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs +++ b/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs @@ -314,7 +314,7 @@ namespace BizHawk.Emulation.Cores.Components.M6502 //the interrupt would then take place if necessary, using a cached PC. but im not so sure about that. /*VOP_NMI*/ new Uop[] { Uop.FetchDummy, Uop.FetchDummy, Uop.PushPCH, Uop.PushPCL, Uop.PushP_NMI, Uop.FetchPCLVector, Uop.FetchPCHVector, Uop.End_SuppressInterrupt }, /*VOP_IRQ*/ new Uop[] { Uop.FetchDummy, Uop.FetchDummy, Uop.PushPCH, Uop.PushPCL, Uop.PushP_IRQ, Uop.FetchPCLVector, Uop.FetchPCHVector, Uop.End_SuppressInterrupt }, - /*VOP_RESET*/ new Uop[] { Uop.FetchDummy, Uop.FetchDummy, Uop.PushDummy, Uop.PushDummy, Uop.PushP_Reset, Uop.FetchPCLVector, Uop.FetchPCHVector, Uop.End_SuppressInterrupt }, + /*VOP_RESET*/ new Uop[] { Uop.FetchDummy, Uop.FetchDummy, Uop.FetchDummy, Uop.PushDummy, Uop.PushDummy, Uop.PushP_Reset, Uop.FetchPCLVector, Uop.FetchPCHVector, Uop.End_SuppressInterrupt }, /*VOP_Fetch1_NoInterrupt*/ new Uop[] { Uop.Fetch1_Real }, }; diff --git a/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs b/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs index 92e68e25d2..4c1fd10aa7 100644 --- a/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs +++ b/BizHawk.Emulation.Cores/CPUs/MOS 6502X/MOS6502X.cs @@ -23,12 +23,12 @@ namespace BizHawk.Emulation.Cores.Components.M6502 A = 0; X = 0; Y = 0; - P = 0; + P = 0x20; // 5th bit always set S = 0; PC = 0; TotalExecutedCycles = 0; mi = 0; - opcode = 256; + opcode = VOP_RESET; iflag_pending = true; RDY = true; }