Get EFC FNT (deprecated)
Revision as of 00:50, 11 June 2024 by Talcall (talk | contribs) (Talcall moved page 0004146c - 00041594 to Get EFC FNT (deprecated))
0004146c: 27bdffb8 addiu r29,r29,0xffb8 00041470: afb1003c sw r17,0x003c(r29) 00041474: 00008821 addu r17,r0,r0 00041478: 3402007f ori r2,r0,0x007f 0004147c: 34040280 ori r4,r0,0x0280 00041480: afbf0040 sw r31,0x0040(r29) 00041484: afb00038 sw r16,0x0038(r29) 00041488: 3c018002 lui r1,0x8002 0004148c: a0222f5c sb r2,0x2f5c(r1) 00041490: 0c008bcb jal 0x00022f2c FONT FntLoad (0x280, 0x00) 00041494: 00002821 addu r5,r0,r0 00041498: 3404dea8 ori r4,r0,0xdea8 0004149c: 0c011264 jal 0x00044990 Get TIM (lba address 0xdea8, filesize 0x8800) EFC_FNT.TIM (slightly over estimates the true filesize. lol.) 000414a0: 34058800 ori r5,r0,0x8800 000414a4: 00408021 addu r16,r2,r0 texture image data pointer 000414a8: 12000020 beq r16,r0,0x0004152c branch if no texture image 000414ac: 00000000 nop 000414b0: 0c009be9 jal 0x00026fa4 OpenTIM 000414b4: 02002021 addu r4,r16,r0 000414b8: 14400018 bne r2,r0,0x0004151c branch if failed 000414bc: 00000000 nop 000414c0: 0c009bed jal 0x00026fb4 ReadTIM 000414c4: 27a40020 addiu r4,r29,0x0020 put the TIM file descriptor in stack 000414c8: 10400014 beq r2,r0,0x0004151c branch if failed to read 000414cc: 00002821 addu r5,r0,r0 # bit depth = 4 bit 000414d0: afa00010 sw r0,0x0010(r29) # Y = 0x00 000414d4: 8fa2002c lw r2,0x002c(r29) VRAM texture RECT 000414d8: 00000000 nop 000414dc: 84420004 lh r2,0x0004(r2) # texture U 000414e0: 00000000 nop 000414e4: 00021080 sll r2,r2,0x02 000414e8: afa20014 sw r2,0x0014(r29) # store U 000414ec: 8fa2002c lw r2,0x002c(r29) vram texture RECT, again 000414f0: 00003021 addu r6,r0,r0 # semitransparency 0 000414f4: 84420006 lh r2,0x0006(r2) # texture V 000414f8: 34070280 ori r7,r0,0x0280 # x = 0x280 000414fc: afa20018 sw r2,0x0018(r29) # store V 00041500: 8fa40030 lw r4,0x0030(r29) # texture pattern start address 00041504: 0c008b09 jal 0x00022c24 E00 LoadTpage 00041508: 34110001 ori r17,r0,0x0001 0004150c: 34050280 ori r5,r0,0x0280 # x = 0x280 00041510: 8fa40028 lw r4,0x0028(r29) # pointer to EFC_FNT CLUT 00041514: 0c008b5e jal 0x00022d78 E02 LoadClut2 put CLUT at 0x280, 0x7f in frame buffer 00041518: 3406007f ori r6,r0,0x007f # y = 0x7f 0004151c: 0c011273 jal 0x000449cc # C52 Free but with extra steps 00041520: 02002021 addu r4,r16,r0 00041524: 08010551 j 0x00041544 00041528: 00000000 nop
0004152c: 0c0076ea jal 0x0001dba8 # [[VSync call] 00041530: 00002021 addu r4,r0,r0 00041534: 3c048005 lui r4,0x8005 00041538: 2484eaf4 addiu r4,r4,0xeaf4 # file descriptor 0004153c: 0c00478e jal 0x00011e38 # 00011e38 - 0001201c 00041540: 00000000 nop
00041544: 1220ffd4 beq r17,r0,0x00041498 00041548: 34040088 ori r4,r0,0x0088 0004154c: 34050010 ori r5,r0,0x0010 # xy (0x88, 0x10) 00041550: 34060100 ori r6,r0,0x0100 00041554: 34070100 ori r7,r0,0x0100 # uv (0x100, 0x100) 00041558: 34020200 ori r2,r0,0x0200 0004155c: afa00010 sw r0,0x0010(r29) # clear background 00041560: 0c008bf4 jal 0x00022fd0 # FONT FntOpen 00041564: afa20014 sw r2,0x0014(r29) # max 0x200 characters 00041568: 0c008bbb jal 0x00022eec # FONT SetDumpFnt 0004156c: 00402021 addu r4,r2,r0 # 00041570: 0c0091b5 jal 0x000246d4 # SYS DrawSync 00041574: 00002021 addu r4,r0,r0 # wait to finish drawing 00041578: 0c0091b5 jal 0x000246d4 # SYS DrawSync 0004157c: 00002021 addu r4,r0,r0 # wait again to finish drawing 00041580: 8fbf0040 lw r31,0x0040(r29) 00041584: 8fb1003c lw r17,0x003c(r29) 00041588: 8fb00038 lw r16,0x0038(r29) 0004158c: 27bd0048 addiu r29,r29,0x0048 00041590: 03e00008 jr r31 00041594: 00000000 nop