Files
captain-amygdala.pistorm/config_file/rominfo.h
Andrew Hutchings 22ef5edcd4 Identify and fix byte-swapped ROMs
Logs and byte swaps ROMs back if byte swapped versions are found.
2021-05-21 08:15:02 +01:00

31 lines
469 B
C

// SPDX-License-Identifier: MIT
#ifndef __ROMINFO__
#define __ROMINFO__
#include <stdbool.h>
#include <inttypes.h>
enum romType {
ROM_TYPE_UNKNOWN,
ROM_TYPE_256,
ROM_TYPE_512,
};
struct romInfo {
enum romType id;
uint16_t major;
uint16_t minor;
uint16_t extra;
bool isDiagRom;
};
enum romErrCode {
ERR_NO_ERR,
ERR_NOT_ROM,
ERR_ROM_UNKNOWN
};
void displayRomInfo(uint8_t *address, size_t length);
#endif /* __ROMINFO */