From 898ea733ac74a7e08692e1b627428d874be646b3 Mon Sep 17 00:00:00 2001 From: sup39 Date: Sun, 29 Jan 2023 04:39:18 +0900 Subject: [PATCH 1/4] Rewrote drawText and related codes - Reduced parameters to struct pointer + format string + varargs - Rewrote QFT, Pattern Selector, Customized Display with the new drawText function - Added PAL font (TODO: NTSC-U) - Merged P/A/S Display and Speed Display to Customized Display - Provided background options to Pattern Selector and Customized Display --- Codes.xml | 1189 +++++---------- Readme.md | 4 +- Removed-Codes.xml | 420 +++++ changelog.md | 9 + site/.vuepress/components/Generator.vue | 7 +- site/.vuepress/components/Preview.vue | 73 +- site/.vuepress/components/PreviewString.vue | 94 +- .../codes/CustomizedDisplay/codegen.js | 167 +- .../codes/CustomizedDisplay/config.vue | 46 +- .../codes/CustomizedDisplay/configDB.js | 58 + .../codes/CustomizedDisplay/labels.json | 18 +- .../codes/InstantRestart/config.vue | 8 +- .../codes/PatternSelector/code/GMSE01.js | 46 + .../codes/PatternSelector/code/GMSJ01.js | 57 +- .../codes/PatternSelector/code/GMSJ0A.js | 56 +- .../codes/PatternSelector/code/GMSP01.js | 46 + .../codes/PatternSelector/codegen.js | 150 +- .../codes/PatternSelector/config.vue | 13 +- .../.vuepress/components/codes/TextConfig.vue | 20 +- site/.vuepress/components/codes/addrs.js | 28 + site/.vuepress/components/codes/asm.js | 66 +- site/.vuepress/components/codes/labels.json | 26 +- .../.vuepress/components/codes/qft/codegen.js | 42 +- .../.vuepress/components/codes/qft/config.vue | 58 +- .../components/codes/qft/labels.json | 24 - site/.vuepress/components/codes/text.js | 57 + site/.vuepress/components/codes/utils.js | 54 +- site/.vuepress/data/charInfo-EU.json | 1346 +++++++++++++++++ .../data/{font-jp.json => charInfo-JP.json} | 814 +++++----- site/.vuepress/public/img/preview/font-EU.png | Bin 0 -> 31076 bytes site/.vuepress/public/img/preview/font-JP.png | Bin 0 -> 74465 bytes site/.vuepress/public/img/preview/font-jp.png | Bin 39075 -> 0 bytes 32 files changed, 3347 insertions(+), 1649 deletions(-) create mode 100644 site/.vuepress/components/codes/CustomizedDisplay/configDB.js create mode 100644 site/.vuepress/components/codes/PatternSelector/code/GMSE01.js create mode 100644 site/.vuepress/components/codes/PatternSelector/code/GMSP01.js create mode 100644 site/.vuepress/components/codes/addrs.js create mode 100644 site/.vuepress/components/codes/text.js create mode 100644 site/.vuepress/data/charInfo-EU.json rename site/.vuepress/data/{font-jp.json => charInfo-JP.json} (79%) create mode 100644 site/.vuepress/public/img/preview/font-EU.png create mode 100644 site/.vuepress/public/img/preview/font-JP.png delete mode 100644 site/.vuepress/public/img/preview/font-jp.png diff --git a/Codes.xml b/Codes.xml index 0a323a9..c1a6c8d 100644 --- a/Codes.xml +++ b/Codes.xml @@ -1237,12 +1237,9 @@ Quarterframe Timer QFタイマー Noki Doki, sup39(サポミク) - 1.4 - Dec 16, 2022 - drawText - drawText - drawText - drawText + 1.5 + Jan 28, 2023 + drawText Adds an in-game timer to every level, starting on the last black frame of the loading screen and ending as soon as the 'Shine Get' animation starts @@ -1260,8 +1257,8 @@ 41820010 B00700B2 3800FFFC 900700B4 60000000 00000000 - C2206738 0000001F - 3C60817F 6064011C + C22069E0 0000001B + 3C60817F 60640120 38630094 3D808020 398C1EA8 7D8803A6 4E800021 3C60817F @@ -1277,20 +1274,16 @@ 40A00010 7CE83B78 98E300B2 90E300B4 1D0803E9 38000078 - 7D080396 9421FFF0 - 380003E8 7CE80396 - 7C0701D6 7D004050 - 91010008 3800003C - 7D270396 7C0901D6 - 7D403850 80E30118 - 390300A4 80C30114 - 3D80817F 80A30110 - 618C0238 808300A0 - 7D8803A6 80630094 - 4E800021 38210010 - 38610E90 3D808003 - 398C5228 7D8803A6 - 4E800021 881F0046 + 7D080396 380003E8 + 7D280396 7C0901D6 + 7CE04050 3800003C + 7CA90396 7C0501D6 + 7CC04850 3D80817F + 618C0238 7D8803A6 + 388300A4 38630110 + 4E800021 38610E90 + 3D808003 398C5228 + 7D8803A6 4E800021 60000000 00000000 C20EFA30 00000005 3CA0817F A00500B2 @@ -1337,8 +1330,8 @@ 41820010 B00700B2 3800FFFC 900700B4 60000000 00000000 - C2143F18 0000001F - 3C60817F 6064011C + C21441C0 0000001B + 3C60817F 60640120 38630094 3D808014 398C0390 7D8803A6 4E800021 3C60817F @@ -1354,20 +1347,16 @@ 40A00010 7CE83B78 98E300B2 90E300B4 1D0803E9 38000078 - 7D080396 9421FFF0 - 380003E8 7CE80396 - 7C0701D6 7D004050 - 91010008 3800003C - 7D270396 7C0901D6 - 7D403850 80E30118 - 390300A4 80C30114 - 3D80817F 80A30110 - 618C0238 808300A0 - 7D8803A6 80630094 - 4E800021 38210010 - 38610BD0 3D80802F - 398CB6BC 7D8803A6 - 4E800021 881F0046 + 7D080396 380003E8 + 7D280396 7C0901D6 + 7CE04050 3800003C + 7CA90396 7C0501D6 + 7CC04850 3D80817F + 618C0238 7D8803A6 + 388300A4 38630110 + 4E800021 38610BD0 + 3D80802F 398CB6BC + 7D8803A6 4E800021 60000000 00000000 C229C520 00000005 3CA0817F A00500B2 @@ -1414,8 +1403,8 @@ 41820010 B00700B2 3800FFFC 900700B4 60000000 00000000 - C2138B54 0000001F - 3C60817F 6064011C + C2138DFC 0000001B + 3C60817F 60640120 38630094 3D808013 398C4F0C 7D8803A6 4E800021 3C60817F @@ -1431,20 +1420,16 @@ 40A00010 7CE83B78 98E300B2 90E300B4 1D0803E9 38000078 - 7D080396 9421FFF0 - 380003E8 7CE80396 - 7C0701D6 7D004050 - 91010008 3800003C - 7D270396 7C0901D6 - 7D403850 80E30118 - 390300A4 80C30114 - 3D80817F 80A30110 - 618C0238 808300A0 - 7D8803A6 80630094 - 4E800021 38210010 - 38610BE4 3D80802E - 398C3864 7D8803A6 - 4E800021 881F0046 + 7D080396 380003E8 + 7D280396 7C0901D6 + 7CE04050 3800003C + 7CA90396 7C0501D6 + 7CC04850 3D80817F + 618C0238 7D8803A6 + 388300A4 38630110 + 4E800021 38610BE4 + 3D80802E 398C3864 + 7D8803A6 4E800021 60000000 00000000 C22943FC 00000005 3CA0817F A00500B2 @@ -1491,8 +1476,8 @@ 41820010 B00700B2 3800FFFC 900700B4 60000000 00000000 - C21252A4 0000001F - 3C60817F 6064011C + C212554C 0000001B + 3C60817F 60640120 38630094 3D808012 398C1660 7D8803A6 4E800021 3C60817F @@ -1508,20 +1493,16 @@ 40A00010 7CE83B78 98E300B2 90E300B4 1D0803E9 38000078 - 7D080396 9421FFF0 - 380003E8 7CE80396 - 7C0701D6 7D004050 - 91010008 3800003C - 7D270396 7C0901D6 - 7D403850 80E30118 - 390300A4 80C30114 - 3D80817F 80A30110 - 618C0238 808300A0 - 7D8803A6 80630094 - 4E800021 38210010 - 38610BEC 3D80802D - 398CAECC 7D8803A6 - 4E800021 881F0046 + 7D080396 380003E8 + 7D280396 7C0901D6 + 7CE04050 3800003C + 7CA90396 7C0501D6 + 7CC04850 3D80817F + 618C0238 7D8803A6 + 388300A4 38630110 + 4E800021 38610BEC + 3D80802D 398CAECC + 7D8803A6 4E800021 60000000 00000000 C227C214 00000005 3CA0817F A00500B2 @@ -2793,447 +2774,18 @@ 60000000 00000000 - - metadata - PASDisplay - Position/angle/speed display - Position/Winkel/Geschw. Display - Affichage de position/angle/vitesse - 位置/角度/速度表示 - Noki Doki, sup39(サポミク) - 1.4 - Mar 24, 2022 - drawText - drawText - - Shows Mario's position, angle and speed at any given time. - - ::: warning - This code is not compatible with the Speed Display code. - ::: - - - Zeigt Mario's Position, Winkel und Geschwindigkeit jederzeit auf dem Bildschirm an. - - ::: warning - Dieser Code ist nicht kompatibel mit dem Geschwindigkeits-Display Code - ::: - - Affiche la position, l'angle et la vitesse de Mario à tout moment. - 常に「マリオの位置」「マリオの角度」「マリオの速度」を表示します。 - - 062A6160 00000010 - 49553F19 60000000 - 60000000 60000000 - 042998B8 49560749 - 04143F14 496B6209 - 077FA000 000001E8 - 9421FFE0 7C0802A6 - 90010024 93E1001C - 4AABD6E5 38E00200 - 38C00320 38A0FFD8 - 3880000A 38610008 - 4AAD01B9 814D9FC8 - 3FE08180 3BFFA1EC - 39200000 39000002 - 3CE08180 38E7A164 - 80CA0048 38A10008 - 38800000 7FE3FB78 - 4AAD67F1 39200001 - 913F01B0 80010024 - 7C0803A6 83E1001C - 38210020 4E800020 - 9421FFE8 7C0802A6 - 9001001C 93A1000C - 93C10010 93E10014 - 7C7F1B78 81230000 - 83A90064 3D208180 - 8129A39C 2F890000 - 409E002C 7FE3FB78 - 7FA903A6 4E800421 - 8001001C 7C0803A6 - 83A1000C 83C10010 - 83E10014 38210018 - 4E800020 3D208040 - 6129E0E8 83C90000 - 3C608180 3863A1EC - 4AAD6B79 C0BE00A8 - C09E00B0 A0DE0096 - C07E0018 C05E0014 - C03E0010 3CA08180 - 38A5A164 38800080 - 4CC63242 4AB3F691 - 4BFFFF94 9421FFF0 - 7C0802A6 90010014 - 93E1000C 7C7F1B78 - 4AAF158D 38E00081 - 7FE6FB78 38A00000 - 38800000 3C608180 - 3863A1EC 4AAD5C5D - 80010014 7C0803A6 - 83E1000C 38210010 - 4E800020 5820506F - 7320252E 30660A59 - 20506F73 20252E30 - 660A5A20 506F7320 - 252E3066 0A416E67 - 6C652025 68750A48 - 20537064 20252E32 - 660A5620 53706420 - 252E3266 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202000 00000000 - C22A66F4 00000003 - 38600000 3D808180 - 906CA39C 807F0040 - 60000000 00000000 - - - 04206734 495F38CD - 077FA000 000000B5 - 9421FFF0 7C0802A6 - 90010014 93E1000C - 7C7F1B78 4A83B215 - 3D208041 8149A378 - 3D008180 38600010 - 3908A074 C0AA00A8 - 38E0FFFF C08A00B0 - 38C0FFFF A12A0096 - 38A00014 C06A0018 - 388000C8 C04A0014 - C02A0010 4CC63242 - 4BFF61E1 80010014 - 7FE3FB78 83E1000C - 7C0803A6 38210010 - 4A83B1B8 5820506F - 7320252E 30660A59 - 20506F73 20252E30 - 660A5A20 506F7320 - 252E3066 0A416E67 - 6C652025 68750A48 - 20537064 20252E32 - 660A5620 53706420 - 252E3266 00000000 - - - 041252A0 496D4D61 - 077FA000 000000B5 - 9421FFF0 7C0802A6 - 90010014 93E1000C - 7C7F1B78 4AAD0EB9 - 3D208040 8149EF88 - 3D008180 38600010 - 3908A074 C0AA00A8 - 38E0FFFF C08A00B0 - 38C0FFFF A12A0096 - 38A00014 C06A0018 - 388000C8 C04A0014 - C02A0010 4CC63242 - 4BFF61E1 80010014 - 7FE3FB78 83E1000C - 7C0803A6 38210010 - 4AAD0E5C 5820506F - 7320252E 30660A59 - 20506F73 20252E30 - 660A5A20 506F7320 - 252E3066 0A416E67 - 6C652025 68750A48 - 20537064 20252E32 - 660A5620 53706420 - 252E326600000000 - - - 0629E070 00000010 - 4955C009 60000000 - 60000000 60000000 - 04291750 495688B1 - 04138B50 496C15CD - 077FA000 000001E8 - 9421FFE0 7C0802A6 - 90010024 93E1001C - 4AAB56B5 38E00200 - 38C00320 38A0FFD8 - 3880000A 38610008 - 4AAC824D 814D9EF0 - 3FE08180 3BFFA1EC - 39200000 39000002 - 3CE08180 38E7A164 - 80CA0048 38A10008 - 38800000 7FE3FB78 - 4AACE999 39200001 - 913F01B0 80010024 - 7C0803A6 83E1001C - 38210020 4E800020 - 9421FFE8 7C0802A6 - 9001001C 93A1000C - 93C10010 93E10014 - 7C7F1B78 81230000 - 83A90064 3D208180 - 8129A39C 2F890000 - 409E002C 7FE3FB78 - 7FA903A6 4E800421 - 8001001C 7C0803A6 - 83A1000C 83C10010 - 83E10014 38210018 - 4E800020 3D208040 - 612957B0 83C90000 - 3C608180 3863A1EC - 4AACED21 C0BE00A8 - C09E00B0 A0DE0096 - C07E0018 C05E0014 - C03E0010 3CA08180 - 38A5A164 38800080 - 4CC63242 4AB37811 - 4BFFFF94 9421FFF0 - 7C0802A6 90010014 - 93E1000C 7C7F1B78 - 4AAE9735 38E00081 - 7FE6FB78 38A00000 - 38800000 3C608180 - 3863A1EC 4AACDE05 - 80010014 7C0803A6 - 83E1000C 38210010 - 4E800020 5820506F - 7320252E 30660A59 - 20506F73 20252E30 - 660A5A20 506F7320 - 252E3066 0A416E67 - 6C652025 68750A48 - 20537064 20252E32 - 660A5620 53706420 - 252E3266 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202000 00000000 - C229E64C 00000003 - 38600000 3D808180 - 906CA39C 807F0040 - 60000000 00000000 - - - - metadata - SpeedDisplay - Speed display - Geschwindigkeits-Display - Affichage de vitesse - 速度表示 - Noki Doki, sup39(サポミク) - 1.5 - Mar 24, 2022 - drawText - drawText - - Shows Mario's speed at any given time. - - ::: warning - This code is not compatible with the Position/Angle/Speed Display code. - ::: - - - Zeigt Mario's Geschwindigkeit jederzeit auf dem Bildschirm an. - - ::: warning - Dieser Code ist nicht kompatibel mit dem Position/Winkel/Gewschw. Display Code - ::: - - Affiche la vitesse de Mario à tout moment. - 常に「マリオの速度」を表示します。 - - 062A6160 00000010 - 49553F19 60000000 - 60000000 60000000 - 042998B8 49560749 - 04143F14 496B61F9 - 077FA000 00000188 - 9421FFE0 7C0802A6 - 90010024 93E1001C - 4AABD6E5 38E00200 - 38C00320 38A0FFD8 - 3880000A 38610008 - 4AAD01B9 814D9FC8 - 3FE08180 3BFFA214 - 39200000 39000002 - 3CE08180 38E7A154 - 80CA0048 38A10008 - 38800000 7FE3FB78 - 4AAD67F1 39200001 - 913F01B0 80010024 - 7C0803A6 83E1001C - 38210020 4E800020 - 9421FFE8 7C0802A6 - 9001001C 93C10010 - 93E10014 7C7F1B78 - 81230000 83C90064 - 3D208180 8129A3C4 - 2C090000 40820028 - 7FE3FB78 7FC903A6 - 4E800421 8001001C - 7C0803A6 83C10010 - 83E10014 38210018 - 4E800020 93A1000C - 3D208040 6129E0E8 - 83A90000 3C608180 - 3863A214 4AAD6B7D - C05D00A8 C03D00B0 - 3CA08180 38A5A154 - 38800030 4CC63242 - 4AB3F6A5 83A1000C - 4BFFFFA0 9421FFF0 - 7C0802A6 90010014 - 93E1000C 7C7F1B78 - 4AAF159D 38E00081 - 7FE6FB78 38A00000 - 38800000 3C608180 - 3863A214 4AAD5C6D - 80010014 7C0803A6 - 83E1000C 38210010 - 4E800020 48205370 - 6420252E 32660A56 - 20537064 20252E32 - 66202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202000 00000000 - C22A66F4 00000003 - 38600000 3D808180 - 906CA3C4 807F0040 - 60000000 00000000 - - - 04206734 495F38CD - 077FA000 0000007A - 9421FFF0 7C0802A6 - 90010014 93E1000C - 7C7F1B78 4A83B215 - 3D208041 8129A378 - 3D008180 38600010 - 3908A064 C04900A8 - 38E0FFFF C02900B0 - 38C0FFFF 38A00014 - 388000F0 4CC63242 - 4BFF61F1 80010014 - 7FE3FB78 83E1000C - 7C0803A6 38210010 - 4A83B1C8 48205370 - 6420252E 32660A56 - 20537064 20252E32 - 66000000 00000000 - - - 041252A0 496D4D61 - 077FA000 0000007A - 9421FFF0 7C0802A6 - 90010014 93E1000C - 7C7F1B78 4AAD0EB9 - 3D208040 8129EF88 - 3D008180 38600010 - 3908A064 C04900A8 - 38E0FFFF C02900B0 - 38C0FFFF 38A00014 - 388000F0 4CC63242 - 4BFF61F1 80010014 - 7FE3FB78 83E1000C - 7C0803A6 38210010 - 4AAD0E6C 48205370 - 6420252E 32660A56 - 20537064 20252E32 - 66000000 00000000 - - - 0629E070 00000010 - 4955C009 60000000 - 60000000 60000000 - 04291750 495688B1 - 04138B50 496C15BD - 077FA000 00000188 - 9421FFE0 7C0802A6 - 90010024 93E1001C - 4AAB56B5 38E00200 - 38C00320 38A0FFD8 - 3880000A 38610008 - 4AAC824D 814D9EF0 - 3FE08180 3BFFA214 - 39200000 39000002 - 3CE08180 38E7A154 - 80CA0048 38A10008 - 38800000 7FE3FB78 - 4AACE999 39200001 - 913F01B0 80010024 - 7C0803A6 83E1001C - 38210020 4E800020 - 9421FFE8 7C0802A6 - 9001001C 93C10010 - 93E10014 7C7F1B78 - 81230000 83C90064 - 3D208180 8129A3C4 - 2C090000 40820028 - 7FE3FB78 7FC903A6 - 4E800421 8001001C - 7C0803A6 83C10010 - 83E10014 38210018 - 4E800020 93A1000C - 3D208040 612957B0 - 83A90000 3C608180 - 3863A214 4AACED25 - C05D00A8 C03D00B0 - 3CA08180 38A5A154 - 38800030 4CC63242 - 4AB37825 83A1000C - 4BFFFFA0 9421FFF0 - 7C0802A6 90010014 - 93E1000C 7C7F1B78 - 4AAE9745 38E00081 - 7FE6FB78 38A00000 - 38800000 3C608180 - 3863A214 4AACDE15 - 80010014 7C0803A6 - 83E1000C 38210010 - 4E800020 48205370 - 6420252E 32660A56 - 20537064 20252E32 - 66202020 20202020 - 20202020 20202020 - 20202020 20202020 - 20202000 00000000 - C229E64C 00000003 - 38600000 3D808180 - 906CA3C4 807F0040 - 60000000 00000000 - - metadata CustomizedDisplay - Customized display + Customized Display カスタマイズ表示 sup39(サポミク) 0.3 - Oct 30, 2022 + Jan 28, 2023 drawText Shows metadata at any given time. - ::: warning - This code is not compatible with other Display codes. - ::: - - ::: warning - The preview is based on NTSC-J's font data, and may be inaccurate for NTSC-U and PAL. - In addition, some characters may not shown properly. - ::: - #### Format Use `< ID-of-the-data | format | value-shown-in-preview >` to display a metadata. @@ -3252,8 +2804,12 @@ For float data, you can set the *format* to `.{digit}` to specify how many digits to show. %details[ - %summary[All printable characters (for NTSC-J)] - ![Printable charaters](/img/preview/font-jp.png){style="background:black"} + %summary[All printable characters (in NTSC-J)] + ![Printable charaters](/img/preview/font-JP.png){style="background:black"} + ] + %details[ + %summary[All printable characters (in PAL)] + ![Printable charaters](/img/preview/font-EU.png){style="background:black"} ] #### Preview @@ -3281,8 +2837,12 @@ また、全てのひらがなとカタカナ及び一部の漢字の表示も可能です。 %details[ - %summary[表示可能な文字一覧:] - ![表示可能な文字一覧](/img/preview/font-jp.png){style="background:black"} + %summary[表示可能な文字一覧(初期版・後期版)] + ![表示可能な文字一覧(初期版・後期版)](/img/preview/font-JP.png){style="background:black;padding:8px"} + ] + %details[ + %summary[表示可能な文字一覧(欧州版)] + ![表示可能な文字一覧(欧州版)](/img/preview/font-EU.png){style="background:black;padding:8px"} ] #### プレビュー @@ -3771,7 +3331,7 @@ パターン選択 sup39(サポミク) 0.3 - Oct 30, 2022 + Jan 28, 2023 drawText Ⓑ is the cursor to select the pattern, @@ -3852,122 +3412,228 @@ %object[]{data="/img/PatternSelector/PV1-3.svg"} - 0424F32C 495A9CD5 - 042069DC 495F26B8 - 077F9000 000001AF - 801F0000 3D00817F - 61089167 3D40817F - 614A0024 3D80803D - 618CA9C0 7C006040 - 41820048 3D80803D - 618C87C0 7C006040 - 40820034 819F0004 - 898C0013 508C442E - 39280031 88080007 - 7CEA00AE A0080005 - 7C006040 41820024 - 39080007 7C084840 - 4180FFE4 4AA671C0 - 2C05FFFF 4082FFF8 - 88EA0000 39080031 - 7CE73B79 4182FFE8 - 7C0838AE 280000FF - 4182FFDC 7C030378 - 4E800020 38610E90 - 4A83C191 3C808040 - A4040D82 3C60817F - 84A30024 70000040 - 41A20050 88840019 - 548007FE 7CA02850 - 5480FFFE 7CA50214 - 54A507BE 5480F7BF - 41A20030 28050003 - 41A00008 38A00000 - 5480EFFE 5080077A - 7D8328AE 7D8C0214 - 280C0005 41A00008 - 398CFFFB 7D8329AE - 98A30003 3821FFF0 - 3D00817F 6108919D - 3C002020 60002023 - 54AC183E 5C00603E - 98080008 540CC63E - 9988000B 540C863E - 9988000E 89230000 - 89430001 89630002 - 91610008 38600010 - 38800140 38A00014 - 38C0FFFF 38E0FFFF - 4CC63182 4BFF70DD - 38210010 4AA0D87C - 452020FF 213200FF - 621CFF1D 32005025 - 25252630 01FF4520 - 20213001 FFFF621C - 1D300151 0707FF08 - 3102FF36 01FF0231 - 021E6E20 FF506174 - 7465726E 203E2558 - 3E25583E 25580000 + 0424F32C 495A9CD5 + 042069DC 495F26B8 + 077F9000 00000192 + 801F0000 3D00817F + 61089147 3D40817F + 614A0024 3D80803D + 618CA9C0 7C006040 + 41820048 3D80803D + 618C87C0 7C006040 + 40820034 819F0004 + 898C0013 508C442E + 39280031 88080007 + 7CEA00AE A0080005 + 7C006040 41820024 + 39080007 7C084840 + 4180FFE4 4AA671C0 + 2C05FFFF 4082FFF8 + 88EA0000 39080031 + 7CE73B79 4182FFE8 + 7C0838AE 280000FF + 4182FFDC 7C030378 + 4E800020 3C808040 + A4040D82 3C60817F + 85630024 70000040 + 41A20050 88840019 + 548007FE 7D605850 + 5480FFFE 7D6B0214 + 556B07BE 5480F7BF + 41A20030 280B0003 + 41A00008 39600000 + 5480EFFE 5080077A + 7D8358AE 7D8C0214 + 280C0005 41A00008 + 398CFFFB 7D8359AE + 99630003 3C002020 + 60002023 556C183E + 5C00603E 5405063E + 5407C63E 5409863E + 88C30000 89030001 + 89430002 3C60817F + 60639138 38830045 + 4BFF7109 4AA0D8AC + 00100140 00000014 + FFFFFFFF FFFFFFFF + 452020FF 213200FF + 621CFF1D 32005025 + 25252630 01FF4520 + 20213001 FFFF621C + 1D300151 0707FF08 + 3102FF36 01FF0231 + 021E6E20 FF506174 + 7465726E 20256325 + 58256325 58256325 + 58000000 00000000 - 04027900 497D1701 - 04125548 496D3B4C - 077F9000 000001AF - 801F0000 3D00817F - 61089167 3D40817F - 614A0024 3D80803A - 618C6D70 7C006040 - 41820048 3D80803A - 618C4B80 7C006040 - 40820034 819F0004 - 898C0013 508C442E - 39280031 88080007 - 7CEA00AE A0080005 - 7C006040 41820024 - 39080007 7C084840 - 4180FFE4 4A83F620 - 2C05FFFF 4082FFF8 - 88EA0000 39080031 - 7CE73B79 4182FFE8 - 7C0838AE 280000FF - 4182FFDC 7C030378 - 4E800020 38610E90 - 4AAD1E35 3C80803F - A404545A 3C60817F - 84A30024 70000040 - 41A20050 88840019 - 548007FE 7CA02850 - 5480FFFE 7CA50214 - 54A507BE 5480F7BF - 41A20030 28050003 - 41A00008 38A00000 - 5480EFFE 5080077A - 7D8328AE 7D8C0214 - 280C0005 41A00008 - 398CFFFB 7D8329AE - 98A30003 3821FFF0 - 3D00817F 6108919D - 3C002020 60002023 - 54AC183E 5C00603E - 98080008 540CC63E - 9988000B 540C863E - 9988000E 89230000 - 89430001 89630002 - 91610008 38600010 - 38800140 38A00014 - 38C0FFFF 38E0FFFF - 4CC63182 4BFF70DD - 38210010 4A92C3E8 - 452020FF 213200FF - 621CFF1D 32005025 - 25252630 01FF4520 - 20213001 FFFF621C - 1D300151 0707FF08 - 3102FF36 01FF0231 - 021E6E20 FF506174 - 7465726E 203E2558 - 3E25583E 25580000 + 04027900 497D1701 + 04125548 496D3B4C + 077F9000 00000192 + 801F0000 3D00817F + 61089147 3D40817F + 614A0024 3D80803A + 618C6D70 7C006040 + 41820048 3D80803A + 618C4B80 7C006040 + 40820034 819F0004 + 898C0013 508C442E + 39280031 88080007 + 7CEA00AE A0080005 + 7C006040 41820024 + 39080007 7C084840 + 4180FFE4 4A83F620 + 2C05FFFF 4082FFF8 + 88EA0000 39080031 + 7CE73B79 4182FFE8 + 7C0838AE 280000FF + 4182FFDC 7C030378 + 4E800020 3C80803F + A404545A 3C60817F + 85630024 70000040 + 41A20050 88840019 + 548007FE 7D605850 + 5480FFFE 7D6B0214 + 556B07BE 5480F7BF + 41A20030 280B0003 + 41A00008 39600000 + 5480EFFE 5080077A + 7D8358AE 7D8C0214 + 280C0005 41A00008 + 398CFFFB 7D8359AE + 99630003 3C002020 + 60002023 556C183E + 5C00603E 5405063E + 5407C63E 5409863E + 88C30000 89030001 + 89430002 3C60817F + 60639138 38830045 + 4BFF7109 4A92C418 + 00100140 00000014 + FFFFFFFF FFFFFFFF + 452020FF 213200FF + 621CFF1D 32005025 + 25252630 01FF4520 + 20213001 FFFF621C + 1D300151 0707FF08 + 3102FF36 01FF0231 + 021E6E20 FF506174 + 7465726E 20256325 + 58256325 58256325 + 58000000 00000000 + + + 0403B54C 497BDAB5 + 04138DF8 496C029C + 077F9000 00000192 + 801F0000 3D00817F + 61089147 3D40817F + 614A0024 3D80803A + 618CDF98 7C006040 + 41820048 3D80803A + 618CBDA8 7C006040 + 40820034 819F0004 + 898C0013 508C442E + 39280031 88080007 + 7CEA00AE A0080005 + 7C006040 41820024 + 39080007 7C084840 + 4180FFE4 4A8531C4 + 2C05FFFF 4082FFF8 + 88EA0000 39080031 + 7CE73B79 4182FFE8 + 7C0838AE 280000FF + 4182FFDC 7C030378 + 4E800020 3C808040 + A404BC26 3C60817F + 85630024 70000040 + 41A20050 88840019 + 548007FE 7D605850 + 5480FFFE 7D6B0214 + 556B07BE 5480F7BF + 41A20030 280B0003 + 41A00008 39600000 + 5480EFFE 5080077A + 7D8358AE 7D8C0214 + 280C0005 41A00008 + 398CFFFB 7D8359AE + 99630003 3C002020 + 60002023 556C183E + 5C00603E 5405063E + 5407C63E 5409863E + 88C30000 89030001 + 89430002 3C60817F + 60639138 38830045 + 4BFF7109 4A93FCC8 + 00100140 00000014 + FFFFFFFF FFFFFFFF + 452020FF 213200FF + 621CFF1D 32005025 + 25252630 01FF4520 + 20213001 FFFF621C + 1D300151 0707FF08 + 3102FF36 01FF0231 + 021E6E20 FF506174 + 7465726E 20256325 + 58256325 58256325 + 58000000 00000000 + + + 0403B6FC 497BD905 + 041441BC 496B4ED8 + 077F9000 00000192 + 801F0000 3D00817F + 61089147 3D40817F + 614A0024 3D80803B + 618C6178 7C006040 + 41820048 3D80803B + 618C3F88 7C006040 + 40820034 819F0004 + 898C0013 508C442E + 39280031 88080007 + 7CEA00AE A0080005 + 7C006040 41820024 + 39080007 7C084840 + 4180FFE4 4A854070 + 2C05FFFF 4082FFF8 + 88EA0000 39080031 + 7CE73B79 4182FFE8 + 7C0838AE 280000FF + 4182FFDC 7C030378 + 4E800020 3C808040 + A4044486 3C60817F + 85630024 70000040 + 41A20050 88840019 + 548007FE 7D605850 + 5480FFFE 7D6B0214 + 556B07BE 5480F7BF + 41A20030 280B0003 + 41A00008 39600000 + 5480EFFE 5080077A + 7D8358AE 7D8C0214 + 280C0005 41A00008 + 398CFFFB 7D8359AE + 99630003 3C002020 + 60002023 556C183E + 5C00603E 5405063E + 5407C63E 5409863E + 88C30000 89030001 + 89430002 3C60817F + 60639138 38830045 + 4BFF7109 4A94B08C + 00100140 00000014 + FFFFFFFF FFFFFFFF + 452020FF 213200FF + 621CFF1D 32005025 + 25252630 01FF4520 + 20213001 FFFF621C + 1D300151 0707FF08 + 3102FF36 01FF0231 + 021E6E20 FF506174 + 7465726E 20256325 + 58256325 58256325 + 58000000 00000000 @@ -3997,161 +3663,140 @@ lib drawText sup39(サポミク) - 0.2.0 - Mar 25, 2022 + 0.3 + Jan 02, 2023 - ```c - void drawText(int x, int y, int fontSize, uint32_t colorTop, uint32_t colorBot, const char *fmt, ...); - ``` + ```c + typedef struct { + int16_t x; + int16_t y; + uint32_t fontSize; + uint32_t colorTop; + uint32_t colorBot; + } DrawTextOpt; + void drawText(DrawTextOpt *opt, const char *fmt, ...); + ``` - 077F0238 00000110 - 9421FED8 7C0802A6 - BF810118 7C7F1B78 - 9001012C 7C9E2378 - 90C100B8 7CBD2B78 - 90E100BC 7D1C4378 - 912100C0 914100C4 - 40860024 D82100C8 - D84100D0 D86100D8 - D88100E0 D8A100E8 - D8C100F0 D8E100F8 - D9010100 39200600 - 390100BC B12100A0 - 39210130 912100A4 - 392100A8 912100A8 - 808D97F8 38E100B8 - 7FA6EB78 38A00000 - 38610008 6FDE8000 - 4A826AF5 3D204330 - 91210108 3D40817F - 93C1010C 6FFF8000 - C00A0344 38610070 - C9810108 91210110 - 3D20817F 93E10114 - FC4C0028 C0690340 - C9810110 93A10064 - FC2C0028 93A10060 - 4A8A43E9 38800000 - 38610070 4A8BD419 - 38C100A0 7F85E378 - 388000FF 38610008 - 4A826951 BB810118 - 38210128 80010004 - 7C0803A6 4E800020 - 00000000 59800004 - - - 077F0238 00000110 - 9421FED8 7C0802A6 - BF810118 7C7F1B78 - 9001012C 7C9E2378 - 90C100B8 7CBD2B78 - 90E100BC 7D1C4378 - 912100C0 914100C4 - 40860024 D82100C8 - D84100D0 D86100D8 - D88100E0 D8A100E8 - D8C100F0 D8E100F8 - D9010100 39200600 - 390100BC B12100A0 - 39210130 912100A4 - 392100A8 912100A8 - 808D9E88 38E100B8 - 7FA6EB78 38A00000 - 38610008 6FDE8000 - 4AABD249 3D204330 - 91210108 3D40817F - 93C1010C 6FFF8000 - C00A0344 38610070 - C9810108 91210110 - 3D20817F 93E10114 - FC4C0028 C0690340 - C9810110 93A10064 - FC2C0028 93A10060 - 4AB393C9 38800000 - 38610070 4AB523F9 - 38C100A0 7F85E378 - 388000FF 38610008 - 4AABD0A5 BB810118 - 38210128 80010004 - 7C0803A6 4E800020 - 00000000 59800004 - - - 077F0238 00000110 - 9421FED8 7C0802A6 - BF810118 7C7F1B78 - 9001012C 7C9E2378 - 90C100B8 7CBD2B78 - 90E100BC 7D1C4378 - 912100C0 914100C4 - 40860024 D82100C8 - D84100D0 D86100D8 - D88100E0 D8A100E8 - D8C100F0 D8E100F8 - D9010100 39200600 - 390100BC B12100A0 - 39210130 912100A4 - 392100A8 912100A8 - 808D9FC8 38E100B8 - 7FA6EB78 38A00000 - 38610008 6FDE8000 - 4AADDA39 3D204330 - 91210108 3D40817F - 93C1010C 6FFF8000 - C00A0344 38610070 - C9810108 91210110 - 3D20817F 93E10114 - FC4C0028 C0690340 - C9810110 93A10064 - FC2C0028 93A10060 - 4AB59AC9 38800000 - 38610070 4AB72AF9 - 38C100A0 7F85E378 - 388000FF 38610008 - 4AADD895 BB810118 - 38210128 80010004 - 7C0803A6 4E800020 - 00000000 59800004 - - - 077F0238 00000110 - 9421FED8 7C0802A6 - BF810118 7C7F1B78 - 9001012C 7C9E2378 - 90C100B8 7CBD2B78 - 90E100BC 7D1C4378 - 912100C0 914100C4 - 40860024 D82100C8 - D84100D0 D86100D8 - D88100E0 D8A100E8 - D8C100F0 D8E100F8 - D9010100 39200600 - 390100BC B12100A0 - 39210130 912100A4 - 392100A8 912100A8 - 808D9EF0 38E100B8 - 7FA6EB78 38A00000 - 38610008 6FDE8000 - 4AAD5ACD 3D204330 - 91210108 3D40817F - 93C1010C 6FFF8000 - C00A0344 38610070 - C9810108 91210110 - 3D20817F 93E10114 - FC4C0028 C0690340 - C9810110 93A10064 - FC2C0028 93A10060 - 4AB51D25 38800000 - 38610070 4AB6AD19 - 38C100A0 7F85E378 - 388000FF 38610008 - 4AAD5929 BB810118 - 38210128 80010004 - 7C0803A6 4E800020 - 00000000 59800004 - + 077F0238 000000D4 + 9421FF08 7C0802A6 + BFC100F0 7C7F1B78 + 900100FC 7C9E2378 + 90A10088 90C1008C + 90E10090 91010094 + 91210098 9141009C + D82100A0 D84100A8 + D86100B0 D88100B8 + D8A100C0 D8C100C8 + D8E100D0 D90100D8 + 39200200 80DF0004 + B1210070 39200000 + 39210100 91210074 + 39210080 91210078 + 808D97F8 391F000C + 38FF0008 38A00000 + 38610008 4A826AF9 + 813F0004 38610008 + 91210064 91210060 + A95F0000 388000FF + 91410024 7FC5F378 + E01F5000 38C10070 + F001002C 38000000 + 90010034 4A826985 + BBC100F0 382100F8 + 80010004 7C0803A6 + 4E800020 00000000 + + + 077F0238 000000D4 + 9421FF08 7C0802A6 + BFC100F0 7C7F1B78 + 900100FC 7C9E2378 + 90A10088 90C1008C + 90E10090 91010094 + 91210098 9141009C + D82100A0 D84100A8 + D86100B0 D88100B8 + D8A100C0 D8C100C8 + D8E100D0 D90100D8 + 39200200 80DF0004 + B1210070 39200000 + 39210100 91210074 + 39210080 91210078 + 808D9E88 391F000C + 38FF0008 38A00000 + 38610008 4AABD24D + 813F0004 38610008 + 91210064 91210060 + A95F0000 388000FF + 91410024 7FC5F378 + E01F5000 38C10070 + F001002C 38000000 + 90010034 4AABD0D9 + BBC100F0 382100F8 + 80010004 7C0803A6 + 4E800020 00000000 + + + 077F0238 000000D4 + 9421FF08 7C0802A6 + BFC100F0 7C7F1B78 + 900100FC 7C9E2378 + 90A10088 90C1008C + 90E10090 91010094 + 91210098 9141009C + D82100A0 D84100A8 + D86100B0 D88100B8 + D8A100C0 D8C100C8 + D8E100D0 D90100D8 + 39200200 80DF0004 + B1210070 39200000 + 39210100 91210074 + 39210080 91210078 + 808D9FC8 391F000C + 38FF0008 38A00000 + 38610008 4AADDA3D + 813F0004 38610008 + 91210064 91210060 + A95F0000 388000FF + 91410024 7FC5F378 + E01F5000 38C10070 + F001002C 38000000 + 90010034 4AADD8C9 + BBC100F0 382100F8 + 80010004 7C0803A6 + 4E800020 00000000 + + + 077F0238 000000D4 + 9421FF08 7C0802A6 + BFC100F0 7C7F1B78 + 900100FC 7C9E2378 + 90A10088 90C1008C + 90E10090 91010094 + 91210098 9141009C + D82100A0 D84100A8 + D86100B0 D88100B8 + D8A100C0 D8C100C8 + D8E100D0 D90100D8 + 39200200 80DF0004 + B1210070 39200000 + 39210100 91210074 + 39210080 91210078 + 808D9EF0 391F000C + 38FF0008 38A00000 + 38610008 4AAD5AD1 + 813F0004 38610008 + 91210064 91210060 + A95F0000 388000FF + 91410024 7FC5F378 + E01F5000 38C10070 + F001002C 38000000 + 90010034 4AAD595D + BBC100F0 382100F8 + 80010004 7C0803A6 + 4E800020 00000000 + InstantRestart diff --git a/Readme.md b/Readme.md index f6ec0b0..fa9e1d9 100644 --- a/Readme.md +++ b/Readme.md @@ -47,7 +47,9 @@ Some codes store some states in the games memory starting from address 0x817F000 | ![](./docs/reserved.svg) | `0x14` | `0x15` | DPad Functions: Stored Angle (Mario) | | ![](./docs/reserved.svg) | `0x16` | `0x1B` | DPad Functions: Stored Position (Camera) | | ![](./docs/reserved.svg) | `0x20` | `0x23` | Coin Count Savestate: Coin Count | -| ![](./docs/unallocated.svg) | `0x24` | `0x93` | Not Allocated | +| ![](./docs/reserved.svg) | `0x24` | `0x26` | Pattern Selector: Selected Pattern Numbers | +| ![](./docs/reserved.svg) | `0x27` | `0x27` | Pattern Selector: Cursor Position | +| ![](./docs/unallocated.svg) | `0x28` | `0x93` | Not Allocated | | ![](./docs/reserved.svg) | `0x94` | `0xA3` | QF Timer: Coordinates of the Text box (LTRB) | | ![](./docs/reserved.svg) | `0xA4` | `0xB0` | QF Timer: Timer Format String | | ![](./docs/reserved.svg) | `0xB0` | `0xB1` | QF Timer: (Unused) | diff --git a/Removed-Codes.xml b/Removed-Codes.xml index a753450..b673557 100644 --- a/Removed-Codes.xml +++ b/Removed-Codes.xml @@ -533,4 +533,424 @@ 60000000 00000000 + + metadata + PASDisplay + Position/angle/speed display + Position/Winkel/Geschw. Display + Affichage de position/angle/vitesse + 位置/角度/速度表示 + Noki Doki, sup39(サポミク) + 1.4 + Mar 24, 2022 + drawText + drawText + + Shows Mario's position, angle and speed at any given time. + + ::: warning + This code is not compatible with the Speed Display code. + ::: + + + Zeigt Mario's Position, Winkel und Geschwindigkeit jederzeit auf dem Bildschirm an. + + ::: warning + Dieser Code ist nicht kompatibel mit dem Geschwindigkeits-Display Code + ::: + + Affiche la position, l'angle et la vitesse de Mario à tout moment. + 常に「マリオの位置」「マリオの角度」「マリオの速度」を表示します。 + + 062A6160 00000010 + 49553F19 60000000 + 60000000 60000000 + 042998B8 49560749 + 04143F14 496B6209 + 077FA000 000001E8 + 9421FFE0 7C0802A6 + 90010024 93E1001C + 4AABD6E5 38E00200 + 38C00320 38A0FFD8 + 3880000A 38610008 + 4AAD01B9 814D9FC8 + 3FE08180 3BFFA1EC + 39200000 39000002 + 3CE08180 38E7A164 + 80CA0048 38A10008 + 38800000 7FE3FB78 + 4AAD67F1 39200001 + 913F01B0 80010024 + 7C0803A6 83E1001C + 38210020 4E800020 + 9421FFE8 7C0802A6 + 9001001C 93A1000C + 93C10010 93E10014 + 7C7F1B78 81230000 + 83A90064 3D208180 + 8129A39C 2F890000 + 409E002C 7FE3FB78 + 7FA903A6 4E800421 + 8001001C 7C0803A6 + 83A1000C 83C10010 + 83E10014 38210018 + 4E800020 3D208040 + 6129E0E8 83C90000 + 3C608180 3863A1EC + 4AAD6B79 C0BE00A8 + C09E00B0 A0DE0096 + C07E0018 C05E0014 + C03E0010 3CA08180 + 38A5A164 38800080 + 4CC63242 4AB3F691 + 4BFFFF94 9421FFF0 + 7C0802A6 90010014 + 93E1000C 7C7F1B78 + 4AAF158D 38E00081 + 7FE6FB78 38A00000 + 38800000 3C608180 + 3863A1EC 4AAD5C5D + 80010014 7C0803A6 + 83E1000C 38210010 + 4E800020 5820506F + 7320252E 30660A59 + 20506F73 20252E30 + 660A5A20 506F7320 + 252E3066 0A416E67 + 6C652025 68750A48 + 20537064 20252E32 + 660A5620 53706420 + 252E3266 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202000 00000000 + C22A66F4 00000003 + 38600000 3D808180 + 906CA39C 807F0040 + 60000000 00000000 + + + 04206734 495F38CD + 077FA000 000000B5 + 9421FFF0 7C0802A6 + 90010014 93E1000C + 7C7F1B78 4A83B215 + 3D208041 8149A378 + 3D008180 38600010 + 3908A074 C0AA00A8 + 38E0FFFF C08A00B0 + 38C0FFFF A12A0096 + 38A00014 C06A0018 + 388000C8 C04A0014 + C02A0010 4CC63242 + 4BFF61E1 80010014 + 7FE3FB78 83E1000C + 7C0803A6 38210010 + 4A83B1B8 5820506F + 7320252E 30660A59 + 20506F73 20252E30 + 660A5A20 506F7320 + 252E3066 0A416E67 + 6C652025 68750A48 + 20537064 20252E32 + 660A5620 53706420 + 252E3266 00000000 + + + 041252A0 496D4D61 + 077FA000 000000B5 + 9421FFF0 7C0802A6 + 90010014 93E1000C + 7C7F1B78 4AAD0EB9 + 3D208040 8149EF88 + 3D008180 38600010 + 3908A074 C0AA00A8 + 38E0FFFF C08A00B0 + 38C0FFFF A12A0096 + 38A00014 C06A0018 + 388000C8 C04A0014 + C02A0010 4CC63242 + 4BFF61E1 80010014 + 7FE3FB78 83E1000C + 7C0803A6 38210010 + 4AAD0E5C 5820506F + 7320252E 30660A59 + 20506F73 20252E30 + 660A5A20 506F7320 + 252E3066 0A416E67 + 6C652025 68750A48 + 20537064 20252E32 + 660A5620 53706420 + 252E326600000000 + + + 0629E070 00000010 + 4955C009 60000000 + 60000000 60000000 + 04291750 495688B1 + 04138B50 496C15CD + 077FA000 000001E8 + 9421FFE0 7C0802A6 + 90010024 93E1001C + 4AAB56B5 38E00200 + 38C00320 38A0FFD8 + 3880000A 38610008 + 4AAC824D 814D9EF0 + 3FE08180 3BFFA1EC + 39200000 39000002 + 3CE08180 38E7A164 + 80CA0048 38A10008 + 38800000 7FE3FB78 + 4AACE999 39200001 + 913F01B0 80010024 + 7C0803A6 83E1001C + 38210020 4E800020 + 9421FFE8 7C0802A6 + 9001001C 93A1000C + 93C10010 93E10014 + 7C7F1B78 81230000 + 83A90064 3D208180 + 8129A39C 2F890000 + 409E002C 7FE3FB78 + 7FA903A6 4E800421 + 8001001C 7C0803A6 + 83A1000C 83C10010 + 83E10014 38210018 + 4E800020 3D208040 + 612957B0 83C90000 + 3C608180 3863A1EC + 4AACED21 C0BE00A8 + C09E00B0 A0DE0096 + C07E0018 C05E0014 + C03E0010 3CA08180 + 38A5A164 38800080 + 4CC63242 4AB37811 + 4BFFFF94 9421FFF0 + 7C0802A6 90010014 + 93E1000C 7C7F1B78 + 4AAE9735 38E00081 + 7FE6FB78 38A00000 + 38800000 3C608180 + 3863A1EC 4AACDE05 + 80010014 7C0803A6 + 83E1000C 38210010 + 4E800020 5820506F + 7320252E 30660A59 + 20506F73 20252E30 + 660A5A20 506F7320 + 252E3066 0A416E67 + 6C652025 68750A48 + 20537064 20252E32 + 660A5620 53706420 + 252E3266 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202000 00000000 + C229E64C 00000003 + 38600000 3D808180 + 906CA39C 807F0040 + 60000000 00000000 + + + + metadata + SpeedDisplay + Speed display + Geschwindigkeits-Display + Affichage de vitesse + 速度表示 + Noki Doki, sup39(サポミク) + 1.5 + Mar 24, 2022 + drawText + drawText + + Shows Mario's speed at any given time. + + ::: warning + This code is not compatible with the Position/Angle/Speed Display code. + ::: + + + Zeigt Mario's Geschwindigkeit jederzeit auf dem Bildschirm an. + + ::: warning + Dieser Code ist nicht kompatibel mit dem Position/Winkel/Gewschw. Display Code + ::: + + Affiche la vitesse de Mario à tout moment. + 常に「マリオの速度」を表示します。 + + 062A6160 00000010 + 49553F19 60000000 + 60000000 60000000 + 042998B8 49560749 + 04143F14 496B61F9 + 077FA000 00000188 + 9421FFE0 7C0802A6 + 90010024 93E1001C + 4AABD6E5 38E00200 + 38C00320 38A0FFD8 + 3880000A 38610008 + 4AAD01B9 814D9FC8 + 3FE08180 3BFFA214 + 39200000 39000002 + 3CE08180 38E7A154 + 80CA0048 38A10008 + 38800000 7FE3FB78 + 4AAD67F1 39200001 + 913F01B0 80010024 + 7C0803A6 83E1001C + 38210020 4E800020 + 9421FFE8 7C0802A6 + 9001001C 93C10010 + 93E10014 7C7F1B78 + 81230000 83C90064 + 3D208180 8129A3C4 + 2C090000 40820028 + 7FE3FB78 7FC903A6 + 4E800421 8001001C + 7C0803A6 83C10010 + 83E10014 38210018 + 4E800020 93A1000C + 3D208040 6129E0E8 + 83A90000 3C608180 + 3863A214 4AAD6B7D + C05D00A8 C03D00B0 + 3CA08180 38A5A154 + 38800030 4CC63242 + 4AB3F6A5 83A1000C + 4BFFFFA0 9421FFF0 + 7C0802A6 90010014 + 93E1000C 7C7F1B78 + 4AAF159D 38E00081 + 7FE6FB78 38A00000 + 38800000 3C608180 + 3863A214 4AAD5C6D + 80010014 7C0803A6 + 83E1000C 38210010 + 4E800020 48205370 + 6420252E 32660A56 + 20537064 20252E32 + 66202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202000 00000000 + C22A66F4 00000003 + 38600000 3D808180 + 906CA3C4 807F0040 + 60000000 00000000 + + + 04206734 495F38CD + 077FA000 0000007A + 9421FFF0 7C0802A6 + 90010014 93E1000C + 7C7F1B78 4A83B215 + 3D208041 8129A378 + 3D008180 38600010 + 3908A064 C04900A8 + 38E0FFFF C02900B0 + 38C0FFFF 38A00014 + 388000F0 4CC63242 + 4BFF61F1 80010014 + 7FE3FB78 83E1000C + 7C0803A6 38210010 + 4A83B1C8 48205370 + 6420252E 32660A56 + 20537064 20252E32 + 66000000 00000000 + + + 041252A0 496D4D61 + 077FA000 0000007A + 9421FFF0 7C0802A6 + 90010014 93E1000C + 7C7F1B78 4AAD0EB9 + 3D208040 8129EF88 + 3D008180 38600010 + 3908A064 C04900A8 + 38E0FFFF C02900B0 + 38C0FFFF 38A00014 + 388000F0 4CC63242 + 4BFF61F1 80010014 + 7FE3FB78 83E1000C + 7C0803A6 38210010 + 4AAD0E6C 48205370 + 6420252E 32660A56 + 20537064 20252E32 + 66000000 00000000 + + + 0629E070 00000010 + 4955C009 60000000 + 60000000 60000000 + 04291750 495688B1 + 04138B50 496C15BD + 077FA000 00000188 + 9421FFE0 7C0802A6 + 90010024 93E1001C + 4AAB56B5 38E00200 + 38C00320 38A0FFD8 + 3880000A 38610008 + 4AAC824D 814D9EF0 + 3FE08180 3BFFA214 + 39200000 39000002 + 3CE08180 38E7A154 + 80CA0048 38A10008 + 38800000 7FE3FB78 + 4AACE999 39200001 + 913F01B0 80010024 + 7C0803A6 83E1001C + 38210020 4E800020 + 9421FFE8 7C0802A6 + 9001001C 93C10010 + 93E10014 7C7F1B78 + 81230000 83C90064 + 3D208180 8129A3C4 + 2C090000 40820028 + 7FE3FB78 7FC903A6 + 4E800421 8001001C + 7C0803A6 83C10010 + 83E10014 38210018 + 4E800020 93A1000C + 3D208040 612957B0 + 83A90000 3C608180 + 3863A214 4AACED25 + C05D00A8 C03D00B0 + 3CA08180 38A5A154 + 38800030 4CC63242 + 4AB37825 83A1000C + 4BFFFFA0 9421FFF0 + 7C0802A6 90010014 + 93E1000C 7C7F1B78 + 4AAE9745 38E00081 + 7FE6FB78 38A00000 + 38800000 3C608180 + 3863A214 4AACDE15 + 80010014 7C0803A6 + 83E1000C 38210010 + 4E800020 48205370 + 6420252E 32660A56 + 20537064 20252E32 + 66202020 20202020 + 20202020 20202020 + 20202020 20202020 + 20202000 00000000 + C229E64C 00000003 + 38600000 3D808180 + 906CA3C4 807F0040 + 60000000 00000000 + + diff --git a/changelog.md b/changelog.md index 10f9223..d68968b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,13 @@ # Changelog +## Jan 28, 2023 +### Rewrote 'drawText' +- Reduced parameters to struct pointer + format string + varargs +- Rewrote QFT, Pattern Selector, Customized Display with the new drawText function +### Improved Preview +- Added PAL font (TODO: NTSC-U) +- Merged P/A/S Display and Speed Display to Customized Display +- Provided background options to Pattern Selector and Customized Display + ## Jan 10, 2023 ### Updated 'Quarterframe Timer' Added the following options to freeze QFT: diff --git a/site/.vuepress/components/Generator.vue b/site/.vuepress/components/Generator.vue index 8de2526..d55e4d6 100644 --- a/site/.vuepress/components/Generator.vue +++ b/site/.vuepress/components/Generator.vue @@ -136,8 +136,6 @@ export default { this.codeConfigs = { qft: getConfigQFT(), PatternSelector: getConfigPS(), - SpeedDisplay: {}, - PASDisplay: {}, CustomizedDisplay: getConfigCD(this.version), }; }, @@ -222,7 +220,10 @@ export default { .filter(code => !(code.category === category && exclusive)) .map(code => code.id)); ids.add(id); - return Object.fromEntries(Object.entries(this.codeConfigs).filter(([id]) => ids.has(id))); + return { + ...Object.fromEntries(Object.entries(this.codeConfigs).filter(([id]) => ids.has(id))), + _version: this.selectedVersion, + }; }, }, }; diff --git a/site/.vuepress/components/Preview.vue b/site/.vuepress/components/Preview.vue index 8a52383..282f5e5 100644 --- a/site/.vuepress/components/Preview.vue +++ b/site/.vuepress/components/Preview.vue @@ -1,82 +1,30 @@ diff --git a/site/.vuepress/components/PreviewString.vue b/site/.vuepress/components/PreviewString.vue index e1a7370..ef11ea4 100644 --- a/site/.vuepress/components/PreviewString.vue +++ b/site/.vuepress/components/PreviewString.vue @@ -1,47 +1,34 @@ diff --git a/site/.vuepress/components/codes/CustomizedDisplay/codegen.js b/site/.vuepress/components/codes/CustomizedDisplay/codegen.js index e34297e..ccae03c 100644 --- a/site/.vuepress/components/codes/CustomizedDisplay/codegen.js +++ b/site/.vuepress/components/codes/CustomizedDisplay/codegen.js @@ -1,31 +1,25 @@ import { parseJSON } from '../codegen.js'; -import { ASM, makeInst, liDX, str2inst, makeProgram, inst2gecko } from '../asm.js'; +import { + ASM, + makeInst, + liDX, + str2inst, + makeProgram, + inst2gecko, + getFillRectParams, +} from '../asm.js'; +import { measureText } from '../text.js'; export const lskey = 'config/CustomizedDisplay'; -export const defaultConfig = [ - { - x: 16, - y: 192, - fontSize: 18, - fgRGB: 0xffffff, - fgA: 0xff, - fgRGB2: null, - fgA2: null, - fmt: `X -Y -Z -A -H -V -QF `, - }, -]; +import configDB from './configDB.js'; +export const defaultConfig = [configDB.PAS]; /** @param {GameVersion} version */ export function getConfig(version) { /** @type {typeof defaultConfig} */ const config = typeof localStorage !== 'undefined' && parseJSON(localStorage.getItem(lskey)); return (config instanceof Array ? config : defaultConfig).map(({ fmt, ...o }) => ({ + ...defaultConfig[0], ...o, fmt, text: format2previewText(fmt, version), @@ -142,14 +136,22 @@ const load = { }; /** - * @param {number} x - * @param {number} y - * @param {number} fontSize - * @param {number} colorTop - * @param {number} colorBot + * @param {string} version + * @param {{ + * x: number + * y: number + * fontSize: number + * fgRGB: number + * fgA: number + * fgRGB2: number | null + * fgA2: number | null + * }} drawTextOpt */ -export function prepareDrawText(x, y, fontSize, colorTop, colorBot) { - let gpr = 9; +export function prepareDrawText(version, { x, y, fontSize, fgRGB, fgA, fgRGB2, fgA2 }) { + const colorTop = (fgRGB << 8) | fgA; + const colorBot = fgRGB2 == null || fgA2 == null ? colorTop : (fgRGB2 << 8) | fgA; + + let gpr = 5; let fpr = 1; let sp = 8; let fmt = ''; @@ -219,8 +221,8 @@ export function prepareDrawText(x, y, fontSize, colorTop, colorBot) { const rBase = 3; insts.push(pre(rBase)); // load all params - const rField = 5; - const fField = 9; + const rField = 11; // tmp GPR + const fField = 9; // tmp FPR for (const { info: { offset: srcoff, dtype, post }, dst, @@ -258,32 +260,21 @@ export function prepareDrawText(x, y, fontSize, colorTop, colorBot) { } } } - // r8 = fmt - const fmtbuf = str2inst(fmt); + // r3 = opt // sizeof(opt) = 0x10 + // r4 = fmt + const fmtbuf = str2inst(fmt, version); insts.push( - // bl 4+len4(fmt) - ASM.b(4 + (fmtbuf.length << 2), true), + // bl 4+sizeof(opt)+len4(fmt) + ASM.b(0x14 + (fmtbuf.length << 2), true), + // opt + [((x & 0xffff) << 16) | (y & 0xffff), fontSize, colorTop, colorBot], // .string fmt fmtbuf, - // mflr r8 - ASM.mflr(8), + // mflr r3 + ASM.mflr(3), + // addi r4, r3, sizeof(opt) + ASM.addi(4, 3, 0x10), ); - /* - * r3 = x - * r4 = y - * r5 = fontSize - * r6 = colorTop - * r7 = colorBot - */ - insts.push( - liDX(3, x), - liDX(4, y), - liDX(5, fontSize), - liDX(6, colorTop), - colorTop === colorBot ? ASM.mr(7, 6) : liDX(7, colorBot), - ); - // cr{set|clr} 6 - insts.push((hasFloat ? ASM.crset : ASM.crclr)(6)); // DONE return { code: insts.flatMap((e) => e), spNeed: spAdd }; }, @@ -369,58 +360,72 @@ export function format2previewText(input, version, f = null) { return preview; } -const addrsOrig = { - GMSJ01: 0x80206a00 - 0x2c, - GMSJ0A: 0x8012556c - 0x2c, - GMSE01: 0x801441e0 - 0x2c, - GMSP01: 0x80138e1c - 0x2c, -}; -const addrsSetup2D = { - GMSJ01: 0x80035228, - GMSJ0A: 0x802caecc, - GMSE01: 0x802eb6bc, - GMSP01: 0x802e3864, -}; -const addrDrawText = 0x817f0238; +import addrs from '../addrs.js'; +const addrOrigOff = -0x2c; // drawWater - [-0x30, -0x18] const addrDst = 0x817fa000; /** * @param {GameVersion} version */ export default function codegen(version) { - const config = getConfig(version); + const configs = getConfig(version); let spOff = 0; const fcodes = /** @type {Inst[]} */ ([]); + const bcodes = /** @type {Inst[]} */ ([]); - for (const { x, y, fontSize, fgRGB, fgA, fgRGB2, fgA2, fmt } of config) { - // color - const colorTop = (fgRGB << 8) | fgA; - const colorBot = fgRGB2 == null || fgA2 == null ? colorTop : (fgRGB2 << 8) | fgA; + for (const config of configs) { + const { fontSize, fmt, bgA } = config; // prepare drawText - const f = prepareDrawText(x, y, fontSize, colorTop, colorBot); - format2previewText(fmt, version, f); - // update code and sp - const { code, spNeed } = f.makeCode(); - spOff = Math.max(spOff, spNeed); - fcodes.push(code); + const f = prepareDrawText(version, config); + const text = format2previewText(fmt, version, f); + // text code + if (fmt.trim()) { + // update code and sp + const { code, spNeed } = f.makeCode(); + spOff = Math.max(spOff, spNeed); + fcodes.push(code); + } + // background code + if (bgA) { + const { width, height } = measureText(text, version); + const w = Math.ceil((width * fontSize) / 20); + const h = Math.ceil((height * fontSize) / 20); + bcodes.push( + [ + // bl 4+sizeof(rect)+sizeof(color) + ASM.b(0x18, true), + // fill_rect params + ...getFillRectParams(config, measureText(text, version)), + // mflr r3 + ASM.mflr(3), + // addi r4, r3, sizeof(rect) + ASM.addi(4, 3, 0x10), + ].flatMap((e) => e), + ); + } } - const addrOrig = addrsOrig[version]; - const addrSetup2D = addrsSetup2D[version]; + const addrOrig = addrs.drawWater[version] + addrOrigOff; + const addrFillRect = addrs.fillRect[version]; // program const program = makeProgram(addrDst); - // addi r3, r1, 0xE90 - program.push(ASM.addi(3, 1, 0xe90)); + // la r3, ctx(r1) + // program.push(ASM.addi(3, 1, addrs.ctxSpOff[version])); // addi r1, r1, -spOff if (spOff) program.push(ASM.addi(1, 1, -spOff)); - // bl setup - program.bl(addrSetup2D); + // bl J2DGrafContext::setup2D + // program.bl(addrs.setup2D[version]); + // (fill_rect) + for (const code of bcodes) { + program.push(code); + program.bl(addrFillRect); + } // (drawText) for (const code of fcodes) { program.push(code); - program.bl(addrDrawText); + program.bl(addrs.drawText); } // addi r1, r1, spOff if (spOff) program.push(ASM.addi(1, 1, spOff)); diff --git a/site/.vuepress/components/codes/CustomizedDisplay/config.vue b/site/.vuepress/components/codes/CustomizedDisplay/config.vue index 19a095b..99becb1 100644 --- a/site/.vuepress/components/codes/CustomizedDisplay/config.vue +++ b/site/.vuepress/components/codes/CustomizedDisplay/config.vue @@ -2,19 +2,26 @@
- +
-
- +
+ + + +