GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - XorTroll/editwl: C++ libraries and various tools for Nintendo DS(i) ROM formats and editing

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
editwl-bin
editwl-bin
 
 
editwl-docs
editwl-docs
 
 
libeditwl
libeditwl
 
 
.gitignore
.gitignore
 
 
Doxyfile
Doxyfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build_docs.sh
build_docs.sh
 
 
doxygen-mainpage.md
doxygen-mainpage.md
 
 

Repository files navigation

editwl

C++ libraries, PC tools and documentation for Nintendo DS(i) ROM formats/editing (work-in-progress)

  • editwl
    • C++ libraries, PC tools and documentation for Nintendo DS(i) ROM formats/editing (work-in-progress)
    • libeditwl
      • Supported formats
    • editwl
      • GUI mode
      • CLI mode
    • Building
      • libeditwl
      • editwl
      • Docs
    • TODO
      • libeditwl
      • editwl
    • Support
    • Credits

libeditwl

libeditwl libraries are the core component of this project. They consist on lightweight C++ libraries for DS(i) ROM format reading, writing, editing and more.

Note that these libraries work by loading everything (entire ROMs/files/etc) into memory (similar to other existing DS(i) tools/libraries). In worst cases (loading big ROMs with compressed files), the code may allocate hundreds of MB to store everything. This should not be problematic on any modern system, but it's always worth noting ;)

Supported formats

  • BMG

  • DS(i) ROMs

  • NARC archives (or CARC/ARC)

  • DWC utility archives ("utility.bin")

editwl

editwl is (yet another) desktop Nintendo DS(i) ROM editor, made from scratch and inspired on already existing ones, aiming to mimic the best of them.

This tool may be used as both a graphical editor (by opening it with no arguments or a single file argument, typically by drag-dropping the file in the executable from a UI file browser) or as a command-line tool, getting the best of both worlds.

GUI mode

  • BMG

    • Edit messages and other fields (file ID and so on), with a custom format to handle escaping

    • Save/load in a custom XML format for easier message editing (see docs).

CLI mode

  • BMG: editwl bmg

    • List messages: editwl bmg list -i/--in=<bmg-file> [-v/--verbose]

      • Example: editwl bmg list --in=data.bmg
    • Get (print) specific message: editwl bmg get -i/--in=<bmg-file> --idx=<msg-idx>

      • Example (get second message, thus index 1): editwl get -i file.bmg --idx=1
    • Create BMG: editwl bmg create -i/--in=<bmg-xml-file> -o/--out=<bmg-file>

      • Example: editwl bmg create --in=msgs.xml -o gen.bmg
    • Convert BMG (to XML): editwl bmg convert -i/--in=<bmg-file> -o/--out=<xml-file>

      • Example: editwl bmg convert -i data.bmg -o plain_data.xml
  • ROM: editwl rom

    • Show ROM information: editwl rom info -r/--rom=<rom-file>

      • Example: editwl rom info -r game.nds
    • Extract (binary) header: editwl rom extract-header -r/--rom=<rom-file> -o/--out=<header-bin-file>

      • Example: editwl rom extract-header --rom=rom.nds --out=header.bin
    • Extract (binary) overlay table: editwl rom extract-overlay-table -r/--rom=<rom-file> -p/--proc=<processor> -o/--out=<ovt-bin-file>

      • Example: editwl rom extract-overlay-table --rom=rom.nds --proc=arm9 --out=ovt.bin
    • Extract (binary) overlay tables: editwl rom extract-overlay-tables -r/--rom=<rom-file> -7/--out7=<ovt7-bin-file> -9/--out9=<ovt9-bin-file>

      • Example: editwl rom extract-overlay-tables --rom=rom.nds --out7=ovt7.bin -9 ovt9.bin
    • Extract (binary) code: editwl rom extract-code -r/--rom=<rom-file> -p/--proc=<processor> -o/--out=<code-bin-file>

      • Example: editwl rom extract-code --rom=rom.nds --proc=arm7 --out=arm7.bin
    • Extract (binary) codes: editwl rom extract-codes -r/--rom=<rom-file> -7/--out7=<code7-bin-file> -9/--out9=<code9-bin-file>

      • Example: editwl rom extract-codes --rom=rom.nds --out7=arm7.bin -9 arm9.bin
    • Replace (binary) code: editwl rom replace-code -r/--rom=<rom-file> -p/--proc=<processor> -i/--in=<code-bin-file> -o/--out=<new-rom-file>

      • Example: editwl rom replace-code --rom=rom.nds --proc=arm7 --in=arm7.bin --out=new.nds
    • Replace (binary) codes: editwl rom replace-codes -r/--rom=<rom-file> -7/--in7=<code7-bin-file> -9/--in9=<code9-bin-file> -o/--out=<new-rom-file>

      • Example: editwl rom replace-codes --rom=rom.nds -7 arm7.bin --in9=arm9.bin -o new.nds
    • Extract NitroFS filesystem: editwl rom extract-nitrofs -r/--rom=<rom-file> -o/--out=<nitrofs-extract-dir> [-v/--verbose]

      • Example: editwl rom extract-nitrofs --rom=rom.nds -o nitrofs_dir

      • The NitroFS files are stored inside <nitrofs-extract-dir>/root/..., and a XML file map is generated at <nitrofs-extract-dir>/nitrofs.xml containing a file name + file ID list. This is relevant to ensure proper replacement in the command below, since some games might access files based on file ID and not file name!

    • Replace NitroFS filesystem: editwl rom replace-nitrofs -r/--rom=<rom-file> -i/--in=<nitrofs-files-dir> -o/--out=<new-rom-file> [-v/--verbose]

      • Example: editwl rom replace-nitrofs --rom=rom.nds -i nitrofs_dir --out=new.nds -v

      • The command expects the file structure in <nitrofs-files-dir> to be the same as in the extraction command above.

This are brief descriptions of what each command does, check the help subcommand for each main subcommand for more info: editwl <cmd> -h/--help, like editwl bmg -h or editwl rom --help. Commands inside braces (like verbose) are optional.

Building

libeditwl

These libraries have basically no dependencies (other than the standard) and can easily be embedded in any C/C++ project.

editwl

This project is built using make, CMake and Qt. The current build system just requires you to run Make on the project directory:

make

Docs

Inside twl-docs, run MkDocs:

mkdocs build

For libeditwl code docs, run Doxygen on the repository root:

doxygen

TODO

libeditwl

  • Migrate remaining code/formats from libnedit:

    • NCGR

    • NCLR

    • NSCR

    • SBNK

    • SDAT

    • SSEQ

    • STRM

    • SWAR

  • Implement saving texture as NCGR+NCLR+NSCR

  • Implement saving in utility.bin files

  • Support other formats within SDATs (STRM, SSEQ, etc.)

  • Models and model textures (NSBMD, NSBTX)

  • Support for remaining BMG message encodings

  • For multiple palette NCGR+NCLR textures, allow choosing the palette to load

  • Support ignored attributes in NSCR data (check the links credited below)

  • Support PMCP section in NCLRs

  • More that I could list here

editwl

  • More commands

  • More GUI utilities

TODO: make this list more explicit!

Support

Any suggestions, ideas and contributions are always welcome ;)

Credits

  • Some already existing PC ROM editors were really helpful in order to understand several file formats, and as the base for this PC editor: Every File Explorer, NSMBe5, MKDS Course Modifier and DS Sound Studio

  • The following web pages were also really helpful in order to understand several file formats:

    • https://www.romhacking.net/documents/%5b469%5dnds_formats.htm
    • http://www.feshrine.net/hacking/doc/nds-sdat.html
    • http://problemkaputt.de/gbatek.htm
  • The nintendo-lz Rust crate was really helpful in order to understand and implement LZ10/LZ11 compression formats in C++.

  • editwl uses args C++ libraries to parse command-line arguments.

About

C++ libraries and various tools for Nintendo DS(i) ROM formats and editing

xortroll.github.io/editwl/

Topics

arm9bmgdsidwcndsnintendo-ds

Resources

Readme
MIT license
Activity

Stars

7 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Sponsor this project

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.