This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CompressionHook() | |
src = memory.readword(0x001D) | |
size = memory.getregister("a") | |
emu.print(string.format("src:0x%x; plain size:0x%x\n", src+0x10,size*0x10)) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local xreg = '' | |
function srcUpdate() | |
xreg = xreg .. string.format("\n0x%x", emu.getregister("R0")) | |
end | |
function sizeUpdate() | |
xreg = xreg .. string.format(" 0x%x", emu.getregister("R0")) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 11111 YY YYYYYYYY OOOOOOOO OOOOOOOO | |
| | | | | |
| | | 16 bit lz offset | |
| | lz decompress length | |
| signifies LZ copy | |
compression flag | |
1 YYYYY XX XXXXXXXX AAAAAAAA... | |
| | | | | |
| | | chunk to repeat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned int __fastcall decompressGfx(int a1) | |
{ | |
int v1; // r4@1 | |
int v2; // r0@1 | |
int v3; // r5@1 | |
int v4; // r6@1 | |
int v5; // r2@1 | |
unsigned int result; // r0@1 | |
int v7; // r9@3 | |
int v8; // r0@3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# OPTIONS -O #-} | |
-- Example of an drawing graphics onto a canvas. | |
import Graphics.UI.Gtk | |
import Data.Array.MArray | |
import Data.Word | |
import Data.IORef | |
import Control.Monad ( when ) |