Dark Bit Factory & Gravity
PROGRAMMING => Other languages => ASM => Topic started by: Rbz on March 11, 2009
-
For those into 1kb coding, there's a new method to pack 1kb intros developed by hitchhikr (http://www.pouet.net/user.php?who=5308) that outmatch the public version of crinkler 1.1a.
I did my contribution to this project testing it in 3 different OS's (Win2000/WinXP/Vista) and even with a code that reduced it's size in about 12 bytes, you can check it in the "framework.asm"
Pouet thread:
http://www.pouet.net/topic.php?which=6233&page=3
Download here:
ftp://ftp.untergrund.net/users/hitchhikr/1kpack_v0.6.zip
1kPack v0.6 - An experimental packer for Windows 1k effects
Written by Franck "hitchhikr" Charlet / Neural
-------
How to use:
All you have to worry about is to insert your code in the framework.asm
file than assemble it with nasm and pack it with 1kpack.
-------
About:
The basic principle is to use the zlib embedded inside each d3dx9 dlls
(via the png library) to depack a compressed stream (tweaked via 7zip).
The depacker/importer/stream header itself is relatively small
as it only takes 220 bytes (including the complete PE structure).
The imported dll (d3dx) is also used to extract the few APIs we need
in order to import the necessary functions to open a window and initialize
DirectX (the provided framework.asm file takes advantage of that
by peeking the functions addresses directly from the dll).
The functions in the framework.asm aren't imported by any hash method
because the code of such importer (+ the hash data) would take more
size than the way it is done now.
The result should work on Windows 2000, XP and Vista and give slightly better
results than the public version of crinkler.
Just keep in mind that this wasn't *thoroughly tested* & is *experimental* software.
f.
-
New v.0.7 is out:
ftp://ftp.untergrund.net/users/hitchhikr/1kpack_v0.7.zip
-
The test didn't work on a clean install of Windows 7, for some reason it doesn't have any historic versions of d3dx9 dll installed. I'll need to see what happens if I install the dx redist.
Jim
-
I hope it works on Win7 :)
-
Fucking crazy crunching the whole PE structure down to such a small size, it really is great.
-
Tested on public 64 bit beta version of Win7 with installed latest DX9 redis pack... Crashes here with an init error (0xc0000017)!
-
New version 0.9:
http://pagesperso-orange.fr/franck.charlet/1kpack.zip
Tested on public 64 bit beta version of Win7 with installed latest DX9 redis pack... Crashes here with an init error (0xc0000017)!
That's bad, more work to hitchhikr then :)
-
Downloading the redist gets me the dll I need :)
It crashes, still, but that could be down to the nature of the actual test code - what is it trying to do?
Nevertheless it's a great bit of work. I'm curious as to why the zip lib from directx is used...I think there are at least 2 more instances of it in the shell32.dll (explorer zip folders) and in the .net runtime libraries which might also be made to work.
Jim
-
It crashes, still, but that could be down to the nature of the actual test code - what is it trying to do?
Jim, test app just open and fill screen with a white color.
I'm curious as to why the zip lib from directx is used...
Because it got all necessary zlib functions to unpack the intro and plus LoadLibrary/GetProcAddress, which is used to retrieve other functions address, like in user32.dll / d3d9.dll / kernel32.dll, not to mention that you got all functions to compiler your shader program.
It use absolute offsets into d3dx9_30.dll which could be the problem with windows 7 or perhaps something changed in the win7 exe loader.
Btw, can you check if your Win7 d3dx9_30.dll file is the same used on WinXP ?
-
If you make a test app that just does 'ret' we can see if it's the compressor or the OS.
I think :)
Jim
-
Jim, check this one, it should load and exit.
What error message you got, is this one -> "Not a valid Win32 Application", if yes, I think the problem is with the new win7 exe loader :/
-
The excellent news is that one works :) The error with the previous tests was definitely a crash, not an invalid exe.
Jim
-
Nice :)
-
It is now compatible with windows 7, anyone able to test it?
http://www.pouet.net/prod.php?which=52796
http://pagesperso-orange.fr/franck.charlet/1kpack.zip
-
Cuuuuuttte !