PDA

View Full Version : Wii Classic Controller - ANALOG INPUT to PJ64!!!


CamAnderson22
14th January 2015, 05:52 PM
I was looking around on Glovepie and Project 64 for people who had been successful in achieving true analog joystick input to PJ64, but I couldn't find any.
Now, please let me know if this has already been achieved, but using N-Rage's Input Plugin V2 on PJ64 with the Analog Stick mapped to the Mouse axis, and GlovePie code that converts the Wii Classic controller-Left joystick input into mouse velocity, I can control the N64 analog joystick with true variable-speed analog input. (and also by triggering the Lock/Unlock Mouse shortcut in the controller plugin, so that you don't see the mouse flying all over the screen)

Other users I have seen do this have only mapped out the Classic controller joystick to keyboard keys, which isn't as accurate as the analog input, and doesn't allow for variable speed.

As for all the rest of the buttons on the N64 controller, I mapped those out to keyboard keys, and mapped the keys to be triggered by the Classic controller button presses, (and the C-buttons to the Right Joystick)

Here is my GlovePie code: Try it for yourself and tell me how it goes. The game I tested with was Paper Mario 64 and Super Mario 64.

//Right Stick - C-buttons
if wiimote1.Classic.RightStickY > 0.38 {
pressed(key.k) = true
}
if InRange(wiimote1.Classic.RightStickY, -.37, .37) then
released(key.i) = true
released(key.k) = true
}
if wiimote1.Classic.RightStickY < -0.38 {
pressed(key.i) = true
}
if wiimote1.Classic.RightStickX > 0.38 {
pressed(key.j) = true
}
if InRange(wiimote1.Classic.RightStickX, -.37, .37) then
released(key.j) = true
released(key.l) = true
}
if wiimote1.Classic.RightStickX < -0.38 {
pressed(key.l) = true
}
endif

//Left Stick - Analog input/Mouse Movement
Mouse.DirectInputX = Mouse.DirectInputX + 20*deadzone(Wiimote1.Classic.LeftStickX)
Mouse.DirectInputY = Mouse.DirectInputY + 20*deadzone(Wiimote1.Classic.LeftStickY)

//Keyboard keys - other controller functions
key.space = classic1.ZL
key.dot = classic1.b
key.Comma = classic1.y
key.enter = classic1.start
key.z = classic1.Lfull
key.x = classic1.RFull

sanamgulzar
30th January 2015, 11:29 AM
Other users I have seen do this have only mapped out the Classic controller joystick to keyboard keys, which isn't as accurate as the analog input, and doesn't allow for variable speed.