Page 1 of 1
SDL Library
Posted: Tue May 11, 2004 8:41 pm
by evilo
Hi all,
searching the web, I found out that a SDL version (RPM) is available for the ps2 linux distrib !
knowing almost nothing about the linux ps2 kit and this distrib, I was wondering if it could be potentially possible to "port it" to the native environment ?
honestly I think this could be a big "push" to the developer community, as it helped a lot the dreamcast scene for homebrew dev.
(Furthermore a lot of already existing open-source development could be quite easily ported to the ps2).
what do you think ?
does someone has some information on sdl for ps2 ?
Just wondering..... !
Posted: Tue May 11, 2004 10:34 pm
by pixel
It is absolutely potentially possible to port the SDL to the native PS2 environment. Go ahead, port it ;-)
In a serious reply: yeah, it should be possible to port it, but with lots of powerloss. People here prefer to code the internals of the PS2 instead of dealing with a middleware that could extinguish the power of the machine.
SDL Library
Posted: Tue May 11, 2004 10:52 pm
by evilo
I'd love to port it... ! I know that this is the common answer but first I wouldn't have enough free time, as I'm already quite busy with my job and family and then I'm not sure to have the sufficient skill to afford it...
anyway I completely agree with you that coding directly the hardware is much more funny and that adding a additional layer would degrade performance, but seeing the quality of work done on the dreamcast (which is much more less powerful than the ps2), maybe it could be worthwhile ?
Honestly I've only started coding on the ps2 a few weeks ago, so I'm quite nowhere in ps2 dev (just able to send some basic stuffs to the GS!) But my "personal target" is to try porting some emulators to the platform once I will have the necessary knowledge.... In the meantime I'm looking on what have been done on the DC scene and found out that a lot of emulators has been written using SDL... So this is the reason of my question !
Posted: Wed May 12, 2004 12:37 am
by mrbrown
pixel wrote:It is absolutely potentially possible to port the SDL to the native PS2 environment. Go ahead, port it ;-)
In a serious reply: yeah, it should be possible to port it, but with lots of powerloss. People here prefer to code the internals of the PS2 instead of dealing with a middleware that could extinguish the power of the machine.
What the heck are you talking about? There is no preference here, if you're going to make statements like that speak for yourself and not everyone else. When I started with PS2 the very first thing I wanted to do was to port SDL (or at least work with others to do so). As evilo says, a SDL port would bring over a lot of developers, mostly developers new to the PS2, and not ready to be beaten into submission by the VUs.
And how would a SDL port "extinguish the power of the machine"? SDL is a very low-level library used on a variety of embedded systems. It's true though, the PS2/Linux port is a disaster, but that's mainly because it's interface to the hardware is convoluted. A native port wouldn't have such limitations (I'm only thinking of graphics, the other SDL interfaces are trivial). Don't kill the port before it even happens :).
Posted: Wed May 12, 2004 12:50 am
by mrbrown
Lemme just add, that I see SDL being used on the PS2 in a few different ways:
- People porting over SDL-based games such as Doom, etc.
- People using it to slowly ease the PS2 hardware pill down their throats. They would start with SDL and gradually migrate to more advanced use of the hardware.
- People, like me, who want a cross-platform API to everything except graphics: sound, pad, even OS features - SDL does an excellent job of providing that. SDL would be very good for a game's frontend, while all 3D uses the hardware directly.
Posted: Wed May 12, 2004 1:41 am
by pixel
mrbrown wrote:
- People, like me, who want a cross-platform API to everything except graphics: sound, pad, even OS features - SDL does an excellent job of providing that.
Bof... :-) Have you ever looked at scummvm ? Even if I am an SDL coder/addict, I think it lacks lots of features, shortcuts, platforms, whatever, and these guys here understood that, and I think they are quite right: SDL is useful for some parts and platforms. Otherwise, better code more layers, even making SDL optionnal.
Well, I don't want to transform this thread as one could read on the scummvm-devel mailing list, so I'll stop there.
If I were to port something to the PS2, it would be some of scummvm's internals, by building a whole library.
Posted: Wed May 12, 2004 1:56 am
by mrbrown
I took a look at the scummvm-devel archives, and all I could find about SDL (that was partially relevent here) was broken joystick handling on win32 from a year ago. Was there a specific thread you could point me to? How is SDL only useful for some parts if a port is done from scratch?
Isn't SDL a library? I kinda lost track of you there...
Posted: Wed May 12, 2004 2:27 am
by pixel
For a reason that is beyond me, the scummvm-devel archive is quite broken.
I'd rather recommand you to look at this source code directly:
http://cvs.sourceforge.net/viewcvs.py/s ... /backends/
SDL is a library, I completely agree. The scummvm backends stuff plus some other things could be turned into a library too, which would, IMHO, be much more efficient that the SDL (even if it couldn't fit to EVERYONE's needs); that was the recent talks on scummvm-devel (because scummvm holds too much engines, and the most recent one, "raw", a recoded engine for Another World, started a quite violent discussion)
One very simple example the OSystem of scummvm provides: where is that damn "iopen" function in SDL? :) (case insensitive version of "open"). That is something "missing" for a true 'portable' library for example. Okay, this is a cheap example, but, I really do think that SDL is kinda obsolete... even if I still use it in my newer code! ;-) Maybe 10% of its functionnalities, but I use it.
Now, let's summary: what does SDL provide:
-) 2D graphics, blitting, CLUT conversions ? Blaah, you said it, you wouldn't use it :)
-) 3D graphics ? Huh ? where ? ;-) SDL has some internals to help writting portable OpenGL. Great...
-) Sound: where's the midi part of it ? Don't tell my anybody hardly use it anymore... I hardly know many PSX/PS2 games which uses XA/plain audio streams for the game music score. SDL_mixer you'd say ? Yeah, maybe... I'd rather use timidity for that, and add some things inside, like hooks and callbacks in order to hook MIDI events that could be insterted in the tracks.
-) Pads: quite rigid implementation huh... You couldn't quite write the "analogic behavior" of PS2 pads buttons in there.
-) Generic events: Mouse ? Keyboard ? What's that ? :-)
-) Windows Managers: I am fullscreen 99% of the time, I don't care! ^_^
-) Theads: YES! This IS one very good platform independant feature of SDL. I completely agree, and positively want that on the PS2 side.
-) Operating System: duh... apart of GetTimer and PlayCD, I hardly can see any true "operating system" function there. I'd want things like I said, "iopen".
And, yeah, SDL has a lot of library around... which would each need a separate port.
Well, okay, SDL
is a great library. Could be better though. But since I do not have the faith/skills/time/whatever to code a better library, I can only bitch about it, and try to persuade people to create a better library, like something based on the scummvm's OSystem class ;-)
Posted: Wed May 12, 2004 2:39 am
by ldesnogu
Yes perhaps something newer than SDL is needed, but right now the number of packages just requiring SDL to run is rather big (so, many examples to start from) and documentation is plenty enough.
Posted: Wed May 12, 2004 3:05 am
by mrbrown
pixel wrote:One very simple example the OSystem of scummvm provides: where is that damn "iopen" function in SDL? :) (case insensitive version of "open"). That is something "missing" for a true 'portable' library for example. Okay, this is a cheap example, but, I really do think that SDL is kinda obsolete... even if I still use it in my newer code! ;-) Maybe 10% of its functionnalities, but I use it.
Now, let's summary: what does SDL provide:
-) 2D graphics, blitting, CLUT conversions ? Blaah, you said it, you wouldn't use it :)
-) 3D graphics ? Huh ? where ? ;-) SDL has some internals to help writting portable OpenGL. Great...
-) Sound: where's the midi part of it ? Don't tell my anybody hardly use it anymore... I hardly know many PSX/PS2 games which uses XA/plain audio streams for the game music score. SDL_mixer you'd say ? Yeah, maybe... I'd rather use timidity for that, and add some things inside, like hooks and callbacks in order to hook MIDI events that could be insterted in the tracks.
-) Pads: quite rigid implementation huh... You couldn't quite write the "analogic behavior" of PS2 pads buttons in there.
-) Generic events: Mouse ? Keyboard ? What's that ? :-)
-) Windows Managers: I am fullscreen 99% of the time, I don't care! ^_^
-) Theads: YES! This IS one very good platform independant feature of SDL. I completely agree, and positively want that on the PS2 side.
-) Operating System: duh... apart of GetTimer and PlayCD, I hardly can see any true "operating system" function there. I'd want things like I said, "iopen".
And, yeah, SDL has a lot of library around... which would each need a separate port.
Well, okay, SDL is a great library. Could be better though. But since I do not have the faith/skills/time/whatever to code a better library, I can only bitch about it, and try to persuade people to create a better library, like something based on the scummvm's OSystem class ;-)
There is a platform-independent library for accessing files that was written by a SDL developer, I forget it's name but I'm sure it's linked from SDL's homepage. One thing I like about SDL is that after a certain point it was closely guarded against "featureitis", so you end up with add-on libraries like SDL_image, SDL_mixer, and SDL_net.
I never said that SDL would be an end-all solution for programming the PS2. The nice thing about SDL is that you don't have to use all of it's features, you pick and choose which ones you want. And since there is a ton of software out there already using it, there is a ton of support.
-) 2D: I would use it, for a game/program's frontend.
-) 3D: That's fine, I'd prefer to have more direct access to 3D. But keep in mind there are 2 homebrew ports of OpenGL that are out there.
-) Sound: IIRC, SDL_mixer has hooks to use timidity. But I can't imagine folks wanting much more than PCM which is supported on PS2.
-) Pads: There is room for improvement, but it's not a major issue.
-) Generic events: Mice and keyboard are devices becoming more and more popular on consoles, esp. those with a flagship MMORPG like FFXI. I don't see how you could effectively play FFXI without a keyboard, you'd be cut off from communicating with the rest of the world.
-) Window managers: This is trivial to stub out in SDL.
-) Operating system: As I said up top, there are plenty of add-on libraries to chose from if you need to.
But I guess we're now at the point of "put up or shut up" :). If a native SDL port surfaces, we'll see what happens.
Posted: Wed May 12, 2004 3:11 am
by mrbrown
Here's the platform-independent file library I was referring to:
http://www.icculus.org/physfs/
Posted: Wed May 12, 2004 3:26 am
by pixel
mrbrown wrote:But I guess we're now at the point of "put up or shut up" :). If a native SDL port surfaces, we'll see what happens.
I agree, and I would even help doing it if somebody wants to start it (only help, I can't push all my time on it...). This would still be a useful thing, and a good starting point. Well, my
first point in my first reply in this thread is I think most "native PS2 coders" would just ignore that SDL port :-D That's why it would be difficult to get some of them doing that port.
SDL Library
Posted: Wed May 12, 2004 3:51 am
by evilo
Well very interesting discussion !
I'm ready to participate also if someone starts it... alone it's too huge (as I said previously), but I would give my contribution !
Re: SDL Library
Posted: Fri May 14, 2004 8:34 pm
by EugeneE3RD
Well, I'm going to add my .02 worths. I believe that a native port of SDL to the PS2 would be excellent. SDL has been ported to many systems such as Win32, MAC, Dreamcast, Amiga, Et al. SDL is an excellent library because it is cross-platform & there are many programs written using SDL.
I agree with what mrbrown & evilo said that an SDL port to native PS2 could bring a good amount of developers over to PS2 because programs which use the SDL library require minimal changes to the programs source code. For example, there are a good amount of emulators which are written using SDL (
http://www.libsdl.org/applications.php? ... perpage=50 ). If SDL comes to native PS2, these emulators would allow for people to be able to emulate more systems on the PS2. For example, VisualBoyAdvance which is listed on the SDL page above is an open source GB/GBC/GBA would be great thing to come to PS2 if SDL does get ported to native PS2 because there are over almost 1000 freeware GB/GBC/GBA programs at
http://www.pdroms.de/index.php .
SDL would be a great thing to port to PS2. I also believe that Allegro (
http://www.talula.demon.co.uk/allegro/ ) would also be a good thing to port to PS2. Allegro is a cross-platform game programming library which is avaliable for DOS, Unix (Linux, FreeBSD, Irix, Solaris, Darwin), Windows, QNX, BeOS and MacOS X. Allegro comes with source code so it can be ported to PS2. Also many games use the Allegro library, you can see the games which use the Allegro library at
http://www.allegro.cc/ . If SDL & Allegro would be ported to native PS2, this would probably bring developers to the PS2 since SDL & Allegro are open-source cross-platform libraries.
Posted: Sat May 15, 2004 3:30 am
by Raizor
I've only really started learning about SDL recently, but it does sound like it would be a great addition to the current ps2dev stuff.
If a native implementation does eventually get underway (hopefully via CVS), then I'm sure a few of us would be interested in working on it. It does seem a project that no man alone is willing to tackle tho ;)
raizor
Posted: Sat May 15, 2004 3:51 am
by mrbrown
Somone needs to invent a machine to steal time, so that I can have much more than the pittance I'm forced to accept...
Posted: Sat May 15, 2004 7:28 am
by Raizor
They did, but the machine steals income in return for time :(
Re: SDL Library
Posted: Sat May 15, 2004 9:23 am
by EugeneE3RD
I have an idea. Maybe some of the PS2 programmers could come together & start a PS2 programming group to port both SDL & Allegro to native PS2. Both of these libraries would really help to bring more homebrew software to the PS2. Homebrew software is lacking on the PS2 since the PS2 is harder to program than the XBOX, Dreamcast, et al. SDL is one XBOX (
http://www.lantus-x.com/SDLx/ ), Dreamcast (
http://sdl-dc.sourceforge.net/ , so an SDL port to PS2 would be great.
evilo & mrbrown,
Since both of you are interested in SDL for PS2 (so am I), it might be a good idea for both of you to come together to try to port SDL & maybe even Allegro to PS2. You might also want to try to get other PS2 coders such as Jules (author of ito - PS2 Library) & several other PS2 coders to try to make a native PS2 port of SDL and Allegro a reality because the PS2 needs more homebrew & SDL & Allegro could bring developers to PS2 since SDL & Allegro are very popular open-source cross-platform programming libraries.
Posted: Sat May 15, 2004 11:16 am
by mrbrown
I don't think you caught me and Raizor's joke ... I don't have the time to commit to a SDL port.
I have no idea when I would even get the time.
Posted: Sat May 15, 2004 12:04 pm
by ooPo
Perhaps putting a SDL-like api onto ps2sdk+gslib or something instead of porting the whole library would be a better way to approach it if you want to quickly get SDL apps up and running.
SDL Library
Posted: Sat May 15, 2004 9:23 pm
by evilo
I've just downloaded the DC version just to compare with the *official* sources, and it's clearly not so impossible to accomplish sthg basic in quite a few days, regarding all already available things on the ps2 side and required stuff on the SDL one (but, heh, I'm talking about a 100% dedicated guy working on it)...
however, all this is really starting to get me nervous about all possibilities and implications, so I think I will take myself by the hand and *TRY* to start porting it (at least getting a first ps2 skeleton and maybe having basic video initialization routines working ) for the end of next week (as before I will don't have the time)... and please note that I said "I WILL TRY".... as mrbrown, I don't have a lot of time (in two weeks, I've been 4 days at home ! but I have my laptop...)
also, I read that somebody started this port sometime ago, may be it could be worthwhile to share the already done stuff ??
then, may be if someone could open a cvs project ? (never done it)
As said previously, the only missing thing with the SDL library is a starting point !!!! so, LET's PUSH the START BUTTON and PLAY :lol:
Re: SDL Library
Posted: Sun May 16, 2004 1:21 pm
by Guichi
evilo wrote:I've just downloaded the DC version just to compare with the *official* sources, and it's clearly not so impossible to accomplish sthg basic in quite a few days, regarding all already available things on the ps2 side and required stuff on the SDL one (but, heh, I'm talking about a 100% dedicated guy working on it)...
however, all this is really starting to get me nervous about all possibilities and implications, so I think I will take myself by the hand and *TRY* to start porting it (at least getting a first ps2 skeleton and maybe having basic video initialization routines working ) for the end of next week (as before I will don't have the time)... and please note that I said "I WILL TRY".... as mrbrown, I don't have a lot of time (in two weeks, I've been 4 days at home ! but I have my laptop...)
also, I read that somebody started this port sometime ago, may be it could be worthwhile to share the already done stuff ??
then, may be if someone could open a cvs project ? (never done it)
As said previously, the only missing thing with the SDL library is a starting point !!!! so, LET's PUSH the START BUTTON and PLAY :lol:
A man by the name of Calvin Vette was working on porting SDL to the ps2. He has a site at
http://www.dragontale.com/projects.html Im fairly sure he wouldnt mind putting any code up to cvs if someone asked nicely.
Re: SDL Library
Posted: Mon May 17, 2004 8:14 pm
by evilo
Guichi wrote:
A man by the name of Calvin Vette was working on porting SDL to the ps2. He has a site at
http://www.dragontale.com/projects.html Im fairly sure he wouldnt mind putting any code up to cvs if someone asked nicely.
done.... let's hope he will accept !
SDL Library
Posted: Tue May 18, 2004 2:42 am
by calvin
I responded to this and ended up creating another topic with a poll...
http://forums.ps2dev.org/viewtopic.php?t=301
FWIW,
We also have a MMO server engine/storage-persistence/billing/game distribution engine architected in J2EE in the works as well. Something like Send0r, BattleZone, and Evercrack rolled into one, but with an eye towards the small development shops. It also supports multiple platforms (PS2, XBox, Linux, Mac, Win).
On a really low-back burner is a re-port of NetBSD to PS2DEV. Actually got bits of it working before I started teaching this track. I've been picking apart some of TGE to see what I can use in my spare time. I think that was about a half-hour in February :-)
In some land far far away, on a schedule and budget that doesn't exist, we'd like to do a native [GCJ] Java port that uses native JOGL, Java3D (J3D), and Java Advanced Imaging (JAI). That's a complete pipedream at the moment.
Calvin Vette
calvin-dragontale_com
calvin-nextgened_com
Posted: Tue May 18, 2004 3:52 am
by ooPo
Port NetBSD to SDL! :)