Last active
February 8, 2021 19:54
-
-
Save rakisaionji/76b3f059d4a0ebee955f69ee3d5c8fed to your computer and use it in GitHub Desktop.
Structure declaration for a certain game image.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#define IMG_OPEN_NEW 1 | |
#define IMG_OPEN_READ 2 | |
#define IMG_OPEN_WRITE 3 | |
#define IMG_KEYIV_SIZE 0x20 | |
#define IMG_SIGNATURE_SIZE 0x200 | |
#define IMG_BLOCK_SIZE 0x1000 | |
#define IMG_BOOT_INFO_SIZE 0x2800 | |
#define IMG_DICTIONARY_OFFSET 0x2A00 | |
#define IMG_SEGMENT_SIZE 0x40000 | |
#define IMG_DATA_OFFSET 0x200000 | |
typedef struct BuildDate { | |
UINT16 year; | |
BYTE month; | |
BYTE day; | |
BYTE hour; | |
BYTE minute; | |
BYTE second; | |
BYTE millisecond; | |
} BUILDDATE, * PBUILDDATE; | |
typedef struct BuildVer { | |
BYTE build; | |
BYTE minor; | |
UINT16 major; | |
} BUILDVER, * PBUILDVER; | |
typedef struct BootSector { | |
// HEADER | |
UINT32 checksum; // CRC-32 | |
UINT32 sectorSize; // 0x2800 | |
CHAR magic[4]; // BTID | |
BYTE padding1; // ??? | |
BYTE imageType; // 0 = PACK , 1 = APP , 2 = OPT | |
BYTE imagePart; // 0 1 2 3 ... | |
BYTE padding2; // ??? | |
// IDENTIFICATION | |
CHAR gameId[4]; // SSSS | |
BUILDDATE buildDate; // Image Build Date | |
BUILDVER buildVer; // Image Build Version | |
// SEGMENT INFORMATION | |
UINT64 segCount; // Total Count | |
UINT64 segSize; // Segment Size | |
// SEGMENT INFORMATION | |
UINT64 segHeader; // Header Count | |
UINT64 segPadding; // ??? | |
// SYSTEM INFORMATION | |
CHAR platformId[4]; // AAV (null terminated) | |
BUILDDATE reqBuildDate; // Required APP date , optional | |
BUILDVER reqBuildVer; // Required APP version , optional | |
// SYSTEM INFORMATION | |
BUILDVER reqSystemVer; // Required System , optional | |
UINT32 padding1[3]; // ??? | |
// UNKNOWN PADDING | |
CHAR padding3[0x3A0]; // ??? | |
// STRINGS ( optional ) | |
CHAR string1[8][0x80]; // APPLICATION NAME | |
CHAR string2[8][0x80]; // CREDIT(S) TO START | |
CHAR string3[8][0x80]; // CREDIT(S) TO CONTINUE | |
CHAR string4[8][0x80]; // ??? | |
// UNKNOWN PADDING | |
CHAR padding4[0x1400]; // ??? | |
} BOOTSECT, * PBOOTSECT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment