Skip to content

Repository files navigation

Codec

Asset browser for Metal Gear Solid games (and others). This project is licensed under the MIT license. Support for M2 files is provided as a separate project, licensed under the GPL v3 license.

Support for the following formats is implemented:

  • Archives
    • Generic
      • .iso Images
      • .bin/cue Images
      • .zip Files [read & write]
      • .ciso GameCube images
    • Metal Gear Specific
      • M2 Archive (Master Collection v1)
        • .psb.m Packaging Format
      • .dar Archives (MGS1, MGA2, MGO, MGO+, MGS PW, MGS4)
      • .dir Archives (MGS1, MGS2, TTS, MGS4)
      • .qar Archives (MGS2, TTS, MGS3, MGA2, MGO, MGO+, MGS PW, MGS4)
      • .slot Archives (MGS4)
      • .pak Archives (MGS4) [read & write]
      • _zar Archives (MGA2, MGO, MGO+)
      • BRF.DAT Archive (MGS1)
      • DEMO.DAT Archive (MGS1)
      • FACE.DAT Archive (MGS1) [read & write]
      • RADIO.DAT Archive (MGS1)
      • SLOT.DAT Archive (MGS PW)
      • STAGE.DAT Archive (MGS2 & TTS)
      • STAGE.DIR Archive (MGS1 & MGSVR)
      • VOX.DAT Archive (MGS1 & MGSVR)
  • Files
    • Generic
      • All Basic Image Formats (PNG, JPEG, BMP, etc.)
      • All Basic 3D Formats (FBX, OBJ, STL, STEP, etc.)
      • WAV, MP3, and MIDI Audio Files
      • All VGMStream Formats (VAG, OGG Vorbis, etc.)
      • CD Audio Tracks
      • .pcx Image Files
    • Metal Gear Specific
      • .ctxr Texture Files (MGS2 & MGS3)
      • .gly Glyph Files (MGS1)
      • .pll Image Files (MGS1)
      • .rpk Texture Files (MGS1) [read & write]
      • .tri Texture Files (MGS2 & MGS3)
      • .txn/.dlz/.dld Texture Files (MGS4)
      • .txp Texture Files (MGS PW)
      • .mdx Model Files (MGS1)
      • .kmd Model Files (MGS1)
      • .kms Model Files (MGS2)
      • .kmy Model Files (TTS)
      • .mdn Model Files (MGS4)
      • .mdx Sequence Packs (MGS1)
      • .sdt Sound Packs (MGS2)
      • .sdx Sound Packs (MGS2)
      • .wvx Sound Packs (MGS1)

To view Master Collection resources, you will need to have a copy of the game on your system. The tool will automatically detect the Steam location of the game, but you can browse to any location as desired.

MGS1MGS2
MGS3MGS4
MG1MGSVR

Running on Linux

sudo apt install -y libassimp-dev libmagickwand-dev mesa-utils
sudo apt-get install -y dotnet-runtime-9.0
chmod +x Codec.UI.Avalonia

Building

Release:

dotnet publish -c Release -r win-x64
dotnet publish -c Release -r linux-x64

Usage

// Setupvarservices=Codec.UI.ServiceRegistration.RegisterHeadless();varfsm=services.GetRequiredService<NestedFileSystemManager>();// Grab the root filesystem.// APIfsm.EnumerateEntries(@"G:\Rip\Exp\METAL GEAR SOLID DISC 1.CUE\MGS\FACE.DAT/0/f73b.face").Dump();varpath="...";usingvarreadA=fsm.OpenRead(path);usingvarreadB=fsm.Open(path,newFileStreamOptions{Mode=FileMode.Open,Access=FileAccess.Read,Share=FileShare.Read});usingvarreadC=fsm.Open(path,newFileStreamOptions{Mode=FileMode.Open,Access=FileAccess.Read,Share=FileShare.None});// Read/write file locks are supported hierarchically.usingvarwrite=fsm.Open(path,newFileStreamOptions{Mode=FileMode.Open,Access=FileAccess.ReadWrite,Share=FileShare.ReadWrite});// Read/write is supported on some filetypes.// Some files are virtual and cannot be written. This will throw:usingvarvirtualA=fsm.Open(@"...\MGS\FACE.DAT/0/f73b.face/base.img",newFileStreamOptions{Mode=FileMode.Open,Access=FileAccess.ReadWrite,Share=FileShare.None});// Some filesystems are read-only and cannot be written. This will throw:usingvarvirtualB=fsm.Open(@"...\METAL GEAR SOLID DISC 1.CUE\...",newFileStreamOptions{Mode=FileMode.Open,Access=FileAccess.ReadWrite,Share=FileShare.None});// You can obtain bitmaps from known image types using:varbitmap=fsm.Resolve<MagickImage>(path);// Likewise with Auio streams:varaudio=fsm.Resolve<AudioStream>(path)??(AudioStream)fsm.OpenRead(path);// And 3D Objects:varscene=fsm.Resolve<RenderableScene>(path);

OpenSource Info

ProjectLicenseDetails
Silk.NETMIT3D rendering and windowing
HIDDevicesApache 2.0Device handling
AssimpMIT + BSD-3-Clause3D object loading and saving
Magick.NETApache 2.0Image loading and saving
VgmSharpISCAudio loading
NAudioMITAudio loading and playing
System.IO.AbstractionsMITNested filesystems
CueSharpBSD-2-ClauseCUE format
DiscUtilsMITISO format
MeltySynthMITMIDI Synthesizer
TinySoundFontMITSound Font file
DryWetMidiMITMIDI creation
GMWare.M2GPL 3.0M2 Archive format
metalgeardev/MGS1Reference code
mgs_reversingReference code
tools-mgszlibReference code
CtxrToolMITReference code
MGS-Master-Collection-NoesisReference code
kmy2obReference code
ArsenalMITReference code
SolideyeMITReference code
MGS-MDP-NoesisReference code
MGS2-Sound-ToolsMITReference code
Metal Gear Master CollectionNon-transferrableYou need your own license to this software, and your license may not cover this usage.
Digital-7 FontFreeware for home useFrequency display (coming soon)
Font Awesome Free IconsCC BY 4.0Used for UI icons

About

A video game modding tool, specializing in MGS formats.

Resources

Stars

7 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages