OPEN.BIN Initialise & Put Screen Environments

From Final Fantasy Hacktics Wiki
Revision as of 23:18, 11 December 2024 by Talcall (talk | contribs) (Talcall moved page OPEN.BIN 000687ac - 00068ae8 to OPEN.BIN Initialise & Put Screen Environments)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
000687ac: 27bdffd0 addiu r29,r29,0xffd0
000687b0: afb20028 sw r18,0x0028(r29)
000687b4: 00809021 addu r18,r4,r0
000687b8: afbf002c sw r31,0x002c(r29)
000687bc: afb10024 sw r17,0x0024(r29)
000687c0: 12400003 beq r18,r0,0x000687d0              skip if p1 = 0
000687c4: afb00020 sw r16,0x0020(r29)
000687c8: 0c00918e jal 0x00024638                     SYS SetDispMask (0)
000687cc: 00002021 addu r4,r0,r0
000687d0: 3c028009 lui r2,0x8009
000687d4: 8c42e53c lw r2,-0x1ac4(r2)
000687d8: 00000000 nop
000687dc: 30421000 andi r2,r2,0x1000
000687e0: 10400050 beq r2,r0,0x00068924
000687e4: 00002821 addu r5,r0,r0                      x = 0
000687e8: 3c118008 lui r17,0x8008
000687ec: 263151c0 addiu r17,r17,0x51c0
000687f0: 02202021 addu r4,r17,r0                     OPEN.BIN draw environment
000687f4: 00003021 addu r6,r0,r0                      y = 0
000687f8: 34070140 ori r7,r0,0x0140                   w = 0x0140
000687fc: 341000f0 ori r16,r0,0x00f0
00068800: 0c008b78 jal 0x00022de0                     E03 SetDefDrawEnv ((0,0),(140,f0))
00068804: afb00010 sw r16,0x0010(r29)                 h = 0xf0
00068808: 2624005c addiu r4,r17,0x005c                OPEN.BIN display environment
0006880c: 00002821 addu r5,r0,r0                      x = 0
00068810: 340600f0 ori r6,r0,0x00f0                   y = 0xf0
00068814: 34070140 ori r7,r0,0x0140                   w = 0x140
00068818: 0c008bac jal 0x00022eb0                     E04 SetDefDispEnv ((0,f0),(140,f0))
0006881c: afb00010 sw r16,0x0010(r29)                 h = 0xf0
00068820: 26240070 addiu r4,r17,0x0070                OPEN.BIN draw environment 2
00068824: 00002821 addu r5,r0,r0                      x = 0
00068828: 340600f0 ori r6,r0,0x00f0                   y = 0xf0
0006882c: 34070140 ori r7,r0,0x0140                   w = 0x140
00068830: 0c008b78 jal 0x00022de0                     E03 SetDefDrawEnv ((0,f0),(140,f0))
00068834: afb00010 sw r16,0x0010(r29)                 h = 0xf0
00068838: 262400cc addiu r4,r17,0x00cc                OPEN.BIN display environment 2
0006883c: 00002821 addu r5,r0,r0                      x = 0
00068840: 00003021 addu r6,r0,r0                      y = 0
00068844: 34070140 ori r7,r0,0x0140                   w = 0x140
00068848: 0c008bac jal 0x00022eb0                     E04 SetDefDispEnv ((0,0),(140,f0))
0006884c: afb00010 sw r16,0x0010(r29)                 h = 0xf0
00068850: 340300a0 ori r3,r0,0x00a0
00068854: 34020078 ori r2,r0,0x0078
00068858: 3c018008 lui r1,0x8008
0006885c: a42251ca sh r2,0x51ca(r1)                   OPENDRAWENV1.ofs[y] = 0x78
00068860: 34020168 ori r2,r0,0x0168
00068864: 34040001 ori r4,r0,0x0001
00068868: 3c018008 lui r1,0x8008
0006886c: a422523a sh r2,0x523a(r1)                   OPENDRAWENV2.ofs[y] = 0x168
00068870: 2402ff60 addiu r2,r0,0xff60
00068874: 3c018008 lui r1,0x8008
00068878: a4225cc4 sh r2,0x5cc4(r1)                   
0006887c: 2402ff88 addiu r2,r0,0xff88
00068880: 3c018008 lui r1,0x8008
00068884: a4225cc6 sh r2,0x5cc6(r1)
00068888: 3c028009 lui r2,0x8009
0006888c: 8c42e53c lw r2,-0x1ac4(r2)
00068890: 34050140 ori r5,r0,0x0140
00068894: 3c018008 lui r1,0x8008
00068898: a42351c8 sh r3,0x51c8(r1)                   OPENDRAWENV1.ofs[x] = 0xa0
0006889c: 3c018008 lui r1,0x8008
000688a0: a4235238 sh r3,0x5238(r1)                   OPENDRAWENV2.ofs[x] = 0xa0
000688a4: 340300f0 ori r3,r0,0x00f0
000688a8: 3c018008 lui r1,0x8008
000688ac: a0205248 sb r0,0x5248(r1)                   OPENDRAWENV2.isbg = false
000688b0: 3c018008 lui r1,0x8008
000688b4: a02051d8 sb r0,0x51d8(r1)                   OPENDRAWENV1.isbg = false
000688b8: 3c018008 lui r1,0x8008
000688bc: a0245247 sb r4,0x5247(r1)                   OPENDRAWENV2.dfe = drawing in display area inhibited
000688c0: 3c018008 lui r1,0x8008
000688c4: a02451d7 sb r4,0x51d7(r1)                   OPENDRAWENV1.dfe = drawing in display area inhibited
000688c8: 3c018008 lui r1,0x8008
000688cc: a4255cc8 sh r5,0x5cc8(r1)                   
000688d0: 3c018008 lui r1,0x8008
000688d4: a4235cca sh r3,0x5cca(r1)
000688d8: 30422000 andi r2,r2,0x2000
000688dc: 10400009 beq r2,r0,0x00068904               24rgb flag?
000688e0: 340201e0 ori r2,r0,0x01e0
000688e4: 3c018008 lui r1,0x8008
000688e8: a024529d sb r4,0x529d(r1)                   OPENDISPENV2.24rgb = true
000688ec: 3c018008 lui r1,0x8008
000688f0: a024522d sb r4,0x522d(r1)                   OPENDISPENV1.24rgb = true
000688f4: a7a00018 sh r0,0x0018(r29)
000688f8: a7a0001a sh r0,0x001a(r29)
000688fc: 0801a295 j 0x00068a54
00068900: a7a2001c sh r2,0x001c(r29)
00068904: 3c018008 lui r1,0x8008
00068908: a020529d sb r0,0x529d(r1)                   OPENDISPENV2.24rgb = false
0006890c: 3c018008 lui r1,0x8008
00068910: a020522d sb r0,0x522d(r1)                   OPENDISPENV2.24rgb = false
00068914: a7a00018 sh r0,0x0018(r29)
00068918: a7a0001a sh r0,0x001a(r29)
0006891c: 0801a295 j 0x00068a54
00068920: a7a5001c sh r5,0x001c(r29)
00068924: 3c118008 lui r17,0x8008
00068928: 263151c0 addiu r17,r17,0x51c0
0006892c: 02202021 addu r4,r17,r0
00068930: 00003021 addu r6,r0,r0
00068934: 34070100 ori r7,r0,0x0100
00068938: 341000f0 ori r16,r0,0x00f0
0006893c: 0c008b78 jal 0x00022de0                     E03 SetDefDrawEnv
00068940: afb00010 sw r16,0x0010(r29)
00068944: 2624005c addiu r4,r17,0x005c
00068948: 00002821 addu r5,r0,r0
0006894c: 340600f0 ori r6,r0,0x00f0
00068950: 34070100 ori r7,r0,0x0100
00068954: 0c008bac jal 0x00022eb0                     E04 SetDefDispEnv
00068958: afb00010 sw r16,0x0010(r29)
0006895c: 26240070 addiu r4,r17,0x0070
00068960: 00002821 addu r5,r0,r0
00068964: 340600f0 ori r6,r0,0x00f0
00068968: 34070100 ori r7,r0,0x0100
0006896c: 0c008b78 jal 0x00022de0                     E03 SetDefDrawEnv
00068970: afb00010 sw r16,0x0010(r29)
00068974: 262400cc addiu r4,r17,0x00cc
00068978: 00002821 addu r5,r0,r0
0006897c: 00003021 addu r6,r0,r0
00068980: 34070100 ori r7,r0,0x0100
00068984: 0c008bac jal 0x00022eb0                     E04 SetDefDispEnv
00068988: afb00010 sw r16,0x0010(r29)
0006898c: 34030080 ori r3,r0,0x0080
00068990: 34020078 ori r2,r0,0x0078
00068994: 3c018008 lui r1,0x8008
00068998: a42251ca sh r2,0x51ca(r1)
0006899c: 34020168 ori r2,r0,0x0168
000689a0: 3c018008 lui r1,0x8008
000689a4: a422523a sh r2,0x523a(r1)
000689a8: 2402ff80 addiu r2,r0,0xff80
000689ac: 3c018008 lui r1,0x8008
000689b0: a4225cc4 sh r2,0x5cc4(r1)
000689b4: 2402ff88 addiu r2,r0,0xff88
000689b8: 3c018008 lui r1,0x8008
000689bc: a4225cc6 sh r2,0x5cc6(r1)
000689c0: 3c028009 lui r2,0x8009
000689c4: 8c42e53c lw r2,-0x1ac4(r2)
000689c8: 34040100 ori r4,r0,0x0100
000689cc: 3c018008 lui r1,0x8008
000689d0: a42351c8 sh r3,0x51c8(r1)
000689d4: 3c018008 lui r1,0x8008
000689d8: a4235238 sh r3,0x5238(r1)
000689dc: 340300f0 ori r3,r0,0x00f0
000689e0: 3c018008 lui r1,0x8008
000689e4: a0205248 sb r0,0x5248(r1)
000689e8: 3c018008 lui r1,0x8008
000689ec: a02051d8 sb r0,0x51d8(r1)
000689f0: 3c018008 lui r1,0x8008
000689f4: a4245cc8 sh r4,0x5cc8(r1)
000689f8: 3c018008 lui r1,0x8008
000689fc: a4235cca sh r3,0x5cca(r1)
00068a00: 30422000 andi r2,r2,0x2000
00068a04: 1040000b beq r2,r0,0x00068a34
00068a08: 34020001 ori r2,r0,0x0001
00068a0c: 3c018008 lui r1,0x8008
00068a10: a022529d sb r2,0x529d(r1)
00068a14: 3c018008 lui r1,0x8008
00068a18: a022522d sb r2,0x522d(r1)
00068a1c: 34020180 ori r2,r0,0x0180
00068a20: a7a2001c sh r2,0x001c(r29)
00068a24: 340201e0 ori r2,r0,0x01e0
00068a28: a7a00018 sh r0,0x0018(r29)
00068a2c: 0801a295 j 0x00068a54
00068a30: a7a0001a sh r0,0x001a(r29)
00068a34: 340201e0 ori r2,r0,0x01e0
00068a38: 3c018008 lui r1,0x8008
00068a3c: a020529d sb r0,0x529d(r1)
00068a40: 3c018008 lui r1,0x8008
00068a44: a020522d sb r0,0x522d(r1)
00068a48: a7a00018 sh r0,0x0018(r29)
00068a4c: a7a0001a sh r0,0x001a(r29)
00068a50: a7a4001c sh r4,0x001c(r29)
00068a54: 1240001e beq r18,r0,0x00068ad0
00068a58: a7a2001e sh r2,0x001e(r29)
00068a5c: 27a40018 addiu r4,r29,0x0018
00068a60: 00002821 addu r5,r0,r0
00068a64: 00003021 addu r6,r0,r0
00068a68: 0c00921a jal 0x00024868                     SYS ClearImage
00068a6c: 00003821 addu r7,r0,r0
00068a70: 0c0091b5 jal 0x000246d4                     SYS DrawSync
00068a74: 00002021 addu r4,r0,r0
00068a78: 12400015 beq r18,r0,0x00068ad0
00068a7c: 00000000 nop
00068a80: 3c028005 lui r2,0x8005
00068a84: 8c42e5bc lw r2,-0x1a44(r2)                  Screen polarity
00068a88: 3c108008 lui r16,0x8008
00068a8c: 261051c0 addiu r16,r16,0x51c0
00068a90: 000220c0 sll r4,r2,0x03
00068a94: 00822023 subu r4,r4,r2
00068a98: 00042100 sll r4,r4,0x04
00068a9c: 0c00932b jal 0x00024cac                     SYS PutDrawEnv
00068aa0: 00902021 addu r4,r4,r16                     get draw env. of current screen polarity
00068aa4: 3c028005 lui r2,0x8005
00068aa8: 8c42e5bc lw r2,-0x1a44(r2)
00068aac: 2610005c addiu r16,r16,0x005c
00068ab0: 000220c0 sll r4,r2,0x03
00068ab4: 00822023 subu r4,r4,r2
00068ab8: 00042100 sll r4,r4,0x04
00068abc: 0c0093a1 jal 0x00024e84                     SYS PutDispEnv
00068ac0: 00902021 addu r4,r4,r16                     get display environment of current screen polarity
00068ac4: 00002021 addu r4,r0,r0
00068ac8: 0c00746a jal 0x0001d1a8                     Store Screen offsets to GTE
00068acc: 00002821 addu r5,r0,r0
00068ad0: 8fbf002c lw r31,0x002c(r29)
00068ad4: 8fb20028 lw r18,0x0028(r29)
00068ad8: 8fb10024 lw r17,0x0024(r29)
00068adc: 8fb00020 lw r16,0x0020(r29)
00068ae0: 27bd0030 addiu r29,r29,0x0030
00068ae4: 03e00008 jr r31
00068ae8: 00000000 nop