/perfect_dark

work in progress port of n64decomp/perfect_dark to modern platforms

Primary LanguageCMIT LicenseMIT

Perfect Dark port

This repository contains a work-in-progress port of the Perfect Dark decompilation to modern platforms.

To run the port, you must already have a Perfect Dark ROM, specifically the ntsc-final/revision 1 version
(md5 e03b088b6ac9e0080440efed07c1e40f).

Status

Currently only 32-bit platforms are supported, namely x86 Windows and Linux. Note that 32-bit binaries will still work on 64-bit versions of those platforms, though you might have to install some additional libraries.

The game is in a somewhat functional but probably unstable state. There are major graphical issues, minor audio issues and possibly other issues.

There are currently no "extra features" implemented except for janky mouselook, arbitrary resolution support (with partial widescreen support), some extra controls and somewhat expanded heap size.

Download

Latest automatic builds for supported platforms:

Running

You must already have a Perfect Dark ROM to run the game, as specified above.

  1. Create a directory named data next to pd.exe.
  2. Put your Perfect Dark ROM named pd.ntsc-final.z64 into it.
  3. Run pd.exe.

Controls

1964GEPD-style and Xbox-style bindings are partially implemented.

N64 pad buttons X and Y (or X_BUTTON, Y_BUTTON in the code) refer to the reserved buttons 0x40 and 0x80, which are also leveraged by 1964GEPD.

Action Keyboard and mouse Xbox pad N64 pad
Fire / Accept LMB/Space RT Z Trigger
Aim mode RMB/Z LT R Trigger
Use / Cancel E N/A B
Use / Accept N/A A A
Reload R X X (0x40)
Previous weapon Mousewheel forward B D-Left
Next weapon Mousewheel back Y Y (0x80)
Radial menu Q LB D-Down
Alt fire mode F RB L Trigger
Quick-detonate E + Q A + B A + D-Left

Building

Windows

  1. Install MSYS2.
  2. Open the MINGW32 prompt.
  3. Install dependencies: pacman -S mingw-w64-i686-toolchain mingw-w64-i686-SDL2 mingw-w64-i686-zlib make git
  4. Run make -f Makefile.port in the perfect_dark directory.
  5. The resulting executable will be at build/ntsc-final-port/pd.exe.

Linux

  1. Ensure you have gcc, g++ and 32-bit versions of SDL2, libGL and ZLib installed on your system.
    • On a 64-bit system you also need to have gcc-multilib and g++-multilib (or your distro's analogues) installed.
  2. Run the following command in the perfect_dark directory:
    • On a 64-bit system: make -f Makefile.port TARGET_PLATFORM=i686-linux
    • On a 32-bit system: make -f Makefile.port
  3. The resulting executable will be at build/ntsc-final-port/pd.exe.

Currently only i686-linux and i686-windows are supported, using gcc -m32 and i686-w64-mingw32-gcc as compilers, respectively.
Alternate compilers can be specified by passing TOOLCHAIN=i686-whatever- as a command line argument.

Credits