mirror of https://github.com/pret/pokeemerald.git
Incorporate review changes
This commit is contained in:
parent
a0bf504bc1
commit
e5ac2a103e
|
@ -4,7 +4,7 @@
|
|||
static void *sHeapStart;
|
||||
static u32 sHeapSize;
|
||||
|
||||
__attribute__((section("__EWRAM_HEAP"))) u8 gHeap[HEAP_SIZE] = {0};
|
||||
EWRAM_DATA u8 gHeap[HEAP_SIZE] = {0};
|
||||
|
||||
#define MALLOC_SYSTEM_ID 0xA3A3
|
||||
|
||||
|
|
|
@ -10,9 +10,8 @@
|
|||
|
||||
#define TRY_FREE_AND_SET_NULL(ptr) if (ptr != NULL) FREE_AND_SET_NULL(ptr)
|
||||
|
||||
// 122 KB. Max size of the heap without running into other data
|
||||
#define HEAP_SIZE 0x1C000
|
||||
extern u8 gHeap[];
|
||||
extern u8 gHeap[HEAP_SIZE];
|
||||
|
||||
void *Alloc(u32 size);
|
||||
void *AllocZeroed(u32 size);
|
||||
|
|
|
@ -7,7 +7,7 @@ MEMORY
|
|||
{
|
||||
EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K
|
||||
IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 16M
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 32M
|
||||
}
|
||||
|
||||
/* Modify the following load addresses as needed to make more room. Alternately, delete both the
|
||||
|
@ -21,11 +21,9 @@ SECTIONS {
|
|||
ewram 0x2000000 (NOLOAD) :
|
||||
ALIGN(4)
|
||||
{
|
||||
*(__EWRAM_HEAP);
|
||||
|
||||
INCLUDE "sym_ewram.ld"
|
||||
src/*.o(ewram_data); /**/
|
||||
gflib/*.o(ewram_data); /**/
|
||||
src/*.o(ewram_data);
|
||||
gflib/*.o(ewram_data);
|
||||
|
||||
*libc.a:impure.o(.data);
|
||||
*libc.a:locale.o(.data);
|
||||
|
|
|
@ -3,12 +3,11 @@ ENTRY(Start)
|
|||
gNumMusicPlayers = 4;
|
||||
gMaxLines = 0;
|
||||
|
||||
/* Memory Spaces */
|
||||
MEMORY
|
||||
{
|
||||
EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K
|
||||
IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 16M
|
||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 32M
|
||||
}
|
||||
|
||||
SECTIONS {
|
||||
|
@ -16,10 +15,8 @@ SECTIONS {
|
|||
ewram 0x2000000 (NOLOAD) :
|
||||
ALIGN(4)
|
||||
{
|
||||
*(__EWRAM_HEAP);
|
||||
|
||||
src/*.o(ewram_data); /**/
|
||||
gflib/*.o(ewram_data); /**/
|
||||
src/*.o(ewram_data);
|
||||
gflib/*.o(ewram_data);
|
||||
} > EWRAM
|
||||
|
||||
iwram 0x3000000 (NOLOAD) :
|
||||
|
@ -31,13 +28,11 @@ SECTIONS {
|
|||
*libc.a:*.o(.bss*);
|
||||
*libnosys.a:*.o(.bss*);
|
||||
|
||||
/* .bss.code starts at 0x3001AA8 */
|
||||
src/m4a.o(.bss.code);
|
||||
|
||||
/* COMMON starts at 0x30022A8 */
|
||||
src/*.o(COMMON); /**/
|
||||
gflib/*.o(COMMON); /**/
|
||||
*libc.a:*.o(COMMON);
|
||||
src/*.o(COMMON);
|
||||
gflib/*.o(COMMON);
|
||||
*libc.a:*.o(COMMON);
|
||||
*libnosys.a:*.o(COMMON);
|
||||
} > IWRAM
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
.include "gflib/malloc.o"
|
||||
.include "src/decompress.o"
|
||||
.include "src/main.o"
|
||||
.include "gflib/window.o"
|
||||
|
|
Loading…
Reference in New Issue