Homebrew Project Accelerated 2D operations in SDL

mudrik

Active Member
OP
Newcomer
Joined
Nov 18, 2022
Messages
25
Trophies
0
Age
31
XP
236
Country
Turkey
Hi all!
I'm happy to announce that I've added support for hardware-accelerated blit and fillrect operations to libSDL for the Wii and GameCube. I hope that the changes will be accepted into devkitPro's SDL port, but in any case in the meantime you can play with my fork (I'm not allowed to post links to this forum, but just append mardy/SDL to the github homepage and you'll find it).

The README file has step-by-step instructions on how to build the library, so hopefully it's something that you can try easily.

I've tried it on a few games already, and they do work, but they almost made no use of 2D operations (they mostly call SDL_LockSurface() and then handle pixels by hand), so this is not a full test. If you know of Wii games using SDL with many calls to SDL_FillRect or SDL_BlitSurface, please let me know, I will try to test them :-)

Now I'll go back to work on my little game, hopefully you'll get news about it in a couple of months :-)
 

Exidous

Well-Known Member
Member
Joined
Mar 2, 2021
Messages
416
Trophies
0
Age
44
XP
857
Country
United States
  • Like
Reactions: Disorarara

mudrik

Active Member
OP
Newcomer
Joined
Nov 18, 2022
Messages
25
Trophies
0
Age
31
XP
236
Country
Turkey
Thanks!

As for World of Goo, as far as I understand the game is not open source, so I'm afraid there's little we can do about it. I found this nice page of SDL games on the wiibrew wiki (https://wiibrew.org/wiki/Category:Homebrew_using_SDL_libraries -- finally I can post links, too :-) ), and I tried a couple of them. They do work, but all they do is direct pixel manipulation, so using my build of SDL doesn't bring a performance benefit in their case. But if someone knows of an open source Wii SDL game that has low FPS, please let me know, maybe we can do something about it.
 

nitr8

Well-Known Member
Member
Joined
Apr 4, 2007
Messages
381
Trophies
1
Website
vermillion57.wixsite.com
XP
1,584
Country
Gambia, The
Hi all!
I'm happy to announce that I've added support for hardware-accelerated blit and fillrect operations to libSDL for the Wii and GameCube. I hope that the changes will be accepted into devkitPro's SDL port, but in any case in the meantime you can play with my fork (I'm not allowed to post links to this forum, but just append mardy/SDL to the github homepage and you'll find it).

The README file has step-by-step instructions on how to build the library, so hopefully it's something that you can try easily.

I've tried it on a few games already, and they do work, but they almost made no use of 2D operations (they mostly call SDL_LockSurface() and then handle pixels by hand), so this is not a full test. If you know of Wii games using SDL with many calls to SDL_FillRect or SDL_BlitSurface, please let me know, I will try to test them :-)

Now I'll go back to work on my little game, hopefully you'll get news about it in a couple of months :-)

Did you actually TEST this?

I have several SDL projects running with the original SDL library and some tweaks.
Yet, I've never managed to get above more than 8bpp for that one.

The / your repository over at GitHub doesn't even show anything on the screen.
I have a nice black screen all the time.
All I can hear is sound and that's it.

The same applies to the ogc-sdl-1.2 branch of "devkitPro".

Yet, it would be good to know which devkitPro release to use to make it work properly because right at this moment it doesn't.
I'm currently porting another game to the Wii where graphics and sound work for the original SDL library as mentioned above but as soon as I use your library code, it just won't.

Thanks in advance.

EDIT: Forget about it - I just got it to work.
 
Last edited by nitr8,

mudrik

Active Member
OP
Newcomer
Joined
Nov 18, 2022
Messages
25
Trophies
0
Age
31
XP
236
Country
Turkey
EDIT: Forget about it - I just got it to work.
Nice!

By the way, my changes have not yet been merged upstream, the only reason being that other changes were merged in between and I haven't yet got back to fix the conflict and resubmit it, but it's in my TODO list. :-)
 

nitr8

Well-Known Member
Member
Joined
Apr 4, 2007
Messages
381
Trophies
1
Website
vermillion57.wixsite.com
XP
1,584
Country
Gambia, The
Nice!

By the way, my changes have not yet been merged upstream, the only reason being that other changes were merged in between and I haven't yet got back to fix the conflict and resubmit it, but it's in my TODO list. :-)
Question:

Why is in the devkitpro branch "ogc-sdl-1.2" of SDL for the Wii assumed, 8bit == 16bit?

I'm specifically referring to this particular line:

https://github.com/devkitPro/SDL/blob/ogc-sdl-1.2/src/video/ogc/SDL_ogc_video.c#L679

I couldn't make this branch work on my project which makes use of 8bpp only.

Compared to the original SDL port to the Wii, the whole function "flipHWSurface_8_16" is missing (which I previously made use of).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • ZeroT21 @ ZeroT21:
    guess they can't handle rejection
    +1
  • SylverReZ @ SylverReZ:
    Lol bald wars
  • SylverReZ @ SylverReZ:
    @kijetesantakalu042, Throw the iPad away and teach him proper education that doesn't involve technology. Even better become amish.
    +3
  • kijetesantakalu042 @ kijetesantakalu042:
    @SylverReZ I would but he isn't my child.
  • ZeroT21 @ ZeroT21:
    seems like every kid these days
    +2
  • BlazeMasterBM @ BlazeMasterBM:
    seems like everyday i see a child with more expensive technology than me lol
    +2
  • kijetesantakalu042 @ kijetesantakalu042:
    @BlazeMasterBM have kids is expensive enough and these parents spend hundreds on tech.
    +1
  • BigOnYa @ BigOnYa:
    Yea like 10yr old kids with the newest iphone is redunklous. You already know that's gonna be lost or broke. (Apple care only covers it once a year now irc)
    +1
  • kijetesantakalu042 @ kijetesantakalu042:
    I don't even have an iphone. All I do with a phone is text and call family and friends and a shitty phone from several years ago was good enough.
    +1
  • kijetesantakalu042 @ kijetesantakalu042:
    The only annoying thing is not having a camera
  • BigOnYa @ BigOnYa:
    What? Didn't know any cellphone didn't have a camera, even cheap ones.
  • kijetesantakalu042 @ kijetesantakalu042:
    It's potato quality
  • kijetesantakalu042 @ kijetesantakalu042:
    not very usable
  • kijetesantakalu042 @ kijetesantakalu042:
    I'm due for an upgrade tbh
  • Xdqwerty @ Xdqwerty:
    Good morning
  • IC_ @ IC_:
    Good morning.
    +1
  • Xdqwerty @ Xdqwerty:
    How are y'all?
  • IC_ @ IC_:
    Fairly okay, I guess. I really have to get it together and resume working on my project, before the weekend ends again.
  • Xdqwerty @ Xdqwerty:
    @IC_, alright
  • Xdqwerty @ Xdqwerty:
    I'm glad
  • IC_ @ IC_:
    Are you doing alright?
  • Xdqwerty @ Xdqwerty:
    @IC_, that was a response to what you said
  • IC_ @ IC_:
    I know, but I wanted to ask you as well.
  • Xdqwerty @ Xdqwerty:
    @IC_, Yeah I guess
  • Xdqwerty @ Xdqwerty:
    Mediocre at worst
    Xdqwerty @ Xdqwerty: Mediocre at worst