GBA.Unity/Assets/emulator/ProviderGba.cs

32 lines
765 B
C#
Raw Normal View History

2024-08-16 11:06:40 +08:00
using System.Text;
namespace OptimeGBA
{
public sealed class ProviderGba : Provider
{
public bool BootBios = false;
public byte[] Bios;
public byte[] Rom;
2024-08-16 14:51:15 +08:00
public string RomName;
2024-08-16 11:06:40 +08:00
public string RomId;
public ProviderGba(byte[] bios, byte[] rom, string savPath, AudioCallback audioCallback)
{
Bios = bios;
Rom = rom;
AudioCallback = audioCallback;
SavPath = savPath;
2024-08-16 14:51:15 +08:00
if (rom.Length > 0xA0 + 12)
{
RomName = Encoding.ASCII.GetString(Rom, 0xA0, 12);
}
2024-08-16 11:06:40 +08:00
if (rom.Length >= 0xAC + 4)
{
RomId = Encoding.ASCII.GetString(Rom, 0xAC, 4);
}
}
}
}