Trois machines dans le navigateur

 · 3 min read
 · Jean Schurger

English version below.

J'ai remis trois vieilles machines en marche, chacune dans un onglet de navigateur, sans rien à installer. Trois époques, trois approches, trois plaisirs différents.

Un ZX81 (1981). zx81.schurger.org fait tourner la ROM d'origine du Sinclair ZX81 sur un cœur Z80 en JavaScript. La vidéo n'est pas simulée de l'extérieur : le processeur « exécute » le fichier d'écran comme sur la vraie machine, les caractères deviennent des instructions vides et l'interruption de ligne tombe au bon moment. Le démarrage prend ses deux secondes, comme en 1981, et une démo d'attrape-étoiles se charge toute seule.

Smalltalk-80 (1983). st80.schurger.org est plus rare : c'est la vraie image Smalltalk-80 de Xerox PARC, celle du 1er avril 1983, livrée à l'époque sur bande aux premiers licenciés. Elle tourne sur la machine virtuelle « du livre bleu » écrite par Dan Banay, que j'ai compilée en WebAssembly. On y retrouve le bureau, le navigateur de classes, l'inspecteur et le débogueur — l'environnement qui a inspiré le Macintosh. Ce n'est pas l'image Squeak qu'on voit dans les musées, c'est l'originale.

Un Exelvision EXL 100 (1984). exl100.schurger.org est le plus français des trois : l'EXL 100 d'Exelvision, à processeur Texas Instruments TMS7020, clavier infrarouge et synthèse vocale. Il démarre sur le papillon Exelvision, et un menu propose une quinzaine de cartouches (ExelBASIC, Tennis, Guppy…) et une cinquantaine de programmes BASIC sur cassette qui se chargent tout seuls : la page tape la commande de chargement et RUN à votre place.

À chaque fois la méthode a été différente : un cœur Z80 écrit en JavaScript pour le ZX81, la compilation d'une machine virtuelle C++ existante pour Smalltalk, et la compilation d'un émulateur multi-machines pour l'EXL 100. Le tout en WebAssembly ou en JavaScript, sans serveur de calcul : tout s'exécute dans votre navigateur, rien n'est envoyé ailleurs.

Les trois sont ouverts sur git.schurger.org :

git clone https://git.schurger.org/zx81.git
git clone https://git.schurger.org/st80.git
git clone https://git.schurger.org/exl100.git

English version

I brought three old machines back to life, each in a browser tab, with nothing to install. Three eras, three approaches, three different pleasures.

A ZX81 (1981). zx81.schurger.org runs the original Sinclair ZX81 ROM on a Z80 core in JavaScript. The video is not faked from the outside: the processor "runs" the screen file as on the real machine, characters become no-op instructions and the line interrupt fires at the right moment. Boot takes its two seconds, just like in 1981, and a star-catching demo loads by itself.

Smalltalk-80 (1983). st80.schurger.org is rarer: it is the real Smalltalk-80 image from Xerox PARC, the one from April 1st, 1983, shipped at the time on tape to the first licensees. It runs on the "Blue Book" virtual machine written by Dan Banay, which I compiled to WebAssembly. You get the desktop, the class browser, the inspector and the debugger — the environment that inspired the Macintosh. This is not the Squeak image you see in museums, it is the original.

An Exelvision EXL 100 (1984). exl100.schurger.org is the most French of the three: the Exelvision EXL 100, with a Texas Instruments TMS7020 processor, an infrared keyboard and speech synthesis. It boots to the Exelvision butterfly, and a menu offers a dozen cartridges (ExelBASIC, Tennis, Guppy…) and about fifty BASIC programs on cassette that load by themselves: the page types the load command and RUN for you.

Each time the method was different: a Z80 core written in JavaScript for the ZX81, compiling an existing C++ virtual machine for Smalltalk, and compiling a multi-machine emulator for the EXL 100. All in WebAssembly or JavaScript, with no compute server: everything runs in your browser, nothing is sent elsewhere.

All three are open on git.schurger.org:

git clone https://git.schurger.org/zx81.git
git clone https://git.schurger.org/st80.git
git clone https://git.schurger.org/exl100.git