diff --git a/game/kernel/jak1/kmachine.cpp b/game/kernel/jak1/kmachine.cpp index a04dd4dc48..6f2b268947 100644 --- a/game/kernel/jak1/kmachine.cpp +++ b/game/kernel/jak1/kmachine.cpp @@ -292,6 +292,8 @@ void InitIOP() { } } +AutoSplitterBlock gAutoSplitterBlock; + /*! * Initialize GOAL Runtime. This is the main initialization which is called before entering * the GOAL kernel dispatch loop (KernelCheckAndDispatch). @@ -354,6 +356,10 @@ int InitMachine() { return goal_status; } + // TODO - better place to put this? + gAutoSplitterBlock.pointer_to_symbol = + (u64)g_ee_main_mem + intern_from_c("*autosplit-info-jak1*")->value; + lg::info("InitListenerConnect"); InitListenerConnect(); lg::info("InitCheckListener"); diff --git a/game/kernel/jak1/kmachine.h b/game/kernel/jak1/kmachine.h index 2d9bd9947f..c23de1a8ca 100644 --- a/game/kernel/jak1/kmachine.h +++ b/game/kernel/jak1/kmachine.h @@ -39,4 +39,13 @@ struct DiscordInfo { u32 flutflut; // are we riding on flut flut? u32 time_of_day; }; + +// To speedup finding the auto-splitter block in GOAL memory +// all this has is a marker for LiveSplit to find, and then the pointer +// to the symbol +struct AutoSplitterBlock { + const char marker[20] = "UnLiStEdStRaTs_JaK1"; + u64 pointer_to_symbol = 0; +}; +extern AutoSplitterBlock gAutoSplitterBlock; } // namespace jak1 diff --git a/goal_src/jak1/pc/features/autosplit-h.gc b/goal_src/jak1/pc/features/autosplit-h.gc index 85b5664b03..c51e29ceb8 100644 --- a/goal_src/jak1/pc/features/autosplit-h.gc +++ b/goal_src/jak1/pc/features/autosplit-h.gc @@ -7,8 +7,7 @@ ;; ;; DO NOT change the order, appending to the end is safe! (deftype autosplit-info-jak1 (structure) - ((marker uint8 20) ;; UnLiStEdStRaTs_JaK1 - DONT EVER CHANGE THIS - ;; General stats + (;; General stats (num-power-cells uint32) (num-orbs uint32) (num-scout-flies uint32) diff --git a/goal_src/jak1/pc/features/autosplit.gc b/goal_src/jak1/pc/features/autosplit.gc index c9a24c4c1c..0bbfb77250 100644 --- a/goal_src/jak1/pc/features/autosplit.gc +++ b/goal_src/jak1/pc/features/autosplit.gc @@ -3,7 +3,6 @@ (define *autosplit-info-jak1* (new 'static 'autosplit-info-jak1)) ;; Setup markers -(charp<-string (-> *autosplit-info-jak1* marker) "UnLiStEdStRaTs_JaK1") (charp<-string (-> *autosplit-info-jak1* end-marker) "end") ;; Setup Padding (charp<-string (-> *autosplit-info-jak1* padding-stats) "padding-stats!")