Un-scale by 2

Hi,

I’ve got a Sharp Zaurus SL5600 (Xscale 400Mhz, screen resolution=240x320).
I’m just wondering if a game runs at minimum 640x480. Can I change the SDL library to un-scale it by 2 so the SDL library will render the game at 320x240?

Where should I look in the source? Is it possible and do you think it’ll be an easy task? If it’s possible is it going to perform?

Regards,
Ced.

AFAIK, there are no official SDL backends that do scaling.

Either way, rendering in 640x480 and then scaling down to 320x240
would be very expensive, even for a desktop computer. I don’t think
any handheld devices have the power required to make that a viable
solution.

You’re much better off scaling all graphics first, and then do the
real time rendering without scaling. However, you’ll have to
implement that in the game.

It would be possible to do it inside SDL, but it would be rather
hairy, and it would be extremely inefficient with applications that
don’t bother SDL_DisplayFormat*()ing surfaces. About the same issues
as glSDL, where every surface is essentially a shadow surface in
relation to the actual backend, and surfaces must be h/w surfaces (ie
require locking) to allow the backend to cache textures.

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Friday 14 May 2004 13.04, Cedric Bompart wrote:

Hi,

I’ve got a Sharp Zaurus SL5600 (Xscale 400Mhz, screen
resolution=240x320). I’m just wondering if a game runs at minimum
640x480. Can I change the SDL library to un-scale it by 2 so the
SDL library will render the game at 320x240?

Where should I look in the source? Is it possible and do you think
it’ll be an easy task? If it’s possible is it going to perform?

What’s what I did with “Mad Bomber embedded.”

For Bug Squish on the Zaurus, I scaled /some/ graphics, but simply changed
the dimensions and some of the gameplay (speed/movement) to fit on the
smaller screen.

Ref:
http://www.newbreedsoftware.com/zaurus/

-bill!On Fri, May 14, 2004 at 01:34:09PM +0200, David Olofson wrote:

You’re much better off scaling all graphics first, and then do the
real time rendering without scaling. However, you’ll have to
implement that in the game.