diff --git a/config/RZDE01_00/splits.txt b/config/RZDE01_00/splits.txt index aab000dae6..c3e02181c8 100644 --- a/config/RZDE01_00/splits.txt +++ b/config/RZDE01_00/splits.txt @@ -22,7 +22,7 @@ d/d_home_button.cpp: d/d_cursor_mng.cpp: .text start:0x800073D4 end:0x8000820C .data start:0x803F5618 end:0x803F5740 - .sdata start:0x80537528 end:0x80537564 + .sdata start:0x80537528 end:0x80537560 .sbss start:0x8053A728 end:0x8053A740 .sdata2 start:0x8053B9F8 end:0x8053BA10 @@ -30,15 +30,15 @@ m_Do/m_Do_main.cpp: .text start:0x8000820C end:0x80008EE8 .data start:0x803F5740 end:0x803F5B28 .bss start:0x80449B80 end:0x80449EA0 - .sdata start:0x80537564 end:0x805375C0 - .sbss start:0x8053A740 end:0x8053A768 + .sdata start:0x80537560 end:0x805375C0 + .sbss start:0x8053A740 end:0x8053A760 .sdata2 start:0x8053BA10 end:0x8053BA28 m_Do/m_Do_printf.cpp: .text start:0x80008EE8 end:0x800095CC .data start:0x803F5B28 end:0x803F5BE0 .bss start:0x80449EA0 end:0x8044A6A0 - .sbss start:0x8053A768 end:0x8053A784 + .sbss start:0x8053A760 end:0x8053A780 m_Do/m_Do_audio.cpp: .text start:0x800095CC end:0x80009F54 @@ -46,7 +46,7 @@ m_Do/m_Do_audio.cpp: .data start:0x803F5BE0 end:0x803F5E58 .bss start:0x8044A6A0 end:0x8044BA50 .sdata start:0x805375C0 end:0x8053762C - .sbss start:0x8053A784 end:0x8053A7D4 + .sbss start:0x8053A780 end:0x8053A7D4 m_Do/m_Do_controller_pad.cpp: .text start:0x80009F54 end:0x8000A364 @@ -73,7 +73,7 @@ m_Do/m_Do_machine.cpp: .text start:0x80011A34 end:0x800127A4 .data start:0x803F5E70 end:0x803F61D8 .sdata start:0x80537670 end:0x805376A0 - .sbss start:0x8053A844 end:0x8053A878 + .sbss start:0x8053A844 end:0x8053A870 .sdata2 start:0x8053BBC0 end:0x8053BBC8 m_Do/m_Do_mtx.cpp: @@ -82,6 +82,7 @@ m_Do/m_Do_mtx.cpp: .data start:0x803F61D8 end:0x803F6280 .bss start:0x80453500 end:0x80453968 .sdata start:0x805376A0 end:0x805376B0 + .sbss start:0x8053A870 end:0x8053A878 .sdata2 start:0x8053BBC8 end:0x8053BBD8 m_Do/m_Do_ext.cpp: @@ -102,7 +103,7 @@ m_Do/m_Do_lib.cpp: m_Do/m_Do_Reset.cpp: .text start:0x8001A9F8 end:0x8001ABCC - .sbss start:0x8053A8C8 end:0x8053A8E0 + .sbss start:0x8053A8C8 end:0x8053A8D0 m_Do/m_Do_dvd_thread.cpp: .text start:0x8001ABCC end:0x8001B8E8 @@ -110,10 +111,12 @@ m_Do/m_Do_dvd_thread.cpp: .data start:0x803F6A80 end:0x803F6DC8 .bss start:0x804539E0 end:0x80455D60 .sdata start:0x80537770 end:0x805377B0 + .sbss start:0x8053A8D0 end:0x8053A8D8 m_Do/m_Do_DVDError.cpp: .text start:0x8001B8E8 end:0x8001BA54 .bss start:0x80455D60 end:0x804580C0 + .sbss start:0x8053A8D8 end:0x8053A8E0 m_Do/m_Do_MemCard.cpp: .text start:0x8001BA54 end:0x8001CDAC diff --git a/config/RZDE01_00/symbols.txt b/config/RZDE01_00/symbols.txt index 5306defd1c..fde9a067c7 100644 --- a/config/RZDE01_00/symbols.txt +++ b/config/RZDE01_00/symbols.txt @@ -25994,7 +25994,7 @@ __RTTI__Q310dCsr_mng_c8bloObj_c9paneObj_c = .sdata:0x80537540; // type:object si __RTTI__Q210dCsr_mng_c5obj_c = .sdata:0x80537548; // type:object size:0x8 scope:global align:4 __RTTI__Q210dCsr_mng_c6list_c = .sdata:0x80537550; // type:object size:0x8 scope:global align:4 __RTTI__Q210dCsr_mng_c6node_c = .sdata:0x80537558; // type:object size:0x8 scope:global align:4 -lbl_80537560 = .sdata:0x80537560; // type:object size:0x1 data:byte +developmentMode__7mDoMain = .sdata:0x80537560; // type:object size:0x1 data:byte memMargin__7mDoMain = .sdata:0x80537564; // type:object size:0x4 scope:global align:4 data:4byte lbl_80537568 = .sdata:0x80537568; // type:object size:0x1 data:byte lbl_80537569 = .sdata:0x80537569; // type:object size:0x5 data:string @@ -26026,7 +26026,7 @@ __RTTI__28JASGlobalInstance<8Z2SeqMgr> = .sdata:0x80537608; // type:object size: lbl_80537610 = .sdata:0x80537610; // type:object size:0x8 data:string __RTTI__7Z2SeMgr = .sdata:0x80537618; // type:object size:0x8 scope:global align:4 __RTTI__27JASGlobalInstance<7Z2SeMgr> = .sdata:0x80537620; // type:object size:0x8 scope:global align:4 -lbl_80537628 = .sdata:0x80537628; // type:object size:0x1 data:byte +mWide__13mDoGph_gInf_c = .sdata:0x80537628; // type:object size:0x1 data:byte m_aspect__13mDoGph_gInf_c = .sdata:0x8053762C; // type:object size:0x4 scope:global align:4 data:float m_scale__13mDoGph_gInf_c = .sdata:0x80537630; // type:object size:0x4 scope:global align:4 data:float m_invScale__13mDoGph_gInf_c = .sdata:0x80537634; // type:object size:0x4 scope:global align:4 data:float @@ -28022,21 +28022,21 @@ lbl_8053A751 = .sbss:0x8053A751; // type:object size:0x1 data:byte lbl_8053A752 = .sbss:0x8053A752; // type:object size:0x1 data:byte console_scroll$90837 = .sbss:0x8053A754; // type:object size:0x4 scope:local align:4 data:float frame$90973 = .sbss:0x8053A758; // type:object size:0x4 scope:local align:4 data:4byte -lbl_8053A760 = .sbss:0x8053A760; // type:object size:0x1 data:byte -lbl_8053A761 = .sbss:0x8053A761; // type:object size:0x1 data:byte -lbl_8053A762 = .sbss:0x8053A762; // type:object size:0x1 data:byte -lbl_8053A763 = .sbss:0x8053A763; // type:object size:0x1 data:byte -lbl_8053A764 = .sbss:0x8053A764; // type:object size:0x1 data:byte +__OSReport_disable = .sbss:0x8053A760; // type:object size:0x1 data:byte +__OSReport_Error_disable = .sbss:0x8053A761; // type:object size:0x1 data:byte +__OSReport_Warning_disable = .sbss:0x8053A762; // type:object size:0x1 data:byte +__OSReport_System_disable = .sbss:0x8053A763; // type:object size:0x1 data:byte +__OSReport_enable = .sbss:0x8053A764; // type:object size:0x1 data:byte __OSReport_MonopolyThread = .sbss:0x8053A768; // type:object size:0x4 scope:global align:4 data:4byte print_counts = .sbss:0x8053A76C; // type:object size:0x4 scope:global align:4 data:4byte print_errors = .sbss:0x8053A770; // type:object size:0x4 scope:global align:4 data:4byte print_warings = .sbss:0x8053A774; // type:object size:0x4 scope:global align:4 data:4byte print_systems = .sbss:0x8053A778; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8053A77C = .sbss:0x8053A77C; // type:object size:0x1 data:byte +print_initialized = .sbss:0x8053A77C; // type:object size:0x1 data:byte lbl_8053A77D = .sbss:0x8053A77D; // type:object size:0x1 data:byte -lbl_8053A780 = .sbss:0x8053A780; // type:object size:0x1 data:byte -lbl_8053A781 = .sbss:0x8053A781; // type:object size:0x1 data:byte -lbl_8053A782 = .sbss:0x8053A782; // type:object size:0x1 data:byte +mInitFlag__17mDoAud_zelAudio_c = .sbss:0x8053A780; // type:object size:0x1 data:byte +mResetFlag__17mDoAud_zelAudio_c = .sbss:0x8053A781; // type:object size:0x1 data:byte +mBgmSet__17mDoAud_zelAudio_c = .sbss:0x8053A782; // type:object size:0x1 data:byte g_mDoAud_audioHeap = .sbss:0x8053A784; // type:object size:0x4 scope:global align:4 data:4byte l_affCommand = .sbss:0x8053A788; // type:object size:0x4 scope:global align:4 data:4byte l_arcCommand = .sbss:0x8053A78C; // type:object size:0x4 scope:global align:4 data:4byte @@ -28067,21 +28067,15 @@ mZbufferTimg__13mDoGph_gInf_c = .sbss:0x8053A7F4; // type:object size:0x4 scope: mZbufferTex__13mDoGph_gInf_c = .sbss:0x8053A7F8; // type:object size:0x4 scope:global align:4 data:4byte mFadeRate__13mDoGph_gInf_c = .sbss:0x8053A7FC; // type:object size:0x4 scope:global align:4 data:float mFadeSpeed__13mDoGph_gInf_c = .sbss:0x8053A800; // type:object size:0x4 scope:global align:4 data:float -lbl_8053A804 = .sbss:0x8053A804; // type:object size:0x1 data:byte -lbl_8053A805 = .sbss:0x8053A805; // type:object size:0x1 data:byte -lbl_8053A806 = .sbss:0x8053A806; // type:object size:0x1 data:byte -lbl_8053A807 = .sbss:0x8053A807; // type:object size:0x1 data:byte -lbl_8053A808 = .sbss:0x8053A808; // type:object size:0x1 data:byte -lbl_8053A809 = .sbss:0x8053A809; // type:object size:0x1 data:byte -lbl_8053A80A = .sbss:0x8053A80A; // type:object size:0x1 data:byte -lbl_8053A80B = .sbss:0x8053A80B; // type:object size:0x1 data:byte -lbl_8053A80C = .sbss:0x8053A80C; // type:object size:0x1 data:byte -lbl_8053A80D = .sbss:0x8053A80D; // type:object size:0x1 data:byte -lbl_8053A80E = .sbss:0x8053A80E; // type:object size:0x1 data:byte -lbl_8053A80F = .sbss:0x8053A80F; // type:object size:0x1 data:byte +mBackColor__13mDoGph_gInf_c = .sbss:0x8053A804; // type:object size:0x4 data:byte +mFadeColor__13mDoGph_gInf_c = .sbss:0x8053A808; // type:object size:0x4 data:byte +mBlureFlag__13mDoGph_gInf_c = .sbss:0x8053A80C; // type:object size:0x1 data:byte +mBlureRate__13mDoGph_gInf_c = .sbss:0x8053A80D; // type:object size:0x1 data:byte +mFade__13mDoGph_gInf_c = .sbss:0x8053A80E; // type:object size:0x1 data:byte +mAutoForcus__13mDoGph_gInf_c = .sbss:0x8053A80F; // type:object size:0x1 data:byte lbl_8053A810 = .sbss:0x8053A810; // type:object size:0x1 data:byte m_blurID__Q213mDoGph_gInf_c5csr_c = .sbss:0x8053A814; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8053A818 = .sbss:0x8053A818; // type:object size:0x1 data:byte +mWideZoom__13mDoGph_gInf_c = .sbss:0x8053A818; // type:object size:0x1 data:byte m_minX__13mDoGph_gInf_c = .sbss:0x8053A81C; // type:object size:0x4 scope:global align:4 data:4byte m_minY__13mDoGph_gInf_c = .sbss:0x8053A820; // type:object size:0x4 scope:global align:4 data:4byte m_minXF__13mDoGph_gInf_c = .sbss:0x8053A824; // type:object size:0x4 scope:global align:4 data:float @@ -28103,7 +28097,7 @@ lbl_8053A865 = .sbss:0x8053A865; // type:object size:0x1 data:byte lbl_8053A866 = .sbss:0x8053A866; // type:object size:0x1 data:byte lbl_8053A867 = .sbss:0x8053A867; // type:object size:0x1 data:byte l_oldButton$90458 = .sbss:0x8053A868; // type:object size:0x4 scope:local align:4 data:4byte -lbl_8053A870 = .sbss:0x8053A870; // type:object size:0x8 +mDoMtx_stack = .sbss:0x8053A870; // type:object size:0x1 AssertHeap = .sbss:0x8053A878; // type:object size:0x4 scope:global align:4 data:4byte DbPrintHeap = .sbss:0x8053A87C; // type:object size:0x4 scope:global align:4 data:4byte gameHeap = .sbss:0x8053A880; // type:object size:0x4 scope:global align:4 data:4byte @@ -28125,9 +28119,9 @@ aram_cache_size = .sbss:0x8053A8BC; // type:object size:0x4 scope:global align:4 mSystemFar__14mDoLib_clipper = .sbss:0x8053A8C0; // type:object size:0x4 scope:global align:4 data:float mFovyRate__14mDoLib_clipper = .sbss:0x8053A8C4; // type:object size:0x4 scope:global align:4 data:float mResetData__6mDoRst = .sbss:0x8053A8C8; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8053A8D0 = .sbss:0x8053A8D0; // type:object size:0x1 data:byte -lbl_8053A8D1 = .sbss:0x8053A8D1; // type:object size:0x7 data:byte -lbl_8053A8D8 = .sbss:0x8053A8D8; // type:object size:0x1 data:byte +SyncWidthSound__9mDoDvdThd = .sbss:0x8053A8D0; // type:object size:0x1 data:byte +sDefaultDirection = .sbss:0x8053A8D1; // type:object size:0x1 data:byte +mDoDvdErr_initialized = .sbss:0x8053A8D8; // type:object size:0x1 data:byte sConsole = .sbss:0x8053A8E0; // type:object size:0x4 scope:global align:4 data:4byte cDmr_SkipInfo = .sbss:0x8053A8E8; // type:object size:0x1 data_80450C99 = .sbss:0x8053A8E9; // type:object size:0x1 @@ -28179,10 +28173,7 @@ m_res__22dMap_HIO_prm_res_dst_s = .sbss:0x8053A9B0; // type:object size:0x4 scop m_baseCsr__13dComIfG_inf_c = .sbss:0x8053A9B8; // type:object size:0x4 scope:global align:4 data:4byte m_navi__Q213dComIfG_inf_c9baseCsr_c = .sbss:0x8053A9BC; // type:object size:0x4 scope:global align:4 data:4byte lbl_8053A9C0 = .sbss:0x8053A9C0; // type:object size:0x1 data:byte -lbl_8053A9C1 = .sbss:0x8053A9C1; // type:object size:0x1 data:byte -lbl_8053A9C2 = .sbss:0x8053A9C2; // type:object size:0x1 data:byte -lbl_8053A9C3 = .sbss:0x8053A9C3; // type:object size:0x1 data:byte -lbl_8053A9C4 = .sbss:0x8053A9C4; // type:object size:0x1 data:byte +g_clearColor = .sbss:0x8053A9C1; // type:object size:0x4 data:byte g_dComIfAc_gameInfo = .sbss:0x8053A9C8; // type:object size:0x8 scope:global align:4 g_dComIfGoat_gameInfo = .sbss:0x8053A9D0; // type:object size:0x4 scope:global align:4 data:4byte m_count__9daArrow_c = .sbss:0x8053A9D8; // type:object size:0x2 scope:global align:2 diff --git a/config/RZDE01_02/splits.txt b/config/RZDE01_02/splits.txt index b21e4f3b18..fd9550a70d 100644 --- a/config/RZDE01_02/splits.txt +++ b/config/RZDE01_02/splits.txt @@ -22,7 +22,7 @@ d/d_home_button.cpp: d/d_cursor_mng.cpp: .text start:0x800073D4 end:0x8000820C .data start:0x803E0978 end:0x803E0AA0 - .sdata start:0x8051D5A8 end:0x8051D5E4 + .sdata start:0x8051D5A8 end:0x8051D5E0 .sbss start:0x80520728 end:0x80520740 .sdata2 start:0x805219F8 end:0x80521A10 @@ -31,15 +31,15 @@ m_Do/m_Do_main.cpp: .ctors start:0x803B8C84 end:0x803B8C88 .data start:0x803E0AA0 end:0x803E0DB8 .bss start:0x80431040 end:0x804314A0 - .sdata start:0x8051D5E4 end:0x8051D660 - .sbss start:0x80520740 end:0x80520768 + .sdata start:0x8051D5E0 end:0x8051D660 + .sbss start:0x80520740 end:0x80520760 .sdata2 start:0x80521A10 end:0x80521A28 m_Do/m_Do_printf.cpp: .text start:0x80009024 end:0x8000973C .data start:0x803E0DB8 end:0x803E0E70 .bss start:0x804314A0 end:0x80431CA0 - .sbss start:0x80520768 end:0x80520784 + .sbss start:0x80520760 end:0x80520780 m_Do/m_Do_audio.cpp: .text start:0x8000973C end:0x8000A0E0 @@ -47,7 +47,7 @@ m_Do/m_Do_audio.cpp: .data start:0x803E0E70 end:0x803E10E8 .bss start:0x80431CA0 end:0x80433058 .sdata start:0x8051D660 end:0x8051D6CC - .sbss start:0x80520784 end:0x805207D4 + .sbss start:0x80520780 end:0x805207D4 m_Do/m_Do_controller_pad.cpp: .text start:0x8000A0E0 end:0x8000A4F0 @@ -74,7 +74,7 @@ m_Do/m_Do_machine.cpp: .text start:0x80011B60 end:0x80012854 .data start:0x803E1100 end:0x803E1468 .sdata start:0x8051D710 end:0x8051D740 - .sbss start:0x80520844 end:0x80520878 + .sbss start:0x80520844 end:0x80520870 .sdata2 start:0x80521BC0 end:0x80521BC8 m_Do/m_Do_mtx.cpp: @@ -83,6 +83,7 @@ m_Do/m_Do_mtx.cpp: .data start:0x803E1468 end:0x803E1500 .bss start:0x8043AB08 end:0x8043AF70 .sdata start:0x8051D740 end:0x8051D750 + .sbss start:0x80520870 end:0x80520878 .sdata2 start:0x80521BC8 end:0x80521BD8 m_Do/m_Do_ext.cpp: @@ -103,7 +104,7 @@ m_Do/m_Do_lib.cpp: m_Do/m_Do_Reset.cpp: .text start:0x8001AAB0 end:0x8001ACE0 - .sbss start:0x805208D0 end:0x805208E8 + .sbss start:0x805208D0 end:0x805208D8 m_Do/m_Do_dvd_thread.cpp: .text start:0x8001ACE0 end:0x8001B9FC @@ -111,10 +112,12 @@ m_Do/m_Do_dvd_thread.cpp: .data start:0x803E1D10 end:0x803E2058 .bss start:0x8043AFE0 end:0x8043D360 .sdata start:0x8051D810 end:0x8051D858 + .sbss start:0x805208D8 end:0x805208E0 m_Do/m_Do_DVDError.cpp: .text start:0x8001B9FC end:0x8001BB68 .bss start:0x8043D360 end:0x8043F6C0 + .sbss start:0x805208E0 end:0x805208E8 m_Do/m_Do_MemCard.cpp: .text start:0x8001BB68 end:0x8001CEC0 diff --git a/config/RZDE01_02/symbols.txt b/config/RZDE01_02/symbols.txt index 52d2eff088..7879acbfed 100644 --- a/config/RZDE01_02/symbols.txt +++ b/config/RZDE01_02/symbols.txt @@ -25565,7 +25565,7 @@ __RTTI__Q310dCsr_mng_c8bloObj_c9paneObj_c = .sdata:0x8051D5C0; // type:object si __RTTI__Q210dCsr_mng_c5obj_c = .sdata:0x8051D5C8; // type:object size:0x8 scope:global align:4 __RTTI__Q210dCsr_mng_c6list_c = .sdata:0x8051D5D0; // type:object size:0x8 scope:global align:4 __RTTI__Q210dCsr_mng_c6node_c = .sdata:0x8051D5D8; // type:object size:0x8 scope:global align:4 -lbl_8051D5E0 = .sdata:0x8051D5E0; // type:object size:0x1 data:byte +developmentMode__7mDoMain = .sdata:0x8051D5E0; // type:object size:0x1 data:byte memMargin__7mDoMain = .sdata:0x8051D5E4; // type:object size:0x4 scope:global align:4 data:4byte lbl_8051D5E8 = .sdata:0x8051D5E8; // type:object size:0x1 data:byte lbl_8051D5E9 = .sdata:0x8051D5E9; // type:object size:0x3 @@ -25602,7 +25602,7 @@ __RTTI__28JASGlobalInstance<8Z2SeqMgr> = .sdata:0x8051D6A8; // type:object size: lbl_8051D6B0 = .sdata:0x8051D6B0; // type:object size:0x8 data:string __RTTI__7Z2SeMgr = .sdata:0x8051D6B8; // type:object size:0x8 scope:global align:4 __RTTI__27JASGlobalInstance<7Z2SeMgr> = .sdata:0x8051D6C0; // type:object size:0x8 scope:global align:4 -lbl_8051D6C8 = .sdata:0x8051D6C8; // type:object size:0x1 data:byte +mWide__13mDoGph_gInf_c = .sdata:0x8051D6C8; // type:object size:0x1 data:byte m_aspect__13mDoGph_gInf_c = .sdata:0x8051D6CC; // type:object size:0x4 scope:global align:4 data:float m_scale__13mDoGph_gInf_c = .sdata:0x8051D6D0; // type:object size:0x4 scope:global align:4 data:float m_invScale__13mDoGph_gInf_c = .sdata:0x8051D6D4; // type:object size:0x4 scope:global align:4 data:float @@ -27571,21 +27571,21 @@ lbl_80520751 = .sbss:0x80520751; // type:object size:0x1 data:byte lbl_80520752 = .sbss:0x80520752; // type:object size:0x1 data:byte console_scroll$90874 = .sbss:0x80520754; // type:object size:0x4 scope:global align:4 data:float frame$91010 = .sbss:0x80520758; // type:object size:0x4 scope:global align:4 data:4byte -lbl_80520760 = .sbss:0x80520760; // type:object size:0x1 data:byte -lbl_80520761 = .sbss:0x80520761; // type:object size:0x1 data:byte -lbl_80520762 = .sbss:0x80520762; // type:object size:0x1 data:byte -lbl_80520763 = .sbss:0x80520763; // type:object size:0x1 data:byte -lbl_80520764 = .sbss:0x80520764; // type:object size:0x1 data:byte +__OSReport_disable = .sbss:0x80520760; // type:object size:0x1 data:byte +__OSReport_Error_disable = .sbss:0x80520761; // type:object size:0x1 data:byte +__OSReport_Warning_disable = .sbss:0x80520762; // type:object size:0x1 data:byte +__OSReport_System_disable = .sbss:0x80520763; // type:object size:0x1 data:byte +__OSReport_enable = .sbss:0x80520764; // type:object size:0x1 data:byte __OSReport_MonopolyThread = .sbss:0x80520768; // type:object size:0x4 scope:global align:4 data:4byte print_counts = .sbss:0x8052076C; // type:object size:0x4 scope:global align:4 data:4byte print_errors = .sbss:0x80520770; // type:object size:0x4 scope:global align:4 data:4byte print_warings = .sbss:0x80520774; // type:object size:0x4 scope:global align:4 data:4byte print_systems = .sbss:0x80520778; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8052077C = .sbss:0x8052077C; // type:object size:0x1 data:byte +print_initialized = .sbss:0x8052077C; // type:object size:0x1 data:byte lbl_8052077D = .sbss:0x8052077D; // type:object size:0x1 data:byte -lbl_80520780 = .sbss:0x80520780; // type:object size:0x1 data:byte -lbl_80520781 = .sbss:0x80520781; // type:object size:0x1 data:byte -lbl_80520782 = .sbss:0x80520782; // type:object size:0x1 data:byte +mInitFlag__17mDoAud_zelAudio_c = .sbss:0x80520780; // type:object size:0x1 data:byte +mResetFlag__17mDoAud_zelAudio_c = .sbss:0x80520781; // type:object size:0x1 data:byte +mBgmSet__17mDoAud_zelAudio_c = .sbss:0x80520782; // type:object size:0x1 data:byte g_mDoAud_audioHeap = .sbss:0x80520784; // type:object size:0x4 scope:global align:4 data:4byte l_affCommand = .sbss:0x80520788; // type:object size:0x4 scope:global align:4 data:4byte l_arcCommand = .sbss:0x8052078C; // type:object size:0x4 scope:global align:4 data:4byte @@ -27616,21 +27616,15 @@ mZbufferTimg__13mDoGph_gInf_c = .sbss:0x805207F4; // type:object size:0x4 scope: mZbufferTex__13mDoGph_gInf_c = .sbss:0x805207F8; // type:object size:0x4 scope:global align:4 data:4byte mFadeRate__13mDoGph_gInf_c = .sbss:0x805207FC; // type:object size:0x4 scope:global align:4 data:float mFadeSpeed__13mDoGph_gInf_c = .sbss:0x80520800; // type:object size:0x4 scope:global align:4 data:float -lbl_80520804 = .sbss:0x80520804; // type:object size:0x1 data:byte -lbl_80520805 = .sbss:0x80520805; // type:object size:0x1 data:byte -lbl_80520806 = .sbss:0x80520806; // type:object size:0x1 data:byte -lbl_80520807 = .sbss:0x80520807; // type:object size:0x1 data:byte -lbl_80520808 = .sbss:0x80520808; // type:object size:0x1 data:byte -lbl_80520809 = .sbss:0x80520809; // type:object size:0x1 data:byte -lbl_8052080A = .sbss:0x8052080A; // type:object size:0x1 data:byte -lbl_8052080B = .sbss:0x8052080B; // type:object size:0x1 data:byte -lbl_8052080C = .sbss:0x8052080C; // type:object size:0x1 data:byte -lbl_8052080D = .sbss:0x8052080D; // type:object size:0x1 data:byte -lbl_8052080E = .sbss:0x8052080E; // type:object size:0x1 data:byte -lbl_8052080F = .sbss:0x8052080F; // type:object size:0x1 data:byte +mBackColor__13mDoGph_gInf_c = .sbss:0x80520804; // type:object size:0x4 data:byte +mFadeColor__13mDoGph_gInf_c = .sbss:0x80520808; // type:object size:0x4 data:byte +mBlureFlag__13mDoGph_gInf_c = .sbss:0x8052080C; // type:object size:0x1 data:byte +mBlureRate__13mDoGph_gInf_c = .sbss:0x8052080D; // type:object size:0x1 data:byte +mFade__13mDoGph_gInf_c = .sbss:0x8052080E; // type:object size:0x1 data:byte +mAutoForcus__13mDoGph_gInf_c = .sbss:0x8052080F; // type:object size:0x1 data:byte lbl_80520810 = .sbss:0x80520810; // type:object size:0x1 data:byte m_blurID__Q213mDoGph_gInf_c5csr_c = .sbss:0x80520814; // type:object size:0x4 scope:global align:4 data:4byte -lbl_80520818 = .sbss:0x80520818; // type:object size:0x1 data:byte +mWideZoom__13mDoGph_gInf_c = .sbss:0x80520818; // type:object size:0x1 data:byte m_minX__13mDoGph_gInf_c = .sbss:0x8052081C; // type:object size:0x4 scope:global align:4 data:4byte m_minY__13mDoGph_gInf_c = .sbss:0x80520820; // type:object size:0x4 scope:global align:4 data:4byte m_minXF__13mDoGph_gInf_c = .sbss:0x80520824; // type:object size:0x4 scope:global align:4 data:float @@ -27652,7 +27646,7 @@ lbl_80520865 = .sbss:0x80520865; // type:object size:0x1 data:byte lbl_80520866 = .sbss:0x80520866; // type:object size:0x1 data:byte lbl_80520867 = .sbss:0x80520867; // type:object size:0x1 data:byte l_oldButton$90464 = .sbss:0x80520868; // type:object size:0x4 scope:global align:4 data:4byte -lbl_80520870 = .sbss:0x80520870; // type:object size:0x8 +mDoMtx_stack = .sbss:0x80520870; // type:object size:0x1 AssertHeap = .sbss:0x80520878; // type:object size:0x4 scope:global align:4 data:4byte DbPrintHeap = .sbss:0x8052087C; // type:object size:0x4 scope:global align:4 data:4byte gameHeap = .sbss:0x80520880; // type:object size:0x4 scope:global align:4 data:4byte @@ -27675,9 +27669,9 @@ aram_cache_size = .sbss:0x805208C0; // type:object size:0x4 scope:global align:4 mSystemFar__14mDoLib_clipper = .sbss:0x805208C8; // type:object size:0x4 scope:global align:4 data:float mFovyRate__14mDoLib_clipper = .sbss:0x805208CC; // type:object size:0x4 scope:global align:4 data:float mResetData__6mDoRst = .sbss:0x805208D0; // type:object size:0x4 scope:global align:4 data:4byte -lbl_805208D8 = .sbss:0x805208D8; // type:object size:0x1 data:byte -lbl_805208D9 = .sbss:0x805208D9; // type:object size:0x7 data:byte -lbl_805208E0 = .sbss:0x805208E0; // type:object size:0x1 data:byte +SyncWidthSound__9mDoDvdThd = .sbss:0x805208D8; // type:object size:0x1 data:byte +sDefaultDirection = .sbss:0x805208D9; // type:object size:0x1 data:byte +mDoDvdErr_initialized = .sbss:0x805208E0; // type:object size:0x1 data:byte sConsole = .sbss:0x805208E8; // type:object size:0x4 scope:global align:4 data:4byte cDmr_SkipInfo = .sbss:0x805208F0; // type:object size:0x1 data_80450C99 = .sbss:0x805208F1; // type:object size:0x1 @@ -27729,10 +27723,7 @@ m_res__22dMap_HIO_prm_res_dst_s = .sbss:0x805209B8; // type:object size:0x4 scop m_baseCsr__13dComIfG_inf_c = .sbss:0x805209C0; // type:object size:0x4 scope:global align:4 data:4byte m_navi__Q213dComIfG_inf_c9baseCsr_c = .sbss:0x805209C4; // type:object size:0x4 scope:global align:4 data:4byte lbl_805209C8 = .sbss:0x805209C8; // type:object size:0x1 data:byte -lbl_805209C9 = .sbss:0x805209C9; // type:object size:0x1 data:byte -lbl_805209CA = .sbss:0x805209CA; // type:object size:0x1 data:byte -lbl_805209CB = .sbss:0x805209CB; // type:object size:0x1 data:byte -lbl_805209CC = .sbss:0x805209CC; // type:object size:0x1 data:byte +g_clearColor = .sbss:0x805209C9; // type:object size:0x4 data:byte g_dComIfAc_gameInfo = .sbss:0x805209D0; // type:object size:0x8 scope:global align:4 g_dComIfGoat_gameInfo = .sbss:0x805209D8; // type:object size:0x4 scope:global align:4 data:4byte m_count__9daArrow_c = .sbss:0x805209E0; // type:object size:0x2 scope:global align:4 diff --git a/config/RZDJ01/splits.txt b/config/RZDJ01/splits.txt index 369d7443b3..0e7e729f00 100644 --- a/config/RZDJ01/splits.txt +++ b/config/RZDJ01/splits.txt @@ -22,7 +22,7 @@ d/d_home_button.cpp: d/d_cursor_mng.cpp: .text start:0x800073D4 end:0x8000820C .data start:0x803DE938 end:0x803DEA60 - .sdata start:0x8051B428 end:0x8051B464 + .sdata start:0x8051B428 end:0x8051B460 .sbss start:0x8051E5A8 end:0x8051E5C0 .sdata2 start:0x8051F878 end:0x8051F890 @@ -31,15 +31,15 @@ m_Do/m_Do_main.cpp: .ctors start:0x803BA744 end:0x803BA748 .data start:0x803DEA60 end:0x803DED78 .bss start:0x8042EEC0 end:0x8042F320 - .sdata start:0x8051B464 end:0x8051B4E0 - .sbss start:0x8051E5C0 end:0x8051E5E8 + .sdata start:0x8051B460 end:0x8051B4E0 + .sbss start:0x8051E5C0 end:0x8051E5E0 .sdata2 start:0x8051F890 end:0x8051F8A8 m_Do/m_Do_printf.cpp: .text start:0x80009024 end:0x8000973C .data start:0x803DED78 end:0x803DEE30 .bss start:0x8042F320 end:0x8042FB20 - .sbss start:0x8051E5E8 end:0x8051E604 + .sbss start:0x8051E5E0 end:0x8051E600 m_Do/m_Do_audio.cpp: .text start:0x8000973C end:0x8000A0E0 @@ -47,7 +47,7 @@ m_Do/m_Do_audio.cpp: .data start:0x803DEE30 end:0x803DF0A8 .bss start:0x8042FB20 end:0x80430ED8 .sdata start:0x8051B4E0 end:0x8051B54C - .sbss start:0x8051E604 end:0x8051E654 + .sbss start:0x8051E600 end:0x8051E654 m_Do/m_Do_controller_pad.cpp: .text start:0x8000A0E0 end:0x8000A4F0 @@ -74,7 +74,7 @@ m_Do/m_Do_machine.cpp: .text start:0x80011B60 end:0x800128D0 .data start:0x803DF0C0 end:0x803DF428 .sdata start:0x8051B590 end:0x8051B5C0 - .sbss start:0x8051E6C4 end:0x8051E6F8 + .sbss start:0x8051E6C4 end:0x8051E6F0 .sdata2 start:0x8051FA40 end:0x8051FA48 m_Do/m_Do_mtx.cpp: @@ -83,6 +83,7 @@ m_Do/m_Do_mtx.cpp: .data start:0x803DF428 end:0x803DF4C0 .bss start:0x80438988 end:0x80438DF0 .sdata start:0x8051B5C0 end:0x8051B5D0 + .sbss start:0x8051E6F0 end:0x8051E6F8 .sdata2 start:0x8051FA48 end:0x8051FA58 m_Do/m_Do_ext.cpp: @@ -103,7 +104,7 @@ m_Do/m_Do_lib.cpp: m_Do/m_Do_Reset.cpp: .text start:0x8001AB2C end:0x8001AD5C - .sbss start:0x8051E750 end:0x8051E768 + .sbss start:0x8051E750 end:0x8051E758 m_Do/m_Do_dvd_thread.cpp: .text start:0x8001AD5C end:0x8001BA78 @@ -111,10 +112,12 @@ m_Do/m_Do_dvd_thread.cpp: .data start:0x803DFCD0 end:0x803E0018 .bss start:0x80438E60 end:0x8043B1E0 .sdata start:0x8051B690 end:0x8051B6D8 + .sbss start:0x8051E758 end:0x8051E760 m_Do/m_Do_DVDError.cpp: .text start:0x8001BA78 end:0x8001BBE4 .bss start:0x8043B1E0 end:0x8043D540 + .sbss start:0x8051E760 end:0x8051E768 m_Do/m_Do_MemCard.cpp: .text start:0x8001BBE4 end:0x8001CF3C diff --git a/config/RZDJ01/symbols.txt b/config/RZDJ01/symbols.txt index 10abb5cd2f..c0d0fdf6ba 100644 --- a/config/RZDJ01/symbols.txt +++ b/config/RZDJ01/symbols.txt @@ -25567,7 +25567,7 @@ __RTTI__Q310dCsr_mng_c8bloObj_c9paneObj_c = .sdata:0x8051B440; // type:object si __RTTI__Q210dCsr_mng_c5obj_c = .sdata:0x8051B448; // type:object size:0x8 scope:global align:4 __RTTI__Q210dCsr_mng_c6list_c = .sdata:0x8051B450; // type:object size:0x8 scope:global align:4 __RTTI__Q210dCsr_mng_c6node_c = .sdata:0x8051B458; // type:object size:0x8 scope:global align:4 -lbl_8051B460 = .sdata:0x8051B460; // type:object size:0x1 data:byte +developmentMode__7mDoMain = .sdata:0x8051B460; // type:object size:0x1 data:byte memMargin__7mDoMain = .sdata:0x8051B464; // type:object size:0x4 scope:global align:4 data:4byte lbl_8051B468 = .sdata:0x8051B468; // type:object size:0x1 data:byte lbl_8051B469 = .sdata:0x8051B469; // type:object size:0x3 @@ -25604,7 +25604,7 @@ __RTTI__28JASGlobalInstance<8Z2SeqMgr> = .sdata:0x8051B528; // type:object size: lbl_8051B530 = .sdata:0x8051B530; // type:object size:0x8 data:string __RTTI__7Z2SeMgr = .sdata:0x8051B538; // type:object size:0x8 scope:global align:4 __RTTI__27JASGlobalInstance<7Z2SeMgr> = .sdata:0x8051B540; // type:object size:0x8 scope:global align:4 -lbl_8051B548 = .sdata:0x8051B548; // type:object size:0x1 data:byte +mWide__13mDoGph_gInf_c = .sdata:0x8051B548; // type:object size:0x1 data:byte m_aspect__13mDoGph_gInf_c = .sdata:0x8051B54C; // type:object size:0x4 scope:global align:4 data:float m_scale__13mDoGph_gInf_c = .sdata:0x8051B550; // type:object size:0x4 scope:global align:4 data:float m_invScale__13mDoGph_gInf_c = .sdata:0x8051B554; // type:object size:0x4 scope:global align:4 data:float @@ -27577,21 +27577,21 @@ lbl_8051E5D1 = .sbss:0x8051E5D1; // type:object size:0x1 data:byte lbl_8051E5D2 = .sbss:0x8051E5D2; // type:object size:0x1 data:byte console_scroll$90874 = .sbss:0x8051E5D4; // type:object size:0x4 scope:local align:4 data:float frame$91010 = .sbss:0x8051E5D8; // type:object size:0x4 scope:local align:4 data:4byte -lbl_8051E5E0 = .sbss:0x8051E5E0; // type:object size:0x1 data:byte -lbl_8051E5E1 = .sbss:0x8051E5E1; // type:object size:0x1 data:byte -lbl_8051E5E2 = .sbss:0x8051E5E2; // type:object size:0x1 data:byte -lbl_8051E5E3 = .sbss:0x8051E5E3; // type:object size:0x1 data:byte -lbl_8051E5E4 = .sbss:0x8051E5E4; // type:object size:0x1 data:byte +__OSReport_disable = .sbss:0x8051E5E0; // type:object size:0x1 data:byte +__OSReport_Error_disable = .sbss:0x8051E5E1; // type:object size:0x1 data:byte +__OSReport_Warning_disable = .sbss:0x8051E5E2; // type:object size:0x1 data:byte +__OSReport_System_disable = .sbss:0x8051E5E3; // type:object size:0x1 data:byte +__OSReport_enable = .sbss:0x8051E5E4; // type:object size:0x1 data:byte __OSReport_MonopolyThread = .sbss:0x8051E5E8; // type:object size:0x4 scope:global align:4 data:4byte print_counts = .sbss:0x8051E5EC; // type:object size:0x4 scope:global align:4 data:4byte print_errors = .sbss:0x8051E5F0; // type:object size:0x4 scope:global align:4 data:4byte print_warings = .sbss:0x8051E5F4; // type:object size:0x4 scope:global align:4 data:4byte print_systems = .sbss:0x8051E5F8; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8051E5FC = .sbss:0x8051E5FC; // type:object size:0x1 data:byte +print_initialized = .sbss:0x8051E5FC; // type:object size:0x1 data:byte lbl_8051E5FD = .sbss:0x8051E5FD; // type:object size:0x1 data:byte -lbl_8051E600 = .sbss:0x8051E600; // type:object size:0x1 data:byte -lbl_8051E601 = .sbss:0x8051E601; // type:object size:0x1 data:byte -lbl_8051E602 = .sbss:0x8051E602; // type:object size:0x1 data:byte +mInitFlag__17mDoAud_zelAudio_c = .sbss:0x8051E600; // type:object size:0x1 data:byte +mResetFlag__17mDoAud_zelAudio_c = .sbss:0x8051E601; // type:object size:0x1 data:byte +mBgmSet__17mDoAud_zelAudio_c = .sbss:0x8051E602; // type:object size:0x1 data:byte g_mDoAud_audioHeap = .sbss:0x8051E604; // type:object size:0x4 scope:global align:4 data:4byte l_affCommand = .sbss:0x8051E608; // type:object size:0x4 scope:global align:4 data:4byte l_arcCommand = .sbss:0x8051E60C; // type:object size:0x4 scope:global align:4 data:4byte @@ -27622,21 +27622,15 @@ mZbufferTimg__13mDoGph_gInf_c = .sbss:0x8051E674; // type:object size:0x4 scope: mZbufferTex__13mDoGph_gInf_c = .sbss:0x8051E678; // type:object size:0x4 scope:global align:4 data:4byte mFadeRate__13mDoGph_gInf_c = .sbss:0x8051E67C; // type:object size:0x4 scope:global align:4 data:float mFadeSpeed__13mDoGph_gInf_c = .sbss:0x8051E680; // type:object size:0x4 scope:global align:4 data:float -lbl_8051E684 = .sbss:0x8051E684; // type:object size:0x1 data:byte -lbl_8051E685 = .sbss:0x8051E685; // type:object size:0x1 data:byte -lbl_8051E686 = .sbss:0x8051E686; // type:object size:0x1 data:byte -lbl_8051E687 = .sbss:0x8051E687; // type:object size:0x1 data:byte -lbl_8051E688 = .sbss:0x8051E688; // type:object size:0x1 data:byte -lbl_8051E689 = .sbss:0x8051E689; // type:object size:0x1 data:byte -lbl_8051E68A = .sbss:0x8051E68A; // type:object size:0x1 data:byte -lbl_8051E68B = .sbss:0x8051E68B; // type:object size:0x1 data:byte -lbl_8051E68C = .sbss:0x8051E68C; // type:object size:0x1 data:byte -lbl_8051E68D = .sbss:0x8051E68D; // type:object size:0x1 data:byte -lbl_8051E68E = .sbss:0x8051E68E; // type:object size:0x1 data:byte -lbl_8051E68F = .sbss:0x8051E68F; // type:object size:0x1 data:byte +mBackColor__13mDoGph_gInf_c = .sbss:0x8051E684; // type:object size:0x4 data:byte +mFadeColor__13mDoGph_gInf_c = .sbss:0x8051E688; // type:object size:0x4 data:byte +mBlureFlag__13mDoGph_gInf_c = .sbss:0x8051E68C; // type:object size:0x1 data:byte +mBlureRate__13mDoGph_gInf_c = .sbss:0x8051E68D; // type:object size:0x1 data:byte +mFade__13mDoGph_gInf_c = .sbss:0x8051E68E; // type:object size:0x1 data:byte +mAutoForcus__13mDoGph_gInf_c = .sbss:0x8051E68F; // type:object size:0x1 data:byte lbl_8051E690 = .sbss:0x8051E690; // type:object size:0x1 data:byte m_blurID__Q213mDoGph_gInf_c5csr_c = .sbss:0x8051E694; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8051E698 = .sbss:0x8051E698; // type:object size:0x1 data:byte +mWideZoom__13mDoGph_gInf_c = .sbss:0x8051E698; // type:object size:0x1 data:byte m_minX__13mDoGph_gInf_c = .sbss:0x8051E69C; // type:object size:0x4 scope:global align:4 data:4byte m_minY__13mDoGph_gInf_c = .sbss:0x8051E6A0; // type:object size:0x4 scope:global align:4 data:4byte m_minXF__13mDoGph_gInf_c = .sbss:0x8051E6A4; // type:object size:0x4 scope:global align:4 data:float @@ -27658,7 +27652,7 @@ lbl_8051E6E5 = .sbss:0x8051E6E5; // type:object size:0x1 data:byte lbl_8051E6E6 = .sbss:0x8051E6E6; // type:object size:0x1 data:byte lbl_8051E6E7 = .sbss:0x8051E6E7; // type:object size:0x1 data:byte l_oldButton$90464 = .sbss:0x8051E6E8; // type:object size:0x4 scope:local align:4 data:4byte -lbl_8051E6F0 = .sbss:0x8051E6F0; // type:object size:0x8 +mDoMtx_stack = .sbss:0x8051E6F0; // type:object size:0x1 AssertHeap = .sbss:0x8051E6F8; // type:object size:0x4 scope:global align:4 data:4byte DbPrintHeap = .sbss:0x8051E6FC; // type:object size:0x4 scope:global align:4 data:4byte gameHeap = .sbss:0x8051E700; // type:object size:0x4 scope:global align:4 data:4byte @@ -27681,9 +27675,9 @@ aram_cache_size = .sbss:0x8051E740; // type:object size:0x4 scope:global align:4 mSystemFar__14mDoLib_clipper = .sbss:0x8051E748; // type:object size:0x4 scope:global align:4 data:float mFovyRate__14mDoLib_clipper = .sbss:0x8051E74C; // type:object size:0x4 scope:global align:4 data:float mResetData__6mDoRst = .sbss:0x8051E750; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8051E758 = .sbss:0x8051E758; // type:object size:0x1 data:byte -lbl_8051E759 = .sbss:0x8051E759; // type:object size:0x7 data:byte -lbl_8051E760 = .sbss:0x8051E760; // type:object size:0x1 data:byte +SyncWidthSound__9mDoDvdThd = .sbss:0x8051E758; // type:object size:0x1 data:byte +sDefaultDirection = .sbss:0x8051E759; // type:object size:0x1 data:byte +mDoDvdErr_initialized = .sbss:0x8051E760; // type:object size:0x1 data:byte sConsole = .sbss:0x8051E768; // type:object size:0x4 scope:global align:4 data:4byte lbl_8051E770 = .sbss:0x8051E770; // type:object size:0x1 lbl_8051E771 = .sbss:0x8051E771; // type:object size:0x1 @@ -27735,10 +27729,7 @@ m_res__22dMap_HIO_prm_res_dst_s = .sbss:0x8051E838; // type:object size:0x4 scop m_baseCsr__13dComIfG_inf_c = .sbss:0x8051E840; // type:object size:0x4 scope:global align:4 data:4byte m_navi__Q213dComIfG_inf_c9baseCsr_c = .sbss:0x8051E844; // type:object size:0x4 scope:global align:4 data:4byte lbl_8051E848 = .sbss:0x8051E848; // type:object size:0x1 data:byte -lbl_8051E849 = .sbss:0x8051E849; // type:object size:0x1 data:byte -lbl_8051E84A = .sbss:0x8051E84A; // type:object size:0x1 data:byte -lbl_8051E84B = .sbss:0x8051E84B; // type:object size:0x1 data:byte -lbl_8051E84C = .sbss:0x8051E84C; // type:object size:0x1 data:byte +g_clearColor = .sbss:0x8051E849; // type:object size:0x4 data:byte g_dComIfAc_gameInfo = .sbss:0x8051E850; // type:object size:0x8 scope:global align:4 g_dComIfGoat_gameInfo = .sbss:0x8051E858; // type:object size:0x4 scope:global align:4 data:4byte m_count__9daArrow_c = .sbss:0x8051E860; // type:object size:0x2 scope:global align:4 diff --git a/config/RZDP01/splits.txt b/config/RZDP01/splits.txt index d2aa84a2e7..58492fa089 100644 --- a/config/RZDP01/splits.txt +++ b/config/RZDP01/splits.txt @@ -22,7 +22,7 @@ d/d_home_button.cpp: d/d_cursor_mng.cpp: .text start:0x800073D4 end:0x8000820C .data start:0x803E1698 end:0x803E17C0 - .sdata start:0x8051DEA8 end:0x8051DEE4 + .sdata start:0x8051DEA8 end:0x8051DEE0 .sbss start:0x80520EE8 end:0x80520F00 .sdata2 start:0x805221B8 end:0x805221D0 @@ -31,15 +31,15 @@ m_Do/m_Do_main.cpp: .ctors start:0x803B9104 end:0x803B9108 .data start:0x803E17C0 end:0x803E1AD8 .bss start:0x80431940 end:0x80431DA0 - .sdata start:0x8051DEE4 end:0x8051DF60 - .sbss start:0x80520F00 end:0x80520F28 + .sdata start:0x8051DEE0 end:0x8051DF60 + .sbss start:0x80520F00 end:0x80520F20 .sdata2 start:0x805221D0 end:0x805221E8 m_Do/m_Do_printf.cpp: .text start:0x80009024 end:0x80009704 .data start:0x803E1AD8 end:0x803E1B90 .bss start:0x80431DA0 end:0x804325A0 - .sbss start:0x80520F28 end:0x80520F44 + .sbss start:0x80520F20 end:0x80520F40 m_Do/m_Do_audio.cpp: .text start:0x80009704 end:0x8000A0A8 @@ -47,7 +47,7 @@ m_Do/m_Do_audio.cpp: .data start:0x803E1B90 end:0x803E1E08 .bss start:0x804325A0 end:0x80433958 .sdata start:0x8051DF60 end:0x8051DFCC - .sbss start:0x80520F44 end:0x80520F94 + .sbss start:0x80520F40 end:0x80520F94 m_Do/m_Do_controller_pad.cpp: .text start:0x8000A0A8 end:0x8000A4B8 @@ -74,7 +74,7 @@ m_Do/m_Do_machine.cpp: .text start:0x80011B28 end:0x80012844 .data start:0x803E1E20 end:0x803E21C0 .sdata start:0x8051E010 end:0x8051E040 - .sbss start:0x80521004 end:0x80521038 + .sbss start:0x80521004 end:0x80521030 .sdata2 start:0x80522380 end:0x80522388 m_Do/m_Do_mtx.cpp: @@ -83,6 +83,7 @@ m_Do/m_Do_mtx.cpp: .data start:0x803E21C0 end:0x803E2260 .bss start:0x8043B408 end:0x8043B870 .sdata start:0x8051E040 end:0x8051E050 + .sbss start:0x80521030 end:0x80521038 .sdata2 start:0x80522388 end:0x80522398 m_Do/m_Do_ext.cpp: @@ -103,7 +104,7 @@ m_Do/m_Do_lib.cpp: m_Do/m_Do_Reset.cpp: .text start:0x8001AAA0 end:0x8001ACD0 - .sbss start:0x80521090 end:0x805210A8 + .sbss start:0x80521090 end:0x80521098 m_Do/m_Do_dvd_thread.cpp: .text start:0x8001ACD0 end:0x8001B9EC @@ -111,10 +112,12 @@ m_Do/m_Do_dvd_thread.cpp: .data start:0x803E2A70 end:0x803E2DB8 .bss start:0x8043B8E0 end:0x8043DC60 .sdata start:0x8051E110 end:0x8051E158 + .sbss start:0x80521098 end:0x805210A0 m_Do/m_Do_DVDError.cpp: .text start:0x8001B9EC end:0x8001BB58 .bss start:0x8043DC60 end:0x8043FFC0 + .sbss start:0x805210A0 end:0x805210A8 m_Do/m_Do_MemCard.cpp: .text start:0x8001BB58 end:0x8001CEB0 diff --git a/config/RZDP01/symbols.txt b/config/RZDP01/symbols.txt index 960a28899a..f09f341b02 100644 --- a/config/RZDP01/symbols.txt +++ b/config/RZDP01/symbols.txt @@ -25561,7 +25561,7 @@ __RTTI__Q310dCsr_mng_c8bloObj_c9paneObj_c = .sdata:0x8051DEC0; // type:object si __RTTI__Q210dCsr_mng_c5obj_c = .sdata:0x8051DEC8; // type:object size:0x8 scope:global align:4 __RTTI__Q210dCsr_mng_c6list_c = .sdata:0x8051DED0; // type:object size:0x8 scope:global align:4 __RTTI__Q210dCsr_mng_c6node_c = .sdata:0x8051DED8; // type:object size:0x8 scope:global align:4 -lbl_8051DEE0 = .sdata:0x8051DEE0; // type:object size:0x1 data:byte +developmentMode__7mDoMain = .sdata:0x8051DEE0; // type:object size:0x1 data:byte memMargin__7mDoMain = .sdata:0x8051DEE4; // type:object size:0x4 scope:global align:4 data:4byte lbl_8051DEE8 = .sdata:0x8051DEE8; // type:object size:0x1 data:byte lbl_8051DEE9 = .sdata:0x8051DEE9; // type:object size:0x3 @@ -25598,7 +25598,7 @@ __RTTI__28JASGlobalInstance<8Z2SeqMgr> = .sdata:0x8051DFA8; // type:object size: lbl_8051DFB0 = .sdata:0x8051DFB0; // type:object size:0x8 data:string __RTTI__7Z2SeMgr = .sdata:0x8051DFB8; // type:object size:0x8 scope:global align:4 __RTTI__27JASGlobalInstance<7Z2SeMgr> = .sdata:0x8051DFC0; // type:object size:0x8 scope:global align:4 -lbl_8051DFC8 = .sdata:0x8051DFC8; // type:object size:0x1 data:byte +mWide__13mDoGph_gInf_c = .sdata:0x8051DFC8; // type:object size:0x1 data:byte m_aspect__13mDoGph_gInf_c = .sdata:0x8051DFCC; // type:object size:0x4 scope:global align:4 data:float m_scale__13mDoGph_gInf_c = .sdata:0x8051DFD0; // type:object size:0x4 scope:global align:4 data:float m_invScale__13mDoGph_gInf_c = .sdata:0x8051DFD4; // type:object size:0x4 scope:global align:4 data:float @@ -27462,21 +27462,21 @@ lbl_80520F11 = .sbss:0x80520F11; // type:object size:0x1 data:byte lbl_80520F12 = .sbss:0x80520F12; // type:object size:0x1 data:byte console_scroll$90877 = .sbss:0x80520F14; // type:object size:0x4 scope:local align:4 data:float frame$91013 = .sbss:0x80520F18; // type:object size:0x4 scope:local align:4 data:4byte -lbl_80520F20 = .sbss:0x80520F20; // type:object size:0x1 data:byte -lbl_80520F21 = .sbss:0x80520F21; // type:object size:0x1 data:byte -lbl_80520F22 = .sbss:0x80520F22; // type:object size:0x1 data:byte -lbl_80520F23 = .sbss:0x80520F23; // type:object size:0x1 data:byte -lbl_80520F24 = .sbss:0x80520F24; // type:object size:0x1 data:byte +__OSReport_disable = .sbss:0x80520F20; // type:object size:0x1 data:byte +__OSReport_Error_disable = .sbss:0x80520F21; // type:object size:0x1 data:byte +__OSReport_Warning_disable = .sbss:0x80520F22; // type:object size:0x1 data:byte +__OSReport_System_disable = .sbss:0x80520F23; // type:object size:0x1 data:byte +__OSReport_enable = .sbss:0x80520F24; // type:object size:0x1 data:byte __OSReport_MonopolyThread = .sbss:0x80520F28; // type:object size:0x4 scope:global align:4 data:4byte print_counts = .sbss:0x80520F2C; // type:object size:0x4 scope:global align:4 data:4byte print_errors = .sbss:0x80520F30; // type:object size:0x4 scope:global align:4 data:4byte print_warings = .sbss:0x80520F34; // type:object size:0x4 scope:global align:4 data:4byte print_systems = .sbss:0x80520F38; // type:object size:0x4 scope:global align:4 data:4byte -lbl_80520F3C = .sbss:0x80520F3C; // type:object size:0x1 data:byte +print_initialized = .sbss:0x80520F3C; // type:object size:0x1 data:byte lbl_80520F3D = .sbss:0x80520F3D; // type:object size:0x1 data:byte -lbl_80520F40 = .sbss:0x80520F40; // type:object size:0x1 data:byte -lbl_80520F41 = .sbss:0x80520F41; // type:object size:0x1 data:byte -lbl_80520F42 = .sbss:0x80520F42; // type:object size:0x1 data:byte +mInitFlag__17mDoAud_zelAudio_c = .sbss:0x80520F40; // type:object size:0x1 data:byte +mResetFlag__17mDoAud_zelAudio_c = .sbss:0x80520F41; // type:object size:0x1 data:byte +mBgmSet__17mDoAud_zelAudio_c = .sbss:0x80520F42; // type:object size:0x1 data:byte g_mDoAud_audioHeap = .sbss:0x80520F44; // type:object size:0x4 scope:global align:4 data:4byte l_affCommand = .sbss:0x80520F48; // type:object size:0x4 scope:global align:4 data:4byte l_arcCommand = .sbss:0x80520F4C; // type:object size:0x4 scope:global align:4 data:4byte @@ -27507,21 +27507,15 @@ mZbufferTimg__13mDoGph_gInf_c = .sbss:0x80520FB4; // type:object size:0x4 scope: mZbufferTex__13mDoGph_gInf_c = .sbss:0x80520FB8; // type:object size:0x4 scope:global align:4 data:4byte mFadeRate__13mDoGph_gInf_c = .sbss:0x80520FBC; // type:object size:0x4 scope:global align:4 data:float mFadeSpeed__13mDoGph_gInf_c = .sbss:0x80520FC0; // type:object size:0x4 scope:global align:4 data:float -lbl_80520FC4 = .sbss:0x80520FC4; // type:object size:0x1 data:byte -lbl_80520FC5 = .sbss:0x80520FC5; // type:object size:0x1 data:byte -lbl_80520FC6 = .sbss:0x80520FC6; // type:object size:0x1 data:byte -lbl_80520FC7 = .sbss:0x80520FC7; // type:object size:0x1 data:byte -lbl_80520FC8 = .sbss:0x80520FC8; // type:object size:0x1 data:byte -lbl_80520FC9 = .sbss:0x80520FC9; // type:object size:0x1 data:byte -lbl_80520FCA = .sbss:0x80520FCA; // type:object size:0x1 data:byte -lbl_80520FCB = .sbss:0x80520FCB; // type:object size:0x1 data:byte -lbl_80520FCC = .sbss:0x80520FCC; // type:object size:0x1 data:byte -lbl_80520FCD = .sbss:0x80520FCD; // type:object size:0x1 data:byte -lbl_80520FCE = .sbss:0x80520FCE; // type:object size:0x1 data:byte -lbl_80520FCF = .sbss:0x80520FCF; // type:object size:0x1 data:byte +mBackColor__13mDoGph_gInf_c = .sbss:0x80520FC4; // type:object size:0x4 data:byte +mFadeColor__13mDoGph_gInf_c = .sbss:0x80520FC8; // type:object size:0x4 data:byte +mBlureFlag__13mDoGph_gInf_c = .sbss:0x80520FCC; // type:object size:0x1 data:byte +mBlureRate__13mDoGph_gInf_c = .sbss:0x80520FCD; // type:object size:0x1 data:byte +mFade__13mDoGph_gInf_c = .sbss:0x80520FCE; // type:object size:0x1 data:byte +mAutoForcus__13mDoGph_gInf_c = .sbss:0x80520FCF; // type:object size:0x1 data:byte lbl_80520FD0 = .sbss:0x80520FD0; // type:object size:0x1 data:byte m_blurID__Q213mDoGph_gInf_c5csr_c = .sbss:0x80520FD4; // type:object size:0x4 scope:global align:4 data:4byte -lbl_80520FD8 = .sbss:0x80520FD8; // type:object size:0x1 data:byte +mWideZoom__13mDoGph_gInf_c = .sbss:0x80520FD8; // type:object size:0x1 data:byte m_minX__13mDoGph_gInf_c = .sbss:0x80520FDC; // type:object size:0x4 scope:global align:4 data:4byte m_minY__13mDoGph_gInf_c = .sbss:0x80520FE0; // type:object size:0x4 scope:global align:4 data:4byte m_minXF__13mDoGph_gInf_c = .sbss:0x80520FE4; // type:object size:0x4 scope:global align:4 data:float @@ -27543,7 +27537,7 @@ lbl_80521025 = .sbss:0x80521025; // type:object size:0x1 data:byte lbl_80521026 = .sbss:0x80521026; // type:object size:0x1 data:byte lbl_80521027 = .sbss:0x80521027; // type:object size:0x1 data:byte l_oldButton$90467 = .sbss:0x80521028; // type:object size:0x4 scope:local align:4 data:4byte -lbl_80521030 = .sbss:0x80521030; // type:object size:0x8 +mDoMtx_stack = .sbss:0x80521030; // type:object size:0x1 AssertHeap = .sbss:0x80521038; // type:object size:0x4 scope:global align:4 data:4byte DbPrintHeap = .sbss:0x8052103C; // type:object size:0x4 scope:global align:4 data:4byte gameHeap = .sbss:0x80521040; // type:object size:0x4 scope:global align:4 data:4byte @@ -27566,9 +27560,9 @@ aram_cache_size = .sbss:0x80521080; // type:object size:0x4 scope:global align:4 mSystemFar__14mDoLib_clipper = .sbss:0x80521088; // type:object size:0x4 scope:global align:4 data:float mFovyRate__14mDoLib_clipper = .sbss:0x8052108C; // type:object size:0x4 scope:global align:4 data:float mResetData__6mDoRst = .sbss:0x80521090; // type:object size:0x4 scope:global align:4 data:4byte -lbl_80521098 = .sbss:0x80521098; // type:object size:0x1 data:byte -lbl_80521099 = .sbss:0x80521099; // type:object size:0x7 data:byte -lbl_805210A0 = .sbss:0x805210A0; // type:object size:0x1 data:byte +SyncWidthSound__9mDoDvdThd = .sbss:0x80521098; // type:object size:0x1 data:byte +sDefaultDirection = .sbss:0x80521099; // type:object size:0x1 data:byte +mDoDvdErr_initialized = .sbss:0x805210A0; // type:object size:0x1 data:byte sConsole = .sbss:0x805210A8; // type:object size:0x4 scope:global align:4 data:4byte lbl_805210B0 = .sbss:0x805210B0; // type:object size:0x1 lbl_805210B1 = .sbss:0x805210B1; // type:object size:0x1 @@ -27620,10 +27614,7 @@ m_res__22dMap_HIO_prm_res_dst_s = .sbss:0x80521178; // type:object size:0x4 scop m_baseCsr__13dComIfG_inf_c = .sbss:0x80521180; // type:object size:0x4 scope:global align:4 data:4byte m_navi__Q213dComIfG_inf_c9baseCsr_c = .sbss:0x80521184; // type:object size:0x4 scope:global align:4 data:4byte lbl_80521188 = .sbss:0x80521188; // type:object size:0x1 data:byte -lbl_80521189 = .sbss:0x80521189; // type:object size:0x1 data:byte -lbl_8052118A = .sbss:0x8052118A; // type:object size:0x1 data:byte -lbl_8052118B = .sbss:0x8052118B; // type:object size:0x1 data:byte -lbl_8052118C = .sbss:0x8052118C; // type:object size:0x1 data:byte +g_clearColor = .sbss:0x80521189; // type:object size:0x4 data:byte g_dComIfAc_gameInfo = .sbss:0x80521190; // type:object size:0x8 scope:global align:4 g_dComIfGoat_gameInfo = .sbss:0x80521198; // type:object size:0x4 scope:global align:4 data:4byte m_count__9daArrow_c = .sbss:0x805211A0; // type:object size:0x2 scope:global align:4 diff --git a/config/ShieldD/splits.txt b/config/ShieldD/splits.txt index f36560019e..82a639da92 100644 --- a/config/ShieldD/splits.txt +++ b/config/ShieldD/splits.txt @@ -103,18 +103,19 @@ m_Do/m_Do_Reset.cpp: .text start:0x8002BAE0 end:0x8002BE60 .data start:0x806641F0 end:0x80664238 .sdata start:0x8073F628 end:0x8073F630 - .sbss start:0x8074C428 end:0x8074C434 + .sbss start:0x8074C428 end:0x8074C430 m_Do/m_Do_dvd_thread.cpp: .text start:0x8002BE60 end:0x8002D590 .ctors start:0x8062F7DC end:0x8062F7E0 .data start:0x80664238 end:0x80664A10 .sdata start:0x8073F630 end:0x8073F688 - .sbss start:0x8074C434 end:0x8074C450 + .sbss start:0x8074C430 end:0x8074C448 .bss start:0x80756800 end:0x80758B80 m_Do/m_Do_DVDError.cpp: .text start:0x8002D590 end:0x8002D740 + .sbss start:0x8074C448 end:0x8074C450 .bss start:0x80758B80 end:0x8075AEE0 m_Do/m_Do_MemCard.cpp: diff --git a/config/ShieldD/symbols.txt b/config/ShieldD/symbols.txt index cba07a4591..25bbe3bb43 100644 --- a/config/ShieldD/symbols.txt +++ b/config/ShieldD/symbols.txt @@ -32830,7 +32830,9 @@ __vt__19mDoDvdThd_command_c = .data:0x80664998; // type:object size:0x10 scope:g @114927 = .data:0x806649A8; // type:object size:0x14 scope:local data:string hash:0xAC9323CD @114928 = .data:0x806649BC; // type:object size:0xC scope:local hash:0xAC9323C2 @114929 = .data:0x806649C8; // type:object size:0xB scope:local data:string hash:0xAC9323C3 -lbl_806649D3 = .data:0x806649D3; // type:object size:0x3D +lbl_806649D4 = .data:0x806649D4; // type:object size:0xD scope:local data:string +lbl_806649E4 = .data:0x806649E4; // type:object size:0x16 scope:local data:string +lbl_806649FC = .data:0x806649FC; // type:object size:0xD scope:local data:string @114239 = .data:0x80664A10; // type:object size:0x1C scope:local hash:0xAC9305E9 ...data.0 = .data:0x80664A10; // type:label scope:local @114357 = .data:0x80664A2C; // type:object size:0x38 scope:local hash:0xAC930AE0 @@ -64236,8 +64238,8 @@ FstStart__10mDoDvdHack = .sbss:0x8074C438; // type:object size:0x4 scope:global FstStringStart__10mDoDvdHack = .sbss:0x8074C43C; // type:object size:0x4 scope:global data:4byte hash:0x56901DA1 dhash:0x76F925E0 MaxEntryNum__10mDoDvdHack = .sbss:0x8074C440; // type:object size:0x4 scope:global data:4byte hash:0x143437A3 dhash:0xFB171942 sManager__Q210mDoDvdHack7Manager = .sbss:0x8074C444; // type:object size:0x1 scope:global hash:0x4AE0AFD2 dhash:0xC0BE40C7 -lbl_8074C445 = .sbss:0x8074C445; // type:object size:0x1 data:byte hash:0xE347FC69 dhash:0x3FF11AB0 -lbl_8074C448 = .sbss:0x8074C448; // type:object size:0x1 data:byte hash:0xEA8D2103 +sDefaultDirection = .sbss:0x8074C445; // type:object size:0x1 data:byte hash:0xE347FC69 dhash:0x3FF11AB0 +mDoDvdErr_initialized = .sbss:0x8074C448; // type:object size:0x1 data:byte hash:0xEA8D2103 sConsole = .sbss:0x8074C450; // type:object size:0x4 scope:global data:4byte hash:0xCEF7DB41 cDmr_SkipInfo = .sbss:0x8074C458; // type:object size:0x1 hash:0x209D232D data_80450C99 = .sbss:0x8074C459; // type:object size:0x1 hash:0x73292698 diff --git a/include/JSystem/J2DGraph/J2DOrthoGraph.h b/include/JSystem/J2DGraph/J2DOrthoGraph.h index e6a01f34e0..385fc9a357 100644 --- a/include/JSystem/J2DGraph/J2DOrthoGraph.h +++ b/include/JSystem/J2DGraph/J2DOrthoGraph.h @@ -24,8 +24,7 @@ public: const JGeometry::TBox2* getOrtho() const { return &mOrtho; } void setOrtho(f32 x, f32 y, f32 width, f32 height, f32 far, f32 near) { - JGeometry::TBox2 ortho(x, y, x + width, y + height); - setOrtho(ortho, far, near); + setOrtho(JGeometry::TBox2(x, y, x + width, y + height), far, near); } private: diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h index d5c0bc94c3..041ce31875 100644 --- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h +++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h @@ -1,7 +1,6 @@ #ifndef J3DANIMATION_H #define J3DANIMATION_H -#include "JSystem/J3DGraphAnimator/J3DJoint.h" #include "JSystem/J3DGraphAnimator/J3DModelData.h" #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTNameTab.h" @@ -978,52 +977,4 @@ public: /* 0x10 */ f32 mFrame; }; // Size: 0x14 -struct J3DMtxCalcAnmBase: public J3DMtxCalc { - J3DMtxCalcAnmBase(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; } - ~J3DMtxCalcAnmBase() {} - J3DAnmTransform* getAnmTransform() { return mAnmTransform; } - void setAnmTransform(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; } - - J3DAnmTransform* mAnmTransform; -}; - -struct J3DMtxCalcAnimationAdaptorBase { - J3DMtxCalcAnimationAdaptorBase() {} - void change(J3DAnmTransform*) {} -}; - -template -struct J3DMtxCalcAnimationAdaptorDefault : public J3DMtxCalcAnimationAdaptorBase { - J3DMtxCalcAnimationAdaptorDefault(J3DAnmTransform* pAnmTransform) {} - - void calc(J3DMtxCalcAnmBase* pMtxCalc) { - J3DTransformInfo transform; - J3DTransformInfo* transform_p; - if (pMtxCalc->getAnmTransform() != NULL) { - pMtxCalc->getAnmTransform()->getTransform(J3DMtxCalc::getJoint()->getJntNo(), &transform); - transform_p = &transform; - } else { - transform_p = &J3DMtxCalc::getJoint()->getTransformInfo(); - } - - A0::calcTransform(*transform_p); - } -}; - -template -struct J3DMtxCalcAnimation : public J3DMtxCalcAnmBase { - J3DMtxCalcAnimation(J3DAnmTransform* pAnmTransform) : J3DMtxCalcAnmBase(pAnmTransform), field_0x8(pAnmTransform) {} - ~J3DMtxCalcAnimation() {} - - void setAnmTransform(J3DAnmTransform* pAnmTransform) { - mAnmTransform = pAnmTransform; - field_0x8.change(pAnmTransform); - } - - void init(const Vec& param_0, const Mtx& param_1) { B0::init(param_0, param_1); } - void calc() { field_0x8.calc(this); } - - A0 field_0x8; -}; - #endif /* J3DANIMATION_H */ diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h index a1104d170f..eeecdabbd4 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -145,6 +145,54 @@ public: } }; +struct J3DMtxCalcAnmBase: public J3DMtxCalc { + J3DMtxCalcAnmBase(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; } + ~J3DMtxCalcAnmBase() {} + J3DAnmTransform* getAnmTransform() { return mAnmTransform; } + void setAnmTransform(J3DAnmTransform* pAnmTransform) { mAnmTransform = pAnmTransform; } + + J3DAnmTransform* mAnmTransform; +}; + +struct J3DMtxCalcAnimationAdaptorBase { + J3DMtxCalcAnimationAdaptorBase() {} + void change(J3DAnmTransform*) {} +}; + +template +struct J3DMtxCalcAnimationAdaptorDefault : public J3DMtxCalcAnimationAdaptorBase { + J3DMtxCalcAnimationAdaptorDefault(J3DAnmTransform* pAnmTransform) {} + + void calc(J3DMtxCalcAnmBase* pMtxCalc) { + J3DTransformInfo transform; + J3DTransformInfo* transform_p; + if (pMtxCalc->getAnmTransform() != NULL) { + pMtxCalc->getAnmTransform()->getTransform(J3DMtxCalc::getJoint()->getJntNo(), &transform); + transform_p = &transform; + } else { + transform_p = &J3DMtxCalc::getJoint()->getTransformInfo(); + } + + A0::calcTransform(*transform_p); + } +}; + +template +struct J3DMtxCalcAnimation : public J3DMtxCalcAnmBase { + J3DMtxCalcAnimation(J3DAnmTransform* pAnmTransform) : J3DMtxCalcAnmBase(pAnmTransform), field_0x8(pAnmTransform) {} + ~J3DMtxCalcAnimation() {} + + void setAnmTransform(J3DAnmTransform* pAnmTransform) { + mAnmTransform = pAnmTransform; + field_0x8.change(pAnmTransform); + } + + void init(const Vec& param_0, const Mtx& param_1) { B0::init(param_0, param_1); } + void calc() { field_0x8.calc(this); } + + A0 field_0x8; +}; + /** * @ingroup jsystem-j3d * diff --git a/include/JSystem/J3DGraphAnimator/J3DJointTree.h b/include/JSystem/J3DGraphAnimator/J3DJointTree.h index b4b3d5a1db..285efa88d5 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJointTree.h +++ b/include/JSystem/J3DGraphAnimator/J3DJointTree.h @@ -1,6 +1,7 @@ #ifndef J3DJOINTTREE_H #define J3DJOINTTREE_H +#include "JSystem/J3DAssert.h" #include "JSystem/J3DGraphBase/J3DTransform.h" class J3DJoint; diff --git a/include/JSystem/JKernel/JKRMemArchive.h b/include/JSystem/JKernel/JKRMemArchive.h index 9878f73499..3fb5a63c58 100644 --- a/include/JSystem/JKernel/JKRMemArchive.h +++ b/include/JSystem/JKernel/JKRMemArchive.h @@ -32,7 +32,7 @@ public: static u32 fetchResource_subroutine(u8*, u32, u8*, u32, JKRCompression); SArcHeader* getArcHeader() { return mArcHeader; } -private: +public: /* 0x00 */ // vtable /* 0x04 */ // JKRArchive /* 0x64 */ SArcHeader* mArcHeader; diff --git a/include/JSystem/JUtility/JUTConsole.h b/include/JSystem/JUtility/JUTConsole.h index f8d26f8f3c..d565005f6f 100644 --- a/include/JSystem/JUtility/JUTConsole.h +++ b/include/JSystem/JUtility/JUTConsole.h @@ -6,6 +6,20 @@ #include "JSystem/JUtility/JUTFont.h" #include +class JUTConsole; + +extern "C" void JUTConsole_print_f_va_(JUTConsole*, const char*, va_list); +extern "C" void JUTSetReportConsole(JUTConsole*); +extern "C" JUTConsole* JUTGetReportConsole(); +extern "C" void JUTSetWarningConsole(JUTConsole*); +extern "C" JUTConsole* JUTGetWarningConsole(); +extern "C" void JUTWarningConsole_f_va(const char*, va_list); +extern "C" void JUTReportConsole_f_va(const char*, va_list); +extern "C" void JUTReportConsole_f(const char*, ...); +extern "C" void JUTWarningConsole(const char* message); +extern "C" void JUTWarningConsole_f(const char* message, ...); +extern "C" void JUTReportConsole(const char* message); + /** * @ingroup jsystem-jutility * @@ -95,6 +109,7 @@ public: void scrollToLastLine() { scroll(mMaxLines); } void scrollToFirstLine() { scroll(-mMaxLines); } + void print_f_va(const char* fmt, va_list args) { JUTConsole_print_f_va_(this, fmt, args); } /* 0x18 */ JGadget::TLinkListNode mListNode; /* 0x20 */ unsigned int field_0x20; @@ -154,16 +169,4 @@ private: /* 0x10 */ JUTConsole* mDirectConsole; }; // Size: 0x14 -extern "C" void JUTConsole_print_f_va_(JUTConsole*, const char*, va_list); -extern "C" void JUTSetReportConsole(JUTConsole*); -extern "C" JUTConsole* JUTGetReportConsole(); -extern "C" void JUTSetWarningConsole(JUTConsole*); -extern "C" JUTConsole* JUTGetWarningConsole(); -extern "C" void JUTWarningConsole_f_va(const char*, va_list); -extern "C" void JUTReportConsole_f_va(const char*, va_list); -extern "C" void JUTReportConsole_f(const char*, ...); -extern "C" void JUTWarningConsole(const char* message); -extern "C" void JUTWarningConsole_f(const char* message, ...); -extern "C" void JUTReportConsole(const char* message); - #endif /* JUTCONSOLE_H */ diff --git a/include/Z2AudioLib/Z2AudioMgr.h b/include/Z2AudioLib/Z2AudioMgr.h index 7f47400af2..e543bf6061 100644 --- a/include/Z2AudioLib/Z2AudioMgr.h +++ b/include/Z2AudioLib/Z2AudioMgr.h @@ -4,14 +4,14 @@ #include "JSystem/JAudio2/JASAudioReseter.h" #include "Z2AudioLib/Z2Audience.h" #include "Z2AudioLib/Z2FxLineMgr.h" -#include "Z2AudioLib/Z2SceneMgr.h" #include "Z2AudioLib/Z2SeMgr.h" #include "Z2AudioLib/Z2SeqMgr.h" +#include "Z2AudioLib/Z2SceneMgr.h" +#include "Z2AudioLib/Z2StatusMgr.h" #include "Z2AudioLib/Z2SoundInfo.h" #include "Z2AudioLib/Z2SoundMgr.h" #include "Z2AudioLib/Z2SoundObjMgr.h" #include "Z2AudioLib/Z2SpeechMgr2.h" -#include "Z2AudioLib/Z2StatusMgr.h" #include "Z2AudioLib/Z2DebugSys.h" #include "global.h" diff --git a/include/Z2AudioLib/Z2SoundObjMgr.h b/include/Z2AudioLib/Z2SoundObjMgr.h index a353ff1bcc..c0b4ed778c 100644 --- a/include/Z2AudioLib/Z2SoundObjMgr.h +++ b/include/Z2AudioLib/Z2SoundObjMgr.h @@ -82,7 +82,7 @@ enum Z2EnemyID { /* 0x3F */ Z2_ENEMY_TN, }; -class Z2SoundObjMgr : public JASGlobalInstance, protected JSUList { +class Z2SoundObjMgr : public JASGlobalInstance { public: Z2SoundObjMgr(); void setForceBattleArea(bool forceBattle, u16, u16, u16); @@ -98,13 +98,14 @@ public: u8 getEnemyNumNear() const { return enemuNumNear_; } u8 getEnemyNumVeryFar() const { return enemuNumVeryFar_; } bool isForceBattle() { return forceBattle_; } - JSUList* getEnemyList() { return this; } + JSUList* getEnemyList() { return &field_0x0; } #if DEBUG JSUList* getAllList() { return &allList_; } #endif private: + /* 0x00 */ JSUList field_0x0; #if DEBUG /* 0x0C */ JSUList allList_; #endif diff --git a/include/d/dolzel_base.pch b/include/d/dolzel_base.pch index ac3dbb96d3..b478b643e9 100644 --- a/include/d/dolzel_base.pch +++ b/include/d/dolzel_base.pch @@ -17,11 +17,11 @@ #include "JSystem/JKernel/JKRDisposer.h" // IWYU pragma: export #include "JSystem/JGadget/linklist.h" // IWYU pragma: export #include "JSystem/J3DGraphBase/J3DPacket.h" // IWYU pragma: export -#include "JSystem/J3DGraphAnimator/J3DJoint.h" // IWYU pragma: export #include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h" // IWYU pragma: export #include "JSystem/J3DGraphAnimator/J3DShapeTable.h" // IWYU pragma: export #include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" // IWYU pragma: export #include "JSystem/J3DGraphAnimator/J3DAnimation.h" // IWYU pragma: export +#include "JSystem/J3DGraphAnimator/J3DJoint.h" // IWYU pragma: export #include "JSystem/JUtility/JUTGamePad.h" // IWYU pragma: export #include "JSystem/J3DGraphBase/J3DSys.h" // IWYU pragma: export #include "JSystem/J3DGraphAnimator/J3DMaterialAttach.h" // IWYU pragma: export diff --git a/include/m_Do/m_Do_audio.h b/include/m_Do/m_Do_audio.h index e558bd7b98..7c456b0cfe 100644 --- a/include/m_Do/m_Do_audio.h +++ b/include/m_Do/m_Do_audio.h @@ -23,16 +23,16 @@ public: #endif static void onInitFlag() { mInitFlag = true; } - static bool isInitFlag() { return mInitFlag; } - static bool isResetFlag() { return mResetFlag; } + static u8 isInitFlag() { return mInitFlag; } + static u8 isResetFlag() { return mResetFlag; } static void onResetFlag() { mResetFlag = true; } static void offResetFlag() { mResetFlag = false; } static bool isBgmSet() { return mBgmSet; } static void onBgmSet() { mBgmSet = true; } static void offBgmSet() { mBgmSet = false; } - static bool mInitFlag; - static bool mResetFlag; + static u8 mInitFlag; + static u8 mResetFlag; static bool mBgmSet; }; diff --git a/include/m_Do/m_Do_dvd_thread.h b/include/m_Do/m_Do_dvd_thread.h index cbacaa9437..ad053bd051 100644 --- a/include/m_Do/m_Do_dvd_thread.h +++ b/include/m_Do/m_Do_dvd_thread.h @@ -9,6 +9,7 @@ #define mDoDvd_MOUNT_DIRECTION_HEAD 0 #define mDoDvd_MOUNT_DIRECTION_TAIL 1 +class JKRAramArchive; class JKRHeap; class JKRMemArchive; @@ -26,23 +27,6 @@ public: virtual s32 execute() = 0; }; // Size = 0x14 -class mDoDvdThd_toMainRam_c : public mDoDvdThd_command_c { -public: - mDoDvdThd_toMainRam_c(u8); - static mDoDvdThd_toMainRam_c* create(char const*, u8, JKRHeap*); - virtual ~mDoDvdThd_toMainRam_c(); - virtual s32 execute(); - - void* getMemAddress() const { return mData; } - -private: - /* 0x14 */ u8 mMountDirection; - /* 0x18 */ s32 mEntryNum; - /* 0x1C */ void* mData; - /* 0x20 */ s32 mDataSize; - /* 0x24 */ JKRHeap* mHeap; -}; // Size = 0x28 - class mDoDvdThd_param_c { public: mDoDvdThd_param_c(); @@ -60,6 +44,46 @@ private: /* 0x30 */ OSMutex mMutext; }; // Size = 0x48 +class mDoDvdThd_callback_c : public mDoDvdThd_command_c { +public: + virtual ~mDoDvdThd_callback_c(); + mDoDvdThd_callback_c(mDoDvdThd_callback_func, void*); + static mDoDvdThd_callback_c* create(mDoDvdThd_callback_func, void*); + virtual s32 execute(); + +private: + /* 0x14 */ mDoDvdThd_callback_func mFunction; + /* 0x18 */ void* mData; + /* 0x1C */ void* mResult; +}; + +class mDoDvdThd_mountArchive_c : public mDoDvdThd_command_c { +public: + virtual ~mDoDvdThd_mountArchive_c(); + mDoDvdThd_mountArchive_c(u8); + static mDoDvdThd_mountArchive_c* create(char const*, u8, JKRHeap*); + virtual s32 execute(); + + JKRMemArchive* getArchive() const { return mArchive; } + JKRHeap* getHeap() const { return mHeap; } + +private: + /* 0x14 */ u8 mMountDirection; + /* 0x18 */ s32 mEntryNumber; + /* 0x1C */ JKRMemArchive* mArchive; + /* 0x20 */ JKRHeap* mHeap; +}; // Size = 0x24 + +class mDoDvdThd_mountAramArchive_c : public mDoDvdThd_command_c { +public: + virtual ~mDoDvdThd_mountAramArchive_c(); + virtual s32 execute(); + + /* 0x14 */ u8 mMountDirection; + /* 0x18 */ s32 mEntryNum; + /* 0x1C */ JKRAramArchive* mArchive; +}; + class mDoDvdThd_mountXArchive_c : public mDoDvdThd_command_c { public: virtual ~mDoDvdThd_mountXArchive_c(); @@ -78,35 +102,31 @@ private: /* 0x24 */ JKRHeap* mHeap; }; // Size = 0x28 -class mDoDvdThd_mountArchive_c : public mDoDvdThd_command_c { -public: - virtual ~mDoDvdThd_mountArchive_c(); - mDoDvdThd_mountArchive_c(u8); - static mDoDvdThd_mountArchive_c* create(char const*, u8, JKRHeap*); +class mDoDvdThd_getResource_c : public mDoDvdThd_command_c { + virtual ~mDoDvdThd_getResource_c(); virtual s32 execute(); - JKRMemArchive* getArchive() const { return mArchive; } - JKRHeap* getHeap() const { return mHeap; } + /* 0x14 */ void* mResource; + /* 0x18 */ JKRArchive* mArchive; + /* 0x1C */ u16 mResourceId; +}; + +class mDoDvdThd_toMainRam_c : public mDoDvdThd_command_c { +public: + mDoDvdThd_toMainRam_c(u8); + static mDoDvdThd_toMainRam_c* create(char const*, u8, JKRHeap*); + virtual ~mDoDvdThd_toMainRam_c(); + virtual s32 execute(); + + void* getMemAddress() const { return mData; } private: /* 0x14 */ u8 mMountDirection; - /* 0x18 */ s32 mEntryNumber; - /* 0x1C */ JKRMemArchive* mArchive; - /* 0x20 */ JKRHeap* mHeap; -}; // Size = 0x24 - -class mDoDvdThd_callback_c : public mDoDvdThd_command_c { -public: - virtual ~mDoDvdThd_callback_c(); - mDoDvdThd_callback_c(mDoDvdThd_callback_func, void*); - static mDoDvdThd_callback_c* create(mDoDvdThd_callback_func, void*); - virtual s32 execute(); - -private: - /* 0x14 */ mDoDvdThd_callback_func mFunction; - /* 0x18 */ void* mData; - /* 0x1C */ void* mResult; -}; + /* 0x18 */ s32 mEntryNum; + /* 0x1C */ void* mData; + /* 0x20 */ s32 mDataSize; + /* 0x24 */ JKRHeap* mHeap; +}; // Size = 0x28 struct mDoDvdThdStack { u8 stack[4096]; @@ -127,4 +147,27 @@ struct mDoDvdThd { static u8 Report_DVDRead; }; +namespace mDoDvdHack { + typedef struct FSTEntry { + /* 0x00 */ uint isDirAndStringOff; + /* 0x04 */ uint parentOrPosition; + /* 0x08 */ uint nextEntryOrLength; + } FSTEntry; + + extern OSBootInfo* BootInfo; + extern FSTEntry* FstStart; + extern const char* FstStringStart; + extern u32 MaxEntryNum; + + void __DVDFSInit(); + const char* EntryToName(s32 entry); + const char* ConvertEntrynumToName(s32 entry); + + class Manager { + public: + Manager() { __DVDFSInit(); } + static Manager sManager; + }; +} + #endif /* M_DO_M_DO_DVD_THREAD_H */ diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index ac45c8f443..35e81f0059 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -599,7 +599,7 @@ private: /* 0x38 */ mDoExt_3Dline_c* mpLines; }; -class mDoExt_3DlineMat2_c : public mDoExt_3DlineMat_c { +class mDoExt_3DlineMat2_c : public mDoExt_3DlineMat1_c { public: int getMaterialID() { return 2; } void setMaterial(); diff --git a/include/m_Do/m_Do_ext2.h b/include/m_Do/m_Do_ext2.h index f6e029a0c0..2a38861509 100644 --- a/include/m_Do/m_Do_ext2.h +++ b/include/m_Do/m_Do_ext2.h @@ -7,24 +7,26 @@ class FixedMemoryCheck { public: FixedMemoryCheck(u32*, u32, JKRHeap*); - void alloc(); - void save(); - void check(); - void diff(); + BOOL alloc(); + BOOL save(); + BOOL check(); + BOOL diff(); static FixedMemoryCheck* easyCreate(void* param_1, s32 param_2) { return easyCreate(param_1, u32(param_2)); } static FixedMemoryCheck* easyCreate(void*, u32); - static void checkAll(); - static void diffAll(); - static void saveAll(); + static BOOL checkAll(); + static BOOL diffAll(); + static BOOL saveAll(); - /* 0x00 */ u32* field_0x00; - /* 0x04 */ u32 field_0x04; - /* 0x08 */ u32* field_0x08; + static FixedMemoryCheck* sFirst; + + /* 0x00 */ u32* mNowCode; + /* 0x04 */ u32 mSize; + /* 0x08 */ u32* mSaveCode; /* 0x0C */ JKRHeap* mpHeap; /* 0x10 */ int field_0x10; - /* 0x14 */ u8 field_0x14; - /* 0x18 */ FixedMemoryCheck* field_0x18; + /* 0x14 */ bool field_0x14; + /* 0x18 */ FixedMemoryCheck* mNext; }; #endif diff --git a/include/revolution/dvd.h b/include/revolution/dvd.h index 967390d498..06b7ecaece 100644 --- a/include/revolution/dvd.h +++ b/include/revolution/dvd.h @@ -247,6 +247,7 @@ s32 DVDCancel(DVDCommandBlock* block); int DVDCancelAllAsync(DVDCBCallback callback); s32 DVDCancelAll(void); DVDDiskID* DVDGetCurrentDiskID(void); +BOOL DVDCheckDiskAsync(DVDCommandBlock* block, DVDCBCallback callback); BOOL DVDCheckDisk(void); // DVD FATAL diff --git a/include/revolution/os/OSReset.h b/include/revolution/os/OSReset.h index 5ac53552bb..9a74fe7299 100644 --- a/include/revolution/os/OSReset.h +++ b/include/revolution/os/OSReset.h @@ -28,6 +28,8 @@ struct OSShutdownFunctionInfo { void OSRegisterShutdownFunction(OSShutdownFunctionInfo* info); void OSUnregisterShutdownFunction(OSShutdownFunctionInfo* info); +void OSShutdownSystem(); +void OSRestart(u32 resetCode); void OSResetSystem(int reset, u32 resetCode, BOOL forceMenu); u32 OSGetResetCode(); u32 OSSetBootDol(u32 dolOffset); diff --git a/src/JSystem/J3DGraphAnimator/J3DModel.cpp b/src/JSystem/J3DGraphAnimator/J3DModel.cpp index 076670c80c..f423f1db2f 100644 --- a/src/JSystem/J3DGraphAnimator/J3DModel.cpp +++ b/src/JSystem/J3DGraphAnimator/J3DModel.cpp @@ -1,8 +1,9 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep -#include "JSystem/J3DGraphAnimator/J3DShapeTable.h" #include "JSystem/J3DGraphAnimator/J3DModel.h" +#include "JSystem/J3DGraphAnimator/J3DJoint.h" #include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" +#include "JSystem/J3DGraphAnimator/J3DShapeTable.h" #include "JSystem/J3DGraphBase/J3DMaterial.h" #include "JSystem/J3DGraphBase/J3DShapeMtx.h" #include "JSystem/J3DGraphBase/J3DSys.h" diff --git a/src/JSystem/J3DGraphAnimator/J3DModelData.cpp b/src/JSystem/J3DGraphAnimator/J3DModelData.cpp index 2cec1f6a4d..606882eb0a 100644 --- a/src/JSystem/J3DGraphAnimator/J3DModelData.cpp +++ b/src/JSystem/J3DGraphAnimator/J3DModelData.cpp @@ -5,9 +5,10 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/J3DGraphAnimator/J3DModelData.h" +#include "JSystem/J3DGraphAnimator/J3DJoint.h" #include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" -#include "JSystem/J3DGraphBase/J3DMaterial.h" #include "JSystem/J3DGraphAnimator/J3DModel.h" +#include "JSystem/J3DGraphBase/J3DMaterial.h" void J3DModelData::clear() { mpRawData = 0; diff --git a/src/Z2AudioLib/Z2SoundObjMgr.cpp b/src/Z2AudioLib/Z2SoundObjMgr.cpp index c945865dd5..a1d87e6633 100644 --- a/src/Z2AudioLib/Z2SoundObjMgr.cpp +++ b/src/Z2AudioLib/Z2SoundObjMgr.cpp @@ -143,7 +143,7 @@ void Z2SoundObjMgr::searchEnemy() { Z2Calc::CURVE_POSITIVE); f32 veryFarDist = 5000.0f; - for (JSULink* i = getFirst(); i != NULL; i = i->getNext()) { + for (JSULink* i = field_0x0.getFirst(); i != NULL; i = i->getNext()) { Z2CreatureEnemy* enemy = i->getObject(); if (enemy == NULL) { JUT_WARN_DEVICE(100, 1, "%s", "[Z2SoundObjMgr::searchEnemy] remain remove enemy\n"); @@ -349,7 +349,7 @@ u8 Z2SoundObjMgr::getEnemyID(const char* enemyName, JSULink* en if (enemyName != NULL) { for (u8 i = 0; i < ARRAY_SIZEU(mEnemyInfo); i++) { if (strcmp(enemyName, mEnemyInfo[(u32)i].mName) == 0) { - append(enemyLink); + field_0x0.append(enemyLink); return i; } } @@ -379,7 +379,7 @@ void Z2SoundObjMgr::deleteEnemyAll() { JSULink* i; // not moving the pointer forward looks like a bug, but deleteObject() actually unlinks the enemy from its owning list - while (i = getFirst(), i != NULL) { + while (i = field_0x0.getFirst(), i != NULL) { Z2CreatureEnemy* enemy = i->getObject(); if (enemy == NULL) { JUT_WARN_DEVICE(367, 1, "%s", "[Z2SoundObjMgr::searchEnemy] remain remove enemy\n"); @@ -399,7 +399,7 @@ bool Z2SoundObjMgr::removeEnemy(JSULink* enemyLink) { field_0x18--; } - bool result = remove(enemyLink); + bool result = field_0x0.remove(enemyLink); return result; } diff --git a/src/m_Do/m_Do_DVDError.cpp b/src/m_Do/m_Do_DVDError.cpp index 6bd81a52ef..d4884aeb1c 100644 --- a/src/m_Do/m_Do_DVDError.cpp +++ b/src/m_Do/m_Do_DVDError.cpp @@ -10,31 +10,38 @@ #include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_Reset.h" +#if PLATFORM_GCN +const int stack_size = 3072; +#else +const int stack_size = 8192; +#endif + + bool mDoDvdErr_initialized; static OSThread DvdErr_thread; #pragma push #pragma force_active on -static u8 DvdErr_stack[3072] ATTRIBUTE_ALIGN(16); +static u8 DvdErr_stack[stack_size] ATTRIBUTE_ALIGN(16); #pragma pop static OSAlarm Alarm; void mDoDvdErr_ThdInit() { - if (!mDoDvdErr_initialized) { - OSTime time = OSGetTime(); - OSThread* curThread = OSGetCurrentThread(); - s32 priority = OSGetThreadPriority(curThread); - - OSCreateThread(&DvdErr_thread, (void*(*)(void*))mDoDvdErr_Watch, NULL, DvdErr_stack + sizeof(DvdErr_stack), - sizeof(DvdErr_stack), priority - 3, 1); - OSResumeThread(&DvdErr_thread); - OSCreateAlarm(&Alarm); - OSSetPeriodicAlarm(&Alarm, time, OS_BUS_CLOCK / 4, AlarmHandler); - - mDoDvdErr_initialized = true; + if (mDoDvdErr_initialized) { + return; } + + OSTime time = OSGetTime(); + + OSCreateThread(&DvdErr_thread, (void*(*)(void*))mDoDvdErr_Watch, NULL, DvdErr_stack + sizeof(DvdErr_stack), + sizeof(DvdErr_stack), OSGetThreadPriority(OSGetCurrentThread()) - 3, 1); + OSResumeThread(&DvdErr_thread); + OSCreateAlarm(&Alarm); + OSSetPeriodicAlarm(&Alarm, time, OS_BUS_CLOCK / 4, AlarmHandler); + + mDoDvdErr_initialized = true; } void mDoDvdErr_ThdCleanup() { @@ -46,13 +53,17 @@ void mDoDvdErr_ThdCleanup() { } static void mDoDvdErr_Watch(void*) { +#if PLATFORM_GCN OSDisableInterrupts(); - { JKRThread thread(OSGetCurrentThread(), 0); } +#endif + JKRThread(OSGetCurrentThread(), 0); - mDoExt_getAssertHeap()->becomeCurrentHeap(); + JKRSetCurrentHeap(mDoExt_getAssertHeap()); + s32 status; do { - if (DVDGetDriveStatus() == DVD_STATE_FATAL_ERROR) { + status = DVDGetDriveStatus(); + if (status == DVD_STATE_FATAL_ERROR) { mDoDvdThd::suspend(); } OSSuspendThread(&DvdErr_thread); diff --git a/src/m_Do/m_Do_MemCard.cpp b/src/m_Do/m_Do_MemCard.cpp index 47c29af4a1..1467bd56c2 100644 --- a/src/m_Do/m_Do_MemCard.cpp +++ b/src/m_Do/m_Do_MemCard.cpp @@ -857,7 +857,7 @@ s32 mDoMemCd_Ctrl_c::checkspaceNAND() { mDoMemCd_Ctrl_c g_mDoMemCd_control; static int mDoMemCd_main(void*) { - { JKRThread thread(OSGetCurrentThread(), 0); } + JKRThread(OSGetCurrentThread(), 0); JKRSetCurrentHeap(mDoExt_getAssertHeap()); diff --git a/src/m_Do/m_Do_MemCardRWmng.cpp b/src/m_Do/m_Do_MemCardRWmng.cpp index dacaba3bee..e0eb777374 100644 --- a/src/m_Do/m_Do_MemCardRWmng.cpp +++ b/src/m_Do/m_Do_MemCardRWmng.cpp @@ -411,45 +411,42 @@ static BOOL mDoMemCdRWm_CheckCardStat(CARDFileInfo* file) { } static u32 mDoMemCdRWm_CalcCheckSum(void* data, u32 size) { - u16 high; - u16 low; - - low = 0; - high = 0; - - u16* d = (u16*)data; - for (int i = 0; i < size / 2; i++) { + int i; + u16 high, low; + high = low = 0; + u16* d; + for (i = 0, d = (u16*)data; i < size / 2; i++, d++) { high += *d; low += ~*d; - d++; } return high << 16 | low; } static u64 mDoMemCdRWm_CalcCheckSumGameData(void* data, u32 size) { - u32 high; - u32 low; + int i; + u32 high, low; + high = low = 0; - low = 0; - high = 0; - - u8* d = (u8*)data; - for (int i = 0; i < size; i++) { + u8* d; + for (i = 0, d = (u8*)data; i < size; i++, d++) { high += *d; low += ~*d; - d++; } - return (u64)high << 32 | low; + u64 tmp = high; + return tmp << 32 | low; } BOOL mDoMemCdRWm_TestCheckSumGameData(void* data) { - u64 checksum = mDoMemCdRWm_CalcCheckSumGameData(data, (SAVEDATA_SIZE - sizeof(u64))); - return checksum == *(u64*)((u8*)data + (SAVEDATA_SIZE - sizeof(u64))); + u64 checksum; + u8* file_ptr = (u8*)data; + checksum = mDoMemCdRWm_CalcCheckSumGameData(data, (SAVEDATA_SIZE - sizeof(u64))); + return checksum == *(u64*)(file_ptr + (SAVEDATA_SIZE - sizeof(u64))); } void mDoMemCdRWm_SetCheckSumGameData(u8* data, u8 dataNum) { u8* file_ptr = data + (dataNum * SAVEDATA_SIZE); - *(u64*)(file_ptr + (SAVEDATA_SIZE - sizeof(u64))) = mDoMemCdRWm_CalcCheckSumGameData(file_ptr, (SAVEDATA_SIZE - sizeof(u64))); + u64 checksum = mDoMemCdRWm_CalcCheckSumGameData(file_ptr, (SAVEDATA_SIZE - sizeof(u64))); + *(u64*)(file_ptr + (SAVEDATA_SIZE - sizeof(u64))) = checksum; } diff --git a/src/m_Do/m_Do_Reset.cpp b/src/m_Do/m_Do_Reset.cpp index a19ca6ff99..5d7fc36d88 100644 --- a/src/m_Do/m_Do_Reset.cpp +++ b/src/m_Do/m_Do_Reset.cpp @@ -11,8 +11,13 @@ #include "dolphin/gx.h" #include "m_Do/m_Do_audio.h" #include "m_Do/m_Do_DVDError.h" +#include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_MemCard.h" +#if !PLATFORM_GCN +#include "revolution/os.h" +#endif + static void my_OSCancelAlarmAll() {} static void destroyVideo() { @@ -26,16 +31,15 @@ static void destroyVideo() { mDoRstData* mDoRst::mResetData; -void mDoRst_reset(int param_0, u32 param_1, int param_2) { +void mDoRst_reset(int reset, u32 resetCode, int forceMenu) { + JUT_ASSERT(83, mDoExt_GetCurrentRunningThread() != 0); JUTXfb::getManager()->clearIndex(); mDoDvdErr_ThdCleanup(); cAPICPad_recalibrate(); if (mDoAud_zelAudio_c::isInitFlag()) { - bool audioReset; do { - audioReset = Z2AudioMgr::getInterface()->hasReset(); - } while (!audioReset); + } while (!Z2AudioMgr::getInterface()->hasReset()); } if (DVDGetDriveStatus() == DVD_STATE_BUSY) { @@ -76,33 +80,68 @@ void mDoRst_reset(int param_0, u32 param_1, int param_2) { my_OSCancelAlarmAll(); LCDisable(); +#if PLATFORM_GCN OSSetSaveRegion(mDoRst::mResetData, (u8*)&mDoRst::getResetData + 0x18); - OSResetSystem(param_0, param_1, param_2); + OSResetSystem(reset, resetCode, forceMenu); +#else + if (reset == 2) { + OSShutdownSystem(); + } else if (reset == 0) { + OSRestart(resetCode); + } else { + OSReturnToMenu(); + } +#endif do { VIWaitForRetrace(); } while (true); } -void mDoRst_resetCallBack(int port, void*) { - if (!mDoRst::isReset()) { - if (port == -1) { - cAPICPad_recalibrate(); - } else { - if (mDoRst::is3ButtonReset()) { - JUTGamePad::C3ButtonReset::sResetOccurred = false; - JUTGamePad::C3ButtonReset::sCallback = mDoRst_resetCallBack; - JUTGamePad::C3ButtonReset::sCallbackArg = NULL; - return; - } - mDoRst::on3ButtonReset(); - mDoRst::set3ButtonResetPort(port); - cAPICPad_recalibrate(); - } +void checkDiskCallback(s32 result, DVDCommandBlock* block) { + block->userData = (void*)result; +} - if (DVDCheckDisk() == 0 && DVDGetDriveStatus() != DVD_STATE_FATAL_ERROR) { +void mDoRst_resetCallBack(int port, void*) { + if (mDoRst::isReset()) { + return; + } + if (port == -1) { + cAPICPad_recalibrate(); + } else { + if (mDoRst::is3ButtonReset()) { +#if PLATFORM_GCN + JUTGamePad::C3ButtonReset::sResetOccurred = false; + JUTGamePad::C3ButtonReset::sCallback = mDoRst_resetCallBack; + JUTGamePad::C3ButtonReset::sCallbackArg = NULL; +#endif + return; + } + mDoRst::on3ButtonReset(); + mDoRst::set3ButtonResetPort(port); + cAPICPad_recalibrate(); + } + + int check; +#if PLATFORM_GCN + check = DVDCheckDisk(); +#else + DVDCommandBlock block; + block.userData = (void*)-1; + while (DVDCheckDiskAsync(&block, checkDiskCallback)); + do { + check = (int)block.userData; + } while (check == -1); +#endif + if (check == 0) { + s32 status = DVDGetDriveStatus(); + if (status != DVD_STATE_FATAL_ERROR) { mDoRst::onReturnToMenu(); } - mDoRst::onReset(); } + mDoRst::onReset(); +} + +void mDoRst_shutdownCallBack() { + mDoRst::onShutdown(); } diff --git a/src/m_Do/m_Do_audio.cpp b/src/m_Do/m_Do_audio.cpp index 07e593642c..a7c490a691 100644 --- a/src/m_Do/m_Do_audio.cpp +++ b/src/m_Do/m_Do_audio.cpp @@ -18,9 +18,9 @@ #include #endif -bool mDoAud_zelAudio_c::mInitFlag; +u8 mDoAud_zelAudio_c::mInitFlag; -bool mDoAud_zelAudio_c::mResetFlag; +u8 mDoAud_zelAudio_c::mResetFlag; bool mDoAud_zelAudio_c::mBgmSet; diff --git a/src/m_Do/m_Do_dvd_thread.cpp b/src/m_Do/m_Do_dvd_thread.cpp index 3a17914eec..0d9eabfad9 100644 --- a/src/m_Do/m_Do_dvd_thread.cpp +++ b/src/m_Do/m_Do_dvd_thread.cpp @@ -5,17 +5,20 @@ #include "m_Do/m_Do_dvd_thread.h" #include "JSystem/JAudio2/JASDvdThread.h" +#include "JSystem/JKernel/JKRAramArchive.h" #include "JSystem/JKernel/JKRAssertHeap.h" #include "JSystem/JKernel/JKRDvdRipper.h" #include "JSystem/JKernel/JKRExpHeap.h" #include "JSystem/JKernel/JKRMemArchive.h" #include "m_Do/m_Do_Reset.h" +#include "m_Do/m_Do_controller_pad.h" #include "m_Do/m_Do_ext.h" s32 mDoDvdThd::main(void* param_0) { - { JKRThread jkrThread(OSGetCurrentThread(), 0); } - mDoExt_getAssertHeap()->becomeCurrentHeap(); - static_cast(param_0)->mainLoop(); + JKRThread(OSGetCurrentThread(), 0); + JKRSetCurrentHeap(mDoExt_getAssertHeap()); + mDoDvdThd_param_c* param = static_cast(param_0); + param->mainLoop(); return 0; } @@ -30,6 +33,11 @@ u8 mDoDvdThd::verbose; u8 mDoDvdThd::DVDLogoMode; bool mDoDvdThd::SyncWidthSound; u8 mDoDvdThd::Report_DVDRead; +OSBootInfo* mDoDvdHack::BootInfo; +mDoDvdHack::FSTEntry* mDoDvdHack::FstStart; +const char* mDoDvdHack::FstStringStart; +u32 mDoDvdHack::MaxEntryNum; +mDoDvdHack::Manager mDoDvdHack::Manager::sManager; #else bool mDoDvdThd::SyncWidthSound; #endif @@ -48,14 +56,61 @@ void mDoDvdThd::create(s32 param_0) { } void mDoDvdThd::suspend() { + OS_REPORT("DVD読み込みスレッドを停止しました\n"); OSSuspendThread(&l_thread); } -static s32 my_DVDConvertPathToEntrynum(char const* param_0) { - return DVDConvertPathToEntrynum(param_0); +#if DEBUG +void mDoDvdHack::__DVDFSInit() { + BootInfo = (OSBootInfo*)OSPhysicalToCached(0); + FstStart = (FSTEntry*)BootInfo->FSTLocation; + if (FstStart) { + MaxEntryNum = FstStart->nextEntryOrLength; + FstStringStart = (char*)FstStart + (MaxEntryNum* sizeof(FSTEntry)); + } } -mDoDvdThd_command_c::~mDoDvdThd_command_c() {} +const char* mDoDvdHack::EntryToName(s32 entry) { + if (entry < 0) { + return "*ERROR*"; + } + if (entry == 0) { + return "/"; + } + return FstStringStart + (FstStart[entry].isDirAndStringOff & ~0xff000000); +} + +const char* mDoDvdHack::ConvertEntrynumToName(s32 entry) { + __DVDFSInit(); + return EntryToName(entry); +} +#endif + +static void dummy1() { + OS_REPORT(__FILE__); + OS_REPORT("DVDConvertEntrynumToPath: specified entrynum(%d) is out of range "); + OS_REPORT("DVDConvertEntrynumToPath: maxlen should be more than 1 (%d is specified)"); +} + + +static s32 my_DVDConvertPathToEntrynum(char const* path) { + s32 entrynum = DVDConvertPathToEntrynum(path); +#if DEBUG + if (entrynum < 0) { + BOOL connected = mDoCPd_c::isConnect(2); + if (connected) { + JUT_WARN(437, "can\'t open:[%s]\n", path); + } + } +#endif + return entrynum; +} + +mDoDvdThd_command_c::~mDoDvdThd_command_c() { + if (!mIsDone) { + OS_REPORT_ERROR("mDoDvdThd_command_c::~mDoDvdThd_command_c() 完了していないコマンドがデストラクトされました\nきっとカタストロフィが発生することでしょう\n"); + } +} mDoDvdThd_param_c::mDoDvdThd_param_c() { OSInitMessageQueue(&mMessageQueue, &mMessageQueueMessages, 1); @@ -90,16 +145,17 @@ void mDoDvdThd_param_c::cut(mDoDvdThd_command_c* param_0) { } static void cb(void* param_0) { - mDoDvdThd_command_c** pCmd = (mDoDvdThd_command_c**)param_0; - s32 result = (*pCmd)->execute(); + mDoDvdThd_command_c* pCmd = *(mDoDvdThd_command_c**)param_0; + s32 result = pCmd->execute(); if (result != 1) { OSReport_Error("mDoDvdThd_param_c::mainLoop() コマンドの実行が失敗しました。\n"); } } void mDoDvdThd_param_c::mainLoop() { + mDoDvdThd_command_c* command; while (this->waitForKick() != 0) { - while (mDoDvdThd_command_c* command = this->getFirstCommand()) { + while (command = this->getFirstCommand()) { this->cut(command); if (mDoDvdThd::SyncWidthSound) { JASDvd::getThreadPointer()->sendCmdMsg(cb, &command, 4); @@ -128,6 +184,9 @@ mDoDvdThd_callback_c* mDoDvdThd_callback_c::create(mDoDvdThd_callback_func pFunc new (mDoExt_getCommandHeap(), -4) mDoDvdThd_callback_c(pFunc, pData); if (callCmd != NULL) { mDoDvdThd::l_param.addition(callCmd); + if (mDoDvdThd::DVDLogoMode) { + OS_REPORT("\x1b[34m callback %08x %08x %08x\n\x1b[m", callCmd, pFunc, pData); + } } return callCmd; } @@ -163,19 +222,28 @@ mDoDvdThd_mountArchive_c* mDoDvdThd_mountArchive_c::create(char const* pArchiveP } else { mountArcCmd->mHeap = pHeap; mDoDvdThd::l_param.addition(mountArcCmd); + if (mDoDvdThd::DVDLogoMode) { + OS_REPORT("\x1b[34m mountArchive(%d:%s)\n\x1b[m", mountArcCmd->mEntryNumber, pArchivePath); + } } } return mountArcCmd; } s32 mDoDvdThd_mountArchive_c::execute() { +#if PLATFORM_GCN bool isZeldaHeap = false; bool isGameHeap = false; bool isArcHeap = false; bool isJ2DHeap = false; +#endif JKRHeap* heap = mHeap != NULL ? mHeap : mDoExt_getArchiveHeap(); - JKRMemArchive* memArchive; + JKRMemArchive* memArchive = NULL; +#if DEBUG + OSTime time1 = OSGetTime(); +#endif while (true) { +#if PLATFORM_GCN if (heap == mDoExt_getArchiveHeapPtr()) { isArcHeap = true; } else if (heap == mDoExt_getZeldaHeap()) { @@ -185,6 +253,7 @@ s32 mDoDvdThd_mountArchive_c::execute() { } else if (heap == mDoExt_getJ2dHeap()) { isJ2DHeap = true; } +#endif if (mMountDirection == 0) { memArchive = new (heap, 0) JKRMemArchive(mEntryNumber, JKRArchive::MOUNT_DIRECTION_HEAD); @@ -194,12 +263,22 @@ s32 mDoDvdThd_mountArchive_c::execute() { } if (memArchive != NULL && memArchive->isMounted()) { mArchive = memArchive; +#if DEBUG + OSTime time2 = OSGetTime(); + u32 msec = OS_TICKS_TO_MSEC(time2 - time1); + if (mArchive && mDoDvdThd::verbose) { + OS_REPORT("mDoDvdThd_mountArchive_c::execute: mArchive=%08x mArcHeader=%08x mMountDirection=%d Time=%4dms %s\n", mArchive, mArchive->mArcHeader, mMountDirection, msec, mDoDvdHack::ConvertEntrynumToName(mEntryNumber)); + } +#endif break; } OSReport_Error("mDoDvdThd_mountArchive_c::execute マウント失敗\n"); + OS_REPORT_ERROR("Name = %s\n", mDoDvdHack::ConvertEntrynumToName(mEntryNumber)); if (memArchive) { delete memArchive; } + memArchive = NULL; +#if PLATFORM_GCN if (!isZeldaHeap) { OSReport_Error("mDoDvdThd_mountArchive_c::execute ゼルダヒープで再チャレンジ!\n"); heap = mDoExt_getZeldaHeap(); @@ -216,11 +295,60 @@ s32 mDoDvdThd_mountArchive_c::execute() { OSReport_FatalError("mDoDvdThd_mountArchive_c::execute ヒープが致命的に足りません!\n"); break; } +#else + if (heap != mDoExt_getZeldaHeap()) { + OSReport_Error("mDoDvdThd_mountArchive_c::execute システムヒープで再チャレンジ!\n"); + heap = mDoExt_getZeldaHeap(); + } else { + OSReport_FatalError("mDoDvdThd_mountArchive_c::execute ヒープが致命的に足りません!\n"); + break; + } +#endif } mIsDone = true; return mArchive != NULL; } +mDoDvdThd_mountAramArchive_c::~mDoDvdThd_mountAramArchive_c() {} + +static void dummy_mDoDvdThd_mountAramArchive_c__create() { + OS_REPORT(" mountAramArchive(%d:%s)\n"); +} + +s32 mDoDvdThd_mountAramArchive_c::execute() { + JKRHeap* heap = mDoExt_getArchiveHeap(); + BOOL result = FALSE; + if (!mArchive) { + if (mMountDirection == 0) { + mArchive = new (heap, 0x20) JKRAramArchive(); + } else { + mArchive = new (heap, -0x20) JKRAramArchive(); + } +#if DEBUG + if (mDoDvdThd::verbose) { + OS_REPORT("mDoDvdThd_mountAramArchive_c::execute mArchive=%08x size=%08x\n", mArchive, JKRGetMemBlockSize(heap, mArchive)); + } +#endif + JUT_ASSERT(880, mArchive != NULL); + } + if (mArchive) { + JKRArchive::EMountDirection mountDirection = mMountDirection == 0 ? JKRArchive::MOUNT_DIRECTION_HEAD : JKRArchive::MOUNT_DIRECTION_TAIL; +#if DEBUG + OSTime time1 = OSGetTime(); +#endif + result = mArchive->mountFixed(mEntryNum, mountDirection); +#if DEBUG + OSTime time2 = OSGetTime(); + u32 msec = OS_TICKS_TO_MSEC(time2 - time1); + if (mDoDvdThd::verbose) { + OS_REPORT("mDoDvdThd_mountAramArchive_c::execute: mArchive=%08x ->mAramCache=%08x ->mFileSystem=%08x %s\n", mArchive, mArchive->mBlock, mArchive->mDvdFile, mDoDvdHack::ConvertEntrynumToName(mEntryNum)); + } +#endif + } + mIsDone = true; + return result; +} + mDoDvdThd_mountXArchive_c::~mDoDvdThd_mountXArchive_c() {} mDoDvdThd_mountXArchive_c::mDoDvdThd_mountXArchive_c(u8 mountDirection, JKRArchive::EMountMode mountMode) { @@ -249,21 +377,70 @@ mDoDvdThd_mountXArchive_c* mDoDvdThd_mountXArchive_c::create(char const* pArchiv } else { mountXArcCmd->mHeap = pHeap; mDoDvdThd::l_param.addition(mountXArcCmd); + if (mDoDvdThd::DVDLogoMode) { + OS_WARNING(" mountXArchive(%d:%s)\n", mountXArcCmd->mEntryNum, pArchivePath); + } } } return mountXArcCmd; } s32 mDoDvdThd_mountXArchive_c::execute() { +#if DEBUG + OSTime time1 = OSGetTime(); +#endif JKRArchive::EMountDirection mountDirection = mMountDirection == 0 ? JKRArchive::MOUNT_DIRECTION_HEAD : JKRArchive::MOUNT_DIRECTION_TAIL; JKRHeap* heap = mHeap != NULL ? mHeap : mDoExt_getArchiveHeap(); + s32 result = 0; mArchive = JKRArchive::mount(mEntryNum, mMountMode, heap, mountDirection); - s32 result = mArchive != NULL; + result = mArchive != NULL; +#if DEBUG + if (result) { + OSTime time2 = OSGetTime(); + u32 msec = OS_TICKS_TO_MSEC(time2 - time1); + if (mDoDvdThd::verbose) { + OS_REPORT("mDoDvdThd_mountXArchive_c::execute: mArchive=%08x %s\n", mArchive, mDoDvdHack::ConvertEntrynumToName(mEntryNum)); + } + } +#endif mIsDone = true; return result; } +mDoDvdThd_getResource_c::~mDoDvdThd_getResource_c() {} + +static void dummy_mDoDvdThd_getResource_c__create() { + OS_REPORT(" getResource(%x,%d)\n"); + OSReport("mDoDvdThd_getResource_c::create() クラス生成に失敗\n"); + OSReport("mDoDvdThd_getResource_c::create() リソース取得に失敗\n"); +} + +s32 mDoDvdThd_getResource_c::execute() { +#if DEBUG + OSTime time1 = OSGetTime(); +#endif + JUT_ASSERT(1080, mArchive); + mResource = mArchive->getResource(mResourceId); +#if DEBUG + OSTime time2 = OSGetTime(); + u32 msec = OS_TICKS_TO_MSEC(time2 - time1); + if (mArchive && mDoDvdThd::verbose) { + OS_REPORT("mDoDvdThd_getResource_c::execute: mResouce=%08x Time=%4dms\n", mResource, msec); + } +#endif + if (!mResource) { + OSReport_Error("mDoDvdThd_getResource_c::execute() リソース取得に失敗\n"); + } + mIsDone = true; + return mResource != NULL; +} + +static void dummy2() { + OS_REPORT("mEntryNum != -1"); + OS_REPORT("mDoDvdThd_toMainRam_c(%d:%s)\n"); +} + mDoDvdThd_toMainRam_c::mDoDvdThd_toMainRam_c(u8 param_0) { mMountDirection = param_0; if (param_0 == 0) { @@ -284,6 +461,9 @@ mDoDvdThd_toMainRam_c* mDoDvdThd_toMainRam_c::create(char const* pArchivePath, u } else { toMainRAMCmd->mHeap = pHeap; mDoDvdThd::l_param.addition(toMainRAMCmd); + if (mDoDvdThd::DVDLogoMode) { + OS_WARNING(" toMainRam(%d:%s)\n", toMainRAMCmd->mEntryNum, pArchivePath); + } } } return toMainRAMCmd; @@ -292,6 +472,9 @@ mDoDvdThd_toMainRam_c* mDoDvdThd_toMainRam_c::create(char const* pArchivePath, u mDoDvdThd_toMainRam_c::~mDoDvdThd_toMainRam_c() {} s32 mDoDvdThd_toMainRam_c::execute() { +#if DEBUG + OSTime time1 = OSGetTime(); +#endif JKRHeap* heap; if (mHeap != NULL) { heap = mHeap; @@ -301,17 +484,18 @@ s32 mDoDvdThd_toMainRam_c::execute() { JKRDvdRipper::EAllocDirection allocDir = mMountDirection == 0 ? JKRDvdRipper::ALLOC_DIRECTION_FORWARD : JKRDvdRipper::ALLOC_DIRECTION_BACKWARD; - mData = JKRDvdRipper::loadToMainRAM(mEntryNum, NULL, EXPAND_SWITCH_UNKNOWN1, 0, heap, allocDir, + mData = JKRDvdToMainRam(mEntryNum, NULL, EXPAND_SWITCH_UNKNOWN1, 0, heap, allocDir, 0, NULL, NULL); if (mData != NULL) { mDataSize = heap->getSize(mData); } +#if DEBUG + OSTime time2 = OSGetTime(); + u32 msec = OS_TICKS_TO_MSEC(time2 - time1); + if (mDoDvdThd::verbose) { + OS_REPORT("mDoDvdThd_toMainRam_c::execute: mMemAddress=%08x mMemSize=%08x %s\n", mData, mDataSize, mDoDvdHack::ConvertEntrynumToName(mEntryNum)); + } +#endif mIsDone = true; return mData != NULL; } - -static void dummy() { - OSReport("mDoDvdThd_getResource_c::create() クラス生成に失敗\n"); - OSReport("mDoDvdThd_getResource_c::create() リソース取得に失敗\n"); - OSReport("mDoDvdThd_getResource_c::execute() リソース取得に失敗\n"); -} diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index 07ad32028e..7f4bf6f8f9 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -24,13 +24,9 @@ #include "m_Do/m_Do_mtx.h" #include -namespace m_Do_ext { -u8 CurrentHeapAdjustVerbose; -u8 HeapAdjustVerbose; -u8 HeapAdjustQuiet; -} - -static intptr_t safeGameHeapSize = -1; +u8 mDoExt::CurrentHeapAdjustVerbose; +u8 mDoExt::HeapAdjustVerbose; +u8 mDoExt::HeapAdjustQuiet; static void mDoExt_setJ3DData(Mtx mtx, const J3DTransformInfo* transformInfo, u16 param_2) { bool local_28; @@ -681,6 +677,7 @@ JKRExpHeap* mDoExt_getDbPrintHeap() { } JKRExpHeap* gameHeap; +static intptr_t safeGameHeapSize = -1; JKRExpHeap* mDoExt_createGameHeap(u32 heapSize, JKRHeap* parentHeap) { JUT_ASSERT(1739, gameHeap == NULL || heapSize == 0); @@ -2344,18 +2341,6 @@ static u8 l_matDL[132] ATTRIBUTE_ALIGN(32) = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -static u8 l_mat1DL[141] ATTRIBUTE_ALIGN(32) = { - 0x10, 0x00, 0x00, 0x10, 0x40, 0xFF, 0xFF, 0x42, 0x80, 0x08, 0x30, 0x3C, 0xF3, 0xCF, 0x00, 0x10, - 0x00, 0x00, 0x10, 0x18, 0x3C, 0xF3, 0xCF, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x7F, - 0x32, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0C, 0xFF, - 0xFF, 0xFF, 0xFF, 0x61, 0x28, 0x38, 0x00, 0x40, 0x61, 0xC0, 0x28, 0xFA, 0x8F, 0x61, 0xC1, 0x08, - 0xFF, 0xF0, 0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x17, 0x61, 0x41, 0x00, 0x00, - 0x0C, 0x61, 0xF3, 0x7F, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x10, - 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - void mDoExt_3DlineMat0_c::setMaterial() { j3dSys.reinitGX(); GXSetNumIndStages(0); @@ -2659,6 +2644,18 @@ int mDoExt_3DlineMat1_c::init(u16 param_0, u16 param_1, ResTIMG* param_2, int pa return 1; } +static u8 l_mat1DL[141] ATTRIBUTE_ALIGN(32) = { + 0x10, 0x00, 0x00, 0x10, 0x40, 0xFF, 0xFF, 0x42, 0x80, 0x08, 0x30, 0x3C, 0xF3, 0xCF, 0x00, 0x10, + 0x00, 0x00, 0x10, 0x18, 0x3C, 0xF3, 0xCF, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0E, 0x00, 0x00, 0x7F, + 0x32, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x10, 0x0C, 0xFF, + 0xFF, 0xFF, 0xFF, 0x61, 0x28, 0x38, 0x00, 0x40, 0x61, 0xC0, 0x28, 0xFA, 0x8F, 0x61, 0xC1, 0x08, + 0xFF, 0xF0, 0x61, 0x43, 0x00, 0x00, 0x41, 0x61, 0x40, 0x00, 0x00, 0x17, 0x61, 0x41, 0x00, 0x00, + 0x0C, 0x61, 0xF3, 0x7F, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x10, + 0x00, 0x00, 0x10, 0x09, 0x00, 0x00, 0x00, 0x01, 0x61, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + void mDoExt_3DlineMat1_c::setMaterial() { j3dSys.reinitGX(); GXSetNumIndStages(0); diff --git a/src/m_Do/m_Do_ext2.cpp b/src/m_Do/m_Do_ext2.cpp new file mode 100644 index 0000000000..9d4c18228f --- /dev/null +++ b/src/m_Do/m_Do_ext2.cpp @@ -0,0 +1,138 @@ + +#include "d/dolzel.h" // IWYU pragma: keep + +#include "m_Do/m_Do_ext2.h" + +FixedMemoryCheck* FixedMemoryCheck::sFirst; + +FixedMemoryCheck::FixedMemoryCheck(u32* param_1, u32 size, JKRHeap* heap) { + mNowCode = param_1; + mSize = size; + mSaveCode = NULL; + mpHeap = heap; + field_0x10 = 0; + field_0x14 = false; + mNext = NULL; + if (sFirst) { + mNext = sFirst; + } + sFirst = this; +} + +FixedMemoryCheck* FixedMemoryCheck::easyCreate(void* param_1, u32 size) { + JKRHeap* heap = JKRGetRootHeap2(); + FixedMemoryCheck* memCheck = new (heap, 0) FixedMemoryCheck((u32*)param_1, size, heap); + if (!memCheck) { + memCheck = new (JKRGetSystemHeap(), 0) FixedMemoryCheck((u32*)param_1, size, NULL); + } + if (memCheck) { + memCheck->alloc(); + memCheck->save(); + memCheck->check(); + } + return memCheck; +} + +BOOL FixedMemoryCheck::checkAll() { + BOOL result = true; + for (FixedMemoryCheck* memCheck = sFirst; memCheck; memCheck = memCheck->mNext) { + if (!memCheck->check()) { + result = false; + } + } + return result; +} + +BOOL FixedMemoryCheck::diffAll() { + BOOL result = true; + for (FixedMemoryCheck* memCheck = sFirst; memCheck; memCheck = memCheck->mNext) { + if (!memCheck->diff()) { + result = false; + } + } + return result; +} + +BOOL FixedMemoryCheck::saveAll() { + BOOL result = true; + for (FixedMemoryCheck* memCheck = sFirst; memCheck; memCheck = memCheck->mNext) { + if (!memCheck->save()) { + result = false; + } + } + return result; +} + +BOOL FixedMemoryCheck::alloc() { + if (!mpHeap) { + OSReport_Error("FixedMemoryCheck::alloc ヒープ未設定\n"); + return false; + } + + if (mSaveCode) { + OSReport_Error("FixedMemoryCheck::alloc セーブ確保済み\n"); + return false; + } + + mSaveCode = (u32*)JKRAllocFromHeap(mpHeap, mSize, 4); + OSReport("FixedMemoryCheck::alloc: %dKB確保\n", mSize >> 10); + return mSaveCode != NULL; +} + +BOOL FixedMemoryCheck::save() { + if (!mNowCode) { + OSReport_Error("FixedMemoryCheck::save 設定ミス\n"); + return false; + } + if (mSaveCode) { + memcpy(mSaveCode, mNowCode, mSize); + } + u32 r28 = 0; + for (int i = 0; i < mSize / 4; i++) { + r28 += mNowCode[i]; + } + field_0x10 = r28; + OSReport("FixedMemoryCheck::save: チェックサム=%08x\n", field_0x10); + field_0x14 = false; + return true; +} + +BOOL FixedMemoryCheck::check() { + BOOL result = true; + if (!mSaveCode || !mNowCode) { + OSReport_Error("FixedMemoryCheck::check 設定ミス\n"); + return false; + } + u32 r29 = 0; + for (int i = 0; i < mSize / 4; i++) { + r29 += mNowCode[i]; + } + if (r29 != field_0x10) { + OSReport_Error("FixedMemoryCheck::check: チェックサム不一致 %08x : %08x\n", field_0x10, r29); + result = false; + } + if (mSaveCode) { + int cmp = memcmp(mSaveCode, mNowCode, mSize); + if(cmp) { + OSReport_Error("FixedMemoryCheck::check メモリ破壊発見 %08x %08x\n", mNowCode, mSize); + result = false; + if (!field_0x14) { + diff(); + field_0x14 = true; + } + } + } + return result; +} + +BOOL FixedMemoryCheck::diff() { + BOOL result = true; + OSReport("Address SaveCode NowCode\n"); + for (int i = 0; i < mSize / 4; i++) { + if (mSaveCode[i] != mNowCode[i]) { + result = false; + OSReport("%08x %08x %08x\n", mNowCode + i, mSaveCode[i], mNowCode[i]); + } + } + return result; +} diff --git a/src/m_Do/m_Do_graphic.cpp b/src/m_Do/m_Do_graphic.cpp index 7aed86fb99..1708067ac4 100644 --- a/src/m_Do/m_Do_graphic.cpp +++ b/src/m_Do/m_Do_graphic.cpp @@ -387,7 +387,7 @@ mDoGph_gInf_c::bloom_c mDoGph_gInf_c::m_bloom; Mtx mDoGph_gInf_c::mBlureMtx; -#if DEBUG +#if !PLATFORM_GCN cXyz mDoGph_gInf_c::csr_c::m_nowEffPos(0.0f, 0.0f, 0.0f); cXyz mDoGph_gInf_c::csr_c::m_oldEffPos(0.0f, 0.0f, 0.0f); cXyz mDoGph_gInf_c::csr_c::m_oldOldEffPos(0.0f, 0.0f, 0.0f); @@ -2105,6 +2105,10 @@ int mDoGph_Painter() { mDoGph_HIO_c mDoGph_HIO; #endif +static void dummy() { + OS_REPORT("mDoGph_Create():Initial of Graphic \n"); +} + int mDoGph_Create() { JKRSolidHeap* heap = mDoExt_createSolidHeapToCurrent(0, NULL, 0); mDoGph_gInf_c::create(); diff --git a/src/m_Do/m_Do_lib.cpp b/src/m_Do/m_Do_lib.cpp index 9b68a1a1c3..dc1b789d7a 100644 --- a/src/m_Do/m_Do_lib.cpp +++ b/src/m_Do/m_Do_lib.cpp @@ -119,6 +119,7 @@ void mDoLib_pos2camera(Vec* src, Vec* dst) { } static void dummy() { + std::tan(0.0f); J3DAlphaComp* alphaComp = NULL; alphaComp->setAlphaCompInfo((J3DAlphaCompInfo){}); J3DPEBlock* peBlock = NULL; diff --git a/src/m_Do/m_Do_machine.cpp b/src/m_Do/m_Do_machine.cpp index 34217648c7..30977fa34d 100644 --- a/src/m_Do/m_Do_machine.cpp +++ b/src/m_Do/m_Do_machine.cpp @@ -491,7 +491,7 @@ void forever() { #if !PLATFORM_GCN void exceptionShutdown() { mDoRst_reset(2, 0, 0); - //OSShutdownSystem(); + OSShutdownSystem(); forever(); } #endif @@ -501,7 +501,7 @@ void exceptionRestart() { #if PLATFORM_GCN OSResetSystem(0, 0, 0); #else - //OSRestart(0); + OSRestart(0); #endif while (true) {} } diff --git a/src/m_Do/m_Do_machine_exception.cpp b/src/m_Do/m_Do_machine_exception.cpp index 9588919d7f..93cfb59e9e 100644 --- a/src/m_Do/m_Do_machine_exception.cpp +++ b/src/m_Do/m_Do_machine_exception.cpp @@ -16,7 +16,7 @@ static JUTConsole* sConsole; void print_f(char const* fmt, ...) { va_list args; va_start(args, fmt); - JUTConsole_print_f_va_(sConsole, fmt, args); + sConsole->print_f_va(fmt, args); va_end(args); } @@ -44,8 +44,9 @@ void dispHeapInfo() { print_f("Archive %5d / %5d\n", archiveFree / 1024, archiveTotal / 1024); print("--------------------------------\n"); - if (JKRAram::getAramHeap()) { - JKRAram::getAramHeap()->dump(); + JKRAramHeap* aramHeap = JKRAram::getAramHeap(); + if (aramHeap) { + aramHeap->dump(); } DynamicModuleControlBase::dump(); g_dComIfG_gameInfo.mResControl.dump(); @@ -62,8 +63,13 @@ void dispGameInfo() { void dispDateInfo() { print("------------- Date Infomation ---------\n"); +#if DEBUG + print(" DEBUG VERSION\n"); + print("COMPILE USER: Authorized User\n"); +#else print(" FINAL VERSION\n"); print("COMPILE USER: FINAL\n"); +#endif print_f("COPYDATE : %17s\n", mDoMain::COPYDATE_STRING); OSCalendarTime time; @@ -84,7 +90,8 @@ void dispDateInfo() { } void dispConsoleToTerminal() { - JFWSystem::getSystemConsole()->dumpToTerminal(0xFFFFFFFF); + JUTConsole* console = JFWSystem::getSystemConsole(); + console->dumpToTerminal(0xFFFFFFFF); } void exception_addition(JUTConsole* pConsole) { diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp index 311685d165..84987d33ef 100644 --- a/src/m_Do/m_Do_main.cpp +++ b/src/m_Do/m_Do_main.cpp @@ -805,7 +805,7 @@ void parse_args(int argc, const char* argv[]) { dStage_roomControl_c::onNoArcBank(); OS_REPORT("\x1b[33mアーカイブバンクを無効にしました\n\x1b[m"); } else if (strcmp(argv[i], "--particle254") == 0) { - // data_8074c494 = 1; + fapGm_HIO_c::mParticle254Fix = 1; OSReport_Warning("パーティクル254固定にしました\n"); } else if (strncmp(argv[i], "--menu=", sizeof("--menu=") - 1) == 0) { char* var_r27 = strchr(argv[i] + 7, ','); @@ -822,15 +822,15 @@ void parse_args(int argc, const char* argv[]) { if (spC != NULL) { *spC = 0; spC++; - sscanf(spC, "%d", dScnMenu_c::cursolPoint); + sscanf(spC, "%d", &dScnMenu_c::cursolPoint); dScnMenu_c::m_error_flags |= (u8)8; } - sscanf(var_r26, "%d", dScnMenu_c::cursolLayer); + sscanf(var_r26, "%d", &dScnMenu_c::cursolLayer); dScnMenu_c::m_error_flags |= (u8)4; } - sscanf(var_r27, "%d", dScnMenu_c::cursolRoomNo); + sscanf(var_r27, "%d", &dScnMenu_c::cursolRoomNo); dScnMenu_c::m_error_flags |= (u8)2; } diff --git a/src/m_Do/m_Do_printf.cpp b/src/m_Do/m_Do_printf.cpp index 1cca26b3a1..154d54c737 100644 --- a/src/m_Do/m_Do_printf.cpp +++ b/src/m_Do/m_Do_printf.cpp @@ -214,57 +214,63 @@ void OSReport_FatalError(const char* fmt, ...) { void OSReport_Error(const char* fmt, ...) { print_errors++; - if (!__OSReport_Error_disable) { - #if DEBUG - OSThread* thread = mDoExt_GetCurrentRunningThread(); - if (thread != NULL) { - OSLockMutex(&print_mutex); - } - #endif - - va_list args; - va_start(args, fmt); - OSReportForceEnableOn(); - my_PutString("\x1B[41;37m[ERROR]"); - OSVReport(fmt, args); - my_PutString("\x1B[m"); - OSReportForceEnableOff(); - fflush(stdout); - va_end(args); - - #if DEBUG - if (thread != NULL) { - OSUnlockMutex(&print_mutex); - } - #endif + if (__OSReport_Error_disable) { + return; } + + #if DEBUG + OSThread* thread = mDoExt_GetCurrentRunningThread(); + if (thread != NULL) { + OSLockMutex(&print_mutex); + } + #endif + + va_list args; + va_start(args, fmt); + OSReportForceEnableOn(); + my_PutString("\x1B[41;37m[ERROR]"); + OSVReport(fmt, args); + my_PutString("\x1B[m"); + OSReportForceEnableOff(); + fflush(stdout); + va_end(args); + + #if DEBUG + if (thread != NULL) { + OSUnlockMutex(&print_mutex); + } + #endif } void OSReport_Warning(const char* fmt, ...) { print_warings++; - if (!__OSReport_Warning_disable) { - va_list args; - va_start(args, fmt); - OSReportForceEnableOn(); - my_PutString("\x1B[43;30m[WARN]"); - OSVAttention(fmt, args); - my_PutString("\x1B[m"); - OSReportForceEnableOff(); - fflush(stdout); - va_end(args); + if (__OSReport_Warning_disable) { + return; } + + va_list args; + va_start(args, fmt); + OSReportForceEnableOn(); + my_PutString("\x1B[43;30m[WARN]"); + OSVAttention(fmt, args); + my_PutString("\x1B[m"); + OSReportForceEnableOff(); + fflush(stdout); + va_end(args); } void OSReport_System(const char* fmt, ...) { print_systems++; - if (!__OSReport_System_disable) { - va_list args; - va_start(args, fmt); - OSReportForceEnableOn(); - OSVAttention(fmt, args); - OSReportForceEnableOff(); - va_end(args); + if (__OSReport_System_disable) { + return; } + + va_list args; + va_start(args, fmt); + OSReportForceEnableOn(); + OSVAttention(fmt, args); + OSReportForceEnableOff(); + va_end(args); } void OSPanic(const char* file, int line, const char* fmt, ...) { @@ -286,6 +292,6 @@ void OSPanic(const char* file, int line, const char* fmt, ...) { // force a crash by writing to an invalid address tmp = (u32*)0x1234567; - *tmp = 0x1234567; + *tmp = (uintptr_t)tmp; PPCHalt(); } diff --git a/src/revolution/os/OSReset.c b/src/revolution/os/OSReset.c index f0dbc50ba2..2bf9e8fbb1 100644 --- a/src/revolution/os/OSReset.c +++ b/src/revolution/os/OSReset.c @@ -175,7 +175,7 @@ static void KillThreads(void) { } } -void OSShutdownSystem(BOOL reset, u32 resetCode, BOOL forceMenu) { +void OSShutdownSystem() { SCIdleModeInfo idleModeInfo; OSIOSRev iosRev; OSStateFlags state;