diff options
Diffstat (limited to 'include/gba')
-rw-r--r-- | include/gba/defines.h | 13 | ||||
-rw-r--r-- | include/gba/flash_internal.h | 1 | ||||
-rw-r--r-- | include/gba/multiboot.h | 26 |
3 files changed, 25 insertions, 15 deletions
diff --git a/include/gba/defines.h b/include/gba/defines.h index 0f7f06755..41cc84f4a 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -15,6 +15,11 @@ #define INTR_CHECK (*(u16 *)0x3007FF8) #define INTR_VECTOR (*(void **)0x3007FFC) +#define EWRAM_START 0x02000000 +#define EWRAM_END (EWRAM_START + 0x40000) +#define IWRAM_START 0x03000000 +#define IWRAM_END (IWRAM_START + 0x8000) + #define PLTT 0x5000000 #define PLTT_SIZE 0x400 @@ -29,8 +34,10 @@ #define BG_VRAM VRAM #define BG_VRAM_SIZE 0x10000 -#define BG_CHAR_ADDR(n) (BG_VRAM + (0x4000 * (n))) -#define BG_SCREEN_ADDR(n) (BG_VRAM + (0x800 * (n))) +#define BG_CHAR_SIZE 0x4000 +#define BG_SCREEN_SIZE 0x800 +#define BG_CHAR_ADDR(n) (BG_VRAM + (BG_CHAR_SIZE * (n))) +#define BG_SCREEN_ADDR(n) (BG_VRAM + (BG_SCREEN_SIZE * (n))) // text-mode BG #define OBJ_VRAM0 (VRAM + 0x10000) @@ -43,6 +50,8 @@ #define OAM 0x7000000 #define OAM_SIZE 0x400 +#define ROM_HEADER_SIZE 0xC0 + #define DISPLAY_WIDTH 240 #define DISPLAY_HEIGHT 160 diff --git a/include/gba/flash_internal.h b/include/gba/flash_internal.h index 6156b6c14..ba84546aa 100644 --- a/include/gba/flash_internal.h +++ b/include/gba/flash_internal.h @@ -65,6 +65,7 @@ u16 ReadFlashId(void); void StartFlashTimer(u8 phase); void SetReadFlash1(u16 *dest); void StopFlashTimer(void); +void ReadFlash(u16 sectorNum, u32 offset, u8 *dest, u32 size); u16 WaitForFlashWrite_Common(u8 phase, u8 *addr, u8 lastData); diff --git a/include/gba/multiboot.h b/include/gba/multiboot.h index e88b43a19..14b6594b2 100644 --- a/include/gba/multiboot.h +++ b/include/gba/multiboot.h @@ -8,19 +8,19 @@ struct MultiBootParam { - u32 system_work[5]; - u8 handshake_data; - u8 padding; - u16 handshake_timeout; - u8 probe_count; - u8 client_data[MULTIBOOT_NCHILD]; - u8 palette_data; - u8 response_bit; - u8 client_bit; - u8 reserved1; - u8 *boot_srcp; - u8 *boot_endp; - u8 *masterp; + u32 system_work[5]; // 00 + u8 handshake_data; // 14 + u8 padding; // 15 + u16 handshake_timeout; // 16 + u8 probe_count; // 18 + u8 client_data[MULTIBOOT_NCHILD]; // 19 + u8 palette_data; // 1c + u8 response_bit; // 1d + u8 client_bit; // 1e + u8 reserved1; // 1f + const u8 *boot_srcp; // 20 + const u8 *boot_endp; // 24 + const u8 *masterp; u8 *reserved2[MULTIBOOT_NCHILD]; u32 system_work2[4]; u8 sendflag; |