65c51 or 6551 ACIA microcontroller or SoC Emulators?

Let's talk about anything related to the 6502 microprocessor.
Jmstein7
Posts: 379
Joined: 30 May 2021

65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by Jmstein7 »

I'm wondering if anyone knows of any microcontroller (PIC18F or 16F, Arduino, ESP32, Teensy, etc.) projects out there that can emulate a 65c51 or 6551 ACIA? I'm doing projects at 3.3v, so my standard WDC 65c51s won't work (5V only).

I've searched, but I'm not turning up anything that fits the bill, e.g., one of the projects I found for teensy requires all the Address lines(?). That's not going to happen. Control signals, Data Lines, and register select, i.e. That's all I can do.

Thanks!

Jon
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by BigEd »

Can you share some of the links you did find? (I don't know why all the address lines might need to be available, but surely you could tie most of them off?)
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by Jmstein7 »

BigEd wrote:
Can you share some of the links you did find? (I don't know why all the address lines might need to be available, but surely you could tie most of them off?)
Sure:

https://github.com/olivierjan/6502-SBC-using-Teensy

https://github.com/c0pperdragon/6502ino

https://www.reddit.com/r/beneater/comme ... ompatible/

https://github.com/halfburnttoast/nano_6502_controller

https://github.com/chanmix51/soft65c02

https://github.com/olivierjan/6551-emulation-with-PIC

https://forum.pjrc.com/threads/65755-MC ... ight=65c02

These have, or link to, various elements with 6551 or 65c51 functionality.

And, one vhdl implementation that I can't get to work (the TX works but the RX does not):

https://github.com/jmstein7/65c02_errat ... /6551-ACIA

Dave and I worked on that; but, it only seems to work with "soft" 65c02s.

Jon
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by BigEd »

Thanks! I like the look of Olivier Jan's - that's not much more than a dozen lines of code. It's minimal, so we see this comment:
// We simply ignore the case where we receive config /Control/Reset byte for ACIA.

But is that OK for you? Is sending and receiving enough?
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by Jmstein7 »

BigEd wrote:
Thanks! I like the look of Olivier Jan's - that's not much more than a dozen lines of code. It's minimal, so we see this comment:
// We simply ignore the case where we receive config /Control/Reset byte for ACIA.

But is that OK for you? Is sending and receiving enough?
It would be very nice, but I'm working with the newer Teensy 4.0s and 4.1s. To recode it from his 3.6 code would be a bit much for my skill level - the pin banks (which he is addressing directly) are quite different. Also, for the 4.0 and 4.1, it would be great to be able to employ the FlexIO and DMA channels. But, for that, I don't even have a starting point.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by BigEd »

Although I do have a Teensy, I've never used it, so I can't be much help.

Just to note another possible choice: the Raspberry Pi Pico board, or the RP2040 microcontroller which it's based on. I'm pretty sure it could do the job: Dominic P has ported PiTubeDirect to it, which involves bit-banging an interface on a 2MHz 6502 bus. (I assume you won't be running your bus faster than that?)
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by Jmstein7 »

BigEd wrote:
Although I do have a Teensy, I've never used it, so I can't be much help.

Just to note another possible choice: the Raspberry Pi Pico board, or the RP2040 microcontroller which it's based on. I'm pretty sure it could do the job: Dominic P has ported PiTubeDirect to it, which involves bit-banging an interface on a 2MHz 6502 bus. (I assume you won't be running your bus faster than that?)
Surprisingly, I’m chugging away at a blistering 6mhz. :D
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by BigEd »

Well that certainly sets a deadline for dealing with each access!
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by Jmstein7 »

BigEd wrote:
Well that certainly sets a deadline for dealing with each access!
Well, you know, the microcontrollers under discussion here are all plenty fast. J
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by drogon »

Jmstein7 wrote:
BigEd wrote:
Well that certainly sets a deadline for dealing with each access!
Well, you know, the microcontrollers under discussion here are all plenty fast. J
It's not just overall speed - often there are architectural limitations on just how fast a program can access the GPIO pins/ports and even then you have to detect the correct edge, run code, accept (or present) parallel data, all inside a timeframe measured in single digit (or less) nanoseconds.

-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
jmthompson
Posts: 127
Joined: 30 Dec 2017
Location: Detroit, Michigan, USA
Contact:

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by jmthompson »

I've actually been toying with the idea of trying to implement an ACIA on a Raspberry Pi Pico. It would be primarily for a little side project of mine, a clone Apple Super Serial Card that I designed, but never got working due to what I am pretty sure are just crappy ACIAs from eBay. So far though though it hasn't left the thought experiment stage.
gbm
Posts: 43
Joined: 23 Jan 2018

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by gbm »

Looks like a perfect idea for an RPI Pico project: the microprogrammable I/O should easily handle the 6502 bus even at 8 MHz or more, and the emulated 6551 could interface to a PC via RPi Pico USB using VCOM.
Jmstein7
Posts: 379
Joined: 30 May 2021

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by Jmstein7 »

jmthompson wrote:
I've actually been toying with the idea of trying to implement an ACIA on a Raspberry Pi Pico. It would be primarily for a little side project of mine, a clone Apple Super Serial Card that I designed, but never got working due to what I am pretty sure are just crappy ACIAs from eBay. So far though though it hasn't left the thought experiment stage.
What a great idea - I've never seen one (in all my searching)! That would be a very popular thing if you got it to work.

Jon
jmthompson
Posts: 127
Joined: 30 Dec 2017
Location: Detroit, Michigan, USA
Contact:

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by jmthompson »

Jmstein7 wrote:
jmthompson wrote:
I've actually been toying with the idea of trying to implement an ACIA on a Raspberry Pi Pico. It would be primarily for a little side project of mine, a clone Apple Super Serial Card that I designed, but never got working due to what I am pretty sure are just crappy ACIAs from eBay. So far though though it hasn't left the thought experiment stage.
What a great idea - I've never seen one (in all my searching)! That would be a very popular thing if you got it to work.

Jon
I had originally put this on the backburner since I didn't think there'd be any interest outside of me using this to make cheap SSC clones, but I had never considered the use case of people wanting to put ACIAs in 3.3V systems.

I've got some free time this weekend, and already picked up two picos a while back, so I can start messing around with this. I'm positive I saw a post a while back about someone already having done the work of building a 6502 bus interface for the Pico, so really all that will be needed here is to implement the ACIA itself as a wrapper around the Pico's built-in UART.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Post by BigEd »

> ...someone already having done the work of building a 6502 bus interface for the Pico...

Maybe Dominic's project?
https://github.com/dp111/PicoTube
Post Reply