Hejsil / pokemon-randomizer

A Pokémon Rom randomizer tool written in Zig
The Unlicense
13 stars 0 forks source link

Figure out exactly how the algorithm in blz.zig work. #18

Open Hejsil opened 6 years ago

Hejsil commented 6 years ago

I couldn't find any specification of what kind of algorithm CUE's blz implementation uses. I don't know if it's a well known "compression" algorithm or some closed source Nintendo thing. This makes it hard to debug, refactor and optimize the code, as I don't understand it at all.

We have two options:

The blz.zig works for the games I've tested, so it's gonna stay for now. This issue is for the future, when perfection of the code in the randomizer becomes more important.

Hejsil commented 6 years ago

23 was fixed by removing the blz.encode from nds.Rom.writeToFile (as roms can be loaded without and encoded arm9).

If we are to ever use the blz.encode, then it has to be faster, because omg it's slow.