Pandora improved SDL for pandora


ok a new build available at the usual location:


http://notaz.gp2x.de...psdl_latest.zip


Changes:

  • deal with different DSS2 (OMAP display driver) versions better
  • use tripple buffering when enough memory is available for reduced chance of tearing (app must still set SDL_DOUBLEBUF or SDL_OMAP_FORCE_DOUBLEBUF env variable), fall back to doublebuffering if not (print a warning)
  • support external mice, nubs in mouse mode


With these john4p's build should no longer be needed.


If there are no issues reported in a few days, I'll queue this for next firmware update.

Before you finalise it for firmware, can I just request that hold switch support be added in?


Rockbox recently added shoulder button support for track skipping which is fine except when the buttons are being accidentally pressed. We have the hold switch and it seems it generates an X event but is unhandled in SDL.
 
ok a new build available at the usual location:


http://notaz.gp2x.de...psdl_latest.zip


Changes:

  • deal with different DSS2 (OMAP display driver) versions better
  • use tripple buffering when enough memory is available for reduced chance of tearing (app must still set SDL_DOUBLEBUF or SDL_OMAP_FORCE_DOUBLEBUF env variable), fall back to doublebuffering if not (print a warning)
  • support external mice, nubs in mouse mode


With these john4p's build should no longer be needed.


If there are no issues reported in a few days, I'll queue this for next firmware update.

I'm having trouble enabling the external mouse support (turn on the nubs) in the newest version.. I recompiled my project with this version,


added this to start up script:



Code:
export SDL_OMAP_TS_FORCE_TSLIB=1

I tried this as well



Code:
export SDL_OMAP_TS_FORCE_TSLIB=0


It's scaling up 400x240 to 800x480 so I know other environment exports are working..


It's past midnight here.. I'm prob missing something simple..
 
Last edited by a moderator:
Before you finalise it for firmware, can I just request that hold switch support be added in?


Rockbox recently added shoulder button support for track skipping which is fine except when the buttons are being accidentally pressed. We have the hold switch and it seems it generates an X event but is unhandled in SDL.
It doesn't look like it's using omapdss SDL driver, so that's not going to help.

It's past midnight here.. I'm prob missing something simple..
Switch the nubs to mouse mode?
 
You should not need to, maybe it's picking the wrong lib? You know you have to set LD_LIBRARY_PATH or copy it to lib/ right?
 
I should be exporting it properly the other features your improved SDL seem to be working.. I'll paste my whole startup script.


Also I did copy the library files to the /mnt/utmp/fachoda-complex/lib folder...



Code:
#!/bin/sh

export PATH="/mnt/utmp/fachoda-complex:${PATH:-"/usr/bin:/bin:/usr/local/bin"}"

export LD_LIBRARY_PATH=":${LD_LIBRARY_PATH:-"/usr/lib:/lib:/mnt/utmp/fachoda-complex/lib"}"

export HOME="/mnt/utmp/fachoda-complex" XDG_CONFIG_HOME="/mnt/utmp/fachoda-complex"

export SDL_VIDEODRIVER=omapdss

export SDL_OMAP_TS_FORCE_TSLIB=1

export SDL_OMAP_LAYER_SIZE=fullscreen


#if [ -d /mnt/utmp/fachoda-complex/share ];then

# export XDG_DATA_DIRS=/mnt/utmp/fachoda-complex/data:$XDG_DATA_DIRS:/usr/share

#fi

export SDL_AUDIODRIVER="alsa"

cd $HOME

[ -e "$HOME/scripts/pre_script.sh" ] && . $HOME/scripts/pre_script.sh

if [ -e "$HOME/scripts/post_script.sh" ];then

fachoda fullscreen x 400 y 240 $*

#fachoda fullscreen x 800 y 480 $*

. $HOME/scripts/post_script.sh

else

exec fachoda fullscreen x 400 y 240 $*

#exec fachoda fullscreen x 800 y 480 $*

fi
 
Last edited by a moderator:
In your export of the libs, set the libdir of the pnd in front of /usr/lib.


I think it will take the one, it finds first. In this case it will be the one on the nand.
 
Last edited by a moderator:
In your export of the libs, set the libdir of the pnd in front of /usr/lib.


I think it will take the one, it finds first. In this case it will be the one on the nand.

Yep your the man mcobit!.. something so simple..


plus this needs to be set to 0:



Code:
export SDL_OMAP_TS_FORCE_TSLIB=0
 
Ok, so touchscreen AND nubmouse will not work together?


Well, you can't have everything I guess ;)


Also, is this sdl still missing scancodetranslation for the keyboard?
 
you cant do nubs as mouse and touchscreen at the same time? really? :( ah well maybe a future revision will allow this.
 
So here's a... bug?.. I've experienced. I'm doing a kill SIGSTOP on a process using the new SDL which suspends the process exactly as it should, but if I then hit some keys and resume with a SIGCONT it picks up all the keys that were pressed. It's like the key presses/releases were buffered while the processes was stopped. I'm not sure if that is expected behavior or not but it is causing me problems. I'm hoping to find some way of temporarily halting the input going to a running process.
 
you cant do nubs as mouse and touchscreen at the same time? really? :( ah well maybe a future revision will allow this.

Well I can with Fachoda-Complex I just ported, Nubs and Touchscreen seem to work fine together. Even when scaling up a lower resolution.
 
Last edited by a moderator:
you cant do nubs as mouse and touchscreen at the same time? really? :( ah well maybe a future revision will allow this.

Well I can with Fachoda-Complex I just ported, Nubs and Touchscreen seem to work fine together. Even when scaling up a lower resolution.

Oh, I see, I confused the variable with this one: SDL_OMAP_NO_TS_TRANSLATE
 
So here's a... bug?.. I've experienced. I'm doing a kill SIGSTOP on a process using the new SDL which suspends the process exactly as it should, but if I then hit some keys and resume with a SIGCONT it picks up all the keys that were pressed. It's like the key presses/releases were buffered while the processes was stopped. I'm not sure if that is expected behavior or not but it is causing me problems. I'm hoping to find some way of temporarily halting the input going to a running process.
Kernel keeps the event queue, otherwise if you run something demanding and something else just sitting and waiting for keys, the later would miss some keypresses. This is not something pandora/Linux specific, you'd get the same on Caanoo or Windows.

plus this needs to be set to 0:



Code:
export SDL_OMAP_TS_FORCE_TSLIB=0
I recommend not to set this at all.

Also, is this sdl still missing scancodetranslation for the keyboard?
Scancodes are device specific, and for this device they are 0.


I guess you'd want them to match PC keyboard instead?
 
Last edited by a moderator:
Kernel keeps the event queue, otherwise if you run something demanding and something else just sitting and waiting for keys, the later would miss some keypresses. This is not something pandora/Linux specific, you'd get the same on Caanoo or Windows.
I'm pretty sure I remember working around this with the old SDL library by removing focus from the "window". I'm not certain how to accomplish the same thing now that there is no window at all. I could also be crazy and misremembering, it was quite a few months back that I attempted to do this the first time.


I'll find a work around somehow, I'm sure.
 
Wow! Now I could use it with qemu, too.


Notaz, you are just great!


Edit: Unfortunately it still doesn't pick up any keypresses in qemu, also the nubs doesn't seem to work, but maybe this is just a problem with qemu and how it handles the keyboardemulation.


Everything works with normal sdl though.
 
Last edited by a moderator:
There's a problem which has been reported for dosbox and uae4all - with nub input the mouse pointer is restricted to only a small rectangle of the screen.


Could the reason be that you don't "upscale" the nub input to the scaled gfx? E.g. it seems that if you have an SDL_Surface of 320x240 scaled to 640x480 you can only move the mouse pointer in the first 320x240 pixels of the 640x480-area.
 
There's a problem which has been reported for dosbox and uae4all - with nub input the mouse pointer is restricted to only a small rectangle of the screen.


Could the reason be that you don't "upscale" the nub input to the scaled gfx? E.g. it seems that if you have an SDL_Surface of 320x240 scaled to 640x480 you can only move the mouse pointer in the first 320x240 pixels of the 640x480-area.

As Mcobit pointed out in the Dosbox thread, it doesn't use Notaz's Improved SDL. I can't speak for uae4all though..


And from my experience working with Notaz's SDL, the latest version has no trouble with scaling and Nub / Touchscreen support.
 
Last edited by a moderator:
As Mcobit pointed out in the Dosbox thread, it doesn't use Notaz's Improved SDL. I can't speak for uae4all though..


And from my experience working with Notaz's SDL, the latest version has no trouble with scaling and Nub / Touchscreen support.
I see, thanks for clarifying that.
 
Last edited by a moderator:
Back
Top