diff --git a/Codes.xml b/Codes.xml
index 01a45e7..8be5ed8 100644
--- a/Codes.xml
+++ b/Codes.xml
@@ -4772,57 +4772,314 @@
lib
GCILoader
GCI Loader
- sup39(サポミク)
- 0.2
- Nov 16, 2022
+ sup39(サポミク), Psychonauter
+ 0.3
+ Feb 10, 2023
Execute Gecko code loaded from GCI file.
::: warning
You will need to reset the game if you hotplug your memory card
:::
+
+
+
diff --git a/changelog.md b/changelog.md
index 4d915e1..3c1480a 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,7 @@
# Changelog
+## Feb 10, 2023
+Ported GCI Loader to all versions
+
## Feb 08, 2023
### Updated 'Instant Level Select'
Overwrite button input value to prevent Level Select being activated when AreaLock is enabled
diff --git a/site/.vuepress/components/DownloadButton.vue b/site/.vuepress/components/DownloadButton.vue
index 5ca7cff..62ec7df 100644
--- a/site/.vuepress/components/DownloadButton.vue
+++ b/site/.vuepress/components/DownloadButton.vue
@@ -60,7 +60,7 @@ export default {
]);
} catch {}
- const fileName = gameVersions.find((v) => v.identifier === this.versionIdentifier).version;
+ const version = gameVersions.find((v) => v.identifier === this.versionIdentifier).version;
// apply customizable codes
for (const code of codeList) {
@@ -76,30 +76,30 @@ export default {
switch (this.format) {
case 'gct':
this.alertGCTCodeSize(codeSize);
- this.generateGCT(codeList, fileName);
+ this.generateGCT(codeList, version);
break;
case 'dolphin':
this.alertDolphinCodeSize(codeSize);
- this.generateDolphinINI(codeList, fileName);
+ this.generateDolphinINI(codeList, version);
break;
case 'gcm':
this.alertDolphinCodeSize(codeSize);
- this.generateCheatManagerTXT(codeList, fileName);
+ this.generateCheatManagerTXT(codeList, version);
break;
case 'gci+gct':
- this.generateGCI(c, fileName) &&
- this.generateGCT(this.getGCILoader(), fileName);
+ this.generateGCI(codeList, version) &&
+ this.generateGCT(this.getGCILoader(), version);
break;
case 'gci+dolphin':
- this.generateGCI(c, fileName) &&
- this.generateDolphinINI(this.getGCILoader(), fileName);
+ this.generateGCI(codeList, version) &&
+ this.generateDolphinINI(this.getGCILoader(), version);
break;
case 'gci+gcm':
- this.generateGCI(c, fileName) &&
- this.generateCheatManagerTXT(this.getGCILoader(), fileName);
+ this.generateGCI(codeList, version) &&
+ this.generateCheatManagerTXT(this.getGCILoader(), version);
break;
case 'gci':
- this.generateGCI(c, fileName);
+ this.generateGCI(codeList, version);
break;
}
},
@@ -168,33 +168,31 @@ export default {
this.downloadFile(data, `${version}.txt`);
},
generateGCI(codes, version) {
- if (!['GMSJ01'].includes(version)) {
- alert('GCI format is not yet supported for versions other than GMSJ01');
- return false; // error
- }
- let code = '00D0C0DE00D0C0DE';
+ let code = '';
codes.forEach((c) => (code += c.source));
- code += 'C0000000000000023C60818081E3A7FC7DE478504E800020'; // return
+ code += 'C0000000000000023C60817F81E317FC7DE478504E800020'; // return
+ const codeSize = code.length>>1;
- const blockCount = 2; // TODO
- const gciSize = 0x40+0x2000*blockCount;
- const padSize = 0x40; // TODO
- let rawData = new Uint8Array(gciSize);
+ const fileName = `GCT_${version}`;
+ const blockCount = 6; // Math.ceil(codeSize/0x2000);
+ const headSize = 0x40;
+ const gciSize = headSize+0x2000*blockCount;
+ const rawData = new Uint8Array(gciSize);
- for (let iD=padSize, iC=0; iD rawData[i] = e);
// file name
- [...new TextEncoder().encode('gct')].forEach((e, i) => rawData[0x8+i] = e);
+ [...new TextEncoder().encode(fileName)].forEach((e, i) => rawData[0x8+i] = e);
// block count
rawData[0x39] = blockCount;
// ff*6
for (let i=0x3A; i<0x40; i++) rawData[i] = 0xff;
- this.downloadFile(rawData, `01-${version.slice(0, 4)}-gct.gci`);
+ this.downloadFile(rawData, `01-${version.slice(0, 4)}-${fileName}.gci`);
return true; // good
},
downloadFile(data, filename) {
diff --git a/site/de/code-reference/index.md b/site/de/code-reference/index.md
index 1d77685..5bd94ed 100644
--- a/site/de/code-reference/index.md
+++ b/site/de/code-reference/index.md
@@ -5,4 +5,4 @@ editLink: false
# Code Referenz
-
+
\ No newline at end of file
diff --git a/site/fr/code-reference/index.md b/site/fr/code-reference/index.md
index 8a1900d..59b5403 100644
--- a/site/fr/code-reference/index.md
+++ b/site/fr/code-reference/index.md
@@ -5,4 +5,4 @@ editLink: false
# Référence des codes
-
+
\ No newline at end of file
diff --git a/site/ja/code-reference/index.md b/site/ja/code-reference/index.md
index 4e1fd7e..812ede9 100644
--- a/site/ja/code-reference/index.md
+++ b/site/ja/code-reference/index.md
@@ -5,4 +5,4 @@ editLink: false
# チートコード一覧
-
+
\ No newline at end of file