Files
af/include/loadfragment.h
T
Anghelo Carvajal 94c8f704af z_std_dma.c (#75)
* C file

* func_80026A64_jp, DmaMgr_RequestSync

* func_80026714_jp, func_80026814_jp, func_800269E4_jp, func_80026C4C_jp, func_80026DA0_jp, func_80026DCC_jp, func_80026E10_jp

* func_80026770_jp, func_800267DC_jp, func_80026BC0_jp, func_80026C00_jp, func_80026C28_jp

* DmaMgr_DmaRomToRam

* func_800266C4_jp, func_80026828_jp

* func_800263F0_jp

* func_80026CAC_jp

* migrate other strings

* Fix some warnings

* start renamings

* Improve func_800263F0_jp

* steal stuff from OoT

* dmaEntryMsgBufs

* name the remaining stuff

* format

* minor cleanups

* review

* format

* review
2023-08-24 11:40:56 -07:00

40 lines
1.1 KiB
C

#ifndef LOADFRAGMENT_H
#define LOADFRAGMENT_H
#include "ultra64.h"
#include "other_types.h"
extern s32 gOverlayLogSeverity;
#define RELOC_SECTION(reloc) ((reloc) >> 30)
#define RELOC_OFFSET(reloc) ((reloc) & 0xFFFFFF)
#define RELOC_TYPE_MASK(reloc) ((reloc) & 0x3F000000)
#define RELOC_TYPE_SHIFT 24
/* MIPS Relocation Types, matches the MIPS ELF spec */
#define R_MIPS_32 2
#define R_MIPS_26 4
#define R_MIPS_HI16 5
#define R_MIPS_LO16 6
typedef enum {
/* 0 */ RELOC_SECTION_NULL,
/* 1 */ RELOC_SECTION_TEXT,
/* 2 */ RELOC_SECTION_DATA,
/* 3 */ RELOC_SECTION_RODATA,
/* 4 */ RELOC_SECTION_MAX
} RelocSectionId;
typedef struct OverlayRelocationSection {
/* 0x00 */ u32 textSize;
/* 0x04 */ u32 dataSize;
/* 0x08 */ u32 rodataSize;
/* 0x0C */ u32 bssSize;
/* 0x10 */ u32 nRelocations;
/* 0x14 */ u32 relocations[1]; // size is nRelocations
} OverlayRelocationSection; // size >= 0x18
s32 Overlay_Load(RomOffset vromStart, RomOffset vromEnd, RomOffset ovlStart, RomOffset ovlEnd, void *vramStart, void *vramEnd, void *allocatedRamAddr, OverlayRelocationSection *ovlRelocs);
#endif