Pandora improved SDL for pandora


SDL_NumJoysticks() returns 0, and I read ABXY as keys (SDLK_HOME and so on)
SDL Joystick subsystem initialized ?

Yes. If I use the default SDL, it does return 2 (provided I set the nubs to absolute mode first). If I use notaz' SDL, I get nothing (no joysticks, no dpad) if I set the nubs in absolute mode first, and otherwise I get the nubs as mouse and dpad/ABXY works as usual (SDLK_LEFT, SDLK_HOME etc.), but no joysticks.
 
I hacked in support for scaling proportionally, either all the way to the size of the screen ("scaled") or with a whole number ratio, so each pixel is scaled the same amount ("pixelperfect"). It usually works out nicer than "fullscreen" for non-widescreen applications.


https://www.dropbox....and_scaled.diff
Looks good, could you do a git patch that I could just 'git am' (with git format-patch maybe)?


Would be nice if it had an update to README.OMAP too.

Yes. If I use the default SDL, it does return 2 (provided I set the nubs to absolute mode first). If I use notaz' SDL, I get nothing (no joysticks, no dpad) if I set the nubs in absolute mode first, and otherwise I get the nubs as mouse and dpad/ABXY works as usual (SDLK_LEFT, SDLK_HOME etc.), but no joysticks.
This doesn't look right, can you post a testcase/some binary to try this?
 
I don't really need the nubs for my application (a simple but fancy flashlight thingie; the left nub is used to set hue, which is a circular thing so that nicely maps to nub positions), so I'm currently continuing without nubs - but the code is there to handle joysticks, and it works when using the default SDL. It will soon be ready, and I'll upload it as a PND (with sources included in the PND) to the repo then.


By the way, thanks for making your improved version of SDL for the Pandora - it really makes a difference in my case: now I can use all 2^24 colors, and the stroboscope is much better with doublebuffering/vsync.
 
I hacked in support for scaling proportionally, either all the way to the size of the screen ("scaled") or with a whole number ratio, so each pixel is scaled the same amount ("pixelperfect"). It usually works out nicer than "fullscreen" for non-widescreen applications.


https://www.dropbox....and_scaled.diff
Looks good, could you do a git patch that I could just 'git am' (with git format-patch maybe)?


Would be nice if it had an update to README.OMAP too.
Here you go: https://www.dropbox.com/s/hh3p9ksx0sm6ihk/omapdss_layer_pixelperfect_and_scaled.patch :)
 
Last edited by a moderator:
I've pushed some code for minimizing when pandora key is pressed and was able to run Snes9x4P and PCSX at the same time, successfully alt-tabing between them. Might be useful feature for some, binary zip updated too.

Is this already available in the current SuperZaxxon? I'm still running beta6, and all the Pandora button does is generate keyevents with keysym 147. If I try to do SDL_WM_IconifyWindow() it returns 0.
 
I've pushed some code for minimizing when pandora key is pressed and was able to run Snes9x4P and PCSX at the same time, successfully alt-tabing between them. Might be useful feature for some, binary zip updated too.

Is this already available in the current SuperZaxxon? I'm still running beta6, and all the Pandora button does is generate keyevents with keysym 147. If I try to do SDL_WM_IconifyWindow() it returns 0.
It appears it's not, nobody bumped the OE recipe :(
 
Oh, that's too bad, it would be nice to be able to minimize SDL programs. I hope the first .next release will be ready soon and includes the latest version of your SDL.
 
Request: Scanline-/Raster-overlays/masks (incl. transparency)


Not long ago Toni Wilen added support for overlays/masks to WinUAE where you can easily achieve nice scanline- and raster-effects.


The masks are just grayscale pngs that are overlayed and repeated all over the displayed gfx.


The "color" of each pixel defines the transparency of the current point.


Black (0.0) means the current pixel is completely intransparent - solid black.


White (1.0) means the current pixel is completely transparent - meaning invisible.


Anything in between (e.g. 0.75) means the pixel is partially transparent (e.g. 0.75 = 75% transparent).


Example screenshot from WinUAE without mask:


wqrf9e.png



Now overlayed with this mask (Scanlines75.png):


20zraeh.png
(75% transparent scanlines)


turns the gfx into:


24ozptx.png



Every emulator and game using your sdl would benefit from this.


It would be ideal if the mask could be applied independently of the resolution of the sdl_surface so that the mask could always use the full resolution of the SDL_OMAP_LAYER_SIZE which the sdl_surface is scaled up to.


Can you add this, notaz?
 
Last edited by a moderator:
This would require changing the app's framebuffer behind it's back, which can cause problems in some situations, like if it blits on itself to achieve scrolling. I don't think it's SDL's job to do things like this.

It would be ideal if the mask could be applied independently of the resolution of the sdl_surface so that the mask could always use the full resolution of the SDL_OMAP_LAYER_SIZE which the sdl_surface is scaled up to.
That's not even possible, scaler result is not readable/writable in any way, only OMAP4 has this feature added.
 
This thread should be sticky, since this is one of the most useful things for Pandora devs and porting.
 
Hi, anyone here willing and able to help me to evaluate the use of this for the pnd of derclou-sdl and if it makes sense to actually implement it?


I have many noobish questions, I have barely any idea what I am talking about, but I have time (meaning I don't mind if an answer takes a week, not meaning: I can afford spending 500 hours) and I would like to learn :) Thanks!
 
You don't have to do much to test it, you just need basic script editing skills (set environment variable), which is done by adding this line:


export SDL_VIDEODRIVER=omapdss


somewhere before running the actual program.
 
Back
Top