Skip to content

FitzRoyX/nesrip

 
 

Repository files navigation

About

This tool extracts 8x8 tile graphics from NES & SNES roms into modern PNG tilesheets. It has drag-n-drop and command-line functionality. The database, when completed, will effectively document every game's graphics locations, bitplane type, pattern type, compression type, and palettes. It has powerful features like a colorizer and tile deduplicator. Future map and sprite definition tools using these modernized sheets are planned.

Supported compilers

Building and usage

The easiest way to build this tool on Windows is by using TCC (TinyCC), a super small compiler with no installer. A prebuilt version can be found here. Simply extract it into the nesrip folder so that nesrip/tcc/tcc.exe exists, then run "compile_with_tcc_local.bat". This will create nesrip.exe, onto which roms can be dragged to create PNG output files. A game must be in the database for the tool to work. The databases are text files called gfxdb_nes.txt and gfxdb_snes.txt.

Using the "f" finder command

If you have a working decompression routine, and you know the BPP format of the data you're trying to rip, it is possible for this tool to help you find compressed graphics blocks without disassembly. It scans from an incrementing starting position up to every 0xFF byte until all starting positions are exhausted. To filter out false candidates, there are a series of qualifiers in "finder.c" that can be commented in or out. Those qualifiers are "Total Tiles", "Frequency of Change" (between pixels), and Checksum.

Graphics database commands

//trailing comments are supported
hash {}
c {} (compression type, default = raw)
b {} (bitplane type)
p {1/2/4/8/16} {h/v} (pattern size and direction, default = 1 h)
r {true/false} (tile deduplicator, default = true)
k (clear tile deduplicator cache)
f {} {} (compressed gfx finder start and end)
. {} {} (section start and end)
end

Command-Line usage

nesrip.exe filename

Compression types

  • raw: Uncompressed
  • rle_konami: RLE_Konami
  • lzss: LZSS
  • lz1: LZ1
  • lz2: LZ2
  • lz3: LZ3
  • lz5: LZ5

Credits

Matys Guéroult - Lead programmer
FitzRoyX - Designer/commissioner of tool, database maintainer, novice programmer
Invertego - Colorizer programmer
Richard Wheeler - Programmer

License

MIT - © 2024 Matys Guéroult

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 99.8%
  • Other 0.2%