Fix CpuCoreGenerator project - generate new stuff in HuC6280, fix namespaces and file paths, comment out 6502, we don't use that one anymore.

This commit is contained in:
adelikat 2013-11-14 21:42:29 +00:00
parent 715fd3a7e3
commit 1c27cc0b66
3 changed files with 16 additions and 12 deletions

View File

@ -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<string> 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.");

View File

@ -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(" {");

View File

@ -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");
}
}