Skip to content

Getting Started

Allison Mackenzie edited this page Mar 24, 2024 · 15 revisions

Installation

This page offers step by step instructions on how to build the MediEvil Decompilation Project using your MediEvil 1 US PSX copy of the game.

Getting started

Linux (Native or under WSL / VM)

1. Install build dependencies

The build process has the following package requirements:

  • git
  • make
  • gcc-mipsel-linux-gnu
  • binutils-mipsel-linux-gnu
  • clang
  • clang-format
  • clang-tidy-14
  • python3
  • python3-pip

Under Debian / Ubuntu (which we recommend using), you can install them with the following commands:

sudo apt-get update
sudo apt-get install -y git make gcc-mipsel-linux-gnu binutils-mipsel-linux-gnu clang clang-format clang-tidy-14 python3 python3-pip

Clone the repository

Create your own fork of the repository at https://github.com/MediEvilDecompilation/medievil-decomp, then clone your fork where you wish to have the project with the command:

git clone https://github.com/<YOUR_USERNAME>/medievil-decomp.git

This will copy the GitHub repository contents into a new folder in the current directory called medievil-decomp. Change into this directory before doing anything else:

cd medievil-decomp

Install python dependencies

The build process has a few python packages required that are located in /tools/requirements-python.txt.

To install them simply run in a terminal:

python3 -m pip install -r ./tools/requirements-python.txt

Update submodules

git submodule update --init --recursive

Disk extraction

  • Use software, such as imgburn, to rip your copy of MediEvil US for the PSX.
  • Use any software with cue/bin support, such as PowerISO, to extract the game binaries from your disk image and then put the files inside /disk/.

Note: We only care about binaries containing code, for now, so those would be:

  • MEDIEVIL.EXE
  • SCUS_942.27
  • OVERLAYS (and it's contents)

Initialization

Use this command to clean, extract the assembly, and build the project:

make init

Make sure you get an OK on all the files before proceeding to decompile any function.

Individual commands

Cleaning

Use the following command to clean any untracked files by git:

make clean

Assembly extraction

Use the following command to disassemble the game binaries:

make extract

Build

Use the following command to build the project:

make build

Check

Use the following command to confirm the built binaries are matching the binaries from the original game:

make check

Build and check

Use the following command to build and check the project in one go:

make