1
1
Fork
You've already forked JSRF-Chaos
0
Chaos mod for Jet Set Radio Future
  • C++ 90.7%
  • Makefile 9.3%
2025年08月05日 18:30:34 -04:00
include Add victory dance effect 2025年08月05日 18:30:34 -04:00
patches Initial commit 2025年08月03日 20:16:12 -04:00
.gitignore Initial commit 2025年08月03日 20:16:12 -04:00
chaos.cpp Add victory dance effect 2025年08月05日 18:30:34 -04:00
COPYING Initial commit 2025年08月03日 20:16:12 -04:00
inject.ld Initial commit 2025年08月03日 20:16:12 -04:00
Makefile Initial commit 2025年08月03日 20:16:12 -04:00
readme.md Initial commit 2025年08月03日 20:16:12 -04:00

Jet Set Radio Future Chaos Mod

This is less a serious project and more an exercise in (mostly) high-level binary patching. The contents are explained a bit more thoroughly than they otherwise would be as a result.

Features

Functionality is fairly basic. From startup, text is written to the bottom left of the screen to signal that the mod is working correctly. Once the player gains control of a character, the mod activates and triggers a random effect once every ten seconds, with effects ranging from healing the player to changing the ingame language to doing strange things to the camera.

Installation

If any releases are made, they will be in the form of VCDIFF files that can be applied with e.g. xdelta3.

Otherwise, to apply the mod from source, the following are required:

  • A VCDIFF binary patching utility like xdelta3
  • A Unix-like environment with some common command line utilities (e.g. POSIX-compliant make, xxd)
  • A C++ compiler supporting 32-bit x86 output and the section attribute (GCC and Clang have been tested)

The first step is to apply the appropriate patch for your region from the patches/ directory to your default.xbe. This adds a new section table with a new section named INJECT that will house the injected code, and adds a call to a function in the new section at the end of the logic for processing an ingame frame (for the curious, it replaces some normally-unused code that overlays profiling information on the screen). The patched .xbe should be left in the root directory of the repository and named default.xbe.

Simply running make will compile the code to be injected from chaos.cpp. Its contents are regular (freestanding) C++ code referencing data and functions in the game as described in the appropriate region's header in the include/ directory (TODO: implement a convenient way of selecting which region's header to include). Linking is performed according to the linker script inject.ld, which ensures correct memory layout.

Finally, running make inject will extract the machine code from the compiled output and copy it into default.xbe, updating the INJECT section's checksum as well. The end result is an .xbe that runs the injected code at the end of every frame (and passes all section checksum checks, but not a signature check).