AxibugEmuOnline/AxibugEmuOnline.Client/Assets/VirtualNes.Core/State/MMCSTAT.cs

28 lines
592 B
C#
Raw Normal View History

2024-08-29 17:20:01 +08:00
namespace VirtualNes.Core
{
public struct MMCSTAT : IStateBufferObject
{
public byte[] mmcdata;
public static MMCSTAT GetDefault()
{
return new MMCSTAT() { mmcdata = new byte[256] };
}
2024-09-13 17:39:48 +08:00
public readonly uint GetSize()
2024-08-29 17:20:01 +08:00
{
2024-09-13 17:39:48 +08:00
return 256;
2024-08-29 17:20:01 +08:00
}
2024-09-13 17:39:48 +08:00
public readonly void SaveState(StateBuffer buffer)
2024-08-29 17:20:01 +08:00
{
buffer.Write(mmcdata);
}
2024-09-13 17:39:48 +08:00
public void LoadState(StateReader buffer)
{
mmcdata = buffer.Read_bytes(256);
}
2024-08-29 17:20:01 +08:00
}
}