Northfear / SDL-Vita

GXM port of SDL 1.2 with touchpad support for PS VITA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Further updates of SDL 1.2 GXM Vita port can be found HERE (I've rebased it on official GitHub SDL repo)

SDL 1.2 GXM port for PS Vita

Features

  • 1.2.16 version bump
  • Up to 20% faster than vita2d version
  • Lower memory usage
  • Working 32 bpp
  • Front touchpad support (Mouse emulation. Works with scaled/centered images)

Build instructions

  • make -f Makefile.vita

  • make install

Custom functions

Just like vita2d port, this one contains few custom functions that extend it's functionality and allow some fine-tuning

void SDL_PSP2_SetVideoModeScaling(int x, int y, float w, float h);

Sets position of rendering surface and it's dimension

void SDL_PSP2_SetVideoModeBilinear(int enable_bilinear);

Enables or disables bilinear filtering on scaled surfaces

void SDL_PSP2_SetVideoModeSync(int enable_vsync);

Enables or disables vsync

void SDL_PSP2_SetFlipWaitRendering(int flip_wait);

Enables or disables usage of sceGxmFinish during screen flip. In most of the cases it's safe to disable this. Doing so will improve performance a bit (but it might result in visual bugs in some games)

void SDL_PSP2_SetTextureAllocMemblockType(SceKernelMemBlockType type);

Sets type of memory block for all new hardware surface allocations. SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW is default one. Depending on a game SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE or SCE_KERNEL_MEMBLOCK_TYPE_USER_RW might provide a bit better (or worse) performance. Set memblock type before display/surface creation.

Performance tips

Mixed usage of SDL_SWSURFACE and SDL_HWSURFACE (for screen/surfaces) might result in decreased performance.

Set SDL_PSP2_SetFlipWaitRendering(0) unless you experience visual bugs (tearing, dissapearing elements).

Hardware surfaces with memblock type SCE_KERNEL_MEMBLOCK_TYPE_USER_RW or SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE can provide better performance is case of big number of CPU read/writes of the surface.

Generally performance of SDL_SWSURFACE and SDL_HWSURFACE is roughtly the same (hardware blit is not implemented).

Thanks to:

About

GXM port of SDL 1.2 with touchpad support for PS VITA

License:GNU Lesser General Public License v2.1


Languages

Language:C 82.4%Language:C++ 5.7%Language:Shell 4.0%Language:Objective-C 3.6%Language:M4 2.0%Language:Assembly 1.3%Language:HTML 0.6%Language:Makefile 0.2%Language:Rich Text Format 0.2%Language:R 0.1%Language:Logos 0.0%Language:Perl 0.0%Language:Batchfile 0.0%