You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
Reset goddard segment on load
This commit is contained in:
@@ -45,10 +45,12 @@ DECLARE_SEGMENT(framebuffers)
|
||||
extern u8 _goddardSegmentStart[];
|
||||
|
||||
extern u8 _engineSegmentStart[];
|
||||
extern u8 _engineSegmentNoloadEnd[];
|
||||
extern u8 _engineSegmentEnd[];
|
||||
extern u8 _framebuffersSegmentNoloadEnd[];
|
||||
|
||||
extern u8 _goddardSegmentNoloadStart[];
|
||||
extern u8 _goddardSegmentNoloadEnd[];
|
||||
|
||||
DECLARE_LEVEL_SEGMENT(menu)
|
||||
DECLARE_LEVEL_SEGMENT(intro)
|
||||
DECLARE_LEVEL_SEGMENT(ending)
|
||||
|
||||
@@ -305,6 +305,10 @@ void *load_to_fixed_pool_addr(u8 *destAddr, u8 *srcStart, u8 *srcEnd) {
|
||||
u32 srcSize = ALIGN16(srcEnd - srcStart);
|
||||
u32 destSize = ALIGN16((u8 *) sPoolListHeadR - destAddr);
|
||||
|
||||
if (destAddr == _goddardSegmentStart) { // Clear goddard bss
|
||||
bzero((u8 *) _goddardSegmentNoloadStart, (u8 *) _goddardSegmentNoloadEnd - (u8 *) _goddardSegmentNoloadStart);
|
||||
}
|
||||
|
||||
if (srcSize <= destSize) {
|
||||
dest = main_pool_alloc(destSize, MEMORY_POOL_RIGHT);
|
||||
if (dest != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user