Button Activator activator

Started by Stuff, May 18, 2012, 02:12:37 AM

Previous topic - Next topic

Stuff

I'm just gonna copy and paste the code I want to edit.

Action Repeater (Press kick button after an action) [Doudley]
2865942A 7FFF8000
4A000000 90000000
1014AB45 00000000
E0000000 80008000

When you press (-) on the classic controller, this repeats your last action. However, (-) is also for switch axe burst and kicking and something about a sword and shield. I could change the buttons, but I like (-) as the repeat button. Instead, I want to somehow disable this code. So when I'm in an action repeater mood I can enable this, but otherwise it's off.

I wanted to make it a more general question, but it would've been harder to explain. So how would I disable/enable an activator?
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

dcx2

If you want a "toggle" type activator, put a CC before the 28 with whatever toggle activator you want.  e.g. press + and home to toggle whether the second code is active.  A 28, a CC, and then the original code.

If you want a "shift" type activator, just modify the first button activator.  So if you only want to have it happen if you hold C and press -, just change the first 28 code to whatever C and - are.

Stuff

Awesome. Thanks. Toggle is what I was looking for and it worked.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

Stuff

well it worked nicely, except now during some scenes, pressing + to skip it freezes the game. + is the button for action repeater too. The wii exception is caught in the codehandler and resetting it allows the game to unfreeze.

80002030:  7C8961AE   stbx   r4,r9,r12

r4:00000000   r5:00000000   r6:80000000   r7:80001808
  r8:00000004   r9:00000000  r10:00000000  r11:10000000
r12:00000005

That's the 00 thing. Mind you, it doesn't freeze without the toggle. Here's the code.

48000000 --------
DE000000 90009100
286593DC FF6F0090
CC000000 00000000
2865942A 7FFF8000
10000005 00000000
E0000000 80008000

I think the DE is not working probably.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

dcx2

That's a failed 00 write, alright.  (well, a failed 10 write in your case)

The DE check is working fine.  The problem is that the CC switch is klunky and awkward in how it controls execution status.  The CC can set execution status to "true" even if the DE check fails.

Put another DE check after the CC and before the 10 to prevent the CC from accidentally activating the write.

Stuff

ah alright. I'll have to move suicide to under it's own pointer loading lines.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

Bully@Wiiplaza

#6
The CC line is messy.
One has to put checks besides every write or else it´ll be a surprising freeze :P
I started to use F2 codes when the lines are ASM, it´s effective for C2 codes.
04 codes can also be applied to F2, one only needs to create a one instruction C2 code for this.

I remember that I converted the Action Repeater to C2 & C0 codetype for better compatibility.
[spoiler]Action Repeater -NTSCU- [Bully@Wiiplaza]
C2246B90 00000002
88830005 3D808160
906C0000 00000000
2865941A YYYYZZZZ
C0000000 00000004
3D808160 818C0000
2C0C0000 4182000C
39600000 996C0005
4E800020 00000000
E0000000 80008000
*Press your button(s) to repeat last action*
*Credits to Doudley*[/spoiler]
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

Stuff

Ah. CC is kind of like an endif. Not really, but you know. It gets up to the CC after the last if and decides what happens. That's why it wouldn't let me disable it sometimes. I was wondering why It could only disable it in the village or quest and not in the startup screen and stuff.

48
DE "Not good range"
toogle
CC "waiting for true"
28
10
E0

I moved 48 and DE under the CC and it worked. I had to isolate it from everything that uses the same pointer. But that's fine.

Quote from: Bully@Wiiplaza on June 08, 2012, 01:18:17 AM
I remember that I converted the Action Repeater to C2 & C0 codetype for better compatibility.
[spoiler]Action Repeater -NTSCU- [Bully@Wiiplaza]
C2246B90 00000002
88830005 3D808160
906C0000 00000000
2865941A YYYYZZZZ
C0000000 00000004
3D808160 818C0000
2C0C0000 4182000C
39600000 996C0005
4E800020 00000000
E0000000 80008000
*Press your button(s) to repeat last action*
*Credits to Doudley*[/spoiler]
I saw your code. I think that was the same hook that I tried to use and it had problems like turbo finger and it also only worked in quest.

Your code is also incredibly long. Even with a toggle, using just gecko codetypes is 3 lines shorter and it even works in the village/city. Action repeater is pretty fun outside of a quest.

In the C0, cmpwi r12,0 isn't a very good range check. Since it only runs in quest, when you return from the quest, 81600000 will still have a pointer. So it'll be not equal and won't skip the following stb. The only time it would be equal is everything up until you're in the village or the city gate or arena. Once that happens, it'll always be not equal. Unless the game clears it for whatever reason, but that looks like it's close to MID, so it probably never gets touched.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm