Porting a 256 colors game to PSP

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
mICrO
Posts: 25
Joined: Mon Oct 17, 2005 2:48 am
Location: Madrid (Spain)

Porting a 256 colors game to PSP

Post by mICrO »

On my gamming group we where thinking to port an old comercial game, developed by some of our members, to PSP platfform, but the game its in 256 colors (and 4:3), I was wonder about how its the best approach.

For goin to 4:3 to 16:9 isn't a big task, the game type its something like 'final figth', and we make the scrolling area just for 16:9.

All graphics are 8 bits, with a math caculate palette, we wont convert all graphics to 16 bits, the are about a undred of then, and all graphics rutine, like alpha blend, and so on, worsk with thoses colors indexes.

We could let all 2D graphics rutines stay at they where, working with those 8 bit paletted pixels, and finally when I have a 8 bits buffer, convert on the fly to 16 bits. We could convert those 8 bits pixeles, with a simple table, into 16 bits.

I could upload a texture a just draw a quad with ortho projection, no depth buffer, nor ligths, then I could get some bilinear filtering, but maybe I'll not, because graphics they will not look 'the same'.

Or I could just mecpy the resulting buffer, propperly offset, to VRAM and that its,

I supose that PSP don't have paletized textures, or they could be slower.

We dont think to re-coding all graphics ruttines will be good idea, we want just make some easy and fast port.

Comments, sugestions?
mICrO^NewOlds
ja_medina at hotmail dot com

There is no such thing as a moral or an immoral book.

Books are well written or badly written.
(Oscar Wilde)
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

PSP has palettized textures and they are very fast, faster than 16-bit direct color formats because of the lower bandwidth and texture cache requirements. Just stick with your original bitmap data, maybe swizzle it.
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

The PSP handles palettized textures just fine. You just have to do a final striped blit using the GE (to get maximum performance) with the proper palette loaded, and the hardware will do all the hard work for you.
GE Dominator
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

SDL supports 8 bit palettes for screen surfaces. There is no support for swizzling, but I think you will find the PSP is fast enough to port an old game.
mICrO
Posts: 25
Joined: Mon Oct 17, 2005 2:48 am
Location: Madrid (Spain)

Post by mICrO »

Thanks to all for the anwsers.

I don't need SDL I have my own game engine with enough features, includes windows version, only I was wondering about 8 bits conversion and / or paletted textures.
mICrO^NewOlds
ja_medina at hotmail dot com

There is no such thing as a moral or an immoral book.

Books are well written or badly written.
(Oscar Wilde)
ufoz
Posts: 86
Joined: Thu Nov 10, 2005 2:36 am
Location: Tokyo
Contact:

Post by ufoz »

Take a look at the gu/clut sample in the pspsdk, it does exactly this.
Post Reply