Compression Problems

Discussion in 'Engineering & Reverse Engineering' started by StephenUK, Mar 24, 2013.

  1. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    I'm not usually one for help topics, but this particular problem has me completely stumped and it's starting to piss me off.

    I have created a basic art file for a font and I'm trying to compress it in Nemesis format for use. I've never had any problem compressing things in the past, but this particular art file is throwing up problems. Viewing the uncompressed art in TLP or in SonMapEd shows it to be fine, perfectly readable and usable. As soon as I compress it in Nemesis, using either the Sega Data Compresser, Nemesis MD Programs or SonMapEd, it throws out complete garbage. A decompression afterwards confirmed that the art has been heavily corrupted during the process. I've attached pics below for reference. Adding 5 additional blank 8x8s to the end of the art file allows it to compress properly, but it's hardly practical to have to add redundancy to the end of a file just to get it to compress. I've tried compressing other files today and they work just fine, so does anyone have an idea on what's causing this?

    [​IMG]

    Art before compression

    [​IMG]

    Art after compression (decompressed again)

    EDIT: Tried using KENSSharp and it worked perfectly without the additional tiles. This leads me to believe that there is a problem somewhere within the KENS DLL files which is causing corrupted data. Feel free to move and/or lock this topic, but it might be worth keeping around to notify people of the potential problem.
     
  2. jman2050

    jman2050

    Teh Sonik Haker Tech Member
    633
    2
    16
    I think I remember there being a bug in the KENS Nemesis code when the compressed file is aligned to a certain size. How many bytes exactly is the compressed file?
     
  3. StephenUK

    StephenUK

    Liquor in the front, poker in the rear Tech Member
    1,678
    0
    16
    Manchester, UK
    Quackshot Disassembly
    Compressed it was 198 bytes, uncompressed was 640 bytes.
     
  4. RetroKoH

    RetroKoH

    Member
    1,660
    15
    18
    Project Sonic 8x16
    May I please have a copy of this art .bin, uncompressed? (Before compression?) I'd like to try this out in Triad's compression functions to see the result, (Perhaps I'll need to fix something as well?)

    EDIT: I tried with a different art tile .bin of my own, same file size as you stated, 640 bytes uncompressed (20 tiles). I compressed to NEMESIS format, and decompressed them again. File size of Nemesis compressed output was 80 bytes, instead of the 198 you reported... and I had absolutely no issue at all, and Triad uses the same KENS .dlls that the SEGA Data Compressor uses. I could try to replicate this example you gave using the screengrab as reference, though that will take a little extra time to create the tiles... but thus far I'm not getting any issues. I'll keep plugging away and let you know if I can replicate the results that you showed... (If I continue to get no problems with Triad, perhaps it is an issue with the older programs for some reason?)

    (Either way, I'm happy I saw this, as well as the subsequent note regarding the KENS# .dlls. I may plug those into Triad instead if they are indeed superior.)