Giter Site home page Giter Site logo

ctr-tools / ctr-modsdk Goto Github PK

View Code? Open in Web Editor NEW
164.0 8.0 16.0 43.32 MB

ModSDK - a modding toolkit to create mods for Crash Team Racing in C. This repository also houses an effort to fully decompile and reverse-engineer CTR in C.

Home Page: https://discord.gg/WHkuh2n

Batchfile 0.08% Assembly 0.09% C 81.25% Python 0.06% C++ 18.34% CMake 0.05% HLSL 0.10% Nix 0.03% Shell 0.01%
crash-bandicoot crash-team-racing modding decompilation reverse-engineering decomp psx romhacking

ctr-modsdk's Introduction

CTR-ModSDK

ModSDK. (noun) A toolkit that allows you to create mods for Crash Team Racing (1999) in C.

Contributors Discord Server

This repository also houses an effort to fully decompile and reverse-engineer CTR in C.

🏁 Modding CTR

Requirements

This SDK requires the installation of mateusfavarin's psx-modding-toolchain. You can check the repo's readme for instructions on the installation and additional documentation on its usage. All python and pip steps are mandatory.

Downloading the SDK

After setting up psx-modding-toolchain, clone this repository into the local directory psx-modding-toolchain/games:

$ git clone https://github.com/CTR-Tools/CTR-ModSDK.git
  • You can find example mods in our repo.
  • Each mod folder includes a readme.txt file on what the mod does and how to use it.

CTR-in-C

As mentioned earlier, this repository is also used for an attempt at decompiling the original CTR assembly into human-readable C code. Our decompilation targets non-matching code that still functions identically compared to the original code.

decompile progress

Decompile Overview

🀝 Contributing

Are you interested in contributing? Have any experience in C programming language? You're welcome to join!

How to rewrite functions:

  • Make sure you have cloned this repo and installed the requirements.
  • Choose a .c file from the ghidra folder. Each file represents a code section or category. All non-numbered .c files are parts of the main EXE while the numbered files are overlays.
  • Choose a function in that section to rewrite. Read the documentation comments on what the function does and what's the address.
  • Set up a compile folder for your rewritten function using psx-modding-toolchain. Please refer to the above section for its installation and usage.

* Build codenames:
common: All versions;
926: USA Retail;
1006: Japan Trial;
1020: Europe Retail;
1111: Japan Retail.

** Code region:
exe: main EXE;
221-233: Overlays (use the original .c filename number)

  • Run build.bat and choose "Compile", "Build ISO", then test the game.
  • After you've confirmed that it's functional, add your new function .c file to the decompile directory.
  • Feel free to make a pull request after everything is working!

If you have any questions, reach us out in our Discord server.

ctr-modsdk's People

Contributors

aalhendi avatar bommel24 avatar claudiobo avatar dcxdemo avatar frds avatar mateusfavarin avatar muffinhop avatar niko1point0 avatar nonunknown777 avatar pedrohlc avatar superstarxalien avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ctr-modsdk's Issues

OverrideMPK breaks Pinstripe in Adventure Mode

When using OverrideMPK with AdvBosses or any other modpacks that have both, Pinstripe will fail to load the correct animation/model right after any podium and crash the game.

Pinstripe breaks after the first podium

Used just AdvBosses to play the first area, but Pinstripe with OverrideMPK will still breaks after podium in other areas too

So far I've only found this bug with Pinstripe, but it happens in all retail versions. The problem might lies with Pinstripes adventure mpk file.

RF Custom Textures

Retro Fueled textures are not compatible with SaveRAM, because they both take the same kernel memory.
This means RF textures can't be displayed when using CharacterRandomizer (newest version), and OxideFix (any version). RF textures also do not work in the japan version of CTR

Release 5

Must rebuild all XDELTAs for all mods that use:

  • character randomizer (now uses SaveRAM)
  • oxide fix (with updated SaveRAM)

RF mod packs were not updated, because the new SaveRAM breaks RF.
The only way to crash the game is something completely insane, like RF + 2P Arcade Cups + Randomizer all at once

2P Vertical Splitscreen bug

When using the warpball weapon, the weapon still moves on the horizontal midpoint, not the vertical midpoint

Oxide PAL bug

Oxide does not draw properly in the PAL character selection, but the rest of gameplay works fine

Current issues with 60fps

Semi-functional patches

  • Particles are patched emitter-by-emitter, 231 emitters unpatched, should patch Particles_UpdateLists
  • Texture scrolling (turbo, waterfall, etc) run at 30fps
  • Bosses dont constantly spam weapons, but it's still not right
  • When opening Adv Hub door with key, zoom out should take 2 sec, not 1 sec
  • Blizzard Bluff + Sewer Speedway update hazards at 30fps
  • N Gin Labs barrel hazard runs at 30fps
  • Weapon roulette flashes too fast, but duration is correct
  • Shiled weapon shakes too much
  • Entering warp pad sometimes works right, and sometimes throws player upward
  • Blinking map UI, partly fixed and partly abandoned
  • AI animations
  • Player reverse, crash, jump animation
  • Spiders have a slightly-off cycle

Known issues

  • Steering angular acceleration isn't patched for 60fps (see Player_Steer_GetAngularVelocity)
  • Animations are half-working, half-fix
  • Flashing colors for player icons are too fast
  • Demo Mode only lasts half-time (even though it "should" be fixed???)
  • UI highlight (red/yellow) in menus is too fast
  • Demo Mode / End-Of-Race cameras sometimes are too fast
  • Adventure Garage camera is too fast
  • Adventure Hub Warp pad electric field
  • Lots of flashing text is flashing too fast
  • At end of Time Trial / Relic, high scores disappear halfway off-screen
  • AI acceleration from starting line
  • Screen fade transitions (fade to black, fade to white, etc.)
  • Red potion (fix disabled, freezes game)
  • Bubble particles fail to be culled by water surface (hits the top of the screen)
  • Still can't skip weapon roulette by pressing circle
  • Wumpa gets collected too quickly (code for this is in DrawHUD_Racing)

Splatoon bugs

  • Powerslide meter looks empty on the first frames, even though it isn't
  • Engine sounds are spamming, should just disable those
  • Collision breaks when going uphill

This is also just unfinished in general, need to make a way to "throw" paint, and a combat system, and swimming on walls.

ModPack OxideFix and Everything Ever - Only USA Errors (no retrofueled)

Adventure mode is ubeatable due to errors in Rocky Road and Nitro Court purple token challenge, some nitros and every ? crates dont have collision, if you touch some nitros crashes the game or emulator, uncollectable multicolored crystal and invisible pits in the terrain, only in this modpack happens
image
image
image
one crate was breakable but the bomb crashed the game
image
Nitro Court
image
image
image
DED, not big surprise
image
this error date since Mod Collection Release 2 to the actual Mod Collection Release 11

Oxide all-region bugs

Mystery Caves can crash randomly, reason unknown

Purple Gem Cup podiums can run out of RAM, red screen of death, could be improper model loader

60fps bugs

List of bugs is in a txt document, saved in the src folder of the 60fps mod.
Another txt document, list of fixes, describes some features "partially" fixed, that aren't perfect

PracticeROM is broken

  • Crashes at main menu in NTSC-J
  • Save states don't work
    the latest commit (as of writing) changing PracticeROM was me trying to fix it failing to compile due to common.h changes, I guess I didn't entirely fix that

Current issues with OxideFix

  • Oxide's character preview in the character select screen is displayed with
    the wheels that the other characters' karts have. These are to be removed in
    a future version of the mod.
  • Oxide's character icon in the character select screen flies into view from
    the left side of the screen as opposed to the bottom. It is yet unknown why
    this happens.
  • Oxide's model in the character select screen displays erroneously in the
    European version of the game. This is assumed to be due to how this
    functionality was achieved by a manual edit of Oxide's character model, and
    thus how model information may be read differently in the European version.
    More research on the game's model formats may be required to fix this issue.

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.