Giter Club home page Giter Club logo

sh2proxy's Introduction

sh2proxy

A simple D3D8 wrapper and SH2 (Directors Cut) patcher, with source code included.

Thanks to Michael Koch for his open source DX8 wrapper (http://www.codeguru.com/cpp/g-m/directx/directx8/article.php/c11453/Intercept-Calls-to-DirectX-with-a-Proxy-DLL.htm)

This repo contains code for the proxy, most users will want the download below.

DOWNLOAD FROM THE RELEASES SECTION: https://github.com/emoose/sh2proxy/releases

Experimental SweetFX version can be found at emoose#2 (comment)

Additional fix for white textures (credits to Sonne170, I'll add this into the next sh2proxy release, whenever that happens): emoose#4 (comment)

Install

Binary download is available in the releases section (https://github.com/emoose/sh2proxy/releases), includes sh2proxy.ini, precompiled d3d8.dll and a matching sh2pc.exe for sh2proxy.

Visual C++ 2013 redistributable is required, download vcredist_x86.exe from

http://www.microsoft.com/en-gb/download/details.aspx?id=40784

  1. Backup your sh2pc.exe file
  2. Remove/uninstall any other SH2 modern compatibility fixes
  3. Copy contents of bin folder to your SH2 install
  4. Make sure the new sh2pc.exe file is 6,123,520 bytes
  5. Edit sh2proxy.ini with your own settings
  6. Run sh2pc.exe and enjoy!

Again, make sure any other compatibility fixes are removed to make sure they don't collide with this patcher!

If you have problems with SH2 changing your screen resolution to 640x480 when it first opens try running the following as admin

sdbinst -u -g {d2026473-6410-4150-9291-523b55495056}

If you installed any other custom SDB compatibility files you should also remove them with

sdbinst -u pathtoSDBfile

Usage

Easy mode: edit the ini file to your settings and run sh2pc.exe

Hard mode: You can now add parameters to the exe

  • -width=xxxx / -w=xxxx change screen width to xxxx
  • -height=xxxx / -h=xxxx change screen height to xxxx
  • -windowed / -window / -w force game to run in window
  • -fullscreen / -fs / -f force game to run fullscreen
  • -borderless / -bl force game to run borderless (only takes effect if game is windowed)
  • -borders / -b force game to run with borders (only takes effect if game is windowed)
  • -x=xxxx set window x position
  • -y=xxxx set window y position

To use them just run sh2pc.exe with the parameters you want, e.g.

sh2pc.exe -w=2560 -h=1440 -f

To run the game in fullscreen 2560x1440

If no ini is found it'll run the game as default with all the fixes listed below enabled, parameters will still work fine though

Fixes

Allows:

  • Custom resolutions
  • Windowed mode
  • Borderless window
  • Window positioning
  • Executable Arguments/parameters

Fixes:

  • Disables Safe Mode
  • Improve transition speed (opening up inventory/map/etc)
  • Automatically set processor affinity to only use a single core
  • Create local.fix AA fix file if doesn't exist (thanks to angular graphics for the fix!)

All of the above can be configured in sh2proxy.ini

Example INI

[Video]
# width of screen buffer (default 1280)
Width = 2560
# height of screen buffer (default 720)
Height = 1440
# set to 1 to make the game run in a window (default 0)
Windowed = 1

[Window]
# set to 1 to make the window borderless (only takes effect if windowed is enabled)
# borderless windows can't be moved normally, so set the position below
# (default 0)
Borderless = 1

# works with bordered windows too
# (default 0)
PositionX = 0
PositionY = 0

[Patches]
# forces SH2 to use one core (default 1)
SingleCoreAffinity = 1

# disable SH2 gfx safe mode (default 1)
DisableSafeMode = 1

# improve speed of transitions (opening up inventory/map/etc) (default 1)
FastTransitions = 1

# transition width/height (only used internally)
# the game normally uses your screen res, which slows transitions a lot (3-4s transition time for no reason at all!)
# if set to 0 it'll use half your screen res
# in case you still experience transition lag try setting this to a sensible value, 1280x720 is a good choice
# (default 0)
FastTransitionWidth = 800
FastTransitionHeight = 600

[Extra]
# automatically create local.fix file with angular graphics local.fix file
# should fix AA on most systems
# (default 1)
CreateLocalFix = 0

sh2proxy's People

Contributors

emoose avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.