HP Forums
Software Defined Peripherals - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not remotely HP Calculators (/forum-9.html)
+--- Thread: Software Defined Peripherals (/thread-13329.html)

Software Defined Peripherals - mfleming - 07-24-2019 05:59 PM

I happened across an interesting project on Hackaday.io recently that really piqued my interest. I thought I'd post some information about it for those DIY hardware hackers among us who might also be intrigued. The author of the project refers to it as a Software Defined Computer, but to me that means something like simh emulating an Altair 8800 or PDP-8. What the author has done is quite different.

The author started with a legacy microprocessor, in his case an Intel 8085 and a Motorola 68000. For each he then added a modern 32-bit ARM SoC from the STM32 family. The 5V tolerant digital I/O pins of the STM32 are connected to the legacy processor. A program in the STM32 reads the address, status and data lines and responds as though it were memory and peripherals attached to the processor. In the case of the 8085 he emulated memory, a serial interface peripheral, and a programmable timer. The 68000 included the above and a diskette interface emulation so it could run CP/M-68k.

The STM32 can operate in full emulation mode or can be stopped and act as a hardware monitor. Memory can be read or written, disassembled, or hex files can be loaded into memory. The 8085 implementation included two virtual COM devices, one for the emulator and the other for the processor serial device being emulated. Both projects were implemented on a PCB the size of a socket for the legacy microprocessor, and with the STM32 circuitry on the bottom side. All quite impressive! Here are links to the projects.



The author provided schematics for both projects but little else. Nothing at all on the software side. I've seen projects where people have built CP/M systems using old legacy parts (or implemented them in an FPGA) but never something quite like this. Implementation calls to mind an RTOS with tasks for emulated devices and interrupt service routines to manage the legacy processor interaction.

I pulled a Teensy 3.5 board from my "toy box" to play around with the idea. It has a Freescale (now NXP) K64 with an ARM Cortex-M4 running at 120 MHz, overclocking to 168 MHz. Timing tests seem to indicate I can run a 6800 at its full 1 MHz speed, generating the clock and accessing the processor lines in 300 ns of the 1000 ns cycle time.

I'm really thinking about taking on a project like this myself. There are still plenty of legacy processors out there, and the software that used to run on them can still be found. I guess it would also give me something new to collect besides calculators Smile

Check out the project!

RE: Software Defined Peripherals - atilla457 - 12-25-2019 02:12 AM

Hi Mark,

I haven't been on hpmuseum for awhile, due to a newborn but saw your message now.

I'm working on a similar project using Arduino Mega. So far I completed hw+sw support for 7 processors (6502, 6809, Z80, 1802, 8031, 8085, 2650). I'm slowly doing it for the rest as I can get my hands on chips.

This is my project website. All hw+sw is open source.

If you haven't started already, I strongly suggest you do it too. It's very educational. I got to experience 1802 and 2650. I'm now working on Signetics HD6120.

Thanks for the links. I added them to my bookmarks.

Happy Holidays

RE: Software Defined Peripherals - mfleming - 12-25-2019 07:30 PM

Hi Erturk,

Congratulations on the new family addition! That's a project that will keep you busy for some time Smile

Quite impressive what you've done using the Arduino Mega! I'm adding some of your references to my own bookmark list. I'd be especially interested if you manage a Flex/09 port since that was one of my eventual goals when playing around with this retro system support idea. I don't have a Mega myself, but I'm highly tempted to give it a try, paired with one of your boards.

I've done the low level timing code on a Teensy 3.5, STM32F446 dev board, and I'm now looking into an NXP LPCXpresso55S69 dev board with support for FreeRTOS, USB VCOMs, and USB mass storage devices. I'm not so happy with the low emulation clock speed, 500 KHz at best, so I'm thinking of including external RAM in the next exploratory iteration and let the modern CPU just monitor the bus for I/O access.

If you're looking for another old chip to experiment with, consider the W65C816S from The Western Design Center. It was used in the Apple IIgs and Super Nintendo. Looks like a 6502 but turns into a 16-bit super-6502 with a 16MB address space by toggling a control bit. You can even get a few dev boards based on the 65C02 and 65C816 on Amazon or Tindie (something on my New Years resolution list).

Thanks for posting!

RE: Software Defined Peripherals - Druzyek - 12-25-2019 09:20 PM

Cool projects! Thanks for the links.

I did something similar with a 65C02 and STM32 board with RAM, ROM, two LCDs, and keyboard input simulated on my PC. It's a great way to learn how all the signals work before jumping into building a full system. I got a four function RPN stack going with simple keystroke programming and graphing:


RE: Software Defined Peripherals - atilla457 - 12-28-2019 09:33 PM

All I can say is Great minds think alike Smile Nice job w/ 6502 calculator. All bookmarked.

If you are into VGA and keyboards, this Arduino shield might be interesting (I don't have any relationship to the seller). I use it to emulate commodore 64 BASIC using Arduino+6502, a PS/2 keyboard and a monitor.


Enjoy the holidays