Fix rom title

This commit is contained in:
Robin Jones 2023-06-08 13:07:03 +00:00
parent 13925688ca
commit 8c813758f3
2 changed files with 2 additions and 1 deletions

View File

@ -35,6 +35,7 @@ rom_header_t file_read_rom_header(char *path) {
fread(&(rom_header->checksum), sizeof(uint64_t), 1, fp); fread(&(rom_header->checksum), sizeof(uint64_t), 1, fp);
fseek(fp, 0x20, SEEK_SET); fseek(fp, 0x20, SEEK_SET);
fread(&(rom_header->title), sizeof(rom_header->title), 1, fp); fread(&(rom_header->title), sizeof(rom_header->title), 1, fp);
rom_header->title[20] = '\0';
fseek(fp, 0x3b, SEEK_SET); fseek(fp, 0x3b, SEEK_SET);
fread(&(rom_header->metadata.media_type), sizeof(rom_header->metadata.media_type), 1, fp); fread(&(rom_header->metadata.media_type), sizeof(rom_header->metadata.media_type), 1, fp);
//fseek(fp, 0x3c, SEEK_SET); // Consecutive read (no need to seek). //fseek(fp, 0x3c, SEEK_SET); // Consecutive read (no need to seek).

View File

@ -68,7 +68,7 @@ typedef struct {
typedef struct { typedef struct {
uint64_t checksum; uint64_t checksum;
uint8_t title[14]; uint8_t title[21];
rom_metadata_t metadata; rom_metadata_t metadata;
uint8_t version; uint8_t version;
} rom_header_t; } rom_header_t;