-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBcmInterruptController.cs
More file actions
37 lines (31 loc) · 1.03 KB
/
BcmInterruptController.cs
File metadata and controls
37 lines (31 loc) · 1.03 KB
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
33
34
35
36
37
using System;
namespace ProcessorEmulator.Emulation
{
public class BcmInterruptController : IBusDevice
{
public uint StartAddress { get; }
public uint Size => 0x1000; // Example size
public BcmInterruptController(uint startAddress)
{
StartAddress = startAddress;
}
public uint Read32(uint offset)
{
Console.WriteLine($"[Interrupt Controller Read] @ 0x{StartAddress + offset:X8}");
return 0;
}
public void Write32(uint offset, uint value)
{
Console.WriteLine($"[Interrupt Controller Write] @ 0x{StartAddress + offset:X8} = 0x{value:X8}");
}
public byte Read8(uint offset)
{
Console.WriteLine($"[Interrupt Controller Read B] @ 0x{StartAddress + offset:X8}");
return 0;
}
public void Write8(uint offset, byte value)
{
Console.WriteLine($"[Interrupt Controller Write B] @ 0x{StartAddress + offset:X8} = 0x{value:X2}");
}
}
}