Author Topic: [IN PROGRESS] 512b GDI FrameWork  (Read 8745 times)

0 Members and 1 Guest are viewing this topic.

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1153
  • Karma: 174
    • View Profile
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #20 on: March 24, 2011 »
I hate to ask but if I can get a test of this it would really mean a lot to me.

No problem at all, always happy to help. No need to hate to ask :)

And now the good news...  It works fine here on Win 7 x64.  I get a full screen gradient from black at top of screen down to gray at bottom of screen.

I notice if I move my mouse pointer over the monitor with the gradient, the cursor is the windows "waiting" cursor (the spinning coloured circle one).

If I click the screen, I get a message saying "GetWindowRect.exe" is not responding and do I want to wait or close the program.  Not sure if this is anything to do with the packing.  I expect not.

Hope this helps rain_storm...
raizor

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #21 on: March 24, 2011 »
Yeah, excellent.

I didn't bother to pump the MessageQueue / ShowCursor(0) to save on bytes. At 512b I think its acceptable behaviour but I am heavily biased having seen many 256b demos that don't even have exit, If I can save enough bytes I might add these back in.

Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1153
  • Karma: 174
    • View Profile
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #22 on: March 24, 2011 »
I didn't bother to pump the MessageQueue / ShowCursor(0) to save on bytes. At 512b I think its acceptable behaviour but I am heavily biased having seen many 256b demos that don't even have exit, If I can save enough bytes I might add these back in.

Ah, that makes sense now.Would be interested to know just how many bytes those additions add. 
raizor

Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1418
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #23 on: March 24, 2011 »
Works fine now on Win7 x64! Great work!
- 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 rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #24 on: March 24, 2011 »
Ah, that makes sense now.Would be interested to know just how many bytes those additions add. 
It takes around 50 bytes when the stack has been zero'd (which it has). I'm hoping I can crunch this down by another 100-150 bytes, mostly by hiding stuff inside the header.

I'd much rather spend those bytes on the effect but I'm sure that I can spare enough to at least hide the cursor.

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17378
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #25 on: March 24, 2011 »
I tested it with exactly the same result as Raizor :)

It would be cool to stop that error message but it's great work!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #26 on: March 25, 2011 »
Tested it on Window 64bits ... GTX 8800 (but we don't care about GPU, no ?)

So, I got a shaded screen black from white. Hope it is correct.
The cursor and the resolution did not change in the desktop.
The cursor was like searching for something, I have pressed it crashed (windows sending message)
Otherwise, escape key is working :)

So ... I have to say:
Really nice job !   :clap:
The demoscene will never die, never!

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #27 on: March 26, 2011 »
Added MessagePump and hidden cursor so that problem should be fixed. the code is only 471 bytes but I have to pad it out with zeros to 513 bytes, still haven't gotten round to correctly calculating the required parameters in the header.

Edit : check first post for latest version which is no longer padded
« Last Edit: November 12, 2012 by rain_storm »

Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1153
  • Karma: 174
    • View Profile
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #28 on: April 02, 2011 »
Yep, looks and works great now rain_storm. No cursor anymore.

Looking forward to seeing what you do with this next :)

raizor

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #29 on: April 03, 2011 »
Good to hear, Trying to support multiple versions of Windows at this size limit is much like Programming Punched Cards in a way. I still need to cunch some bytes before this is truely useable though.

Challenge Trophies Won:

Offline bj

  • ZX 81
  • *
  • Posts: 20
  • Karma: 10
    • View Profile
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #30 on: July 08, 2011 »
471b downloaded and works fine, thanks. Lovely to see some tiny coding running on a Windows 7 computer.

Offline Baudsurfer

  • C= 64
  • **
  • Posts: 46
  • Karma: 18
    • View Profile
    • x86 Assembly language page
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #31 on: August 03, 2014 »
Thanks for sharing your work rain_storm.
I know this is an old thread, but wanted to ask you if the "Edit 3 - Latest version 347b" attachment of 1st post is an update of the compatible 471-byte version that everybody tested from xp to win7-32bit to win7-64bit ? ie: is 471 bytes the lowest footprint for compatibility ?

Thank you in advance and congratulations again.

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [IN PROGRESS] 512b GDI FrameWork
« Reply #32 on: August 09, 2014 »
The versions above were the product of an incremental improvement. I crunched things as far as I could, but sometimes I would start fresh and by taking a different route from the start I managed to shave additional bytes. The latest version is 295 bytes and compatible with XP, Vista, 7 and 8. But the latest version is not ( or at least should not be ) NX bit safe.
Check the first post to grab a copy of the 295 byte version.

In the source code you will find a bitfield that disects tinype at a bit level. It states explicity which bits must be 0, must be 1 or can be toggled freely ( within limits ). This bitfield was built up using a program I wrote that toggled each bit and loaded the resultant image with CreateProcess then tested for errors during CreateProcess or errors in the return value. Then I ran this program on as many PC's as I had access to which included multiple XP systems, one Vista box, multiple Windows 7 systems and just one Windows 8 system.

This bitfield was what I started from when I built the 295 byte version.

Challenge Trophies Won: