Fairly advanced ASM - reading controller inputs

Started by Almas, November 27, 2009, 04:46:30 PM

Previous topic - Next topic

Almas

Okay, here's a set of assertions and inferences. Can anyone justify or deny any of them, leading towards the conclusion? Thanks.

A) The Wii is capable of reading analogue L/R presses from the Gamecube Controller.
B) In Super Smash Brothers Brawl, analogue L/R presses of the Gamecube Controller are not written into the observable RAM.

C) The writing of button presses into the observable RAM is performed by the processor.

C -> D) The processor can tell which buttons are being pressed by the Gamecube Controller.

A&D -> E) It is possible to write a set of ASM commands which read the analogue L/R presses of a Gamecube Controller and writes them into the observable RAM.



Given that these assertions are true, how would one go about writing such a code? I'm not familiar with any idea of how it would be done. It occurs to me (unlike in other circumstances) that the code must be similar between games, so if I can find the instructions for soft L/R presses in other games I should be able to translate them given a few nifty register swaps here and there.

Well, thanks.

wiiztec

I'm pretty sure the gamecube L & R triggers are not analog they don't do anything until you press them all the way down and hear the click
If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

Romaap

#2
You can try to find the L/R presses by just finding the space in RAM where all the GC controller stuff is stored.
The Wii controller buttons and motion sensing and stuff are always stored near each other, so if you look in the memory viewer (with auto-update on) near the address where the GC buttons are stored and you press the R/L a bit then you should see some values change.
If it is an analogue value, then you could just put a breakpoint on it to observe the ASM.

Almas

The Gamecube controller L/R buttons are analogue. See: Light Shielding in Super Smash Brothers Melee. The Wii is capable of reading said inputs, although I can't cite an example from the top of my head.

The Analogue inputs of the GC Controller have no effect on the Wii's RAM inside SSBB (or at least we are presuming this is true for the time being). SSBB reads only the Digital inputs of the L/R buttons. I am asking if it is possible to introduce ASM code which would enable the reading of the digital inputs.