Porting SDL to the PS2

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Porting SDL to the PS2

Post 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....
- TiTAN Art Division -
http://www.titandemo.org
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post 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.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post 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
- TiTAN Art Division -
http://www.titandemo.org
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post 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.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Can't wait anymore for this messiah ! :)

I'm kneeling down....
- TiTAN Art Division -
http://www.titandemo.org
gawd
Posts: 28
Joined: Wed Feb 09, 2005 10:36 pm
Location: Israel
Contact:

I am the messiah

Post 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.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post 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..
Kung VU
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Hey, its like that Another World game. Excellent. :)
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post 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...
Last edited by Shazz on Thu Feb 10, 2005 6:15 pm, edited 1 time in total.
- TiTAN Art Division -
http://www.titandemo.org
gawd
Posts: 28
Joined: Wed Feb 09, 2005 10:36 pm
Location: Israel
Contact:

Post 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.
Post Reply