Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:49 03 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Question on WII Classic Controllers

Author Message
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 405
Posted: 08:47pm 03 Oct 2020
Copy link to clipboard 
Print this post

Looking at the 5.05.05 manual, I don't see any support for the D-pad (hilited in photo below) in the CLASSIC() function, although all other analog controls and buttons are supported. Am I missing something?

-Bill


 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:09pm 03 Oct 2020
Copy link to clipboard 
Print this post

B returns a bitmap of the state of all the buttons. A bit will be set to 1 if the button is pressed.

The button bitmap is as follows:
BIT 0: Button R
BIT 1: Button start
BIT 2: Button home
BIT 3: Button select
BIT 4: Button L
BIT 5: Button down cursor
BIT 6: Button right cursor
BIT 7: Button up cursor
BIT 8: Button left cursor
BIT 9: Button ZR
BIT 10: Button x
BIT 11: Button a
BIT 12: Button y
BIT 13: Button b
BIT 14: Button ZL


Bits 5 to 8 work for me.
VK7JH
MMedit
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 405
Posted: 09:13pm 03 Oct 2020
Copy link to clipboard 
Print this post

LOL, thanks! I guess the 'cursor' name was throwing me off; everyone I know always calls it the directional pad, or DPad for short.

Thanks!
-Bill
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025