This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
unsigned char readbyte, readbyte2, TypeKey, LZIterations, IterationKey;(the odd size is because the original game code deliberately underflowed the decompression scratchpad position with 0x24 zeroed bytes to set the read position behind the write position.)
unsigned long int romoff, WriteIndex;
unsigned short int DecompIterations, LZKey, LZReadIndex, Write=0x24;
unsigned char DataBuffer[0x10024];
while(LZIterations>0)I was using the long WriteIndex as the array index and it would crash/return corrupt data, replacing it with the short int Write made it work, but I don't know if that is correct.