![]() |
| |
Thread Tools Display Modes |
|
another mips question
Ok,you know how with a joker command,if you hit "that" button it changes the data,well is it possible, in a sub routine to "activate" a button or set of buttons?Like ...if v0 = 1 then press the "x" button?
|
|||||||
|
Yup.. One way is to loadword from the address that you normally use for jokers, then and the register so you can set a value (hex joker) and have a branch set to not branch at the change of the register and activate what you want..
Example: 3C010070 8C21D49C- loads from 006fd49c 30210002- ands a value of 2 which would be L3 14200002-branches if (at) not equal to zero 3C0342C8- creates upper immediate value into reg v1 AE2303E4- storing word at $03e4(s1) with value from v1 03E00008- return the example code by CMX for some game i don't remember.. Last edited by JohnnyHax; 10-05-2007 at 02:28 PM.. |
|||||||
|
I may be wrong but I think you misunderstood my question,I believe your example says if the subroutine is read,and you hit l3,then change the data.I wanted to have it so if the subroutine is read,then it automatically activated L3 for me,without actually hitting the button.For example,if i walk up to a ledge,(jump to my subroutine),activate the x button to jump thru a code...
|
|||||||
|
ohhh yeah sorry. I thought maybe you wanted your subs to have jokers built in basically..
but im sure that would work also if you switched some things around, stored instead of loaded possibly, would be pretty much the same concept though i would think.. |
|||||||
|
just change it to store to the joker address, it's only going to give you a quick button tap though.
this is part of something I made for s2, basically the joker address is 0045259c, and 'bfff' is the button combo I needed, so I only needed to write the 'bf' byte. it's the second byte at 0045259c, so you add 1 to it (0045259d), so you're storing the byte in the right spot Code:
# 000c2ffc:000000bf / data lui t1, $0045 # 000c3000:3c090045 t1=$00450000 /// joker address offset lui t2, $000c # 000c3004:3c0a000c t2=$000c0000 /// data offset lb t3, $2ffc(t2) # 000c3008:814b2ffc t3=$000c2ffc /// loads data into t3 sb t3, $259d(t1) # 000c300c:a12b259d [0045259d] /// writes t3 to joker address jr ra # 000c3010:03e00008 |
|||||||
|
Thank you! Im gonna give this a shot...
|
|||||||
|
nice! that looks simpler and better than what i was thinking of, but i made this just messin around with all the ideas in here a little bit ago, just used Uni's range hook lol, it presses X repeatedly when the climb icon shows up, so it climbs by itself. Pointless i guess but can be changed and used for other things,, its for s2 also
Auto Climb 20216D80 0C030020 200C0080 3C020044 200C0084 804F8DC3 200C0088 31EF0001 200C008C 11E00003 200C0090 3C020045 200C0094 240100BF 200C0098 A041259d 200C009C 03E00008 |
|||||||
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|












Linear Mode
