; ;จจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจ ; - _______/\ /\ _______/\____________/\___ ; ื \/ _ X \ \/ ___ \/\/ \ ื ; _________/ + ___/ \__\ /\ __+ \/ + __ + \________ ; / // \/ X \ \\ \/ /// // |\/ \\ \ ; /\/ // /_______/ \__\ \\ \ // // |_\ \\ \ ; -ซ========== / / / / + \ \/ + | / + / / =========ป- ; / + --- ฏ / + ---- / - |/ -- / ; ______/ /===========/ / /=========/ / /====/ / /====/ /________ ; \ _____________/\__________ /\_______/ _______/ ; ื \/ \/ \/ ; ื ฏ ื ื ;จจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจ ; ; ซซ ScrunchPro v1.0d Data-Decompression ปป ; (example for usage in DEMO`S, GAMES, hardware enviroments) ; ; ;จจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจ ; N.B; This file MUST be spread with the DECODE.BIN otherwise its useless!!!! ; ;จจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจ ; Hardware Programmers EXAMPLE ; ============================ ; This example shows decoding (Unpacking using the BINARY image file) ; ; Only use this method if library access is out of the question, i.e in ; demo`s, games, etc where the OS is killed for memory purposes. ; ; If you use the library when new releases of the lib become available that ; are faster,etc you program will instantly be able to take advantage of them. ; ; This is the reason why the library is a more viable option, however I realise ; being a hardware programmer myself that libraries can be a real pain in ; the butt! Anyway here`s the small example anyway! Feel free to modify it to ; suit your individual needs, sexual desires, etc... !! ; ;จจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจจ ; Here is the Decoder parameters 'DATA' Structure ; ; ulong source+4 (skip 4 bytes header) ; ulong sourcesize (actual size of packed file) ; ulong dest (destination addr) ; ulong null (not used...) ; ulong AuxBuffer (addr of 4ฝk of buffers) ; ulong null (not used...) ; Assemble using, DEVPAC, ASMONE, MCASM, etc... Decode: lea DStruct(pc),a0 move.l #PakData+4,(a0) ;put source addr into struct move.l #PakEnd-PakData,4(a0) ;put sourcesize in struct move.l #$40000,8(a0) ;put dest in struct clr.l 12(a0) ;clr zero in struct move.l #AuxBuffer,16(a0) ;put auxsize in struct clr.l 20(a0) ;clr zero in struct (future) bsr.s SproDecode ;call unpack code. rts DStruct: ds.l 6 ;our structure even SproDecode incbin 'ScrunchPro:source/SPRO_Decrunch.bin' ; raw decode binary. PakData incbin 'ram:any_packed_data' PakEnd even AuxBuffer ds.b 4500 ;4ฝk (de)compression buffers AuxEnd even