diff --git a/BizHawk.Emulation.Cores/Calculator/TI83.cs b/BizHawk.Emulation.Cores/Calculator/TI83.cs index a91bc2af6b..cbd23e1e28 100644 --- a/BizHawk.Emulation.Cores/Calculator/TI83.cs +++ b/BizHawk.Emulation.Cores/Calculator/TI83.cs @@ -1049,7 +1049,77 @@ namespace BizHawk.Emulation.Cores.Calculators public void SetCpuRegister(string register, int value) { - throw new NotImplementedException(); + switch (register) + { + default: + throw new InvalidOperationException(); + case "A": + cpu.RegisterA = (byte)value; + break; + case "AF": + cpu.RegisterAF = (byte)value; + break; + case "B": + cpu.RegisterB = (byte)value; + break; + case "BC": + cpu.RegisterBC = (byte)value; + break; + case "C": + cpu.RegisterC = (byte)value; + break; + case "D": + cpu.RegisterD = (byte)value; + break; + case "DE": + cpu.RegisterDE = (byte)value; + break; + case "E": + cpu.RegisterE = (byte)value; + break; + case "F": + cpu.RegisterF = (byte)value; + break; + case "H": + cpu.RegisterH = (byte)value; + break; + case "HL": + cpu.RegisterHL = (byte)value; + break; + case "I": + cpu.RegisterI = (byte)value; + break; + case "IX": + cpu.RegisterIX = (byte)value; + break; + case "IY": + cpu.RegisterIY = (byte)value; + break; + case "L": + cpu.RegisterL = (byte)value; + break; + case "PC": + cpu.RegisterPC = (ushort)value; + break; + case "R": + cpu.RegisterR = (byte)value; + break; + case "Shadow AF": + cpu.RegisterShadowAF = (byte)value; + break; + case "Shadow BC": + cpu.RegisterShadowBC = (byte)value; + break; + case "Shadow DE": + cpu.RegisterShadowDE = (byte)value; + break; + case "Shadow HL": + cpu.RegisterShadowHL = (byte)value; + break; + case "SP": + cpu.RegisterSP = (byte)value; + break; + } } } } \ No newline at end of file diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs index 666c92abe1..4aa03d21ae 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Core.cs @@ -123,7 +123,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64 board.cpu.S = (byte)value; break; case "PC": - board.cpu.PC = (byte)value; + board.cpu.PC = (ushort)value; break; } } diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs index 5521e72f69..e93ba91d49 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.cs @@ -141,7 +141,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64 //Console.WriteLine("CPUPC: " + C64Util.ToHex(board.cpu.PC, 4) + " 1541PC: " + C64Util.ToHex(disk.PC, 4)); - int test = board.cpu.LagCycles; + int test = board.cpu.LagCycles; CoreComm.DriveLED = DriveLED; } diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs index 0291938fc5..ea37d5104c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Atari2600.cs @@ -212,7 +212,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 Cpu.S = (byte)value; break; case "PC": - Cpu.PC = (byte)value; + Cpu.PC = (ushort)value; break; case "Flag I": Cpu.FlagI = value > 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.Core.cs b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.Core.cs index 6f5aec8ed9..28a6c87e83 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.Core.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.Core.cs @@ -49,7 +49,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800 theMachine.CPU.P = (byte)value; break; case "PC": - theMachine.CPU.PC = (byte)value; + theMachine.CPU.PC = (ushort)value; break; case "S": theMachine.CPU.S = (byte)value; diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs index 30e92e344e..4788fe9a17 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs @@ -296,7 +296,77 @@ namespace BizHawk.Emulation.Cores.ColecoVision public void SetCpuRegister(string register, int value) { - throw new NotImplementedException(); + switch (register) + { + default: + throw new InvalidOperationException(); + case "A": + Cpu.RegisterA = (byte)value; + break; + case "AF": + Cpu.RegisterAF = (byte)value; + break; + case "B": + Cpu.RegisterB = (byte)value; + break; + case "BC": + Cpu.RegisterBC = (byte)value; + break; + case "C": + Cpu.RegisterC = (byte)value; + break; + case "D": + Cpu.RegisterD = (byte)value; + break; + case "DE": + Cpu.RegisterDE = (byte)value; + break; + case "E": + Cpu.RegisterE = (byte)value; + break; + case "F": + Cpu.RegisterF = (byte)value; + break; + case "H": + Cpu.RegisterH = (byte)value; + break; + case "HL": + Cpu.RegisterHL = (byte)value; + break; + case "I": + Cpu.RegisterI = (byte)value; + break; + case "IX": + Cpu.RegisterIX = (byte)value; + break; + case "IY": + Cpu.RegisterIY = (byte)value; + break; + case "L": + Cpu.RegisterL = (byte)value; + break; + case "PC": + Cpu.RegisterPC = (ushort)value; + break; + case "R": + Cpu.RegisterR = (byte)value; + break; + case "Shadow AF": + Cpu.RegisterShadowAF = (byte)value; + break; + case "Shadow BC": + Cpu.RegisterShadowBC = (byte)value; + break; + case "Shadow DE": + Cpu.RegisterShadowDE = (byte)value; + break; + case "Shadow HL": + Cpu.RegisterShadowHL = (byte)value; + break; + case "SP": + Cpu.RegisterSP = (byte)value; + break; + } } } } \ No newline at end of file diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs index f99a0a7c51..52246d92a8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs @@ -906,7 +906,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES cpu.S = (byte)value; break; case "PC": - cpu.PC = (byte)value; + cpu.PC = (ushort)value; break; case "Flag I": cpu.FlagI = value > 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs index 2869c3e760..780832a7c2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs @@ -512,7 +512,77 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem public void SetCpuRegister(string register, int value) { - throw new NotImplementedException(); + switch (register) + { + default: + throw new InvalidOperationException(); + case "A": + Cpu.RegisterA = (byte)value; + break; + case "AF": + Cpu.RegisterAF = (byte)value; + break; + case "B": + Cpu.RegisterB = (byte)value; + break; + case "BC": + Cpu.RegisterBC = (byte)value; + break; + case "C": + Cpu.RegisterC = (byte)value; + break; + case "D": + Cpu.RegisterD = (byte)value; + break; + case "DE": + Cpu.RegisterDE = (byte)value; + break; + case "E": + Cpu.RegisterE = (byte)value; + break; + case "F": + Cpu.RegisterF = (byte)value; + break; + case "H": + Cpu.RegisterH = (byte)value; + break; + case "HL": + Cpu.RegisterHL = (byte)value; + break; + case "I": + Cpu.RegisterI = (byte)value; + break; + case "IX": + Cpu.RegisterIX = (byte)value; + break; + case "IY": + Cpu.RegisterIY = (byte)value; + break; + case "L": + Cpu.RegisterL = (byte)value; + break; + case "PC": + Cpu.RegisterPC = (ushort)value; + break; + case "R": + Cpu.RegisterR = (byte)value; + break; + case "Shadow AF": + Cpu.RegisterShadowAF = (byte)value; + break; + case "Shadow BC": + Cpu.RegisterShadowBC = (byte)value; + break; + case "Shadow DE": + Cpu.RegisterShadowDE = (byte)value; + break; + case "Shadow HL": + Cpu.RegisterShadowHL = (byte)value; + break; + case "SP": + Cpu.RegisterSP = (byte)value; + break; + } } public void Dispose() { }