Coder Social home page Coder Social logo

roadrunnerwmc / fdgh-converter Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 3.0 69 KB

For FDGH files from HAL Laboratory games

License: GNU General Public License v3.0

Python 100.00%
kirby xbin fdgh-files romhacking nintendo nintendo-3ds wii 3ds fdgh kirby-games

fdgh-converter's Introduction

FDGH Converter 4.0

A script that converts FDGH files (found in many HAL Laboratory games) to and from XML. Copyright (C) 2016-2022 RoadrunnerWMC

FDGH Files

FDGH is a file format used in many HAL Laboratory games since Kirby's Return to Dream Land, including most of the subsequent Kirby games as well as the first three BoxBoy games. It lists the files (models, animations, etc) that the game should load in advance of each level. If a level calls for enemies not named by the FDGH file, older games (such as Return to Dream Land) will tend to lag as the files are loaded during gameplay. Recent games can handle it better, but it's still best to set up the FDGH correctly.

In all known games that use this format, there's a single FDGH file, located at <fs_root>/fdg/Archive.dat. The FDGH data is embedded in a very thin wrapper called an XBIN. While most XBIN files have a .bin extension, this particular one has a .dat extension for unknown reasons.

All FDGH files to date have identical semantics, but the binary representations have varied from game to game. FDGH Converter auto-detects the details when loading a file, notes them in attributes of the root XML node, and reproduces them when saving. The attributes are specifically:

  • endian ("big" or "little"; default "big" for backward compatibility) -- the endianness of the file, which always matches the native endianness of the console the game was released for.
  • xbin_version ("2", "4", or "5"; default "2" for backward compatibility) -- the version number for the XBIN wrapper. Version 4 XBINs (found in Kirby Battle Royale and newer games) have a small amount of extra, constant data. Version 5 XBINs (found in Kirby's Return to Dream Land Deluxe and newer games) seem identical to version 4.
  • num_string_null_terminators (any number; default "4" for backward compatibility) -- the number of null terminators to use at the ends of strings. Kirby and the Forgotten Land uses 1; all prior games use 4.
  • asset_name_hashes (either not present, or "fnv1a_64") -- if present and set to "fnv1a_64", indicates that the asset names table should include hashes of every string, using the 64-bit FNV-1a algorithm. Kirby and the Forgotten Land is the first game to do this.

Tested Games

Games known to have FDGH files (all are compatible with this tool):

  • Kirby's Return to Dream Land
  • Kirby's Dream Collection
  • Kirby Triple Deluxe
  • Kirby Fighters Deluxe
  • Dedede's Drum Dash Deluxe
  • BoxBoy!
  • Kirby and the Rainbow Curse
  • BoxBoxBoy!
  • Kirby: Planet Robobot
  • Bye-Bye BoxBoy!
  • Team Kirby Clash Deluxe
  • Kirby's Blowout Blast
  • Kirby Battle Royale
  • Kirby Star Allies
  • Super Kirby Clash
  • Kirby Fighters 2
  • Kirby and the Forgotten Land (Demo)
  • Kirby and the Forgotten Land
  • Kirby's Dream Buffet
  • Kirby's Return to Dream Land Deluxe (Demo)
  • Kirby's Return to Dream Land Deluxe

Games developed or co-developed by HAL Laboratory after RtDL that are known to not have FDGH files:

  • Face Raiders
  • Picross 3D: Round 2
  • Kirby's Extra Epic Yarn
  • BoxBoy! + BoxGirl!
  • Part Time UFO
  • 歩数で勝負!!カメさんぽ (Hosu de Shobu!!Kame Sampo)

Usage

If using a release build, you can simply drag-and-drop Archive.dat or Archive.xml onto the executable.

If running from source, run fdgh_converter.py with a recent version of Python 3. (Tested with 3.10 on Ubuntu.)

Run with -h or --help for additional help with CLI options.

An "xbin_cli" script is also provided, which lets you manually add/remove XBIN headers to/from files.

License

Licensed under the GNU General Public License version 3 or (at your option) any later version. (See the "COPYING" file for more information.)

fdgh-converter's People

Contributors

roadrunnerwmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fdgh-converter's Issues

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.