Max GCN Analog/C Stick Values in RAM??
Maybe you know this one Joshua since you have made a code using the analog stick...

On Dolphin, I use the keyboard. I don't have a GCN to USB adapter, maybe one day I will get one..

Whenever you press any key for a directional input of Analog Stick or C stick, the corresponding byte value goes from 0x80 to 0x00/FF (depending on which direction). A long time ago I remember trying to make a quick code to read something like... cmpwi rX, 0xFF. But the code would never work, it was a just a quick test on an already working code. I'm guessing the byte output is slightly off because a keyboard is being used?

So my question is, (on a real wii console with a real GCN), does this value ever reach the far limit of 0x00/FF? If not, what is the far limit?
For GCN, the far limit for holding up on the analog stick is around 0xE8. Holding down is around 0x1A. Yeah real controllers (except maybe Wii Wheel) never reach the limit.

If you look at my Dynamic Gravity code's ASM, the values used there are a good reference to use. I haven't ever tested the c-stick, so I will do that today.

Also, I know I've seen addresses for the controllers that handle the analog stick inputs as signed values, going from -0x80 to 0x7F, so maybe you should have me re-find and test the inputs for those addresses instead? Because then you could do much simpler cmpwi statements instead of cmplwi statements.
Super Mario Eclipse, what Super Mario Sunshine could've been.
Ye you may be right about the Wii Wheel, very overpowered directional inputs for that controller.

And I only need you to test the C-Stick values, it is very much appreciated. I'll work with the current addresses that are used in your Dynamic Gravity code. Considering X/Y Axis for C stick is the very next halfword after Analog Stick, that will be easy to use.

I was bored and did a Read BP on a random person's old code and happen to stumble across something pretty neat (have to use floaters for this). Don't wanna leak it. I don't know when I will get this done.
Super Mario Eclipse, what Super Mario Sunshine could've been.
Yea after more review I need to know the max (high) value for C stick up, and the max (low) value for C stick down.

Then I need the corresponding X/Y axis values for these diagonal inputs. right+up , and left+down.

I got this working on Dolphin, but Console is being an issue... This code is super epic. Thx for all of your help.
Here are the input ranges for GCN

GCN 0x3E82 (+2 on the offset value for C-stick)

Analog Stick: Up/Down (Works for Left/Right as well) -0x98 / 0x71, (Full Up/Right) 0x57 / 0x57, (Full Down/Left) -0xB6 / -0xB6
C-Stick: Up/Down (Works for Left/Right as well) -0xA0 / 0x60, (Full Up/Right) 0x46 / 0x46, (Full Down/Left) -0xBE / -0xBE

GCN 0xC202 (+2 on the offset value for C-stick)

Analog Stick: Up/Down (Works for Left/Right as well) 0x10 / 0xEA, (Full Up/Right) 0xCD / 0xCD, (Full Down/Left) 0x30 / 0x30
C-Stick: Up/Down (Works for Left/Right as well) 0x20 / 0xE0, (Full Up/Right) 0xC7 / 0xC7, (Full Down/Left) 0x3E / 0x3E

The only real difference between the two is that one is signed and the other isn't. Generally if you are looking for just full directional inputs to work, you just go for around 5 less than these values, so 0x71 becomes 0x6C, -0x98 becomes -0x9D, and so on.
Super Mario Eclipse, what Super Mario Sunshine could've been.
Thank you thank you.

Once console testing is complete, I'll post my code. I also have some other 'crap' codes made during this whole process. Some nops and other things.
That's how it goes for me
Super Mario Eclipse, what Super Mario Sunshine could've been.

Forum Jump:

Users browsing this thread: 1 Guest(s)