-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlatformManager.cs
More file actions
31 lines (29 loc) · 1.14 KB
/
PlatformManager.cs
File metadata and controls
31 lines (29 loc) · 1.14 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
namespace ProcessorEmulator.Emulation
{
public static class PlatformFactory
{
public static void ApplyConfiguration(string platform, MipsBus bus, CP0 cp0)
{
switch (platform.ToLower())
{
case "u-verse":
bus.IsBigEndian = true;
cp0.PRId = 0x0002A000; // BCM7405
bus.AddDevice(new RamDevice(0x00000000, 128 * 1024 * 1024)); // 128MB RAM
bus.AddDevice(new BcmUart(0x10400000)); // Standard BCM UART
bus.AddDevice(new BcmInterruptController(0x10000000));
break;
case "iguide":
bus.IsBigEndian = true;
cp0.PRId = 0x00020000; // BCM7401
bus.AddDevice(new NvRamDevice(0x1FD00000, 0x10000));
bus.AddDevice(new BcmUart(0xfffe0000)); // Different offset for older chips
break;
case "wince_generic":
bus.IsBigEndian = false;
cp0.PRId = 0x00018000; // Generic 4Kc
break;
}
}
}
}