Homebrew Project SDL 2 port ongoing

JeffRuLz

Well-Known Member
Member
Joined
Sep 14, 2018
Messages
165
Trophies
0
XP
2,603
Country
United States
If you are willing to create a branch of Abbaye which calls SDL_SetWindowDisplayMode to set the video mode, then it will be easier for me to add the missing support.
Apologies dude, I didn't notice you requested this until now. I made a branch here: https://github.com/JeffRuLz/abbayedesmorts-3ds/tree/wii

First of all, I made it so it sets the display mode to 320x240 if it detects a file called 240p.txt (here). I'm not really sure if I did that correctly.
Also, setting SDL_WII_JOYSTICK_SIDEWAYS doesn't seem to change anything. The d-pad is still oriented like the remote is upright. It's set before SDL_Init so I'm not sure what I'm doing wrong there.

And lastly, since this game runs at 256x192 I wanted to display it in the center of the screen with a border filling the remaining space. When the window size doesn't match the logical size then the game is displayed in the top left corner. I believe the standard SDL behavior is to center the screen to the window, but I may be remembering wrong.
 

Fancy2209

Member
Newcomer
Joined
Aug 8, 2021
Messages
17
Trophies
0
Age
23
XP
116
Country
Portugal

Fancy2209

Member
Newcomer
Joined
Aug 8, 2021
Messages
17
Trophies
0
Age
23
XP
116
Country
Portugal
Also, I (succesfully this time) ported Sonic Robo Blast 2.1.25 to the Wii, but the Joystick api reports there are 0 Joysticks avaliable, this prevents me from using any kind of controller, Wii Remote, Classic Controller or GameCube Controller.
Any ideas? It's not that great to need to plug a keyboard in.
This is the repo: https://github.com/Fancy2209/SRB2/tree/Wii2125
 
Last edited by Fancy2209,

mudrik

Member
OP
Newcomer
Joined
Nov 18, 2022
Messages
24
Trophies
0
Age
31
XP
215
Country
Turkey
Also, I (succesfully this time) ported Sonic Robo Blast 2.1.25 to the Wii, but the Joystick api reports there are 0 Joysticks avaliable, this prevents me from using any kind of controller, Wii Remote, Classic Controller or GameCube Controller.
Any ideas? It's not that great to need to plug a keyboard in.
This is the repo: https://github.com/Fancy2209/SRB2/tree/Wii2125
The problem is that joysticks take some time to appear. You can either change to the polling API, or add this at the beginning of the game (after SDL_init()):
while (SDL_NumJoysticks() == 0) { SDL_PumpEvents(); }
 

MoiCJarod

New Member
Newbie
Joined
Jun 15, 2024
Messages
1
Trophies
0
Age
43
XP
12
Country
France
Hello !
I'm a french computer science teacher triing to make my pupils code some retro games on the wii. Since this year I was using GRRLIB for graphics and asndlib for the sound. Found that sound library was not so good (only 1 sound at a time) and was seeking for other solutions. Then I saw that SDL2 was available in pacman for the wii and wanted to give it a try.

So i tried to compile an exemple (SudokuL) but I went into the "undefined reference to `SDL_main'" error.

steps :
Installing SDL2, SDL2_mixer, SDL2_ttf ... from pacman
downloading SudokuL sources and unzipping
renaming makefile_wii to Makefile
launching make then

/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wii/lib/libSDL2main.a(SDL_wii_main.o): in function `main': /home/davem/projects/devkitpro/pacman-packages/wii/SDL2/src/SDL2-2.28.5/_build/../src/main/wii/SDL_wii_main.c:86:(.text.startup.main+0xcc): undefined reference to `SDL_main' collect2: error: ld returned 1 exit status

What am I doing Wrong ?

Thanks in advance :-)

System : Ubuntu 22.04
 
Last edited by MoiCJarod,

Mode8fx

Active Member
Newcomer
Joined
Nov 14, 2019
Messages
31
Trophies
0
XP
219
Country
United States
Hello !
I'm a french computer science teacher triing to make my pupils code some retro games on the wii. Since this year I was using GRRLIB for graphics and asndlib for the sound. Found that sound library was not so good (only 1 sound at a time) and was seeking for other solutions. Then I saw that SDL2 was available in pacman for the wii and wanted to give it a try.

So i tried to compile an exemple (SudokuL) but I went into the "undefined reference to `SDL_main'" error.

steps :
Installing SDL2, SDL2_mixer, SDL2_ttf ... from pacman
downloading SudokuL sources and unzipping
renaming makefile_wii to Makefile
launching make then

/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.2.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wii/lib/libSDL2main.a(SDL_wii_main.o): in function `main': /home/davem/projects/devkitpro/pacman-packages/wii/SDL2/src/SDL2-2.28.5/_build/../src/main/wii/SDL_wii_main.c:86:(.text.startup.main+0xcc): undefined reference to `SDL_main' collect2: error: ld returned 1 exit status

What am I doing Wrong ?

Thanks in advance :-)

System : Ubuntu 22.04
You have to also move the makefile up a directory into SuDokuLVS2019. I put the makefiles in their own subdirectory a while back and forgot to update the readme accordingly; sorry about that!
 

Fancy2209

Member
Newcomer
Joined
Aug 8, 2021
Messages
17
Trophies
0
Age
23
XP
116
Country
Portugal
The problem is that joysticks take some time to appear. You can either change to the polling API, or add this at the beginning of the game (after SDL_init()):
while (SDL_NumJoysticks() == 0) { SDL_PumpEvents(); }
The game doesn't seem to call SDL_Init() in the way you expec as this is not working, and I don't want to rewrite SRB2's Gamepad Handling for the Polling API
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    No stay
  • SylverReZ @ SylverReZ:
    Clearly his alts are very easy to spot.
  • PandaPandel @ PandaPandel:
    why do people make alts
  • K3Nv2 @ K3Nv2:
    Doller store masks
  • SylverReZ @ SylverReZ:
    @PandaPandel, No idea. Mostly for ban evasion.
    +2
  • K3Nv2 @ K3Nv2:
    If you loose an email account and can't sign in its understandable most think it's funny and they can get away with it instead of trying to make amends over their actions unless they mess up so bad the entire community tells them to f off
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, or to test some stuff
  • PandaPandel @ PandaPandel:
    cri-mge
  • K3Nv2 @ K3Nv2:
    That's why I don't want my name all over the place people get things twisted over the smallest thing and it turns into a dumb ordeal
  • Xdqwerty @ Xdqwerty:
    good night
  • Sicklyboy @ Sicklyboy:
    damn, pretty ok
    price on that too
  • SylverReZ @ SylverReZ:
    @Sicklyboy, What's good
  • SylverReZ @ SylverReZ:
    @K3Nv2, Damn, those are sick.
  • Sicklyboy @ Sicklyboy:
    @SylverReZ, sup sylv! Watching a twitch streamer, trying to find things to 3d print that will help me organize things a little but, just chilling overall, hbu?
    +1
  • SylverReZ @ SylverReZ:
    @Sicklyboy, I'm doing good, thx. What are they 3D printing at the minute?
  • Sicklyboy @ Sicklyboy:
    Just printed one of these to hang my xbox one controller on the wall and get it off my desk
  • SylverReZ @ SylverReZ:
    Wow, nice. I see a very good use out of them.
  • K3Nv2 @ K3Nv2:
    @Sicklyboy, do you have a microcenter near yu always see cheap ssd but they sell out in like a hour
  • Sicklyboy @ Sicklyboy:
    @K3Nv2, kinda, about 45 minutes away or so
  • Sicklyboy @ Sicklyboy:
    I have a lot of microcenter SSDs, always grab some when I go in there. Always end up needing an SSD for a server or something
  • K3Nv2 @ K3Nv2:
    Sucks most the deals are pick ups
  • K3Nv2 @ K3Nv2:
    Microcenter like let's open stores but make people drive an hour out
  • B @ btjunior:
    all i did was upload some copyright protected files even after being warned smh
    B @ btjunior: all i did was upload some copyright protected files even after being warned smh