DOL (File Format)

From Custom Mario Kart
Revision as of 16:12, 15 February 2017 by Wiimm (talk | contribs) (Created page with " A C-definition of the DOL header: <pre> #define DOL_N_TEXT_SECTIONS 7 #define DOL_N_DATA_SECTIONS 11 #define DOL_N_SECTIONS 18 #define DOL_HEADER_SIZE 0x100 typedef str...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A C-definition of the DOL header:


#define DOL_N_TEXT_SECTIONS	 7
#define DOL_N_DATA_SECTIONS	11
#define DOL_N_SECTIONS		18

#define DOL_HEADER_SIZE		0x100

typedef struct dol_header_t
{
    /* 0x00 */	u32 sect_off [DOL_N_SECTIONS];	// file offset
    /* 0x48 */	u32 sect_addr[DOL_N_SECTIONS];	// virtual address
    /* 0x90 */	u32 sect_size[DOL_N_SECTIONS];	// section size
    /* 0xd8 */	u32 bss_addr;			// BSS address
    /* 0xdc */	u32 bss_size;			// BSS size
    /* 0xe0 */	u32 entry_addr;			// entry point
    /* 0xe4 */	u8  padding[DOL_HEADER_SIZE-0xe4];
}
__attribute__ ((packed)) dol_header_t;