Daily Archives: July 27, 2026

REBOOT: a 64k intro through the history of Windows, built with GitHub Copilot

Seven years ago, my previous post here began: “After 8 years, I found some time for my blog.” Reader, I have once again found some time for my blog.

I was wondering about the idea of combining recent AI with the old demoscene art of building an intro.

So, over an evening I built REBOOT – a ~60-second real-time demo that flies through the history of Windows and Microsoft, from the 1986 DOS prompt to the AI era of 2026. The whole thing is a single 18 KB .exe. Every pixel is drawn by one shader; sound is generated in code as well.

I wrote almost none of the hard bits by hand. That turned out to be the most interesting thing about this small project, so let me show you what came out and how.

See it running

This is a browser (WebGL) mirror of the exact shader that runs inside the executable, with the soundtrack too – a JavaScript port of the same in-code synth.

Live browser preview with sound (click ▶). The full native version is an 18 KB Windows .exe (link at the end).

What is a “64k intro”?

It is a demoscene tradition: a complete audiovisual program that must fit inside 65,536 bytes (64 KB). No video files, no .mp3, no textures shipped on disk – everything you see and hear is synthesized at runtime from a few kilobytes of code. It is a fun, self-imposed constraint that forces you to generate content with math instead of storing it. REBOOT lands comfortably under the limit at 18 KB.

How it’s built

The host program is tiny – about 800 lines of C. It uses plain Win32 to open a fullscreen OpenGL window, compiles one shader, and runs a render loop. From there, two ideas do all the heavy lifting:

  • All visuals are one fragment shader. There is no 3D model, no mesh, no texture. The scene is raymarched from signed-distance functions: the camera flies down a “corridor of time,” and each room is an era – the green DOS screen, the Windows 3.1 / 95 flags, Clippy, the XP “Bliss” hills, 7, 10, a data center, and an AI finale. A year counter ticks from 1986 to 2026 in the corner.
  • All audio is generated in code. On startup the program renders ~60 seconds of PCM from a little software synth (kick, hats, a chord bed, a lead voice) into a buffer, then loops it with waveOut. Nothing is streamed from a file.

Getting under 64 KB

My first working build was 150 KB. It wasn’t the graphics or the audio – it was the Microsoft C runtime (the CRT) that the linker pulls in by default. To hit demoscene size you have to let go of it.

So I dropped the CRT entirely (/NODEFAULTLIB with a custom entry point) and supplied the handful of math functions the shader host needs – sin, floor, exp, pow, fabs – myself, in x87 FPU assembly. That alone dropped the binary to about 40 KB – already under the limit – and running it through UPX (LZMA) then packed it down to about 18 KB.

The Copilot part

I am a Data & AI person. I had never hand-written x87 FPU assembly in my life, and I am not a demoscene coder (although I did try years ago). GitHub Copilot wrote the naked sin/exp/pow, most of the signed-distance scene, the little synth voices, and it debugged the shader with me. My job was direction, taste, the size budget, and testing.

Almost the entire demo is a single fragment shader, pasted into the C file as one long string; a lot of the code looks like this:

      float ns=length(p-np)-0.36; if(ns<d){d=ns;mat=51.0;}
      float con=sdCap(p,cen,np,0.08); if(con<d){d=con;mat=53.0;} }
    for(int i=0;i<10;i++){ float a=float(i)*1.2+iTime*0.3; float rr=3.0+2.2*sin(a*1.7);
      vec3 ap=cen+vec3(rr*cos(a),1.8*sin(a*1.3),rr*0.5*sin(a*0.7)+float(i)*0.7-3.5);
      vec3 lo=p-ap; lo.xz=rot(iTime*0.7+a)*lo.xz; float ag=sdOcta(lo,0.5); if(ag<d){d=ag;mat=52.0;} }
  } return d; }
vec3 calcN(vec3 p){ vec2 e=vec2(0.0025,0.0); float m;
  return normalize(vec3(map(p+e.xyy,m)-map(p-e.xyy,m),map(p+e.yxy,m)-map(p-e.yxy,m),map(p+e.yyx,m)-map(p-e.yyx,m))); }
vec3 shade(vec3 p, vec3 rd, float m, float t){
  vec3 n=calcN(p); vec3 ld=normalize(vec3(0.3,0.7,-0.5));
  float dif=clamp(dot(n,ld),0.0,1.0); float amb=0.45; vec3 base=vec3(0.4); vec3 emis=vec3(0.0);
  if(m<1.5){ float seg=floor(p.z/SEGL); base=roomCol(seg); int rs=int(clamp(seg,0.0,7.0)+0.5);
    vec2 uvw=(abs(n.y)>0.5)?vec2(p.x,p.z):vec2(p.z,p.y);
    vec2 gg=abs(fract(uvw*0.7)-0.5); float seam=smoothstep(0.035,0.0,min(gg.x,gg.y)-0.43); base*=1.0-0.35*seam;
    vec3 acc=rs==0?vec3(0.1,1.0,0.5):rs==1?vec3(0.0,0.0,0.5):rs==2?vec3(0.95,0.85,0.2):rs==3?vec3(0.0,0.0,0.5):rs==4?vec3(1.0,1.0,1.0):rs==5?vec3(0.5,0.85,1.0):rs==6?vec3(0.0,0.75,1.0):vec3(0.0,0.75,1.0);
    if(abs(n.x)>0.5){ float strip=smoothstep(0.04,0.0,abs(fract(p.y*0.5+0.25)-0.5)-0.46); emis+=acc*strip*0.30; }
    if(n.y>0.5) base*=0.55; else if(n.y<-0.5) base*=0.5;
    base*=0.9+0.1*noise(vec2(p.x*1.3+p.z*0.6,p.y*1.3));
    float glow=0.5+0.5*sin(p.z*0.35-t*2.2); emis+=roomCol(seg)*0.10*glow;
    if(rs==7){ vec2 mu=(abs(n.x)>0.5)?vec2(p.z,p.y):((abs(n.y)>0.5)?vec2(p.x,p.z):vec2(p.x,p.y)); vec2 cel=floor(vec2(mu.x*2.2,mu.y*2.2-t*4.0)); float hh=hash(cel); float on=step(0.62,fract(hh*3.0+t*0.3)); float 

There are no textures and no meshes anywhere – every room is just another else if on the material id, with each colour, glyph position and glow hand-tuned as a bare number. This is one screenful of a shader that runs to many hundreds of lines; almost the whole program looks like this.

Roughly, the split looked like this:

  • Great at: Win32/OpenGL boilerplate, assembly I would otherwise have to look up instruction by instruction, and fast iteration on the shader (“make the XP room feel like Bliss,” “the flag is unreadable – fix the waveform,” “we’re 3 KB over budget, what can we cut”).
  • Still needed me: judgment and taste, holding the 64k constraint, verifying the thing actually runs on a clean machine, and catching subtle bugs like the mod() one that made the year 2000 render with a missing digit.

Try it

The live demo above includes the soundtrack (the same synth, ported to JavaScript). The full native version is a small Windows executable:

About that antivirus warning. Windows Defender (and SmartScreen) will almost certainly flag the download – so let me get ahead of it. There is nothing malicious in here; the entire source is a single intro.c you can read top to bottom. It gets the side-eye because it looks unusual: it is unsigned (no code-signing certificate), it is UPX-packed (a compression trick that malware also loves), it ships without the C runtime and boots from a custom entry point, and almost nobody has downloaded it yet, so it has zero reputation. In other words, every single thing that makes it a fun 18 KB demo is exactly what makes a heuristic scanner nervous – something tiny and incomprehensible, written in native C. If you’d rather not deal with it, the browser version above is the whole show anyway.

If you build something tiny with an AI pair-programmer, I would love to see it.

July 2026
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031