![]() |
|
Demo contest? - Printable Version +- iDevGames Forums (http://www.idevgames.com/forums) +-- Forum: Community Zone (/forum-4.html) +--- Forum: Contests (/forum-19.html) +--- Thread: Demo contest? (/thread-2988.html) Pages: 1 2 |
Demo contest? - Duane - Oct 17, 2007 05:36 PM Anyone up for a demo contest? Just create something really visually appealing. But wait, there's more! Let's have a size restriction, just for the heck of it, and make it something that's really restrictive. Anyone up for it? Demo contest? - OneSadCookie - Oct 17, 2007 06:57 PM How about a UB in less than 24KiB, uncompressed
Demo contest? - stevejohnson - Oct 17, 2007 09:33 PM OneSadCookie Wrote:How about a UB in less than 24KiB, uncompressed *commits seppuku* Demo contest? - Duane - Oct 18, 2007 04:42 PM well hell, I know I'm entering a text app, so I'm not even linking to anything I don't think. Ok, how about we have a size limit OVER the universal binary base? Demo contest? - OneSadCookie - Oct 18, 2007 05:22 PM I believe that the 24KiB UB binary is achievable, but my ASM-fu is weak and has so far thwarted my attempts so far to get there... Demo contest? - OneSadCookie - Oct 18, 2007 07:09 PM OK, I've done it, even if I don't understand why the x86 half has to look like this... hello.x86.s: Code: .cstringhello.ppc.s: Code: .cstringto build: Code: as -arch ppc hello.ppc.s -o hello.ppc.oThe results: Code: CookieJar:Desktop keith$ ls -l a.out*Most of the executables is zeroes (for padding) so they compress really well: Code: CookieJar:Desktop keith$ gzip a.out*Demo contest? - Duane - Oct 19, 2007 03:40 PM yea, I easily got a universal, nonlinked 4120 byte file. By the way, I believe that if you compile and run the ppc version, you'll find it's returning 4 and NOT 1. I think I can use c, but the inline assembly doesn't work correctly (for ppc); it complains of an undefined r2 when I attempt to reference c symbols from the assembly blocks. Demo contest? - OneSadCookie - Oct 20, 2007 01:44 AM Nayr Wrote:yea, I easily got a universal, nonlinked 4120 byte file. Don't know what you mean by that. If you mean your .o file was that large, that's completely not the point; it's the linking step that adds the bloat. Coincidentally, my nonuniversal apps are 4120 bytes on Tiger. Quote:By the way, I believe that if you compile and run the ppc version, you'll find it's returning 4 and NOT 1. Don't know what you mean by that... it should exit with status 0. Unfortunately for me, on Tiger, it crashes when run in Rosetta. Don't know what's up with that. Quote:I think I can use c, but the inline assembly doesn't work correctly (for ppc); it complains of an undefined r2 when I attempt to reference c symbols from the assembly blocks. Well, I don't know what that issue would be... AFAIK, inline assembly works fine for plenty of people... but if you can convince GCC to produce a universal binary below 28KB you're doing better than I did. Demo contest? - Duane - Oct 20, 2007 02:15 PM excuse me, I meant a 4120 universal binary. And, on ppc at the very least, the next instruction after a 'sc' is ignored; usually you use a 'nop,' but you could use any instruction if you truly want to confuse the reader of your code. Demo contest? - OneSadCookie - Oct 20, 2007 02:27 PM Nayr Wrote:excuse me, I meant a 4120 universal binary. Given that the single-architecture executables are 4120 bytes each, I don't believe you ![]() Quote:And, on ppc at the very least, the next instruction after a 'sc' is ignored; usually you use a 'nop,' but you could use any instruction if you truly want to confuse the reader of your code. Ah, that explains that. I guess Rosetta on Leopard is buggy
Demo contest? - Duane - Oct 20, 2007 03:55 PM Heh, this is my first time creating a universal binary, and I misused lipo. (I created a universal object file, but for some reason it only linked the ppc file :/) the universal is now 16408 bytes... Why does it quadruple in size? surely it still uses two segments, making it 8192 bytes plus some... Demo contest? - unknown - Oct 21, 2007 12:53 AM http://fax.twilightcoders.net/files/blinkenlights.zip great fun! ;D Demo contest? - OneSadCookie - Oct 21, 2007 01:46 AM Awesome, unknown. But it's 3.1MB, that's not < 24KiB
Demo contest? - Skorche - Oct 21, 2007 10:59 AM Oooh. Lisajous curves. I threw something together a couple of weeks ago using some of those. Lissajous worms Not really a demo, but hey. Demo contest? - Najdorf - Oct 21, 2007 11:07 AM Nice stuff Fax
|