TI83 - add a system bus memory domains and support disassembling. You can now debug your math homework!
This commit is contained in:
parent
aff2e9544e
commit
4a968ab700
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue