Giter Club home page Giter Club logo

swe1r-patcher's Introduction

swe1r-patcher

swe1r-patcher enhances your "Star Wars Episode 1: Racer" (SWE1R) experience:

  • Higher resolution fonts
  • Allow upgraded podracers in multiplayer
  • Disable player collisions in multiplayer
  • Enable new debug features
  • ...

If you like my software, you can make a donation to me; more information:

http://jannikvogel.de/

Compatible game versions

This software has been tested with all variants of the 1.1 US release.

This includes the GOG.com and Steam re-releases.

Installation instructions for Windows users

There are different methods to use swe1r-patcher, each has it's own benefits and drawbacks.

DLL method (recommended)

This method sits between DirectX and the game to wait until the game is about to begin. This makes it compatible with the Steam release, as it happens after DRM checks. However, it might be incompatible with other software that uses the same trick.

  • Copy "dinput.dll" and "textures" folder into your game directory.
  • Run swep1rcr.exe to start the game.

Loader method

This manually modifies the game in memory. Due to security restrictions, this does not work for everyone. Also, because the modifications happen very early, it's incompatible with the Steam release.

  • Copy "swe1r-loader.exe" and "textures" folder into your game directory (must contain "swep1rcr.exe").
  • Run swe1r-loader.exe to start the game.

Patcher method

This changes your "swep1rcr.exe" file permanently. Because this method does not run the game directly, the patcher also works on macOS and Linux. However, it is compatible with other hacks, but incompatible with the Steam release because of DRM checks.

  • Make a backup copy of your "swep1rcr.exe".
  • Run swe1r-patcher.exe <path-to-your-swep1rcr.exe>.
  • Run swep1rcr.exe to start the game.

Build instructions for software developers

The source code can be found on GitHub:

https://github.com/JayFoxRox/swe1r-patcher

Windows (MSYS2)

Run the following in a MinGW32 Shell:

pacman -S git mingw32/mingw-w64-i686-cmake mingw32/mingw-w64-i686-gcc
git clone https://github.com/JayFoxRox/swe1r-patcher.git
cd swe1r-patcher
mkdir build
cd build
cmake .. -G "MSYS Makefiles"
make

macOS / Linux

It is assumed you have git, cmake and a compatible compiler installed.

git clone https://github.com/JayFoxRox/swe1r-patcher.git
cd swe1r-patcher
mkdir build
cd build
cmake ..
make

License

Code and documentation

(c)2019 Jannik Vogel

No commercial use allowed; all rights reserved.

You are only allowed to download, compile and run this software.

Further distribution is not allowed.

The code which is patched into the output file is licensed under the same conditions.

Therefore, you have no right to restribute the softwares output.

Font artwork

(c)2018 Jordan Blackburn

All font artwork is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

In particular, the font artwork is found in the files with filenames matching the pattern font*.png and font*.data.

swe1r-patcher's People

Contributors

jayfoxrox avatar jordan4302 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

swe1r-patcher's Issues

Frame limiter

There should be a frame limiter - should be easy enough: hook into the display routine, and wait until the next frame should hit.

Keep track of supported features

Ideally by implementing #6 we should have a list of supported features and keep track of them, and what's bad / good about them (or more specifically: who should be using them).

At the time of writing these are:

Integrated

(More information regarding these can be found in the respective PR)

  • Replacing font0, font1, font2, font3, font4 with higher resolution versions ( partially in #3 ); graphics enhancement
    The existing font hacks also come with their own resource files, so applying them won't break the game for anyone.
    However, we do need legal remakes of the original fonts, and that work is not complete yet. The current fonts look "odd" so nobody should use the patcher.
    The files need to be licensed properly and a way to integrate them should be found. As generating *.raw or *.bin files using external tools is not the best option.

  • Patch quality of streamed audio; audio enhancement
    This patch breaks the game for people, because suddenly all background music files would have to be stored at 44.1kHz . It should be optional or be enhanced to dynamically change the playback rate etc.

  • Upgrade network play updates to 100%; network mode enhancement
    This patch is untested. It has been confirmed to work in hosting mode, but no other players were on the server at the time. It has also not been tested wether the DirectPlay GUID switching works, which should prevent players with this patch, to play with unpatched versions.
    Also see #5 .

  • Disable podracer vs. podracer collisions in multiplayer mode ( #10 ); network mode enhancement

  • Load sprites from TGA ( #11 ); development feature
    This was merged mostly for its support functions, to make it easier to integrate #14 .
    Note that this does nothing, if there are no replacement TGA files. However, if the TGA files exist, it might cause memory leaks or other issues.

  • Add string display when a trigger is executed ( #12 ); development feature


Network mode enhancements also affect the games DirectPlay GUID, and combinations of enabled features should probably generate a unique combination for the GUID, so only versions with the same patches can play together.

Development features are pretty shady hacks and should not be used. They might break some things in the game logic, leak memory or do other bad things. They might still be useful for prototyping future hacks or tools.

Network upgrade patch only allows 1 health and 1 level in menu

While the ingame config is fully configurable (independent for each upgrade category), the select-podracer display is messy and only uses 1 kind of upgrade part level / health for all categories.

So the visual data from the menu and the actual handling would be out of-sync.
The patch should be ehanced so the configuration can be done freely.

Code is dirty

This was a bit messy as I wrote it at 7AM without sleep. Needs a cleanup.

Fonts are too detailed / pixelated

The game looks bad when trying to display the fonts at smaller resolutions. The edges become very pixelated.

We should consider reducing our resolution to increase font-smoothing.
We should also review the games texture interpolation states for fonts.

Also, the font texture format should be changed from A4 to A8.

Maintain this project as individual

I think this is too hacky for OpenSWE1R and diverges too much from the OpenSWE1R idea.

I should add my typical readme for private projects with donation links and such.
Obviously I should still link to OpenSWE1R and probably also advertise that project in the patched game (with an additional text on the main menu for example).

I should also add a "thanks" for work done by @jordan4302 and ask about sharing donations and permissions in this context.

Patched file does not work on Windows

We currently have issues running on Windows. We seem to break the Windows PE loader.
I assume that our poorly highjacked .rsrc section is the issue.
It's only a theory as I don't have time to debug this.

Other things which might go wrong could be file size alignment or the other size information:

SizeOfCode		000aa800
SizeOfInitializedData	00a22600

A hook / loader would be ideal, to avoid this mess altogether.
However, that would not be supported in OpenSWE1R and I'm not currently willing to integrate such enhancement hacks into OpenSWE1R either.

So, for testing, a better patcher would be ideal, because that would still work with OpenSWE1R which is my only way of testing.

Network GUID not same for loader, patcher, DLL

An unconfirmed bug report.

I did a code review but could not see an issue? Needs testing.
The stdout should display the network GUID, so this should be easy to debug by running the game / loader / launcher via cmd or powershell

(This was reported by LightningPirate via Discord DM)

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.