pub enum CartridgeError {
FileError(Error),
ExtensionError,
InvalidNintendoLogo,
InvalidGameTitle,
InvalidCartridgeType,
InvalidRomSizeIndex(u8),
InvalidRamSizeIndex(u8),
InvalidRomSize(usize),
RamNotPresentError,
NotNeededRamPresentError,
InvalidChecksum {
expected: u8,
got: u8,
},
MapperNotImplemented(MapperType),
}
Expand description
An error that may occur when loading a new Cartridge file.
Variants§
FileError(Error)
File error happened while reading the ROM file.
ExtensionError
The ROM file does not have valid extension.
InvalidNintendoLogo
The rom file does not contain a valid Nintendo logo data at 0x104
.
InvalidGameTitle
The game title contain invalid UTF-8 characters.
InvalidCartridgeType
Rom file contain unsupported cartridge type.
InvalidRomSizeIndex(u8)
The rom file header contain invalid rom_size
value.
InvalidRamSizeIndex(u8)
The rom file header contain invalid ram_size
value.
InvalidRomSize(usize)
The rom file size does not match the rom size provided in the rom header.
RamNotPresentError
The cartridge type suggest the cartridge has ram, but it is not present.
NotNeededRamPresentError
The cartridge type suggest the cartridge does not have ram, but it is present
InvalidChecksum
The header of the cartridge checksum does not match the provided value in the header.
MapperNotImplemented(MapperType)
The mapper type is not supported by the emulator.