mirror of
https://github.com/open-goal/jak-project
synced 2026-05-24 15:21:12 -04:00
d3cc739e43
This attempts to get into master whatever work was done in this PR / it's earlier PR https://github.com/open-goal/jak-project/pull/3965 I don't want this work to be lost / floating around in massive PRs. However the changes are: - switch to ntsc_v1 instead of PAL as the development target, as we have done for all other games - remove most of the copied-from-jak2/3 changes as they need to be confirmed during the decompilation process not just assumed - avoids committing any changes to `game/kernel/common` as it was not clear to me if these were changes made in jak x's kernel that were not properly broken out into it's own functions. We don't want to accidentally introduce bugs into jak1-3's kernel code. - in other words, if the change in the kernel only happens in jak x...it should likely be specific to jak x's kernel, not common. --------- Co-authored-by: VodBox <dillon@vodbox.io> Co-authored-by: yodah <greenboyyodah@gmail.com>
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "common/common_types.h"
|
|
|
|
//! Toggle to use more memory. To simulate the original game's memory layout, set this to false.
|
|
// Make sure this matches the const in gcommon.gc.
|
|
constexpr bool BIG_MEMORY = true;
|
|
|
|
//! How much space to leave for the stack when creating the debug heap
|
|
// In the game, it's 16 kB, but we increase it to 64 kB.
|
|
// ASAN builds + fmt stuff uses a _ton_ of stack when no optimizations are on and we
|
|
// need more.
|
|
constexpr u32 DEBUG_HEAP_SPACE_FOR_STACK = 0x10000;
|
|
|
|
//! First free address for the GOAL heap
|
|
constexpr u32 HEAP_START = 0x13fd20;
|
|
|
|
//! Where to end the global heap so it doesn't overlap with the stack.
|
|
constexpr u32 GLOBAL_HEAP_END = 0x1ffc000 + (BIG_MEMORY ? (0x1ffc000 - HEAP_START) : 0); // doubled
|
|
|
|
//! Location of kglobalheap, kdebugheap kheapinfo structures.
|
|
constexpr u32 GLOBAL_HEAP_INFO_ADDR = 0x13AD00;
|
|
constexpr u32 DEBUG_HEAP_INFO_ADDR = 0x13AD10;
|
|
constexpr u32 LINK_CONTROL_NAME_ADDR = 0x13AD80;
|
|
|
|
//! Where to place the debug heap
|
|
constexpr u32 DEBUG_HEAP_START = 0x5000000;
|
|
|
|
namespace jak2 {
|
|
constexpr u32 DEBUG_HEAP_SIZE = 0x2f00000;
|
|
}
|
|
|
|
namespace jak3 {
|
|
constexpr u32 DEBUG_HEAP_SIZE = 0x2f00000;
|
|
}
|
|
|
|
namespace jakx {
|
|
constexpr u32 DEBUG_HEAP_SIZE = 0x2f00000;
|
|
}
|