When we think of programmable hardware, we think of FPGAs. But they’re not the only option. [Oliver Schmidt] has been exploring how the Raspberry Pi Pico can serve in such a role for the classic Apple II. The talk was presented at the KansasFest event this year, and it’s well worth diving into!
[Oliver] has developed A2Pico. It’s a series of Apple II peripheral cards that are based around the Raspberry Pi Pico, as you might have guessed. [Oliver] has been working in the area since 2021 with one [Glenn Jones], with the duo experimenting with connecting the versatile microcontroller directly to the slot bus of the Apple II. [Ralle Palaveev] then chimed in, developing the A2Pico hardware with solely through-hole components for ease of assembly.
A number of cards have been developed based on A2Pico, including a storage device, a Z80 CP/M card, and a specialized card to play Bad Apple on the IIGS. It’s all thanks to the versatility of the programmable I/O (PIO) peripheral inside the Raspberry Pi Pico. This device enables the Pico to be reprogrammed to handle all sorts of complicated tasks at great speed. This is particularly useful when using it to bit-bang a protocol or talk with another machine, and it serves perfectly well in this role. Basically, by reprogramming the Pico and its PIO, the A2Pico design can become any one of a number of different add-on cards.
It’s well worth diving into this stuff if you’ve ever contemplated building your own peripheral cards for 8-bit and 16-bit machines. We’ve seen some other great add-on cards for vintage machines before, too.
See also the neo6502, which is a minimal modern retrocomputer which is essentially a 6502 glued to a RP2040. The RP2040 bit-bangs the 6502’s address and data buses and emulates ROM, RAM and peripherals. There are various firmware payloads for it: it’ll emulate an Apple II or an Oric, someone’s working on a Commodore 64 payload, and there’s Morpheus, a native firmware package which runs the 6502 at 6MHz and gives you ‘hardware’ support for a FAT filesystem, graphics with sprites and tilemaps, sound, etc.
Also, it runs CP/M-65! https://www.olimex.com/Products/Retro-Computers/Neo6502/open-source-hardware
Why not just emulate the 6502 on the Pico?
The Graham Sanderson’s implementation of the B-Em BBC Micro emulator that runs on a Pico does just that.
https://github.com/kilograham/b-em
Because then the pico is free to be video, sound, USB i/o peripheral.
See also picocomputer rp6502:
https://www.youtube.com/playlist?list=PLvCRDUYedILfHDoD57Yj8BAXNmNJLVM2r
Yes it is possible. have a look at https://github.com/vsladkov/reload-emulator/tree/main
This Apple //e emulation works fine on the NEO6502 but also on a Pico without extra 65C02.
Oh Interesting. Been trying to do something similar to that for a while, but with a Teensy4.1, Relying on its high speed, peripherals and how one entire port of 16-pins are exposed to outpace the 6502. Guess that wielding the PIO and dual-core nature of the Pico can also get the job done.
Really ought to wok on that project again. Been a while.
A perfect case study for emulating hardware using software skills. “Writing” peripherals works great if the host’s bus timing is slow enough, which for the Apple ][ family, the answer seems to be yes.
One source of headaches is controlling “jitter” on bus handshaking signals, a situation that doesn’t exist when those lines are driven and read by hardware. Interrupt routines need to be carefully designed to not “steal” too many cycles.
That is not the only one. There is for example a plug in replacement for the C64 SID chip based on a RP2040. https://github.com/frntc/SIDKick-pico
Also there is a VGA card for the Apple ][ based on the rp2040.