diff --git a/Codes.xml b/Codes.xml index eb51244..3ba2ce8 100644 --- a/Codes.xml +++ b/Codes.xml @@ -1237,12 +1237,14 @@
diff --git a/changelog.md b/changelog.md
index b8e99aa..9f90d61 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,10 @@
# Changelog
+
+## Dec 16, 2022
+### Updated 'Quarterframe Timer'
+- Gave the timer a 1 frame headstart to make it more accurate to SGT and IL retiming rules
+- Ported the customizable visuals and freeze conditions to the US and PAL versions
+
## Nov 19, 2022
Added `CAngle` for 'Customized Display' to show camera angle
diff --git a/site/.vuepress/components/DownloadButton.vue b/site/.vuepress/components/DownloadButton.vue
index 36e1a08..59bd55b 100644
--- a/site/.vuepress/components/DownloadButton.vue
+++ b/site/.vuepress/components/DownloadButton.vue
@@ -66,12 +66,12 @@ export default {
for (const code of c) {
const codegen = codegens[code.id];
if (codegen) {
- code.source = codegen(this.versionIdentifier);
+ code.source = codegen(this.versionIdentifier, code.source);
}
}
// generate file
- const codeSize = c.reduce((a, e) => a+e.source.length, 0)/2 + 16; // 8(00D0)+8(F000)
+ const codeSize = c.reduce((a, e) => a + e.source.length, 0) / 2 + 16; // 8(00D0)+8(F000)
// console.log(codeSize, c);
switch (this.format) {
case 'gct':
@@ -94,9 +94,12 @@ export default {
}
},
alertDolphinCodeSize(size) {
- if (size > 3272) { // 0x3000-0x2338
+ if (size > 3272) {
+ // 0x3000-0x2338
// excluding header+footer
- alert(translate('generatorconfig.alert.dolphin', this.$lang).replaceAll('{size}', size-16));
+ alert(
+ translate('generatorconfig.alert.dolphin', this.$lang).replaceAll('{size}', size - 16),
+ );
}
},
generateGCT(codes, version) {
diff --git a/site/.vuepress/components/codes/qft/code/GMSE01.js b/site/.vuepress/components/codes/qft/code/GMSE01.js
index 7d9ec9c..0f2fc53 100644
--- a/site/.vuepress/components/codes/qft/code/GMSE01.js
+++ b/site/.vuepress/components/codes/qft/code/GMSE01.js
@@ -4,90 +4,12 @@ export const r13off = -0x6048;
* @type {{[key: string]: {addr: number, orig: number}}}
*/
export const freezeCodeInfo = {
+ yellowCoin: { addr: 0x801becb4, orig: 0x8805000e },
redCoin: { addr: 0x801be474, orig: 0x38a00000 },
blueCoin: { addr: 0x801be288, orig: 0x7c030378 },
+ item: { addr: 0x801bf3b4, orig: 0x8001001c },
+ talk: { addr: 0x80298128, orig: 0x807f00b0 },
+ demo: { addr: 0x802981a4, orig: 0x88e7013c },
+ cleaned: { addr: 0x80215c58, orig: 0x80010044 },
+ bowser: { addr: 0x801fc0a4, orig: 0x2c1d0003 },
};
-
-export const baseCode = `
-C22998C0 0000000B
-981A0260 3CE0817F
-880700B3 2C000000
-38000000 900700BC
-4182000C B00700B2
-900700B4 60E30110
-38800000 60E50094
-80CD9FC8 80C60048
-60E700A4 39000002
-39200000 3D80802D
-618C0848 7D8803A6
-4E800021 00000000
-C2143F18 0000001B
-3C60817F 888300B2
-810300B4 2C040000
-40A20030 808300BC
-2C040000 40A20010
-810D9FB8 8108005C
-48000010 3884FFFF
-908300BC 810300B8
-800300B4 7D080214
-3CE0000A 60E7F9B0
-7C074000 40A00010
-7CE83B78 98E300B2
-90E300B4 1D0803E9
-38000078 7D080396
-380003E8 7CE80396
-7C0701D6 7D004050
-3800003C 7CC70396
-7C0601D6 7CE03850
-38A300A4 3880000F
-80630210 4CC63182
-3D808033 618C97A4
-7D8803A6 4E800021
-3C60817F 60630110
-38800000 38A00000
-38C10BD0 38E00081
-3D80802C 618CFDA8
-7D8803A6 4E800021
-881F0046 00000000
-C229C520 00000005
-3CA0817F A00500B2
-2C000000 40820014
-800500B4 80C3005C
-7C003214 900500B4
-7C0802A6 00000000
-C229A5AC 00000005
-3CA0817F 80C500B4
-8003005C 7CC60214
-38C60004 54C6003A
-90C500B4 38C0FFFF
-B0C500B2 00000000
-C21FA380 00000005
-3D00817F 80C800B4
-8003005C 7CC60214
-38C60004 54C6003A
-90C800B4 38C0FFFF
-B0C800B2 00000000
-C2164E24 00000002
-2C030001 3C60817F
-98A300B3 00000000
-C229880C 00000002
-389C0001 3CA0817F
-988500B3 00000000
-C22991A8 00000005
-3CA0817F 38600001
-986500B3 807F005C
-38630003 5463003A
-906500B8 3860FFFF
-906500BC 00000000
-C229A36C 00000005
-3CA0817F 980500B3
-801E005C 30000004
-5400003A 900500B8
-3800FFFF 900500BC
-60000000 00000000
-077F0094 0000001D
-00000010 000001A0
-00000280 000001E0
-25753A25 3032752E
-25303375 00000000
-`;
diff --git a/site/.vuepress/components/codes/qft/code/GMSJ01.js b/site/.vuepress/components/codes/qft/code/GMSJ01.js
index afe2da5..861c986 100644
--- a/site/.vuepress/components/codes/qft/code/GMSJ01.js
+++ b/site/.vuepress/components/codes/qft/code/GMSJ01.js
@@ -13,80 +13,3 @@ export const freezeCodeInfo = {
cleaned: { addr: 0x8017a3c0, orig: 0x80010044 },
bowser: { addr: 0x801d3c78, orig: 0x2c1d0003 },
};
-
-export const baseCode = `
-C20ECE44 00000005
-981A0260 3CE0817F
-880700B3 2C000000
-38000000 900700BC
-4182000C B00700B2
-900700B4 00000000
-C2206738 0000001F
-3C60817F 6064011C
-38630094 3D808020
-398C1EA8 7D8803A6
-4E800021 3C60817F
-888300B2 810300B4
-2C040000 40820030
-808300BC 2C040000
-40820010 810D97E8
-8108005C 48000010
-3884FFFF 908300BC
-810300B8 800300B4
-7D080214 3CE0000A
-60E7F9B0 7C074000
-40800010 7CE83B78
-98E300B2 90E300B4
-3C60817F 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 00000000
-C20EFA30 00000005
-3CA0817F A00500B2
-2C000000 40820014
-800500B4 80C3005C
-7C003214 900500B4
-7C0802A6 00000000
-C20EDB30 00000005
-3CA0817F 80C500B4
-8003005C 7CC60214
-38C60004 54C6003A
-90C500B4 38C0FFFF
-B0C500B2 00000000
-C21D1F38 00000005
-3D00817F 80C800B4
-8003005C 7CC60214
-38C60004 54C6003A
-90C800B4 38C0FFFF
-B0C800B2 00000000
-C22257CC 00000002
-2C030001 3C60817F
-98A300B3 00000000
-C20EBD78 00000002
-389C0001 3CA0817F
-988500B3 00000000
-C20EC72C 00000005
-3CA0817F 38600001
-986500B3 807F005C
-38630003 5463003A
-906500B8 3860FFFF
-906500BC 00000000
-C20ED8F0 00000005
-3CA0817F 980500B3
-801E005C 30000004
-5400003A 900500B8
-3800FFFF 900500BC
-60000000 00000000
-`;
diff --git a/site/.vuepress/components/codes/qft/code/GMSJ0A.js b/site/.vuepress/components/codes/qft/code/GMSJ0A.js
index d5836a5..acb5ead 100644
--- a/site/.vuepress/components/codes/qft/code/GMSJ0A.js
+++ b/site/.vuepress/components/codes/qft/code/GMSJ0A.js
@@ -13,80 +13,3 @@ export const freezeCodeInfo = {
cleaned: { addr: 0x801f5af8, orig: 0x80010044 },
bowser: { addr: 0x801dbe48, orig: 0x2c1d0003 },
};
-
-export const baseCode = `
-C2279570 00000005
-981A0260 3CE0817F
-880700B3 2C000000
-38000000 900700BC
-4182000C B00700B2
-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
-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
-3CA0817F A00500B2
-2C000000 40820014
-800500B4 80C3005C
-7C003214 900500B4
-7C0802A6 00000000
-C227A298 00000005
-3CA0817F 80C500B4
-8003005C 7CC60214
-38C60004 54C6003A
-90C500B4 38C0FFFF
-B0C500B2 00000000
-C21DA0FC 00000005
-3D00817F 80C800B4
-8003005C 7CC60214
-38C60004 54C6003A
-90C800B4 38C0FFFF
-B0C800B2 00000000
-C2145EBC 00000002
-2C030001 3C60817F
-98A300B3 00000000
-C22784B4 00000002
-389C0001 3CA0817F
-988500B3 00000000
-C2278E58 00000005
-3CA0817F 38600001
-986500B3 807F005C
-38630003 5463003A
-906500B8 3860FFFF
-906500BC 00000000
-C227A01C 00000005
-3CA0817F 980500B3
-801E005C 30000004
-5400003A 900500B8
-3800FFFF 900500BC
-60000000 00000000
-`;
diff --git a/site/.vuepress/components/codes/qft/code/GMSP01.js b/site/.vuepress/components/codes/qft/code/GMSP01.js
index 760a7ba..f92f273 100644
--- a/site/.vuepress/components/codes/qft/code/GMSP01.js
+++ b/site/.vuepress/components/codes/qft/code/GMSP01.js
@@ -4,90 +4,12 @@ export const r13off = -0x6120;
* @type {{[key: string]: {addr: number, orig: number}}}
*/
export const freezeCodeInfo = {
+ yellowCoin: { addr: 0x801b6b6c, orig: 0x8805000e },
redCoin: { addr: 0x801b632c, orig: 0x38a00000 },
blueCoin: { addr: 0x801b6140, orig: 0x7c030378 },
+ item: { addr: 0x801b726c, orig: 0x8001001c },
+ talk: { addr: 0x8028ffc0, orig: 0x807f00b0 },
+ demo: { addr: 0x8029003c, orig: 0x88e7013c },
+ cleaned: { addr: 0x8020db3c, orig: 0x80010044 },
+ bowser: { addr: 0x801f3f88, orig: 0x2c1d0003 },
};
-
-export const baseCode = `
-C2291758 0000000B
-981A0260 3CE0817F
-880700B3 2C000000
-38000000 900700BC
-4182000C B00700B2
-900700B4 60E30110
-38800000 60E50094
-80CD9EF0 80C60048
-60E700A4 39000002
-39200000 3D80802C
-618C89F0 7D8803A6
-4E800021 00000000
-C2138B54 0000001B
-3C60817F 888300B2
-810300B4 2C040000
-40A20030 808300BC
-2C040000 40A20010
-810D9EE0 8108005C
-48000010 3884FFFF
-908300BC 810300B8
-800300B4 7D080214
-3CE0000A 60E7F9B0
-7C074000 40A00010
-7CE83B78 98E300B2
-90E300B4 1D0803E9
-38000078 7D080396
-380003E8 7CE80396
-7C0701D6 7D004050
-3800003C 7CC70396
-7C0601D6 7CE03850
-38A300A4 3880000F
-80630210 4CC63182
-3D808033 618C1924
-7D8803A6 4E800021
-3C60817F 60630110
-38800000 38A00000
-38C10BE4 38E00081
-3D80802C 618C7F50
-7D8803A6 4E800021
-881F0046 00000000
-C22943FC 00000005
-3CA0817F A00500B2
-2C000000 40820014
-800500B4 80C3005C
-7C003214 900500B4
-7C0802A6 00000000
-C2292480 00000005
-3CA0817F 80C500B4
-8003005C 7CC60214
-38C60004 54C6003A
-90C500B4 38C0FFFF
-B0C500B2 00000000
-C21F2258 00000005
-3D00817F 80C800B4
-8003005C 7CC60214
-38C60004 54C6003A
-90C800B4 38C0FFFF
-B0C800B2 00000000
-C2159E9C 00000002
-2C030001 3C60817F
-98A300B3 00000000
-C22906A4 00000002
-389C0001 3CA0817F
-988500B3 00000000
-C2291040 00000005
-3CA0817F 38600001
-986500B3 807F005C
-38630003 5463003A
-906500B8 3860FFFF
-906500BC 00000000
-C2292204 00000005
-3CA0817F 980500B3
-801E005C 30000004
-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 fd8e01d..a726af6 100644
--- a/site/.vuepress/components/codes/qft/codegen.js
+++ b/site/.vuepress/components/codes/qft/codegen.js
@@ -67,11 +67,15 @@ export const codes = { GMSJ01, GMSE01, GMSP01, GMSJ0A };
bl 817fxxxx
****/
const freezeCodeAddr = 0x817f0348;
-/** @param {keyof typeof codes} version */
-export default function codegen(version) {
+/**
+ * @param {keyof typeof codes} version
+ * @param {string=} baseCode
+ */
+export default function codegen(version, baseCode) {
+ if (!baseCode) return '';
+
const config = getConfig();
- const { freezeCodeInfo, baseCode, r13off } = codes[version] ?? {};
- if (baseCode == null) return '';
+ const { freezeCodeInfo, r13off } = codes[version] ?? {};
let code = baseCode;
const { freezeDuration: frame } = config;
@@ -163,29 +167,27 @@ export default function codegen(version) {
code += [...code04, ...code07].map(inst2gecko).join('');
}
- // ui (GMSJ01/GMSJ0A only)
- if (['GMSJ01', 'GMSJ0A'].includes(version)) {
- /* bounds */
- const { x, y, fontSize, width } = config;
- const scale = fontSize / 20;
- code += '077F0094 0000001D';
- code += [
- x, // x1
- y - fontSize - 2, // y1
- x + width * scale, // x2
- y, // y2
- ]
- .map(inst2gecko)
- .join('');
- code += '25753a253032752e2530337500000000'; // fmt
- /* fontSize, fgColor, bgColor */
- code += '077F0110 00000010';
- const bgColor = (config.bgRGB & 0xffffff) * 256 + (config.bgA & 0xff);
- const fgColor = (config.fgRGB & 0xffffff) * 256 + (config.fgA & 0xff);
- const fgColor2 =
- ((config.fgRGB2 ?? config.fgRGB) & 0xffffff) * 256 + ((config.fgA2 ?? config.fgA) & 0xff);
- code += [fontSize, fgColor, fgColor2, bgColor].map(inst2gecko).join('');
- }
+ // ui
+ /* bounds */
+ const { x, y, fontSize, width } = config;
+ const scale = fontSize / 20;
+ code += '077F0094 0000001D';
+ code += [
+ x, // x1
+ y - fontSize - 2, // y1
+ x + width * scale, // x2
+ y, // y2
+ ]
+ .map(inst2gecko)
+ .join('');
+ code += '25753a253032752e2530337500000000'; // fmt
+ /* fontSize, fgColor, bgColor */
+ code += '077F0110 00000010';
+ const bgColor = (config.bgRGB & 0xffffff) * 256 + (config.bgA & 0xff);
+ const fgColor = (config.fgRGB & 0xffffff) * 256 + (config.fgA & 0xff);
+ const fgColor2 =
+ ((config.fgRGB2 ?? config.fgRGB) & 0xffffff) * 256 + ((config.fgA2 ?? config.fgA) & 0xff);
+ code += [fontSize, fgColor, fgColor2, bgColor].map(inst2gecko).join('');
return code.replace(/\s/g, '');
}
diff --git a/site/.vuepress/components/codes/qft/config.vue b/site/.vuepress/components/codes/qft/config.vue
index 958969e..d825c40 100644
--- a/site/.vuepress/components/codes/qft/config.vue
+++ b/site/.vuepress/components/codes/qft/config.vue
@@ -1,26 +1,32 @@
-
- {{l.h3}}
+
+ {{ l.h3 }}
- {{l.bgColor}}
- {{l.alpha}}/255={{(bgA/2.55).toFixed(1)}}%
+ {{ l.bgColor }}
+ {{ l.alpha }}/255={{ (bgA / 2.55).toFixed(1) }}%
- {{l.freeze.h3}}
+ {{ l.freeze.h3 }}
- {{l.freeze.duration}} {{l.freeze.frame}}
- = {{(freezeDuration*1001/30000).toFixed(2)}} {{l.freeze.sec}}
+ {{ l.freeze.duration }}
+ {{ l.freeze.frame }} = {{ ((freezeDuration * 1001) / 30000).toFixed(2) }} {{ l.freeze.sec }}
- {{l.freeze.rows[key]}}
-
+ {{ l.freeze.rows[key] }}
+
+
+
@@ -29,15 +35,27 @@