Commit Graph

114 Commits

Author SHA1 Message Date
Glenn Rice 02ce753b76 This is basicall linux code cleanup. We don not need to pass the X display handle from the video plugin anymore. The wiimote plugins now open their own display handles, and the GUI uses the display handle of the main window frame. Only the window handle from the video plugin is needed. The pWindowHandle variable now passes this instead of the display handle.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5884 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-16 14:14:57 +00:00
dapetcu21 0dc8833396 A multi-interface listener, threaded approach to UDPWii
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5821 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-03 04:56:37 +00:00
Soren Jorvang f4abbdf6b1 Fix nowx build.
We really should integrate the nowx functionality into the main build,
removing nowx and HAVE_WX checks and turning USE_WX into a variable
that defaults to GUI use but can be overridden at the command line.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5630 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-06 21:06:58 +00:00
Soren Jorvang c130aa7a36 Accept more special keys in previous.
Still doesn't make arrow keys work, though.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5623 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-05 19:17:17 +00:00
Soren Jorvang 5c335a8c85 Fixed WXKeyToString which had several problems, mostly just to get
hotkey configuration working with wx 2.9, but it turned out to be
too tempting to use it to hack up OS X keyboard support using wx
key events in the "old" input plugins.

It was with some reluctance that I used PAD_Input (and copied it
for Wiimote as well) as that is clearly a deprecated interface,
but this way the hack is contained within the old plugins for when
the switchover to ControllerInterface happens.

The idea is to provide stable keyboard support on OS X for both
GCPad and Wiimote while we debug HID keyboard and real 'mote code.

It works pretty well, although the wx approach does impose a few
limitations like no arrow keys and left/right side modifier keys
are considered equivalent.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5622 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-05 19:03:37 +00:00
snzgoo bdeefd361a MotionPlus code clean up and small code improvements.
Removing and adding some elements, making it more readable for others.
Off-Topic: Have fun at the Grandprix! May the best win:P

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5536 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-29 19:06:18 +00:00
snzgoo 58d64625f9 Stage2 is approaching: Redsteel2/WiiSportsResort is now working with Motionplus&Nunchuk, and the controls for the nunchuk are working now as well.
Apparently, motionplus games are very strict on calibration data checksums, they don't like invalid/0x00'd checksums(this is trackable via 0x01 writes to the active extension register at 0xA400F3). I'll keep all motion plus related stuff that I've discovered on my blog: http://snzgoo.blogspot.com
Next time I'll fix the disconnects, which are most likely caused by the sent motionplus empty/dummy data.
So stage2 might come sooner than u guys thought. Let me hear u scream;)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5522 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-28 02:45:10 +00:00
Soren Jorvang 3bf3c27d3e Fix comment pasto.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5485 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-26 20:47:15 +00:00
snzgoo 619dc12349 Stage1.continued: Introducing partial emulated MotionPlus+Nunchuk support, allowing us now for instance to get ingame on RedSteel2. However dont expect too much yet, since this is not completely finished. Wii Sports Resort with mp+nunchuk won't work yet and input from the nunchuk passed through the motionplus does not work properly either. Apart from that Stage1, is almost done.
Just minor stuff that needs to be finished: Dummy motionplus data needs to be kept dynamic(just like wiimote accel data), or it might cause disconnects after some time. Furthermore, there are 1-2 remaining register writes that have to be understood and emulated.(e.g. 0x00F3/F4). In the end just minor stuff. I'll address that in my next commit.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5476 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-26 15:41:47 +00:00
snzgoo 7742e1a6dd Stage1: Introducing MotionPlus as emulated extension, allowing us to boot games that require the MotionPlus itself.
I also already implemented most of the needed data structures and datareport handling for the motionplus-nunchuk passthrough mode, which I'll add up next as well.

Wii Sports Resort is now bootable by just using an emulated wiimote (only working under the old wiimote plugin atm,
I asked billiard to port my commit into his plugin since he knows his plugin better than me and its less work for him than for me,
I kept most parts of my code in modules to simplify that task).

Upcoming stage2: Faking the motionplus on the fly on real wiimotes, that means you will be able to play, e.g.  Redsteel2 with a real wiimote and nunchuk or wii sports resort with just your real wiimote.
and nunchuk, but w/o the need of having a real motionpluscontroller connected. The new Zelda 2010 will benefit by that, since it will require a motionplus controller.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5438 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-07 22:39:06 +00:00
Glenn Rice 63d296fcba Take care of a few more compiler warnings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5388 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-19 03:39:26 +00:00
dapetcu21 fe5fb76fd4 Added UDPWii (iPhone WiiMote) support.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5351 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-13 01:34:11 +00:00
Glenn Rice dc7029e7f4 Remove HaveFocus, and put that code into IsFocus. Thanks ayuanx.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5058 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-14 14:48:19 +00:00
Glenn Rice e5afde67ce In linux only read keyboard and mouse input when the emulator window has focus.
Also other code clean up.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5053 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-13 23:56:24 +00:00
Glenn Rice 5e6eecf0af Ok, this really does it.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5052 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-13 21:19:41 +00:00
Glenn Rice 24a4d1a1e0 Ok, now the mac build should be fixed
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5051 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-13 21:12:16 +00:00
Glenn Rice 47609c4524 Mac build fix to the issue caused by my last commit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5050 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-13 21:06:19 +00:00
Glenn Rice c2e0c75c93 EXPERIMENTAL
Removed X event loops from GCPad and Wiimote plugins, and implemented an asynchronous check for keyboard and mouse buttons.
Also added an X event loop in core that handles events while the emulator is paused.  Prevents unexpected behavior from events that occur while the emulator is paused.
Now there is only one event loop running at a time (besides those hidden in SDL).
I will revert this commit if other devs are unhappy with it.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5048 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-13 20:47:23 +00:00
Glenn Rice 10192a9a4b Change default wiimote emulation key settings to lowercase in linux
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4969 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-27 13:46:30 +00:00
Glenn Rice 36a5015bc0 Make arrow and home keys work in wiimote emulator.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4967 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-27 02:39:59 +00:00
Glenn Rice 727283c4de Added mouse support for linux. It is still rather crude, but it works.
Unfortunately the mouse pointer doesn't match up very well with the IR pointer yet.
Also, I had to add the PointerMotionMask to XSelectInput which adds overhead to the already stressed X event loops.  Five event loops by my count, really?


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4961 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-26 00:11:45 +00:00
Glenn Rice b17c5f3cf3 Fix the linux keyboard.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4951 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-24 18:23:47 +00:00
ayuanx f60c3e8445 Fixes Issue 1910
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4886 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-19 09:54:21 +00:00
ayuanx 92ef4f1156 1. Fixed the freeze issue in "Super Mario Galaxy" and other games, which was introduced since r4762
2. Fixed Issue 1909
   Multi-Nunchuck control problem

3. Updated SYSCONF, which should enable games that require MotionPlus, such as "Wii Sports Resort"

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4773 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-02 05:15:36 +00:00
ayuanx 25abd0f944 Small code cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4768 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-01 03:19:46 +00:00
ayuanx d62d6b0c33 Now Dolphin officially supports Multi-WiiMote (up to 4)
* You can connect/disconnect one or more WiiMote from Menu->Tools any time (must pause game first)

* Up to 4 Emulated Wiimotes can work together at the same timer

(PS: "Wiimote_Real" needs to be rewritten to support Multi-WiiMote, and it could be broken already now)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4736 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-27 19:31:02 +00:00
ayuanx 4240cf9053 Wiimote: More work, don't ask, no answer
nJoy: Maybe this could reactivate multi-pad?

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4729 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-25 22:10:56 +00:00
ayuanx 7d1fdb85f3 Implemented Nunchuck Roll/Pitch
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4702 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-17 14:15:56 +00:00
ayuanx 6f1efd4873 Rearranged EmuWiimote & nJoy. Wow they can share one pad at the same time, and they also can be enabled/disabled separately.
So as long as the game supports, you can toggle controller input between them on the fly.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4691 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-14 02:23:14 +00:00
ayuanx d476048359 Made Roll & Pitch independent from each other, you can set one to free swing while keeping the other in degrees.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4685 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-13 01:03:36 +00:00
ayuanx cca6f75110 Changed "Wiimote On" to "Input Active", so you can bypass Wiimote input when you want to use GC controller instead, even though their buttons are binded to the same keys/pads.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4681 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-11 13:57:25 +00:00
bztdlinux 851962977e Oops, fix shake which I broke :(
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4666 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-09 20:47:50 +00:00
bztdlinux 828bf052f0 Keyboard Wiimote emulation cleanup, phase one
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4665 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-09 16:33:32 +00:00
ayuanx c9f98d8f2b Reorganized Wiimote Config Dialog a bit to make it more compact
Fixed many wrongly named variables
Deleted many unreferenced variables

wxWidgets cleanup

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4663 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-09 14:52:30 +00:00
ayuanx 48896c7de2 1. Fixed a silly bug that prevented IR rotation in last rev from working, now IR rotation works fine, verified.
2. Added Roll Left/Right key mappings for keyboard.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4659 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-08 19:58:19 +00:00
ayuanx 80601f70c5 Makes IR dots rotate accordingly when EmuWiiMote rolling is performed, this function should be able to fix Issue 1740, but needs verification yet.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4657 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-07 18:51:20 +00:00
ayuanx 0238727c52 Wiimote cleanup, especially for Roll & Pitch, now accelerometer axes should be correct.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4654 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-06 18:26:20 +00:00
ayuanx db98709de0 Implemented Pad Rumble for Emu WiiMote, Currently this function is still quite basic and rough.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4649 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-06 01:15:13 +00:00
ayuanx 973441d703 Revert "shake" to the previous fierce one. Yes, some games require you to shake as hard as you possibly can. So better keep shake always hard.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4643 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-05 10:50:35 +00:00
ayuanx 24a785af59 With Roll & Pitch binding to "Keyboard" and both degrees setting to "Free Swing", the "Pitch Left" and "Pitch Right" keys on keyboard now work like "Swing to left" and "Swing to right".
This enables you to use knife on a keyboard instead of an analog stick in games of "Resident Evil: Umbrella Chronicles" and "Resident Evil: Darkside Chronicles".

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4642 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-04 21:13:27 +00:00
ayuanx c71adffa80 New Feature: Free Swing for EMU WiiMote
How to: First bind Roll & Pitch to "Analog 1" or "Analog 2", then set Roll Degree and Pitch Degree both to: "Free Swing".

Now in games, you can swing your emulated wiimote to Up/Down/Left/Right by simply pushing your binding analog stick to Up/Down/Left/Right.

PS:The swing direction will automatically adjust itself when "Upright Wiimote" option is checked.

Now you can play "Mad World" with emulated wiimote. :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4641 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-04 16:36:24 +00:00
ayuanx 4d512ecba7 1. Fixed the unbearable noise in "Resident Evil: Umbrella Chronicles", "Resident Evil: Dark Chronicles", and many other games.
No need to use "Sound Loop Hack", so I just removed it.

2. Fixed the WAD game loading issue. What can I say, I have to go though and patch all the WII_IPC_HLE devices to take care of this.

3. Applied tomman's Linux keyboard patch, but I can't test here, no suitable environment.

4. Disabled configuration dialogs when game is running, you have to pause game first to be able to change any configuration. (Which prevents some accidental crash to happen.)

5. Other trivial fixes, no need to mention.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4632 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-01 15:39:37 +00:00
luisr142004 9e17ee5155 fix a linux wiimote compile error and apply some little changes to the dx plugin :P
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4631 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-30 03:48:59 +00:00
ayuanx 5ef159a971 Now WiiMote button mapping supports both Keyboard & Joypad, or even mixed, no need to bother Xpadder. :)
But I've only tested on Win32 SDL, don't know about Linux or 360pad.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4630 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-29 17:58:52 +00:00
ayuanx 3e287233e9 Shake in last revision works, but not that sensitive.
So just updated the keyboard "shake" function a bit, this can dramatically increase the shake key sensitivity.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4625 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-28 18:37:57 +00:00
ayuanx ff23c02795 Now "Wiimote/Nunchunk Shake" on Keyboard works(for Win only).
Just press the "Shake" key.

The shake involves all the three axes: X, Y, Z.
So when you press the shake key, you are actually shaking not only up-down, left-right, and forward-backward at the same time.
I did this becuse different games may require different directional shake, no need to seperate them to 3 keys I think.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4624 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-28 18:00:07 +00:00
ayuanx 29774c35e8 My first commit :)
Fixed more memory leaks when doing state load. Now all file devices(handles) are stored in state, and this will fix some crash after loading state.

Warning: Do NOT Save/Load state before game title is shown and controllable, or else you will get a corrupt state.

If you encounter "Emu WiiMote Desync" frequently, please report the condition
(PS: To recover from wiimote desync, just load a saved state)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4608 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-24 17:10:38 +00:00
Shawn Hoffman 6a46befc2a commit ayuanx's patch from issue 1634. Fixes quite a few IPC + IPC_HLE + IPC_HLE_USB + wiimote problems, see the issue for full details
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4606 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-24 05:03:47 +00:00
Shawn Hoffman a5cde0d45b refine changes made in r4567
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4576 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-14 23:16:42 +00:00
Shawn Hoffman a60ad41d4d apply ayuanx's fix for classic controller events not being recognized if you are pressing certain combinations. fixes issue 1592
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4567 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-14 17:28:21 +00:00