Difference between revisions of "Set Voice Volume Left/Right"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 000191c4: 14c00008 bne r6,r0,0x000191e8 000191c8: 00041040 sll r2,r4,0x01 000191cc: 3c038003 lui r3,0x8003 000191d0: 8c63ad44 lw r3,-0x52bc(r3)...")
 
m
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
   
+
  p1 = voice half-ID
  000191c4: 14c00008 bne r6,r0,0x000191e8
+
p2 = voice half settings
  000191c8: 00041040 sll r2,r4,0x01
+
p3?
 +
 
 +
  000191c4: 14c00008 bne r6,r0,0x000191e8         #
 +
  000191c8: 00041040 sll r2,r4,0x01               # p1 * 2
 
  000191cc: 3c038003 lui r3,0x8003
 
  000191cc: 3c038003 lui r3,0x8003
  000191d0: 8c63ad44 lw r3,-0x52bc(r3)
+
  000191d0: 8c63ad44 lw r3,-0x52bc(r3)           # voice left IO port
 
  000191d4: 00000000 nop
 
  000191d4: 00000000 nop
  000191d8: 00431021 addu r2,r2,r3
+
  000191d8: 00431021 addu r2,r2,r3               # get IO port of voice left/right
  000191dc: a4450000 sh r5,0x0000(r2)
+
  000191dc: a4450000 sh r5,0x0000(r2)             # store volume
 
  000191e0: 08006481 j 0x00019204
 
  000191e0: 08006481 j 0x00019204
 
  000191e4: 00000000 nop
 
  000191e4: 00000000 nop
 +
 
  000191e8: 3c048003 lui r4,0x8003
 
  000191e8: 3c048003 lui r4,0x8003
  000191ec: 8c84ad44 lw r4,-0x52bc(r4)
+
  000191ec: 8c84ad44 lw r4,-0x52bc(r4)           # voice left IO port
 
  000191f0: 3c038003 lui r3,0x8003
 
  000191f0: 3c038003 lui r3,0x8003
  000191f4: 8c63ad6c lw r3,-0x5294(r3)
+
  000191f4: 8c63ad6c lw r3,-0x5294(r3)           # 3
  000191f8: 00441021 addu r2,r2,r4
+
  000191f8: 00441021 addu r2,r2,r4               # get IO port of voice ID left or right
  000191fc: 00651806 srlv r3,r5,r3
+
  000191fc: 00651806 srlv r3,r5,r3               # p2 / 8
  00019200: a4430000 sh r3,0x0000(r2)
+
  00019200: a4430000 sh r3,0x0000(r2)             # store volume
 
  00019204: 03e00008 jr r31
 
  00019204: 03e00008 jr r31
 
  00019208: 00000000 nop
 
  00019208: 00000000 nop
 
</font>
 
</font>

Revision as of 01:11, 22 January 2025

p1 = voice half-ID
p2 = voice half settings
p3?
000191c4: 14c00008 bne r6,r0,0x000191e8         #
000191c8: 00041040 sll r2,r4,0x01               # p1 * 2
000191cc: 3c038003 lui r3,0x8003
000191d0: 8c63ad44 lw r3,-0x52bc(r3)            # voice left IO port
000191d4: 00000000 nop
000191d8: 00431021 addu r2,r2,r3                # get IO port of voice left/right
000191dc: a4450000 sh r5,0x0000(r2)             # store volume
000191e0: 08006481 j 0x00019204
000191e4: 00000000 nop
000191e8: 3c048003 lui r4,0x8003
000191ec: 8c84ad44 lw r4,-0x52bc(r4)            # voice left IO port
000191f0: 3c038003 lui r3,0x8003
000191f4: 8c63ad6c lw r3,-0x5294(r3)            # 3
000191f8: 00441021 addu r2,r2,r4                # get IO port of voice ID left or right
000191fc: 00651806 srlv r3,r5,r3                # p2 / 8
00019200: a4430000 sh r3,0x0000(r2)             # store volume
00019204: 03e00008 jr r31
00019208: 00000000 nop