Skip to content

Instantly share code, notes, and snippets.

@Linblow
Last active November 28, 2024 13:20
Show Gist options
  • Save Linblow/541a3b24559f9c89374fdbd9e0693c40 to your computer and use it in GitHub Desktop.
Save Linblow/541a3b24559f9c89374fdbd9e0693c40 to your computer and use it in GitHub Desktop.
MetroWerks Overlay file header
/** Source: C:\Program Files (x86)\Metrowerks\CodeWarrior\PS2 Support\Runtime\Sources\CPP_Support\mwUtils_PS2.c */
typedef struct {
/** Header magic: "MWo". */
uint8_t identifier[3];
/** Overlay version (3). */
uint8_t version;
/** ID of this overlay. */
uint32_t overlayID; // off: 4
/** Load address (ie. address of this structure, followed by the data). */
uint32_t address; // off: 8
/** Size of the .text section. */
uint32_t textSize; // off: 0xc
/** Size of the .data section. */
uint32_t dataSize; // off: 0x10
/** Size of the .bss section. */
uint32_t bssSize; // off: 0x14
/** Start address of the static array of initialization function pointers. */
uint32_t staticInit; // off: 0x18
/** End address of the static array of initialization function pointers. */
uint32_t staticInitEnd; // off: 0x1c
/** Overlay name. */
uint8_t name[32]; // off: 0x20
} mwOverlayHeader; // size: 0x40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment