News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: I need help with compressed sprites.  (Read 959 times)

Tailo

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
I need help with compressed sprites.
« on: April 25, 2018, 07:11:37 pm »
Hi.
I need help with the compression of the sprites of the game Dragon Ball Z: Buu's Fury. It turns out that I found the palettes that use the sprites and backgrounds of the game, and out of pure instinct I have found the code of one of the compressed sprites. I can not find out what method is used and I wanted to ask if someone can help me. Thanks in advance.
I leave an image of the sprite in question. Its size is 160 x 64.
I also leave a lin with the sprite code (I think it has more code that serves to let the memory know how to read the sprite) and the palette.



http://ge.tt/6wJd8Zp2

April 26, 2018, 06:21:29 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I have already managed to change the prites of the characters. Although I see that the game does not interest much.
« Last Edit: April 26, 2018, 06:21:29 pm by Tailo »

FAST6191

  • Hero Member
  • *****
  • Posts: 2589
    • View Profile
Re: I need help with compressed sprites.
« Reply #1 on: April 26, 2018, 07:30:48 pm »
GBA compression, also I recall messing with the text one time in one of the Dragon Ball ? games on the GBA and it had some oddities to it.

Anyway basic GBA compression.
The GBA's BIOS includes routines to decompress a few different types of compression. For the most part it is the LZ compression types, maybe with an unpack if you are after a font.
Said LZ is split two ways
1) WRAM
2) VRAM aka where the graphics go.

Some will use automated scanning tools like NLZ  http://www.romhacking.net/utilities/529/ , crystaltile2's compression, unlz advance http://www.romhacking.net/utilities/362/
Others will use an emulator that takes BIOS logs.
http://problemkaputt.de/gbatek.htm#biosdecompressionfunctions
Said logs include what type it is and where it is found.

Not all games will use the BIOS to handle the decompression (it is a bit slower than what you can do in normal code) so BIOS logging won't always give it away. The scanners might still find it.

At times like these I also like to link up http://members.iinet.net.au/~freeaxs/gbacomp/#Image%20Compression%20on%20GBA

Finally we have tracing https://www.romhacking.net/documents/361/ though most will use the debug version of http://problemkaputt.de/gba.htm these days.
This will find what you want, however it is not as easy to do as the earlier things mentioned.

Once you have the location you can pull it from the ROM and decompress it with a number of tools, or indeed maybe even get a tool which decompresses directly from the ROM if you feed it an address. For compression I like the GBAcrusher program, you can find a copy on the headspin's compression page I linked just a little while ago.

Tailo

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: I need help with compressed sprites.
« Reply #2 on: April 27, 2018, 01:48:30 pm »
Hi.
Thanks for the reply. I have tried to follow everything you tell me but without success. The codes of the sprites had already been located and in the end I opted for repoint. It is more laborious but luckily I do not want to modify many sprites. Here a test of the result (Goku SS Blue, is not perfect because I did it in a hurry simply to see that I could replace sprites).
Greetings.