Draw SCEAP.DAT
Jump to navigation
Jump to search
I feel like I've documented this routine before... 00041774 - 0004188c
00041d80: 27bdffd8 addiu r29,r29,0xffd8 00041d84: afb20020 sw r18,0x0020(r29) 00041d88: 00809021 addu r18,r4,r0 OTAG list 00041d8c: afb1001c sw r17,0x001c(r29) 00041d90: 00a08821 addu r17,r5,r0 image source for load image? 00041d94: 3c028004 lui r2,0x8004 00041d98: 8c42597c lw r2,0x597c(r2) 00041d9c: afbf0024 sw r31,0x0024(r29) 00041da0: afb00018 sw r16,0x0018(r29) 00041da4: 2c420001 sltiu r2,r2,0x0001 flip screen polarity 00041da8: 3c018004 lui r1,0x8004 00041dac: ac22597c sw r2,0x597c(r1) top or bottom screen 00041db0: 0c0091b5 jal 0x000246d4 SYS DrawSync 00041db4: 00002021 addu r4,r0,r0 wait for drawing to complete 00041db8: 0c0076ea jal 0x0001dba8 VSync call 00041dbc: 00002021 addu r4,r0,r0 00041dc0: 3c038004 lui r3,0x8004 00041dc4: 8c63597c lw r3,0x597c(r3) screen polarity 00041dc8: 00408021 addu r16,r2,r0 00041dcc: 00032080 sll r4,r3,0x02 00041dd0: 00832021 addu r4,r4,r3 00041dd4: 00042080 sll r4,r4,0x02 00041dd8: 3c038005 lui r3,0x8005 00041ddc: 2463eacc addiu r3,r3,0xeacc display environment 00041de0: 0c0093a1 jal 0x00024e84 SYS PutDispEnv 00041de4: 00832021 addu r4,r4,r3 00041de8: 3c028004 lui r2,0x8004 00041dec: 8c42597c lw r2,0x597c(r2) 00041df0: 00000000 nop 00041df4: 00022040 sll r4,r2,0x01 00041df8: 00822021 addu r4,r4,r2 00041dfc: 000420c0 sll r4,r4,0x03 00041e00: 00822023 subu r4,r4,r2 00041e04: 00042080 sll r4,r4,0x02 00041e08: 3c028005 lui r2,0x8005 00041e0c: 2442ea14 addiu r2,r2,0xea14 draw environment 00041e10: 0c00932b jal 0x00024cac SYS PutDrawEnv 00041e14: 00822021 addu r4,r4,r2 00041e18: 27a40010 addiu r4,r29,0x0010 point to RECT for image data 00041e1c: 3c038004 lui r3,0x8004 00041e20: 8c63597c lw r3,0x597c(r3) 00041e24: 02202821 addu r5,r17,r0 image source 00041e28: a7a00010 sh r0,0x0010(r29) 00041e2c: 00031040 sll r2,r3,0x01 00041e30: 00431021 addu r2,r2,r3 00041e34: 000210c0 sll r2,r2,0x03 00041e38: 00431023 subu r2,r2,r3 00041e3c: 00021080 sll r2,r2,0x02 00041e40: 3c018005 lui r1,0x8005 00041e44: 00220821 addu r1,r1,r2 00041e48: 9423ea16 lhu r3,-0x15ea(r1) 00041e4c: 34020140 ori r2,r0,0x0140 00041e50: a7a20014 sh r2,0x0014(r29) build RECT in stack 00041e54: 34020020 ori r2,r0,0x0020 00041e58: a7a20016 sh r2,0x0016(r29) 00041e5c: 24630068 addiu r3,r3,0x0068 00041e60: 0c00923f jal 0x000248fc SYS LoadImage 00041e64: a7a30012 sh r3,0x0012(r29) 00041e68: 0c00930e jal 0x00024c38 SYS DrawOtag 00041e6c: 02402021 addu r4,r18,r0 00041e70: 0c008ca2 jal 0x00023288 FONT FntFlush 00041e74: 2404ffff addiu r4,r0,0xffff 00041e78: 02001021 addu r2,r16,r0 00041e7c: 8fbf0024 lw r31,0x0024(r29) 00041e80: 8fb20020 lw r18,0x0020(r29) 00041e84: 8fb1001c lw r17,0x001c(r29) 00041e88: 8fb00018 lw r16,0x0018(r29) 00041e8c: 27bd0028 addiu r29,r29,0x0028 00041e90: 03e00008 jr r31 00041e94: 00000000 nop