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.

After 8 years, I found some time for my blog.

Since recently I have been working not only with MS SQL Server but also with machine learning products, I will write about it.

This article is about the Azure cognitive service.

Continue reading

Select DB_NAME(database_id)
 file_id, 'Error case' = CASE event_type 
 WHEN 1 THEN '823 or 824 or Torn Page'
 WHEN 2 THEN 'Bad Checksum'
 WHEN 3 THEN 'Torn Page'
 WHEN 4 THEN 'Restored'
 WHEN 5 THEN 'Repaired (DBCC)'
 WHEN 7 THEN 'Deallocated (DBCC)'
 END,
 page_id,
 error_count,
 last_update_date,
 PageType = Case
 When page_id - 1 % 8088 = 0 Then 'Is PFS Page'
 When page_id - 2 % 511232 = 0 Then 'Is GAM Page'
 When page_id - 3 % 511232 = 0 Then 'Is SGAM Page'
 When page_id BETWEEN 0 and 9 Then 'Is boot Page'
 Else 'Is Not PFS, GAM, or SGAM page' 
 End
 From msdb..suspect_pages

Known bug when trying to edit DTS packages:

described here, but the two links in the article – Microsoft SQL Server 2008 Feature Pack page and Feature Pack for Microsoft SQL Server 2005 page.

Microsoft SQL Server 2005 Backward Compatibility Components available on both links, but only on the second one it will work with 2008R2 (Despite the fact that the date of Feature Pack release is earlier).
In addition, here, in the first comment are correct pathes to copy *. dll and *. rll files.
In SSMS 2012 DTS package management is discontinued.

When migrating a database from SQL Server 2000 to SQL Server 2005, it became clear that the line

RAISERROR ('test error %S', 16, 1, @test)

due to wrong written %S instead of %s SQL Server 2000 simply works wrong (returns only the first character of the parameter), but SQL Server 2005 does not create a procedure:
Msg 2787, Level 16, State 1, Line 6
Invalid format specification: ‘%S’.

Because such writing could occur in any procedure, we can find them all::

SELECT name FROM sys.procedures WHERE CHARINDEX ( '%S', OBJECT_DEFINITION(object_id) COLLATE Latin1_General_CS_AS) >0

In one server SQL Server 2005 when I tried to open the properties of the database using the GUI I saw:

Indeed, we cannot determine the database owner:

select owner_sid, suser_sname(owner_sid) from sys.databases where name='model'
owner_sid owner name
0x010500000000000515000000B92ACD62A473F62D825A8A49A3780000 NULL

It was probably the domain user that no longer exists in AD.
Change the owner with procedure sp_changedbowner in the database model is prohibited::

use model; EXEC sp_changedbowner 'sa'

Msg 15109, Level 16, State 1, Line 1
Cannot change the owner of the master, model, tempdb or distribution database.

We can change the sid directly in the system table, as described here, but it is, really, is not recommended by MS way.

So we use the fact that owner of any attached database become the current user, and running SQL Server with the key /T3608, execute under the user’s session sa:

EXEC master.dbo.sp_detach_db @dbname = N'model'
GO
CREATE DATABASE [model] ON
( FILENAME = N'E:\DATA\model.mdf' ),
( FILENAME = N'E:\DATA\modellog.ldf' )
FOR ATTACH
GO

Restart the SQL Server, we see:

select owner_sid, suser_sname(owner_sid) 'owner name' from sys.databases where name='model'
owner_sid owner name
0x01 sa

If it possible, you can open the port for the SQL Server Browser, listed here.
If not, you need to create an alias or just connect by specifying port in the connection string:

where a named instance INSTANCENAME running on port 1453.

OS version: Windows Server 2008R2 EE x64
SQL Server version: SQL Server 2008R2 x64 SP1

Due to unspecified “Oracle provider for OLE DB” error twice restart SQL Server service.
An entry in the Application log:

01:46:12 PM Information SERVERNAME.domain.a 1001 Windows Error Reporting N/A N/A Fault bucket , type 0 Event Name: APPCRASH Response: Not available Cab Id: 0 Problem signature: P1: sqlservr.exe P2: 2009.100.2500.0 P3: 4dfb6221 P4: StackHash_6d63 P5: 6.1.7601.17725 P6: 4ec4aa8e P7: c0000374 P8: 00000000000c40f2 P9: P10: Attached files: C:\Users\username\AppData\Local\Temp\WERC049.tmp.appcompat.txt C:\Users\username\AppData\Local\Temp\WERCB13.tmp.WERInternalMetadata.xml C:\Users\username\AppData\Local\Temp\WERDDCA.tmp.mdmp C:\Users\username\AppData\Local\Temp\WERE22E.tmp.WERDataCollectionFailure.txt These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_sqlservr.exe_acc33c1fca791edc578ecac2be501126d4755535_cab_64a1e249 Analysis symbol: Rechecking for solution: 0 Report Id: 15cbe2fd-ae2a-11e1-a618-3c4a927b0a88 Report Status: 0
01:46:12 PM Error SERVERNAME.domain.a 19019 MSSQL$SQL1 Server N/A The MSSQL$SQL1 service terminated unexpectedly.

Reason restart SQL Server is an access violation – heap corruption:

STACK_TEXT:
00000000`00000000 00000000`00000000 oraoledbutl10!Unknown+0x0
FAILURE_BUCKET_ID: ACTIONABLE_HEAP_CORRUPTION_heap_failure_block_not_busy_AFTER_CALL_c0000374_OraOLEDButl10.dll

To prevent this situation in the future, remove the property “allow in process” Oracle provider, to the provider for a linked Oracle server work out of the process SQL Server:

Further, according to this article, customize access to MSDAINITIALIZE.

Now provider error “Oracle provider for OLE DB” will not lead to restart the SQL Server.

In SQL Server 2005 we able to change the location of the resource database files what is stated in msdn.
If we look the same on the SQL Server 2008 R2 , we read:
The resource database cannot be moved.

Let’s be curious, and try to do the same, as described in msdn for SQL Server 2005:

C:\>NET START MSSQLSERVER /f /T3608

Version check:

select @@version

Microsoft SQL Server 2008 R2 (SP2) – 10.50.4000.0 (X64) Jun 28 2012 08:36:30 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1(Build 7601: Service Pack 1) (Hypervisor)Specifying a new location:

ALTER DATABASE mssqlsystemresource
 MODIFY FILE (NAME=data, FILENAME= 'C:\DATA\mssqlsystemresource.mdf');
 ALTER DATABASE mssqlsystemresource
 MODIFY FILE (NAME=log, FILENAME= 'C:\DATA\mssqlsystemresource.ldf');

The file “data” has been modified in the system catalog. The new path will be used the next time the database is started.
The file “log” has been modified in the system catalog. The new path will be used the next time the database is started.
Move the database mssqlsystemresource files:

C:\>move "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\mssqlsystemresource.*" C:\DATA\

C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\mssqlsystemresource.ldf
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\mssqlsystemresource.mdf
2 file(s) moved.
And restart the SQL Server – it works.

Version:
Microsoft SQL Server 2008 R2 (RTM) – 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)

Problem:
There is a full-text index on the table IndexTable (about 3 billion rows).
When start populating getting a lot of errors in the full text log:

2012-07-17 18:34:26.04 spid25s Error ‘0x80043630: The filter daemon process MSFTEFD timed out for an unknown reason. This may indicate a bug in a filter, wordbreaker, or protocol handler.’ occurred during full-text index population for table or indexed view ‘[TS_MageDB].[dbo].[IndexTable]’ (table or indexed view ID ‘667201477’, database ID ‘7’), full-text key value ‘1986286701’. Attempt will be made to reindex it.

This was happening during the 9 days (and haven’t been large load on the CPU and / or queuing to disk.), and full-text index has not been populated.

There is nothing helpful for me here (because of 2008 R2, not 2008) and here (just “We have therefore resolve this issue as by design”)

Resolution:
Only recreating the index helped, and, after that, populating:

DROP FULLTEXT INDEX ON [dbo].[IndexTable]
CREATE FULLTEXT INDEX ON [dbo].[IndexTable]( [IndexValue] LANGUAGE [Russian])
KEY INDEX [PK_IndexTable] ON ([FT_IndexTeble], FILEGROUP [ftfg_FT_IndexTeble])
WITH (CHANGE_TRACKING = OFF, STOPLIST = SYSTEM)

or, if we want to start populating manually later, for example, at night:

...CHANGE_TRACKING = OFF, NO POPULATION...

and for start:

ALTER FULLTEXT INDEX ON [dbo].[IndexTable] START FULL POPULATION

After a half-day process is finished, the error no longer appeared.

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