84 Pin PLCC socket accepts Xilinx XC9572-PC84 or XC95108-PC84 CPLDs

IO voltage switchable between 5V and 3V3 (5V tolerant)

On board 3V3 regulator with option to use external 3V3 supply

50 way MX4 Compatible CPC connector

12 way Digilent PMOD compatible connector

40 way RaspberryPi Compatible connector

Time to announce a new project which has reached the prototype stage: Z80Tube - bringing the Acorn BBC Micro Second Processors to the Amstrad CPC.As you may know, the Acorn BBC Microcomputer series slightly predates the CPC464 but both the original and updated models were sold in parallel for many years. Unusually, the BBC micro was originally designed as a front-end terminal (the Proton) servicing a more powerful co-processor rather than as a complete computer in its own right. When the Proton was re-purposed as the BBC Micro it retained the hardware interface - the Tube - to an external co-processor board. The tube interface is basically a subset of the 6502 bus signals with a dedicated connector on the computer coupled with Acorn's own Tube IC (a Ferranti ULA) sitting on this bus in each of the external coprocessor cards. The Tube IC implements multiple FIFO buffers in both directions for data transfer between host and client (aka parasite) CPUs.Back in the day many different co-processors were available for the BBC. There were high speed 6502s, a Z80 opening up the world of CP/M, the NS16032 (aka 32016!) for super-computing, the 80186 for running DOS and later even the original ARM processor itself was first implemented as second processor card. These second processor modules are hard to find today and some are still relatively unaffordable, but that doesn't matter because now we have the most excellent PiTubeDirect project instead.PiTubeDirect is a bare metal code project which provides pretty much all of the original second processors running at much higher speeds than the original for just the cost of a RaspberryPi. The 6502 second processor runs at around 350MHz on an RPI 3A+ , but even the humble £5 Pi Zero can run rings around any of the original processors. The compelling feature of PiTubeDirect is that the Pi not only emulates the second processor, it also emulates the Tube IC and its physical interface. By bit-banging out the 6502 bus protocol on its GPIO pins in real-time the Pi can be physically plugged into the Tube interface of a real BBC micro with just an inexpensive level shifter to deal with the electrical interface. It is to all intents and purposes a direct hardware replacement for any and all of the original second processor modules, and indeed the PiTubeDirect project provides new CPU emulations which were never previously available including our own OPC Series RISC processors We want to bring these Acorn second processor modules to the Amstrad, both in their original form and the PiTubeDirect implementation.The job is in two parts - a hardware interface to let us plug the co-processor boards into the CPC and then some host software running on the CPC to service all of the second processor's operating system requirements.At this point in the project we have a working hardware interface and some very basic (actually BASIC) host processor code.The interface card was designed for this application but it has a number of features which make it reconfigurable to be useful for future projects.The key features areIt could be configured as a simple CPC-GPIO card for control applications.It could also be configured as a generic CPC-RaspberryPi bridge card with FIFO logic and level shifting inside the CPLD. allowing a RaspberryPi running a standard Linux to provide mass storage, networking or other features to a CPC.Those and other ideas are all for later, or for other developers maybe.For the Z80Tube application the CPLD is programmed to provide a very simple on-the-fly translation from the CPC's Z80 bus to the Tube's 6502 bus, with a little remapping of the addresses to place the Tube registers at some convenient location in the CPC IO address space. That's not anything second processor specific in itself - you could use the card in this configuration just to hang any 6502 family peripherals on the back of the CPC but that's all we need to connect to a second processor card. And on the host computer side of things, the card is only CPC specific because of the MX4 connector and the address mapping - a minor change in the address mapping code and a different connector would let the card bring those second processor modules to MSX, Spectrum, Memotech and other Z80 computers too.Since the PiTubeDirect is the most readily available second processor implementation the 40 way connector has been arranged so that a RaspberryPi will plug in directly (and can be firmly mounted on the back with screws); the CPLD deals with all the electrical level shifting as well as the bus protocol. A real Acorn cheese wedge will work too but needs a cable adapter to re-organise the pins a bit.The CPLD code for the Z80-6502 translation is relatively simple and in fact was up and running in our very first hardware debug session.The software for this project is the more challenging part. The second processor is expecting the host to service all keyboard, screen, disk and IO routines and to deal with all command line input as if it were in an Acorn BBC Micro. As it happens the Amstrad CPC provides very similar capabilities to the Acorn machine - the same CRTC, similar video modes, similar firmware organisation and so on. Some OS calls can be mapped directly; others will need a bit more adaptation. We've only just started looking at this but already we have enough code to boot the OPC7 Second Processor into its monitor program, run commands to dump and disassemble memory and load and run simple OPC7 test programs from CPC disks.Currently we're prototyping the host software in Locomotive BASIC. This is quite a fun retro-computing environment, but it's not fast. When we've got a reference version of the host software up and running a port to C (SDCC) or BCPL or just directly to assembler is on the cards.So that's where we are at the moment: hardware working well and proof of concept level of software. Some photos attached show the hardware card and some screenshots of the OPC7 monitor program running and calculating of Pi and E to very many digits (very quickly) using the co-processor.As usual the entire project is open source, licensed under the GPL3 and hosted on GitHub: https://github.com/revaldinho/z80tube If you are interested in getting hold of a card, either to follow or contribute to the development of the Tube host software or to use it for other purposes - there is another thread here asking specifically about CPC-RaspberryPi bridge cards for example - then get in touch. I have a few PCBs from the initial batch which I can build up but I would need to get hold of some more CPLDs for which there is a lead time of a few weeks.Rev. (with thanks to @biged and Stardot.org.uk's Hoglet for helping get this project off the ground and lots of technical input particularly on the host software side of things)