Difference between revisions of "OPEN.BIN Put OPNTEX in Frame Buffer"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " 00069d7c: 27bdffc8 addiu r29,r29,0xffc8 00069d80: afb00028 sw r16,0x0028(r29) 00069d84: 00808021 addu r16,r4,r0 00069d88: afbf0030 sw r31,0x0030(r29) 00069d8c: afb1002c s...")
 
m
Line 1: Line 1:
 
  00069d7c: 27bdffc8 addiu r29,r29,0xffc8
 
  00069d7c: 27bdffc8 addiu r29,r29,0xffc8
 
  00069d80: afb00028 sw r16,0x0028(r29)
 
  00069d80: afb00028 sw r16,0x0028(r29)
  00069d84: 00808021 addu r16,r4,r0
+
  00069d84: 00808021 addu r16,r4,r0                 file source ptr. (starts with RECT information?)
 
  00069d88: afbf0030 sw r31,0x0030(r29)
 
  00069d88: afbf0030 sw r31,0x0030(r29)
 
  00069d8c: afb1002c sw r17,0x002c(r29)
 
  00069d8c: afb1002c sw r17,0x002c(r29)
  00069d90: 8e020004 lw r2,0x0004(r16)
+
  00069d90: 8e020004 lw r2,0x0004(r16)            
 
  00069d94: 00000000 nop
 
  00069d94: 00000000 nop
 
  00069d98: 30420008 andi r2,r2,0x0008
 
  00069d98: 30420008 andi r2,r2,0x0008
  00069d9c: 10400018 beq r2,r0,0x00069e00
+
 
  00069da0: 26050014 addiu r5,r16,0x0014
+
OPNTEX2 & OPNTEX3
  00069da4: 8e02000c lw r2,0x000c(r16)
+
  00069d9c: 10400018 beq r2,r0,0x00069e00           if OPNTEX has second image on lower half: (else branch)
  00069da8: 8e030008 lw r3,0x0008(r16)
+
  00069da0: 26050014 addiu r5,r16,0x0014           file source + 0x14  (the actual image data)
  00069dac: a7a20010 sh r2,0x0010(r29)
+
  00069da4: 8e02000c lw r2,0x000c(r16)              get x (file source)
  00069db0: 9602000e lhu r2,0x000e(r16)
+
  00069da8: 8e030008 lw r3,0x0008(r16)             offset to second RECT information
 +
  00069dac: a7a20010 sh r2,0x0010(r29)              put x (vram pos)
 +
  00069db0: 9602000e lhu r2,0x000e(r16)            get y (file source)
 
  00069db4: 00000000 nop
 
  00069db4: 00000000 nop
  00069db8: a7a20012 sh r2,0x0012(r29)
+
  00069db8: a7a20012 sh r2,0x0012(r29)              put y (vram pos)
  00069dbc: 8e020010 lw r2,0x0010(r16)
+
  00069dbc: 8e020010 lw r2,0x0010(r16)              w (file source)
 
  00069dc0: 00000000 nop
 
  00069dc0: 00000000 nop
  00069dc4: a7a20014 sh r2,0x0014(r29)
+
  00069dc4: a7a20014 sh r2,0x0014(r29)              w (vram pos) (incomplete)
  00069dc8: 96060012 lhu r6,0x0012(r16)
+
  00069dc8: 96060012 lhu r6,0x0012(r16)             get width modifier
 
  00069dcc: 00000000 nop
 
  00069dcc: 00000000 nop
  00069dd0: 00460018 mult r2,r6
+
  00069dd0: 00460018 mult r2,r6                     w = w * width modifier
  00069dd4: 27a40010 addiu r4,r29,0x0010
+
  00069dd4: 27a40010 addiu r4,r29,0x0010           RECT*
 
  00069dd8: 00031882 srl r3,r3,0x02
 
  00069dd8: 00031882 srl r3,r3,0x02
  00069ddc: 24710002 addiu r17,r3,0x0002
+
  00069ddc: 24710002 addiu r17,r3,0x0002           set
  00069de0: 34020001 ori r2,r0,0x0001
+
  00069de0: 34020001 ori r2,r0,0x0001               h = 1
  00069de4: a7a60016 sh r6,0x0016(r29)
+
  00069de4: a7a60016 sh r6,0x0016(r29)              h (vram pos)
  00069de8: a7a20016 sh r2,0x0016(r29)
+
  00069de8: a7a20016 sh r2,0x0016(r29)              h (vram pos) (1) (?)
  00069dec: 00003812 mflo r7
+
  00069dec: 00003812 mflo r7                       w = w * y (finalised)
  00069df0: 0c00923f jal 0x000248fc
+
  00069df0: 0c00923f jal 0x000248fc                 [[SYS LoadImage]]
  00069df4: a7a70014 sh r7,0x0014(r29)
+
  00069df4: a7a70014 sh r7,0x0014(r29)              w (vram pos) (finalised)
 
  00069df8: 0801a782 j 0x00069e08
 
  00069df8: 0801a782 j 0x00069e08
 
  00069dfc: 00112880 sll r5,r17,0x02
 
  00069dfc: 00112880 sll r5,r17,0x02
  00069e00: 34110002 ori r17,r0,0x0002
+
 
 +
OPNTEX1
 +
  00069e00: 34110002 ori r17,r0,0x0002             set start of proper rect data here
 
  00069e04: 00112880 sll r5,r17,0x02
 
  00069e04: 00112880 sll r5,r17,0x02
  00069e08: 00b01821 addu r3,r5,r16
+
  00069e08: 00b01821 addu r3,r5,r16                
  00069e0c: 8c620004 lw r2,0x0004(r3)
+
  00069e0c: 8c620004 lw r2,0x0004(r3)              x (source)
 
  00069e10: 00000000 nop
 
  00069e10: 00000000 nop
  00069e14: a7a20010 sh r2,0x0010(r29)
+
  00069e14: a7a20010 sh r2,0x0010(r29)             x
  00069e18: 94620006 lhu r2,0x0006(r3)
+
  00069e18: 94620006 lhu r2,0x0006(r3)              y (source)
 
  00069e1c: 27a40010 addiu r4,r29,0x0010
 
  00069e1c: 27a40010 addiu r4,r29,0x0010
  00069e20: a7a20012 sh r2,0x0012(r29)
+
  00069e20: a7a20012 sh r2,0x0012(r29)             y
  00069e24: 8c620008 lw r2,0x0008(r3)
+
  00069e24: 8c620008 lw r2,0x0008(r3)              w (source)
  00069e28: 24a5000c addiu r5,r5,0x000c
+
  00069e28: 24a5000c addiu r5,r5,0x000c             start of graphic information
  00069e2c: a7a20014 sh r2,0x0014(r29)
+
  00069e2c: a7a20014 sh r2,0x0014(r29)             w
  00069e30: 9462000a lhu r2,0x000a(r3)
+
  00069e30: 9462000a lhu r2,0x000a(r3)              h (source)
  00069e34: 02052821 addu r5,r16,r5
+
  00069e34: 02052821 addu r5,r16,r5                 parse image source
  00069e38: 0c00923f jal 0x000248fc
+
  00069e38: 0c00923f jal 0x000248fc                 [[SYS LoadImage]]
  00069e3c: a7a20016 sh r2,0x0016(r29)
+
  00069e3c: a7a20016 sh r2,0x0016(r29)             h
  00069e40: 0c0091b5 jal 0x000246d4
+
  00069e40: 0c0091b5 jal 0x000246d4                 [[SYS DrawSync]] (0)
 
  00069e44: 00002021 addu r4,r0,r0
 
  00069e44: 00002021 addu r4,r0,r0
 
  00069e48: 8fbf0030 lw r31,0x0030(r29)
 
  00069e48: 8fbf0030 lw r31,0x0030(r29)

Revision as of 11:50, 11 December 2024

00069d7c: 27bdffc8 addiu r29,r29,0xffc8
00069d80: afb00028 sw r16,0x0028(r29)
00069d84: 00808021 addu r16,r4,r0                 file source ptr. (starts with RECT information?)
00069d88: afbf0030 sw r31,0x0030(r29)
00069d8c: afb1002c sw r17,0x002c(r29)
00069d90: 8e020004 lw r2,0x0004(r16)              
00069d94: 00000000 nop
00069d98: 30420008 andi r2,r2,0x0008

OPNTEX2 & OPNTEX3

00069d9c: 10400018 beq r2,r0,0x00069e00           if OPNTEX has second image on lower half: (else branch)
00069da0: 26050014 addiu r5,r16,0x0014            file source + 0x14  (the actual image data)
00069da4: 8e02000c lw r2,0x000c(r16)              get x (file source)
00069da8: 8e030008 lw r3,0x0008(r16)              offset to second RECT information
00069dac: a7a20010 sh r2,0x0010(r29)              put x (vram pos)
00069db0: 9602000e lhu r2,0x000e(r16)             get y (file source)
00069db4: 00000000 nop
00069db8: a7a20012 sh r2,0x0012(r29)              put y (vram pos)
00069dbc: 8e020010 lw r2,0x0010(r16)              w (file source)
00069dc0: 00000000 nop
00069dc4: a7a20014 sh r2,0x0014(r29)              w (vram pos) (incomplete)
00069dc8: 96060012 lhu r6,0x0012(r16)             get width modifier
00069dcc: 00000000 nop
00069dd0: 00460018 mult r2,r6                     w = w * width modifier
00069dd4: 27a40010 addiu r4,r29,0x0010            RECT*
00069dd8: 00031882 srl r3,r3,0x02
00069ddc: 24710002 addiu r17,r3,0x0002            set 
00069de0: 34020001 ori r2,r0,0x0001               h = 1
00069de4: a7a60016 sh r6,0x0016(r29)              h (vram pos)
00069de8: a7a20016 sh r2,0x0016(r29)              h (vram pos) (1) (?)
00069dec: 00003812 mflo r7                        w = w * y (finalised)
00069df0: 0c00923f jal 0x000248fc                 SYS LoadImage
00069df4: a7a70014 sh r7,0x0014(r29)              w (vram pos) (finalised)
00069df8: 0801a782 j 0x00069e08
00069dfc: 00112880 sll r5,r17,0x02

OPNTEX1

00069e00: 34110002 ori r17,r0,0x0002              set start of proper rect data here
00069e04: 00112880 sll r5,r17,0x02
00069e08: 00b01821 addu r3,r5,r16                 
00069e0c: 8c620004 lw r2,0x0004(r3)               x (source)
00069e10: 00000000 nop
00069e14: a7a20010 sh r2,0x0010(r29)              x
00069e18: 94620006 lhu r2,0x0006(r3)              y (source)
00069e1c: 27a40010 addiu r4,r29,0x0010
00069e20: a7a20012 sh r2,0x0012(r29)              y 
00069e24: 8c620008 lw r2,0x0008(r3)               w (source)
00069e28: 24a5000c addiu r5,r5,0x000c             start of graphic information
00069e2c: a7a20014 sh r2,0x0014(r29)              w 
00069e30: 9462000a lhu r2,0x000a(r3)              h (source)
00069e34: 02052821 addu r5,r16,r5                 parse image source
00069e38: 0c00923f jal 0x000248fc                 SYS LoadImage
00069e3c: a7a20016 sh r2,0x0016(r29)              h
00069e40: 0c0091b5 jal 0x000246d4                 SYS DrawSync (0)
00069e44: 00002021 addu r4,r0,r0
00069e48: 8fbf0030 lw r31,0x0030(r29)
00069e4c: 8fb1002c lw r17,0x002c(r29)
00069e50: 8fb00028 lw r16,0x0028(r29)
00069e54: 27bd0038 addiu r29,r29,0x0038
00069e58: 03e00008 jr r31
00069e5c: 00000000 nop