diff --git a/Codes.xml b/Codes.xml
index 26b11ae..1ef1327 100644
--- a/Codes.xml
+++ b/Codes.xml
@@ -1244,6 +1244,7 @@
1.1
Apr 22, 2022
drawText
+ drawText
Adds an in-game timer to every level, starting on the last black frame after the
loading screen and ending as soon as the 'Shine Get' animation starts
@@ -2872,6 +2873,7 @@
1.4
Mar 24, 2022
drawText
+ drawText
Shows Mario's position, angle and speed at any given time.
@@ -2989,57 +2991,23 @@
252E3266 00000000
+
+ 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
+
InstantRestart
@@ -4018,8 +4065,8 @@
Instant Restart
ポーズせずにやり直し
sup39(サポミク)
- 0.1.3
- Jan 07, 2022
+ 0.1.4
+ Apr 25, 2022
When you pressed the buttons configured in [#Button Config](#config) simultaneously,
you can restart the current area without selecting "Exit Area" in pause menu.
@@ -4040,15 +4087,27 @@
:::
- c20eafa0 00000009
- 3c608040 a0a30d50
- 28050801 40a20030
- 3c60817f 38a00001
- 98a300b3 98a30100
- 3c60803e 80a3600e
- 90a36012 3c60800e
- 6063b3f8 7c6803a6
- 4e800020 2c000002
+ C20EAFA0 00000009
+ 3C608040 A0A30D50
+ 28050808 40A20030
+ 3C60817F 38A00001
+ 98A300B3 98A30100
+ 3C60803E 84A3600E
+ 90A30004 3C60800E
+ 6063B3F8 7C6803A6
+ 4E800020 2C000002
+ 60000000 00000000
+
+
+ C227768C 00000009
+ 3C60803F A0A35428
+ 28050808 40A20030
+ 3C60817F 38A00001
+ 98A300B3 98A30100
+ 3C60803E 84A3A8EE
+ 90A30004 3C608027
+ 60637AE4 7C6803A6
+ 4E800020 2C000002
60000000 00000000
diff --git a/changelog.md b/changelog.md
index 42aa9b0..edc7d5e 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,9 @@
# Changelog
+## Apr 25, 2022
+### Port the following code from GMSJ01 to GMSJ0A
+- Pattern Selector, Instant Restart, drawText
+- QFT, PAS/Speed display with drawText
+
## Apr 23, 2022
### Add code size warning
- Alert message `generatorconfig.alert.gct` when code size > 5000 bytes and download format is `GCT`
diff --git a/site/.vuepress/components/codes/InstantRestart/codegen.js b/site/.vuepress/components/codes/InstantRestart/codegen.js
index 2ca0f6d..c9b86fb 100644
--- a/site/.vuepress/components/codes/InstantRestart/codegen.js
+++ b/site/.vuepress/components/codes/InstantRestart/codegen.js
@@ -15,8 +15,39 @@ export const buttonValues = {
DL: 0x0001,
};
+const baseCodes = {
+ GMSJ01: (b) => `
+C20EAFA0 00000009
+3C608040 A0A30D50
+2805${b} 40A20030
+3C60817F 38A00001
+98A300B3 98A30100
+3C60803E 84A3600E
+90A30004 3C60800E
+6063B3F8 7C6803A6
+4E800020 2C000002
+60000000 00000000
+`,
+ GMSJ0A: (b) => `
+C227768C 00000009
+3C60803F A0A35428
+2805${b} 40A20030
+3C60817F 38A00001
+98A300B3 98A30100
+3C60803E 84A3A8EE
+90A30004 3C608027
+60637AE4 7C6803A6
+4E800020 2C000002
+60000000 00000000
+`,
+};
+const zCodes = {
+ GMSJ01: '040eb024 60000000',
+ GMSJ0A: '04277710 60000000',
+};
+
export const defaultConfig = {
- button: buttonValues.Y | buttonValues.DL,
+ button: buttonValues.Y | buttonValues.DU,
};
export function getConfig() {
return {
@@ -26,27 +57,11 @@ export function getConfig() {
}
export default function codegen(version) {
const { button } = getConfig();
- let code;
- switch (version) {
- case 'GMSJ01':
- code = `
-c20eafa0 00000009
-3c608040 a0a30d50
-2805${button.toString(16).padStart(4, '0')} 40a20030
-3c60817f 38a00001
-98a300b3 98a30100
-3c60803e 80a3600e
-90a36012 3c60800e
-6063b3f8 7c6803a6
-4e800020 2c000002
-60000000 00000000
-`;
- if (button & buttonValues.Z) {
- code += '\n040eb024 60000000';
- }
- break;
- default:
- return '';
+ const g = baseCodes[version];
+ if (g == null) return '';
+ let code = g(button.toString(16).padStart(4, '0'));
+ if (button & buttonValues.Z) {
+ code += zCodes[version];
}
return code.replace(/\s/g, '');
}
diff --git a/site/.vuepress/components/codes/qft/code/GMSJ01.js b/site/.vuepress/components/codes/qft/code/GMSJ01.js
index 2fe3718..afe2da5 100644
--- a/site/.vuepress/components/codes/qft/code/GMSJ01.js
+++ b/site/.vuepress/components/codes/qft/code/GMSJ01.js
@@ -9,7 +9,7 @@ export const freezeCodeInfo = {
blueCoin: { addr: 0x80196128, orig: 0x7c030378 },
item: { addr: 0x801971f8, orig: 0x8001001c },
talk: { addr: 0x800eb6e4, orig: 0x807f00b0 },
- demo: { addr: 0x800eb74c, orig: 0x806da8b0 },
+ demo: { addr: 0x800eb760, orig: 0x88e7013c },
cleaned: { addr: 0x8017a3c0, orig: 0x80010044 },
bowser: { addr: 0x801d3c78, orig: 0x2c1d0003 },
};
diff --git a/site/.vuepress/components/codes/qft/code/GMSJ0A.js b/site/.vuepress/components/codes/qft/code/GMSJ0A.js
index 82c473b..d5836a5 100644
--- a/site/.vuepress/components/codes/qft/code/GMSJ0A.js
+++ b/site/.vuepress/components/codes/qft/code/GMSJ0A.js
@@ -4,49 +4,53 @@ export const r13off = -0x6188;
* @type {{[key: string]: {addr: number, orig: number}}}
*/
export const freezeCodeInfo = {
+ yellowCoin: { addr: 0x8019ea3c, orig: 0x8805000e },
redCoin: { addr: 0x8019e1fc, orig: 0x38a00000 },
blueCoin: { addr: 0x8019e010, orig: 0x7c030378 },
+ item: { addr: 0x8019f13c, orig: 0x8001001c },
+ talk: { addr: 0x80277dd0, orig: 0x807f00b0 },
+ demo: { addr: 0x80277e4c, orig: 0x88e7013c },
+ cleaned: { addr: 0x801f5af8, orig: 0x80010044 },
+ bowser: { addr: 0x801dbe48, orig: 0x2c1d0003 },
};
export const baseCode = `
-C2279570 0000000B
+C2279570 00000005
981A0260 3CE0817F
880700B3 2C000000
38000000 900700BC
4182000C B00700B2
-900700B4 60E30110
-38800000 60E50094
-80CD9E88 80C60048
-60E700A4 39000002
-39200000 3D80802B
-618C0058 7D8803A6
-4E800021 00000000
-C21252A4 0000001B
-3C60817F 888300B2
-810300B4 2C040000
-40A20030 808300BC
-2C040000 40A20010
-810D9E78 8108005C
-48000010 3884FFFF
-908300BC 810300B8
-800300B4 7D080214
-3CE0000A 60E7F9B0
-7C074000 40A00010
-7CE83B78 98E300B2
-90E300B4 1D0803E9
+900700B4 00000000
+C21252A4 0000001F
+3C60817F 6064011C
+38630094 3D808012
+398C1660 7D8803A6
+4E800021 3C60817F
+888300B2 810300B4
+2C040000 40820030
+808300BC 2C040000
+40820010 810D9E78
+8108005C 48000010
+3884FFFF 908300BC
+810300B8 800300B4
+7D080214 3CE0000A
+60E7F9B0 7C074000
+40800010 7CE83B78
+98E300B2 90E300B4
+3C60817F 1D0803E9
38000078 7D080396
-380003E8 7CE80396
-7C0701D6 7D004050
-3800003C 7CC70396
-7C0601D6 7CE03850
-38A300A4 3880000F
-80630210 4CC63182
-3D808031 618C90A4
-7D8803A6 4E800021
-3C60817F 60630110
-38800000 38A00000
-38C10BEC 38E00081
-3D80802A 618CF5B8
+9421FFF0 380003E8
+7CE80396 7C0701D6
+7D004050 91010008
+3800003C 7D270396
+7C0901D6 7D403850
+80E30118 390300A4
+80C30114 3D80817F
+80A30110 618C0238
+808300A0 7D8803A6
+80630094 4E800021
+38210010 38610E90
+3D80802D 398CAECC
7D8803A6 4E800021
881F0046 00000000
C227C214 00000005
@@ -85,9 +89,4 @@ C227A01C 00000005
5400003A 900500B8
3800FFFF 900500BC
60000000 00000000
-077F0094 0000001D
-00000010 000001A0
-00000280 000001E0
-25753A25 3032752E
-25303375 00000000
`;
diff --git a/site/.vuepress/components/codes/qft/codegen.js b/site/.vuepress/components/codes/qft/codegen.js
index c1e77a3..3540027 100644
--- a/site/.vuepress/components/codes/qft/codegen.js
+++ b/site/.vuepress/components/codes/qft/codegen.js
@@ -163,8 +163,8 @@ export default function codegen(version) {
code += [...code04, ...code07].map(int32).join('');
}
- // ui (GMSJ01 only)
- if (['GMSJ01'].includes(version)) {
+ // ui (GMSJ01/GMSJ0A only)
+ if (['GMSJ01', 'GMSJ0A'].includes(version)) {
/* bounds */
const { x, y, fontSize, width } = config;
const scale = fontSize / 20;
diff --git a/site/.vuepress/components/codes/qft/config.vue b/site/.vuepress/components/codes/qft/config.vue
index 1a606af..5d0549f 100644
--- a/site/.vuepress/components/codes/qft/config.vue
+++ b/site/.vuepress/components/codes/qft/config.vue
@@ -1,6 +1,6 @@