G3HS / Secret-Tool

Shhhh... I will tell you all more soon.:P
52 stars 6 forks source link

G3HS generates broken Sprite Pals #9

Open ipatix opened 9 years ago

ipatix commented 9 years ago

Well, so first of all I need to say that I didn't really touch this tool yet and I don't really know how things work but none the less I'll post about an issue G3HS that I've gone accross. So there seems to be an issue that G3HS will generate semi broken compressed palettes of Pokemon Sprites. There will be no issues with them if you use an emulator to play Pokemon but once you enable real BIOS emulation or play on a real machine the game will freeze when the BIOS function to decompress the Pal get's called. So there most likely seems to be a bad implentation of the LZ77 compression algorithm.

As I said, I'm posting this for someone else who uses this tool and if you need further information for fixing this problem please let me know.

cosarara commented 9 years ago

What I'd do for more bug reports like this one! :D

I'll look at it tomorrow.

cosarara commented 9 years ago

Did I say tomorrow? :P

Well, I've written some code to compare the function against NLZ-advance's, and it seems the output is actually different.

thekaratekid552 commented 9 years ago

The compression algorithm I wrote is based off generic LZ77 compression, not necessarily exactly what the GBA BIOS really needed. I always have used a real BIOS so I'm not sure why this is an issue now, however the compression is going to be different, even using the same algorithm depending on how far back the code looks when searching for parts to compare to. If you haven't read up on it, from what I remember LZ77 is based upon taking chunks of data and setting them aside then creating pointers back to them whenever it comes back up again. I could be wrong, I haven't touched it in over a year. On Apr 13, 2015 4:47 PM, "Jaume Delclòs" notifications@github.com wrote:

I said tomorrow? :P

Well, I've written some code to compare the function against NLZ-advance's, and it seems the output is actually different.

— Reply to this email directly or view it on GitHub https://github.com/G3HS/Secret-Tool/issues/9#issuecomment-92493674.