Some questions about how to make codes

Started by Apache81, September 05, 2009, 07:27:43 AM

Previous topic - Next topic

Apache81

Hi guys,
I would like to make some particular piece of codes and I need some hel to understand how to do.

For 1st I would to make something like if you press this button you will enable this action; if you press this button again you will disable the previous action. To make it short an on/off switcher for codes.

As 2nd I would to make something like this:
I have the addressMaxValue and the addressCurrentValue
so
currentValue in addressCurrentValue = maxValue from addressMaxValue


At last I will appreciate if you can post a resource in which I can see how the Wii inputs are mapped in WiiRD language.

THANK YOU VERY MUCH !!!   :)


All my codes are made to work with Gecko, Coverfloader and WiiFlow... not sure about others !!!

Romaap

This would make a on/off switch code if I remember correctly:
28______ ZZZZYYYY  //this is the button activator
CC000000 00000000   //this is for the on/off switch
04______ XXXXXXXX  //this writes to the address
E0000000 80008000   //full terminator, acts as an EndIf

This would copy a value from 1 address and writes it to another:
82200000 ________  //loads the value at address ________ into gecko register 0
84200000 ________  //writes the value from gecko register 0 to ________

Apache81

#2
Thank you very much man !!!   :)

Post Merge: September 05, 2009, 06:22:14 PM

Sorry to bother but I need to know how to configure the button on/off switcher by having the code corresponding to the Wii input !!

For example I need to know how to set the coder switch on/off if I press "C" + "D-Pad Up".

Thanks !!!


All my codes are made to work with Gecko, Coverfloader and WiiFlow... not sure about others !!!

Almas

Whack in your controller. Start a search for an unknown value. Start a search for unknown (equal). Hold down a button. Start a search for unknown (not equal). Hold down another button. Start a search for unknown (not equal). This will tell you where the data for which buttons are being held is stored.

Regarding your other queries: I tend to stick to the easiest codetypes so I remember everything. This is how I would do them:

1)

I would have two data fields: one which describes if the button is currently being held (Call it A), and one to check which state the code is in (Call it B).

The code would check if the button is being held. If it is being held, and it wasn't being held before (A is set to 0), then it checks if the effects are active (If B is 1). The status of B is flipped, along with the code being activated or deactivated.
If A is 1 (e.g. the button is being held now, and it was before), nothing happens.
If the button is not being held, A is set to 0.

2)

Gecko Registers would make this task a lot easier. Get the code to load the current value into one gecko register, and compare it with the value stored in another register. If it is greater than it (you can find the addresses of the Gecko Registers: I believe they start from 80001800), then write that register to the location.

Then perform a button activator check. If it's held, just write the value of the max register to the location you like. Remember to use appropriate terminators for your Ifs in both codes, though.

Apache81

Thank you very much Almas !!!

However I found these 2 guides directly on the forum (thanks to OneUp and Romaap):
Button Activator Guide - RedSoxRox
Advanced Button Activator Guide - Link


All my codes are made to work with Gecko, Coverfloader and WiiFlow... not sure about others !!!