We're partners with the Klonoa for Smash Bros. Facebook page! Be sure to give them a visit!

Untamed Heart Klonoa Collective Untamed Heart Klonoa Collective Untamed Heart Klonoa Collective

Author Topic: Reverse engineering  (Read 23357 times)

0 Members and 1 Guest are viewing this topic.

Offline Voka~Daemyn

  • Old Tree
  • Global Moderator
  • *
  • Posts: 1766
  • Dreamer Rating: 70
  • Squiiirrrrrrrrrrrrrrrrle
Re: Reverse engineering
« Reply #40 on: June 09, 2017, 10:42:03 am »
Yay nice progress :D. Again I'm happy to see this stuff even if I only barely understand some of it my self.

Offline cows

  • Moo
  • *
  • Posts: 27
  • Dreamer Rating: 8
Re: Reverse engineering
« Reply #41 on: July 11, 2017, 03:13:54 am »
So I totally dropped of the face of the earth for a month. I haven't been able to find time to make any real progress on this, but I've got another project that should be finishing soon which might give me a bit more free time.

Offline Voka~Daemyn

  • Old Tree
  • Global Moderator
  • *
  • Posts: 1766
  • Dreamer Rating: 70
  • Squiiirrrrrrrrrrrrrrrrle
Re: Reverse engineering
« Reply #42 on: July 11, 2017, 08:40:17 am »
Ah ok. I hope things are ok and that your other project goes smoothly

Offline cows

  • Moo
  • *
  • Posts: 27
  • Dreamer Rating: 8
Re: Reverse engineering
« Reply #43 on: October 07, 2017, 09:56:42 am »
I finally have a bit of free time, so I'm going to be able to get back into this. It might take some time for me to remember where I left off, though.

Offline Voka~Daemyn

  • Old Tree
  • Global Moderator
  • *
  • Posts: 1766
  • Dreamer Rating: 70
  • Squiiirrrrrrrrrrrrrrrrle
Re: Reverse engineering
« Reply #44 on: October 08, 2017, 03:02:53 am »
Ah Welcome back :)

Offline vervalkon

  • Wind
  • Posts: 3
  • Dreamer Rating: 5
  • i love you
Re: Reverse engineering
« Reply #45 on: February 26, 2020, 09:58:05 am »
sorry for the mega bump guys but here's my decompression code for Ulz entries.

faq:
what is it?
Klonoa: Door to Phantomile has both uncompressed (raw) data and compressed data. If you open the game's files in a graphics viewer/PSicture/whatever, you might find some graphics and/or other stuff, but a good chunk of it is compressed. The compression wasn't figured out for the longest time so sprite rips were unavailable for many years (as Klonoa's sprites are compressed) until I cracked it and ripped them.

how do i find compressed data?
just search for 55 6C 7A 1A (in hex) or Ulz (in ASCII) from any file.

how do i decompress it?
edit the .py file to match your needs. Below the #edit these line you find three variables; inadr, inpath and outpath. Edit these to represent the address, incoming filepath and the output folder path, respectively. Then just run the code.

why is your code so bad
i'm not a good programmer but i'm learnin'

is the compression format really called Ulz?
Yes! You can find a string in the ISO that says ulz decoder ver.1.05 programmed by Junichi Sakai. I don't know what the U stands for but the LZ is definitely Lempel-Ziv. What's also interesting is that Junichi Sakai is not credited in the game at all, but does get a credit in Klonoa 2 under "Special Thanks"

NEW ADDITIONAL QUESTIONS:

why can't i unpack data even though it's a legitimate ulz header?
in the ISO, the address 0xD79A4 is a legit ulz header but NOT legit ulz data. This is the only special exception.


ok i found another legit ulz header but still not working
Do not open the ISO itself (ever). This tool is meant to be used with files you get from inside the ISO/CD.
If you have a real CD, pop the disc in your computer and look at those files inside. that's the ones you want to look at
« Last Edit: February 27, 2020, 02:30:35 am by vervalkon »

Offline Voka~Daemyn

  • Old Tree
  • Global Moderator
  • *
  • Posts: 1766
  • Dreamer Rating: 70
  • Squiiirrrrrrrrrrrrrrrrle
Re: Reverse engineering
« Reply #46 on: February 26, 2020, 07:12:03 pm »
I'm doing something wrong. Or I'm just very programming dumb.
I don't know if I am using the wrong hex viewer or what yet. I would assume use 0xD79A0 but no matter which value I use I tend to get this sort of error.


Ah if anything just curious know what tools you used. I'll try to figure it out. Been a fun little puzzle for an hour or so now to me.

Offline vervalkon

  • Wind
  • Posts: 3
  • Dreamer Rating: 5
  • i love you
Re: Reverse engineering
« Reply #47 on: February 27, 2020, 02:32:47 am »
added more info to faq
three things:
0. your inadr was wrong
1. don't open the ISO, but the ISO's files
2. that particular adress is actually a special exception case :D

Offline Voka~Daemyn

  • Old Tree
  • Global Moderator
  • *
  • Posts: 1766
  • Dreamer Rating: 70
  • Squiiirrrrrrrrrrrrrrrrle
Re: Reverse engineering
« Reply #48 on: February 27, 2020, 02:44:27 am »
Yeah I was using the iso  x_x . I got it to work after you told me about opening the files directly. US version works.

I tried it again on the Japanese version of Klonoa. on 0xBA910.
« Last Edit: February 27, 2020, 02:55:09 am by Voka~Daemyn »

Offline cows

  • Moo
  • *
  • Posts: 27
  • Dreamer Rating: 8
Re: Reverse engineering
« Reply #49 on: August 26, 2020, 04:02:58 am »
After figuring out a few new (to me at least) things about how the game works, I've started working on a little tool to make it easier to manipulate and observe the game state. You can grab it from https://github.com/amoser/Klonoa-stuff/ .

It's very incomplete, not to mention a bit finicky and broken, but I think parts of it work well enough that it could be useful to someone.

sorry for the mega bump guys but here's my decompression code for Ulz entries.
(...)

Wow! This is great.