New 256 byte demo

September 10, 2009 in Personal | Comments (0)

Tags:

I des­per­ately miss the demo­scene. Towards the end of the 1990s when per­sonal com­puters got power­ful enough to do, well, just about any­thing, I star­ted turn­ing my interests else­where. It’s still alive, though, and pick­ing up some amaz­ing coders. The latest jaw-​​dropping demo to be released is a 256 byte demo from Řrřola, a coder in the Czech Repub­lic. Here’s the You­tube ver­sion of it for those of you that don’t have DOS installed:

This is one of the most tech­nic­ally impress­ive demos I’ve ever seen in my life. What he’s done should be flat-​​out impossible to do in 256 bytes. As a red­dit com­ment poin­ted out, tak­ing a single screen­shot of the demo in action will yield a file 96 times lar­ger than the demo itself. A simple “hello world!” writ­ten in SPARC assembly, as taught by our uni­ver­sity, is over 2.6 times as large than this demo (2.59 times as large if you’re clever about filling delay slots). Hell it takes over 1/​20 the size of this demo just to rep­res­ent the string “hello world!”. From an inform­a­tion the­ory it boggles the mind that that video can effect­ively be com­pressed down to 256 bytes.

Any­way, if all of this weren’t excit­ing enough, it gets even more excit­ing due to the fact that he’s released the source code. More excit­ing still is the fact that the com­ments are writ­ten in (very clear) Eng­lish instead of Czech. I don’t think it will be pos­sible for me to res­ist fig­ur­ing out how he did this. Parts like this:

  push 09FCEh   ;<aligns with the screen ;-)
  pop  es
  mov  bh,56h   ; xyz addressing trick from neon_station
                ; vecNN = (words){[5600h+N] [5656h+N] [56ACh+N]}
;frame loop - prepare constants
;ax=key bx=5600h bp=dx=0 cx=3 si=100h di=-2 sp=-4 word[5700h]=T

are going to have me stumped for a long while, I think, but I’m pretty psyched about it. Tak­ing a quick 5-​​minute pass through the source code I under­stand a sur­pris­ingly large amount of it, just not the parts that really count. Tra­cing through it sort of brings me back to my demo­scene days, except now I have the lux­ury of going through source code instead of try­ing to deal with DOS Debug. One of my first thoughts read­ing through this was “he’s using float­ing point instruc­tions? That’s so cheat­ing. Who has the money for a math co-​​processor‽”


Leave a Reply

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>