Projects

PowerVR SGL Wrapper


Created on 2015-01-12 by Tuxality, last modified on 2023-01-15

SGL wrapper allows to run native PowerVR games on generic GPU on modern systems without the need for real PCX1/PCX2 or any PowerVR related card.

Current features



  • PowerVR SGL Direct API implementation
  • PowerVR SGL high-level API stub
  • DirectDraw API implementation (overlay)
  • Two-pass batched rendering
  • Multiple renderers available such as OpenGL 1.x, OpenGL 2.x and Direct3D 11 backend
  • Upscaling to custom resolution (aspect ratio or forced resolution)
  • Forcing windowed mode for running DDRAW / SGL application
  • Possibility to select compatibility mode with rendering as close as possible to selected hardware (PCX1, PCX2) or enforcing bilinear filtering in applications written with PCX1 nearest neighbour in mind
  • In-game patching to prevent crash on modern systems (Virtual On hangar scene after losing)
  • Ability to disable in-game 2D overlay
  • Framerate locking to the specified FPS value on demand
  • Texture dumping functionality
  • Texture replacement functionality (high resolution texture packs)
  • Fully configurable with use of config file and per-application settings override

  • Currently missing or unfinished features in development:



  • PowerVR SGL high-level API (unfinished)
  • Fog (implemented yet disabled by default in OpenGL 1.x, unimplemented in other renderers)
  • Mipmapping

  • ▼ Current Version & Downloads ▼


    Current version of PowerVR SGL Wrapper can be found below, for more detailed information regarding configuration please check the README file first.

    Version:

    A6 (alpha preview)

    Download:

    TBA

    ▼ Compatibility list ▼



    PowerVR SGL Direct API

    Name
    Type
    Mode
    Status
    Notes
    Virtual On: Cybertroopers
    Retail version
    Address
    Playable
    Fully working, missing fog.
    Purevex
    Demo version
    Address
    In game
    Missing 2D overlay, resolution does not properly scale, otherwise playable.
    BIOHAZARD (JP)
    Retail version
    Address
    Untested
    Game not tested yet, does not run due to the issue not related to the wrapper.
    Resident Evil (UK)
    Retail version
    Address
    Untested
    Same as BIOHAZARD (JP).
    Turok Dinosaur Hunter
    Retail version
    DDRAW
    Nope
    Crash after SGL initialization, requires executable hexedit by replacing "*.dll*" (2A2E646C6C2A) to the "V*.dll" (562A2E646C6C) otherwise will crash during startup thinking that supplied surplus DLLs are Turok renderer libraries.
    A Train No. 5 (JP)
    Retail version
    ?
    Untested
    Game not tested yet.
    Enigma (JP)
    Retail version
    ?
    Untested
    Game not tested yet.
    Mechwarrior 2: PowerVR edition
    Retail version
    ?
    Untested
    Game not tested yet.
    Motorhead
    Retail version
    ?
    Untested
    Game not tested yet.
    Nightmare Creatures
    Retail version
    ?
    Untested
    Game not tested yet.
    Nirgends
    Retail version
    ?
    Untested
    Game not tested yet.
    ReLoaded
    Retail version
    ?
    Untested
    Game not tested yet.
    Revolte!
    Retail version
    ?
    Untested
    Game not tested yet.
    Sub Culture
    Retail version
    ?
    Untested
    Game not tested yet.
    Ultim@te Race 1-Track
    Retail version
    ?
    Nope
    Unimplemented DirectDraw interface.
    Ultim@te Race 3-Track
    Retail version
    ?
    Nope
    Unimplemented DirectDraw interface.
    Ultim@te Race Pro
    Retail version
    ?
    Nope
    Unimplemented DirectDraw interface.
    MDK
    Retail version
    ?
    Untested
    Game not tested yet.
    Motorhead
    Retail version
    ?
    Untested
    Game not tested yet.
    Unreal
    Retail version
    ?
    Untested
    Game not tested yet.
    SGLLogo
    Tech demo
    Address
    Working
    Fully working.
    SGLUVBil
    Tech demo
    Address
    Working
    Fully working, bilinear filtering works as expected.
    SGLLogo
    Tech demo
    Address
    Working
    Fully working.
    SGLTri
    Tech demo
    Address
    Working
    Fully working.
    Stained
    Tech demo
    DDRAW
    Working
    Fully working.
    Mask
    Tech demo
    DDRAW
    Working
    Fully working.
    Cyberkd
    Tech demo
    DDRAW
    Working
    Working, missing fog, issue with upper and lower plane texture UVs.
    Seald
    Tech demo
    DDRAW
    Working
    Working, missing fog.
    Nefsgld
    Tech demo
    DDRAW
    Working
    Fully working.
    Utexdrct
    Tech demo
    DDRAW
    Working
    Fully working.
    Additive
    Tech demo
    DDRAW
    Working
    Fully working.
    PvrView (3DS viewer)
    Tech demo
    DDRAW
    Working
    Fully working.
    Scali's Donut (SGL Direct)
    Tech demo
    Address
    Working
    Fully working.

    PowerVR SGL high-level API

    Name
    Type
    Mode
    Status
    Notes
    Moon Racer
    Retail version
    ?
    Nope
    Not implemented.
    Ground Master
    Game / Tech demo
    DDRAW
    Nope
    Not implemented.
    Omega Field
    Game / Tech demo
    DDRAW
    Nope
    Not implemented.
    たたかえ!パクファモロワ!!
    Game / Tech demo
    DDRAW
    Nope
    Not implemented.
    Dual Power
    Game / Tech demo
    DDRAW
    Nope
    Not implemented.
    Scali's Donut (SGL)
    Tech demo
    Address
    Nope
    Not implemented.

    Other

    Name
    Type
    Mode
    Status
    Notes
    Tomb Raider
    Retail version
    DOS
    Nope
    This game will never work without major reverse engineering effort as it is a DOS game with statically linked SGL and direct hardware access. If you want to get it running on modern system please check my NEC PowerVR reverse engineering project.
    Tomb Raider: Unfinished Business
    Retail version
    DOS
    Nope
    Same as Tomb Raider.



    ▼ Screenshots ▼



    PLEASE NOTE:
    Performance figures were achieved on an Apple M1 based MacBook Pro running Wine Crossover under Rosetta 2 (x86 / x86_64 to ARMv8.5A dynamic recompilation) with multiple layers / wrappers / frameworks in between, this does not indicate performance on x86 / x86_64 Windows machine which easily achieves more than 200FPS in tech demos on modern systems.


    Virtual On: Cyber Troopers
    Screenshot 1Screenshot 2Screenshot 3Screenshot 4Screenshot 5Screenshot 6Screenshot 7Screenshot8Screenshot 9Screenshot 10Screenshot 11Screenshot 12Screenshot 13Screenshot 14Screenshot 15Screenshot 16Screenshot 17Screenshot 18Screenshot 19Screenshot 20Screenshot 21Screenshot 22Screenshot 23Screenshot 24Screenshot 25Screenshot 26Screenshot 27Screenshot 28Screenshot 29
    Bilinear vs nearest neighbour texture filtering selected in game options
    Screenshot linearScreenshot nearest
    Texture replacement, water texture original on the left and AI upscaled 4x on the right as an example:

    Screenshot texture replacement original  Screenshot texture replacement

    Game upscaled from 640x480 to 1920x1440 resolution (click to open fullsize image)
    Screenshot upscale
    Purevex (demo version)

      Screenshot purevexdemo

    SGLUVBil demo
    Screenshot SGLUVBil linear 1Screenshot SGLUVBil linear 2Screenshot SGLUVBil nearest 1Screenshot SGLUVBil nearest 2
    SGLLogo demo
    Screenshot logo 1Screenshot logo 2
    Stained demo
    Screenshot stained 1
    Mask demo
    Screenshot mask 1Screenshot mask 2
    Scali's Donut demo
    Screenshot scalidonut
    Cyberkd, Seald, Nefsgld, Utexdrct, Additive and PvrView demos
    Screenshot cyberkdScreenshot sealdScreenshot nefsgldScreenshot utexdrctScreenshot additiveScreenshot PvrView

    ▼ Development Diary ▼


    Media with current and old versions of PowerVR SGL wrapper are posted below just for reference.

    ➤ Version: A5 (outdated)


    Unreleased alpha preview based on old source code before SGL wrapper being rewritten from scratch.

    ➤ Version: A4 (outdated)


    Corrected a lot of SGL issues, now rendering is very close to the original hardware. Still missing fog and mipmapping. DirectDraw is still mostly unimplemented yet, so overlay in Virtual ON is still not working. Optimized some places in code, so it runs quite well on a little more time accurate hardware.

    Videos



    Virtual ON: Cyber Troopers on Retro PC

    Running on PC with AMD Athlon 600MHz (Slot A), 128MB RAM, NVIDIA GeForce 2 GTS and Microsoft Windows 98 Second Edition.

    ➤ Version: A3 (outdated)


    This is refactored version of my wrapper which contains new (unfinished) DirectDraw wrapper.

    Videos



    Virtual ON: Cyber Troopers


    Screenshots



    Virtual ON: Cyber Troopers
    Screenshot 1  Screenshot 2

    Screenshot 3  Screenshot 4

    Biohazard (Japanese version of Resident Evil)
    Screenshot 1  Screenshot 2

    Screenshot 3  Screenshot 4

    ➤ Version: A2 (outdated)


    Slightly corrected texturing.

    Screenshots



    Virtual ON: Cyber Troopers
    Screenshot 1  Screenshot 1

    Screenshot 3  Screenshot 4

    ➤ Version: A1 (outdated)


    This is my first attempt, which works as a drop-in replacement for SGL library.

    Videos



    Virtual ON: Cyber Troopers


    Turok Dinosaur Hunter


    Biohazard (Japanese version of Resident Evil)




    ➤ Version: A0 (outdated)


    Some simple wrapping and blitting tests, which works as a drop-in replacement for SGL library.

    Videos



    Virtual ON: Cyber Troopers (various tests)






    Click to list all projects...