From 1c27cc0b66133cb2f81abf9cae62a373120b3e3f Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 14 Nov 2013 21:42:29 +0000 Subject: [PATCH] Fix CpuCoreGenerator project - generate new stuff in HuC6280, fix namespaces and file paths, comment out 6502, we don't use that one anymore. --- CpuCoreGenerator/HuC6280/CoreGenerator.cs | 11 +++++++---- CpuCoreGenerator/MOS 6502/CoreGenerator.cs | 4 ++-- CpuCoreGenerator/Program.cs | 13 +++++++------ 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CpuCoreGenerator/HuC6280/CoreGenerator.cs b/CpuCoreGenerator/HuC6280/CoreGenerator.cs index ddc77d7a7d..8a630a9a82 100644 --- a/CpuCoreGenerator/HuC6280/CoreGenerator.cs +++ b/CpuCoreGenerator/HuC6280/CoreGenerator.cs @@ -434,15 +434,17 @@ namespace HuC6280 { var w = new StreamWriter(file, false); w.WriteLine("using System;"); - w.WriteLine("using BizHawk.Emulation.Consoles.TurboGrafx;"); w.WriteLine(); w.WriteLine("// Do not modify this file directly! This is GENERATED code."); w.WriteLine("// Please open the CpuCoreGenerator solution and make your modifications there."); w.WriteLine(); - w.WriteLine("namespace BizHawk.Emulation.CPUs.H6280"); + w.WriteLine("namespace BizHawk.Emulation.Common.Components.H6280"); w.WriteLine("{"); w.WriteLine(" public partial class HuC6280"); w.WriteLine(" {"); + w.WriteLine(" public bool Debug;"); + w.WriteLine(" public Action Logger;"); + w.WriteLine(); w.WriteLine(" public void Execute(int cycles)"); w.WriteLine(" {"); w.WriteLine(" sbyte rel8;"); @@ -491,7 +493,8 @@ namespace HuC6280 w.WriteLine(" IRQControlByte = IRQNextControlByte;"); w.WriteLine(" LagIFlag = FlagI;"); w.WriteLine(); - + w.WriteLine(" if (Debug) Logger(State());"); + w.WriteLine(); w.WriteLine(" byte opcode = ReadMemory(PC++);"); w.WriteLine(" switch (opcode)"); w.WriteLine(" {"); @@ -749,7 +752,7 @@ namespace HuC6280 public void GenerateDisassembler(string file) { var w = new StreamWriter(file, false); - w.WriteLine("namespace BizHawk.Emulation.CPUs.H6280"); + w.WriteLine("namespace BizHawk.Emulation.Common.Components.H6280"); w.WriteLine(); w.WriteLine("// Do not modify this file directly! This is GENERATED code."); w.WriteLine("// Please open the CpuCoreGenerator solution and make your modifications there."); diff --git a/CpuCoreGenerator/MOS 6502/CoreGenerator.cs b/CpuCoreGenerator/MOS 6502/CoreGenerator.cs index 2f4ce4c55d..ca34184699 100644 --- a/CpuCoreGenerator/MOS 6502/CoreGenerator.cs +++ b/CpuCoreGenerator/MOS 6502/CoreGenerator.cs @@ -357,7 +357,7 @@ namespace M6502 w.WriteLine("// Do not modify this file directly! This is GENERATED code."); w.WriteLine("// Please open the CpuCoreGenerator solution and make your modifications there."); w.WriteLine(); - w.WriteLine("namespace BizHawk.Emulation.CPUs.M6502"); + w.WriteLine("namespace BizHawk.Emulation.Common.Components.M6502"); w.WriteLine("{"); w.WriteLine(" public partial class MOS6502"); w.WriteLine(" {"); @@ -603,7 +603,7 @@ namespace M6502 w.WriteLine("// Do not modify this file directly! This is GENERATED code."); w.WriteLine("// Please open the CpuCoreGenerator solution and make your modifications there."); w.WriteLine(); - w.WriteLine("namespace BizHawk.Emulation.CPUs.M6502"); + w.WriteLine("namespace BizHawk.Emulation.Common.Components.M6502"); w.WriteLine("{"); w.WriteLine(" public partial class MOS6502"); w.WriteLine(" {"); diff --git a/CpuCoreGenerator/Program.cs b/CpuCoreGenerator/Program.cs index 8d95b3b855..83a647c7ae 100644 --- a/CpuCoreGenerator/Program.cs +++ b/CpuCoreGenerator/Program.cs @@ -2,14 +2,15 @@ { static void Main() { - var x = new M6502.CoreGenerator(); - x.InitOpcodeTable(); - x.GenerateDisassembler("../../../BizHawk.Emulation/CPUs/MOS 6502/Disassembler.cs"); - x.GenerateExecutor("../../../BizHawk.Emulation/CPUs/MOS 6502/Execute.cs"); + //We don't currently use this anymore + //var x = new M6502.CoreGenerator(); + //x.InitOpcodeTable(); + //x.GenerateDisassembler("../../../BizHawk.Emulation.Common/CPUs/MOS 6502X/Disassembler.cs"); + //x.GenerateExecutor("../../../BizHawk.Emulation.Common/CPUs/MOS 6502X/Execute.cs"); var y = new HuC6280.CoreGenerator(); y.InitOpcodeTable(); - y.GenerateDisassembler("../../../BizHawk.Emulation/CPUs/HuC6280/Disassembler.cs"); - y.GenerateExecutor("../../../BizHawk.Emulation/CPUs/HuC6280/Execute.cs"); + y.GenerateDisassembler("../../../BizHawk.Emulation.Common/CPUs/HuC6280/Disassembler.cs"); + y.GenerateExecutor("../../../BizHawk.Emulation.Common/CPUs/HuC6280/Execute.cs"); } }