PI registers.
parent
2ebfa53387
commit
20c2b5ab78
|
@ -19,8 +19,8 @@ namespace DotN64.MI
|
|||
ClearRDRAMRegSection = BitVector32.CreateSection(1, ClearDPInterruptSection),
|
||||
SetRDRAMRegModeSection = BitVector32.CreateSection(1, ClearRDRAMRegSection);
|
||||
private static readonly BitVector32.Section initModeSection = BitVector32.CreateSection(1, InitLengthSection),
|
||||
ebusTestModeSection = BitVector32.CreateSection(1, initModeSection),
|
||||
rdramRegModeSection = BitVector32.CreateSection(1, ebusTestModeSection);
|
||||
eBusTestModeSection = BitVector32.CreateSection(1, initModeSection),
|
||||
rdramRegModeSection = BitVector32.CreateSection(1, eBusTestModeSection);
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
@ -36,10 +36,10 @@ namespace DotN64.MI
|
|||
set => bits[initModeSection] = Convert.ToInt32(value);
|
||||
}
|
||||
|
||||
public bool EbusTestMode
|
||||
public bool EBusTestMode
|
||||
{
|
||||
get => Convert.ToBoolean(bits[ebusTestModeSection]);
|
||||
set => bits[ebusTestModeSection] = Convert.ToInt32(value);
|
||||
get => Convert.ToBoolean(bits[eBusTestModeSection]);
|
||||
set => bits[eBusTestModeSection] = Convert.ToInt32(value);
|
||||
}
|
||||
|
||||
public bool RDRAMRegMode
|
||||
|
|
|
@ -33,8 +33,8 @@ namespace DotN64.MI
|
|||
mode.InitMode &= bits[InitModeRegister.ClearInitModeSection] == 0;
|
||||
mode.InitMode |= bits[InitModeRegister.SetInitModeSection] != 0;
|
||||
|
||||
mode.EbusTestMode &= bits[InitModeRegister.ClearEbusTestModeSection] == 0;
|
||||
mode.EbusTestMode |= bits[InitModeRegister.SetEbusTestModeSection] != 0;
|
||||
mode.EBusTestMode &= bits[InitModeRegister.ClearEbusTestModeSection] == 0;
|
||||
mode.EBusTestMode |= bits[InitModeRegister.SetEbusTestModeSection] != 0;
|
||||
|
||||
if (bits[InitModeRegister.ClearDPInterruptSection] != 0)
|
||||
throw new NotImplementedException("Clear DP interrupt.");
|
||||
|
|
|
@ -27,6 +27,21 @@ namespace DotN64.PI
|
|||
new Domain(),
|
||||
new Domain()
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Starting RDRAM address.
|
||||
/// </summary>
|
||||
public uint DRAMAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Starting AD16 address.
|
||||
/// </summary>
|
||||
public uint PBusAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Write data length.
|
||||
/// </summary>
|
||||
public uint WriteLength { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
@ -82,6 +97,18 @@ namespace DotN64.PI
|
|||
new MappingEntry(0x04600020, 0x04600023) // PI dom1 release.
|
||||
{
|
||||
Write = (o, v) => Domains[0].Release = (byte)v
|
||||
},
|
||||
new MappingEntry(0x04600000, 0x04600003) // PI DRAM address.
|
||||
{
|
||||
Write = (o, v) => DRAMAddress = v & ((1 << 24) - 1)
|
||||
},
|
||||
new MappingEntry(0x04600004, 0x04600007) // PI pbus (cartridge) address.
|
||||
{
|
||||
Write = (o, v) => PBusAddress = v
|
||||
},
|
||||
new MappingEntry(0x0460000C, 0x0460000F) // PI write length.
|
||||
{
|
||||
Write = (o, v) => WriteLength = v & ((1 << 24) - 1)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue