mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-01 09:23:04 -04:00
Move the system heap and the framebuffers to their own segments (#1488)
* make segments for the systemheap and the framebuffers * define in the makefile * undefined syms * Make segments for the pre boot buffers too * Update spec Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com> * review * Update spec Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com> * Update Makefile Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * comments * comment * move comment about the hardcoded address to buffers.h * rewrite SYSTEM_HEAP_END_ADDR in terms of other symbols * Use `ALIGNED` on all the buffers * Rename SYSTEM_HEAP_END_ADDR to FRAMEBUFFERS_START_ADDR * Put ALIGNED at the right like the rest of the codebase * merge * gLoBuffer * gHiBuffer * Add a static assert to ensure the address of gHiBuffer haven't shifted without the user noticing * smol include cleanup --------- Co-authored-by: Parker <20159000+jpburnett@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
@@ -2147,7 +2147,7 @@ for segment in files_spec:
|
||||
# Calculate the offset and size of this section relative to the section
|
||||
data_offset = off - segment[3][i][0]
|
||||
full_index = file_list.index(off)
|
||||
if segment[0] == "code" and name == "buffers" and segment[3][i][2] == "bss":
|
||||
if segment[0] == "code" and name == "framebuffer_hi" and segment[3][i][2] == "bss":
|
||||
# This is the end of code, hardcode it
|
||||
data_size = 0x80800000 - file_list[full_index]
|
||||
elif segment[0] == "boot" and name == "vimgr" and segment[3][i][2] == "bss":
|
||||
|
||||
@@ -750,7 +750,9 @@
|
||||
0x801FFD00 : "sequence",
|
||||
0x80208E90 : "jpegdecoder",
|
||||
0x80208EA0 : "gfxbuffers",
|
||||
0x8024A4C0 : "buffers",
|
||||
0x8024A4C0 : "buffer_audio_heap",
|
||||
0x803824C0 : "buffer_system_heap",
|
||||
0x80780000 : "framebuffer_hi",
|
||||
},
|
||||
],
|
||||
['ovl_title', 'baserom/', 'overlay', [], { 0x80800000 : "ovl_title" }],
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
0x80000314:("osVersion","UNK_TYPE","",0x4),
|
||||
0x80000318:("osMemSize","UNK_TYPE","",0x4),
|
||||
0x8000031C:("osAppNMIBuffer","s32","[0x10]",0x40),
|
||||
0x80000500:("gFramebuffer1","u16","[SCREEN_HEIGHT][SCREEN_WIDTH]",0x25800),
|
||||
0x80025D00:("D_80025D00","u8","[]",0x1), # TODO size
|
||||
0x80000500:("gLoBuffer","BufferLow","",0x7FB60),
|
||||
0x800969C0:("rspbootTextStart","u64","[]",0x160),
|
||||
0x80096B20:("D_80096B20","u8","",0x1),
|
||||
0x80096B24:("gViConfigUseDefault","vu8","",0x1),
|
||||
@@ -4286,9 +4285,7 @@
|
||||
0x80209EA0:("gGfxPools","GfxPool","[2]",0x40620),
|
||||
0x8024A4C0:("gAudioHeap","u8","[0x138000]",0x138000),
|
||||
0x803824C0:("gSystemHeap","u8","[UNK_SIZE]",0x3fdb40),
|
||||
0x80780000:("gPictoPhotoI8","u8","[0x4600]",0x4600),
|
||||
0x80784600:("D_80784600","u8","[0x56200]",0x56200),
|
||||
0x807DA800:("gFramebuffer0","u16","[SCREEN_HEIGHT][SCREEN_WIDTH]",0x25800),
|
||||
0x80780000:("gHiBuffer","BufferHigh","",0x80000),
|
||||
0x80800860:("titleRotation","s16","",0x2),
|
||||
0x80800868:("D_80800868","UNK_TYPE1","",0x1),
|
||||
0x80800870:("D_80800870","UNK_TYPE1","",0x1),
|
||||
|
||||
Reference in New Issue
Block a user