GithubHelp home page GithubHelp logo

jamesoram / perfect_dark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fgsfdsfgs/perfect_dark

0.0 0.0 0.0 112.67 MB

work in progress port of n64decomp/perfect_dark to modern platforms

License: MIT License

Shell 0.01% C++ 1.84% Python 4.24% C 90.56% Assembly 3.16% Makefile 0.17% POV-Ray SDL 0.01%

perfect_dark's Introduction

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 one of the following:

  • ntsc-final/US V1.1/US Rev 1 (md5 e03b088b6ac9e0080440efed07c1e40f).
    This is the recommended version to use.
    Called NTSC version 8.7 final on the boot screen.
  • ntsc-1.0/US V1.0 (md5 7f4171b0c8d17815be37913f535e4e93).
    Technically supported, but not recommended.
    Called NTSC version 8.7 final on the boot screen as well.
  • jpn-final (md5 538d2b75945eae069b29c46193e74790).
    Technically supported, but requires a separate custom-built executable.
    Called JPN version 8.9 final on the boot screen.
  • pal-final (md5 d9b5cd305d228424891ce38e71bc9213).
    Technically supported, but requires a separate custom-built executable.
    Called PAL 8.7 final on the boot screen.

Status

The game is in a mostly functional state, with both singleplayer and split-screen multiplayer modes fully working.
There are minor graphics- and gameplay-related issues, and possibly occasional crashes.

The following extra features are implemented:

  • mouselook;
  • dual analog controller support;
  • widescreen resolution support;
  • configurable field of view;
  • 60 FPS support, including fixes for some framerate-related issues;
  • fixes for a couple original bugs and crashes;
  • basic mod support, currently enough to load a few custom levels;
  • slightly expanded memory heap size.

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.

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.

Additional information can be found in the wiki.

A GPU supporting OpenGL 3.0 or above is required to run the port.

Controls

1964GEPD-style and Xbox-style bindings are 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.

Support for one controller, two-stick configurations are enabled for 1.2.

Note that the mouse only controls player 1.

Controls can be rebound in pd.ini. Default control scheme is as follows:

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
Crouch cycle N/A L3 0x80000000 (Extra)
Half-Crouch Shift N/A 0x40000000 (Extra)
Full-Crouch Control N/A 0x20000000 (Extra)
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
Alt-fire oneshot F + LMB or E + LMB A + RT or RB + RT A + Z or L + Z
Quick-detonate E + Q or E + R A + B or A + X A + D-Leftor A + X

Building

Windows

  1. Install MSYS2.
  2. Open the MINGW32 prompt. (NOTE: not the MSYS prompt or the MINGW64 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.

You can build an executable with PAL or JPN ROM support by adding ROMID=pal-final or ROMID=jpn-final to the make command.
You will need to provide a jpn-final or pal-final ROM for those, named pd.jpn-final.z64 or pd.pal-final.z64.

It might be possible to build a 32-bit ARM executable, but this has not been tested.

Credits

  • the original decompilation project authors;
  • doomhack for the only other publicly available PD porting effort I could find;
  • sm64-port authors for the audio mixer and some other changes;
  • Ship of Harkinian team, Emill and MaikelChan for the libultraship version of fast3d that this port uses;
  • lieff for minimp3;
  • Mouse Injector and 1964GEPD authors for some of the 60FPS- and mouselook-related fixes;
  • everyone who has submitted pull requests and issues to this repository and tested the port;
  • probably more I'm forgetting.

perfect_dark's People

Contributors

ryandwyer avatar fgsfdsfgs avatar neonnyan avatar phnod avatar tmyqlfpir avatar twitchbronbron avatar iamgreaser avatar maikelchan avatar kronflux avatar axdoomer avatar silentexception avatar babbygremlin avatar squiddingme 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.