| View previous topic :: View next topic |
| Author |
Message |
billb
Joined: 12 Dec 2007 Posts: 32
|
Posted: Wed Jul 16, 2008 3:26 am Post subject: SPE Scaler |
|
|
Hi, I'm hoping that someone who is knowledgeable about programming could look into this project ... I'm able to compile it OK on YDL6 / PS3 but so far running the binary (scaler) only results in locking up the system. Also, all the comments in the code are in Japanese... I know less about Japanese than I do programming ... :)
I first saw it being used in a video on YouTube showing Quake 2 running on the PS3:
http://www.youtube.com/watch?v=B9VUmWnpCbg
(I have one also, but I'm just using a mostly unmodified version of the port from icculus.org)
Here's where you can get the source (translated page): link
direct link to scaler.tar.gz
Thanks |
|
| Back to top |
|
 |
billb
Joined: 12 Dec 2007 Posts: 32
|
Posted: Wed Jul 16, 2008 12:04 pm Post subject: Found the problem ... |
|
|
| I figured out what my problem was -- I had set my ps3fb memory to 4M to get more system RAM. So I took out the ps3fb=4M in my /etc/yaboot.conf file, rebooted, and it works! :) |
|
| Back to top |
|
 |
billb
Joined: 12 Dec 2007 Posts: 32
|
Posted: Wed Jul 16, 2008 12:49 pm Post subject: Screenshots & photo |
|
|
snes9x-gtk running a game at the original resolution:
about to start scaler:
photo of scaler running -- snes9x-gtk is still running the game at the original resolution, but scaler has zoomed in on the center of the screen (3X):
To stop scaler from running, I use Alt-TAB to switch to the terminal window from which it was started and hit Ctrl-C.
So this should work for anything from sdlmame to playing movies -- anything that runs smoother at the original resolution instead of being scaled by the application running it, or simply can't be scaled by the application (like qemu running Win98). :)
EDIT: I have scaler starting with custom keyboard shortcuts now so I can zoom 2X 3X or 4X easily, and disable it with another key. Or I can use a script to automatically start it before a fullscreen game starts and automatically kill it on exit. What a great tool for PS3 Linux!
Example script:
| Code: | #!/bin/sh
scaler -s 2 -t 3000 & quake2.sh
killall scaler |
|
|
| Back to top |
|
 |
Ocelot
Joined: 08 Dec 2007 Posts: 11
|
Posted: Fri Jul 18, 2008 12:25 am Post subject: |
|
|
So what exactly does this all mean?
Better performance for video applications? Can you play HD videos in mplayer? |
|
| Back to top |
|
 |
billb
Joined: 12 Dec 2007 Posts: 32
|
Posted: Fri Jul 18, 2008 3:18 am Post subject: |
|
|
| Ocelot wrote: | So what exactly does this all mean?
Better performance for video applications? Can you play HD videos in mplayer? |
No, it wouldn't help for playing HD videos ... it is basically just a way to zoom in on the center of the screen.
It means that if you you're running at a resolution like 1280x720 or 1920x1080 and you're using an emulator that normally has to scale the image to fit your screen -- giving you a low frame rate -- that you can run it at the original resolution and let scaler do the work of fitting the image to your screen instead.
Or if you're running something like DOSBox or Windows via Qemu, those applications won't scale the image for you at all. So you can run something like Diablo which is normally 640x480 and use scaler set at -s 2 so it will be displayed at 1280x960 with no loss in speed.
It also helps for running FPS games like Quake 2 ... you can run Quake 2 at 320x240 and use 3x scaling to have it display at 960x720 with the same framerate you'd have running at 320x240 (around 150 FPS?). It won't look as good as actually running at 960x720, of course. |
|
| Back to top |
|
 |
billb
Joined: 12 Dec 2007 Posts: 32
|
Posted: Tue Jul 22, 2008 4:14 am Post subject: |
|
|
It would be nice to add 1.5X scaling to this scaler tool -- for example, if I wanted to use it with QEMU running Windows / Games at 640x480 and my PS3 is running at 1280x720, 1.5 X scaling would give me 960x720, filling the screen vertically.
I've already tried running Diablo under DOSBox, or QEMU / Win95 with a 1080i resolution on the PS3, and 2x scaling. So that gives me a nearly full screen (vertically) Diablo running at 1280x960 (on a 1920x1080 screen) and it runs great (maybe even better than normal?), but I usually run PS3 Linux at 1280x720 so 2x scaling is too much.
It would also be interesting to see it doing other things like antialiasing, but I started playing around with the code just to try and get a 1.5x mode going. I almost got it, but in fullscreen mode the image was offset to the right a bit.
EDIT: looking at it again, I think all I managed was to offset the image and didn't affect the scaling -- it doesn't appear to be a simple change as I had hoped
The relevant code appears to be in overlay/overlay001.c if anyone with some knowledge of this subject wants to take a look at it. For me, it's just a matter of trial and error since I have little to no idea of what I'm doing ... It might help if the comments were in English. ;-)
Last edited by billb on Wed Jul 23, 2008 1:59 pm; edited 1 time in total |
|
| Back to top |
|
 |
billb
Joined: 12 Dec 2007 Posts: 32
|
Posted: Wed Jul 23, 2008 10:16 am Post subject: |
|
|
| billb wrote: | | The relevant code appears to be in overlay/overlay001.c if anyone with some knowledge of this subject wants to take a look at it. For me, it's just a matter of trial and error since I have little to no idea of what I'm doing ... It might help if the comments were in English. ;-) |
On second thought, I may be way off on that being the right place to look. :) Still poking around ...
I've translated all the source code and readme.txt to English using Google translator -- the original source code is unmodified and translated versions are in .txt files instead (the translator hoses up the code). Here's a link to it:
http://pleasantfiction.ipower.com/ps3linux/scaler_eng.tar.gz |
|
| Back to top |
|
 |
ouasse
Joined: 30 Jul 2007 Posts: 90 Location: Paris, France
|
Posted: Tue Sep 02, 2008 2:03 am Post subject: |
|
|
| why not write a full general purpose SPE scaler, and include it in a XV extension of Xorg, or at an upper level in libSDL ? |
|
| Back to top |
|
 |
Kilonga
Joined: 12 Nov 2008 Posts: 1
|
Posted: Wed Nov 12, 2008 5:42 am Post subject: fix to scaler program to work on all ps3-video-modes |
|
|
Download the gzipped tarball of the source code mentioned above and then download the following file (patch): here.
Once you have both files copy them to your home directory and type the following commands:
| Code: | tar -zxvf scaler.tar.gz
cp scaler_borderfix.patch scaler/.
cd scaler
patch -p1 < scaler_borderfix.patch
make clean
make
sudo cp scaler /usr/local/bin/.
|
If you cannot copy the file using sudo, su to root and then copy it.
This executable should work for all ps3-video-modes.
Enjoy! |
|
| Back to top |
|
 |
|