-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 65430 Split * bootproc OK * bootclear OK * Idle_ThreadEntry Close * Idle_InitVideo OK * Main_ThreadEntry OK * func_80064830 OK * func_80064850 OK * func_800648A4 OK * func_800648DC OK * func_80064B38 OK * func_80069C10 OK * func_80069B34 OK * func_80069A80 OK * func_8006915C OK * func_80069964 OK * Cleanup global.h * eep stuff * Move symbol_addrs to bss section * Rearrange global.h
- Loading branch information
Showing
8 changed files
with
735 additions
and
46 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#ifndef SEGMENT_SYMBOLS_H | ||
#define SEGMENT_SYMBOLS_H | ||
|
||
#include "ultra64.h" | ||
#include "libc/stdint.h" | ||
|
||
#define DECLARE_VRAM_SEGMENT(name) \ | ||
extern u8 name ## _VRAM[]; \ | ||
extern u8 name ## _VRAM_END[] | ||
|
||
#define DECLARE_ROM_SEGMENT(name) \ | ||
extern u8 name ## _ROM_START[]; \ | ||
extern u8 name ## _ROM_END[] | ||
|
||
#define DECLARE_DATA_SEGMENT(name) \ | ||
extern u8 name ## _DATA_START[]; \ | ||
extern u8 name ## _DATA_END[]; \ | ||
extern u8 name ## _DATA_SIZE[] | ||
|
||
#define DECLARE_BSS_SEGMENT(name) \ | ||
extern u8 name ## _BSS_START[]; \ | ||
extern u8 name ## _BSS_END[] | ||
|
||
#define DECLARE_SEGMENT(name) \ | ||
DECLARE_VRAM_SEGMENT(name); \ | ||
DECLARE_ROM_SEGMENT(name); \ | ||
DECLARE_DATA_SEGMENT(name); \ | ||
DECLARE_BSS_SEGMENT(name) | ||
|
||
#define SEGMENT_VRAM_START(segment) (segment ## _VRAM) | ||
#define SEGMENT_VRAM_END(segment) (segment ## _VRAM_END) | ||
#define SEGMENT_VRAM_SIZE(segment) ((uintptr_t)SEGMENT_VRAM_END(segment) - (uintptr_t)SEGMENT_VRAM_START(segment)) | ||
#define SEGMENT_VRAM_RESOLVE_ADDR(segment, base, symbol) ((uintptr_t)(base) + (uintptr_t)&(symbol) - (uintptr_t)SEGMENT_VRAM_START(segment)) | ||
|
||
#define SEGMENT_ROM_START(segment) ((RomOffset)segment ## _ROM_START) | ||
#define SEGMENT_ROM_END(segment) ((RomOffset)segment ## _ROM_END) | ||
#define SEGMENT_ROM_SIZE(segment) (SEGMENT_ROM_END(segment) - SEGMENT_ROM_START(segment)) | ||
#define SEGMENT_ROM_SIZE_ALT(segment) ((size_t)(segment ## _ROM_END - segment ## _ROM_START)) | ||
|
||
#define SEGMENT_DATA_SIZE_CONST(segment) ((RomOffset)segment ## _DATA_SIZE) | ||
|
||
#define SEGMENT_BSS_START(segment) (segment ## _BSS_START) | ||
#define SEGMENT_BSS_END(segment) (segment ## _BSS_END) | ||
#define SEGMENT_BSS_SIZE(segment) ((uintptr_t)SEGMENT_BSS_END(segment) - (uintptr_t)SEGMENT_BSS_START(segment)) | ||
|
||
DECLARE_SEGMENT(header); | ||
|
||
DECLARE_SEGMENT(ipl3); | ||
|
||
DECLARE_SEGMENT(entry); | ||
|
||
DECLARE_SEGMENT(main); | ||
|
||
#endif |
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
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
Oops, something went wrong.