Creating a new Amiga OS: Reflections of a 50 year old developer

My first programming experience was Basic on a ZX81. Then my step-dad bought me a c64 and I was hooked. And I have been a software developer ever since.

When I was lucky enough to get an Amiga, I started with Amiga Basic while dabbing in Kuma Seka Assembler, learning the ropes. Eventually Blitz Basic came onto the scene and it was a perfect match since it compiled to real binaries (real machine code, as opposed to bytecodes or “P-Code” as it was called back then), and allowed users to write inline assembly side-by-side with basic statements. This was great since you could let BlitzBasic deal with things like screen allocation, file handling and bitmaps – while you could focus on your game logic; optimizing the core routines with assembly.

I also used Hi-Soft Basic a lot, which was (imho) better suited for writing desktop applications (as in multi-window business applications, like invoicing and flat-file database programs). Amos Basic was likewise fun but way too slow for any practical use. It had too much dependency on the OS and lacked a compiler. When the compiler eventually was released it was a huge disapointment, producing monstrous executables with no real speed benefit. So I never really took to Amos Basic like others did. I wanted more.

Top: Blitz Basic. Bottom: Amiga Basic. Blitz Basic is by far the most evolved procedural Basic compiler out there. Compiling to optimized machine code and allowing inline assembly.

When I bought Hi-Speed Pascal though, which was a Turbo Pascal clone for the Amiga and Atari –it changed everything. Here finally was a professional compiler with all the features i needed, including aggressive code elimination and a thin RTL (runtime library, pre-made routines that you used to build your applications) implemented from scratch in assembly language. The result was that HSP (Hi-Speed Pascal) produced code that was faster than both C and Basic by some margin of magnitude.

Hi-Soft’s “Hi-Speed Pascal” was a Turbo Pascal clone for the Amiga. Incredibly fast and incredibly powerful compared to the languages of that time period.

I also loved C/C++ on the Amiga, such as Storm C++, which gave the developer the essential OOP features of the day, but not all the confusing stuff that was added in the late 90s. “C with classes” is perhaps a more fitting description. It is essentially vanilla C with classes, inheritance and interfaces. Easy to use, understand and very powerful!

But for me, Pascal really put me on the right track with regards to software development. Say what you will about C/C++ but it requires a lot more time and effort to get results. Pascal has the benefit of having both the interface and the implementation in the same file – so there is no need for a separate header file. This means a lot less typing and more focus on what you want to achieve. Pascal is by far the most creative language I know, and I have worked in close to a dozen languages through the years.

When I eventually had to buy a PC for college, the first thing I installed on it was Turbo Pascal, and later – Borland Delphi. These two languages were the bread and butter for computer science studies. You typically learned Basic in highschool, Pascal in college, and C/C++ at university. Pascal is more or less identical to C/C++ except it has an easier syntax.

Pascal was created first and foremost to be “a better C” back in the day, and came about after research into human cognition and learning. It was discovered that the human brain picked up English (or words commonly read or spoken) faster than glyphs (for example: “begin” versus “{“). All of this research, as well as radical advances in compiler technology resulted in Pascal. And later, Object Pascal (equivalent of C++). Pascal was also shaped to make it easier to teach complex programming in colleges. Going from Basic to C proved difficult for young students, so Pascal was established as a syntactical compromise.

Embarcadero Delphi is a modern Object Pascal development system. A lot of people seem to imagine that Delphi is old, but C/C++ is actually 3 years older. Delphi supports all the modern features you expect from a language in 2024, and scales from inline assembly to generics and beyond.

The dark years: Microsoft’s hate campaign

I still work in Object Pascal to this day, and it truly is the most creative language out there. Sadly, Microsoft ran a hate campaign against it which was a part of their hostile takeover of Borland. A strategy that was sadly highly effective, especially when they have almost unlimited funds to “grease the wheels” to to speak.

A part of this takeover was to smear and label Delphi as old and slow, which the C# rumor mill still insists on aping to this day. It is an interesting lie. Especially when most C# developers have never tried Delphi. And those that have, tried it 20 years ago and compare the capabilities that Delphi had in the late 90s and early 2k’s with what is offered by Visual Studio today.

Fact is that Delphi has been updated steadily in concert with C/C++ and have all the features you would expect from a modern language. Delphi runs rings around C# in almost every test. In 2020 there were some six million Object Pascal developers in the world (including third party compilers and dialects such as Freepascal, Oxygene, Smart Pascal [a product i made earlier] and others).

Microsoft hijacked a lot of the developers from Borland, including the lead developer Anders Hejlsberg. They essentially went in to destroy Borland and it’s legacy on all fronts. Anders went on to create C# and Typescript – but his real passion was always Delphi, something that upset the Microsoft fanboys who are largely ignorant of it’s history.

Quartex Pascal is a development toolchain and IDE created by me. Unlike other tools it compiles to JavaScript. This development system came about more or less purely to create Amibian.js, the re-implementation of Amiga OS for cloud and IoT devices.

With Quartex Pascal, my second Object Pascal development system, I have modernized the platform further. This time compiling to JavaScript rather than machine code, with an RTL that interacts with the DOM and Node.js server-side.

This brings the full might of Object Pascal to the world of the browser, including classes, inheritance, interfaces, partial classes, anonymous methods, overloading, virtual and abstract methods — and more importantly, a component based approach to the UI implemented in a rich, media centric RTL. The IDE itself is more than 80.000 lines of code, and that is without the compiler, auxillary libraries I have made, and the RTL and project types on the QTX side of the coin.

Delphi and Freepascal have almost 3 decades worth of technology we can cherry pick from, thousands of packages, hundreds of thousands of code-files. These can now finally be tapped into and made to run in a browser, or as a system service courtecy of node.js or Deno. It is an avalanche of technology, all it requires is that someone builds the ramp – then the boulder will be unstoppable once it starts rolling.

Wrapping existing JavaScript and Webassembly libraries so that they can be used, side by side with QTX based components is likewise easy. I spent over a year working on a standard that would be able to usurp and absorb frameworks and libraries from Delphi, Turbo Pascal, JavaScript and WebAssembly.

The entire system is package based, meaning that you can isolate your code in package-files (zip file is used as package containers). Just put a package in the packages folder, and the IDE installs the components on the component-palette. Then you can drag & drop them onto your forms.

Quartex Pascal has a form designer (window design) that is very powerful. Simply drag & drop the widget onto your form, position it, set properties using the property-inspector, and then you can access and manipulate that widget from your code. We already have over 100 visual components, with several developers creating more packages for it.

Why create a new development system just for this?

In short: Because there are few languages capable of doing what we need to make Amibian.js a success. Most languages are generic general purpose languages, designed to work with the systems that already exist. What I have planned does not exist yet, and requires a new type of code emitter than what is currently on the market. To use a silly parallell: Today’s software is two dimensional. I am adding a third dimension.

Amibian.js is a cluster oriented cloud platform, that scales from a Raspberry PI up to a 1000 node supercluster. You can install it on a cheap single board computer, but you can also install it on 10 monster PC’s and have Amibian.js make full use of all the resources they deliver in concert. This is done through applications that can replicate themselves either in full or in part. There is no system like this out there, and as such I needed better control over the compiler and code-generation aspect.

To give you an idea of what I am building:

Imagine you have a cluster of 5 Raspberry PI machines, all daisy chained together using a switch (a motherboard with 5 compute modules would be better, but this is just an example). How exactly can an application make use of all that computing power?

The logical solution is to split the program into parts, spreading the application across each machine in the cluster, making full use of available CPU cores. But this introduces significant problems, especially when it comes to synchronization and messages. How will 1/5th of your program talk to another 1/5th? Especially since it’s running technically on another machine?

The Ragnarok protocol editor is built-into the IDE itself, you can create as many protocols as you like, and the core amibian.js service takes care of message delegation. Ragnarok is also used on the desktop itself. Hosted applications running in a window are isolated for security reasons, but can talk to both the desktop and any parts running on the back-end (system level) through Ragnarok.

This is where the Ragnarok protocol comes into play, a special protocol system that allows applications within the cluster to talk, regardless of where in the cluster they might be.

This is why i chose JavaScript as the medium (a means to an end). Javascript can be easily shipped and moved around. It executes in a separate process that is subject to a security-context that is highly evolved at this stage. It can be paused, dropped, merged and easily be isolated in a container. It can do things that native code simply cannot achieve — and last but not least, it is hardware agnostic. All you need is a thin slice of Linux to house the essential infrastructure — and our system can happily rest on top, oblivious to the cpu type or chipset involved.

An older preview of Amibian.js. Not exactly shabby performance. Here running on the ODroid N2+ single board computer

I have already invested 5 years of my life to this work. I am sick and tired of watching the Amiga legacy be left to the whims of companies and individuals utterly unfit to manage it — so I decided to solve this once and for all, by re-implementing the system from scratch, bringing it kicking and screaming into this century. A modern system that solves modern challenges without destroying it’s gloruous legacy.

The computer that refuses to die

It still surprises me just how well the Amiga has aged. It is a fascinating operating system with features that was only recently added to MacOS and Windows. It was lightyears ahead of everything else, held back by dirt poor management and even worse advertising.

I will shortly continue my re-implementation of AmigaOS for cloud and NAS systems. A task that is best described as a love story, a labour of passion, a lasting meditation on a system that inspired millions of us to learn technology. Be it programming, music, art, authoring or simply problem solving. Learning to code is to learn how to think.

It is an absolute honor to be able to do this for a living, and building Quartex Pascal is probably the most intellectually satisfying project I have ever done. But even that pales in comparison to reimplementing AmigaOS.

Quartex Media Desktop (codename Amibian.js) a full re-implementation of AmigaOS for cloud, clusters and NAS systems. This is being implemented as closely to AmigaOS as possible (common sense not withstanding). This is a modern desktop system, not a mock “present” desktop. It is powered by 5 node.js / deno system services. This makes the system 100% hardware agnostic. All you need is a thin slice of Linux and a modern HTML5 webview, and you can boot straight into the desktop system.

There is so much emotion and personal memories invested in that system. I really become quite emotional just thinking about it.

That computer made an otherwise terrifying upbringing livable. It taught me how to solve problems, create music, paint and draw; it taught me English, mathematics; it gave me friends and a community where I belonged, spread over many nations and boundaries. And it was great company for an otherwise introverted teenager surrounded by violence, alcohol and drugs. A blank canvas where everything was possible and where thoughts became things. If you knew how to code, then nothing was impossible.

What an absolutely amazing creation the Amiga was. That thousands of people around the world still use it daily 40 years later, is a testament to it’s ingenuity.

Dead but now immortal

By modern standards the Commodore Amiga is an antique. But it’s overall architecture is so elegant, so expandable and so ingenious -that it somehow manage to adapt-to and assimilate modern technologies.

Somehow the Amiga has managed to assimilate new technology as it becomes available, mostly due to a highly creative and insightful user base. The Amiga demo scene alone is infamous.

Usb ports, Sata drives, Wi-fi networking, Hdmi displays, video and audio playback -it has almost become a statement of excellence for programmers to adapt new technologies to the Amiga. There is something about the restrictions of the old hardware that inspire people to think differently; to find new ways of achieving the same result. To deliver more with less.

You would imagine that super affordable single board computers such as the Raspberry PI would annihilate whatever miniscule market the Amiga still holds -but you would be wrong. The Amiga has completely absorbed the PI, turning it into an accelerator card. Usurping the power and computing and media capabilities of the ARM computer for it’s own needs.

I have often pondered why leading companies today ignores the genius of the Amiga, especially the operating system design. I mean, here is a system with a 4 megabyte footprint (the basic OS install of 4 floppies) that can operate -thrive even, with as little as 1 (one!) megabyte of memory; yet scale to a gigabyte of ram if need be. But a gigabyte of memory is an unbelievable amount of ram for an Amiga; far more than you can make use of. Applications are usually small and compact due to how 68k machinecode instructions are encoded.

A recipe that thrives on change

What makes this machine so tough to kill, so flexible and resilient to change, can be found in it’s operating system design. It’s driver architecture, how it deals with file-types, it’s path system, dos and shell integration, event and signal delegation -and last but not least, windowing system (intuition).

The way that kernel and library functions can be replaced at runtime, plays a huge role in why the Amiga survives. Allowing programmers to replace the behavior of system functions in a non-invasive way (patching, as in setpatch). Everything from the visual appearance of buttons and windows -to more important things like how memory is managed or how system errors are mitigated.

There is at the heart of all this, an architecture that has stood the test of time. And it has done so largely within the confines of the original hardware. Imagine that.

Developers today complain and lament at how Playstation and XBox haven’t been upgraded in four, six or eight years. Here is the Amiga who last saw a specification update in 1992 before it was discontinued in 1993 (A4000T did not introduce anything new, like AGA over ECS. It was more about putting existing technology in a new form-factor). Everything after that has been painstakingly created by an unbelievably creative and knowledgeable community.

If I was to write a software development curriculum for universities, the second year would include a dedicated study of the Amiga architecture. Especially it’s micro kernel and core libraries, as well as how Commodore implemented cooperative multi-tasking. There is so much to learn from the Commodore cookbook and recipes.

Cloanto dropped the ball 20 years ago

I remember when Java came out, listening to their ultra-hyped presentations that was everywhere back in the late 90s and early 2k’s. Bytecodes were pitched as a borderline magical solution. I laughed, they were just selling p-code under a new name. Granted, Java had a larger infrastructure, with classes, variables, scoped members and interfaces all known to the runtime -but ultimately it was tech we had almost two decades before.

Even more annoying, and partly why I detest Cloanto, was that -I knew Java would be a flop. There was no way in hell Java would work as an entire OS for mobile devices, what we today know as Android. And I was right. The purely Java based Android barely lasted a year, and they ended up pushing their NDK. Why? Because chewing complex and dense bytecodes such as Java eats a lot of cpu power – which drains the battery very quickly! You barely got a couple of hours out of the first generation of Android phones. They were useless.

Linus stating the obvious: Java is a terrible idea

But –a radical refactoring of UAE would have worked. I wrote a full proposal on how we could take a fork of uae, adapt it for mobile SoC’s, using bridge libraries (same as AGS600 now uses).

Just stop and think about this for a second.

Here was an operating system that uses 1/100th of the resources of other systems, with a wide spectrum of compilers and devtools already available (both inside the 68k environment and outside, such as LLVM, GCC and Freepascal to mention a few). A system that enjoys a well known instruction set -and (drumroll) sports an open source variation of Amiga OS ready for the picking (AROS). By simply looking at 68k as “bytecodes”, identical to dot-net CIL or Java bytecodes, the Amiga legacy could be molded and re-structured into a mobile system far superior to Android / Java. And stolen the momentum of both Java and .net in the process.

A thin layer of Linux, native libraries running on the ARM cpu but usable by the 68k software + a modified version of AROS — Cloanto could have spearheaded the future with the past. UAE would need heavy adaptation, and the old chipset stuff would have to be purged. More or less exactly what was done under Amithlon. Just RTG and 16 bit sound. Add touch capability, a fancy new UI suitable for mobile interaction – and you would have a fast, power efficient and safe runtime system beyond anything presently available. UAE would act more as a runner, an execution model, than an emulator. The distinction between runtime and emulation vanishes at this point.

Difficult? Yes, but nothing a small team of dedicated developers couldnt handle with 12 monhs of hard work. Succeeding where both Java and C# has failed.

Their reply? Silence. They were more interested in arguing over technological table-scraps and worthless chickenlips logos from a company long since resigned to history -than to cease the moment and build something fantastic.

ODroid Magazine back in 2019 ran a two page article on the Amibian.js prototype

Interestingly, I pitched the same idea many years later to Michal Schultz, who immediately recognized the oppertunity and created the PiStorm, the system that uses a Raspberry PI as an accelerator board for real Amiga machines. It was just a small shift in perspective that was needed, and new roads opened up. As the movie says: “Roads? Where we’re going, we dont need roads”.

I can’t wait to finish QTX so I can focus on the Quartex Media Desktop (amibian.js). And I will pour in everything I have. For better or for worse, it will be my life’s magnus opus.

Such a wonderful thing ❤️