Slashdot Mirror


SDL Has Been Ported to Sony PS2

JigSaw writes: "SDL, the open source answer to DirectX, is a well-known cross-platform multimedia library designed to provide fast access to the graphics framebuffer and audio device. Sam Lantiga, the maintainer and SDL project leader, announced today on the SDL mailing list, that he ported the library to Playstation2 and it will allow to write and run SDL games (open source or commercial, as SDL is LGPL) on the Linux port for the PS2. Great to see Linux to become the source for a whole bunch of free SDL games (some of them with commercial-level quality), easily recompiled for the PS2 and run them without having to spend $49 USD for each game. This release will be even more significant in the near future, as SONY is planning to release the broadband adapter add-on, which will enable small developers (and even companies) to release free or shareware games, downloadable in binary or source format (most SDL games are known to have small sizes) from the web, and hop, to your TV!"

89 comments

  1. Re:Linux for end users? by slouken · · Score: 1

    Actually I don't know if it works with the development kit. It's actually been ported to the Sony PS2 Linux Beta, which is only publicly available in Japan right now.

    --Sam @ Blizzard

  2. Sony Linux Kit Includes... by Milo_Mindbender · · Score: 1

    If I'm not mistaken, the $200 for the Linux kit in Japan included a 40gb hard disk, keyboard, mouse and network adaptor. It's NOT just the distro alone.

    --

    Milo from Kangaroo Koncepts

  3. Re:actually... by Novus · · Score: 1

    > Actually, I ported it, while working for Loki.
    > I have since added support for TV output.

    Before this gets modded down as a troll, I'd like to point out that according to the comments in the source code, the PS2 code in SDL is written by Sam Lantinga (slouken@devolution.com), which is who the poster of the parent says he is. This is just to avoid rampant confusion like in the Tux Racer discussion yesterday, with people ignoring Patry's attempt to bring sanity into the discussion. B-)

    For further info on new features (such as the TV output feature (currently only in CVS)), see the ChangeLog.

  4. Re:Great! by Anonymous Coward · · Score: 0

    Saying that Communism is about freedom is like saying Naziism is about ethnic pride (and just about as offensive).

    Reality flash here commie boy, check out The Black Book of Communism. Communism's body count over the 20th century is over 100 million. Most of those people died because they somehow strayed out of the party line (whether they knew it at the time or not) and exercised a little freedom.

    Communism is evil because when the state insists on everybody sharing without choice, you end up having to shoot or imprison those who don't comply. The GPL doesn't have anything to do with that and certainly accommodates those who don't want to share (see LGPL for a real world example) as long as they don't stomp on the private property rights of the GPL holders.

  5. BTW: Did you know... by root_42 · · Score: 4, Interesting

    ...that Sam Lantiga left Lokigames and is now working for Blizzard? But he is still developing SDL, as it seems. Look here for more details.

    --
    [--- PGP key and more on http://www.root42.de ---]
  6. Re:But does it use all the dedicated hardware? by slouken · · Score: 2, Informative

    2D with SDL on the PlayStation 2 uses DMA to transfer images to the screen, and is fairly fast. SDL also takes advantage of hardware YUV -> RGB conversion and hardware image scaling.

    As for 3D, SDL just provides an interface to the native OpenGL implementation. There is a port of Mesa to the PS2, but as of the Public Beta, there were lots of features which hadn't been tested and some things which didn't work due to the way PS2 hardware works.

    If you want to use any of the other hardware, like the custom vector units, you'll have to program them yourself.

    In general, SDL speed is pretty good on the PlayStation 2. However, in my experience, games which require a lot of memory or lots of floating point will be fairly slow.

    SDL isn't a magic wand, you still have to take the advantages and disadvantages of your target platforms into consideration for the best performance of your game.

  7. Re:Sony is playing it smart by Anonymous Coward · · Score: 0

    Sony is a large backer behind the MPAA. But we should give them our support because linux runs on PS2's!!!!

  8. What are the best SDL games? by astroview · · Score: 0, Offtopic

    I was interested in what are the best looking SDL games. Any ones with great gameplay?

    1. Re:What are the best SDL games? by Anonymous Coward · · Score: 1, Informative
      Go on over to http://www.libsdl.org and check out the games section.

      Of course, the best games are the commercial ones that Loki ported (some of which use SDL).

      Still, there are some good free ones also. Sturgeon's law does still apply though...

  9. Re:Great! by Anonymous Coward · · Score: 0

    "...important aspect of Communism is that there are no choice for..."

    What are you smoking? The goal of communism is that the community should get free from the tyrrany that owners have over them. Yes, thats right, it's only in propaganda USA that people don't understand that communism is about freedom.

    To have this freedom, some things that some people sees as freedoms, like the "right" to sell things on your own must be given up.

  10. Re:Great! by Lussarn · · Score: 1
    An important aspect of Communism is that there are no choice for the consumer and Linux doesn't fit that description.

    I know another OS that does though.

  11. Re:Awesome! by Novus · · Score: 1

    > Actually, most of the games I know are enthusiastic about Linux. Whether they have the skills to administer a Linux system is another story, of course.

    How about this little administration tool?

  12. Re:Linux for end users? by DeadMeat+(TM) · · Score: 2
    Realistically, I have no problem with this - maybe that $200 kicks the price point above where they will be making a loss (at least when they drop the price this coming holiday season). That way, Sony can keep the PS2 in market, even if people aren't buying licensed games.

    Good point -- I had forgotten about the whole selling the hardware at a loss issue. Still, to the average gamer, who probably knows or cares little about free or Free games, $200 is an awfully high price to justify getting the ability to play SDL games.

    Sure, the Cool Factor is definitely there, but the $200 entry fee would probably be too high for anybody but die-hard geeks who want to play their SDL games on a TV mainly for the hell of it, which is a far cry from small developers being able to reach millions of gamers like some people had hoped for.

  13. Re:fantastic but sony might not like it by Anonymous Coward · · Score: 0

    It was Sony who loaned the PS2 they were using as development box...

  14. Re:Great! by codeforprofit2 · · Score: 1

    But the platform itself is propietary.

  15. Re:Commercial quality? by Error27 · · Score: 2

    >>when for $20 used you can get a decent copy of Final Fantasy for PS?

    The amazon.com version of ff9 costs $40. But thats an exact copy. For a merely decent copy I would expect to pay $7-$10 and not a penny more.

  16. Re:fantastic but sony might not like it by Anonymous Coward · · Score: 0

    Moderators, over here. Here's a man who doesn't like karma, and wants you to take some of his away.

  17. Linux for end users? by DeadMeat+(TM) · · Score: 2
    This is great news, except I can see one problem with it. The CNet article implies the only way to get Linux to run on the PS2 is to buy the $200 development kit -- since the Linux runtimes are proprietary, and presumably not freely distributable, this could definitely hamper the ability to play SDL games for most people. Obviously nobody can stop developers from circulating the kernel, but since the specs on the hardware are closed I'm assuming SDL has been built on top of these runtimes, and thus depends on them.

    Does anybody have information about whether or not developers will be able to redistribute enough of the Linux-based runtimes to make this feasible? Actual quotes from the license agreement(s) would be nice. (Or has the porter found some way around using the binary-only stuff?)

    1. Re:Linux for end users? by Registered+Coward+v2 · · Score: 1

      Ok, I'm confused. What happened to the GPL and the requirement to distribute teh soruce? Has Sony developed proprietary run time libraries, independent of Linux, to let Linux programs run on the PS2?

      --
      I'm a consultant - I convert gibberish into cash-flow.
    2. Re:Linux for end users? by Anonymous Coward · · Score: 0

      Actually the part of linux that only comes in binary form is the code for the DVDrom and some other little modules to "prevent" pirate from just accessing game data from commercial games. But beside that, all the stuff works (and from what i understand, mesa already runs there, not as fast as it could, but runs there...)

    3. Re:Linux for end users? by JabberWokky · · Score: 4, Interesting
      The CNet article implies the only way to get Linux to run on the PS2 is to buy the $200 development kit

      Realistically, I have no problem with this - maybe that $200 kicks the price point above where they will be making a loss (at least when they drop the price this coming holiday season). That way, Sony can keep the PS2 in market, even if people aren't buying licensed games.

      In other words, you have a choice - buy the PS2 below cost, and play only licensed games (which kick back to Sony, making up the difference), or shell out $200 and play free (both beer and speech) games. And neither will make Sony give up on the PS2 as unprofitable.

      Now, as to what the *actual* break even price for Sony is - now that's a different story. I imagine that they are making a profit on the actual unit (not counting initial R&D) at the moment; that may change when the PS2 price drops way down in the next few years.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    4. Re:Linux for end users? by Anonymous Coward · · Score: 0

      Yes. Proprietary closed source ontop of open source Linux.

  18. Re:Awesome! by n2dasun · · Score: 1

    seems like every console will take up where indrema died. Linux for Dreamcast, PS2. Who's next? Does this prove that most gamers are linux enthusiasts to some degree, simply because of their interest in tinkering, inspired by gaming?

    --
    I'm determined to reclaim my karma. Now, if I can only find a groundbreaking article and something witty to say....
  19. hmm.. well if this is anything like PCs.. by evilpaul13 · · Score: 1

    internet + binaries + flashable firmware == lots of visuses/worms
    Great idea Sony!

  20. SDL for Amiga by Svenne · · Score: 2, Offtopic

    Have you tried the Aminet? It's right here.

    --

    Slagborr
  21. Re:Nonsense by Novus · · Score: 1

    Whether an emulator works well or not depends entirely on what you're emulating. My old P120 handled lots of mid-eighties sprite-based games perfectly in MAME, but had major problems running e.g. Mortal Kombat and other more recent games in MAME.

    PS/2 users will probably be able to run most of the golden oldies, but I doubt it'll emulate modern hardware (recent arcade machines, consoles, whatever) very well. Luckily, the PS/2 doesn't need PlayStation emulation. B-)

  22. Re:Great! by Anonymous Coward · · Score: 0

    "An important aspect of Communism is that there are no choice for the consumer and Linux doesn't fit that description. "

    I beleive you should read some books about communism. Communism has absolutely nothing to do with 'no choice' or control or anything like that.

    Communism is ALL about that the individual and organisations should give up their ownership to the community (thats why it's called communism) because this is whats best for the community!

    This is also what free software is all about (I'm not talking about the open source movement here)!

    Spread it, spread it!

  23. Re:Great! by Anonymous Coward · · Score: 0

    "The key difference is that nobody forces the GPL on anyone."

    Is that so? You better start reading what RMS and FSF are saying my friend. :-)

  24. fantastic but sony might not like it by Anonymous Coward · · Score: 3, Interesting

    This is great news of course, but how will sony react? Hundreds of free games being released will hurt commercial sales of PS2 games, especially if someone ports the SDL versions of MAME, SNES9X, and that gbadvance emulator.

    1. Re:fantastic but sony might not like it by Ian+Schmidt · · Score: 2

      The problem is the PS2 has only a 294 MHz CPU and very high-latency RAMBUS RAM, so portable emulators will not run well on it. Ones written especially for it in MIPS that take advantage of the on-CPU scratchpad RAM will fare a lot better.

  25. Re:Language bindings by oodl · · Score: 1

    > Other people may already have some
    > experience using SDL with other
    > interpreted languages?

    Are you implying that Scheme is an interpreted language? I think there are Scheme compilers.

  26. Just what we need... by ShadeEagle · · Score: 0, Troll

    Minesweeper for the PS2 :-p

  27. What's this 'open source or commercial' shite? by Nailer · · Score: 2

    Since when are `Open Source' and `commercial' opposites? According to just about everyone, including both the FSF (see their `words to avoid' list) and the Open Source Initiative (dunno where, but Google Is Your Friend) `proprietary' `closed source' or `non-free' is the opposite of Open Source / Free Software.

    Commercialness does not equal being sold for money just like free to air television isn't non-commercial. It is (according to every dictionary I've ever read) to do with the motivation behind producing the work, which in the case of apps like Zope, Red Hat Linux, VideoLAN, and many other projects, is (at least partially) to make money.

    Commercial software is fine and employs alot of people, and its even better for users if its also Open Source.

  28. Commercial quality? by SilentChris · · Score: 4, Insightful
    "Great to see Linux to become the source for a whole bunch of free SDL games (some of them with commercial-level quality)"

    Ahem. *cough* :) Someone's been going to the school of CmdrTaco's all-inclusive non-objective statements. I would hardly call a majority of the SDL games commercial quality. A majority are playful diversions (like minesweeper) and the few that are commercial quality ARE commercial (like Loki's wares).

    Don't get me wrong: I think SDL is a step in the right direction. But are you going to get Joe User to play these games when for $20 used you can get a decent copy of Final Fantasy for PS?

  29. Re:actually... by slouken · · Score: 1

    Actually, I ported it, while working for Loki.
    I have since added support for TV output.

  30. But does it use all the dedicated hardware? by acidrain · · Score: 1

    PS2 hardware is an insane bunch of parralel units that in no way resembles your average 3d card. To get any throughput, you have to do careful custom coding. For example you can do procedural rendering on the suped up geometry transform engine (VU2). So how efficient is it? Can I bake chunks of level geometry and fire them off to well tuned assembly rendering loops, or do I have to call "Add_Vertex()" on each vert in the mesh?

    --
    -- http://thegirlorthecar.com funny dating game for guys
    1. Re:But does it use all the dedicated hardware? by Anonymous Coward · · Score: 0

      You're right, PS2 requires coding to the metal. SDL attempts are going to be poor. PS2 can churn 10,000,000 polygons a second, but it won't be doing it through a general-purpose API.

  31. Re:Language bindings by Peter+Harris · · Score: 1

    Pygame is based on python bindings for SDL - I wish I had more time to mess with it so I could say something informative :(

    A decent port of Pygame for the PS2 would be a lot of fun to play with, with or without Linux underneath.

    --

    -- What do you need?
    -- Gnus. Lots of Gnus.
  32. Great! by Anonymous Coward · · Score: 0

    Communism is spreading to the consoles!

    1. Re:Great! by Anonymous Coward · · Score: 0

      When the software business has been fully socialized it's hardwares turn. We should make free blueprints and kill propietary platforms.

      Socialism can't coexist with companies.

    2. Re:Great! by Anonymous Coward · · Score: 0

      I think it depends on how you define freedom.

      Sure, you have the freedom to live on others if you can't make a living on your own. You have the freedom to take others property to make everybody equal. BUT, you don't have the freedom to sell your own work for your own profit.

      Really depends on how you see it.

    3. Re:Great! by Anonymous Coward · · Score: 0

      The GPL has everything to do with the socialist goal. The goal with the GPL is to get rid of owners, make gratis products so that owners can't sell their software anymore.

      The FSF is all about removing ownership, when you GPL you lost all rights. You should read some on the FSF homepage my friend.

      Socialism is the goal, GPL is the method.

    4. Re:Great! by Anonymous Coward · · Score: 0

      Real communism has really never been tried in the real world. Soviet communism was over in a fortnight, after Lenin, and later Stalin, decided they wanted the power for themselves. You can't call it communism if the country isn't ruled by the people. The "communist" countries we have seen have acually been some sort of facist/wannabe socialist dictatorships. Real communism _is_ about freedom because it gives everyone the same opportunities, regardless of skin color, religion or economic/social status.

    5. Re:Great! by Dwonis · · Score: 2
      Socialism can't coexist with companies.

      What are you talking about? Canada's been a corporosocialist country for quite a while, now. ;-)

    6. Re:Great! by Dwonis · · Score: 2

      The key difference is that nobody forces the GPL on anyone.

  33. Sony is playing it smart by ioman1 · · Score: 2, Interesting

    I am glad to hear that Sony has decided to go with SDL. I hope that Sony stands a chance with the Xbox, because I would hate to see Microsoft win in another market. We should give Nintendo and Sony our support.

    1. Re:Sony is playing it smart by Anonymous Coward · · Score: 1, Interesting

      The same Sony that is one of the key players of the RIAA?

  34. Language bindings by JayKey · · Score: 2, Insightful

    Another cool thing about SDL is that it supports various languages through its bindings. For example I tested the guile/scheme binding a while ago.. the code needed to get things on the screen was only a few lines... sorry to say, but it lacked some features and crashed in my face.. but at least in my mind it would be awefully cool to prototype effect/AI/ ideas etc using SDL and Scheme. Other people may already have some experience using SDL with other interpreted languages?
    -jk
    "Premature optimization is the root of all evil" - Don Knuth

  35. Re:Pandora's box by The+Troll+Catcher · · Score: 1

    I hate to respond to such an obvious troll, but hey, look at my username ;).

    You clearly have NO clue what you're talking about.

    Programs don't port themselves - and the only way there could be copyright concerns would be if these ports were actually released. And since generally commercial games are closed-source, the ports wouldn't be released without permission from the developer.

  36. actually... by wct · · Score: 5, Informative

    ...it was ported to the PS/2 with the 1.2.1 release a few weeks ago. The port was done by some Japanese coders. The news here is that Sony has donated a dev platform for further development...so we can all hope Mesa is ported sometime :)

    1. Re:actually... by Anonymous Coward · · Score: 0

      Prove it, dickmunch.

  37. Awesome! by James+Foster · · Score: 1

    Needless to say, this is a very good thing.
    Indrema was going to be an open-source console before the project died... but now it seems the PS2 has taken its place! Quite unexpected.
    This could also end up being an excellent thing for Linux in general. Developers may be inclined to use SDL for their games and applications due to its portability factor. SDL makes porting from platform to platform very easy. It would be pretty hard to lose any portability without making it a concious decision.
    The only drawback I see here is that there probably isn't any OpenGL distribution for PS2... (I'd love for someone to correct me on that??) so developers will probably be stuck with SDL's rasterizer.
    This is still a major step forward though.

    1. Re:Awesome! by Anonymous Coward · · Score: 0
      Uhh, yeah. Most gamers are Linux enthusiasts.

      Please get CMDRTACO's cock out of your mouth.

    2. Re:Awesome! by Dwonis · · Score: 2

      Actually, most of the games I know are enthusiastic about Linux. Whether they have the skills to administer a Linux system is another story, of course.

  38. Sony needs SDL - SDL needs PS2 by fetto · · Score: 1

    With the uppcomming XBOX release and the flame the PS2 has got for beeing hard to code for they where in need of a easy way to tap the flood of PC games and a good API. This is a great step for SDL & PS2!

  39. Any chance... by Gizzmonic · · Score: 1

    on SDL coming to the Dreamcast? It has a pretty large homebrew community, and it's far cheaper to mess with than the Paystation 2 (at least for the near future). (Here's Marcus Comstedt's DC development site)

    --
    (-1, Raw and Uncut is the only way to read)
  40. Sony still needs to release Linux for the US PS2 by A+Commentor · · Score: 2, Informative

    So Sony still has not released Linux for the US PS2... So unless you have a Japanese PS2, this won't do you much good yet.

    --

    Looking for any old 8-bit Heathkit/Zenith software/hardware - http://heathkit.garlanger.com

  41. or.. by Anonymous Coward · · Score: 0

    pay $50 for a dreamcast in a few months and develop on that like everyone else.

  42. Sign Sony's petition for USA PS2 linux release. by nobodyman · · Score: 3, Interesting

    SDL is nice, but I'd like to avoid getting a devkit via the grey market. SCEA has a poll going to gauge interest in the PS2. Let's get this thing released! --me

  43. Performance and Observations by pixel_bc · · Score: 1, Informative

    I code for the PS2 for a living. I hate to break it to people - if they think they'll be coding up demos that match performance of the games available - its not going to happen.

    The performance is going to be quite substandard. I can just see it now - everyone whining about how slow it is, meanwhile... its just unoptimal code.

  44. Life is sweet by Graymalkin · · Score: 0

    Holy fuck now I can play Angband on a PS2 with a 200$ devkit only available in Japan! Sweet ass sweet.

    --
    I'm a loner Dottie, a Rebel.
  45. Costs by Anonymous Coward · · Score: 0

    I disagree--look at Samba de Amigo and Virtual On (1 or 2). Huge numbers of people are willing to shell out for the "special" controllers, which are only useful for the one game and cost $60-$80 dollars each. VOOT($40)+Stick($80)x2 = $200. The point being that the "entry fee" is not too high "for anybody but die-hard geeks" but rather it is acceptable to die-hard fans of any _single_ game. Still a far cry from millions, but possibly enough to create momentum among the less die-hard, I think.

  46. Re:Waste of time by Anonymous Coward · · Score: 0
    Bull. Lithtech's 'middleware' is going to power Xenogears and NOLF. Many other projects user other 'middlewares.'

    Troll.

  47. Re:Waste of time by Anonymous Coward · · Score: 0

    Feeling threatened by the competition?

  48. What a Sad Commentary! by GroundBounce · · Score: 2

    Linux to become the source for a whole bunch of free SDL games (some of them with commercial-level quality)

    I guess commercial software is still generally higher quality than free software :(

    1. Re:What a Sad Commentary! by Dwonis · · Score: 2

      Um.. For games, yes. There aren't too many free software developers who have the resources of a 10-person crew working full time on a game.

    2. Re:What a Sad Commentary! by Anonymous Coward · · Score: 0

      Uh, der!

      There are so many areas where commercial software kicks the arse of free (sorry, Free) software that it's ridiculous. If I want a decent text editor or window manager, I look to the open source community. If I want to do my taxes, create a presentation, make a flowchart, run virtual machines, or even do WYSIWYG-type word processing, I'll go to commercial sofware, for the simple reason that the free (*ahem* Free) alternatives are crap.

  49. Nonsense by marm · · Score: 2

    The problem is the PS2 has only a 294 MHz CPU and very high-latency RAMBUS RAM, so portable emulators will not run well on it.

    My old Cyrix 166-based PC had a lot less processor power than the PS2, much slower memory (remember 70ns FPM DRAM?) and less of it (only 16MB), quite apart from the fact that it had a video card that is prehistoric by comparison (an S3 Virge).

    Yet it played ~95% of all MAME games absolutely flawlessly, at full speed.

    Portable != Slow, as anyone who has used Linux on a MIPS box will tell you (it runs rings around the MIPS-only IRIX)

    You're not an assembler guru that's feeling hard done by optimizing compilers are you?

  50. What about Runix? by Anonymous Coward · · Score: 1, Interesting

    What about the version of Linux that Runix was working on? Will the SDL work with that?

  51. More than 10 people... by Anonymous Coward · · Score: 0

    10 people is now a SMALL team in the game industry.

  52. PS2 software development by dido · · Score: 1

    Traditionally Sony has asked for NDA's for people who would try to develop on their platform. This is what stopped Crystal Space from porting to the original PS a year back or so (IIRC). Has Sony changed its mind and is now giving out it's SDK's royalty-free? They have to be, if all this is legal, because an NDA is anathema to a LGPL project like SDL.

    --
    Qu'on me donne six lignes écrites de la main du plus honnête homme, j'y trouverai de quoi le faire pendre.