Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; NAME: Player index
- ; GAMES: MP3_USA
- ; EXECUTION: Direct
- Addiu Sp sp -100
- Sw s0 0x60(sp)
- Sw s1 0x5c(sp)
- Sw s2 0x58(sp)
- Sw s3 0x54(sp)
- Sw Ra 0x50(sp)
- sw t1 0x4c(sp)
- sw t2 0x48(sp)
- sw t3 0x44(sp)
- sw t4 0x40(sp)
- sw v0 0x3c(sp)
- sw a0 0x38(sp)
- sw a1 0x34(sp)
- Jal GetCurrentPlayerIndex
- Nop
- beq v0,r0, Player1
- nop
- Li a0, 0x1
- Beq a0 v0 Player2
- Nop
- bne v0,r0,Team2
- Player1:
- Lui S0 hi(p1_coins)
- Addiu S0 S0 lo(p1_coins)
- lh t0 0x0 (S0)
- Lui S1 hi(p2_coins)
- Addiu s1 s1 lo(p2_coins)
- lh T1 0x0 (s1)
- Add a1 t0 t1
- li a0 0x1
- Jal 0x800F21C0
- Nop
- Li a1 0x1
- Li a0 0x0
- Jal 0x800F21C0
- Nop
- Lui S0 hi(p1_stars)
- Addiu S0 S0 lo(p1_stars)
- Lb T0 0x0 (S0)
- Lui S1 hi(p2_stars)
- Addiu s1 s1 lo(p2_stars)
- Lb T1 0x0 (s1)
- Add t1 t0 t1
- li t0 0x0
- sb t0 0x0 (s0)
- sb t1 0x0 (s1)
- J end
- Nop
- Player2:
- Lui S0 hi(p2_coins)
- Addiu S0 S0 lo(p2_coins)
- lh T0 0x0 (S0)
- Lui S1 hi(p1_coins)
- Addiu s1 s1 lo(p1_coins)
- lh T1 0x0 (s1)
- Lui s2 0x800C
- Addiu s2 s2 0xd05a
- Lb t2 0x0 (s2)
- Lb t3 0x0 (s2)
- Add a1 t0 t1
- Beq t2 t3 lastturn1
- nop
- li a0 0x0
- Jal 0x800F21C0
- Nop
- Li a1 0x1
- Li a0 0x1
- Jal 0x800F21C0
- Nop
- J loadstars2
- Nop
- loadstars2:
- Lui S0 hi(p2_stars)
- Addiu S0 S0 lo(p2_stars)
- Lb T0 0x0 (S0)
- Lui S1 hi(p1_stars)
- Addiu s1 s1 lo(p1_stars)
- Lb T1 0x0 (s1)
- Add t1 t0 t1
- Beq t2 t3 storelast1
- li t0 0x0
- sb t0 0x0 (s0)
- sb t1 0x0 (s1)
- J end
- Nop
- lastturn1:
- Li a0 0x0
- Jal 0x800F21C0
- Nop
- Li a0 0x1
- Jal 0x800F21C0
- Nop
- J loadstars2
- Nop
- storelast1:
- Sb t1 0x0 (s0)
- Sb t1 0x0 (s1)
- J end
- Nop
- Team2:
- Beq a0, v0, Player4
- Nop
- J Player3
- Nop
- Player3:
- Lui S0 hi(p3_coins)
- Addiu S0 S0 lo(p3_coins)
- lh T0 0x0 (S0)
- Lui S1 hi(p4_coins)
- Addiu s1 s1 lo(p4_coins)
- lh T1 0x0 (s1)
- Add a1 t0 t1
- li a0 0x3
- Jal 0x800F21C0
- Nop
- Li a1 0x1
- Li a0 0x2
- Jal 0x800F21C0
- Nop
- Lui S0 hi(p3_stars)
- Addiu S0 S0 lo(p3_stars)
- Lb T0 0x0 (S0)
- Lui S1 hi(p4_stars)
- Addiu s1 s1 lo(p4_stars)
- Lb T1 0x0 (s1)
- Add t1 t0 t1
- li t0 0x0
- sb t0 0x0 (s0)
- sb t1 0x0 (s1)
- J end
- Nop
- Player4:
- Lui S0 hi(p4_coins)
- Addiu S0 S0 lo(p4_coins)
- lh T0 0x0 (S0)
- Lui S1 hi(p3_coins)
- Addiu s1 s1 lo(p3_coins)
- lh T1 0x0 (s1)
- Lui s2 0x800C
- Addiu s2 s2 0xd05a
- Lb t2 0x0 (s2)
- Lb t3 0x0 (s2)
- Add a1 t0 t1
- Beq t2 t3 lastturn2
- nop
- li a0 0x2
- Jal 0x800F21C0
- Nop
- Li a1 0x1
- Li a0 0x3
- Jal 0x800F21C0
- Nop
- J loadstars4
- Nop
- loadstars4:
- Lui S0 hi(p4_stars)
- Addiu S0 S0 lo(p4_stars)
- Lb T0 0x0 (S0)
- Lui S1 hi(p3_stars)
- Addiu s1 s1 lo(p3_stars)
- Lb T1 0x0 (s1)
- Add t1 t0 t1
- Beq t2 t3 storelast2
- li t0 0x0
- sb t0 0x0 (s0)
- sb t1 0x0 (s1)
- J end
- Nop
- lastturn2:
- Li a0 0x3
- Jal 0x800F21C0
- Nop
- Li a0 0x2
- Jal 0x800F21C0
- Nop
- J loadstars4
- Nop
- storelast2:
- Sb t1 0x0 (s0)
- Sb t1 0x0 (s1)
- J end
- Nop
- end:
- Lw s0 0x60(sp)
- Lw s1 0x5c(sp)
- Lw s2 0x58(sp)
- Lw s3 0x54(sp)
- Lw RA 0x50(sp)
- lw t1 0x4c(sp)
- lw t2 0x48(sp)
- lw t3 0x44(sp)
- lw t4 0x40(sp)
- lw v0 0x3c(sp)
- lw a0 0x38(sp)
- lw a1 0x34(sp)
- JR RA
- Addi Sp sp 100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement