Main > Main Forum
Its time to give back...beginning work on Wiimote Driver
mhermann:
Well I have been a member here for around 3 years. I have been a big leech on these forums and rarely contributed anything myself. I am going to try and change that. There has been alot of talk about the Wiimote being a possible light gun solution. I among others have tried this and have not had complete success (I was able to play one-player Duck Hunt ;D ).
I started my research tonight and came across the following:
http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx
It is an API for communicating with the Wiimote. For those of you that have tried you have had to deal with Glovepie and PPjoy and that is not a viable solution for Mame. I am going to attempt to cut out the middle man and write a driver from scratch. I have some programming experience, have my masters in software engineering, but all of my experience has been in business applications and no low level programming, I am going to change that as well.
So here is my assessment of the problem that needs to be solved. If any of my assumptions are incorrect please let me know. I am basing this on the monstrosity of a post that is the LCD Top Gun Light Gun thread (46 pages and counting). I never bought those guns due to all the problems that they have but did plenty of reading about them.
1. Current problem with MAME is that the only way to play successfully with 2 light guns for all light gun games is to have both light guns be recognized as mice.
2. Problem with the guncons and LCD Top Guns are do to drivers and poor hardware implementation.
I am hoping the first problem can be overcome by writing a driver that treats the Wiimotes as vitual mice in the operating system. This would allow for us to map light guns the same way a trackball and spinner are mapped.
I am hoping that the second problem is overcome based on the Wiimote itself and its superior build quality over the LCD Top Guns. (Obviously the IR sensor will be needed)
Now I may be biting off more then I can chew, but I am going to attempt it anyway. If anyone has any input that might help please don't hesitate to speak up. I am in the research phase now and am getting my development environment up. (I have been managing the last few years so I need to get back to coding myself.)
Wish me luck. I'll need it.
mhermann:
Well its been 15 minutes and already my first set back. I was given some good advice by the who wrote the API in .Net. He suggested trying a C++ library someone else wrote based on his work because his Wiimote library is written in and for .NET while MAME and device drivers (typically) are written in C++ and compiled to native code.
So this is a drawback because I have 0 C++ experience. But I can handle setbacks. And the good news is that there is a C++ library already written that seems stable. But I am going to take a step back and start researching device drivers in general first as I was told they can be rather complicated which does not surprise me at all.
So if any of you device driver guys are out there and have any advise I am all ears. Oh and here is the link to that library if anyone else is interested:
http://wiiyourself.gl.tter.org/
TheShanMan:
I've never written drivers, but the majority of my work experience has been in C++ (> 10 yrs). While I have enough things going on currently that I can't commit to significant contributions here, I would certainly be willing to review code, offer suggestions, or whatever. I'm sure plenty of people here would lend a helping hand when possible. One thing about C++ that is different than .NET and Java is you have to manage memory allocations yourself, meaning beware of memory leaks! What languages do you have experience in?
BTW, you say "obviously the IR sensor will be needed." Could you explain this a little? Is it anything like the bars for the LCD Top Guns that you have to mount next to your monitor? One of the problems with that is that it's not ideal for cab use generally. I'm hoping there's nothing about the wiimotes that make them not ideal for cabs.
mhermann:
--- Quote from: TheShanMan on May 04, 2008, 01:09:49 am ---I What languages do you have experience in?
--- End quote ---
VB.net, C#, and C but that knowledge has gone 10 years without use.
--- Quote ---BTW, you say "obviously the IR sensor will be needed." Could you explain this a little? Is it anything like the bars for the LCD Top Guns that you have to mount next to your monitor? One of the problems with that is that it's not ideal for cab use generally. I'm hoping there's nothing about the wiimotes that make them not ideal for cabs.
--- End quote ---
That is it exactly. However, there is only one ir sensor at least when using the Wii. And we could come up with a hack for that to integrate into a cab.
wbassett:
Also there are wireless IR sensor bars now for the Wii mote, so no more ugly dangling wires. I can deal with one sensor bar for sure, and it probably can even be placed behind the plexi, although it would require easy access since the batteries would need to be changed now and then.
This is a very interesting project and could be one of the biggest leaps in a long time.
I have also seen several blogs and videos of people hacking the Wii mote for the PC and one gent even removed the 'motion sensor' and placed in the the barrel of his old Nintendo Zapper, so that opens up a lot fo flexibility for gun mods to be used.
I'm playing around with this two as well as checking out a slightly different path, but the Wii mote is definitely the way to go.
I'm not a programmer, I'm a hardware guy but if there is anything I can help out with I'd love to contribute as well.
Navigation
[0] Message Index
[#] Next page
Go to full version