[Decomp] Decompile gstring (#267)

* decompile gstring

* update

* Update code_status.md

* Update code_status.md

* decompile gstate

* add test for states, hope it passes

* also test throw and catch xmms

* update doc
This commit is contained in:
water111
2021-02-16 20:37:48 -05:00
committed by GitHub
parent aa9bcd07f4
commit f1a93886e7
29 changed files with 2505 additions and 396 deletions
+6 -2
View File
@@ -21,6 +21,7 @@
#include "common/versions.h"
#include "common/goal_constants.h"
#include "common/log/log.h"
#include "common/util/Timer.h"
//! Controls link mode when EnableMethodSet = 0, MasterDebug = 1, DiskBoot = 0. Will enable a
//! warning message if EnableMethodSet = 1
@@ -1667,6 +1668,7 @@ s32 test_function(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
* This takes care of all initialization that isn't for the hardware itself.
*/
s32 InitHeapAndSymbol() {
Timer heap_init_timer;
// allocate memory for the symbol table
auto symbol_table = kmalloc(kglobalheap, 0x20000, KMALLOC_MEMSET, "symbol-table").cast<u32>();
@@ -1959,9 +1961,11 @@ s32 InitHeapAndSymbol() {
// set *boot-video-mode*
intern_from_c("*boot-video-mode*")->value = 0;
lg::info("Initialized GOAL heap in {:.2} ms", heap_init_timer.getMs());
// load the kernel!
// todo, remove MasterUseKernel
if (MasterUseKernel) {
Timer kernel_load_timer;
method_set_symbol->value++;
load_and_link_dgo_from_c("kernel", kglobalheap,
LINK_FLAG_OUTPUT_LOAD | LINK_FLAG_EXECUTE | LINK_FLAG_PRINT_LOGIN,
@@ -1979,8 +1983,8 @@ s32 InitHeapAndSymbol() {
(kernel_version >> 3) & 0xffff);
return -1;
} else {
lg::info("Got correct kernel version {}.{}", kernel_version >> 0x13,
(kernel_version >> 3) & 0xffff);
lg::info("Got correct kernel version {}.{}, loaded in {:.2} ms", kernel_version >> 0x13,
(kernel_version >> 3) & 0xffff, kernel_load_timer.getMs());
}
}