000ecf20 - 000ed100
Jump to navigation
Jump to search
000ecf20: 27bdfec8 addiu r29,r29,0xfec8 000ecf24: afbf0130 sw r31,0x0130(r29) 000ecf28: afb5012c sw r21,0x012c(r29) 000ecf2c: afb40128 sw r20,0x0128(r29) 000ecf30: afb30124 sw r19,0x0124(r29) 000ecf34: afb20120 sw r18,0x0120(r29) 000ecf38: afb1011c sw r17,0x011c(r29) 000ecf3c: 0c040024 jal 0x00100090 #Get First Thread Parameter (WORLD.BIN) 000ecf40: afb00118 sw r16,0x0118(r29) 000ecf44: 00408821 addu r17,r2,r0 #r17 = current menu pointer 000ecf48: 27b00018 addiu r16,r29,0x0018 #stack + 0x18 000ecf4c: 86230038 lh r3,0x0038(r17) #load cursor placement 000ecf50: 2402ffff addiu r2,r0,0xffff 000ecf54: 14620002 bne r3,r2,0x000ecf60 #branch if cursor placement invalid 000ecf58: afa30110 sw r3,0x0110(r29) #store cursor placement 000ecf5c: afa00110 sw r0,0x0110(r29) 000ecf60: 27a40010 addiu r4,r29,0x0010 #r29 + 0x10 000ecf64: 02202821 addu r5,r17,r0 000ecf68: 0c03b042 jal 0x000ec108 #000ec108 - 000ec3e8 000ecf6c: 02003021 addu r6,r16,r0 #parse stack pointer 000ecf70: 27a40094 addiu r4,r29,0x0094 #parse stack + 0x94 000ecf74: 02002821 addu r5,r16,r0 #parse stack + 0x18 000ecf78: 0c03fd14 jal 0x000ff450 #000ff450 - 000ff474 000ecf7c: 3406007c ori r6,r0,0x007c #copy 0x7c of r5 to r4 (duplicates the data? I wonder for what purpose) 000ecf80: 27a60010 addiu r6,r29,0x0010 #parse r6 = stack + 0x10 000ecf84: 34070001 ori r7,r0,0x0001 000ecf88: 00009021 addu r18,r0,r0 #reset counter 000ecf8c: 0200a821 addu r21,r16,r0 #stack pointer + 0x18 to r21 000ecf90: 86240004 lh r4,0x0004(r17) #parse menu halfword 0x4 000ecf94: 86250006 lh r5,0x0006(r17) #parse menu halfword 0x6 000ecf98: 0c03fe6b jal 0x000ff9ac #000ff9ac - 000ffc24 000ecf9c: 34140002 ori r20,r0,0x0002 #r20 = 2 000ecfa0: 34040008 ori r4,r0,0x0008 #r4 = 8 (text X top left corner) 000ecfa4: 34050009 ori r5,r0,0x0009 #r5 = 9 (text Y top left corner) <- these only apply to the formation triangle menu and the shop main menu 000ecfa8: 3c108015 lui r16,0x8015 000ecfac: 2610328c addiu r16,r16,0x328c #8015328c 000ecfb0: 86230004 lh r3,0x0004(r17) #menu halfword 4 000ecfb4: 00409821 addu r19,r2,r0 #r19 = return of 000ff9ac - 000ffc24 000ecfb8: 0c03f6e2 jal 0x000fdb88 #000fdb88 - 000fdb9c - store 8 in 0x80153284, store 9 in 0x80153286 000ecfbc: ae030000 sw r3,0x0000(r16) #store menu halfword 4 in 0x8015328c 000ecfc0: 02602821 addu r5,r19,r0 #parse return of 000ff9ac - 000ffc24 000ecfc4: 8624001c lh r4,0x001c(r17) #parse menu halfword 0x1c 000ecfc8: 3c018015 lui r1,0x8015 000ecfcc: ac203270 sw r0,0x3270(r1) #clear 0x80153270 000ecfd0: 0c03f9dd jal 0x000fe774 #Display Menu Text Entry (WORLD.BIN) 000ecfd4: 2606fff8 addiu r6,r16,0xfff8 #0x80153284 000ecfd8: 27a40010 addiu r4,r29,0x0010 #parse stack + 0x10 000ecfdc: 0c00923f jal 0x000248fc #? 0x248fc - store image data struct to VRAM? 0x10 is color depth bitmask? 0x16 = height? 000ecfe0: 02602821 addu r5,r19,r0 #parse return of 000ff9ac - 000ffc24 as image data
Loop 000ecfe4: 0c03ffd4 jal 0x000fff50 #Switch To Next Thread (WORLD.BIN) - well then 000ecfe8: 00000000 nop 000ecfec: 16400004 bne r18,r0,0x000ed000 #counter != 0 000ecff0: 32420001 andi r2,r18,0x0001 #check flag odd 000ecff4: 0c038ca6 jal 0x000e3298 #if counter = 0 000e3298 - 000e3354 000ecff8: 02602021 addu r4,r19,r0 #parse return of 000ff9ac - 000ffc24 000ecffc: 32420001 andi r2,r18,0x0001 #check if odd 000ed000: 00021940 sll r3,r2,0x05 # 000ed004: 00621823 subu r3,r3,r2 # 000ed008: 00031880 sll r3,r3,0x02 #0x7c or 0x00 (even or odd counter?) 000ed00c: 02a38021 addu r16,r21,r3 #stack pointer + 0x94 or 0x18 000ed010: 97a20110 lhu r2,0x0110(r29) #load cursor placement 000ed014: 02002021 addu r4,r16,r0 000ed018: 0c03b121 jal 0x000ec484 #000ec484 - 000ec500 000ed01c: a6220038 sh r2,0x0038(r17) #store cursor placement 000ed020: 02202021 addu r4,r17,r0 #parse menu pointer 000ed024: 02002821 addu r5,r16,r0 #parse stack pointer + 0x94 or 0x18 000ed028: 8fa70110 lw r7,0x0110(r29) #load cursor placement 000ed02c: 0c03b16e jal 0x000ec5b8 #menu loading routine? 000ec5b8 - 000ec760 000ed030: 02403021 addu r6,r18,r0 #parse counter 000ed034: 8fa30090 lw r3,0x0090(r29) #0x90 stack 000ed038: 00000000 nop 000ed03c: 14600005 bne r3,r0,0x000ed054 #branch if not 0? 000ed040: 00000000 nop 000ed044: 8fa2010c lw r2,0x010c(r29) 000ed048: 00000000 nop 000ed04c: 10540007 beq r2,r20,0x000ed06c #branch if 0x010c stack = 2 000ed050: 00000000 nop 000ed054: 14740007 bne r3,r20,0x000ed074 #branch if != r20 (2?) 000ed058: 00000000 nop 000ed05c: 8fa2010c lw r2,0x010c(r29) 000ed060: 00000000 nop 000ed064: 14400003 bne r2,r0,0x000ed074 #branch if 0x10c stack != 0 000ed068: 00000000 nop 000ed06c: afa00090 sw r0,0x0090(r29) #clear 0x90 stack 000ed070: afa0010c sw r0,0x010c(r29) #clear 0x010c stack 000ed074: 3c048019 lui r4,0x8019 000ed078: 24845c34 addiu r4,r4,0x5c34 #parse 0x80195c34 000ed07c: 0c03afe3 jal 0x000ebf8c #0xebf8c 000ed080: 00000000 nop 000ed084: 1440000d bne r2,r0,0x000ed0bc #branch if return != 0 (ends loop) 000ed088: 02202021 addu r4,r17,r0 000ed08c: 8fa50110 lw r5,0x0110(r29) #parse cursor placement 000ed090: 0c03aec2 jal 0x000ebb08 000ed094: 26520001 addiu r18,r18,0x0001 #increment counter 000ed098: 02202021 addu r4,r17,r0 #parse menu data pointer 000ed09c: 0c03af73 jal 0x000ebdcc #Menu Scroll Related (0xebdcc) 000ed0a0: 27a50110 addiu r5,r29,0x0110 #parse stack + 0x110 000ed0a4: 0c03af9f jal 0x000ebe7c #000ebe7c - 000ebf88 000ed0a8: 02202021 addu r4,r17,r0 # 000ed0ac: 0c03b2d6 jal 0x000ecb58 #000ecb58 - 000ecba8 000ed0b0: 02002021 addu r4,r16,r0 #parse stack pointer for odd/even? 000ed0b4: 0803b3f9 j 0x000ecfe4 #Loop unconditionally 000ed0b8: 00000000 nop End Loop
000ed0bc: 0c03ffd4 jal 0x000fff50 #Switch To Next Thread (WORLD.BIN) 000ed0c0: 00000000 nop 000ed0c4: 0c040031 jal 0x001000c4 #Get Second Thread Parameter (WORLD.BIN) 000ed0c8: 00000000 nop 000ed0cc: 14400003 bne r2,r0,0x000ed0dc #branch if thread param 2 != 0 000ed0d0: 00000000 nop 000ed0d4: 0c03ff8a jal 0x000ffe28 #if so, Stop Current Thread (WORLD.BIN) 000ed0d8: 00000000 nop 000ed0dc: 8fbf0130 lw r31,0x0130(r29) 000ed0e0: 8fb5012c lw r21,0x012c(r29) 000ed0e4: 8fb40128 lw r20,0x0128(r29) 000ed0e8: 8fb30124 lw r19,0x0124(r29) 000ed0ec: 8fb20120 lw r18,0x0120(r29) 000ed0f0: 8fb1011c lw r17,0x011c(r29) 000ed0f4: 8fb00118 lw r16,0x0118(r29) 000ed0f8: 27bd0138 addiu r29,r29,0x0138 000ed0fc: 03e00008 jr r31 000ed100: 00000000 nop