-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIEmulator.cs
More file actions
32 lines (28 loc) · 848 Bytes
/
IEmulator.cs
File metadata and controls
32 lines (28 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
namespace ProcessorEmulator
{
public interface IEmulator
{
// Core emulation methods
void LoadBinary(byte[] binary, uint loadAddress);
void Run();
void Step();
// State access for debugging/display
uint ProgramCounter { get; set; }
uint StackPointer { get; set; }
int InstructionCount { get; }
uint CurrentInstruction { get; }
uint[] RegisterState { get; }
byte[] MemoryState { get; }
// Memory and device management
void MapMemory(uint address, byte[] data);
void RegisterDevice(IDeviceEmulator device);
}
public interface IDeviceEmulator
{
uint BaseAddress { get; }
uint Size { get; }
uint Read(uint address);
void Write(uint address, uint value);
}
}