05-25-2023, 12:39 AM
Hi! I never expect you are still here! Welcome back!
Being trying to use that IDA from ScummVM, and now I can see why nobody can help you. IDA can analyze only the DOS-extender stub on the beginning, and not the engine part of game (the part I need).
Tried DOS box debugger, but the thing just keep crashing.
Looking at TerraGlyph wiki page, I noticed "Tiny Toon Adventures: Buster and the Beanstalk" also uses .TGR file, and it is a windows game, so it has a 32-bit .EXE. IDA can analyze this.
Found the decompression code at sub_40ff70, and I got something:
[spoiler]
![[Image: NTFs941.png]](https://i.imgur.com/NTFs941.png)
![[Image: bU8PX7n.png]](https://i.imgur.com/bU8PX7n.png)
![[Image: Gjnj8Wb.png]](https://i.imgur.com/Gjnj8Wb.png)
[/spoiler]
Naturally, it also works for Hansel and Gretel
[spoiler]
![[Image: lvhcm4z.png]](https://i.imgur.com/lvhcm4z.png)
![[Image: nxG7qFE.png]](https://i.imgur.com/nxG7qFE.png)
![[Image: NPAaIc7.png]](https://i.imgur.com/NPAaIc7.png)
[/spoiler]
The decompression is just like Final Fantasy 7. Read a byte (8-bits). If bit is 0, copy next byte, if not refer to dictionary. Good old LZ77.
Unfortunately, it only work for backgrounds. The sprites uses different function. I already located the function is at sub_408e60 and in middle of translating it. It has a messy 20 switch cases.
I'll update you when I'm done.
- Rufas
Being trying to use that IDA from ScummVM, and now I can see why nobody can help you. IDA can analyze only the DOS-extender stub on the beginning, and not the engine part of game (the part I need).
Tried DOS box debugger, but the thing just keep crashing.
Looking at TerraGlyph wiki page, I noticed "Tiny Toon Adventures: Buster and the Beanstalk" also uses .TGR file, and it is a windows game, so it has a 32-bit .EXE. IDA can analyze this.
Found the decompression code at sub_40ff70, and I got something:
[spoiler]
![[Image: NTFs941.png]](https://i.imgur.com/NTFs941.png)
![[Image: bU8PX7n.png]](https://i.imgur.com/bU8PX7n.png)
![[Image: Gjnj8Wb.png]](https://i.imgur.com/Gjnj8Wb.png)
[/spoiler]
Naturally, it also works for Hansel and Gretel
[spoiler]
![[Image: lvhcm4z.png]](https://i.imgur.com/lvhcm4z.png)
![[Image: nxG7qFE.png]](https://i.imgur.com/nxG7qFE.png)
![[Image: NPAaIc7.png]](https://i.imgur.com/NPAaIc7.png)
[/spoiler]
The decompression is just like Final Fantasy 7. Read a byte (8-bits). If bit is 0, copy next byte, if not refer to dictionary. Good old LZ77.
Unfortunately, it only work for backgrounds. The sprites uses different function. I already located the function is at sub_408e60 and in middle of translating it. It has a messy 20 switch cases.
I'll update you when I'm done.
- Rufas

