Compiling And Running Turbo Pascal In The Browser

When a friend of [Lawrence Kesteloot] found a stack of 3.5″ floppy disks, they found that it contained Turbo Pascal code which the two of them had worked on back in the Summer of 1989. Amidst reminiscing about the High School days and watching movies on VHS, [Lawrence] sought a way to bring these graphical applications once more back to life. Not finding an easy way to compile Turbo Pascal code on Mac even back in 2013 when he started the project, he ended up writing a Turbo Pascal compiler in JavaScript, as any reasonable person would do in this situation.

SPIDER.PAS in its full glory. (Credit: Lawrence Kesteloot)
SPIDER.PAS in its full glory. (Credit: Lawrence Kesteloot)

As noted by [Lawrence], the compiler doesn’t implement the full Turbo Pascal 5.5 language, but only the subset that was required to compile and run these applications which they had found on the floppy disks. These include ROSE.PAS and SPIDER.PAS along with three others, and can also be found in the GitHub repository. As can be seen in the online version of the compiler, it captures the feel of programming Pascal in 1989 on the command line.

Naturally, the software situation has changed somewhat over the last decade. We’ve recently seen some promising multi-platform Pascal compilers, and of course you could even run Turbo Pascal in DOSBox or similar. That might make this project seem irrelevant, but being able to write and run Pascal applications in more ways and on more platforms is never a bad thing.

Turbo Rascal Is The Retro Pascal Compiler We Always Wanted

Pascal is not one of the biggest programming languages these days; it’s fallen into the background as the world moved on to newfangled things like C#, Python and Java. However, the language has its fans, one of whom put together a new compiler which targets retro platforms – and it goes by the name Turbo Rascal.

The list of supported platforms is extensive, with Turbo Rascal able to compile highly-optimized binaries for the C64, Amiga 500, BBC Micro, IBM PC, Atari ST, Game Boy, Amstrad, NES, ZX Spectrum, and more. There’s a usable IDE and even an included graphics editor for getting projects put together quickly. Also known by its full name of Turbo Rascal Syntax Error, or TRSE, it’s the work of one [Nicolaas Groeneboom].

The compiler runs on 64-bit Windows, Linux, and OS X, and there are extensive tutorial videos available on YouTube, too. Thus, there’s no excuse not to start developing a new retro game immediately. Check out the demo video below, and remember – as long as we keep using it, Pascal isn’t dead!

Continue reading “Turbo Rascal Is The Retro Pascal Compiler We Always Wanted”

Apple Gets CP/M

In case you wanted to run WordStar on your Mac, [Tom Harte] offers CP/M for OS/X, and it looks like it would be a lot of fun. Of course you might be happier running Zork or Turbo Pascal, and you can do that, too.

There are plenty of Z80 emulators that can run CP/M, but what we found most interesting about this one is that it is written in Objective C, a language with a deep history in the Mac and NeXT worlds.

Continue reading “Apple Gets CP/M”

Laptop Like It’s 1979 With A 16-Core Z80 On An FPGA

When life hands you a ridiculously expensive and massively powerful FPGA dev board, your first reaction may not be to build a 16-core Z80 laptop with it. If it’s not, perhaps you should examine your priorities, because that’s what [Chris Fenton] did, with the result being the wonderfully impractical “ZedRipper.”

Our first impression is that we’ve got to start hanging around a better class of lab, because [Chris] came by this $6000 FPGA board as the result of a lab cleanout; the best we ever scored was a few old Cat-5 cables and some power strips. The Stratix FPGA formed the heart of the design, surrounded by a few breakout boards for the 10.1″ VGA display and the keyboard, which was salvaged from an old PS/2. The 16 Z80 cores running in the FPGA are connected by a ring-topology network, which [Chris] dubs the “Z-Ring”. One of the Z80 cores, the server core, runs CP/M 2.2 and a file server called CP/NET, while the other fifteen machines are clients that run CP/NOS. A simple window manager shows 80 x 25 character terminal sessions for the server and any three of the clients at once, and the whole thing, including a LiPo battery pack, fits into a laser-cut plywood case. It’s retro, it’s modern, it’s overkill, and we absolutely love it.

Reading over [Chris]’s build log puts us in the mood to break out our 2019 Superconference badge and try spinning up a Z80 of our own. If you decide to hack the FPGA-est of conference badges, you might want to check out what [Sprite_TM] has to say about it. After all, he designed it. And you’ll certainly want to look at some of the awesome badge hacks we saw at Supercon.

Thanks to [yNos] for the tip.

Orbital Mechanics On A Vintage Kaypro

These days, a good proxy for hacking prowess is getting Doom playable on the oldest piece of hardware imaginable. While we respect and applaud these efforts, perhaps the bar should be set a bit higher. Like orbital mechanics on an early 80s Kaypro, perhaps?

At least that’s the hurdle [Chris Fenton] set for himself as a fun project for his spare time with his Kaypro 2/84, a vintage Z80 clocking in at a screaming 4 MHz and 64-kB of RAM. With its built-in 80×25, 9″ green phosphor CRT monitor and flip-top keyboard, the Kaypro fit into that loveable luggable category of machines and predated IBM’s and Apple’s market dominance by a few years. The CP/M operating system has actually aged pretty well — but well enough to port [Chris]’ Deep Dish Nine, a graphical game written for the Arduboy that uses Kerbal-like orbital mechanics skills to deliver interplanetary pizzas? In the first instance, no — the game, ported to Turbo Pascal, only managed fractional frames per second, rendering it unplayable. But with some very clever coding, [Chris] was able to improve refresh rates 10-fold. The optimization road not taken includes hardware hacks, like overclocking the Z80 or even replacing it with an FPGA and emulator, but that’s hardly keeping with the spirit of the thing.

It’s always great to see vintage machines pushing the envelope. A great place to see them is one of the Vintage Computer Fairs, like the upcoming VCF Southeast in Georgia. We were at the one diagonally across the country a few weeks back, and they’re well worth the trip.

Taking Pictures With A DRAM Chip

 

DRAM Image

This picture was taken by using a DRAM chip as an image sensor (translated). A decapped 64k DRAM chip was combined with optics that could focus an image onto the die. By reading data out of the DRAM, the image could be constructed.

DRAM is the type of RAM you find on the RAM cards inserted into your motherboard. It consists of a massive array of capacitors and transistors. Each bit requires one transistor and one capacitor, which is quite efficient. The downside is that the memory needs to be refreshed periodically to prevent the capacitors from discharging.

Exposing the capacitor to light causes it to discharge faster. Once it has discharged past a certain threshold, the bit will flip from one to zero. To take a picture, ones are written to every bit in the DRAM array. By timing how long it takes a bit to flip from one to zero, the amount of light exposure can be determined. Since the DRAM is laid out in an array, each bit can be treated as a pixel to reconstruct the image.

Sure, modern CCDs are better, cheaper, and faster, but this hack is a neat way to totally re-purpose a chip. There’s even Turbo Pascal source if you’d like to recreate the project.

Thanks to [svofski] for the tip.