Intellivision - implement IDisassemblable

This commit is contained in:
adelikat 2017-04-23 12:21:42 -05:00
parent d03577ade6
commit 4b695e2820
4 changed files with 38 additions and 3 deletions

View File

@ -413,6 +413,9 @@
<Compile Include="Consoles\Intellivision\ICart.cs" />
<Compile Include="Consoles\Intellivision\Intellicart.cs" />
<Compile Include="Consoles\Intellivision\Intellivision.IDebuggable.cs">
<DependentUpon>Intellivision.cs</DependentUpon>
</Compile>
<Compile Include="Consoles\Intellivision\Intellivision.IDisassemblable.cs">
<DependentUpon>Intellivision.cs</DependentUpon>
</Compile>
<Compile Include="Consoles\Intellivision\Intellivision.IInputPollable.cs">

View File

@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
["R4"] = _cpu.Register[4],
["R5"] = _cpu.Register[5],
["R6"] = _cpu.Register[6],
["R7"] = _cpu.Register[7],
["PC"] = _cpu.Register[7],
["FlagS"] = _cpu.FlagS ? 1 : 0,
["FlagC"] = _cpu.FlagC ? 1 : 0,
@ -57,7 +57,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
case "R6":
_cpu.Register[6] = (ushort)value;
break;
case "R7":
case "PC":
_cpu.Register[7] = (ushort)value;
break;

View File

@ -0,0 +1,32 @@
using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Intellivision
{
public partial class Intellivision : IDisassemblable
{
public string Cpu
{
get { return "CP1610"; }
set { }
}
public string PCRegisterName
{
get { return "PC"; }
}
public IEnumerable<string> AvailableCpus
{
get { yield return "CP1610"; }
}
public string Disassemble(MemoryDomain m, uint addr, out int length)
{
// Note: currently this core can only disassemble the SystemBus
// The CP1610 disassembler would need some refactoring to support anything else
string ret = _cpu.Disassemble((ushort)addr, out length);
return ret;
}
}
}

View File

@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Intellivision
isReleased: true
)]
[ServiceNotApplicable(typeof(ISaveRam), typeof(IDriveLight), typeof(IRegionable))]
public sealed partial class Intellivision : IEmulator, IStatable, IInputPollable,
public sealed partial class Intellivision : IEmulator, IStatable, IInputPollable, IDisassemblable,
IDebuggable, ISettable<Intellivision.IntvSettings, Intellivision.IntvSyncSettings>
{
[CoreConstructor("INTV")]