- Code:
#perfect ai drive
;credit sdrawkcab
;press up for normal ai
;press down for super speed
;cant crash on normal mode
;on screen timer
;race, tournament & eliminator only
0x00001000 0x3c0808b0
0x00001004 0x850859f4
0x00001008 0x20090010
0x0000100c 0x200a0040
0x00001010 0x15280005
0x00001014 0x00000000
0x00001018 0x0a200410
0x0000101c 0x00000000
0x00001020 0x03e00008
0x00001024 0x00000000
0x00001028 0x15480003
0x0000102c 0x00000000
0x00001030 0x0a20041b
0x00001034 0x00000000
0x00001038 0x03e00008
0x0000103c 0x00000000
0x00001040 0x3c0808ab
0x00001044 0x8d080ba0
0x00001048 0x11000006
0x0000104c 0x3c090000
0x00001050 0x35290800
0x00001054 0xad091118
0x00001058 0x3c0a0000
0x0000105c 0x354a0000
0x00001060 0xad0a0090
0x00001064 0x03e00008
0x00001068 0x00000000
0x0000106c 0x3c0808ab
0x00001070 0x8d080ba0
0x00001074 0x11000006
0x00001078 0x3c090000
0x0000107c 0x35290a00
0x00001080 0xad091118
0x00001084 0x3c0a0000
0x00001088 0x354a0000
0x0000108c 0xad0a0090
0x00001090 0x03e00008
0x00001094 0x00000000
0x000000cc 0x0a200400
Post: #1Fri May 11, 2012 11:06 am
sdrawkcab
Senior Member
Post: #2Fri May 11, 2012 10:08 pm
Brian-1337-
Senior Member
if you are going to use this template using other buttons(like triangle and square) the second branch command will not activate while the first branch command is working, but your code is still fine cuz you cant press/hold the dpad up and down at the same time.
Post: #3Sat May 12, 2012 12:36 am
sdrawkcab
Senior Member
Brian-1337- wrote:if you are going to use this template using other buttons(like triangle and square) the second branch command will not activate while the first branch command is working, but your code is still fine cuz you cant press/hold the dpad up and down at the same time.
yea i know i purposely did that because it wouldn't really make scene if you could use fast ai and regular ai at the same time. one question, would this work : instead of bne nop then J then jr ra could you just use beq nop jr ra
Post: #4Sat May 12, 2012 6:40 pm
Brian-1337-
Senior Member
lol why are you gonna use beq in one button jokering...? if you want to make your code more small you can do this.sdrawkcab wrote:Brian-1337- wrote:if you are going to use this template using other buttons(like triangle and square) the second branch command will not activate while the first branch command is working, but your code is still fine cuz you cant press/hold the dpad up and down at the same time.
yea i know i purposely did that because it wouldn't really make scene if you could use fast ai and regular ai at the same time. one question, would this work : instead of bne nop then J then jr ra could you just use beq nop jr ra
Delete the jr ra on the first bne, because it will no longer go to the "jr ra" after the "j" if the bne is executed so its just waste of lines.
- Code:
bne s, t, $joker 1, branch to next bne
nop
j $code 1 subroutine location
nop
bne s, t, $joker 2, branch to jr ra
nop
j $code 2 subroutine location
nop
jr ra
nop
- Code:
beql s, t, $joker 1, branch to next beql
j $code 1 subroutine location
nop
beql s, t, $joker 2, branch to jr ra
j $code 2 subroutine location
nop
jr ra
nop
Post: #5Sun May 13, 2012 12:12 am
sdrawkcab
Senior Member
wait so why would this not work?
lui t0 $first half controller
lw t0 $second half controller(t0)
addiu t1, zero $button value
beq t1, t0 $branch to start of sub
nop
jr ra
btw thanks for advice (:
lui t0 $first half controller
lw t0 $second half controller(t0)
addiu t1, zero $button value
beq t1, t0 $branch to start of sub
nop
jr ra
btw thanks for advice (:
Post: #6Sun May 13, 2012 12:28 am
Brian-1337-
Senior Member
you mean this, right?sdrawkcab wrote:wait so why would this not work?
lui t0 $first half controller
lw t0 $second half controller(t0)
addiu t1, zero $button value
beq t1, t0 $branch to start of sub
nop
jr ra
btw thanks for advice (:
- Code:
lui t0, $first half controller
lw t0, $second half controller(t0)
addiu t1, zero, $button value
beq t1, t0, $branch to start of code subroutine
nop
jr ra
nop
// code subroutine
jr ra
nop
if you want jokering with two button you should do like this.
- Code:
lui t0, $first half controller
lw t0, $second half controller(t0)
addiu t1, zero, $first button value
addiu t2, zero, $second button value
beq t1, t0, $branch to start of first code subroutine
nop
j $jump to beq t2, t0, $
nop
// first code subroutine
jr ra
nop
beq t2, t0, $branch to start of second code subroutine
nop
jr ra
nop
// second code subroutine
jr ra
nop
you should think more how to activate them at the same time.
Similar topics
Permissions in this forum:
You cannot reply to topics in this forum