HD Resolution on my SDL project

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

Moderators: cheriff, emoon

Post Reply
theBishop
Posts: 16
Joined: Sat Feb 05, 2005 4:22 pm

HD Resolution on my SDL project

Post by theBishop »

Hi,

I'm working on a project that will eventually run from a stripped down linux distro. I'd like to forgo X11 if possible.

I've been writing it using 2D SDL to the framebuffer, running everything from the command line. But I can't get a resolution higher than 640x480. The PS3 framebuffer is set to mode 3 (720p@60hz), but if i set the SDL height and width to 1280x720, SDL fails to initialize.

X11 works in 720P just fine, so I'm not sure how to "unlock" it for SDL.
Compound
Posts: 48
Joined: Thu May 12, 2005 10:29 am

Post by Compound »

i had similar luck unfortunately, and would also like to know this
IronAvatar
Posts: 23
Joined: Sat Nov 25, 2006 5:53 am

Post by IronAvatar »

Have you guy had a look at the SDL sources at all? Maybe looking to see if the mode is supported or not will give more info. Perhaps the mode is supported, but the kernel won't allow your app to allocate the 3.5MB needed for the main-ram copy of the frame buffer.

This might because of an allocation limit, or being out of physical memory on the PS3 as the memory might be flagged as not being allowed to page to swap space.

This is something I'll need to be looking into in the next few days too, so maybe if we all cooperate we can find a solution :)
theBishop
Posts: 16
Joined: Sat Feb 05, 2005 4:22 pm

Post by theBishop »

The OtherOS framebuffer is limited to 3.5MB? I didn't know that. Still, if Xorg can get HD res, there must be a way to get it for SDL.

I'd be willing to take a look at the source, but I don't have a lot of experience with graphics programing, so I may of limited help. Also, I may have to send back my PS3 for maintenance, putting me out of commission for a while.
IronAvatar
Posts: 23
Joined: Sat Nov 25, 2006 5:53 am

Post by IronAvatar »

theBishop wrote:The OtherOS framebuffer is limited to 3.5MB? I didn't know that. Still, if Xorg can get HD res, there must be a way to get it for SDL.
No, I wouldn't put it that way. After all, I've successfully gotten X to run in 1080p. It's not an otheros limit, but perhaps it's a limit on user apps trying to allocate non-pageable memory of a certain size due to memory being exausted or something else.

Or it could be something as simple as HD res in SDL not being supported :)
I'd be willing to take a look at the source, but I don't have a lot of experience with graphics programing, so I may of limited help. Also, I may have to send back my PS3 for maintenance, putting me out of commission for a while.
There wouldn't be anything graphics related really...just the bit of code where it sets up the video mode, which is perhaps a call to the framebuffer device or a call to something in the driver. I don't know for sure, as I haven't looked myself although I may be looking tonight if time permits.

Hope your PS3 isn't broken :(
theBishop
Posts: 16
Joined: Sat Feb 05, 2005 4:22 pm

Post by theBishop »

in case anyone else is having this problem, i was able to get near-HD 1136x644 working, which is the actual resolution on video mode 3. It seems to be a problem with the ps3-video-mode tool in YDL6.0. I can't get it to actually go to 1280x720 fullscreen.
Post Reply