Author Topic: 1kPack - Packer for Windows 1K intro effects  (Read 5153 times)

0 Members and 1 Guest are viewing this topic.

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2684
  • Karma: 483
    • View Profile
    • http://www.rbraz.com/
For those into 1kb coding, there's a new method to pack 1kb intros developed by hitchhikr 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


Quote
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.
« Last Edit: March 11, 2009 by rbz »
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2684
  • Karma: 483
    • View Profile
    • http://www.rbraz.com/
« Last Edit: March 16, 2009 by rbz »
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #2 on: March 14, 2009 »
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
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2684
  • Karma: 483
    • View Profile
    • http://www.rbraz.com/
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #3 on: March 14, 2009 »
I hope it works on Win7 :)

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17373
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #4 on: March 15, 2009 »
Fucking crazy crunching the whole PE structure down to such a small size, it really is great.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1393
  • Karma: 108
    • View Profile
    • http://www.secretly.de
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #5 on: March 15, 2009 »
Tested on public 64 bit beta version of Win7 with installed latest DX9 redis pack... Crashes here with an init error (0xc0000017)!
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2684
  • Karma: 483
    • View Profile
    • http://www.rbraz.com/
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #6 on: March 16, 2009 »
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 :)
« Last Edit: March 17, 2009 by rbz »
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #7 on: March 16, 2009 »
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
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2684
  • Karma: 483
    • View Profile
    • http://www.rbraz.com/
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #8 on: March 17, 2009 »
Quote
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.

Quote
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 ?
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #9 on: March 17, 2009 »
If you make a test app that just does 'ret' we can see if it's the compressor or the OS.
I think :)

Jim
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2684
  • Karma: 483
    • View Profile
    • http://www.rbraz.com/
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #10 on: March 17, 2009 »
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 :/
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #11 on: March 18, 2009 »
The excellent news is that one works :)   The error with the previous tests was definitely a crash, not an invalid exe.

Jim
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2684
  • Karma: 483
    • View Profile
    • http://www.rbraz.com/
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #12 on: March 20, 2009 »
Nice :)
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2684
  • Karma: 483
    • View Profile
    • http://www.rbraz.com/
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #13 on: March 01, 2010 »
Challenge Trophies Won:

Offline maracuja

  • C= 64
  • **
  • Posts: 31
  • Karma: 4
    • View Profile
Re: 1kPack - Packer for Windows 1K intro effects
« Reply #14 on: May 11, 2011 »
Cuuuuuttte !