STripper & dkcomp

Share and discuss all facets of DKC ROM hacking...

STripper & dkcomp

Postby Kingizor » September 16th, 2022, 2:53 am

A long time ago I wrote a program to extract background graphics from DKC3. I added support for DKC2, then DKC, then all the handheld games and just about everything else I could think of. I hadn't thought about it for a long time but I've spent a while this year adding graphical interfaces and brushing up the scariest parts of the codebase.

The worst offenders were the various decompression functions. I decided to split them off one-by-one and do my best to understand them and make them presentable. That encompassed around 11 different formats of varying complexity. I thought it would be nice to have equivalent compressors for each format, so I did that too and they all perform pretty darn well.

So I've got two things to give away today! :swanky:

  • STripper - Graphics extractor for various Donkey Kong games
  • dkcomp - DK compression library

(binaries for each are accessible through the releases tab on the respective github page)

STripper is still full of ancient spaghetti code, but it's much better than it was. It has a terrible amount of offsets which might still be useful.

The dkcomp library has an API (see dkcomp.h) so someone could build it as a library and use it in their own program if they wanted. If someone felt like using it as part of a level editor, that would be great?

The GBA BIOS formats are rather common so they might be of interest for non-DK reasons too I suppose. There are also two non-BIOS Huffman variants that I suspect could have been provided as part of a devkit (it only took me seven and a half years to notice they all had the same header format).
Trailblazer
Bananas received 77
Posts: 248
Joined: 2010

Re: STripper & dkcomp

Postby Raccoon Sam » January 9th, 2023, 6:21 am

STripper proved extremely useful! I ripped all the DKC3 tilesets and just submitted them to Spriters Resource.
dkcomp will come in handy with hacking the games, I'm glad we have a no-bullshit command line tool finally
Trailblazer
Bananas received 35
Posts: 268
Joined: 2008

Re: STripper & dkcomp

Postby Kingizor » January 9th, 2023, 7:54 am

I'm glad you're finding them useful! Don't forget, they can also handle a lot more than just the SNES games! :diddyrock:
Trailblazer
Bananas received 77
Posts: 248
Joined: 2010

Re: STripper & dkcomp

Postby WesternTanager794 » January 9th, 2023, 8:15 am

These were really useful for me too! I used it a while ago and until now I had forgotten about it! Real quick question, why are some of the DKC3 graphics in black and white? :parry:
Sage of Discovery
Bananas received 128
Posts: 2393
Joined: 2022

Re: STripper & dkcomp

Postby Kingizor » January 9th, 2023, 8:35 am

Do you mean the 8x8 tiles? Those ones are the raw, decompressed tiles before they get combined with any metatile, tilemap or palette data. You can think of them as building blocks for all of the other graphics. They don't have any colour information associated with them yet, so we use different greyscale shades to tell the pixels apart. They're not very useful on their own, but the option is there for them anyway.

If there are any graphics that seem to have wrong colours or look corrupted then that could be a bug. I'd definitely want to know about that and investigate. :neekleft:

STripper is fairly strict about ROM versions, so that probably won't happen unless I've overlooked something.
Trailblazer
Bananas received 77
Posts: 248
Joined: 2010

Re: STripper & dkcomp

Postby WesternTanager794 » January 10th, 2023, 2:35 pm

If I remember correctly they were the tiles. :parry:
Sage of Discovery
Bananas received 128
Posts: 2393
Joined: 2022


Return to ROM Hacking

Who is online

Users browsing this forum: No registered users and 3 guests