GP2X Hw Accelerated Sdl


gfoot, you da man!

The corruption across the screen was indeed because I was trying to blit with a width of zero. A case of a "x + w < 0" should have been a "x + w <= 0" in the test for if the blit should be ignored.

And my right edge corruption is gone. Simply adding the FFCLR flag to MESGCTRL solved it. I didn't have it in there because I thought "I'm not using FIFO. I don't need that." Four hours of studying my code and paeryn's code all for a simple missing flag.

You rock. Thanks man.

Edit: 520fps for a fullscreen 11x8 scrolling grid of 32x32 16-bit tiles.
 
gfoot, yes it's me :(
your parallax demo doesnt work on my gp :(

i've tested to build a simple demo with your allegro port to find which function lock my gp, but i've some error at compilation :(

sdl acceleration of paeryn work very well on my gp

EDIT:
Stupid error in my makefile ! :)
Now i can compile some demo but for a simple "hello word" i've a black screen :(
I'm really disappointed .
 
Do you simply have to compile the program using this sdl (with a few changes for HWSURFACE), and it will workk automagically on the gp2x, or does this sdl have to be on the gp2x as well?
 
Hi All,

Is there a buildscript/configure script for this version of SDL? I would like (with the correct permissions) to include this version of SDL in my GP2X Development Environment (GP2niX).

Thanks.
 
Is there a buildscript/configure script for this version of SDL? I would like (with the correct permissions) to include this version of SDL in my GP2X Development Environment (GP2niX).
The first version had the full config stuff I think (can't check right now), the updated version with 8-bit support was a pre-compiled replacement only. I didn't change much, but I think my current code is broken in a few places (hacks all over the place) and I'm using it to test bits for the next version. Feel free to include it, but make sure there's a warning that it is known to not work at times (probably because I made assumptions without error-checking - <bad Paeryn :unsure: > )
I'm working on a new version that'll let me add all the other goodies (OSD, video, cursor, scaler, isp etc.) cleanly, hacking fbcon was too much of a mess. I'm a bit behind because I keep getting distracted by random probing of what the gp2x can do (and Battlefield2:MC), but I'll try and hurry up.
 
Last edited by a moderator:
No rush, I think its absolutely amazing what you have done so far. Most appreciated.

NOTE: BF2:MC is awsome ! COD2 is too :p
 
UPDATE, new version ready for testing...
Full source
pre-compiled
A sample program showing scaler in action
I've not tested it much, I've only tested the 16bpp stuff. I'd be very greatful if anyone wants to try it on known working SDL code and let me know of any problems.

New features:
Re-written without hacking the fbcon driver, it's now self-contained.
Hardware screen scaling! When you ask for a screen that's larger (or smaller) than the LCD it will automagically scale it to fit the screen. I've added an extra function to allow dynamic scaling too (see the README.GP2X)
Colour expansion of 1bpp blits. When you blit a 1bpp surface it will expand 0s to background and 1s to forground. An added function lets you set what these colours are (see README.GP2X)
 
Awsome work paeryn. Most impressive. Once I finish the base build of GP2niX, these libs will be the first addition to it ;)

I am thinking that all gp2x related libs/toolchains etc will be external modules (.mo files) that can be added onto the LiveCD (using multisession) or even put on a USB key and loaded manually ;) Hopefully this will help relieve any problems that updates to libs and toolchains etc. would cause.

Thanks again paeryn.
 
Just a quick fix,
Setting the colours on 8-bit mode was broken,
I forgot to put the dummy blit in before a screen flip,
If screen isn't double-buffered then setting the scaler now takes immediate effect.
Just realized that using the scaler with w&h set to 320x240 can be used to pan around a screen that's larger ;)

Re-download the files to get the new version.
 
I got it :) The problem is the audio device.

I compiled it using the ./configure flags you say on the readme

Code:
bash-2.05a# ./sms_sdl 1alexkidd.sms
SMS Plus/SDL v0.9.4aR7 (Build date Jan 23 2006)
(C) Charles Mac Donald in 1998, 1999, 2000
SDL Version by Gregory Montoir (cyx@frenchkiss.net)

Loaded `1alexkidd.sms'.
Initializing SDL... Ok.
Initializing SDL TIMER SUBSYSTEM... Ok.
Initializing SDL CONTROLS SUBSYSTEM... Ok.
Initializing SDL JOYSTICK SUBSYSTEM... SDL_SYS_JoystickInit
Joystick (PEP Joy) has 0 axes and 19 buttons.
Using button mapping I=14 II=13 START=8.
Ok.
SDL: GP2X_CreateDevice
SDL: GP2X_VideoInit
fastioclk = 0, grpclk = 0
SDL: GP2X_ListModes
SDL: Setting video mode 320x240 16 bpp, flags=10000001
SDL: GP2X_FreeHWSurfaces
SDL: GP2X_InitHWSurfaces 0x40048800, 5089280
Initializing SDL VIDEO SUBSYSTEM... Ok.
Initializing SDL SOUND SUBSYSTEM... ERROR: can't open audio: No available audio device.
 
You've not requested double-buffering when setting the video mode (SDL_DOUBLEBUF), without that you're drawing directly to the visible screen and are not synchronised with the refresh rate. When using double-buffering you have to use SDL_Flip(screen) to swap the screen you are drawing on to the screen the user sees (SDL_UpdateRects is an empty call)

Thanks for letting me know about sound - I must have been too eager when I switched the defaults to no.

Uploaded new version with sound enabled (hopefully).
Also the GP2X specific header file is now copied when doing "make install". It isn't needed for normal SDL operation - it's just to expose non-standard things like the scaler
 
Back
Top