Worklog Wii Touchscreen

Joined
Jun 21, 2016
Messages
350
Likes
493
Location
Northern New Jersey
Howdy Y'all. Been lurking around the community since the beginning of modretro, but what with the return of ShockSlayer and the OMGWTF trim I figured it was actually time for me to make some stuff. So here's my idea:

Wii portables work great for games that will take button or joystick input. Even accelerometer and MotionPlus control is completely conceivable. But pointer emulation is... well, as far as I know, non-existent. That is to say, the only way to get native on-screen cursor support is to point a paired Wiimote at a couple of infrared light sources. And for a handheld, that can be cumbersome.

Touchscreen control of the pointer would be awesome. A stylus-based touchscreen with hover support would be awesome-er. Generic analog control of the pointer with the flexibility to easily use any peripheral for control? Mind-numbingly awesometastic. At least I think so. And what with all the Wii portables the community's about to see, this could be a valuable feature.

Potential routes are emulation of the Pixart IR camera on a remote, ie: feeding transformed pointer information via microcontroller to the pins where the camera was formerly attached. Complete Wiimote emulation is another option, and might wind up being easier overall.

Besides this page at WiiBrew, is there any other Wiimote reverse-engineering documentation? I'd like to get the generic pointer control down first, and then translating data from a touch screen should be relatively easy. If anyone can point me in the right direction, I'd appreciate it. Otherwise, this thread will serve as my worklog.

Hope to share some progress soon!
 

JacksonS

.
.
.
Joined
Feb 17, 2016
Messages
301
Likes
576
Location
Boston, MA
Portables
6
I've been looking at Wii remote boards and I believe the IR camera communicates through I2C. It appears to work as a slave along with the extension port. As for the resistive touch screen, I've seen generic USB driver boards for them, but the touch panel could probably be wired directly to a microcontroller with analog inputs.
 

cheese

the tallest memer in town
Staff member
.
.
.
Joined
Mar 2, 2016
Messages
2,758
Likes
2,422
Location
Florida
Once portablizemii comes out I was thinking about working on a Wii remote replacement chip (much like Aurelio's gc controller board). I could add this functionality in as well, either with analog pins directly or with a secondary chip like an attiny through i2c. Nothing solid yet though.

As for docs, there aren't any/many afaik (most are for motion/head tracking projects), so we would most likely need to reverse engineer the protocol to replace the ir sensor
 
Joined
Jun 21, 2016
Messages
350
Likes
493
Location
Northern New Jersey
So, the Wiibrew documentation lists the entire(ish) pairing process. I'm working on setting up an arduino as a bluetooth slave device, and seeing if I can get it to pair with my Wii. Another potential route, the Wii devkits apparently came with wired Wiimotes... hmm...
 
Joined
Jun 21, 2016
Messages
350
Likes
493
Location
Northern New Jersey

Shank

Moderator
Staff member
.
.
Joined
Jan 31, 2016
Messages
1,286
Likes
2,723
Portables
6
I'm interested in this, but it's not something I have the skillset to do myself. Ill be following this project. Best of luck!
 

Law

.
Joined
Mar 24, 2016
Messages
11
Likes
24
Welp. Seems like someone is already well along. I'll look into the hardwiring though, and maybe see if I can port some of this to run on a lower-overhead platform (sans-linux)
The wmemulator.c file uses linux sockets/bluetooth (bluez) to get bluetooth data to/from the wii and the input.c file uses a library (sdl) to get keyboard input. Communication and input may need to be modified to suit whatever platform or device you want to run it on and what you want to use for input. The rest should be portable enough to run on anything.

Having said that, for a portable I think it may be worth investigating a way to bypass bluetooth altogether. I was thinking of just emulating the BT module so software could control all aspects of all wiimotes. But I hadn't heard anything about this hardwired wiimote business before. I wonder if a consumer wii would recognize a usb wiimote (just a usb HID instead of bluetooth).
 

JacksonS

.
.
.
Joined
Feb 17, 2016
Messages
301
Likes
576
Location
Boston, MA
Portables
6
I believe the wired Wii remotes have an RF cable attached:
 

ShockSlayer

the real
.
.
Joined
Jan 16, 2016
Messages
1,512
Likes
3,940
Location
standing up
Portables
please do not ask!!!! I will NOT respond
Having said that, for a portable I think it may be worth investigating a way to bypass bluetooth altogether.
Best way to go about this for sure. I'd rather use a GC controller for everything.
 
Joined
May 1, 2016
Messages
53
Likes
20
siiinnnnnnnnnn, lol, i'll suggest wiimote emulation via a Raspberry PI A+ or if you're really in for a trip, hook up all the lines to the Pixart camera except for the I2C pins and test how the host-slave data communication works. You'll probably fail without use of a logic analyzer of some sort. The camera is only rigged for blob detection to the best of my knowledge so that data should be small. I really like this area and I've come up with a few unique IR replacement solutions, PM me if you have any questions!
 
Joined
Jun 21, 2016
Messages
350
Likes
493
Location
Northern New Jersey
siiinnnnnnnnnn, lol, i'll suggest wiimote emulation via a Raspberry PI A+ or if you're really in for a trip, hook up all the lines to the Pixart camera except for the I2C pins and test how the host-slave data communication works. You'll probably fail without use of a logic analyzer of some sort. The camera is only rigged for blob detection to the best of my knowledge so that data should be small. I really like this area and I've come up with a few unique IR replacement solutions, PM me if you have any questions!
The concerns I have with that approach is that while the blob data is small, generating the blob data requires some pretty complex geometric transformations. Perhaps a little more than a micro-controller could do in real time.
 

Shank

Moderator
Staff member
.
.
Joined
Jan 31, 2016
Messages
1,286
Likes
2,723
Portables
6
Through nintendont you can emulate the gamecube controller's input through a USB port. This may be a dumb question, but could a similar principle be used to plug a USB resistive touch screen into the second USB port on the Wii?
 
Joined
Jun 21, 2016
Messages
350
Likes
493
Location
Northern New Jersey
Through nintendont you can emulate the gamecube controller's input through a USB port. This may be a dumb question, but could a similar principle be used to plug a USB resistive touch screen into the second USB port on the Wii?
Perhaps for Nintendont. That doesn't help the Wii game situation. Unless I'm missing something? I don't know a whole lot about Nintendont.
 
Joined
May 1, 2016
Messages
53
Likes
20
Through nintendont you can emulate the gamecube controller's input through a USB port. This may be a dumb question, but could a similar principle be used to plug a USB resistive touch screen into the second USB port on the Wii?
Absolutely not, Nintendont acts as a MIOS however it runs in Wii-mode so the application is still running above the gamecube game. This allows for custom code that can be handled by the Wii, bypassing the actual running game. When you play a Wii game the system is handed off to that game and the running IOS.
 

Shank

Moderator
Staff member
.
.
Joined
Jan 31, 2016
Messages
1,286
Likes
2,723
Portables
6
Ok that makes sense. Is there a way to modify the IOS to accomplish this, or is the only possible solution through an external device either communicate through/emulate the Bluetooth module?
 
Top