Difference between revisions of "SDL Wii"
m (→See Also) |
Gamewizard71 (talk | contribs) m |
||
Line 4: | Line 4: | ||
| type = framework library | | type = framework library | ||
| author = Numerous | | author = Numerous | ||
− | | maintainer = Tantric | + | | maintainer = [[User:Tantric|Tantric]] |
| download = http://code.google.com/p/sdl-wii/downloads/list | | download = http://code.google.com/p/sdl-wii/downloads/list | ||
| source = http://code.google.com/p/sdl-wii/source/checkout | | source = http://code.google.com/p/sdl-wii/source/checkout |
Revision as of 02:14, 16 September 2009
SDL Wii | |
![]() | |
General | |
---|---|
Author(s) | Numerous |
Maintainer(s) | Tantric |
Type | Framework library |
Links | |
Download | |
Source |
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, and video. It is used by MPEG playback software, emulators, and many popular games. SDL is written in C, but works with C++ natively.
SDL support on Wii is currently incomplete. Although SDL is useable, you will likely experience problems until this is rectified. Please contribute any improvements you make to the SDL Wii SVN.
Usage
- Grab the latest libogc and libfat from the devkitPro SVN. You will need an SVN client to do so. To compile libogc: run 'make' and then 'make install'. To compile libfat: run 'make ogc-release' and then 'make ogc-install'.
- Copy all of the SDL files (dependencies and SDL port) to the libogc folder (on Windows by default this is c:\devkitPro\libogc).
Remember to link the libraries in the right order:
LIBS := -lSDL_net -lSDL_ttf -lSDL_gfx -lSDL_mixer -lSDL_image -lSDL \ -lsmpeg -ljpeg -lpng -lfreetype -ltremor \ -lz -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard
Use your friend google to learn how to use SDL.
There is also additional installation help available.
Tutorial
A simple but currently incomplete tutorial can be found here. Made by GabberNL.
Tips
SDL Wii's video output uses GX, so you might want to disable the console output you see at bootup:
extern const devoptab_t dotab_stdnull; devoptab_list[STD_OUT] = &dotab_stdnull; devoptab_list[STD_ERR] = &dotab_stdnull;
Using SDL
SDL has graphics, sound, and input all in one. SDL is a very popular library used in many open source programs. It is most commonly used in games, but it is also used in emulators and media players. SDL is very easy to use and it is very easy to port apps that use it.
SDL joystick mapping
The sticks and axes are mapped this way:
SDL axis | ![]() |
![]() |
![]() |
Comments |
---|---|---|---|---|
0 (horizontal) | ![]() |
![]() |
Only one expansion can be connected | |
1 (vertical) | ![]() |
![]() | ||
2 (horizontal) | ![]() | |||
3 (vertical) | ![]() | |||
4 (horizontal) | ![]() | |||
5 (vertical) | ![]() |
The D-pads on the Wii Remote and the Classic Controller are mapped as a joystick hat. Only one hat is reported per joystick, so when Classic Controller is plugged in, the D-pad on the Wii Remote is ignored. As far as orientation, SDL_HAT_UP is the up button on the Wii Remote's D-pad when it's held in horizontal position (with D-pad to the left).
The wiimote buttons are mapped this way in SDL:
SDL button index | ![]() |
![]() |
![]() |
---|---|---|---|
0 | ![]() | ||
1 | ![]() | ||
2 | ![]() | ||
3 | ![]() | ||
4 | ![]() | ||
5 | ![]() | ||
6 | ![]() | ||
7 | ![]() | ||
8 | ![]() | ||
9 | ![]() | ||
10 | ![]() | ||
11 | ![]() | ||
12 | ![]() | ||
13 | ![]() | ||
14 | ![]() | ||
15 | ![]() | ||
16 | ![]() | ||
17 | ![]() | ||
18 | ![]() | ||
19 | ![]() |
Bugs
- SDL_gfx eats up memory and can cause code dumps. If you get code dumps then try removing SDL_gfx.
- There are no other known bugs besides the ones from the original SDL.
Source
Many authors have contributed to the SDL Wii port over the years. The original source is from libSDL. A GameCube version was found in the devkitPro CVS repository. Mindcry made the port compatible with the Wii and added on sound, SDL_mixer and SDL_image. Devildante recompiled a version of SDL_image with libjpeg support, and added SDL_gfx and SDL_ttf with FreeType. Numerous changes were also made by Yohannes (threading, audio, etc), and David Hudson updated to the latest SDL SVN. Tantric has also rewritten portions, including the file access, audio, and video systems.