handle src buffer underflow corner cases
[sdl_omap.git] / README.OMAP
index e1ddb06..96af240 100644 (file)
@@ -1,5 +1,5 @@
-(some) OMAP hardware support for SDL
-by notaz (notasas@gmail.com)
+OMAP specific SDL driver
+by GraÅžvydas "notaz" Ignotas
 
 
 About
@@ -8,13 +8,22 @@ About
 This is a quick SDL driver to make use of some OMAP features, namely double
 buffering and hardware scaler.
 
-The backstory of this is that SDL on Pandora console was suffering from tearing
-and stuttering problems because SDL default x11 driver doesn't work that well
-there. Almost 6 months have passed after pandora's release, no improved
-SDL versions appeared (not blaming anyone here, pandora's availability was low
-and there where were several SDL improvement in the works though). This
-encouraged me to create this quick version until something better appears
-(if ever).
+Features:
+
+ * hardware scaling support (up and down)
+ * doublebuffering support (can eliminate tearing)
+ * vsync support (can give smooth scrolling if done right)
+ * keymap change with a config file
+ * 16/24/32bpp display support
+ * touchscreen input translation to scaler source image coordinates
+ * screen surface cropping / border removal support
+
+Caveats:
+ * disabled by default (falls back to x11/fbcon SDL drivers) unless
+   SDL_VIDEODRIVER environment variable is set
+ * no windowed mode support, fullscreen only
+ * requires functional DSS2 driver with /dev/fb1 mapped to overlay1 or
+   overlay2 and enough free VRAM available for requested display mode.
 
 Although this was created for pandora, there is nothing preventing this to work
 on other OMAP platforms as well (well, nothing intentional at least).
@@ -37,9 +46,21 @@ Other environment variables:
 
 SDL_OMAP_LAYER_SIZE:
   Output layer size. Regardless what you set with SDL_SetVideoMode(), output
-  will be scaled to this size using hardware. Valid values:
+  will be scaled to this size using hardware with zero processing cost.
+  Note: scaling amount range is limited to roughly 1/4x-8x. The exact range
+  depends on various factors like version of the driver or OMAP hardware itself.
+  Valid values:
     "WxH", for example "640x480"
     "fullscreen" to cover whole screen.
+    "scaled" to upscale the screen proportionally, letterboxing or pillarboxing.
+    "pixelperfect" to upscale by a whole-number factor (e.g. 2x or 3x size).
+
+SDL_OMAP_BORDER_CUT:
+  This can be used to move parts of SDL surface out of screen, in other
+  words cut borders and zoom in. Format: <left>,<right>,<top>,<bottom>
+  For example, "0,0,16,0" would hide top 16 lines offscreen, making 17th
+  (16th if you count from 0) line the first visible.
+  Note: like for layer size ranges are limited.
 
 SDL_OMAP_VSYNC:
   Enables waiting for vertical sync on SDL_Flip() calls.
@@ -54,10 +75,23 @@ SDL_OMAP_FORCE_DOUBLEBUF:
   Note that if app isn't updating whole buffer each frame, it will glitch.
   This is the same as specifying SDL_DOUBLEBUF to SDL_SetVideoMode.
 
+SDL_OMAP_FORCE_DIRECTBUF:
+  When double buffering is not used, this option forces all blits to go
+  directly to the framebuffer (SDL_UpdateRect[s]() has no effect), which will
+  give speed but may cause flickering. Otherwise all blits will go to offscreen
+  buffer and SDL_UpdateRect[s]() is needed to update the screen (this is how
+  standard SDL works too).
+  When double buffering is used, this option has no effect (all blits always
+  go to back buffer that's displayed after flip).
+
 SDL_OMAP_NO_TS_TRANSLATE:
   Disable automatic touchscreen screen -> layer coordinate translation,
   return real screen coordinates.
 
+SDL_OMAP_TS_FORCE_TSLIB:
+  Always use tslib to read touchscreen. Without this, use X events when they
+  are available (this gives external input device support).
+
 
 Config file
 -----------
@@ -72,9 +106,15 @@ force_vsync = 1/0
 # same as SDL_OMAP_FORCE_DOUBLEBUF
 force_doublebuf = 1/0
 
+# same as SDL_OMAP_FORCE_DIRECTBUF
+force_directbuf = 1/0
+
 # same as SDL_OMAP_NO_TS_TRANSLATE
 no_ts_translate = 1/0
 
+# same as SDL_OMAP_TS_FORCE_TSLIB
+ts_force_tslib = 1/0
+
 # can be used to bind a key to SDL keysym, good for quick ports.
 # Example:
 # bind ev_home = sdlk_space