6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 3:43 pm

All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Sep 05, 2021 1:57 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
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


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 05, 2021 2:36 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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?)


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 05, 2021 2:47 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
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/comments/eo7q7b/working_65c0265c22_emulator_binary_compatible/

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-MCL65-6502-Accelerator-Board?highlight=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_errata/tree/main/6551-ACIA

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

Jon


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 05, 2021 3:03 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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?


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 05, 2021 3:23 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 06, 2021 3:12 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
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?)


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 06, 2021 3:53 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
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


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 06, 2021 3:54 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Well that certainly sets a deadline for dealing with each access!


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 07, 2021 12:32 am 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
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


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 07, 2021 7:09 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
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/


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 09, 2021 4:14 am 
Offline

Joined: Sat Dec 30, 2017 3:19 pm
Posts: 116
Location: Detroit, Michigan, USA
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 09, 2021 8:43 am 
Offline

Joined: Tue Jan 23, 2018 2:55 pm
Posts: 43
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 09, 2021 12:07 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 375
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


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 11, 2021 12:01 am 
Offline

Joined: Sat Dec 30, 2017 3:19 pm
Posts: 116
Location: Detroit, Michigan, USA
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.


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 11, 2021 7:27 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
> ...someone already having done the work of building a 6502 bus interface for the Pico...

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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: