diff --git a/common/goal_constants.h b/common/goal_constants.h index 4e28487aec..cc48b3ac4d 100644 --- a/common/goal_constants.h +++ b/common/goal_constants.h @@ -84,7 +84,7 @@ constexpr u32 GOAL_RELOC_METHOD = 7; // method ID of GOAL relocate constexpr u32 GOAL_MEMUSAGE_METHOD = 8; // method ID of GOAL mem-usage constexpr int EE_MAIN_MEM_LOW_PROTECT = 512 * 1024; -constexpr int EE_MAIN_MEM_SIZE = 128 * (1 << 20); // 128 MB, same as PS2 TOOL +constexpr int EE_MAIN_MEM_SIZE = 256 * (1 << 20); // 128 MB, same as PS2 TOOL (changed to 256 MB) constexpr u64 EE_MAIN_MEM_MAP = 0x2123000000; // intentionally > 32-bit to catch pointer bugs // when true, attempt to map the EE memory in the low 2 GB of RAM diff --git a/game/kernel/common/memory_layout.h b/game/kernel/common/memory_layout.h index 2a808d7f85..16e7bc21b2 100644 --- a/game/kernel/common/memory_layout.h +++ b/game/kernel/common/memory_layout.h @@ -16,7 +16,7 @@ constexpr u32 DEBUG_HEAP_SPACE_FOR_STACK = 0x10000; 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 +constexpr u32 GLOBAL_HEAP_END = 0x1ffc000 + (BIG_MEMORY ? (0x1ffc000 - HEAP_START) * 3 : 0); // doubled //! Location of kglobalheap, kdebugheap kheapinfo structures. constexpr u32 GLOBAL_HEAP_INFO_ADDR = 0x13AD00; @@ -24,8 +24,8 @@ 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; +constexpr u32 DEBUG_HEAP_START = 0x8000000; namespace jak2 { constexpr u32 DEBUG_HEAP_SIZE = 0x2f00000; -} \ No newline at end of file +} diff --git a/goal_src/jak2/engine/gfx/background/background-h.gc b/goal_src/jak2/engine/gfx/background/background-h.gc index 9f20b11009..97818c42c1 100644 --- a/goal_src/jak2/engine/gfx/background/background-h.gc +++ b/goal_src/jak2/engine/gfx/background/background-h.gc @@ -10,23 +10,23 @@ ;; DECOMP BEGINS (deftype background-work (basic) - ((tfrag-tree-count int32 :offset-assert 4) - (tfrag-trees drawable-tree-tfrag 8 :offset-assert 8) - (tfrag-levels level 8 :offset-assert 40) - (tfrag-trans-tree-count int32 :offset-assert 72) - (tfrag-trans-trees drawable-tree-tfrag-trans 8 :offset-assert 76) - (tfrag-trans-levels level 8 :offset-assert 108) - (tfrag-water-tree-count int32 :offset-assert 140) - (tfrag-water-trees drawable-tree-tfrag-water 8 :offset-assert 144) - (tfrag-water-levels level 8 :offset-assert 176) - (shrub-tree-count int32 :offset-assert 208) - (shrub-trees drawable-tree-instance-shrub 8 :offset-assert 212) - (shrub-levels level 8 :offset-assert 244) - (tie-tree-count int32 :offset-assert 276) - (tie-trees drawable-tree-instance-tie 12);:offset-assert 280) ;; guessed by decompiler - (tie-levels level 12);:offset-assert 312) ;; guessed by decompiler - (tie-generic basic 12);:offset-assert 344) ;; guessed by decompiler - (tie-generic-trans basic 12);:offset-assert 376) + ((tfrag-tree-count int32 );:offset-assert 4) + (tfrag-trees drawable-tree-tfrag 32);:offset-assert 8) + (tfrag-levels level 32);:offset-assert 40) + (tfrag-trans-tree-count int32 );:offset-assert 72) + (tfrag-trans-trees drawable-tree-tfrag-trans 32);:offset-assert 76) + (tfrag-trans-levels level 32);:offset-assert 108) + (tfrag-water-tree-count int32 );:offset-assert 140) + (tfrag-water-trees drawable-tree-tfrag-water 32);:offset-assert 144) + (tfrag-water-levels level 32);:offset-assert 176) + (shrub-tree-count int32 );:offset-assert 208) + (shrub-trees drawable-tree-instance-shrub 32);:offset-assert 212) + (shrub-levels level 32);:offset-assert 244) + (tie-tree-count int32 );:offset-assert 276) + (tie-trees drawable-tree-instance-tie 32);:offset-assert 280) ;; guessed by decompiler + (tie-levels level 32);:offset-assert 312) ;; guessed by decompiler + (tie-generic basic 32);:offset-assert 344) ;; guessed by decompiler + (tie-generic-trans basic 32);:offset-assert 376) (wait-to-vu0 uint32 );:offset-assert 408) ) :method-count-assert 9 diff --git a/goal_src/jak2/engine/gfx/texture/texture.gc b/goal_src/jak2/engine/gfx/texture/texture.gc index c7bd798157..6175759e72 100644 --- a/goal_src/jak2/engine/gfx/texture/texture.gc +++ b/goal_src/jak2/engine/gfx/texture/texture.gc @@ -1842,7 +1842,7 @@ additionally, some texture pages have a chunk system that allows more specific c ;; to hold the dma chain - doesn't hold textures, just DMA :ref tags and similar. (kmemopen global "texture-dma-buffers") -(define *txt-dma-list* (new 'global 'dma-buffer 4096)) +(define *txt-dma-list* (new 'global 'dma-buffer 8192)) (kmemclose) (defmethod upload-now! texture-page ((obj texture-page) (arg0 tex-upload-mode)) diff --git a/goal_src/jak2/engine/util/script.gc b/goal_src/jak2/engine/util/script.gc index d0570b836a..1b0bf79b1c 100644 --- a/goal_src/jak2/engine/util/script.gc +++ b/goal_src/jak2/engine/util/script.gc @@ -1039,7 +1039,7 @@ (the-as (function script-context object) (lambda ((arg0 script-context)) - (let ((s5-0 6) + (let ((s5-0 LEVEL_MAX) (a0-1 (-> arg0 param 1)) ) (cond @@ -1053,8 +1053,8 @@ ) ) ) - (let ((s5-2 (new 'static 'boxed-array :type symbol :length 0 :allocated-length 6))) - (dotimes (s4-0 6) + (let ((s5-2 (new 'static 'boxed-array :type symbol :length 0 :allocated-length LEVEL_MAX))) + (dotimes (s4-0 LEVEL_MAX) (let ((a1-3 (ref (-> arg0 param 1) s4-0))) (set! (-> s5-2 s4-0) (the-as symbol (if (not (null? a1-3)) (eval! arg0 (the-as pair a1-3)) diff --git a/goal_src/jak2/kernel/gcommon.gc b/goal_src/jak2/kernel/gcommon.gc index 509a07b838..633ae371a7 100644 --- a/goal_src/jak2/kernel/gcommon.gc +++ b/goal_src/jak2/kernel/gcommon.gc @@ -43,7 +43,7 @@ ) ;; pointers larger than this are invalid by valid? -(defconstant END_OF_MEMORY #x8000000) +(defconstant END_OF_MEMORY #x10000000) (defun identity ((arg0 object)) "Return the input. Works for any 64-bit value." diff --git a/goal_src/jak2/levels/city/traffic/vehicle/vehicle-control.gc b/goal_src/jak2/levels/city/traffic/vehicle/vehicle-control.gc index 179dfad2a7..81ca33ccfd 100644 --- a/goal_src/jak2/levels/city/traffic/vehicle/vehicle-control.gc +++ b/goal_src/jak2/levels/city/traffic/vehicle/vehicle-control.gc @@ -25,7 +25,7 @@ (break!) 0 ) - (when (< (the-as uint #x8000000) (the-as uint v1-4)) + (when (< END_OF_MEMORY (the-as uint v1-4)) (break!) 0 )