Skip to content

cbhacks/CrashEdit

Repository files navigation

CrashEdit

This program is an application designed for modifying the game files of the original Crash Bandicoot video game trilogy.

This is the 2.0 version of the software. See README-CE2.md for the detailed readme on this updated version.

Supported Games

Note that CrashEdit does not work directly with ISO's, but rather with the NSF/NSD files stored on the game discs.

  • SCUS-94900 Crash Bandicoot (no prelude patching)
  • SCES-00344 Crash Bandicoot (no prelude patching)
  • SCPS-10031 クラッシュバンディクー (no prelude patching)
  • US BETA 96/03/08 Crash Bandicoot "Prototype"
  • US BETA 96/05/11 Crash Bandicoot "E3 Demo"
  • SCUS-94154 Crash Bandicoot 2: Cortex Strikes Back
  • SCES-00967 Crash Bandicoot 2: Cortex Strikes Back
  • SCPS-10047 クラッシュバンディクー 2: コルテックスのぎゃくしゅう! (incomplete support)
  • EU BETA 97/09/14 Crash Bandicoot 2: Cortex Strikes Back "Review Copy"
  • SCUS-94244 Crash Bandicoot: Warped
  • SCES-01420 Crash Bandicoot 3: Warped
  • SCPS-10073 クラッシュバンディクー 3: ブッとび! 世界一周 (incomplete support)
  • US BETA 98/08/15 Crash Bandicoot 3: Warped "Alpha Demonstration" (as Crash 3)

Usage

For users acquainted with Microsoft Windows, "directories" are commonly referred to as "folders" on windows. When the term "directory" is used here, think "folder".

Some basic knowledge of how Crash Bandicoot game files are laid out is necessary to use this application. CrashEdit is not designed to work directly on disc images (aka ISO's), but instead on files with the "NSF" and "NSD" file format. This is a custom format created by Naughty Dog and used in the original Crash Bandicoot trilogy (not including CTR).

First, a Crash Bandicoot game CD will have a root directory with contents similar to the following:

  • S0 (directory)
  • S1 (directory)
  • S2 (directory)
  • S3 (directory)
  • SYSTEM.CNF (playstation game boot configuration file)
  • SCUS_949.00 (playstation game exe file, US Crash Bandicoot in this case)

Within the S0/S1/etc directories you will find files named similar to the following:

  • S0000013.NSD (nsd file)
  • S0000013.NSF (nsf file)
  • S0000014.NSD (nsd file)
  • S0000014.NSF (nsf file)
  • S0000015.NSD (nsd file)
  • S0000015.NSF (nsf file)
  • ...

Notice how each filename has an NSD/NSF pair. Each pair corresponds to a specific level in the game, and these files contain the game data for that level. The last two characters before the .NSD or .NSF extension are the "level ID" for that specific level. As an example, the level titled The Lost City has the level ID 20, and its file pair is the following, found in the S2 directory:

  • S0000020.NSD (nsd file)
  • S0000020.NSF (nsf file)

A complete list of level ID's and their associated levels can be found here:

https://wiki.cbhacks.com/w/Level_ID

The NSF file contains the actual game data for the level and is what CrashEdit is designed to read and manipulate. An NSF file consists of entries. Each entry has a 5-character name, and represents a game asset such as a sound effect or 3D model. The fifth character must match the character expected for an entry of that type. For example, animation entries must end in V and GOOL entries must end in C. The following entry types are recognized and supported by CrashEdit:

  • Animation: One animation used by a game object. Each frame is a full set of vertices.
  • Model: One model used by a game object. Polygon data is stored in a Model Entry, but vertex data is stored in an Animation Entry.
  • Scenery: One section of the 3D model for a level's world geometry.
  • Sort List: A list of values that indicate what polygons should be drawn on-screen and in what order. These require world indexing, which means they'll only operate along with a Zone Entry.
  • Texture Chunk: A chunk with the format of an entry. A single 64 KiB page whose data will be directly uploaded to VRAM on load. Double-click the display to open a texture viewer window.
  • Zone: Describes one level "zone", including objects in that zone as well as the zone's camera configuration and collision octrees.
  • GOOL: One dynamically-linked object executable. Contains all object code as GOOL bytecode (and also R3000A MIPS for Crash 2 and 3) for a specified object type as a series of code blocks, including animation references. Crash 3 GOOL is not fully supported.
  • Sound: A sound effect. This entry only contains the raw sound data without any metadata such as the sample rate, which is determined by an object's code.
  • Music: A set of music tracks in SEQ format (very similar to MIDI format), and the associated VH file (wavebank header file). Each level zone will refer to a single music entry which will be used for playback while the camera is in that zone.
  • Image: One single large image consisting of 16x16 blocks, meant for use with a Map Entry. Each bitmap can be in one of many formats.
  • Map: Describes a "map", composed of a background image, followed by several "map entities" which are overlayed. CrashEdit only supports the background layer. Right-click the image to save to a file.
  • Palette: A list of 256-color palettes, meant for use with Image Entries in indexed formats (8-bit).
  • Wavebank: Part of the level's wavebank data (VB file). Crash music is in MIDI format, but does not use General MIDI (GM) instruments. Instead, a custom instrument set is used for each level. The audio data for this instrument set (wavebank) is very large, so it must be split into multiple entries (up to a maximum of 7).
  • Speech: Similar to the sound entry, but streamed, meaning a single Speech Entry is part of a longer audio track. It is possible for one streamed audio track to fit into a single Speech Entry, though this is rare.

Entries are organized into containers which are referred to as chunks. Each chunk is exactly 64 KB in size, and so it cannot contain more than 64 KB of entry data. (If you attempt to save an NSF file which has a chunk containing more than 64 KB of entry data, a packing error will occur and the save operation will fail.) There are different types of chunks: the normal type and special audio types. (As a general rule, you should keep audio-related entries in their proper chunk types or else the playstation will be unhappy.) There is also a special chunk type, Texture Chunk, which contains raw texture data instead of entries.

The NSD file contains various data used to assist the game in properly accessing the NSF files. Included in the NSD file is a table mapping entries to chunks. If you add chunks, delete chunks, add entries, delete entries, move entries, rename entries, or reorder chunks, you will need to update this table. CrashEdit can automatically patch this table with the Patch NSD button. It will remove any and all prelude data._

System Requirements

Aside from the obvious monitor, keyboard, and mouse. A mouse scroll wheel is not required, but is used to control the 3D viewers.

  • .NET 8.0
  • Preferably at least 256 MB of physical memory available to the application or you may encounter thrashing while loading or saving large files

Known Issues

Incomplete Features

Significant Issues

  • Crash 1 Retail: Saving preludes is not yet supported.
  • Crash 2/3 NTSC-J Retail: The lip-sync data used for Aku Aku hints is not supported, making Speech Entries unopenable.

Insignificant Issues

These issues have no significant effect on the operation of the program, but are still technically issues with the program. This list can be safely ignored by most users.

  • All Games: Any data hidden within unused sections of NSF files may be ignored by the program without warning, and will not be preserved.
  • Crash 1 All: Music entries containing VH data may be saved out with different data in unused sections.
  • Crash 1 Retail: "Patch NSD" does not patch all of the NSD.
  • Crash 2 NTSC-J Retail: A music entry in S000003C.NSF containing VH data may be saved out with different data in unused sections.

Bugs

  • All Games: Exporting VABs in DLS format is currently broken. The workaround is to open and resave the DLS file with Awave Studio.
  • Crash 1 All: Exporting to COLLADA format is currently broken. However, these files can be opened without issue in Noesis.

Broken Game Files

  • Crash 1 All: S0000002.NSF, if present, must be opened as a "1995 Prototype" file. When viewing its zones, press O to fix the octree display.
  • Crash 1 All: S0000010.NSF, if present, must be opened as a "1995 Prototype" file.
  • Crash 1 Retail: S0000038.NSF contains a music entry with an incorrect SEP track count.
  • Crash 1 Retail: S0000004.NSF is actually a beta MAR08/MAY11-format file.
  • Crash 1 Retail: S000000B.NSF is actually a beta MAR08/MAY11-format file.
  • Crash 1 Retail: S000000D.NSF is actually a beta MAR08/MAY11-format file.
  • Crash 1 Beta MAY11: S000001C.NSF contains two demo entries with incorrect magic numbers.

Installation

Just unzip into a directory and run the exe.

If you are working with the source code, it is a VS 2022 solution which consists of four projects, "CrashEdit", "Crash.UI", "CrashEdit.Main", "CrashHacks", "ISO2PSX" and "FTBitmapExtensions". You will need to set "CrashEdit" as the startup project to run the application. "CrashHacks" is a separate application not documented on this repo and not used by CrashEdit itself.

Where To Get

Precompiled binary files (EXE files) are available at: http://www.cbhacks.com/crashedit.html

The original source code is currently available as a git repository on github at:
https://github.com/cbhacks/CrashEdit/tree/deprecate (deprecate branch)