Page 1 of 1
Porting SDL to the PS2
Posted: Mon Feb 07, 2005 6:05 pm
by Shazz
Hello,
This topic was raised a few months ago... but nothing happened (or I missed it).
So, the facts are many people would be happy to have a minimal implementation of SDL in order to ease and maintain their own ports (emu, games, media tools, demos,...) and obviously, at each new version, take all SDL refs away and replace with PS2 code is a pain...
So with tmAtOr, we're working on a minimal implementation of SDL (maybe not exactly in the "philosophy" of SDL...) based on :
- gsKit for SDL_Video (or maybe gfxpipe)
- modified sjpcm for SDL_Sound
- ps2sdk for the rest (mouse, joypad, keyboard drivers, file I/O,...)
Currently some parts already done like SDL_threads
I'd like to know if in the PS2 Dev community some people worked or are working on SDL too...
Stay tuned....
Posted: Mon Feb 07, 2005 7:13 pm
by pixel
Erm, well
I have a friend who just... well... ported SDL :)
He will keep things up to day, but, I know he already have many games working. Sorry, I just didn't want to unleash this right now (wanted him to finish everything clean), but, well, seems that there's double work here.
Posted: Mon Feb 07, 2005 10:22 pm
by Shazz
Eh eh that's a great news Pixel !
Is it possible to have more secret information ?
- Will it be released in the Ps2dev CVS ?
- When (few days, few months,...) ?
- Who did this nice job ?
- How ? (ps2dev libs used ?)
- Bank account ? (for sending him a few bucks...)
By the way, that's nice, I'll have more time to work on the emulator instead of the SDL part... (even if I'm well interested in the implementation)
Thx for the news Pixel :D
Posted: Mon Feb 07, 2005 11:21 pm
by pixel
Well, this guy started working with ps2sdk like 2 or 3 days ago, and now he already have lots of bug reports about the ps2sdk, lots of fixes also, and a half working SDL port for his own projects. Well, anyway, he now will come more around here I think.
Posted: Tue Feb 08, 2005 4:35 am
by Shazz
Can't wait anymore for this messiah ! :)
I'm kneeling down....
I am the messiah
Posted: Wed Feb 09, 2005 10:52 pm
by gawd
Hey all.
Well, yeah. Pixel just told me about this post.
I'll just explain my status. A few days ago I started playing with ps2sdk. I made some changes to the library, added a few things, and just hacked my way to see how it works. Then I realized that I could make a PS2 port of my Heart of The Alien (secret ad:
http://hota.sourceforge.net). Here's what I have so far.
* SDL video, supports 4, 8, 16, 24 and 32bpp surfaces. All functions implemented.
* SDL_Semaphore and SDL_Thread done
* SDL_Joystick implements 2 player joysticks (I will buy a mtap for Jump n Bump sometime soon.)
* SDL_Timer just implements SDL_Delay. Will have to work on this more.
* SDL_Audio just initialized FreeSD, but never sends audio there.
The rest of SDL is there, you can still use sdl_mutex, its events system and such. I also compiled SDL_Mixer with its libraries, and saw that its working (still no audio, but soon.) Today I will connect a USB keyboard and add events of keyboard (and maybe mouse..)
I also added a few more things:
* C++ support (operator new and the rest of the gang.)
* re-entrant printf
There more minor changes, but I will have to do a cvs diff, don't remember off hand.
Anyway. My Heart of The Alien port runs, and I played it all the way, it works great. It just misses the SDL CD player, or the SDL_Mixer mp3 playing. I will get to these soon enough.
I also have some unittests that I would like to check in. Problem is, I never commit half a project, so you will just have to wait patiently for a few days.
okay. that's about it.
fflush(stdout);
-- gawd.
Posted: Wed Feb 09, 2005 11:32 pm
by blackdroid
unittests for ps2sdk ? that would be awesome, something ive thought about doing for quite some time, aswell as regression tests for the toolchain..
Posted: Thu Feb 10, 2005 12:38 am
by ooPo
Hey, its like that Another World game. Excellent. :)
Posted: Thu Feb 10, 2005 4:22 am
by Shazz
Hum, I did not realize when posting that this messiah would be named "Gawd" and lives in Israel... A vision ??? :D
Whatever... I did not expect to have as soon as possible and in the same time a nearly complete SDL port and one of my fav game available !!!
Gawd, if you need help just ask !!
Great news for the community...
Posted: Thu Feb 10, 2005 6:47 am
by gawd
that this messiah would be named "Gawd" and lives in Israel... A vision
ha! that's a good one!
well. I got home from work (10pm), and I thought I'd actually make SDL_Mixer for IOP and write EE rpc stubs. There's no need to run a mikmod on EE, and I'm sure 33mhz is enough for ogg/tremor.
I'll keep you posted. As for Another World, I actually ported the 3DO version (16 bit,) to PC and Gameboy Advance, but was told not to release its sources. Among the other games I ported are Space Ace / Dragon's Lair - PC -> GBA, Time Gal - SegaCD -> GBA, and plenty of other games are in WIP, like Fury of The Furries for GBA, Dangerous Dave Advance, Ugh! for GBA and Jump n Bump PS2.
You can just see most of them at
www.megidish.net/yabbse/ or
www.megidish.net (search for WIP)
That's all.
-- gawd.