fixed stage loader and added warps
This commit is contained in:
parent
104835a73b
commit
cd1e8da44a
3 changed files with 34 additions and 18 deletions
|
@ -1,5 +1,16 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<updates>
|
<updates>
|
||||||
|
<update>
|
||||||
|
<date>Feb 28, 2018</date>
|
||||||
|
<change>
|
||||||
|
<head>Fixed Stage Loader.</head>
|
||||||
|
<paragraph>The previous version didn’t reset properly after the first use if the route ending was the title screen, and reloaded the last level upon exiting area in Corona.</paragraph>
|
||||||
|
</change>
|
||||||
|
<change>
|
||||||
|
<head>Added new stages to the loader.</head>
|
||||||
|
<paragraph>You can now select the Gooper Blooper fight from Ricco 1, the rollercoaster ride from Pinna 8, the King Boo fight from Sirena 5, the bottle from Noki 3 and the underwater area from Noki 8.</paragraph>
|
||||||
|
</change>
|
||||||
|
</update>
|
||||||
<update>
|
<update>
|
||||||
<date>Feb 16, 2018</date>
|
<date>Feb 16, 2018</date>
|
||||||
<change>
|
<change>
|
||||||
|
|
|
@ -361,13 +361,14 @@ function getFastCode() {
|
||||||
let game = JSON.parse(atob(document.getElementById("route_levels").getAttribute("data-json")));
|
let game = JSON.parse(atob(document.getElementById("route_levels").getAttribute("data-json")));
|
||||||
const order = document.getElementById("route_order").value;
|
const order = document.getElementById("route_order").value;
|
||||||
const ending = document.getElementById("route_ending").value;
|
const ending = document.getElementById("route_ending").value;
|
||||||
const branchBase = 0x1C + 0x24 * (order !== 'list');
|
const branchBase = 0x18 + 0x24 * (order !== 'list');
|
||||||
const asm = [];
|
const asm = [];
|
||||||
asm.push("48" + ("00000" + (Math.ceil(levelCodes.length / 2) + 1 << 2 | 1).toString(16).toUpperCase()).slice(-6)); // bl to the code
|
asm.push("48" + ("00000" + (Math.ceil(levelCodes.length / 2) + 1 << 2 | 1).toString(16).toUpperCase()).slice(-6)); // bl code
|
||||||
for (let i = levelCodes.length - 1; i >= 0; i -= 2) {
|
for (let i = levelCodes.length - 1; i >= 0; i -= 2) {
|
||||||
asm.push(levelCodes[i] + (levelCodes[i - 1] || "0000"));
|
asm.push(levelCodes[i] + (levelCodes[i - 1] || "0000"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// code:
|
||||||
//Timer compatibility
|
//Timer compatibility
|
||||||
asm.push("3C80817F"); // lis r4, 0x817F
|
asm.push("3C80817F"); // lis r4, 0x817F
|
||||||
asm.push("38000000"); // li r0, 0
|
asm.push("38000000"); // li r0, 0
|
||||||
|
@ -376,15 +377,8 @@ function getFastCode() {
|
||||||
asm.push("98040101"); // stb r0, 0x0101(r4)
|
asm.push("98040101"); // stb r0, 0x0101(r4)
|
||||||
|
|
||||||
asm.push("887F0012"); // lbz r3, 0x12(r31)
|
asm.push("887F0012"); // lbz r3, 0x12(r31)
|
||||||
|
|
||||||
asm.push("2C03000F"); // cmpwi r3, 15
|
|
||||||
asm.push("40820010"); // bne- 0x10
|
|
||||||
asm.push("3800" + ("000" + ((levelCodes.length - (order === 'random')) * 2).toString(16).toUpperCase()).slice(-4)); // li r0, length
|
|
||||||
asm.push("90040000"); // stw r0, 0(r4)
|
|
||||||
asm.push("4800" + ("000" + (branchBase + 0x3C).toString(16).toUpperCase()).slice(-4)); // b done
|
|
||||||
|
|
||||||
asm.push("2C030001"); // cmpwi r3, 1
|
asm.push("2C030001"); // cmpwi r3, 1
|
||||||
asm.push("4181" + ("000" + (branchBase + 0x34).toString(16).toUpperCase()).slice(-4)); // bgt- done
|
asm.push("4181" + ("000" + (branchBase + 0x48).toString(16).toUpperCase()).slice(-4)); // bgt- done
|
||||||
|
|
||||||
asm.push("98040100"); // stb r0, 0x0100(r4)
|
asm.push("98040100"); // stb r0, 0x0100(r4)
|
||||||
|
|
||||||
|
@ -394,7 +388,12 @@ function getFastCode() {
|
||||||
|
|
||||||
asm.push("881F000E"); // lbz r0, 0x0E(r31)
|
asm.push("881F000E"); // lbz r0, 0x0E(r31)
|
||||||
asm.push("2C00000F"); // cmpwi r0, 15
|
asm.push("2C00000F"); // cmpwi r0, 15
|
||||||
asm.push("41820010"); // beq- 0x10
|
asm.push("40820010"); // bne- 0x10
|
||||||
|
asm.push("3860" + ("000" + ((levelCodes.length - (order === 'random')) * 2).toString(16).toUpperCase()).slice(-4)); // li r3, length
|
||||||
|
asm.push("90640000"); // stw r3, 0(r4)
|
||||||
|
asm.push("48000018"); // b 0x18
|
||||||
|
asm.push("2C030000"); // cmpwi r3, 0
|
||||||
|
asm.push("4180" + ("000" + (0x1C + 0x14 * (order !== "list")).toString(16).toUpperCase()).slice(-4)); // blt- loadEnding
|
||||||
asm.push("880500CC"); // lbz r0, 0xCC(r5)
|
asm.push("880500CC"); // lbz r0, 0xCC(r5)
|
||||||
asm.push("54000673"); // rlwinm. r0, r0, 0, 25, 25
|
asm.push("54000673"); // rlwinm. r0, r0, 0, 25, 25
|
||||||
asm.push("4182" + ("000" + branchBase.toString(16).toUpperCase()).slice(-4)); // beq- loadIndex
|
asm.push("4182" + ("000" + branchBase.toString(16).toUpperCase()).slice(-4)); // beq- loadIndex
|
||||||
|
@ -403,11 +402,6 @@ function getFastCode() {
|
||||||
asm.push("38630002"); // addi r3, r3, 2
|
asm.push("38630002"); // addi r3, r3, 2
|
||||||
}
|
}
|
||||||
|
|
||||||
asm.push("2C030000"); // cmpwi r3, 0
|
|
||||||
asm.push("4181000C"); // bgt- 0x0C
|
|
||||||
asm.push("3860" + ending); // li r3, ending
|
|
||||||
asm.push("4800" + ("000" + (branchBase - 0x10 + 4 * (order !== "random")).toString(16).toUpperCase()).slice(-4)); // b loadStage
|
|
||||||
|
|
||||||
if (order !== "list") {
|
if (order !== "list") {
|
||||||
asm.push("7CEC42E6"); // mftbl r7
|
asm.push("7CEC42E6"); // mftbl r7
|
||||||
asm.push("7C071B96"); // divwu r0, r7, r3
|
asm.push("7C071B96"); // divwu r0, r7, r3
|
||||||
|
@ -416,11 +410,17 @@ function getFastCode() {
|
||||||
asm.push("54E7003C"); // rlwinm r7, r7, 0, 0, 30
|
asm.push("54E7003C"); // rlwinm r7, r7, 0, 0, 30
|
||||||
}
|
}
|
||||||
|
|
||||||
asm.push("3863FFFE"); // subi r3, r3, 2
|
asm.push("3463FFFE"); // subic. r3, r3, 2
|
||||||
if (order !== "random") {
|
if (order !== "random") {
|
||||||
asm.push("90640000"); // stw r3, 0(r4)
|
asm.push("90640000"); // stw r3, 0(r4)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
asm.push("4080000C"); // bge- 0xC
|
||||||
|
|
||||||
|
// loadEnding:
|
||||||
|
asm.push("3860" + ending); // li r3, ending
|
||||||
|
asm.push("4800" + ("000" + (0x8 + 0x10 * (order !== "list")).toString(16).toUpperCase()).slice(-4)); // b loadStage
|
||||||
|
|
||||||
if (order !== "list") {
|
if (order !== "list") {
|
||||||
asm.push("7C061A2E"); // lhzx r0, r6, r3
|
asm.push("7C061A2E"); // lhzx r0, r6, r3
|
||||||
asm.push("7C863A2E"); // lhzx r4, r6, r7
|
asm.push("7C863A2E"); // lhzx r4, r6, r7
|
||||||
|
|
|
@ -216,13 +216,18 @@
|
||||||
<option value="2A00">Pianta 5 secret</option>
|
<option value="2A00">Pianta 5 secret</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
<optgroup label="Sublevels">
|
<optgroup label="Sublevels">
|
||||||
<option value="3700">Windmill (Bianco 2)</option>
|
<option value="3700">Petey Piranha fight (Bianco 2)</option>
|
||||||
|
<option value="3B00">Gooper Blooper fight (Ricco 1)</option>
|
||||||
<option value="1E00">Race course (Ricco 2)</option>
|
<option value="1E00">Race course (Ricco 2)</option>
|
||||||
<option value="2100">Sand bird (Gelato 4)</option>
|
<option value="2100">Sand bird (Gelato 4)</option>
|
||||||
<option value="3A01">Mecha-Bowser fight (Pinna 1)</option>
|
<option value="3A01">Mecha-Bowser fight (Pinna 1)</option>
|
||||||
|
<option value="3A00">Rollercoaster (Pinna 8)</option>
|
||||||
<option value="0E00">Casino Delfino (Sirena 4)</option>
|
<option value="0E00">Casino Delfino (Sirena 4)</option>
|
||||||
<option value="0E01">Casino Delfino (Sirena 5)</option>
|
<option value="0E01">Casino Delfino (Sirena 5)</option>
|
||||||
|
<option value="3800">King Boo fight (Sirena 5)</option>
|
||||||
|
<option value="2C00">Bottle (Noki 3)</option>
|
||||||
<option value="3900">Deep Sea of Mare (Noki 4)</option>
|
<option value="3900">Deep Sea of Mare (Noki 4)</option>
|
||||||
|
<option value="1000">Deep Sea of Mare (Noki 8)</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</select>
|
</select>
|
||||||
<button type="button" class="route_remove">×</button>
|
<button type="button" class="route_remove">×</button>
|
||||||
|
|
Loading…
Reference in a new issue