Name the interrupt pins.
parent
dcf1766d73
commit
af652e45b4
|
@ -104,6 +104,7 @@
|
|||
<Compile Include="VideoFrame.cs" />
|
||||
<Compile Include="Switch.cs" />
|
||||
<Compile Include="RCP\DP\RealityCoprocessor.DisplayProcessor.Angrylion.cs" />
|
||||
<Compile Include="RCP\MI\RealityCoprocessor.MIPSInterface.InterruptPins.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="CPU\" />
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
namespace DotN64.RCP
|
||||
{
|
||||
public partial class RealityCoprocessor
|
||||
{
|
||||
public partial class MIPSInterface
|
||||
{
|
||||
[System.Flags]
|
||||
public enum InterruptPins : byte
|
||||
{
|
||||
/// <summary>RCP interrupt asserted.</summary>
|
||||
RCP = 1 << 0,
|
||||
/// <summary>A peripherial has generated an interrupt.</summary>
|
||||
Cartridge = 1 << 1,
|
||||
/// <summary>User has pushed reset button on console.</summary>
|
||||
PreNMI = 1 << 2,
|
||||
/// <summary>Indy has read the value in the RDB port.</summary>
|
||||
RDBRead = 1 << 3,
|
||||
/// <summary>Indy has written a value to the RDB port.</summary>
|
||||
RDBWrite = 1 << 4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,10 +8,6 @@ namespace DotN64.RCP
|
|||
{
|
||||
public partial class MIPSInterface : Interface
|
||||
{
|
||||
#region Fields
|
||||
private const byte InterruptPin = 1 << 0;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
private VR4300 CPU => rcp.nintendo64.CPU;
|
||||
|
||||
|
@ -113,9 +109,9 @@ namespace DotN64.RCP
|
|||
private void UpdateInterrupt()
|
||||
{
|
||||
if ((Interrupt & InterruptMask) != 0)
|
||||
CPU.Int |= InterruptPin;
|
||||
CPU.Int |= (byte)InterruptPins.RCP;
|
||||
else
|
||||
CPU.Int &= unchecked((byte)~InterruptPin);
|
||||
CPU.Int &= (byte)~InterruptPins.RCP;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue