mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
BSS: src/main.o, src/dma3_manager.o
This commit is contained in:
parent
13017a3b19
commit
ef0b022707
@ -2762,7 +2762,7 @@ sub_82E424C: @ 82E424C
|
|||||||
b _082E4266
|
b _082E4266
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
_082E4254: .4byte gUnknown_089A324C
|
_082E4254: .4byte gUnknown_089A324C
|
||||||
_082E4258: .4byte gUnknown_030000F0
|
_082E4258: .4byte gDma3Requests + 0xE0
|
||||||
thumb_func_end sub_82E424C
|
thumb_func_end sub_82E424C
|
||||||
|
|
||||||
thumb_func_start sub_82E425C
|
thumb_func_start sub_82E425C
|
||||||
@ -2810,7 +2810,7 @@ _082E4274:
|
|||||||
movs r0, 0
|
movs r0, 0
|
||||||
b _082E42BE
|
b _082E42BE
|
||||||
.align 2, 0
|
.align 2, 0
|
||||||
_082E42B0: .4byte gUnknown_030000FA
|
_082E42B0: .4byte gDma3Requests + 0xEA
|
||||||
_082E42B4: .4byte gUnknown_03007890
|
_082E42B4: .4byte gUnknown_03007890
|
||||||
_082E42B8: .4byte gUnknown_03007894
|
_082E42B8: .4byte gUnknown_03007894
|
||||||
_082E42BC:
|
_082E42BC:
|
||||||
|
@ -1,20 +1,6 @@
|
|||||||
#ifndef GUARD_DMA3_H
|
#ifndef GUARD_DMA3_H
|
||||||
#define GUARD_DMA3_H
|
#define GUARD_DMA3_H
|
||||||
|
|
||||||
extern u8 gDma3ManagerLocked;
|
|
||||||
extern u8 gDma3RequestCursor;
|
|
||||||
|
|
||||||
struct DmaRequestsStruct
|
|
||||||
{
|
|
||||||
/* 0x00 */ const u8 *src;
|
|
||||||
/* 0x04 */ u8 *dest;
|
|
||||||
/* 0x08 */ u16 size;
|
|
||||||
/* 0x0A */ u16 mode;
|
|
||||||
/* 0x0C */ u32 value;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct DmaRequestsStruct gDma3Requests[128];
|
|
||||||
|
|
||||||
void ClearDma3Requests(void);
|
void ClearDma3Requests(void);
|
||||||
void ProcessDma3Requests(void);
|
void ProcessDma3Requests(void);
|
||||||
int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
|
int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
|
||||||
|
@ -1,12 +1,23 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "dma3.h"
|
#include "dma3.h"
|
||||||
|
|
||||||
|
IWRAM_DATA struct {
|
||||||
|
/* 0x00 */ const u8 *src;
|
||||||
|
/* 0x04 */ u8 *dest;
|
||||||
|
/* 0x08 */ u16 size;
|
||||||
|
/* 0x0A */ u16 mode;
|
||||||
|
/* 0x0C */ u32 value;
|
||||||
|
} gDma3Requests[128];
|
||||||
|
|
||||||
|
static bool8 gDma3ManagerLocked;
|
||||||
|
static u8 gDma3RequestCursor;
|
||||||
|
|
||||||
void ClearDma3Requests(void)
|
void ClearDma3Requests(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
gDma3ManagerLocked = TRUE;
|
gDma3ManagerLocked = TRUE;
|
||||||
gDma3RequestCursor = FALSE;
|
gDma3RequestCursor = 0;
|
||||||
|
|
||||||
for(i = 0; i < (u8)ARRAY_COUNT(gDma3Requests); i++)
|
for(i = 0; i < (u8)ARRAY_COUNT(gDma3Requests); i++)
|
||||||
{
|
{
|
||||||
@ -22,7 +33,6 @@ void ClearDma3Requests(void)
|
|||||||
void ProcessDma3Requests(void)
|
void ProcessDma3Requests(void)
|
||||||
{
|
{
|
||||||
// NOTE: the fillerA member of the DMA struct is actually u32 value;
|
// NOTE: the fillerA member of the DMA struct is actually u32 value;
|
||||||
// NOTE: gUnknown_0300001C is just a pointer inside the gDma3Requests structure, not a true symbol; feel free to remove
|
|
||||||
u16 total_size;
|
u16 total_size;
|
||||||
|
|
||||||
if (gDma3ManagerLocked)
|
if (gDma3ManagerLocked)
|
||||||
@ -331,7 +341,7 @@ _08000DB2:\n\
|
|||||||
mov r5, r12\n\
|
mov r5, r12\n\
|
||||||
ldrb r0, [r5]\n\
|
ldrb r0, [r5]\n\
|
||||||
lsls r0, 4\n\
|
lsls r0, 4\n\
|
||||||
ldr r3, =gUnknown_0300001C\n\
|
ldr r3, =gDma3Requests + 0x0C\n\
|
||||||
adds r0, r3\n\
|
adds r0, r3\n\
|
||||||
ldr r0, [r0]\n\
|
ldr r0, [r0]\n\
|
||||||
strh r0, [r1]\n\
|
strh r0, [r1]\n\
|
||||||
@ -347,7 +357,7 @@ _08000DB2:\n\
|
|||||||
bhi _08000DB2\n\
|
bhi _08000DB2\n\
|
||||||
ldrb r0, [r5]\n\
|
ldrb r0, [r5]\n\
|
||||||
lsls r0, 4\n\
|
lsls r0, 4\n\
|
||||||
ldr r5, =gUnknown_0300001C\n\
|
ldr r5, =gDma3Requests + 0x0C\n\
|
||||||
adds r0, r5\n\
|
adds r0, r5\n\
|
||||||
ldr r0, [r0]\n\
|
ldr r0, [r0]\n\
|
||||||
strh r0, [r1]\n\
|
strh r0, [r1]\n\
|
||||||
|
@ -77,7 +77,7 @@ const IntrFunc gIntrTableTemplate[] =
|
|||||||
|
|
||||||
#define INTR_COUNT ((int)(sizeof(gIntrTableTemplate)/sizeof(IntrFunc)))
|
#define INTR_COUNT ((int)(sizeof(gIntrTableTemplate)/sizeof(IntrFunc)))
|
||||||
|
|
||||||
extern u16 gUnknown_03000000;
|
static u16 gUnknown_03000000;
|
||||||
|
|
||||||
extern u16 gKeyRepeatStartDelay;
|
extern u16 gKeyRepeatStartDelay;
|
||||||
extern u8 gUnknown_030022B4;
|
extern u8 gUnknown_030022B4;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
static void *sHeapStart;
|
static void *sHeapStart;
|
||||||
static u32 sHeapSize;
|
static u32 sHeapSize;
|
||||||
|
static u32 malloc_c_unused_0300000c; // needed to align dma3_manager.o(.bss)
|
||||||
|
|
||||||
#define MALLOC_SYSTEM_ID 0xA3A3
|
#define MALLOC_SYSTEM_ID 0xA3A3
|
||||||
|
|
||||||
|
24
sym_bss.txt
24
sym_bss.txt
@ -1,27 +1,7 @@
|
|||||||
gUnknown_03000000: @ 3000000
|
gUnknown_03000000: @ 3000000
|
||||||
.space 0x4
|
.include "src/main.o"
|
||||||
|
|
||||||
.include "src/malloc.o"
|
.include "src/malloc.o"
|
||||||
|
.include "src/dma3_manager.o"
|
||||||
.align 4
|
|
||||||
gDma3Requests: @ 3000010
|
|
||||||
.space 0xC
|
|
||||||
|
|
||||||
gUnknown_0300001C: @ 300001C
|
|
||||||
.space 0xD4
|
|
||||||
|
|
||||||
gUnknown_030000F0: @ 30000F0
|
|
||||||
.space 0xA
|
|
||||||
|
|
||||||
gUnknown_030000FA: @ 30000FA
|
|
||||||
.space 0x716
|
|
||||||
|
|
||||||
gDma3ManagerLocked: @ 3000810
|
|
||||||
.space 0x1
|
|
||||||
|
|
||||||
gDma3RequestCursor: @ 3000811
|
|
||||||
.space 0x7
|
|
||||||
|
|
||||||
.include "src/gpu_regs.o"
|
.include "src/gpu_regs.o"
|
||||||
.include "src/bg.o"
|
.include "src/bg.o"
|
||||||
.include "src/text.o"
|
.include "src/text.o"
|
||||||
|
Loading…
Reference in New Issue
Block a user