Games using stripped down linux kernel?

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

Post Reply
sopordave
Posts: 10
Joined: Thu May 15, 2008 9:06 am

Games using stripped down linux kernel?

Post by sopordave »

I'm a recent PS3 owner, and have been browsing various forums the past few days taking in the current state of the homebrew scene. From what I can tell, there seems to be a whole bunch of people interested in the topic, but very few applications because of the mentalities:

1. No access to the RSX, so why bother
2. Just run linux and any games that will run on that

Has there been any serious effort to make a game that uses the linux kernel and the bare essentials to give the appearance of a stand alone game? Given the low complexity of most homebrew games, a good software renderer with access to 6 SPEs should be more than fast enough.

In years past on the PC, I recall coming across several "kernel games" which booted off of a CD (or floppy) and contained just enough kernel code to get access to various I/O and the vga adapter, and present a playable game. Admittedly, most of these were little more than proof-of-concept demos, but I don't see why the gameplay couldn't be expanded upon.

Of course, this type of bootable game wouldn't HAVE to use the linux kernel -- but why reinvent the wheel. I am familiar with most OS concepts, but not the particulars of the linux kernel itself. Do any of you know if such a thing would feasibly be possible?
rapso
Posts: 140
Joined: Mon Mar 28, 2005 6:35 am

Post by rapso »

check out the 'otheros' demo (search for it in this forum). it's kinda what you suggested.

you said there were already such games for pc? can you link me to some of them? I had this idea for years and was always wondering, why nobody was actually doing it. having a bootable version of games (beside the windows-installation way) could open a wider audience. also some ppl who have bad problems to manage their OS with newest updates, could have a console feeling of just plugging in a game disk and play it.

especially nowadays where we move more and more towards software solutions for rendering (with larrabee, cell-spus (PS4 ;) ), cuda, etc) it could be a break through.
sopordave
Posts: 10
Joined: Thu May 15, 2008 9:06 am

Post by sopordave »

I only now noticed that v1.0 of the otheros demo says that it uses CPU rendering. Previously, I had only seen v1.1, which using RSX, which I am not interested in because I have new firmware and am not interested in hacking around it.

The reason why you don't see many games of this type is because it would require too much work to support the various types of hardware available. That's really the whole point of having an operating system -- it gives an environment where you can write an application and largely ignore hardware specifics.

I can see the next post now: "Why not just run your application using Ubuntu?", to which I argue:

1. I would imagine there is a lot of overhead in the window manager and various modules that are not needed
2. It would be neat to see a "bootable" game without having to install an operating system to run it on. After all, isn't that the whole point of having a gaming console? I run linux on my computer, and don't really need it on my PS3.
sopordave
Posts: 10
Joined: Thu May 15, 2008 9:06 am

Post by sopordave »

I just realized that kboot uses the linux kernel, and think this might be interesting to play around with. Does anybody have experience building kboot with the ps3toolchain? I just tried, but the make errors are mystifying me.
rapso
Posts: 140
Joined: Mon Mar 28, 2005 6:35 am

Post by rapso »

sopordave wrote:I only now noticed that v1.0 of the otheros demo says that it uses CPU rendering. Previously, I had only seen v1.1, which using RSX, which I am not interested in because I have new firmware and am not interested in hacking around it.
beside that, developing with standard otheros allows (or forces) you to use software rendering, that works also nice on pc, which is always nice for development.
sopordave wrote: The reason why you don't see many games of this type is because it would require too much work to support the various types of hardware available. That's really the whole point of having an operating system -- it gives an environment where you can write an application and largely ignore hardware specifics.
while this is nice in theory, it's not in reality. As engine developer for some games I've debugged individual 'shit' on hundret of gfx-card, even the same gfx with the same driver with another sub-revision can completely mess up a game. (and VIA UniChrome is my enemy #1 ;) ), e.g. if you know how sucky the clipping issue is on PSP, it's similar on some GFX but just with a bigger guard band, but in highres it's as bad as on psp :(

And the support guys have no easier life with all the guys who want to play our games but can't manage their System. Some say they have an ATI Geforce card and installed latest intel drivers but it's still not working, our game must be shit, cause some 2D adventure works like a charm on their PCs, and they wonder why we did not test the game on an ATI Geforce etc.
I think, sometimes an autoinstaller is a way smarter.

and now, with SPUs and other very flexible ways to render, a lot of games could be made without that advance hardware support.
2. It would be neat to see a "bootable" game without having to install an operating system to run it on. After all, isn't that the whole point of having a gaming console? I run linux on my computer, and don't really need it on my PS3.
Yeah, that's the point of having a console, but the whole point why MS and Xbox360 has that big amount of games is because of the unified development enviropment of windows/x360. And a lot of ppl just buy windows, cause they can't without their games which need windows.
Having bootable games would make you free from using windows, cause most other programms work fine on linux/mac/bsd as well.

just my opinion ;)
sopordave
Posts: 10
Joined: Thu May 15, 2008 9:06 am

Post by sopordave »

Good talk :)

I would have to imagine that using modern APIs like OpenGL or DirectX is loads easier than writing for specific gfx hardware. I recall the first generation of hardware accelerated PC games making you chose different renderers based on your hardware, which at that time was either voodoo (glide), powervr, or tnt2. isn't that the point of having a gfx api? to add a layer of abstraction away from the hardware? While I don't doubt there are still minor problems between the different hardwares, I find it hard to believe that writing an abstract renderer is "not a reality" as you claim.

But besides that, graphics support is only a portion of what the operating system does. Regardless of Windows or Linux, the OS makes it easy to handle I/O, memory management, swapping, scheduling, etc. A bootable game would have to cover all those areas, essentially creating a new, unique kernel. This isn't much of a problem for consoles, because all of the same type of console contain the same hardware. I was arguing that the reason you don't see this type of game on the PC is because there is too wide an array of hardware to support. My argument for using the linux kernel as the basis for a PS3 game was that it would be easier to use that instead of having to write all these subsystems from scratch.
rapso
Posts: 140
Joined: Mon Mar 28, 2005 6:35 am

Post by rapso »

sopordave wrote: I would have to imagine that using modern APIs like OpenGL or DirectX is loads easier than writing for specific gfx hardware. I recall the first generation of hardware accelerated PC games making you chose different renderers based on your hardware, which at that time was either voodoo (glide), powervr, or tnt2. isn't that the point of having a gfx api? to add a layer of abstraction away from the hardware? While I don't doubt there are still minor problems between the different hardwares, I find it hard to believe that writing an abstract renderer is "not a reality" as you claim.
while this is true, it's not really 'the point'. because before you had those funky drivers, all GFX were vga compatible, so the API was defined in hardware, not software. althought there was a bios to simplify the work, for performance you could directly work on hardware. And i'm not talking about this back to the roots ;).
I was talking about writing your software mostly on cpu, using c++ as "api" and the devices just as output. while this might sound bad performance wise, it's not for a lot of games. also, if that would be the critical point, companies would start to concentrate on boosting c++ apps. which wouldn't be bad for other areas.
But besides that, graphics support is only a portion of what the operating system does. Regardless of Windows or Linux, the OS makes it easy to handle I/O, memory management, swapping, scheduling, etc. A bootable game would have to cover all those areas, essentially creating a new, unique kernel.
wasn't that the point of the topic "Games using stripped down linux kernel"? developing a complet new kernel would be insane, indeed. but stripping down linux might work. i'd have already done this if i wouldn't be a linux-n00b. i mean, i can handle it, but you probably need to be a guru to make it right. i'd voluntee to write the software frontend :D

This isn't much of a problem for consoles, because all of the same type of console contain the same hardware. I was arguing that the reason you don't see this type of game on the PC is because there is too wide an array of hardware to support.
I think, if you can run knoppix, you could run a gameos. and the hardware issue was why I suggested doing most in software.
My argument for using the linux kernel as the basis for a PS3 game was that it would be easier to use that instead of having to write all these subsystems from scratch.
my extension to that suggest was to make it more generic, so it would work on other platforms as well. the limited amount of access you have to the ps3-hardware forces you anyway to do most in software, and the SPUs are quite nice to realize that. (of course, if you're hack-free).
ralferoo
Posts: 122
Joined: Sat Mar 03, 2007 9:14 am
Contact:

Re: Games using stripped down linux kernel?

Post by ralferoo »

sopordave wrote:Has there been any serious effort to make a game that uses the linux kernel and the bare essentials to give the appearance of a stand alone game? Given the low complexity of most homebrew games, a good software renderer with access to 6 SPEs should be more than fast enough.
I've written a couple of games in python to demo my python-ps3 project, basically a bunch of fast sprite routines that run in the SPUs. The pubble game was actually quite popular and demonstrates the use of a custom linux kernel with just enough to run the games off memory stick. The boot image is fairly extensible, with a boot menu etc to allow you to run any of the applications stored on the stick, however it was basically just my stuff that used it.

I'm also part way through writing an OpenGL library running just on the SPUs. Initial tests show this to be quite fast, although I've not got anything in a releasable state.

I've sadly not had any time to work on either projects for quite a few months as I'm crazily busy at the moment, but everything should be back to normal in about 2 months, so I'll be able to start up work on my GL library again.
Post Reply