/ccf-tools

Wii Virtual Console 'CCF' archiver/extractor suite

Primary LanguageC

Wii Virtual Console 'CCF' archiver/extractor suite
by paulguy/aeduo (paulguy one one nine at gmail dot com)  released under Public 
Domain, but I ask that you give credit if you use any of the code.

The repository contains these files:
README - this readme
ccfex.c - CCF extractor source
ccfarc.c - CCF archiver source
dotnet - Visual Studio 2019 solution/project files

This program should compile easily on any system, since all it uses is standard C 
libraries and zlib (and even zlib can be replaced, see below).
The command should be something like:

gcc -lz -o ccfex ccfex.c

In Windows/mingw32, -lz should go at the end, but it doesn't matter where it goes 
in Linux.

Sometimes on Windows/mingw32, zlib doesn't get found right away, because of the 
default installation prefix for zlib of /usr/local, so you'll need to do 
something like:

gcc -I/usr/local/include -L/usr/local/lib -o ccfex.exe ccfex.c -lz

ANYWAY, now how to use it.  Should be similar on both systems, from the command 
line you can do something like:

ccfex ccffile.ccf

to extract a ccf file.  Or:

ccfarc file1.dat file2.rom file3.arc file4.smc

to store those files to out.ccf.

If you're using a file manager, you should be able to just drag the files in to 
the executable and have it act on them just the same.

----------------------------------------

This new (2021) version by libertyernie makes a few changes:

* Filenames in the header no longer have extra data written after their null
  terminator
* Padding to 32 bytes (the default block size) is no longer performed on the
  last file in the archive
* `uint32_t` type used when appropriate
* `ccfarcraw` added, a variant of `ccfarc` which does not attempt to perform
  any LZ77 compression (necessary for Virtual Console `misc.ccf`) - just
  compile ccfarc.c with preprocessor definition `CCF_ARCHIVE_UNCOMPRESSED`
* Visual Studio 2019 solution added
    * `ccfarc` and `ccfex` can now be compiled with C++/CLI, replacing zlib
    with .NET Framework 4.7.2's DeflateStream and custom calculation of the
    checksum (this can simplify setup of the build environment on Windows, at
    the cost of adding a dependency on .NET)

Note that these tools are only designed to run in a little-endian environment
(they won't work properly on a Wii, for example).