Code Monkey home page Code Monkey logo

sssv's Introduction

Space Station Silicon Valley N64

build progress

A WIP decompilation of Space Station Silicon Valley (SSSV) for N64. Checkout the wiki for more information.

Note: To use this repository, you must already own a copy of the game.

Building

The instructions below assume that you will be using Ubuntu 20.04; either natively, via WSL2, or via Docker. Please check the packages.txt and requirements.txt for the prerequisite Linux and Python packages respectively.

Natively

Clone the repository; note the --recursive flag to fetch submodules at the same time:

git clone --recursive [email protected]:mkst/sssv.git

Navigate into the freshly cloned repo

cd sssv

Place the US 1.0 SSSV ROM in the root of this repository, name it baserom.us.z64, and then run the first make command to extract the ROM:

make extract

Now build the ROM:

make --jobs

If you did everything correctly, you'll be greeted with the following:

build/sssv.us.z64: OK

Docker

Clone this repository, place the baserom.us.z64 at its root, and then run the Docker image via:

docker run --rm -ti -v $(pwd):/sssv ghcr.io/mkst/sssv:latest

From here you can run the make extract and make --jobs commands.

Building EU Version

Place baserom.eu.z64 in the root of the repository, and suffix each make command with VERSION=eu. Note that whilst this will build the EU ROM, minimal effort has been made to decompile this version.

Building NON_MATCHING Version

A number of functions within the ROM have been decompiled to a state where they are functionally equivalent, but are not a byte-perfect match. Progress is approximately 12% ahead of the fully matching build. In order to build/test the non-matching, add NON_MATCHING=1 argument to the make commands.

ROM Versions

There are 5 known versions of the ROM:

Country Code CRC1/CRC2 ROM SHA1 Notes Version
E - North America BFE23884/EF48EAAF e5e09205aa743a9e5043a42df72adc379c746b0b US 1.0 1.37
J - Japanese BFE23884/EF48EAAF 7320f08474c011fc7781093bf1a6818c37ce51e2 JP (Unreleased) 1.37
E - North America FC70E272/08FFE7AA c968bba6a90db9ecbd957e910684a80726b0497d US 1.1 1.37
P - European FC70E272/08FFE7AA 23710541bb3394072740b0f0236a7cb1a7d41531 EU 1.37
??? ??? ??? NES World 1.26B

Only US and EU versions were released to the public. If you are in possession of a beta/prototype ROM, please let me know - mkst#4741.

ROM Info

Layout

The layout of the ROM is work-in-progress. Three sections of code have been identified along with a mix of compressed and non-compressed data.

Main

This is the code that is loaded when the ROM first starts up, it is responsible for spawning the various game threads, handling controller input, playing sound effects etc. Also includes the libultra library code.

Overlay1

This is the code for the language select, intro cinematics and not much else.

Note: In the EU ROM this section is compiled without optimisation!

Overlay2

Overlay2 contains the core Space Station Silicon Valley game logic.

Compression

Uses RNC for a number of assets.

Compression is almost completely matching; 261/263 files match after compression. rnc_461900 and rnc_63DC20 are still a problem.

In order to decompress the game assets run make decompress after you have performed the make extract step. This will be done automatically when matching compression has been figured out.

Repo layout

asm/             ; assembly files split by splat (not checked in)
assets/          ; binary files split by splat (not checked in)
build/           ; build folder (not checked in)
include/
  2.0I/          ; libultra 2.0I headers
lib/libultra.a   ; libultra 2.0I static library
src.{us|eu})/
  core/          ; core code
  data/          ; game data e.g. DisplayLists, Vtx + more
  libultra/      ; custom libultra code
  sssv/          ; game code
tools/
  ido5.3_recomp/ ; static recompilation of IDO 5.3 compiler
  splat_ext      ; custom splat extensions

Tools

  • asm-processor; allows GLOBAL_ASM pragma - replacing assembly inside C files
  • asm-differ; rapidly diff between source/target assembly
  • decomp-permuter; tweaks code, rebuilds, scores; helpful for weird regalloc issues
  • ido-static-recomp; no need to use qemu-irix anymore!
  • m2c; assembly to C code translator
  • rnc_propack_source; open-source compressor/decompressor for RNC file format
  • splat; successor to n64split

Useful Links

sssv's People

Contributors

mkst avatar chillinmcill 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.