AxibugEmuOnline/AxibugEmuOnline.Client/Assets/VirtualNes.Core/ApuEX/APU_MMC5.cs

60 lines
1.4 KiB
C#
Raw Normal View History

2024-07-26 17:52:33 +08:00
using System;
namespace VirtualNes.Core
{
public class APU_MMC5 : APU_INTERFACE
{
2024-08-05 11:52:43 +08:00
SYNCRECTANGLE sch0 = new SYNCRECTANGLE();
SYNCRECTANGLE sch1 = new SYNCRECTANGLE();
2024-07-26 17:52:33 +08:00
public override void Reset(float fClock, int nRate)
{
2024-07-30 11:57:09 +08:00
//todo : 实现
2024-07-26 17:52:33 +08:00
}
public override void Setup(float fClock, int nRate)
{
2024-07-30 11:57:09 +08:00
//todo : 实现
2024-07-26 17:52:33 +08:00
}
public override void Write(ushort addr, byte data)
{
2024-07-30 11:57:09 +08:00
//todo : 实现
2024-07-26 17:52:33 +08:00
}
public override int Process(int channel)
{
2024-07-30 11:57:09 +08:00
//todo : 实现
return 0;
2024-07-26 17:52:33 +08:00
}
internal void SyncWrite(ushort addr, byte data)
{
2024-07-30 11:57:09 +08:00
//todo : 实现
2024-07-26 17:52:33 +08:00
}
2024-08-05 11:52:43 +08:00
internal byte SyncRead(ushort addr)
{
byte data = 0;
if (addr == 0x5015)
{
if ((sch0.enable != 0) && sch0.vbl_length > 0) data |= (1 << 0);
if ((sch1.enable != 0) && sch1.vbl_length > 0) data |= (1 << 1);
}
return data;
}
public class SYNCRECTANGLE
{
// For sync
public byte[] reg = new byte[4];
public byte enable;
public byte holdnote;
public byte[] dummy = new byte[2];
public int vbl_length;
}
2024-07-26 17:52:33 +08:00
}
}