pasky better do something cool with this to warrant janking up my HuC6280 core

This commit is contained in:
beirich 2014-02-08 20:18:36 +00:00
parent 8b006b3b59
commit 2dc01eab33
5 changed files with 11 additions and 5 deletions

View File

@ -59,6 +59,7 @@ namespace BizHawk.Emulation.Cores.Components.H6280
LagIFlag = FlagI; LagIFlag = FlagI;
if (Debug) Logger(State()); if (Debug) Logger(State());
CoreComm.MemoryCallbackSystem.CallExecute(PC);
byte opcode = ReadMemory(PC++); byte opcode = ReadMemory(PC++);
switch (opcode) switch (opcode)

View File

@ -3,14 +3,16 @@ using System.Globalization;
using System.IO; using System.IO;
using BizHawk.Common; using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Components.H6280 namespace BizHawk.Emulation.Cores.Components.H6280
{ {
public sealed partial class HuC6280 public sealed partial class HuC6280
{ {
public HuC6280() public HuC6280(CoreComm comm)
{ {
Reset(); Reset();
CoreComm = comm;
} }
public void Reset() public void Reset()
@ -347,6 +349,8 @@ namespace BizHawk.Emulation.Cores.Components.H6280
public Action<int, byte> WriteVDC; public Action<int, byte> WriteVDC;
public Action<int> ThinkAction = delegate { }; public Action<int> ThinkAction = delegate { };
public CoreComm CoreComm;
public byte ReadMemory(ushort address) public byte ReadMemory(ushort address)
{ {
byte page = MPR[address >> 13]; byte page = MPR[address >> 13];

View File

@ -93,7 +93,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
void Init(GameInfo game, byte[] rom) void Init(GameInfo game, byte[] rom)
{ {
Controller = NullController.GetNullController(); Controller = NullController.GetNullController();
Cpu = new HuC6280(); Cpu = new HuC6280(CoreComm);
VCE = new VCE(); VCE = new VCE();
VDC1 = new VDC(this, Cpu, VCE); VDC1 = new VDC(this, Cpu, VCE);
PSG = new HuC6280PSG(); PSG = new HuC6280PSG();

View File

@ -27,9 +27,9 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
VdpCommand vdpCommand; VdpCommand vdpCommand;
int TmsMode = 4; int TmsMode = 4;
bool VIntPending; // FIXME put in savestate bool VIntPending;
bool HIntPending; // FIXME put in savestate bool HIntPending;
int lineIntLinesRemaining; // FIXME put in savestate int lineIntLinesRemaining;
SMS Sms; SMS Sms;
VdpMode mode; VdpMode mode;

View File

@ -494,6 +494,7 @@ namespace HuC6280
w.WriteLine(" LagIFlag = FlagI;"); w.WriteLine(" LagIFlag = FlagI;");
w.WriteLine(); w.WriteLine();
w.WriteLine(" if (Debug) Logger(State());"); w.WriteLine(" if (Debug) Logger(State());");
w.WriteLine(" CoreComm.MemoryCallbackSystem.CallExecute(PC);");
w.WriteLine(); w.WriteLine();
w.WriteLine(" byte opcode = ReadMemory(PC++);"); w.WriteLine(" byte opcode = ReadMemory(PC++);");
w.WriteLine(" switch (opcode)"); w.WriteLine(" switch (opcode)");