jak1: put the auto-splitting marker in C++ so it can be quickly found (#1791)

This commit is contained in:
Tyler Wilding
2022-08-23 19:14:15 -04:00
committed by GitHub
parent a1b5935655
commit 3dd10d0989
4 changed files with 16 additions and 3 deletions
+6
View File
@@ -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");
+9
View File
@@ -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
+1 -2
View File
@@ -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)
-1
View File
@@ -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!")