Gripe of the day!


So I’m still, in between tinkering with FPGAs, trying to settle upon a Linux distro for desktop use. I still keep coming back to Mint Mate edition despite the annoyances I’ve found with the latest version, and having installed both an SSD and some extra RAM in the machine I’m about to migrate to, I figured I’d better run some tests. The Ubuntu (and thus Mint) live install contains Memtest86+ so I booted from USB, selected the test and watched the machine lock up half way through the very first test.

Odd, since the machine actually runs just fine…

It turns out the version of Memtest86+ in the current Ubuntu LTS is completely and horribly broken.

The solution to my problem was to install memtest86+ using apt, then remove it again. The removal doesn’t remove the meta files, so provided there’s an image of the correct name in /boot it remains in the grub menu. Therefore, one can download a non-broken binary, copy it to /boot, run grub-update and *now* the RAM test actually works.

One side-effect, however, is that the grub setup installed by the USB live system when installing Linux is somewhat different from what you get when you subsequently run grub-update from the installed-and-running system – I had to edit some config files to get the menu back..

How many angels…

… can dance on the head of a pin?

I have no idea – but I do know how many ZPUFlex processors will fit in a DE1 dev board: 25!  [Edit: I’ve since managed to squeeze in another one – so 26!]

OK, I’m stretching things a little to claim that 25 fully-featured ZPUFlex CPUs will fit on the DE1, because these have a really tiny ROM and very minimal supporting logic, so Quartus can optimise the hell out of the design – but it still seemed like a fun demo.

Source, as always, can be found on GitHub.

[EDIT: The M4K memory blocks on the DE1’s Cyclone II support 32-bit data width, but not in full dual-port mode, where the data width is limited to 16-bit.  This means that no matter how small the ZPU’s ROM/StackRAM, it will occupy a minimum of 2 M4Ks.  If it weren’t for this fact, I think the DE1 could take 3 further ZPUs.  As it is, it’s possible to add just one more instance of the ZPU, and the code on github now reflects this.  The record for the maxmium number of soft CPUs in a single project on the DE1 board is now 26.  Unless you know diffferent!]

Configuring ZPUFlex

In the few months since I started playing around with the zpu_small core, expanding it into what ultimately became ZPUFlex, my variant of the CPU has gone from being an interesting experiment to something that might actually see some usefulness in other projects.

ZPUFlex was intended from the outset to be configurable and flexible, but this comes at the cost of complexity, and there are a number of competing factors to consider when configuring the CPU.  The following is an attempt to document some of the choices that must be made when using ZPUFlex.

Continue reading

Gotek Floppy Emulator Revisited

The circuit I cobbled together a few weeks ago to add sound support to the Gotek floppy emulator worked up to a point, but it was ugly as hell, and suffered from occasional stray oscillations.  H.M. – the mastermind behind the new Amiga-compatible firmware for the Gotek unit – suggested using a MOSFET instead of the BJTs, and since I’m still shaky on the use of transistors it seemed like a good opportunity to learn.

Continue reading

Gotek Floppy Drive emulator

There are various devices on the market which can emulate a floppy drive using disk images on a flash device of some kind.  The best known of these is probably the HxC Floppy Emulator but there’s also a cheaper product, the Gotek floppy emulator.

Until recently the Gotek was no use with the Amiga, since it couldn’t cope with the Amiga’s unusual encoding scheme – all that changed a few weeks ago, however, when Hervé Messinger released a new firmware for the Gotek unit, written from scratch, which provides robust support for Amiga ADF images.

Needless to say, I couldn’t resist buying one of these to play with, and while the flashing process is a bit finicky, once it’s done the drive works well.  I did find the complete silence from the drive a little disconcerting, however, so set out to modify the drive to provide some kind of audible feedback.  Here’s the result:

I did this simply by wiring a couple of transistors to the “Step” signal on the floppy interface, which trigger a piezo sounder.

There are a couple of subtleties to take care of:

In my first attempt I placed the sounder between +12v and the collector of a transistor.  This doesn’t work because a piezo sounder has a very high impedance and appears to the rest of the circuit like a small capacitor.  Thus, when the transistor is activated, the sounder charges, but when the transistor deactivates the sounder is effectively open circuit, so nothing happens to the charge stored within.  Instead, the transistor needs to be in parallel with the sounder, so that it discharges the charge stored in the sounder when activated, and allows fresh charge to build up when deactivated.

The other problem is that the step signal on the floppy interface is a very brief low pulse, with a specified minimum width of 1µs.  In practice it’s quite a bit wider than that, but still very brief compared with the storage time of a typical bipolar junction transistor.  What this means is that the transistor triggered by the Step pulse has to be a fast switching type with a very low storage time.

The next generation of Retro fans?

My nieces visited today – and spent a very happy hour playing two of my old favourite games – Pang and Lotus II. Both games went down extremely well with the girls despite being released about 10 years before they were born! While I still find a lot of fun in classic games, it’s encouraging to see that they’re enjoyable even to the iPad generation.

I was rather amused, however, that they were playing such ancient games on brand new, 2013 hardware: For Pang we used Majsta’s prototype Vampire 500 board, while we ran Lotus II on one of Till Harbaum’s prototype MIST boards!