Git Product home page Git Product logo

d64make's Introduction

d64make

Build custom WADs for embedding in a Doom 64 ROM.

Logo

This program works by merging custom resources into the base game resources to create a new N64-compatible IWAD. Thus, an original copy of the game ROM is required to use it. All known commercial versions of the N64 ROM are supported. Data files from the 2020 remaster by Nightdive can also be used.

Building

Install Rust, check out the repository to a folder, then run cargo in the folder:

cargo install --path .

Running

d64make --help
# inspect data in a ROM or IWAD
d64make inspect ROM_OR_IWAD
# extract ROM or IWAD into editable PC formats
d64make extract ROM_OR_IWAD -o OUT_DIR
# build PC format data into N64 format WAD
d64make build WORK_DIR -o path/to/DOOM64.WAD

Supported Base Files

Source SHA-256 Hash
Doom 64 (U) (V1.0) [!].z64 d3404a7e8ca9d20ba034651932e67aa90c6c475c5f4738f222cd1e3056df935f
Doom 64 (U) (V1.1) [!].z64 c28eaac9a8a8cc1d30c1b50fbb04622c2ddeb9b14ddcecc6edbaad4a6d067f3f
Doom 64 (E) [!].z64 e8460f2fa7e55172a296a1e30354cbb868be924a454ff883d1a6601c66b9610f
Doom 64 (J) [!].z64 19ad4130f8b259f24761d5c873e2ce468315cc5f7bce07e7f44db21241cef4a9
DMEVAL12101996.z64 4b3931c14d548fedf98fcd28681ec45695dec415d39fd4a6d58a877e1c6dd2a2
DOOM64.WAD 05ec0118cc130036d04bf6e6f7fe4792dfafc2d4bd98de349dd63e2022925365
DOOMSND.DLS 88814285dea4cf3b91fd73c0195c55512725600531689c5314a2559777e71b17

It's recommended to use the data from the 2020 remaster due to its higher quality sound files.

Modding

To simplify workflows, d64make only supports reading/merging WADs that are already in the N64 data format. It does not support WADs in the PC Doom format. To merge in custom resources, d64make can load and extract individual assets from a directory tree or ZIP/PK3 file with a specific structure.

Folder Formats Notes
DEMOS LMP
FLATS PNG
GRAPHICS PNG Menu graphics and font
HUD PNG HUD graphics and font
MAPS WAD
MUSIC MID
PALETTES PAL Sprite palettes (RGB8, 256 entries)
SKIES PNG Sky textures
SOUNDS WAV
SPRITES PNG 8-bit or 4-bit indexed color
TEXTURES PNG 4-bit indexed color
d64make extract /path/to/DOOM64.WAD -o ./mymod

Details

d64make is able to extract resources from the original data files and convert assets back into the N64 formats. It will output four data files that can be used to build the Doom 64 sources:

Filename Description
DOOM64.WAD Graphics, Maps, Demos
DOOM64.WDD Audio Samples
DOOM64.WSD Audio Sequences
DOOM64.WMD Instrument Definitions
# Resources stored in folder
d64make build ./mymod -o /path/to/DOOM64-RE/data/
# Resources stored in PK3 file
d64make build ./mymod.pk3 -o /path/to/DOOM64-RE/data/

Notes

Adding new resources has some limitations.

  • Sprites larger than 15 tiles require support with a patch or the RSP will overflow and crash the game (a tile is each scanline-rounded 2kb portion of the image to fit in TMEM, thus the number of tiles in an image is roughly ceil(height / floor(2048 / width)) )
  • Some WAD entry names can contain characters that are disallowed in Windows file paths. For now, when extracting entries on Windows, ? will be replaced with @ and \ will be replaced with ^. The reverse replacement will always be applied when building a WAD.
  • Adding more sounds and music increases the size of the audio tables and thus requires increasing the audio heap size to prevent heap overflow. Effects and music are both triggered in the game by a sequence number. These numbers must be unique. The extracted files include them as SFX_###.WAV and MUS_###.WAV. New effects and music should have names in this format starting from one after the last number (117 for the base game)
  • Maps must be in native N64 format. Map conversion is currently outside the scope of this tool.
  • The order of textures and flats is significant since maps uses indexes instead of names. Textures and flats used by the base game will automatically have their order preserved when building a WAD. New textures and flats will be sorted by name and placed after all the base resources.
  • Extra soundfonts will all be merged together into the WMD file. The MIDI program and bank numbers are used directly by any MIDI songs you provide. MIDI programs 0-53 are used by the base game so make sure any extra instruments come after this and compose your MIDI songs accordingly. This does mean that General MIDI-compatible soundfonts will conflict with the base game instruments.

d64make's People

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.