What's the state of play with serial port support?

Chat about anything CX16 related that doesn't fit elsewhere
BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

What's the state of play with serial port support?

Post by BruceMcF »



1 hour ago, Cyber said:




I loved this driverless approach in the past, despite it being primitive and obsolete in modern world. And I'm happy that X16 brings back this experience.



Quite. Installing drivers into the Kernel API is entirely optional. That is a bit of a shift in mindset to get used to for people who came up after drivers became mandatory to get any hardware to work on a system.

In thinking the process of installing drivers into the Kernel API through, it can be a little hard coming up with a lot of examples of things I would want to handle that way. I can see wanting to have drivers for a serial card, if I happened to have one, and maybe if a parallel port interface to a PC is designed to emulate a drive. I'm not sure how many more I would want to have installed. So maybe one or two.

kelli217
Posts: 521
Joined: Sun Jul 05, 2020 11:27 pm

What's the state of play with serial port support?

Post by kelli217 »


I remember when application programs had to handle support for different hardware on their own. ?

Word processors came with a disk of printer drivers, games on the PC asked you what kind of video card you had. Nothing was taken for granted, and there was no standard driver interface.

I am not at all opposed to a terminal program asking me whether I have a SuperLink, a MondoSerial TL, a 68B50RS232 Junior, or the native hardware, and then adjusting its capabilities and menu options accordingly.

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

What's the state of play with serial port support?

Post by rje »


I think as long as I/O isn't too difficult to figure out then I can write my own transfer programs.

For me, the tricky part is with the electronics.  I would need to connect GPIO pins on the X16 to the GPIO pins on a Raspberry Pi Zero.  Assuming I didn't fry either board in doing that, then I think I'd be ok. 

Maybe.

 

Lorin Millsap
Posts: 193
Joined: Wed Apr 29, 2020 6:46 pm

What's the state of play with serial port support?

Post by Lorin Millsap »

I think as long as I/O isn't too difficult to figure out then I can write my own transfer programs.
For me, the tricky part is with the electronics.  I would need to connect GPIO pins on the X16 to the GPIO pins on a Raspberry Pi Zero.  Assuming I didn't fry either board in doing that, then I think I'd be ok. 
Maybe.
 

If the Pi has 5v tolerant IO it will work directly. If they are 3.3v only then you will need to use transceivers to shift the voltage.


Sent from my iPhone using Tapatalk
TomXP411
Posts: 1761
Joined: Tue May 19, 2020 8:49 pm

What's the state of play with serial port support?

Post by TomXP411 »



30 minutes ago, Lorin Millsap said:






If the Pi has 5v tolerant IO it will work directly. If they are 3.3v only then you will need to use transceivers to shift the voltage.





Sent from my iPhone using Tapatalk



The Pi's GPIO pins are NOT 5v tolerant. You will need a level shifter. 

You can use a level shifter hat, like this one:

https://www.tindie.com/products/chris_wag/rpi-level-shifter-hat/



 

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

What's the state of play with serial port support?

Post by rje »


Yes, I figured I can't just connect these two critters pin-to-pin.  Even on the Pi it's not recommended (read: dangerous).  Thanks for the level shifter link, Tom!

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

What's the state of play with serial port support?

Post by rje »


Lorin says:


Quote




Ok. So just to sum up where the RS232 serial (not to be confused with the IEC serial) is at, it is implemented as part of the user port and is implemented via one of the 65c22 chips. A lot of that is not set in stone as the routines haven’t been written yet. But that is the functional RS232 serial on the main board.



I/O Use cases:


  1. Loading a file from a modern computer into X16 RAM somewhere.



    • The Burrito Principle* suggests that ideally this is a single-step operation.


    • The existing RS-232 connection could be suited for this.




  2. Saving data somewhere on the X16 to a file for later reference.


    • RS-232 and IEC devices are two ways to fill this niche.




  3. Streaming data off of the X16 to an output channel thing.


    • Fun and interesting.




  4. Streaming data into the X16 somehow.


    • Fun and interesting.




Sounds like we're talking about the #3 and #4 there.  Are we targeting a particular solution?

* 80% of the meat is in 20% of the burrito.  My way of co-opting the Pareto Principle.

By "single-step operation", I mean ideally you could load a file, off of a connected modern computer, to the X16 with:

LOAD "MYFILE.PRG",2       :rem or whatever device #

and

LOAD "MYDATA.BIN",2,1,$A000

and of course

DOS"$",2


iljitsch
Posts: 25
Joined: Thu May 27, 2021 4:38 pm

What's the state of play with serial port support?

Post by iljitsch »


Hi all, my first post there, I thought I'd just jump in.

There's a bunch of usecases for a communications port. One would be to use remote storage. Not sure if that is very compelling with the on-board and pretty much infinitely big SD card. Another use is to get stuff on and off the X16, like a download. But also: direct communication, such as logging in to a BBS, or multiuser gaming.

For all of those except for using a remote file server a serial port would work really well.

A serial port is also simple enough that less experienced programmers can work with it.

That also applies on the modern computer side: either those still have a serial port or usually one can be added without having to install a driver (which is getting harder every year on MacOS...), and interfacing with the serial port can be entirely done by a "userland" program without special privileges. So it would be easy to write software for Windows, Linux, MacOS that will transfer files back and forth with the X16, and/or make network connections on behalf of the X16.

So it's really too bad that a serial port isn't included in the current X16 design. I expect that as the X16 gets out in the world, the lack of a way to interface with the rest of the world will be a big bottleneck, something that you don't really notice with the emulator.

Lorin Millsap
Posts: 193
Joined: Wed Apr 29, 2020 6:46 pm

What's the state of play with serial port support?

Post by Lorin Millsap »

Hi all, my first post there, I thought I'd just jump in.
There's a bunch of usecases for a communications port. One would be to use remote storage. Not sure if that is very compelling with the on-board and pretty much infinitely big SD card. Another use is to get stuff on and off the X16, like a download. But also: direct communication, such as logging in to a BBS, or multiuser gaming.
For all of those except for using a remote file server a serial port would work really well.
A serial port is also simple enough that less experienced programmers can work with it.
That also applies on the modern computer side: either those still have a serial port or usually one can be added without having to install a driver (which is getting harder every year on MacOS...), and interfacing with the serial port can be entirely done by a "userland" program without special privileges. So it would be easy to write software for Windows, Linux, MacOS that will transfer files back and forth with the X16, and/or make network connections on behalf of the X16.
So it's really too bad that a serial port isn't included in the current X16 design. I expect that as the X16 gets out in the world, the lack of a way to interface with the rest of the world will be a big bottleneck, something that you don't really notice with the emulator.

A user port certainly is a serial port. What we aren’t including is a UART or a modem which would allow faster transfers. The user port could also certainly be used as a parallel transfer instead of serial, so with the right interface you could still get respectable speeds.


Sent from my iPhone using Tapatalk
ZeroByte
Posts: 714
Joined: Wed Feb 10, 2021 2:40 pm

What's the state of play with serial port support?

Post by ZeroByte »


Yaknow, a user port device that presents  the X16 file system as a USB stick would be cool. Run a bridging application on the X16 and then just drag and drop files on your PC.

Post Reply