2018-07-07 18:52:51 +00:00
|
|
|
#pragma once
|
|
|
|
#include "Types.h"
|
|
|
|
|
|
|
|
enum class RomHeaderVersion;
|
|
|
|
|
|
|
|
struct NESHeader
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
Thing Archaic iNES NES 2.0
|
|
|
|
Byte 6 Mapper low nibble, Mirroring, Battery/Trainer flags
|
|
|
|
Byte 7 Unused Mapper high nibble, Vs. Mapper high nibble, NES 2.0 signature, PlayChoice, Vs.
|
|
|
|
Byte 8 Unused Total PRG RAM size (linear) Mapper highest nibble, mapper variant
|
|
|
|
Byte 9 Unused TV system Upper bits of ROM size
|
|
|
|
Byte 10 Unused Unused PRG RAM size (logarithmic; battery and non-battery)
|
|
|
|
Byte 11 Unused Unused VRAM size (logarithmic; battery and non-battery)
|
|
|
|
Byte 12 Unused Unused TV system
|
|
|
|
Byte 13 Unused Unused Vs. PPU variant
|
|
|
|
*/
|
|
|
|
char NES[4];
|
|
|
|
uint8_t PrgCount;
|
|
|
|
uint8_t ChrCount;
|
|
|
|
uint8_t Byte6;
|
|
|
|
uint8_t Byte7;
|
|
|
|
uint8_t Byte8;
|
|
|
|
uint8_t Byte9;
|
|
|
|
uint8_t Byte10;
|
|
|
|
uint8_t Byte11;
|
|
|
|
uint8_t Byte12;
|
|
|
|
uint8_t Byte13;
|
2018-07-07 21:30:13 +00:00
|
|
|
uint8_t Byte14;
|
|
|
|
uint8_t Byte15;
|
2018-07-07 18:52:51 +00:00
|
|
|
|
|
|
|
uint16_t GetMapperID();
|
|
|
|
bool HasBattery();
|
|
|
|
bool HasTrainer();
|
|
|
|
GameSystem GetNesGameSystem();
|
|
|
|
GameSystem GetGameSystem();
|
|
|
|
RomHeaderVersion GetRomHeaderVersion();
|
2018-07-09 00:19:21 +00:00
|
|
|
uint32_t GetSizeValue(uint32_t exponent, uint32_t multiplier);
|
2018-07-07 18:52:51 +00:00
|
|
|
uint32_t GetPrgSize();
|
|
|
|
uint32_t GetChrSize();
|
|
|
|
uint32_t GetWorkRamSize();
|
|
|
|
uint32_t GetSaveRamSize();
|
|
|
|
int32_t GetChrRamSize();
|
|
|
|
uint32_t GetSaveChrRamSize();
|
|
|
|
uint8_t GetSubMapper();
|
|
|
|
MirroringType GetMirroringType();
|
2018-07-08 00:50:31 +00:00
|
|
|
GameInputType GetInputType();
|
2018-07-07 18:52:51 +00:00
|
|
|
VsSystemType GetVsSystemType();
|
|
|
|
PpuModel GetVsSystemPpuModel();
|
2023-05-13 01:37:50 +00:00
|
|
|
uint8_t GetMiscRoms();
|
2018-07-07 18:52:51 +00:00
|
|
|
};
|