#40773 - parapara - Fri Apr 22, 2005 1:36 pm
Hi everybody.
I am wondering if anyone ever tried to port SDL under GBA, or tried to wrap some functions with already avaiable GBA libs.
#40784 - tepples - Fri Apr 22, 2005 4:39 pm
A port of SDL might be possible, but it's not practical on a 16.8 MHz system. The GBA uses tiled backgrounds and hardware sprites; SDL is designed for video systems that render to a dumb frame buffer.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#40806 - Quirky - Fri Apr 22, 2005 8:47 pm
There was a semi port floating about the web a few years back... Not sure how complete a port it was though, I imagine it was used more to allow PC and GBA develpment simultaneously (by using a common and familiar API) than with an idea to port "Frozen Bubble" or whatever.
#40809 - tepples - Fri Apr 22, 2005 9:00 pm
The way to do PC and GBA development simultaneously is to have a single game engine that uses an SDL graphics engine when compiled for PC and uses GBA registers when compiled for the GBA.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#40819 - sajiimori - Fri Apr 22, 2005 10:31 pm
I've done that before -- it works like a charm. Having native debugging tools is well worth the effort of implementing a GBA-like engine for SDL (which is not very difficult at all).
The big catch is that a lot of special effects have to be partitioned into seperate engine features which are implemented differently on the PC side. Since the goal is to share as much code as possible and keep the platform-specific stuff minimal, every weird special effect (funny windowing or hblank effects) increases the amount of unshared code.
#41038 - parapara - Sun Apr 24, 2005 1:17 pm
So, the best solution to adapt a SDL game would be to 'wrap' every SDL function called into GBA-specific function?
#41063 - sajiimori - Sun Apr 24, 2005 8:41 pm
The best way would be to redesign the game to fit the GBA's capabilities, and then rewrite all the affected parts. Implementing a GBA-oriented engine with SDL is totally different than implementing SDL on GBA.
To "wrap" a library means to leave its internals alone and add another layer around it. Since the internals of SDL are platform specific, wrapping it doesn't aid porting at all. You would have to implement SDL, which is a bad approach for real GBA games.