vossstef / tang_nano_20k_c64

Commodore C64 core for the Tang Nano 20K Primer 25K and Mega 138K Pro FPGA
GNU General Public License v3.0
64 stars 11 forks source link

Feature suggestion: serial over spare I/O #83

Closed SanguineBrah closed 3 weeks ago

SanguineBrah commented 1 month ago

The RS-232 over USB works well, but I have found that its usefulness is limited because it requires a host device on the other end, which means it is only good for a null modem link with a PC.

If it is possible to put this out on spare I/O pins instead, we could connect it through a MAX3232 for a standard serial port, wire up an FTDI adapter module for USB connection or wire a header for an ESP-01 wifi module for onboard wireless telnet using the zimodem firmware.

harbaum commented 1 month ago

For telnet there's actually a way nicer solution. The latest firmware runs on the pi pico-w and the esp32 as well and these have wifi built-in.

This is not released yet, but I am using these with the Atari st core to redirect rs232 via wifi so I can dial via Internet into BBS' that way. This gives quite a retro networking experience.

vossstef commented 3 weeks ago

@SanguineBrah i added an option for hw uart pin interface . Do you want to test it ?

SanguineBrah commented 3 weeks ago

@SanguineBrah i added an option for hw uart pin interface . Do you want to test it ?

That's great! I'll take a look at it tomorrow.

SanguineBrah commented 3 weeks ago

I have done some testing using CCGMS with the RX & TX wired up to a Wemos D1 Mini with wifi modem firmware. Everything works as expected. I am able to reach up to 2400 baud without dropping any characters in either UP9600 or Vicmodem modes - to reliably go faster, we would probably need flow control, which would use up two more spare I/O pins (it is arguable whether that would be worth it).

I was not able to get the Swiftlink modes to send any data but I am not familiar with that device so I may be missing something there.

Edit: after playing with the turbo modes, I have been able to reach 9600 baud reliably using UP9600.

vossstef commented 3 weeks ago

hi @SanguineBrah, nice to hear ! Did you tested on TN20k ? Do you think it's good enough for merge ? Any nasty side effects seen?

Swiftlink i din't implemented yet. There are a lot of preparations in the core and OSD already but didn't found time to debug and fix the last bit.

SanguineBrah commented 3 weeks ago

Yes, I tested on 20k as I don't own any of the others. I haven't seen any side effects or stability issues so I think it should be okay to merge if the other models are also working the same way as this.

vossstef commented 3 weeks ago

Yes, I tested on 20k as I don't own any of the others. I haven't seen any side effects or stability issues so I think it should be okay to merge if the other models are also working the same way as this.

ok then will merge and create a draft release for easier use. Still need to consult @harbaum to agree pinmap for TN25k/TM138k PMOD. share.

harbaum commented 3 weeks ago

The pin sharing sounds fine to me. I should have broken out the unused pin on the pmod adapter ...

vossstef commented 3 weeks ago

@SanguineBrah i created a pre-release and dropped the bitstreams readme is also updated