Difference between revisions of "Set r5 as New Variable Value"
Jump to navigation
Jump to search
(Change all the opcodes (lines was 13b590 to 13b640)) |
|||
Line 3: | Line 3: | ||
0013b644: 27bdffe0 addiu r29,r29,0xffe0 | 0013b644: 27bdffe0 addiu r29,r29,0xffe0 | ||
0013b648: afb00010 sw r16,0x0010(r29) | 0013b648: afb00010 sw r16,0x0010(r29) | ||
− | 0013b64c: 00808021 addu r16,r4,r0 | + | 0013b64c: 00808021 addu r16,r4,r0 // input command byte |
0013b650: afb10014 sw r17,0x0014(r29) | 0013b650: afb10014 sw r17,0x0014(r29) | ||
0013b654: 3c028016 lui r2,0x8016 | 0013b654: 3c028016 lui r2,0x8016 | ||
− | 0013b658: 8c425f9c lw r2,0x5f9c(r2) | + | 0013b658: 8c425f9c lw r2,0x5f9c(r2) // pointer to map data(?) |
− | 0013b65c: 3403002c ori r3,r0,0x002c | + | 0013b65c: 3403002c ori r3,r0,0x002c // r3 = 0x2c |
0013b660: afbf001c sw r31,0x001c(r29) | 0013b660: afbf001c sw r31,0x001c(r29) | ||
0013b664: afb20018 sw r18,0x0018(r29) | 0013b664: afb20018 sw r18,0x0018(r29) | ||
0013b668: 8c520000 lw r18,0x0000(r2) | 0013b668: 8c520000 lw r18,0x0000(r2) | ||
− | 0013b66c: 16030008 bne r16,r3,0x0013b690 | + | 0013b66c: 16030008 bne r16,r3,0x0013b690 // branch if input command is not 0x2c |
− | 0013b670: 00a08821 addu r17,r5,r0 | + | 0013b670: 00a08821 addu r17,r5,r0 // r17 = secondary input |
0013b674: 3c0205f5 lui r2,0x05f5 | 0013b674: 3c0205f5 lui r2,0x05f5 | ||
0013b678: 3442e0ff ori r2,r2,0xe0ff | 0013b678: 3442e0ff ori r2,r2,0xe0ff | ||
− | 0013b67c: 0051102a slt r2,r2,r17 | + | 0013b67c: 0051102a slt r2,r2,r17 // r2 = true if secondary < 0x05f5e0ff (... what) |
− | 0013b680: 10400004 beq r2,r0,0x0013b694 | + | 0013b680: 10400004 beq r2,r0,0x0013b694 // branch if false |
− | 0013b684: 340400be ori r4,r0,0x00be | + | 0013b684: 340400be ori r4,r0,0x00be // r4 = 0xbe |
0013b688: 3c1105f5 lui r17,0x05f5 | 0013b688: 3c1105f5 lui r17,0x05f5 | ||
− | 0013b68c: 3631e0ff ori r17,r17,0xe0ff | + | 0013b68c: 3631e0ff ori r17,r17,0xe0ff // r17 = 0x05f5e0ff |
− | 0013b690: 340400be ori r4,r0,0x00be | + | 0013b690: 340400be ori r4,r0,0x00be // r4 = 0xbe again |
− | 0013b694: 02002821 addu r5,r16,r0 | + | 0013b694: 02002821 addu r5,r16,r0 // r5 = input command byte |
− | 0013b698: 00003021 addu r6,r0,r0 | + | 0013b698: 00003021 addu r6,r0,r0 // r6 = 0 |
0013b69c: 0c052806 jal 0x0014a018 | 0013b69c: 0c052806 jal 0x0014a018 | ||
− | 0013b6a0: 00003821 addu r7,r0,r0 | + | 0013b6a0: 00003821 addu r7,r0,r0 // r7 = 0 |
0013b6a4: 340400b0 ori r4,r0,0x00b0 | 0013b6a4: 340400b0 ori r4,r0,0x00b0 | ||
0013b6a8: 02002821 addu r5,r16,r0 | 0013b6a8: 02002821 addu r5,r16,r0 | ||
Line 33: | Line 33: | ||
0013b6bc: 8c425f9c lw r2,0x5f9c(r2) | 0013b6bc: 8c425f9c lw r2,0x5f9c(r2) | ||
0013b6c0: 00000000 nop | 0013b6c0: 00000000 nop | ||
− | 0013b6c4: ac520000 sw r18,0x0000(r2) | + | 0013b6c4: ac520000 sw r18,0x0000(r2) // preserve old map data value (above can't change weather?) |
0013b6c8: 8fbf001c lw r31,0x001c(r29) | 0013b6c8: 8fbf001c lw r31,0x001c(r29) | ||
0013b6cc: 8fb20018 lw r18,0x0018(r29) | 0013b6cc: 8fb20018 lw r18,0x0018(r29) |
Revision as of 08:28, 1 January 2022
0013b644: 27bdffe0 addiu r29,r29,0xffe0 0013b648: afb00010 sw r16,0x0010(r29) 0013b64c: 00808021 addu r16,r4,r0 // input command byte 0013b650: afb10014 sw r17,0x0014(r29) 0013b654: 3c028016 lui r2,0x8016 0013b658: 8c425f9c lw r2,0x5f9c(r2) // pointer to map data(?) 0013b65c: 3403002c ori r3,r0,0x002c // r3 = 0x2c 0013b660: afbf001c sw r31,0x001c(r29) 0013b664: afb20018 sw r18,0x0018(r29) 0013b668: 8c520000 lw r18,0x0000(r2) 0013b66c: 16030008 bne r16,r3,0x0013b690 // branch if input command is not 0x2c 0013b670: 00a08821 addu r17,r5,r0 // r17 = secondary input 0013b674: 3c0205f5 lui r2,0x05f5 0013b678: 3442e0ff ori r2,r2,0xe0ff 0013b67c: 0051102a slt r2,r2,r17 // r2 = true if secondary < 0x05f5e0ff (... what) 0013b680: 10400004 beq r2,r0,0x0013b694 // branch if false 0013b684: 340400be ori r4,r0,0x00be // r4 = 0xbe 0013b688: 3c1105f5 lui r17,0x05f5 0013b68c: 3631e0ff ori r17,r17,0xe0ff // r17 = 0x05f5e0ff 0013b690: 340400be ori r4,r0,0x00be // r4 = 0xbe again 0013b694: 02002821 addu r5,r16,r0 // r5 = input command byte 0013b698: 00003021 addu r6,r0,r0 // r6 = 0 0013b69c: 0c052806 jal 0x0014a018 0013b6a0: 00003821 addu r7,r0,r0 // r7 = 0 0013b6a4: 340400b0 ori r4,r0,0x00b0 0013b6a8: 02002821 addu r5,r16,r0 0013b6ac: 02203021 addu r6,r17,r0 0013b6b0: 0c052806 jal 0x0014a018 0013b6b4: 00003821 addu r7,r0,r0 0013b6b8: 3c028016 lui r2,0x8016 0013b6bc: 8c425f9c lw r2,0x5f9c(r2) 0013b6c0: 00000000 nop 0013b6c4: ac520000 sw r18,0x0000(r2) // preserve old map data value (above can't change weather?) 0013b6c8: 8fbf001c lw r31,0x001c(r29) 0013b6cc: 8fb20018 lw r18,0x0018(r29) 0013b6d0: 8fb10014 lw r17,0x0014(r29) 0013b6d4: 8fb00010 lw r16,0x0010(r29) 0013b6d8: 27bd0020 addiu r29,r29,0x0020 0013b6dc: 03e00008 jr r31 0013b6e0: 00000000 nop