OPC-5 coprocessing with 6502

A project log for OPC-5 - a CPU for FPGA, in one page

A 16-bit CPU, with 16 registers, described in 66 lines of code - with HDL, emulators and a macro assembler.

Ed SEd S 07/27/2017 at 09:050 Comments

How to show off and use our OPC-5 CPU? We need I/O! A filesystem... Acorn's BBC Micro is powered by a 2MHz 6502 and has 32k RAM and 32k ROM - but there's much more to it than that. There's a simple bus extension called The Tube and some facility in the OS to allow the Beeb to act as a front-end processor to almost any other kind of CPU - especially useful for a faster CPU with more RAM.

With a small OS handler on the 'parasite' machine it can use the I/O facilities of the Beeb as a 'host' machine - which means we get keyboard, screen, filesystem, serial I/O as well as a handy 5V power supply. Here's the OPC-5 running as such a parasite on a small single layered PCB by hoglet:

We had two splendid software updates from hoglet: first, a port of the small OS needed by a second processor, from 6502 assembly ro OPC-5 assembly, which enabled the above setup. Second, an emulator of the OPC-5 in C - not quite single-page density, but readily compressible into 88 lines - which allow anyone with a Pi-based coprocessor to have a go with the OPC-5, even if they don't have an FPGA. (The Pi-based coprocessor offers a host of different CPU models, including a 274MHz 6502 with a megabyte of RAM!)