diff --git a/config/ce-e/config.yml b/config/ce-e/config.yml index b8c5faeb..f4364e00 100644 --- a/config/ce-e/config.yml +++ b/config/ce-e/config.yml @@ -200,3 +200,18 @@ block_relocations: - source: 0x800301E0 - source: 0x800301F0 - source: 0x80030218 +# cpu.c +- source: 0x800336BC +- source: 0x800336C4 +- source: 0x80033724 +- source: 0x8003372C +- source: 0x80033738 +- source: 0x80033EC8 +- source: 0x80033EF8 +- source: 0x80033EFC +- source: 0x80033F30 +- source: 0x80033F44 +- source: 0x80033F84 +- source: 0x80033F88 +- source: 0x80033FBC +- source: 0x80033FD0 diff --git a/config/ce-e/symbols.txt b/config/ce-e/symbols.txt index be43d137..394274a3 100644 --- a/config/ce-e/symbols.txt +++ b/config/ce-e/symbols.txt @@ -1939,20 +1939,20 @@ VolumeTable = .data:0x80136478; // type:object size:0x100 scope:global @357 = .data:0x80136800; // type:object size:0x1C scope:local @42 = .data:0x80136820; // type:object size:0x22 scope:local data:string ...data.0 = .data:0x80136848; // type:label scope:local -@2074 = .data:0x80136848; // type:object size:0x11 scope:local -@2332 = .data:0x8013685C; // type:object size:0x35 scope:local data:string -@2333 = .data:0x80136894; // type:object size:0xB scope:local data:string -@2978 = .data:0x801368A0; // type:object size:0x60 scope:local -@2993 = .data:0x80136900; // type:object size:0x60 scope:local -@3178 = .data:0x80136960; // type:object size:0xC8 scope:local -@3230 = .data:0x80136A28; // type:object size:0xF scope:local data:string -@3333 = .data:0x80136A38; // type:object size:0x12 scope:local data:string -@3535 = .data:0x80136A4C; // type:object size:0xE scope:local data:string -@3832 = .data:0x80136A5C; // type:object size:0x12 scope:local data:string -@4143 = .data:0x80136A70; // type:object size:0x14 scope:local data:string -@4144 = .data:0x80136A84; // type:object size:0x14 scope:local data:string -@4190 = .data:0x80136A98; // type:object size:0x14 scope:local data:string -@4251 = .data:0x80136AAC; // type:object size:0x14 scope:local data:string +@1718 = .data:0x80136848; // type:object size:0x11 scope:local +@1968 = .data:0x8013685C; // type:object size:0x35 scope:local data:string +@1969 = .data:0x80136894; // type:object size:0xB scope:local data:string +@2456 = .data:0x801368A0; // type:object size:0x60 scope:local +@2471 = .data:0x80136900; // type:object size:0x60 scope:local +@2652 = .data:0x80136960; // type:object size:0xC8 scope:local +@2691 = .data:0x80136A28; // type:object size:0xF scope:local data:string +@2812 = .data:0x80136A38; // type:object size:0x12 scope:local data:string +@2879 = .data:0x80136A4C; // type:object size:0xE scope:local data:string +@3107 = .data:0x80136A5C; // type:object size:0x12 scope:local data:string +@3220 = .data:0x80136A70; // type:object size:0x14 scope:local data:string +@3221 = .data:0x80136A84; // type:object size:0x14 scope:local data:string +@3242 = .data:0x80136A98; // type:object size:0x14 scope:local data:string +@3304 = .data:0x80136AAC; // type:object size:0x14 scope:local data:string gClassCode = .data:0x80136AC0; // type:object size:0x10 scope:global gClassSound = .data:0x80136AD0; // type:object size:0x10 scope:global ...data.0 = .data:0x80136AE0; // type:label scope:local @@ -2813,7 +2813,7 @@ gResetBeginFlag = .sdata:0x801810A8; // type:object size:0x4 scope:global data:4 @1353 = .sdata:0x801810AC; // type:object size:0x8 scope:local data:string @1354 = .sdata:0x801810B4; // type:object size:0x7 scope:local data:string @75 = .sdata:0x801810C0; // type:object size:0x4 scope:local data:string -toggle$1032 = .sdata:0x801810C8; // type:object size:0x4 scope:local data:4byte +toggle$800 = .sdata:0x801810C8; // type:object size:0x4 scope:local data:4byte @33 = .sdata:0x801810D0; // type:object size:0x5 scope:local data:string @52 = .sdata:0x801810D8; // type:object size:0x6 scope:local data:string sCapture$198 = .sdata:0x801810E0; // type:object size:0x4 scope:local data:4byte @@ -3186,11 +3186,11 @@ gnTickReset_thpread = .sbss:0x80181990; // type:object size:0x4 scope:global dat VideoDecodeThreadCreated = .sbss:0x80181998; // type:object size:0x4 scope:local data:4byte First = .sbss:0x8018199C; // type:object size:0x4 scope:local data:4byte currentIdx = .sbss:0x801819A0; // type:object size:0x4 scope:global data:4byte -yes$769 = .sbss:0x801819A4; // type:object size:0x4 scope:local data:4byte -prevMenuEntry$770 = .sbss:0x801819A8; // type:object size:0x4 scope:local data:4byte -nextMenuEntry$771 = .sbss:0x801819AC; // type:object size:0x4 scope:local data:4byte -toggle2$1027 = .sbss:0x801819B0; // type:object size:0x4 scope:local data:4byte -checkFailCount$1488 = .sbss:0x801819B4; // type:object size:0x4 scope:local data:4byte +yes$592 = .sbss:0x801819A4; // type:object size:0x4 scope:local data:4byte +prevMenuEntry$593 = .sbss:0x801819A8; // type:object size:0x4 scope:local data:4byte +nextMenuEntry$594 = .sbss:0x801819AC; // type:object size:0x4 scope:local data:4byte +toggle2$801 = .sbss:0x801819B0; // type:object size:0x4 scope:local data:4byte +checkFailCount$1252 = .sbss:0x801819B4; // type:object size:0x4 scope:local data:4byte bWrite2Card = .sbss:0x801819B8; // type:object size:0x4 scope:global data:4byte gpBufferFunction = .sbss:0x801819C0; // type:object size:0x4 scope:local data:4byte ganDataCode = .sbss:0x801819C4; // type:object size:0x4 scope:local data:4byte diff --git a/config/ce-j/symbols.txt b/config/ce-j/symbols.txt index 70b59ab4..021a1882 100644 --- a/config/ce-j/symbols.txt +++ b/config/ce-j/symbols.txt @@ -599,29 +599,29 @@ rspCreateJPEGArrays = .text:0x800801C0; // type:function size:0x8E4 scope:global rspParseABI4 = .text:0x80080AA4; // type:function size:0x71C scope:global rspInitAudioDMEM4 = .text:0x800811C0; // type:function size:0x1464 scope:local rspParseABI3 = .text:0x80082624; // type:function size:0x570 scope:global -rspAMix3 = .text:0x80082B94; // type:function size:0x98 scope:global +rspAMix3 = .text:0x80082B94; // type:function size:0x98 scope:local rspAEnvMixer3 = .text:0x80082C2C; // type:function size:0x234 scope:global rspInitAudioDMEM3 = .text:0x80082E60; // type:function size:0x143C scope:local rspParseABI2 = .text:0x8008429C; // type:function size:0x6E8 scope:global rspAPCM8Dec2 = .text:0x80084984; // type:function size:0x894 scope:global rspAEnvMixer2 = .text:0x80085218; // type:function size:0x2D8 scope:global rspADistFilter2 = .text:0x800854F0; // type:function size:0x10C scope:global -rspAInterleave2 = .text:0x800855FC; // type:function size:0x24C scope:global -rspAMix2 = .text:0x80085848; // type:function size:0x88 scope:global +rspAInterleave2 = .text:0x800855FC; // type:function size:0x24C scope:local +rspAMix2 = .text:0x80085848; // type:function size:0x88 scope:local rspAFirFilter2 = .text:0x800858D0; // type:function size:0xDB0 scope:global -rspAResample2 = .text:0x80086680; // type:function size:0x230 scope:global -rspANMix2 = .text:0x800868B0; // type:function size:0x6C scope:global +rspAResample2 = .text:0x80086680; // type:function size:0x230 scope:local +rspANMix2 = .text:0x800868B0; // type:function size:0x6C scope:local rspANoise2 = .text:0x8008691C; // type:function size:0x2CC scope:global rspAADPCMDec2Fast = .text:0x80086BE8; // type:function size:0x938 scope:local rspInitAudioDMEM2 = .text:0x80087520; // type:function size:0x12C8 scope:local rspParseABI1 = .text:0x800887E8; // type:function size:0x360 scope:global -rspParseABI = .text:0x80088B48; // type:function size:0x22C scope:global -rspASetVolume1 = .text:0x80088D74; // type:function size:0x98 scope:global -rspASetBuffer1 = .text:0x80088E0C; // type:function size:0x108 scope:global -rspAResample1 = .text:0x80088F14; // type:function size:0x2F8 scope:global -rspAMix1 = .text:0x8008920C; // type:function size:0x98 scope:global +rspParseABI = .text:0x80088B48; // type:function size:0x22C scope:local +rspASetVolume1 = .text:0x80088D74; // type:function size:0x98 scope:local +rspASetBuffer1 = .text:0x80088E0C; // type:function size:0x108 scope:local +rspAResample1 = .text:0x80088F14; // type:function size:0x2F8 scope:local +rspAMix1 = .text:0x8008920C; // type:function size:0x98 scope:local rspAEnvMixer1 = .text:0x800892A4; // type:function size:0xBD8 scope:global -rspAPoleFilter1 = .text:0x80089E7C; // type:function size:0x964 scope:global +rspAPoleFilter1 = .text:0x80089E7C; // type:function size:0x964 scope:local rspAADPCMDec1Fast = .text:0x8008A7E0; // type:function size:0x8A0 scope:local rspLoadADPCMCoefTable2 = .text:0x8008B080; // type:function size:0x17C scope:local rspLoadADPCMCoefTable1 = .text:0x8008B1FC; // type:function size:0x17C scope:local @@ -1873,20 +1873,20 @@ VolumeTable = .data:0x800EA1E8; // type:object size:0x100 scope:global @268 = .data:0x800EA500; // type:object size:0x1C scope:local @42 = .data:0x800EA520; // type:object size:0x22 scope:local data:string ...data.0 = .data:0x800EA548; // type:label scope:local -@1722 = .data:0x800EA548; // type:object size:0x1B scope:local -@1972 = .data:0x800EA564; // type:object size:0x35 scope:local data:string -@1973 = .data:0x800EA59C; // type:object size:0xB scope:local data:string -@2460 = .data:0x800EA5A8; // type:object size:0x60 scope:local -@2475 = .data:0x800EA608; // type:object size:0x60 scope:local -@2656 = .data:0x800EA668; // type:object size:0xC8 scope:local -@2695 = .data:0x800EA730; // type:object size:0xF scope:local data:string -@2816 = .data:0x800EA740; // type:object size:0x12 scope:local data:string -@2883 = .data:0x800EA754; // type:object size:0xE scope:local data:string -@3111 = .data:0x800EA764; // type:object size:0x12 scope:local data:string -@3227 = .data:0x800EA778; // type:object size:0x14 scope:local data:string -@3228 = .data:0x800EA78C; // type:object size:0x14 scope:local data:string -@3249 = .data:0x800EA7A0; // type:object size:0x14 scope:local data:string -@3311 = .data:0x800EA7B4; // type:object size:0x14 scope:local data:string +@1721 = .data:0x800EA548; // type:object size:0x1B scope:local +@1971 = .data:0x800EA564; // type:object size:0x35 scope:local data:string +@1972 = .data:0x800EA59C; // type:object size:0xB scope:local data:string +@2459 = .data:0x800EA5A8; // type:object size:0x60 scope:local +@2474 = .data:0x800EA608; // type:object size:0x60 scope:local +@2655 = .data:0x800EA668; // type:object size:0xC8 scope:local +@2694 = .data:0x800EA730; // type:object size:0xF scope:local data:string +@2815 = .data:0x800EA740; // type:object size:0x12 scope:local data:string +@2882 = .data:0x800EA754; // type:object size:0xE scope:local data:string +@3110 = .data:0x800EA764; // type:object size:0x12 scope:local data:string +@3226 = .data:0x800EA778; // type:object size:0x14 scope:local data:string +@3227 = .data:0x800EA78C; // type:object size:0x14 scope:local data:string +@3248 = .data:0x800EA7A0; // type:object size:0x14 scope:local data:string +@3310 = .data:0x800EA7B4; // type:object size:0x14 scope:local data:string gClassCode = .data:0x800EA7C8; // type:object size:0x10 scope:global gClassSound = .data:0x800EA7D8; // type:object size:0x10 scope:global @316 = .data:0x800EA7E8; // type:object size:0x3E scope:local data:string @@ -2737,7 +2737,7 @@ gResetBeginFlag = .sdata:0x80134D98; // type:object size:0x4 scope:global data:4 @780 = .sdata:0x80134D9C; // type:object size:0x8 scope:local data:string @781 = .sdata:0x80134DA4; // type:object size:0x7 scope:local data:string @75 = .sdata:0x80134DB0; // type:object size:0x4 scope:local data:string -toggle$804 = .sdata:0x80134DB8; // type:object size:0x4 scope:local data:4byte +toggle$803 = .sdata:0x80134DB8; // type:object size:0x4 scope:local data:4byte @33 = .sdata:0x80134DC0; // type:object size:0x5 scope:local data:string @52 = .sdata:0x80134DC8; // type:object size:0x6 scope:local data:string sCapture$198 = .sdata:0x80134DD0; // type:object size:0x4 scope:local data:4byte @@ -3102,11 +3102,11 @@ gnTickReset_thpread = .sbss:0x80135650; // type:object size:0x4 scope:global dat VideoDecodeThreadCreated = .sbss:0x80135658; // type:object size:0x4 scope:local data:4byte First = .sbss:0x8013565C; // type:object size:0x4 scope:local data:4byte currentIdx = .sbss:0x80135660; // type:object size:0x4 scope:global data:4byte -yes$596 = .sbss:0x80135664; // type:object size:0x4 scope:local data:4byte -prevMenuEntry$597 = .sbss:0x80135668; // type:object size:0x4 scope:local data:4byte -nextMenuEntry$598 = .sbss:0x8013566C; // type:object size:0x4 scope:local data:4byte -toggle2$805 = .sbss:0x80135670; // type:object size:0x4 scope:local data:4byte -checkFailCount$1256 = .sbss:0x80135674; // type:object size:0x4 scope:local data:4byte +yes$595 = .sbss:0x80135664; // type:object size:0x4 scope:local data:4byte +prevMenuEntry$596 = .sbss:0x80135668; // type:object size:0x4 scope:local data:4byte +nextMenuEntry$597 = .sbss:0x8013566C; // type:object size:0x4 scope:local data:4byte +toggle2$804 = .sbss:0x80135670; // type:object size:0x4 scope:local data:4byte +checkFailCount$1255 = .sbss:0x80135674; // type:object size:0x4 scope:local data:4byte bWrite2Card = .sbss:0x80135678; // type:object size:0x4 scope:global data:4byte gpBufferFunction = .sbss:0x80135680; // type:object size:0x4 scope:local data:4byte ganDataCode = .sbss:0x80135684; // type:object size:0x4 scope:local data:4byte diff --git a/config/ce-u/symbols.txt b/config/ce-u/symbols.txt index e5dc3638..f1373a35 100644 --- a/config/ce-u/symbols.txt +++ b/config/ce-u/symbols.txt @@ -1667,8 +1667,8 @@ __stdio_atexit = .text:0x800CEDB4; // type:function size:0x4 scope:global sprintf = .text:0x800CEDB8; // type:function size:0xD4 scope:global vsprintf = .text:0x800CEE8C; // type:function size:0x78 scope:global vprintf = .text:0x800CEF04; // type:function size:0x7C scope:global -__StringWrite = .text:0x800CEF80; // type:function size:0x6C scope:global -__FileWrite = .text:0x800CEFEC; // type:function size:0x58 scope:global +__StringWrite = .text:0x800CEF80; // type:function size:0x6C scope:local +__FileWrite = .text:0x800CEFEC; // type:function size:0x58 scope:local __pformatter = .text:0x800CF044; // type:function size:0x630 scope:local float2str = .text:0x800CF674; // type:function size:0x638 scope:local round_decimal = .text:0x800CFCAC; // type:function size:0x134 scope:local @@ -1756,8 +1756,8 @@ gTRKMemMap = .rodata:0x800D3340; // type:object size:0x10 scope:global data:4byt @238 = .rodata:0x800D3364; // type:object size:0x14 scope:local data:4byte @243 = .rodata:0x800D3378; // type:object size:0x14 scope:local data:4byte __constants = .rodata:0x800D3390; // type:object size:0x18 scope:local data:double -bit_values = .rodata:0x800D33A8; // type:object size:0x48 scope:local data:double -digit_values = .rodata:0x800D33F0; // type:object size:0x40 scope:local +bit_values = .rodata:0x800D33A8; // type:object size:0x48 scope:global data:double +digit_values = .rodata:0x800D33F0; // type:object size:0x40 scope:global __ctype_map = .rodata:0x800D3430; // type:object size:0x100 scope:global __lower_map = .rodata:0x800D3530; // type:object size:0x100 scope:global __upper_map = .rodata:0x800D3630; // type:object size:0x100 scope:global @@ -1872,20 +1872,20 @@ VolumeTable = .data:0x800EC6F0; // type:object size:0x100 scope:global @268 = .data:0x800ECA08; // type:object size:0x1C scope:local @42 = .data:0x800ECA28; // type:object size:0x22 scope:local data:string ...data.0 = .data:0x800ECA50; // type:label scope:local -@2076 = .data:0x800ECA50; // type:object size:0x11 scope:local -@2334 = .data:0x800ECA64; // type:object size:0x35 scope:local data:string -@2335 = .data:0x800ECA9C; // type:object size:0xB scope:local data:string -@2980 = .data:0x800ECAA8; // type:object size:0x60 scope:local -@2995 = .data:0x800ECB08; // type:object size:0x60 scope:local -@3180 = .data:0x800ECB68; // type:object size:0xC8 scope:local -@3232 = .data:0x800ECC30; // type:object size:0xF scope:local data:string -@3335 = .data:0x800ECC40; // type:object size:0x12 scope:local data:string -@3537 = .data:0x800ECC54; // type:object size:0xE scope:local data:string -@3834 = .data:0x800ECC64; // type:object size:0x12 scope:local data:string -@4148 = .data:0x800ECC78; // type:object size:0x14 scope:local data:string -@4149 = .data:0x800ECC8C; // type:object size:0x14 scope:local data:string -@4195 = .data:0x800ECCA0; // type:object size:0x14 scope:local data:string -@4256 = .data:0x800ECCB4; // type:object size:0x14 scope:local data:string +@1721 = .data:0x800ECA50; // type:object size:0x11 scope:local data:string +@1971 = .data:0x800ECA64; // type:object size:0x35 scope:local data:string +@1972 = .data:0x800ECA9C; // type:object size:0xB scope:local data:string +@2459 = .data:0x800ECAA8; // type:object size:0x60 scope:local +@2474 = .data:0x800ECB08; // type:object size:0x60 scope:local +@2655 = .data:0x800ECB68; // type:object size:0xC8 scope:local +@2694 = .data:0x800ECC30; // type:object size:0xF scope:local data:string +@2815 = .data:0x800ECC40; // type:object size:0x12 scope:local data:string +@2882 = .data:0x800ECC54; // type:object size:0xE scope:local data:string +@3110 = .data:0x800ECC64; // type:object size:0x12 scope:local data:string +@3226 = .data:0x800ECC78; // type:object size:0x14 scope:local data:string +@3227 = .data:0x800ECC8C; // type:object size:0x14 scope:local data:string +@3248 = .data:0x800ECCA0; // type:object size:0x14 scope:local data:string +@3310 = .data:0x800ECCB4; // type:object size:0x14 scope:local data:string gClassCode = .data:0x800ECCC8; // type:object size:0x10 scope:global gClassSound = .data:0x800ECCD8; // type:object size:0x10 scope:global @316 = .data:0x800ECCE8; // type:object size:0x3E scope:local data:string @@ -2525,11 +2525,11 @@ TRK_ISR_OFFSETS = .data:0x800F5FD8; // type:object size:0x3C scope:local data:4b gDBCommTable = .data:0x800F6018; // type:object size:0x1C scope:global data:4byte ...data.0 = .data:0x800F6038; // type:label scope:local __files = .data:0x800F6038; // type:object size:0xD8 scope:global -@1009 = .data:0x800F6110; // type:object size:0x84 scope:local -@1066 = .data:0x800F6194; // type:object size:0x84 scope:local -@1186 = .data:0x800F6218; // type:object size:0xD0 scope:local -@1185 = .data:0x800F62E8; // type:object size:0x44 scope:local -@410 = .data:0x800F6330; // type:object size:0x44 scope:local +@896 = .data:0x800F6110; // type:object size:0x84 scope:local +@953 = .data:0x800F6194; // type:object size:0x84 scope:local +@1073 = .data:0x800F6218; // type:object size:0xD0 scope:local +@1072 = .data:0x800F62E8; // type:object size:0x44 scope:local +@179 = .data:0x800F6330; // type:object size:0x44 scope:local __float_nan = .data:0x800F6378; // type:object size:0x4 scope:global data:float __float_huge = .data:0x800F637C; // type:object size:0x4 scope:global data:float ...data.0 = .data:0x800F6380; // type:label scope:local @@ -2736,7 +2736,7 @@ gResetBeginFlag = .sdata:0x80137298; // type:object size:0x4 scope:global data:4 @780 = .sdata:0x8013729C; // type:object size:0x8 scope:local data:string @781 = .sdata:0x801372A4; // type:object size:0x7 scope:local data:string @75 = .sdata:0x801372B0; // type:object size:0x4 scope:local data:string -toggle$1034 = .sdata:0x801372B8; // type:object size:0x4 scope:local data:4byte +toggle$803 = .sdata:0x801372B8; // type:object size:0x4 scope:local data:4byte @33 = .sdata:0x801372C0; // type:object size:0x5 scope:local data:string @52 = .sdata:0x801372C8; // type:object size:0x6 scope:local data:string sCapture$198 = .sdata:0x801372D0; // type:object size:0x4 scope:local data:4byte @@ -3047,8 +3047,8 @@ __CARDVendorID = .sdata:0x80137A58; // type:object size:0x2 scope:global data:2b __CARDPermMask = .sdata:0x80137A5A; // type:object size:0x1 scope:global data:byte __THPVersion = .sdata:0x80137A60; // type:object size:0x4 scope:global data:4byte @wstringBase0 = .sdata:0x80137A68; // type:object size:0x2 scope:local -K1 = .sdata:0x80137A70; // type:object size:0x4 scope:local data:4byte -K2 = .sdata:0x80137A74; // type:object size:0x4 scope:local data:4byte +K1 = .sdata:0x80137A70; // type:object size:0x4 scope:global data:4byte +K2 = .sdata:0x80137A74; // type:object size:0x4 scope:global data:4byte SendCount = .sdata:0x80137A78; // type:object size:0x1 scope:local data:byte gnCountArgument = .sbss:0x80137A80; // type:object size:0x4 scope:local data:4byte gaszArgument = .sbss:0x80137A84; // type:object size:0x4 scope:local data:4byte @@ -3101,11 +3101,11 @@ gnTickReset_thpread = .sbss:0x80137B50; // type:object size:0x4 scope:global dat VideoDecodeThreadCreated = .sbss:0x80137B58; // type:object size:0x4 scope:local data:4byte First = .sbss:0x80137B5C; // type:object size:0x4 scope:local data:4byte currentIdx = .sbss:0x80137B60; // type:object size:0x4 scope:global data:4byte -yes$771 = .sbss:0x80137B64; // type:object size:0x4 scope:local data:4byte -prevMenuEntry$772 = .sbss:0x80137B68; // type:object size:0x4 scope:local data:4byte -nextMenuEntry$773 = .sbss:0x80137B6C; // type:object size:0x4 scope:local data:4byte -toggle2$1029 = .sbss:0x80137B70; // type:object size:0x4 scope:local data:4byte -checkFailCount$1490 = .sbss:0x80137B74; // type:object size:0x4 scope:local data:4byte +yes$595 = .sbss:0x80137B64; // type:object size:0x4 scope:local data:4byte +prevMenuEntry$596 = .sbss:0x80137B68; // type:object size:0x4 scope:local data:4byte +nextMenuEntry$597 = .sbss:0x80137B6C; // type:object size:0x4 scope:local data:4byte +toggle2$804 = .sbss:0x80137B70; // type:object size:0x4 scope:local data:4byte +checkFailCount$1255 = .sbss:0x80137B74; // type:object size:0x4 scope:local data:4byte bWrite2Card = .sbss:0x80137B78; // type:object size:0x4 scope:global data:4byte gpBufferFunction = .sbss:0x80137B80; // type:object size:0x4 scope:local data:4byte ganDataCode = .sbss:0x80137B84; // type:object size:0x4 scope:local data:4byte @@ -3676,12 +3676,12 @@ __GXData = .sdata2:0x80138600; // type:object size:0x4 scope:global data:4byte @666 = .sdata2:0x8013872C; // type:object size:0x4 scope:local data:float @667 = .sdata2:0x80138730; // type:object size:0x4 scope:local data:float @40 = .sdata2:0x80138738; // type:object size:0x8 scope:local data:double -@268 = .sdata2:0x80138740; // type:object size:0x8 scope:local data:double -@270 = .sdata2:0x80138748; // type:object size:0x8 scope:local data:double -@272 = .sdata2:0x80138750; // type:object size:0x8 scope:local data:double -@362 = .sdata2:0x80138758; // type:object size:0x8 scope:local data:double -@363 = .sdata2:0x80138760; // type:object size:0x8 scope:local data:double -@919 = .sdata2:0x80138768; // type:object size:0x8 scope:local data:double +@145 = .sdata2:0x80138740; // type:object size:0x8 scope:local data:double +@146 = .sdata2:0x80138748; // type:object size:0x8 scope:local data:double +@147 = .sdata2:0x80138750; // type:object size:0x8 scope:local data:double +@148 = .sdata2:0x80138758; // type:object size:0x8 scope:local data:double +@149 = .sdata2:0x80138760; // type:object size:0x8 scope:local data:double +@806 = .sdata2:0x80138768; // type:object size:0x8 scope:local data:double @302 = .sdata2:0x80138770; // type:object size:0x8 scope:local data:double @303 = .sdata2:0x80138778; // type:object size:0x8 scope:local data:double @304 = .sdata2:0x80138780; // type:object size:0x8 scope:local data:double diff --git a/config/mq-j/symbols.txt b/config/mq-j/symbols.txt index 49278039..551c464e 100644 --- a/config/mq-j/symbols.txt +++ b/config/mq-j/symbols.txt @@ -172,27 +172,27 @@ mcardInit = .text:0x80019164; // type:function size:0x5C mcardReInit = .text:0x800191C0; // type:function size:0x198 mcardWriteGameDataReset = .text:0x80019358; // type:function size:0x68 mcardReadGameData = .text:0x800193C0; // type:function size:0x398 -mcardWriteTimeAsynch = .text:0x80019758; // type:function size:0x204 -mcardWriteConfigAsynch = .text:0x8001995C; // type:function size:0x1C4 -mcardReadBufferAsynch = .text:0x80019B20; // type:function size:0x1A4 -mcardWriteBufferAsynch = .text:0x80019CC4; // type:function size:0x1E4 -mcardWriteFileHeaderInitial = .text:0x80019EA8; // type:function size:0x224 -mcardReadFileHeaderInitial = .text:0x8001A0CC; // type:function size:0x158 -mcardWriteFileHeader = .text:0x8001A224; // type:function size:0x3BC -mcardReadFileHeader = .text:0x8001A5E0; // type:function size:0x224 -mcardWriteAnywherePartial = .text:0x8001A804; // type:function size:0x23C -mcardWriteAnywhere = .text:0x8001AA40; // type:function size:0x22C -mcardReadAnywhere = .text:0x8001AC6C; // type:function size:0x200 -mcardReadyCard = .text:0x8001AE6C; // type:function size:0x16C -mcardPoll = .text:0x8001AFD8; // type:function size:0xC4 -mcardVerifyChecksumFileHeader = .text:0x8001B09C; // type:function size:0x22C -mcardCheckChecksumFileHeader = .text:0x8001B2C8; // type:function size:0x314 -mcardReplaceFileBlock = .text:0x8001B5DC; // type:function size:0x400 -mcardSaveChecksumFileHeader = .text:0x8001B9DC; // type:function size:0x35C -mcardCalculateChecksumFileBlock2 = .text:0x8001BD38; // type:function size:0x168 -mcardCalculateChecksumFileBlock1 = .text:0x8001BEA0; // type:function size:0x168 -mcardCalculateChecksum = .text:0x8001C008; // type:function size:0x60 -mcardGCErrorHandler = .text:0x8001C068; // type:function size:0x194 +mcardWriteTimeAsynch = .text:0x80019758; // type:function size:0x204 scope:local +mcardWriteConfigAsynch = .text:0x8001995C; // type:function size:0x1C4 scope:local +mcardReadBufferAsynch = .text:0x80019B20; // type:function size:0x1A4 scope:local +mcardWriteBufferAsynch = .text:0x80019CC4; // type:function size:0x1E4 scope:local +mcardWriteFileHeaderInitial = .text:0x80019EA8; // type:function size:0x224 scope:local +mcardReadFileHeaderInitial = .text:0x8001A0CC; // type:function size:0x158 scope:local +mcardWriteFileHeader = .text:0x8001A224; // type:function size:0x3BC scope:local +mcardReadFileHeader = .text:0x8001A5E0; // type:function size:0x224 scope:local +mcardWriteAnywherePartial = .text:0x8001A804; // type:function size:0x23C scope:local +mcardWriteAnywhere = .text:0x8001AA40; // type:function size:0x22C scope:local +mcardReadAnywhere = .text:0x8001AC6C; // type:function size:0x200 scope:local +mcardReadyCard = .text:0x8001AE6C; // type:function size:0x16C scope:local +mcardPoll = .text:0x8001AFD8; // type:function size:0xC4 scope:local +mcardVerifyChecksumFileHeader = .text:0x8001B09C; // type:function size:0x22C scope:local +mcardCheckChecksumFileHeader = .text:0x8001B2C8; // type:function size:0x314 scope:local +mcardReplaceFileBlock = .text:0x8001B5DC; // type:function size:0x400 scope:local +mcardSaveChecksumFileHeader = .text:0x8001B9DC; // type:function size:0x35C scope:local +mcardCalculateChecksumFileBlock2 = .text:0x8001BD38; // type:function size:0x168 scope:local +mcardCalculateChecksumFileBlock1 = .text:0x8001BEA0; // type:function size:0x168 scope:local +mcardCalculateChecksum = .text:0x8001C008; // type:function size:0x60 scope:local +mcardGCErrorHandler = .text:0x8001C068; // type:function size:0x194 scope:local codeEvent = .text:0x8001C1FC; // type:function size:0x54 soundEvent = .text:0x8001C250; // type:function size:0x1F0 soundPlayBeep = .text:0x8001C440; // type:function size:0x7C @@ -1638,11 +1638,11 @@ __stdio_atexit = .text:0x800CD910; // type:function size:0x4 scope:global sprintf = .text:0x800CD914; // type:function size:0xD4 vsprintf = .text:0x800CD9E8; // type:function size:0x78 vprintf = .text:0x800CDA60; // type:function size:0x7C scope:global -__StringWrite = .text:0x800CDADC; // type:function size:0x6C -__FileWrite = .text:0x800CDB48; // type:function size:0x58 scope:global +__StringWrite = .text:0x800CDADC; // type:function size:0x6C scope:local +__FileWrite = .text:0x800CDB48; // type:function size:0x58 scope:local __pformatter = .text:0x800CDBA0; // type:function size:0x630 scope:local float2str = .text:0x800CE1D0; // type:function size:0x638 scope:local -round_decimal = .text:0x800CE808; // type:function size:0x134 +round_decimal = .text:0x800CE808; // type:function size:0x134 scope:local longlong2str = .text:0x800CE93C; // type:function size:0x2E0 scope:local long2str = .text:0x800CEC1C; // type:function size:0x224 scope:local parse_format = .text:0x800CEE40; // type:function size:0x4D8 scope:local @@ -1727,8 +1727,8 @@ lbl_800D1EB0 = .rodata:0x800D1EB0; // type:object size:0x14 data:4byte lbl_800D1EC4 = .rodata:0x800D1EC4; // type:object size:0x14 data:4byte lbl_800D1ED8 = .rodata:0x800D1ED8; // type:object size:0x18 data:4byte __constants = .rodata:0x800D1EF0; // type:object size:0x18 scope:local data:4byte -lbl_800D1F08 = .rodata:0x800D1F08; // type:object size:0x48 data:double -lbl_800D1F50 = .rodata:0x800D1F50; // type:object size:0x40 +bit_values = .rodata:0x800D1F08; // type:object size:0x48 data:double +digit_values = .rodata:0x800D1F50; // type:object size:0x40 __ctype_map = .rodata:0x800D1F90; // type:object size:0x100 __lower_map = .rodata:0x800D2090; // type:object size:0x100 __upper_map = .rodata:0x800D2190; // type:object size:0x100 @@ -1841,15 +1841,21 @@ VolumeTable = .data:0x800EB6A0; // type:object size:0x100 @248 = .data:0x800EB984; // type:object size:0x34 scope:local @268 = .data:0x800EB9B8; // type:object size:0x1C scope:local @42 = .data:0x800EB9D8; // type:object size:0x22 scope:local data:string -lbl_800EBA00 = .data:0x800EBA00; // type:object size:0x60 -jumptable_800EBA60 = .data:0x800EBA60; // type:object size:0x60 scope:local -jumptable_800EBAC0 = .data:0x800EBAC0; // type:object size:0x60 scope:local -jumptable_800EBB20 = .data:0x800EBB20; // type:object size:0xC8 scope:local -lbl_800EBBE8 = .data:0x800EBBE8; // type:object size:0x10 -lbl_800EBBF8 = .data:0x800EBBF8; // type:object size:0x24 -lbl_800EBC1C = .data:0x800EBC1C; // type:object size:0x3C -lbl_800EBC58 = .data:0x800EBC58; // type:object size:0x14 data:string -lbl_800EBC6C = .data:0x800EBC6C; // type:object size:0x14 data:string +@1658 = .data:0x800EBA00; // type:object size:0x1B scope:local +...data.0 = .data:0x800EBA00; // type:label scope:local +@1904 = .data:0x800EBA1C; // type:object size:0x35 scope:local data:string +@1905 = .data:0x800EBA54; // type:object size:0xB scope:local data:string +@2365 = .data:0x800EBA60; // type:object size:0x60 scope:local +@2380 = .data:0x800EBAC0; // type:object size:0x60 scope:local +@2561 = .data:0x800EBB20; // type:object size:0xC8 scope:local +@2611 = .data:0x800EBBE8; // type:object size:0xF scope:local data:string +@2743 = .data:0x800EBBF8; // type:object size:0x12 scope:local data:string +@2832 = .data:0x800EBC0C; // type:object size:0xE scope:local data:string +@3043 = .data:0x800EBC1C; // type:object size:0x12 scope:local data:string +@3159 = .data:0x800EBC30; // type:object size:0x14 scope:local data:string +@3160 = .data:0x800EBC44; // type:object size:0x14 scope:local data:string +@3181 = .data:0x800EBC58; // type:object size:0x14 scope:local data:string +@3243 = .data:0x800EBC6C; // type:object size:0x14 scope:local data:string gClassCode = .data:0x800EBC80; // type:object size:0x10 gClassSound = .data:0x800EBC90; // type:object size:0x10 @314 = .data:0x800EBCA0; // type:object size:0x3E scope:local data:string @@ -2376,11 +2382,11 @@ lbl_800F4E38 = .data:0x800F4E38; // type:object size:0x40 data:4byte gDBCommTable = .data:0x800F4E78; // type:object size:0x1C scope:global data:4byte __files = .data:0x800F4E98; // type:object size:0xD8 scope:global ...data.0 = .data:0x800F4E98; // type:label scope:local -@1009 = .data:0x800F4F70; // type:object size:0x84 scope:local -jumptable_800F4FF4 = .data:0x800F4FF4; // type:object size:0x84 scope:local -jumptable_800F5078 = .data:0x800F5078; // type:object size:0xD0 scope:local -jumptable_800F5148 = .data:0x800F5148; // type:object size:0x44 scope:local -jumptable_800F5190 = .data:0x800F5190; // type:object size:0x44 scope:local +@896 = .data:0x800F4F70; // type:object size:0x84 scope:local +@953 = .data:0x800F4FF4; // type:object size:0x84 scope:local +@1073 = .data:0x800F5078; // type:object size:0xD0 scope:local +@1072 = .data:0x800F5148; // type:object size:0x44 scope:local +@179 = .data:0x800F5190; // type:object size:0x44 scope:local __float_nan = .data:0x800F51D8; // type:object size:0x4 data:float __float_huge = .data:0x800F51DC; // type:object size:0x4 data:float __four_over_pi_m1 = .data:0x800F51E0; // type:object size:0x10 data:float @@ -2428,10 +2434,11 @@ FreeTextureSetQueue = .bss:0x800FEC68; // type:object size:0x20 scope:local DecodedTextureSetQueue = .bss:0x800FEC88; // type:object size:0x20 scope:local FreeTextureSetMessage = .bss:0x800FECA8; // type:object size:0xC scope:local DecodedTextureSetMessage = .bss:0x800FECB4; // type:object size:0xC scope:local -gMCardCardWorkArea = .bss:0x800FECC0; // type:object size:0xA000 +gMCardCardWorkArea = .bss:0x800FECC0; // type:object size:0xA000 scope:local +...bss.0 = .bss:0x800FECC0; // type:label scope:local gDate = .bss:0x80108CC0; // type:object size:0x28 bNoWriteInCurrentFrame = .bss:0x80108CE8; // type:object size:0x28 -mCard = .bss:0x80108D10; // type:object size:0x7B8 +mCard = .bss:0x80108D10; // type:object size:0x7B4 gVolumeCurve = .bss:0x801094E0; // type:object size:0x404 data:4byte lbl_80109900 = .bss:0x80109900; // type:object size:0x20 align:32 data:4byte lbl_80109920 = .bss:0x80109920; // type:object size:0x276A0 @@ -2571,7 +2578,7 @@ gResetBeginFlag = .sdata:0x8018B038; // type:object size:0x4 data:4byte @768 = .sdata:0x8018B03C; // type:object size:0x8 scope:local data:string @769 = .sdata:0x8018B044; // type:object size:0x7 scope:local data:string @75 = .sdata:0x8018B050; // type:object size:0x4 scope:local data:string -lbl_8018B058 = .sdata:0x8018B058; // type:object size:0x4 data:4byte +toggle$779 = .sdata:0x8018B058; // type:object size:0x4 scope:local data:4byte @33 = .sdata:0x8018B060; // type:object size:0x5 scope:local data:string @52 = .sdata:0x8018B068; // type:object size:0x6 scope:local align:8 data:string sCapture$198 = .sdata:0x8018B070; // type:object size:0x4 scope:local align:8 data:4byte @@ -2871,8 +2878,8 @@ next = .sdata:0x8018B7D8; // type:object size:0x4 scope:local data:4byte __CARDVendorID = .sdata:0x8018B7E0; // type:object size:0x2 data:2byte __THPVersion = .sdata:0x8018B7E8; // type:object size:0x4 data:4byte @wstringBase0 = .sdata:0x8018B7F0; // type:object size:0x2 scope:local -lbl_8018B7F8 = .sdata:0x8018B7F8; // type:object size:0x4 data:4byte -lbl_8018B7FC = .sdata:0x8018B7FC; // type:object size:0x4 data:4byte +K1 = .sdata:0x8018B7F8; // type:object size:0x4 data:4byte +K2 = .sdata:0x8018B7FC; // type:object size:0x4 data:4byte SendCount = .sdata:0x8018B800; // type:object size:0x1 data:byte gnCountArgument = .sbss:0x8018B820; // type:object size:0x4 scope:local data:4byte gaszArgument = .sbss:0x8018B824; // type:object size:0x4 scope:local data:4byte @@ -2921,13 +2928,13 @@ gbReset_thpread = .sbss:0x8018B8DC; // type:object size:0x4 scope:global data:4b gnTickReset_thpread = .sbss:0x8018B8E0; // type:object size:0x4 scope:global data:4byte VideoDecodeThreadCreated = .sbss:0x8018B8E8; // type:object size:0x4 scope:local data:4byte First = .sbss:0x8018B8EC; // type:object size:0x4 scope:local data:4byte -lbl_8018B8F0 = .sbss:0x8018B8F0; // type:object size:0x4 data:4byte -lbl_8018B8F4 = .sbss:0x8018B8F4; // type:object size:0x4 data:4byte -lbl_8018B8F8 = .sbss:0x8018B8F8; // type:object size:0x4 data:4byte -lbl_8018B8FC = .sbss:0x8018B8FC; // type:object size:0x4 data:4byte -lbl_8018B900 = .sbss:0x8018B900; // type:object size:0x4 data:4byte -lbl_8018B904 = .sbss:0x8018B904; // type:object size:0x4 data:4byte -lbl_8018B908 = .sbss:0x8018B908; // type:object size:0x4 data:4byte +currentIdx = .sbss:0x8018B8F0; // type:object size:0x4 data:4byte +yes$571 = .sbss:0x8018B8F4; // type:object size:0x4 scope:local data:4byte +prevMenuEntry$572 = .sbss:0x8018B8F8; // type:object size:0x4 scope:local data:4byte +nextMenuEntry$573 = .sbss:0x8018B8FC; // type:object size:0x4 scope:local data:4byte +toggle2$780 = .sbss:0x8018B900; // type:object size:0x4 scope:local data:4byte +checkFailCount$1211 = .sbss:0x8018B904; // type:object size:0x4 scope:local data:4byte +bWrite2Card = .sbss:0x8018B908; // type:object size:0x4 data:4byte gpBufferFunction = .sbss:0x8018B910; // type:object size:0x4 scope:local data:4byte ganDataCode = .sbss:0x8018B914; // type:object size:0x4 scope:local data:4byte lbl_8018B918 = .sbss:0x8018B918; // type:object size:0x4 data:4byte @@ -3478,12 +3485,12 @@ __GXData = .sdata2:0x8018C340; // type:object size:0x4 scope:global data:4byte @666 = .sdata2:0x8018C45C; // type:object size:0x4 scope:local data:float @667 = .sdata2:0x8018C460; // type:object size:0x4 scope:local data:float @40 = .sdata2:0x8018C468; // type:object size:0x8 scope:local data:double -lbl_8018C470 = .sdata2:0x8018C470; // type:object size:0x8 data:double -lbl_8018C478 = .sdata2:0x8018C478; // type:object size:0x8 data:double -lbl_8018C480 = .sdata2:0x8018C480; // type:object size:0x8 data:double -lbl_8018C488 = .sdata2:0x8018C488; // type:object size:0x8 data:double -lbl_8018C490 = .sdata2:0x8018C490; // type:object size:0x8 data:double -lbl_8018C498 = .sdata2:0x8018C498; // type:object size:0x8 data:double +@145 = .sdata2:0x8018C470; // type:object size:0x8 scope:local data:double +@146 = .sdata2:0x8018C478; // type:object size:0x8 scope:local data:double +@147 = .sdata2:0x8018C480; // type:object size:0x8 scope:local data:double +@148 = .sdata2:0x8018C488; // type:object size:0x8 scope:local data:double +@149 = .sdata2:0x8018C490; // type:object size:0x8 scope:local data:double +@806 = .sdata2:0x8018C498; // type:object size:0x8 scope:local data:double @302 = .sdata2:0x8018C4A0; // type:object size:0x8 scope:local data:double @303 = .sdata2:0x8018C4A8; // type:object size:0x8 scope:local data:double @304 = .sdata2:0x8018C4B0; // type:object size:0x8 scope:local data:double diff --git a/config/mq-u/symbols.txt b/config/mq-u/symbols.txt index 1621ccf3..d3213ce3 100644 --- a/config/mq-u/symbols.txt +++ b/config/mq-u/symbols.txt @@ -1639,11 +1639,11 @@ __stdio_atexit = .text:0x800CE198; // type:function size:0x4 scope:global sprintf = .text:0x800CE19C; // type:function size:0xD4 vsprintf = .text:0x800CE270; // type:function size:0x78 vprintf = .text:0x800CE2E8; // type:function size:0x7C scope:global -__StringWrite = .text:0x800CE364; // type:function size:0x6C -__FileWrite = .text:0x800CE3D0; // type:function size:0x58 scope:global +__StringWrite = .text:0x800CE364; // type:function size:0x6C scope:local +__FileWrite = .text:0x800CE3D0; // type:function size:0x58 scope:local __pformatter = .text:0x800CE428; // type:function size:0x630 scope:local float2str = .text:0x800CEA58; // type:function size:0x638 scope:local -round_decimal = .text:0x800CF090; // type:function size:0x134 +round_decimal = .text:0x800CF090; // type:function size:0x134 scope:local longlong2str = .text:0x800CF1C4; // type:function size:0x2E0 scope:local long2str = .text:0x800CF4A4; // type:function size:0x224 scope:local parse_format = .text:0x800CF6C8; // type:function size:0x4D8 scope:local @@ -1728,8 +1728,8 @@ lbl_800D2730 = .rodata:0x800D2730; // type:object size:0x14 scope:local data:4by lbl_800D2744 = .rodata:0x800D2744; // type:object size:0x14 scope:local data:4byte lbl_800D2758 = .rodata:0x800D2758; // type:object size:0x18 scope:local data:4byte __constants = .rodata:0x800D2770; // type:object size:0x18 scope:local data:double -bit_values = .rodata:0x800D2788; // type:object size:0x48 scope:local data:double -digit_values = .rodata:0x800D27D0; // type:object size:0x40 scope:local +bit_values = .rodata:0x800D2788; // type:object size:0x48 scope:global data:double +digit_values = .rodata:0x800D27D0; // type:object size:0x40 scope:global __ctype_map = .rodata:0x800D2810; // type:object size:0x100 __lower_map = .rodata:0x800D2910; // type:object size:0x100 __upper_map = .rodata:0x800D2A10; // type:object size:0x100 @@ -2485,11 +2485,11 @@ lbl_800F4378 = .data:0x800F4378; // type:object size:0x40 data:4byte gDBCommTable = .data:0x800F43B8; // type:object size:0x1C scope:global data:4byte __files = .data:0x800F43D8; // type:object size:0xD8 scope:global ...data.0 = .data:0x800F43D8; // type:label scope:local -@1009 = .data:0x800F44B0; // type:object size:0x84 scope:local -jumptable_800F4534 = .data:0x800F4534; // type:object size:0x84 scope:local -jumptable_800F45B8 = .data:0x800F45B8; // type:object size:0xD0 scope:local -jumptable_800F4688 = .data:0x800F4688; // type:object size:0x44 scope:local -jumptable_800F46D0 = .data:0x800F46D0; // type:object size:0x44 scope:local +@896 = .data:0x800F44B0; // type:object size:0x84 scope:local +@953 = .data:0x800F4534; // type:object size:0x84 scope:local +@1073 = .data:0x800F45B8; // type:object size:0xD0 scope:local +@1072 = .data:0x800F4688; // type:object size:0x44 scope:local +@179 = .data:0x800F46D0; // type:object size:0x44 scope:local __float_nan = .data:0x800F4718; // type:object size:0x4 data:float __float_huge = .data:0x800F471C; // type:object size:0x4 data:float __four_over_pi_m1 = .data:0x800F4720; // type:object size:0x10 data:float @@ -2692,7 +2692,7 @@ gResetBeginFlag = .sdata:0x80135578; // type:object size:0x4 data:4byte @780 = .sdata:0x8013557C; // type:object size:0x8 scope:local data:string @781 = .sdata:0x80135584; // type:object size:0x7 scope:local data:string @75 = .sdata:0x80135590; // type:object size:0x4 scope:local data:string -toggle$1034 = .sdata:0x80135598; // type:object size:0x8 data:4byte +toggle$804 = .sdata:0x80135598; // type:object size:0x4 data:4byte @33 = .sdata:0x801355A0; // type:object size:0x5 scope:local data:string @52 = .sdata:0x801355A8; // type:object size:0x6 scope:local data:string sCapture$198 = .sdata:0x801355B0; // type:object size:0x4 scope:local data:4byte @@ -3054,12 +3054,12 @@ gnTickReset_thpread = .sbss:0x80135E30; // type:object size:0x4 scope:global dat VideoDecodeThreadCreated = .sbss:0x80135E38; // type:object size:0x4 scope:local data:4byte First = .sbss:0x80135E3C; // type:object size:0x4 scope:local data:4byte currentIdx = .sbss:0x80135E40; // type:object size:0x4 data:4byte -lbl_80135E44 = .sbss:0x80135E44; // type:object size:0x4 data:4byte -yes$771 = .sbss:0x80135E48; // type:object size:0x4 data:4byte -prevMenuEntry$772 = .sbss:0x80135E4C; // type:object size:0x4 data:4byte -nextMenuEntry$773 = .sbss:0x80135E50; // type:object size:0x4 data:4byte -toggle2$1029 = .sbss:0x80135E54; // type:object size:0x4 data:4byte -checkFailCount$1490 = .sbss:0x80135E58; // type:object size:0x4 data:4byte +sPrevMemCardError = .sbss:0x80135E44; // type:object size:0x4 data:4byte +yes$596 = .sbss:0x80135E48; // type:object size:0x4 data:4byte +prevMenuEntry$597 = .sbss:0x80135E4C; // type:object size:0x4 data:4byte +nextMenuEntry$598 = .sbss:0x80135E50; // type:object size:0x4 data:4byte +toggle2$805 = .sbss:0x80135E54; // type:object size:0x4 data:4byte +checkFailCount$1256 = .sbss:0x80135E58; // type:object size:0x4 data:4byte bWrite2Card = .sbss:0x80135E5C; // type:object size:0x4 data:4byte gpBufferFunction = .sbss:0x80135E60; // type:object size:0x4 scope:local data:4byte ganDataCode = .sbss:0x80135E64; // type:object size:0x4 scope:local data:4byte @@ -3615,12 +3615,12 @@ __GXData = .sdata2:0x801368A0; // type:object size:0x4 scope:global data:4byte @666 = .sdata2:0x801369BC; // type:object size:0x4 scope:local data:float @667 = .sdata2:0x801369C0; // type:object size:0x4 scope:local data:float @40 = .sdata2:0x801369C8; // type:object size:0x8 scope:local data:double -lbl_801369D0 = .sdata2:0x801369D0; // type:object size:0x8 data:double -lbl_801369D8 = .sdata2:0x801369D8; // type:object size:0x8 data:double -lbl_801369E0 = .sdata2:0x801369E0; // type:object size:0x8 data:double -lbl_801369E8 = .sdata2:0x801369E8; // type:object size:0x8 data:double -lbl_801369F0 = .sdata2:0x801369F0; // type:object size:0x8 data:double -lbl_801369F8 = .sdata2:0x801369F8; // type:object size:0x8 data:double +@145 = .sdata2:0x801369D0; // type:object size:0x8 scope:local data:double +@146 = .sdata2:0x801369D8; // type:object size:0x8 scope:local data:double +@147 = .sdata2:0x801369E0; // type:object size:0x8 scope:local data:double +@148 = .sdata2:0x801369E8; // type:object size:0x8 scope:local data:double +@149 = .sdata2:0x801369F0; // type:object size:0x8 scope:local data:double +@806 = .sdata2:0x801369F8; // type:object size:0x8 scope:local data:double @302 = .sdata2:0x80136A00; // type:object size:0x8 scope:local data:double @303 = .sdata2:0x80136A08; // type:object size:0x8 scope:local data:double @304 = .sdata2:0x80136A10; // type:object size:0x8 scope:local data:double diff --git a/configure.py b/configure.py index 27e9cc9c..e0f7ec38 100755 --- a/configure.py +++ b/configure.py @@ -264,7 +264,7 @@ def LinkedFor(*versions): Object(Linked, "emulator/THPDraw.c", cflags=cflags_base), Object(Linked, "emulator/THPRead.c"), Object(Linked, "emulator/THPVideoDecode.c", cflags=cflags_base), - Object(LinkedFor("ce-j"), "emulator/mcardGCN.c"), + Object(LinkedFor("mq-j", "mq-u", "ce-j", "ce-u", "ce-e"), "emulator/mcardGCN.c"), Object(Linked, "emulator/codeGCN.c"), Object(Linked, "emulator/soundGCN.c"), Object(LinkedFor("ce-j"), "emulator/frame.c", asm_processor=True), diff --git a/include/emulator/mcardGCN.h b/include/emulator/mcardGCN.h index cb8f3734..a10015a7 100644 --- a/include/emulator/mcardGCN.h +++ b/include/emulator/mcardGCN.h @@ -148,7 +148,9 @@ typedef struct _MCARD { /* 0x7A4 */ bool bufferCreated; /* 0x7A8 */ s32 cardSize; /* 0x7AC */ bool wait; +#if VERSION != MQ_J /* 0x7B0 */ bool isBroken; +#endif /* 0x7B4 */ s32 saveConfiguration; } MemCard; // size = 0x7B8 diff --git a/include/emulator/mcardGCN_jumptables.h b/include/emulator/mcardGCN_jumptables.h deleted file mode 100644 index d346102c..00000000 --- a/include/emulator/mcardGCN_jumptables.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef _MCARDGCN_JUMPTABLES_H -#define _MCARDGCN_JUMPTABLES_H - -extern void* lbl_80016D74; -extern void* lbl_80016D74; -extern void* lbl_80016D08; -extern void* lbl_80016CE8; -extern void* lbl_80016D48; -extern void* lbl_80016CF8; -extern void* lbl_80016D28; -extern void* lbl_80016D74; -extern void* lbl_80016D74; -extern void* lbl_80016D74; -extern void* lbl_80016D74; -extern void* lbl_80016D74; -extern void* lbl_80016D74; -extern void* lbl_80016D28; -extern void* lbl_80016D74; -extern void* lbl_80016D74; -extern void* lbl_80016D18; -extern void* lbl_80016D74; -extern void* lbl_80016D54; -extern void* lbl_80016D38; -extern void* lbl_80016D38; -extern void* lbl_80016D74; -extern void* lbl_80016D74; -extern void* lbl_80016D64; - -extern void* lbl_80016E54; -extern void* lbl_80016E54; -extern void* lbl_80016DE8; -extern void* lbl_80016DC8; -extern void* lbl_80016E28; -extern void* lbl_80016DD8; -extern void* lbl_80016E08; -extern void* lbl_80016E54; -extern void* lbl_80016E54; -extern void* lbl_80016E54; -extern void* lbl_80016E54; -extern void* lbl_80016E54; -extern void* lbl_80016E54; -extern void* lbl_80016E08; -extern void* lbl_80016E54; -extern void* lbl_80016E54; -extern void* lbl_80016DF8; -extern void* lbl_80016E54; -extern void* lbl_80016E44; -extern void* lbl_80016E18; -extern void* lbl_80016E18; -extern void* lbl_80016E54; -extern void* lbl_80016E54; -extern void* lbl_80016E34; - -extern void* lbl_800177EC; -extern void* lbl_80016EF8; -extern void* lbl_80016F24; -extern void* lbl_80016F54; -extern void* lbl_80016F80; -extern void* lbl_80016FAC; -extern void* lbl_80016FD8; -extern void* lbl_80017020; -extern void* lbl_80017054; -extern void* lbl_80017074; -extern void* lbl_8001709C; -extern void* lbl_800170E8; -extern void* lbl_80017134; -extern void* lbl_80017158; -extern void* lbl_80017180; -extern void* lbl_800171A8; -extern void* lbl_800171CC; -extern void* lbl_800171F0; -extern void* lbl_8001721C; -extern void* lbl_80017264; -extern void* lbl_80017288; -extern void* lbl_800172A8; -extern void* lbl_800172D0; -extern void* lbl_80017320; -extern void* lbl_8001736C; -extern void* lbl_80017398; -extern void* lbl_800173B0; -extern void* lbl_800173F4; -extern void* lbl_8001740C; -extern void* lbl_80017458; -extern void* lbl_8001748C; -extern void* lbl_800174AC; -extern void* lbl_800174DC; -extern void* lbl_80017504; -extern void* lbl_80017548; -extern void* lbl_800177EC; -extern void* lbl_80017590; -extern void* lbl_800175BC; -extern void* lbl_800175E8; -extern void* lbl_80017614; -extern void* lbl_8001763C; -extern void* lbl_80017654; -extern void* lbl_8001769C; -extern void* lbl_800176B4; -extern void* lbl_800177EC; -extern void* lbl_800176FC; -extern void* lbl_80017734; -extern void* lbl_80017768; -extern void* lbl_8001779C; -extern void* lbl_800177C4; - -#endif diff --git a/src/emulator/mcardGCN.c b/src/emulator/mcardGCN.c index f99ecd38..e9eb1187 100644 --- a/src/emulator/mcardGCN.c +++ b/src/emulator/mcardGCN.c @@ -29,13 +29,29 @@ */ #include "emulator/mcardGCN.h" #include "dolphin/card.h" -#include "emulator/mcardGCN_jumptables.h" #include "emulator/simGCN.h" #include "emulator/xlHeap.h" #include "emulator/xlPostGCN.h" +#include "emulator/rsp.h" #include "stdio.h" #include "string.h" +#if VERSION == MQ_J +#define LINE_OFFSET -14 +#elif VERSION == MQ_U +#define LINE_OFFSET -7 +#elif VERSION == CE_E +#define LINE_OFFSET 22 +#else +#define LINE_OFFSET 0 +#endif + +#if VERSION == MQ_J || VERSION == MQ_U +#define ICON_SPEED 2 +#else +#define ICON_SPEED 3 +#endif + // Same as CARD_SYSTEM_BLOCK_SIZE (but signed instead of unsigned) #define BLOCK_SIZE 0x2000 #define HEADER_SIZE (3 * BLOCK_SIZE) @@ -50,6 +66,18 @@ #define COMMENT_OFFSET 0x2C #define COMMENT_SIZE 0x20 +#if VERSION == MQ_J +#define DATE_STRING "%d月%d日のセーブデータです" // "This is the save data from MM/DD" +#elif VERSION == MQ_U +//! TODO: fix the alignment issue +#define DATE_STRING "%d/%d Save Data\0" +#elif VERSION == CE_J +#define DATE_STRING "ゼルダの伝説:時のオカリナ" // "The Legend of Zelda: Ocarina of Time" +#elif VERSION == CE_U || VERSION == CE_E +//! TODO: fix the alignment issue +#define DATE_STRING "OCARINA OF TIME\0" +#endif + #define DATE_STRING_OFFSET 0x4C #define DATE_STRING_SIZE 0x20 @@ -87,6 +115,10 @@ OSCalendarTime gDate; s32 currentIdx = 0; bool bWrite2Card; +#if VERSION == MQ_U +static MemCardError sPrevMemCardError = MC_E_NONE; +#endif + static inline bool mcardReadyFile(MemCard* pMCard); static inline bool mcardFinishCard(MemCard* pMCard); static inline bool mcardReadAnywhereNoTime(MemCard* pMCard, s32 offset, s32 size, char* buffer); @@ -106,14 +138,18 @@ static bool mcardGCErrorHandler(MemCard* pMCard, s32 gcError) { return false; case CARD_RESULT_NOCARD: pMCard->error = MC_E_NOCARD; +#if VERSION != MQ_J pMCard->isBroken = false; +#endif return false; case CARD_RESULT_NOFILE: pMCard->error = MC_E_NOFILE; return false; case CARD_RESULT_IOERROR: pMCard->error = MC_E_IOERROR; +#if VERSION != MQ_J pMCard->isBroken = true; +#endif return false; case CARD_RESULT_BROKEN: pMCard->error = MC_E_BROKEN; @@ -268,16 +304,20 @@ static bool mcardReplaceFileBlock(MemCard* pMCard, s32 index) { return false; } +#if VERSION != MQ_J simulatorPrepareMessage(S_M_CARD_SV09); +#endif if (!mcardWriteAnywhereNoTime(pMCard, index * BLOCK_SIZE, BLOCK_SIZE, pMCard->writeBuffer)) { memcpy(pMCard->writeBuffer, buffer, BLOCK_SIZE); return false; } +#if VERSION != MQ_J if (index == 0) { mcardGetFileTime(pMCard, &pMCard->file.time); } +#endif return true; } @@ -381,11 +421,12 @@ static bool mcardPoll(MemCard* pMCard) { } if (pMCard->pPollFunction != NULL) { +#if VERSION != MQ_J if (!SIMULATOR_TEST_RESET(false, false, false, false)) { return false; - } else { - pMCard->pPollFunction(); } +#endif + pMCard->pPollFunction(); } } } @@ -399,10 +440,13 @@ static bool mcardReadyCard(MemCard* pMCard) { if (mCard.saveToggle == true) { mcardGCErrorHandler(pMCard, CARDProbeEx(pMCard->slot, &pMCard->cardSize, §orSize)); + +#if VERSION != MQ_J if (pMCard->isBroken == true && pMCard->error != MC_E_NOCARD) { pMCard->error = MC_E_IOERROR; return false; } +#endif while (pMCard->error == MC_E_BUSY) { mcardGCErrorHandler(pMCard, CARDProbeEx(pMCard->slot, &pMCard->cardSize, §orSize)); @@ -693,9 +737,13 @@ static bool mcardWriteBufferAsynch(MemCard* pMCard, s32 offset) { if (mCard.saveToggle == true) { if (mCard.writeToggle == true) { OSTicksToCalendarTime(OSGetTime(), &date); +#if VERSION == CE_E + pMCard->file.changedDate = true; +#else if (date.mon != pMCard->file.time.mon || date.mday != pMCard->file.time.mday) { pMCard->file.changedDate = true; } +#endif mCard.writeToggle = false; if (!mcardTimeCheck(pMCard)) { mCard.writeToggle = true; @@ -814,8 +862,12 @@ static inline bool mcardWriteTimePrepareWriteBuffer(MemCard* pMCard) { DCInvalidateRange(pMCard->writeBuffer, BLOCK_SIZE); OSTicksToCalendarTime(OSGetTime(), &gDate); - // "The Legend of Zelda: Ocarina of Time" - sprintf(dateString, "ゼルダの伝説:時のオカリナ"); + +#if VERSION == MQ_J || VERSION == MQ_U + sprintf(dateString, DATE_STRING, gDate.mon + 1, gDate.mday); +#elif VERSION != MQ_E + sprintf(dateString, DATE_STRING); +#endif memcpy(pMCard->writeBuffer + TIMESTAMP_OFFSET, (void*)&gDate, TIMESTAMP_SIZE); memcpy(pMCard->writeBuffer + DATE_STRING_OFFSET, dateString, DATE_STRING_SIZE); @@ -1040,12 +1092,24 @@ bool mcardFileSet(MemCard* pMCard, char* name) { if (!pMCard->gameIsLoaded) { if (!mcardReadFileHeaderInitial(pMCard)) { mcardFinishCard(pMCard); + +#if VERSION == MQ_U + if (pMCard->error == MC_E_NOCARD || sPrevMemCardError != pMCard->error) { + sPrevMemCardError = pMCard->error; + mCard.isBroken = false; + } else if (pMCard->isBroken == true) { + sPrevMemCardError = pMCard->error; + pMCard->error = MC_E_IOERROR; + return false; + } +#elif VERSION > MQ_U if (pMCard->error == MC_E_NOCARD) { mCard.isBroken = false; } else if (pMCard->isBroken == true) { pMCard->error = MC_E_IOERROR; return false; } +#endif return false; } } else if (!mcardReadFileHeader(pMCard)) { @@ -1056,12 +1120,24 @@ bool mcardFileSet(MemCard* pMCard, char* name) { pMCard->error = MC_E_TIME_WRONG; } } + +#if VERSION == MQ_U + if (pMCard->error == MC_E_NOCARD || sPrevMemCardError != pMCard->error) { + sPrevMemCardError = pMCard->error; + mCard.isBroken = false; + } else if (pMCard->isBroken == true) { + sPrevMemCardError = pMCard->error; + pMCard->error = MC_E_IOERROR; + return false; + } +#elif VERSION > MQ_U if (pMCard->error == MC_E_NOCARD) { mCard.isBroken = false; } else if (pMCard->isBroken == true) { pMCard->error = MC_E_IOERROR; return false; } +#endif return false; } @@ -1082,21 +1158,40 @@ bool mcardFileSet(MemCard* pMCard, char* name) { pMCard->file.currentGame = 16; mcardFinishCard(pMCard); + +#if VERSION != MQ_J if (pMCard->isBroken == true) { + +#if VERSION == MQ_U + sPrevMemCardError = pMCard->error; +#endif + pMCard->error = MC_E_IOERROR; return false; } +#endif return true; } } +#if VERSION == MQ_U + if (pMCard->error == MC_E_NOCARD || sPrevMemCardError != pMCard->error) { + sPrevMemCardError = pMCard->error; + mCard.isBroken = false; + } else if (pMCard->isBroken == true) { + sPrevMemCardError = pMCard->error; + pMCard->error = MC_E_IOERROR; + return false; + } +#elif VERSION > MQ_U if (pMCard->error == MC_E_NOCARD) { mCard.isBroken = false; } else if (pMCard->isBroken == true) { pMCard->error = MC_E_IOERROR; return false; } +#endif return false; } @@ -1123,6 +1218,12 @@ static inline bool mcardGameSetNoSave(MemCard* pMCard, s32 size) { return true; } +#if VERSION == MQ_J +#define IS_OOT true +#else +#define IS_OOT gpSystem->eTypeROM == SRT_ZELDA1 +#endif + bool mcardGameSet(MemCard* pMCard, char* name) { s32 i; @@ -1206,7 +1307,7 @@ bool mcardGameSet(MemCard* pMCard, char* name) { pMCard->file.game.writtenBlocks[0] = true; } } else { - if (gpSystem->eTypeROM == SRT_ZELDA1) { + if (IS_OOT) { if (OSGetSoundMode() == OS_SOUND_MODE_MONO) { pMCard->file.game.buffer[0] &= 0xFC; pMCard->file.game.buffer[0] |= 1; @@ -1301,8 +1402,13 @@ bool mcardFileCreate(MemCard* pMCard, char* name, char* comment, char* icon, cha memcpy(buffer + COMMENT_OFFSET, comment, strlen(comment)); OSTicksToCalendarTime(OSGetTime(), &date); - // "The Legend of Zelda: Ocarina of Time" - sprintf(dateString, "ゼルダの伝説:時のオカリナ"); + +#if VERSION == MQ_J || VERSION == MQ_U + sprintf(dateString, DATE_STRING, date.mon + 1, date.mday); +#elif VERSION != MQ_E + sprintf(dateString, DATE_STRING); +#endif + memcpy(buffer + DATE_STRING_OFFSET, dateString, strlen(dateString)); TEXGetGXTexObjFromPalette((TEXPalette*)banner, &texObj, 0); @@ -1323,11 +1429,11 @@ bool mcardFileCreate(MemCard* pMCard, char* name, char* comment, char* icon, cha CARDSetIconAddress(&cardStatus, BANNER_TPL_OFFSET); CARDSetBannerFormat(&cardStatus, 2); CARDSetIconFormat(&cardStatus, 0, 2); - CARDSetIconSpeed(&cardStatus, 0, 3); + CARDSetIconSpeed(&cardStatus, 0, ICON_SPEED); CARDSetIconFormat(&cardStatus, 1, 2); - CARDSetIconSpeed(&cardStatus, 1, 3); + CARDSetIconSpeed(&cardStatus, 1, ICON_SPEED); CARDSetIconFormat(&cardStatus, 2, 2); - CARDSetIconSpeed(&cardStatus, 2, 3); + CARDSetIconSpeed(&cardStatus, 2, ICON_SPEED); CARDSetIconAnim(&cardStatus, CARD_STAT_ANIM_BOUNCE); if (!mcardGCErrorHandler(pMCard, CARDSetStatusAsync(pMCard->slot, fileNo, &cardStatus, NULL))) { @@ -1633,7 +1739,9 @@ bool mcardMenu(MemCard* pMCard, MemCardMessage menuEntry, MemCardCommand* pComma if (simulatorDrawErrorMessageWait(S_M_CARD_LD02) == true) { yes = false; nextMenuEntry = MC_M_LD07; +#if VERSION != MQ_J pMCard->isBroken = true; +#endif *pCommand = MC_C_CONTINUE; } break; @@ -1710,11 +1818,15 @@ bool mcardMenu(MemCard* pMCard, MemCardMessage menuEntry, MemCardCommand* pComma break; case MC_M_LD07: if (simulatorDrawYesNoMessage(S_M_CARD_LD07, &yes) == true) { +#if VERSION != MQ_J pMCard->wait = false; +#endif nextMenuEntry = MC_M_LD07; prevMenuEntry = MC_M_NONE; if ((s32)yes == true) { +#if VERSION != MQ_J pMCard->isBroken = false; +#endif *pCommand = MC_C_GO_TO_GAME; } else { *pCommand = MC_C_CONTINUE; @@ -1739,7 +1851,9 @@ bool mcardMenu(MemCard* pMCard, MemCardMessage menuEntry, MemCardCommand* pComma prevMenuEntry = menuEntry; if (simulatorDrawErrorMessageWait(S_M_CARD_SV02) == true) { nextMenuEntry = MC_M_SV_SHARE; +#if VERSION != MQ_J pMCard->isBroken = true; +#endif *pCommand = MC_C_CONTINUE; } break; @@ -1934,7 +2048,12 @@ bool mcardMenu(MemCard* pMCard, MemCardMessage menuEntry, MemCardCommand* pComma prevMenuEntry = menuEntry; nextMenuEntry = menuEntry; if (simulatorDrawErrorMessageWait(S_M_CARD_IN04) == true) { +#if VERSION == MQ_J + pMCard->wait = false; + nextMenuEntry = prevMenuEntry = MC_M_NONE; +#else nextMenuEntry = MC_M_LD02; +#endif *pCommand = MC_C_CONTINUE; } break; @@ -1943,7 +2062,12 @@ bool mcardMenu(MemCard* pMCard, MemCardMessage menuEntry, MemCardCommand* pComma prevMenuEntry = menuEntry; nextMenuEntry = menuEntry; if (simulatorDrawErrorMessageWait(S_M_CARD_IN04) == true) { +#if VERSION == MQ_J + pMCard->wait = false; + nextMenuEntry = prevMenuEntry = MC_M_NONE; +#else nextMenuEntry = MC_M_SV02; +#endif *pCommand = MC_C_CONTINUE; } break; @@ -2121,6 +2245,12 @@ bool mcardOpenDuringGameError(MemCard* pMCard, MemCardCommand* pCommand) { return true; } +#if VERSION == MQ_J +#define MCARDWRITE_IS_OOT gpSystem->eTypeROM == SRT_ZELDA1 +#else +#define MCARDWRITE_IS_OOT true +#endif + bool mcardWrite(MemCard* pMCard, s32 address, s32 size, char* data) { static bool toggle = true; static bool toggle2; @@ -2154,6 +2284,9 @@ bool mcardWrite(MemCard* pMCard, s32 address, s32 size, char* data) { } } } +#if VERSION == MQ_J + } +#endif if (pMCard->saveToggle == true) { //! TODO: fake match for (i = (u64)((u32)address / BLOCK_DATA_SIZE); @@ -2161,16 +2294,16 @@ bool mcardWrite(MemCard* pMCard, s32 address, s32 size, char* data) { pMCard->file.game.writtenBlocks[i] = true; } - if (size == 0x1450 && toggle2 == true) { + if (size == 0x1450 && MCARDWRITE_IS_OOT && toggle2 == true) { toggle2 = 0; simulatorRumbleStop(0); if (!mcardUpdate()) { return false; } - } else if (size == 0x1450 && toggle2 == false) { + } else if (size == 0x1450 && MCARDWRITE_IS_OOT && toggle2 == false) { toggle2 = true; } - } else if (size == 0x1450 && toggle2 == true) { + } else if (size == 0x1450 && MCARDWRITE_IS_OOT && toggle2 == true) { toggle2 = false; pMCard->saveToggle = true; pMCard->wait = false; @@ -2180,9 +2313,10 @@ bool mcardWrite(MemCard* pMCard, s32 address, s32 size, char* data) { return false; } } - } else if (size == 0x1450 && toggle2 == false) { + } else if (size == 0x1450 && MCARDWRITE_IS_OOT && toggle2 == false) { toggle2 = true; } +#if VERSION != MQ_J } else { if (pMCard->saveToggle == true) { simulatorRumbleStop(0); @@ -2200,6 +2334,8 @@ bool mcardWrite(MemCard* pMCard, s32 address, s32 size, char* data) { } } } +#endif + return true; } @@ -2272,7 +2408,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3532, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3532 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2292,7 +2429,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3560, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3560 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2305,7 +2443,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3581, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3581 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2329,7 +2468,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3626, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3626 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2353,8 +2493,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3660, - command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3660 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2367,8 +2507,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3681, - command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3681 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2381,12 +2521,14 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* } else if (command == MC_C_CONTINUE) { continue; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3702, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3702 + LINE_OFFSET, + command); mcardGameSetNoSave(pMCard, gameSize); return true; } } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3710, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3710 + LINE_OFFSET, + command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2402,7 +2544,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3740, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3740 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2422,7 +2565,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3768, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3768 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2435,7 +2579,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3789, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3789 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2449,7 +2594,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* } else if (command == MC_C_CONTINUE) { continue; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3811, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3811 + LINE_OFFSET, + command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2471,7 +2617,9 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* pMCard->accessType = 2; simulatorPrepareMessage(S_M_CARD_SV09); if (!mcardGameCreate(pMCard, gameName, *defaultConfiguration, gameSize)) { +#if VERSION != MQ_J pMCard->isBroken = true; +#endif continue; } if (!mcardGameSet(pMCard, gameName)) { @@ -2482,7 +2630,8 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3858, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", VERSION == MQ_J ? 3843 : 3858 + LINE_OFFSET, + command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2498,11 +2647,13 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3887, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 3872 : 3887 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } } +#if VERSION != MQ_J pMCard->accessType = 2; simulatorPrepareMessage(S_M_CARD_SV09); if (!mcardGameCreate(pMCard, gameName, *defaultConfiguration, gameSize)) { @@ -2517,18 +2668,21 @@ bool mcardOpen(MemCard* pMCard, char* fileName, char* comment, char* icon, char* mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3920, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 3920 + LINE_OFFSET, command); mcardGameSetNoSave(pMCard, gameSize); return true; } } +#endif } else if (command == MC_C_CONTINUE) { continue; } else if (command == MC_C_GO_TO_GAME) { mcardGameSetNoSave(pMCard, gameSize); return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 3941, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", VERSION == MQ_J ? 3892 : 3941 + LINE_OFFSET, + command); mcardGameSetNoSave(pMCard, gameSize); return true; } @@ -2582,7 +2736,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4006, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 3957 : 4006 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2604,7 +2759,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4033, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 3984 : 4033 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2617,7 +2773,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4052, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 4003 : 4052 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2640,7 +2797,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4093, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 4044 : 4093 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2664,8 +2822,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4125, - command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 4076 : 4125 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2678,8 +2836,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4144, - command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 4095 : 4144 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2692,12 +2850,14 @@ bool mcardOpenDuringGame(MemCard* pMCard) { } else if (command == MC_C_CONTINUE) { continue; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4164, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", VERSION == MQ_J ? 4115 : 4164 + LINE_OFFSET, + command); pMCard->saveToggle = false; return true; } } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4171, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", VERSION == MQ_J ? 4122 : 4171 + LINE_OFFSET, + command); pMCard->saveToggle = false; return true; } @@ -2715,8 +2875,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4200, - command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 4151 : 4200 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2738,8 +2898,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4227, - command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 4178 : 4227 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2752,8 +2912,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4246, - command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + VERSION == MQ_J ? 4197 : 4246 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2766,7 +2926,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { } else if (command == MC_C_CONTINUE) { continue; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4265, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", VERSION == MQ_J ? 4216 : 4265 + LINE_OFFSET, + command); pMCard->saveToggle = false; return true; } @@ -2785,6 +2946,70 @@ bool mcardOpenDuringGame(MemCard* pMCard) { break; } } + +#if VERSION == MQ_J + if (i == 16) { + pMCard->accessType = 2; + simulatorPrepareMessage(S_M_CARD_SV09); + if (!mcardGameCreate(pMCard, pMCard->saveGameName, pMCard->saveConfiguration, pMCard->saveGameSize)) { + mcardOpenDuringGameError(pMCard, &command); + if (command == MC_C_CONTINUE) { + continue; + } else if (command == MC_C_GO_TO_GAME) { + pMCard->saveToggle = false; + return true; + } else { + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4255, + command); + pMCard->saveToggle = false; + return true; + } + } + if (!mcardGameSet(pMCard, pMCard->saveGameName)) { + mcardOpenDuringGameError(pMCard, &command); + if (command == MC_C_CONTINUE) { + continue; + } else if (command == MC_C_GO_TO_GAME) { + pMCard->saveToggle = false; + return true; + } else { + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 4275, command); + pMCard->saveToggle = false; + return true; + } + } + } else if (!mcardGameSet(pMCard, pMCard->saveGameName)) { + mcardOpenDuringGameError(pMCard, &command); + if (command == MC_C_DELETE_GAME) { + if (!mcardGameErase(pMCard, i)) { + mcardOpenDuringGameError(pMCard, &command); + if (command == MC_C_CONTINUE) { + continue; + } else if (command == MC_C_GO_TO_GAME) { + pMCard->saveToggle = false; + return true; + } else { + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 4302, command); + pMCard->saveToggle = false; + return true; + } + continue; + } + } else if (command == MC_C_CONTINUE) { + continue; + } else if (command == MC_C_GO_TO_GAME) { + pMCard->saveToggle = false; + return true; + } else { + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 4320, command); + pMCard->saveToggle = false; + return true; + } + } +#else if (i == 16) { pMCard->accessType = 2; simulatorPrepareMessage(S_M_CARD_SV09); @@ -2800,7 +3025,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4310, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4310 + LINE_OFFSET, + command); pMCard->saveToggle = false; return true; } @@ -2816,7 +3042,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4337, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 4337 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2836,7 +3063,8 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4368, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", + 4368 + LINE_OFFSET, command); pMCard->saveToggle = false; return true; } @@ -2847,11 +3075,13 @@ bool mcardOpenDuringGame(MemCard* pMCard) { pMCard->saveToggle = false; return true; } else { - xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4387, command); + xlPostText("Invalid Memory Card Command %d - Assuming Go To Game", "mcardGCN.c", 4387 + LINE_OFFSET, + command); pMCard->saveToggle = false; return true; } } +#endif pMCard->gameIsLoaded = true; pMCard->accessType = 0; @@ -3021,14 +3251,23 @@ bool mcardStore(MemCard* pMCard) { return true; } + bool mcardUpdate(void) { s32 j; s32 i; bool toggle; MemCardCommand command; +#if VERSION != MQ_J s32 prevIndex; s32 index; s32 counter; +#endif + +#if VERSION == MQ_J +#define CHECK_NUM_DATA_BLOCKS NUM_DATA_BLOCKS(mCard.file.game.size) +#else +#define CHECK_NUM_DATA_BLOCKS (u32)j +#endif command = MC_C_NONE; mCard.saveToggle = true; @@ -3039,13 +3278,17 @@ bool mcardUpdate(void) { mCard.file.game.writtenBlocks[i] = true; } +#if VERSION != MQ_J prevIndex = 100; counter = 0; +#endif + while (true) { if (!SIMULATOR_TEST_RESET(false, false, false, false)) { return false; } +#if VERSION != MQ_J mcardStore(&mCard); if (mCard.writeStatus != 0) { @@ -3053,17 +3296,35 @@ bool mcardUpdate(void) { simulatorPrepareMessage(S_M_CARD_SV09); simulatorDrawMCardText(); } +#endif toggle = false; j = NUM_DATA_BLOCKS(mCard.file.game.size); - for (i = 0; i < (u32)j; i++) { + for (i = 0; i < CHECK_NUM_DATA_BLOCKS; i++) { if (mCard.file.game.writtenBlocks[i] == true) { +#if VERSION != MQ_J index = i; +#endif toggle = true; break; } } +#if VERSION == MQ_J + if (mCard.file.game.writtenConfig == true) { + toggle = true; + } else if (mCard.file.changedDate == true) { + toggle = true; + } + + mcardStore(&mCard); + + if (mCard.writeStatus != 0) { + mCard.accessType = 2; + simulatorPrepareMessage(S_M_CARD_SV09); + simulatorDrawMCardText(); + } +#else if (toggle != true) { if (mCard.file.game.writtenConfig == true) { index = j; @@ -3088,6 +3349,7 @@ bool mcardUpdate(void) { counter = 0; mCard.saveToggle = false; } +#endif if (mCard.saveToggle == false) { mCard.saveToggle = true; @@ -3099,7 +3361,7 @@ bool mcardUpdate(void) { return false; } - if (gpSystem->eTypeROM == SRT_ZELDA1 && mCard.saveToggle == true) { + if (IS_OOT && mCard.saveToggle == true) { do { mcardMenu(&mCard, MC_M_SV12, &command); if (!SIMULATOR_TEST_RESET(false, false, true, false)) {