In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "Talk:SDL Wii/tutorial"

From WiiBrew
Jump to navigation Jump to search
Line 62: Line 62:
 
there seems to be big problems with getting sdl-wii working - i tried downloading devkitpro and the precompiled sdl (didn't work), updated libogc and sdl-wii to the latest svn builds (didn't work), kept the updated libogc and tried both of the older sdl-wii builds (04-23 and 05-13) - also didn't work, and gave me the same messages seen above. who the heck is daryl? what gives? some people clearly have found a way to make this work, why is it so inconsistent? [[User:Madmanguruman|Madmanguruman]] 02:53, 26 July 2009 (UTC)
 
there seems to be big problems with getting sdl-wii working - i tried downloading devkitpro and the precompiled sdl (didn't work), updated libogc and sdl-wii to the latest svn builds (didn't work), kept the updated libogc and tried both of the older sdl-wii builds (04-23 and 05-13) - also didn't work, and gave me the same messages seen above. who the heck is daryl? what gives? some people clearly have found a way to make this work, why is it so inconsistent? [[User:Madmanguruman|Madmanguruman]] 02:53, 26 July 2009 (UTC)
 
: The latest svn of everything works. Yes, I know, it would be nice if the latest releases of both libogc and SDL Wii worked together. But, alas it's not the case. The piece you're probably missing is to change your makefile. Take a look at [[Super Mario War Wii]]'s Makefile or other such projects. --[[User:Tantric|Tantric]] 06:19, 26 July 2009 (UTC)
 
: The latest svn of everything works. Yes, I know, it would be nice if the latest releases of both libogc and SDL Wii worked together. But, alas it's not the case. The piece you're probably missing is to change your makefile. Take a look at [[Super Mario War Wii]]'s Makefile or other such projects. --[[User:Tantric|Tantric]] 06:19, 26 July 2009 (UTC)
 +
:: nope - grabbed the super mario war makefile - still gettting SDL_main linker errors. severely frustrating that it "should" work, or it "works for person x" but the steps needed to actually '''make''' it work are either missing a critical step or are a function of chance more than anything... [[User:Madmanguruman|Madmanguruman]] 13:24, 26 July 2009 (UTC)

Revision as of 15:24, 26 July 2009

Wiimote buttons

What's the best way to use the Wiimote with WPAD_ScanPads or with Wiimote SDL joystick mapping? Because in your tutorial you are using WPAD's functions. Thanks, Crayon 16:21, 26 May 2009 (UTC)

Well, I don't know. Never tried it with SDL joystick mapping and I dont know how I can use it. If somebody can explain how to use joystick mapping I may add it in my tutorials. GabberNL 18:09, 26 May 2009 (UTC)
Thanks, it could be great to include it in your tutorials if you find out how to use SDL joystick mapping. -Crayon 19:15, 26 May 2009 (UTC)
If you want a joystick example, you can check the UAE Wii menu code here (until line 718). The SDL page describes the button mappings. It only shows the DPAD and buttons, but the rest is available in the man-pages. --SimonKagstrom 13:04, 27 May 2009 (UTC)
Thanks, I'll check that later -Crayon 17:46, 27 May 2009 (UTC)

GabberNL, I tried to use WPAD_ButtonsDown in my SDL game but only WPAD_ButtonsHeld seems to work (like in your tutorial). Do I need to do something special to make WPAD_ButtonsDown work? -Crayon 17:46, 27 May 2009 (UTC)

Well, does it compile? Because when I try it, it does compile so I think it will also work on the Wii (haven't tested it). Have you declared down the right way? like:
u32 down = WPAD_ButtonsDown(0);

GabberNL 18:25, 27 May 2009 (UTC)

That's exactly what I've tried, it's working in my non SDL game Wii-Tac-Toe. Every thing is compiling correctly, it's just not working with my SDL program! -Crayon 21:26, 27 May 2009 (UTC)
So it compiles with no problems. Thats good. What happens on the Wii? Does it give a code dump? Maybe you could paste here the source code so I can look into it. That would be much easier. GabberNL 11:06, 28 May 2009 (UTC)
When pressing a button on the Wiimote nothing happen, so no code dump. When I change WPAD_ButtonsHeld to WPAD_ButtonsDown in my code it stops working, so my code is should be fine. I'm going to try with simpler code, just in case it's something elsewhere in the code that as an effect on the Wiimote. -Crayon 12:54, 28 May 2009 (UTC)

Cannot compile the template

I copied the template and all the sdl includes with the libs and dependencies into the libogc folder. I tried to compile it using programmers notepad.

This is the output:

> "make" 
template.c

linking ... SDL_template.elf

c:/devkitPro/libogc/lib/wii\libSDL.a(SDL_wii_main.o): In function `main':

C:\Users\Daryl\Desktop\Projects\sdl-wii\SDL/src/main/wii/SDL_wii_main.c:68: undefined reference to `MOUSE_Init'

C:\Users\Daryl\Desktop\Projects\sdl-wii\SDL/src/main/wii/SDL_wii_main.c:69: undefined reference to `KEYBOARD_Init'

c:/devkitPro/libogc/lib/wii\libSDL.a(SDL_wiievents.o): In function `PumpEvents':

C:\Users\Daryl\Desktop\Projects\sdl-wii\SDL/src/video/wii/SDL_wiievents.c:64: undefined reference to `KEYBOARD_GetEvent'

C:\Users\Daryl\Desktop\Projects\sdl-wii\SDL/src/video/wii/SDL_wiievents.c:65: undefined reference to `MOUSE_GetEvent'

collect2: ld returned 1 exit status

make[1]: *** [/c/devkitPro/examples/wii/SDL_template/SDL_template.elf] Error 1

"make": *** [build] Error 2

> Process Exit Code: 2

> Time Taken: 00:02
I think this is because the most recent build needs to be used with the svn version of libogc. If you don't want to update libogc, download an older version of SDL, like this one: http://sdl-wii.googlecode.com/files/SDL%20Wii%2004-23-2009.zip -Crayon 18:31, 1 June 2009 (UTC)
Thanks Crayon, it worked. I made about 4 or 5 games on SDL for the pc last year. I think I'll port them to the wii now. --Sal3000 18:56, 1 June 2009 (UTC)
How do I update to the latest svn version of libogc? Can anyone confirm that this will work? Thanks. Charlatan 22:04, 17 June 2009 (UTC)
I also tried to update libogc to the latest svn version, but that still didn't solve the problem. It gave me alot more errors. So I uninstalled Devkit and all of his components and reinstalled it with this SDL version: [1] (the older one..) GabberNL 09:08, 18 June 2009 (UTC)

SDL_mixer to play modules?

Thanks for your tutorials. Do you (or anyone else) have a tutorial or example code for using SDL_mixer to play MOD/XM/IT/etc. files? I've found that gcmodplay doesn't play MODs properly. I'm hoping that SDL_mixer works better. Thanks in advance. Charlatan 04:12, 25 June 2009 (UTC)

Cannot find a working combination

there seems to be big problems with getting sdl-wii working - i tried downloading devkitpro and the precompiled sdl (didn't work), updated libogc and sdl-wii to the latest svn builds (didn't work), kept the updated libogc and tried both of the older sdl-wii builds (04-23 and 05-13) - also didn't work, and gave me the same messages seen above. who the heck is daryl? what gives? some people clearly have found a way to make this work, why is it so inconsistent? Madmanguruman 02:53, 26 July 2009 (UTC)

The latest svn of everything works. Yes, I know, it would be nice if the latest releases of both libogc and SDL Wii worked together. But, alas it's not the case. The piece you're probably missing is to change your makefile. Take a look at Super Mario War Wii's Makefile or other such projects. --Tantric 06:19, 26 July 2009 (UTC)
nope - grabbed the super mario war makefile - still gettting SDL_main linker errors. severely frustrating that it "should" work, or it "works for person x" but the steps needed to actually make it work are either missing a critical step or are a function of chance more than anything... Madmanguruman 13:24, 26 July 2009 (UTC)