Comparing X86 And 68000 In An FPGA

[Michael Kohn] started programming on the Motorola 68000 architecture and then, for work reasons, moved over to the Intel x86 and was not exactly pleased by the latter chip’s perceived shortcomings. In the ’80s, the 68000 was a very popular chip, powering everything from personal computers to arcade machines, and looking at its architecture and ease of programming, you can see why this was.

Fast-forward a few years, and [Michael] decided to implement both cores in an FPGA to compare real applications, you know, for science. As an extra bonus, he also compares the performance of a minimal RISC-V implementation on the same hardware, taken from an earlier RISC-V project (which you should also check out !)

Utilizing their ‘Java Grinder’ application (also pretty awesome, especially the retro console support), a simple Mandelbrot fractal generator was used as a non-trivial workload to produce binaries for each architecture, and the result was timed. Unsurprisingly, for CISC architectures, the 68000 and x86 code sizes were practically identical and significantly smaller than the equivalent RISC-V. Still, looking at the execution times, the 68000 beat the x86 hands down, with the newer RISC-V speeding along to take pole position. [Michael] admits that these implementations are minimal, with no pipelining, so they could be sped up a little.

Also, it’s not a totally fair race. As you’ll note from the RISC-V implementation, there was a custom RISC-V instruction implemented to perform the Mandelbrot generator’s iterator. This computes the complex operation Z = Z2 + C, which, as fellow fractal nerds will know, is where a Mandelbrot generator spends nearly all the compute time. We suspect that’s the real reason RISC-V came out on top.

If actual hardware is more your cup of tea, you could build a minimal 68k system pretty easily, provided you can find the chips. The current ubiquitous x86 architecture, as odd as it started out, is here to stay for the foreseeable future, so you’d just better get comfortable with it!

Continue reading “Comparing X86 And 68000 In An FPGA”

Using Kick Assembler And VS Code To Write C64 Assembler

YouTuber [My Developer Thoughts], a self-confessed middle-aged Software Developer, clearly has a real soft spot for the 6502-based 8-bit era machines such as the Commodore 64 and the VIC-20, for which he has created several video tutorials while travelling through retro-computing. This latest instalment concerns bringing up the toolchain for using the Kick Assembler with VS Code to target the C64, initially via the VICE emulator.

The video offers a comprehensive tutorial on setting up the toolchain on Windows from scratch with minimal knowledge. While some may consider this level of guidance unnecessary, it is extremely helpful for those who wish to get started with a few examples quickly and don’t have the time to go through multiple manuals and Wikis. In that regard, the video does an excellent job.

VS Code is a great tool with a large user base, so it’s not surprising that there’s a plugin for using the Kick Assembler directly from the IDE. You can also easily launch the application onto the emulator with just a push of a button, allowing you to focus on learning and working on your application. Once it runs under emulation, there’s a learning curve for running it on native hardware, but there are plenty of tutorials available for that. While you could code directly on the C64 itself, it’s much more pleasant to use modern tools, revision control, and all the conveniences and not have to endure the challenges.

Once you’ve mastered assembly, it may be time to move on to C or even C++. The Oscar64 compiler is a good choice for that. Next, you may want to show off your new skills on the retro demo scene. Here’s a neat C64 demo with a twist. There is no C64.

Continue reading “Using Kick Assembler And VS Code To Write C64 Assembler”

The Amiga We All Wanted In 1993

To be an Amiga fan during the dying days of the hardware platform back in the mid 1990s was to have a bleak existence indeed. Commodore had squandered what was to us the best computer ever with dismal marketing and a series of machines that were essentially just repackaged versions of the original. Where was a PCI Amiga with fast processors, we cried!

Now, thirty years too late, here’s [Jason Neus] with just the machine we wanted, in the shape of an ATX form factor Amiga motherboard with those all-important PCI slots and USB for keyboard and mouse.

What would have been unthinkable in the ’90s comes courtesy of an original or ECS Amiga chipset for the Amiga functions, and an FPGA and microcontroller for PCI and USB respectively. Meanwhile there’s also a PC floppy drive controller, based on work from [Ian Steadman]. The processor and RAM lives on a daughter card, and both 68040 and 68060 processors are supported.

Here in 2024 of course this is still a 1990s spec board, and misty-eyed speculation about what might have happened aside, it’s unlikely to become your daily driver. But that may not be the point, instead we should evaluate it for what it is. Implementing a PCI bus, even a 1990s one, is not without its challenges, and we’re impressed with the achievement.

If you’re interested in Amiga post-mortems, here’s a slightly different take.

Inside A Mystery Aerospace Computer With [Ken Shirriff]

When life hands you a mysterious bit of vintage avionics, your best bet to identifying it might just be to get it in front of the biggest bunch of hardware hounds on the planet. After doing a teardown and some of your own investigation first, of course.

The literal black box in question came into [Ken Shirriff]’s custody courtesy of [David] from Usagi Electric, better known for his vacuum tube computer builds and his loving restoration of a Centurion minicomputer. The unit bears little in the way of identifying markings, but [Ken] was able to glean a little by inspecting the exterior. The keypad is a big giveaway; its chunky buttons seem optimized for use with the gloved hands of a pressure suit, and the ordinal compass points hint at a navigational function. The layout of the keypad is similar to the Apollo DSKY, which might make it a NASA artifact. Possibly contradicting all of that is the oddball but very cool electromechanical display, which uses reels of digits and a stepper-like motor to drive them.

Inside, more mysteries — and more clues — await. Unlike a recent flight computer [Ken] looked at, most of the guts are strictly electronic. The instrument is absolutely stuffed with PCBs, most of which are four-layer boards. Date codes on the hundreds of chips all seem to be in the 1967 range, dating the unit to the late 60s or early 70s. The weirdest bit is the core memory buried deep inside the stacks of logic and analog boards. [Ken] found 20 planes with the core, hinting at a 20-bit processor.

In the end, [Ken] was unable to come to any firm conclusion as to what this thing is, who made it, or what its purpose was. We doubt that his analysis will end there, though, and we look forward to the reverse engineering effort on this piece of retro magic.

CH32V003 Makes For Dirt Cheap RISC-V Computer

These days, when most folks think of a computer they imagine a machine with multiple CPUs, several gigabytes of RAM, and a few terabytes of non-volatile storage for good measure. With such modern expectations, it can be difficult to see something like a microcontroller as little more than a toy. But if said MCU has a keyboard, is hooked up to a display, and lets you run basic productivity and development software, doesn’t that qualify it as a computer? It certainly would have in the 1980s.

With that in mind, [Olimex] has teased the RVPC, which they’re calling the “world lowest cost Open Source Hardware All-in-one educational RISC-V computer” (say that three times fast). The tiny board features the SOIC-8 variant of the CH32V003 and…well, not a whole lot else. You’ve got a handful of passives, a buzzer, an LED, and the connectors for a PS/2 keyboard, a power supply, and a VGA display. The idea is to offer this as a beginner’s soldering kit in the future, so most most of the components are through-hole.

On the software side, the post references things like the ch32v003fun development stack, and the PicoRVD programmer as examples of open source tools that can get your CH32V computer up and running. There’s even a selection of retro-style games out there that would be playable on the platform. But what [Olimex] really has their eye on is a port of VMON, a RISC-V monitor program.

When paired with the 320×200 VGA text mode that they figure the hardware is capable of, you’ve got yourself the makings of an educational tool that would be great for learning assembly and playing around with bare metal programming.

It might not have the timeless style of the Voja4, but at least you can fit it in a normal sized pocket.

Thanks to [PPJ] for the tip.

Walking Through A Scene From Riven On The Apple II

Twenty years before the 1997 release of Riven – Cyan’s sequel to the critically acclaimed title Myst – a fruity company in California released the Apple II, a 6502-based microcomputer that would be produced until 1993. With the upcoming remake by Cyan of Riven into a fully 3D experience, [deater] found themselves wondering how much of the original game’s click-and-puzzle game would fit on a 140 kB floppy for the Apple II series of computers. Since Myst was able to be squeezed  onto a mere three floppies and provide a reasonably playable version of the game on the Apple II, surely the same could be done for this sequel?

The Maglev in the Apple II port of Riven. (Credit: [deater])
The Maglev in the Apple II port of Riven. (Credit: [deater])
Just a look at the system requirements for Riven (Win95+, 100 MHz Pentium, 16 MB RAM and 75 MB disk space) and the knowledge that the game came on five CD-ROMs (until the DVD release) should instill some trepidation that a serious demake would be needed. Ultimately [deater] managed to set the system requirements for the port to any Apple II with at least 48 kB of RAM. The same custom game engine as for the Myst port is used, with the original CG stills downsampled and the movies rotoscoped at fairly low framerate.

Although the ‘Disk 39’ in the video is currently the sole floppy, containing part of Dome Island and the Maglev, it is probably a fair assessment of how many 140 kB disks would be needed to port the entire game. Even with the downsampled graphics, [deater] reckons it would take on the order of hundreds of floppies to fit the whole thing.

Continue reading “Walking Through A Scene From Riven On The Apple II”

The 6809 Lives On In An FPGA

At one point, the Motorola 6809 seemed like a great CPU. At the time it was a modern 8-bit CPU and was capable of hosting position-independent code and re-entrant code. Sure, it was pricey back in 1981 (about four times the price of a Z80), but it did boast many features. However, the price probably prevented it from being in more computers. There were a handful, including the Radio Shack Color Computer, but for the most part, the cheaper Z80 and the even cheaper 6502 ruled the roost. Thanks to the [turbo9team], however, you can now host one of these CPUs — maybe even a better version — in an FPGA using Verilog.

The CPU may be old-fashioned on the outside, but inside, it is a pipeline architecture with a standard Wishbone bus to incorporate other cores to add peripherals. The GitHub page explains that while the 6809 is technically CISC, it’s so simple that it’s possible to translate to a RISC-like architecture internally. There are also a few enhanced instructions not present on the 6809.

In addition to the source code, you’ll find a thesis and some presentations about the CPU in the repository. While the 6809 might not be the most modern choice, it has the advantage of having plenty of development tools available and is easy enough to learn. Code for the 6800 should run on it, too.

Even using through-hole parts, you can make a 6809 computer fit in a tiny space.You can also break out a breadboard.