TI83 - add a system bus memory domains and support disassembling. You can now debug your math homework!

This commit is contained in:
adelikat 2015-01-21 23:25:49 +00:00
parent aff2e9544e
commit 4a968ab700
2 changed files with 20 additions and 1 deletions

View File

@ -1,4 +1,6 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Calculators
@ -12,6 +14,22 @@ namespace BizHawk.Emulation.Cores.Calculators
MemoryDomain.FromByteArray("Main RAM", MemoryDomain.Endian.Little, ram)
};
var systemBusDomain = new MemoryDomain("System Bus", 0x10000, MemoryDomain.Endian.Little,
(addr) =>
{
if (addr < 0 || addr >= 65536)
throw new ArgumentOutOfRangeException();
return cpu.ReadMemory((ushort)addr);
},
(addr, value) =>
{
if (addr < 0 || addr >= 65536)
throw new ArgumentOutOfRangeException();
cpu.WriteMemory((ushort)addr, value);
});
domains.Add(systemBusDomain);
_memoryDomains = new MemoryDomainList(domains);
(ServiceProvider as BasicServiceProvider).Register<IMemoryDomains>(_memoryDomains);
}

View File

@ -78,6 +78,7 @@ namespace BizHawk.Emulation.Cores.Calculators
HardReset();
SetupMemoryDomains();
(ServiceProvider as BasicServiceProvider).Register<IVideoProvider>(new MyVideoProvider(this));
(ServiceProvider as BasicServiceProvider).Register<IDisassemblable>(new Disassembler());
}
public IEmulatorServiceProvider ServiceProvider { get; private set; }