Jump to content

Getting data to/from the X16


m00dawg
 Share

Recommended Posts

I can't remember why but as I recall there were some good reasons for dropping Serial UART from the Vera. I'm trying to remember this from a post on FB (though I no longer use FB so can't go reference it). Anyways! We had an interesting conversation on the Unofficial Discord about getting data to/from the X16. For development, having to constantly remove and insert the SD card might get old. And likewise, transferring files (like maybe tracker files, text files, etc.) to/from another machine could be convenient. This is especially true given SD cards aren't really meant for long-term storage - if you don't power them up every so often, particularly as wear due to writes, the data can be corrupted. This has happened to me a time or two with a Raspberry Pi I only use during Christmas (for a light show, of course!).

So, I'm trying to think aloud about what sort of options might be usable. Of course doing something with the User Port is an option, eventually I'd expect someone is going to implement a serial or even a NIC on an expansion card, then there's IEC Serial. The only serial work I've done is RS232 and I was pondering something like ADTPro where files can be copied over serial with the help of apps on both sides. That, of course, requires RS232 so currently isn't a viable option, though IEC serial presents a potential option, maybe, with using the IEC to Parallel interfaces on PC (I haven't used one in a de...err several years we'll say).

The thought of a Wifi-enabled SD card was tossed around too. I've never used one but that would be an option.

And then the user port might be able to be used for some sort of soft-serial type of solution?

Any other thoughts folks might have? Note, this isn't a dig on the design or lack of serial - this isn't a thread meant to wish for a UART on the X16 or anything. Not trying to be a jerk haha I just didn't want this thread to spiral into a wishlist thread as often happens many times (e.g. whenever someone mentions the word "sound").

I'm just trying to think aloud with the options we have currently and what might be possible or what other folks are thinking about as a potential solve?

Link to comment
Share on other sites

Ooo self reply fail! I forgot to include floppy. Using an IEC2PC cable, one could save files on floppy and copy stuff that way, though that's probably more hassle than pulling the SD card 🙂 But still a thought! And in fact I might opt to use a floppy to store text documents, both as a "for fun" and as a means to experiment around with organizing things by disk instead of by directory since that's one thing I miss in the days before we had massive storage. Keeping track of folders gets unwieldy before you know it. With floppies, you know things were getting out of hand when your storage box started overflowing!

Link to comment
Share on other sites

I’ve got a clever idea for getting data OFF of the X16: use VERA’s sound generator, and encode data as sound/noise.  

Or, use VERA to display custom multicolor QR-style data.  Take a picture of it and have offboard software decode it.

 

Its not very practical, but it might be fun.  I still aspire to write a paper tape reader for the X16.

 

Link to comment
Share on other sites

14 hours ago, rje said:

I’ve got a clever idea for getting data OFF of the X16: use VERA’s sound generator, and encode data as sound/noise.  

Or, use VERA to display custom multicolor QR-style data.  Take a picture of it and have offboard software decode it.

Oh wow that deserves some serious clever points! A bit like a cassette solution (the former). QR codes could work well for things like savegames I would imagine too! Very clever!

38 minutes ago, dr.diesel said:

Some kind of wifi card would be great.  Then we could develop tools to download content from this site, create BBSs and chat clients.  Globally reaching content directly from the X16 would really be fun.

That was discussed a few times on FB several months ago as I recall. I don't know if those convos are still happening but folks were wanting it. Given Lorin's thread about bus-matching, it may not be the most trivial thing to do. It's certainly currently out of my reach. He posits a solution to use microcontrollers, with caveats. If those caveats aren't show-stoppers, one could use perhaps a Wifi or XBee enabled Arduino as a sort of wireless serial solution. That's not "The Internet" but would enable comms with the help of another computer like a PC or Pi, etc. with serial or even perhaps other things like MQTT.

NICs were available for 8-bit machines and for things like the Arduino, so a real NIC for the X16 I think is surely possible but that's speculation on my part. Having that would allow for solutions like FTP perhaps to get things to/from the machine, yep. As well as telnet BBSing (something I am also excited about). Certainly something I would love to see but yeah I dunno enough to be able to build one 🙂 though I think I could muddle my way through figuring out a serial solution, maybe. Hopefully X16 gains enough interest that someone that knows a thing or two about NICs can consider that project in earnest. I'm sure it would be a popular card.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

There WILL be the User port available, with an entire VIA Port A and associated handshaking lines. So a slipnet with a parallel port driver on the CX16 side and a USB to parallel port cable connecting to the PC ought to give quite reasonable bandwidth, as in 500+ KB/s half-duplex.

I see those USB/DB25 cables on eBay for $8, free shipping. I bet I could get one made for the block pin header plus a USB female plug for about that in a batch order down in south Shenzhen, once Beijing goes back to tier 4 covid19 control, for those who want to have a USB port in the back of their CX16.

Edited by BruceMcF
Link to comment
Share on other sites

On 1/3/2021 at 10:06 AM, dr.diesel said:

Some kind of wifi card would be great.  Then we could develop tools to download content from this site, create BBSs and chat clients.  Globally reaching content directly from the X16 would really be fun.

Use I2C to talk to a connected Raspberry Pi Zero W...  I heard a rumor that the X16 has I2C, but I'm not sure...

 

Link to comment
Share on other sites

  • 1 month later...
5 hours ago, rje said:

I know there are two ADDITIONAL SNES controller pin headers on the board.  If one were bored, one might could design I/O with one of those... if the lines can be "written to", that is.

 

This is technically possible, but your caveat is that you won't be able to do this for arbitrary-sized payloads with the kernal, and you'll only be getting the data one bit at a time, and you'll be doing your own bit-banging to fetch each bit of data.

Link to comment
Share on other sites

  • Super Administrators
16 hours ago, rje said:

I know there are two ADDITIONAL SNES controller pin headers on the board.  If one were bored, one might could design I/O with one of those... if the lines can be "written to", that is.

... and they use a VIA, just like the User port. 

The User port has the same hardware available as the IEC port, the PS/2 ports, and the SNES ports. There's no reason to twist those to alternate uses when you can just use the User port, which is designed for just this purpose. 

A USB port on an Arduino can handle upwards of 1Mbps of data. We can push data through the User port to an Arduino Due, then to a PC via USB. It's not complicated; it will just take appropriate program code on both sides. 

 

Edited by TomXP411
Link to comment
Share on other sites

8 hours ago, TomXP411 said:

A USB port on an Arduino can handle upwards of 1Mbps of data. We can push data through the User port to an Arduino Due, then to a PC via USB. It's not complicated; it will just take appropriate program code on both sides. 

Just the way I like it.

Link to comment
Share on other sites

Why not just have Kevin create an Apple II style SuperSerial card and release it as a peripheral / add-on option for X16 after the fact.  Leave it permanently connected to a USB laptop.

Sell it as a through-hole kit for those that insist on building things (me) and supply a get-off-the-ground mouser cart.  If the QC / support / reputation of Commander X16 is best protected by selling the actual X16 as a WORKING computer, not a pile of parts, maybe this will satisfy DIY'er and hobbyists and risk of magic smoke will be all theirs (the otherwise satisfied funder/owner of a working X16).

I'm an armchair engineer so do not know enough about the internals of the kernel on the X16... I know the C64 and everything older than that cold... so I'm not sure if there is Apple II type architecture where ROM entry points may bank in from each card slot device??  Just a thought.

Ultimately, a card based peripheral that is a general communication bus with WiFI support might be handy and can do something as low tech as to push characters into the keyboard buffer like the aforementioned ADTPro.  It won't be as speedy but I'd gladly welcome a pier to pier protocol that included a command line and drop-box style interface on my MacBook (or on your Windows/Linux PC), with the Command listening versus jackassing an SD card.  I do this today with my Apple II+ and frankly, I've got about 3 projects stuck because I'm too lazy to sneaker net.  We are all spoiled.

 

Link to comment
Share on other sites

  • Super Administrators
8 minutes ago, EMwhite said:

Why not just have Kevin create an Apple II style SuperSerial card and release it as a peripheral / add-on option for X16 after the fact.  Leave it permanently connected to a USB laptop.

Sell it as a through-hole kit for those that insist on building things (me) and supply a get-off-the-ground mouser cart.  If the QC / support / reputation of Commander X16 is best protected by selling the actual X16 as a WORKING computer, not a pile of parts, maybe this will satisfy DIY'er and hobbyists and risk of magic smoke will be all theirs (the otherwise satisfied funder/owner of a working X16).

I'm an armchair engineer so do not know enough about the internals of the kernel on the X16... I know the C64 and everything older than that cold... so I'm not sure if there is Apple II type architecture where ROM entry points may bank in from each card slot device??  Just a thought.

Ultimately, a card based peripheral that is a general communication bus with WiFI support might be handy and can do something as low tech as to push characters into the keyboard buffer like the aforementioned ADTPro.  It won't be as speedy but I'd gladly welcome a pier to pier protocol that included a command line and drop-box style interface on my MacBook (or on your Windows/Linux PC), with the Command listening versus jackassing an SD card.  I do this today with my Apple II+ and frankly, I've got about 3 projects stuck because I'm too lazy to sneaker net.  We are all spoiled.

 

The question we all asked was... Why not put that $8 part right on the motherboard? 

The problem with any aftermarket solution is that there will be issues with availability, and unless uptake is VERY high, we will never likely see KERNAL support for it. So I'm at the point where I'd rather engineer my own solution (which is going to be faster than a 6551 ACIA anyway) and just write the code I need to make it happen.

 

  • Like 1
Link to comment
Share on other sites

3 hours ago, TomXP411 said:

The question we all asked was... Why not put that $8 part right on the motherboard? 

The problem with any aftermarket solution is that there will be issues with availability, and unless uptake is VERY high, we will never likely see KERNAL support for it. So I'm at the point where I'd rather engineer my own solution (which is going to be faster than a 6551 ACIA anyway) and just write the code I need to make it happen.

 

A middle ground might be to define the hardware interface/protocol for the communication device/card that could be supported by the KERNAL. That way anybody can make an aftermarket solution and all of them would be supported by the KERNAL. Seems like an interrupt and one of the 16 byte peripheral address spaces would be enough for a generic high speed communication interface that was agnostic to whether the card implemented WiFi, Ethernet, or RS-232.

Link to comment
Share on other sites

4 hours ago, TomXP411 said:

The question we all asked was... Why not put that $8 part right on the motherboard? 

The problem with any aftermarket solution is that there will be issues with availability, and unless uptake is VERY high, we will never likely see KERNAL support for it.

There is, however, Kernel support for installing device drivers that can use the numbered device API, so as long as an autostart program is an option, there doesn't have to be a lot of difference between hardware that has Kernel support and hardware that has loadable Kernel API drivers.

And of course, "it will push up the parts bill by $8, so increase the retail price by ~$20, but it will be easier, because Kernel support will be built in" translates for the design team as "here is something else that has to be finished before the board is ready to ship", so it really leans a lot on whomever will be doing the Kernel programming being really keen to have that chip on the board.

Link to comment
Share on other sites

  • Super Administrators
On 3/13/2021 at 7:37 PM, BruceMcF said:

And of course, "it will push up the parts bill by $8, so increase the retail price by ~$20, but it will be easier, because Kernel support will be built in" translates for the design team as "here is something else that has to be finished before the board is ready to ship", so it really leans a lot on whomever will be doing the Kernel programming being really keen to have that chip on the board.

And the flip side of that argument is...  there's no way a 6551 based expansion card will cost less than that, and someone has to write the drivers - whether before or after launch. 

  • Like 1
Link to comment
Share on other sites

Much like the original KIM-1 and Apple computers, it was BYO Cassette player; they did this to keep costs down release more quickly; of course cassette players were ubiquitous.  I just want this thing to be released and can wait for the next added do-dad and just buy it if I need it.  TexElec is so good at pumping out boards and cards for things, I'm pretty sure it can be released with an at-that-time code drop.  I'd rather pay $30-$40 after the fact and get the X16 sooner then wait for perfection with a serial port and 3 other scope-creep items.  Just me.

Link to comment
Share on other sites

3 hours ago, TomXP411 said:

And the flip side of that argument is...  there's no way a 6551 based expansion card will cost less than that, and someone has to write the drivers - whether before or after launch. 

Which gets to the expected market share. If the target for the 6551 is 20% or less of the audience, that's where the fact that it's cheaper for that 20% versus being no benefit to the other 80% comes down on the side of it being on an expansion card.

So would it be more like 60% or more like 20%?

USB Flash Drive sneakernet might be what a certain cluster want, and a Pi Pico, which can act as a USB Host (and which didn't exist back when this project started), would just need some voltage level shifting on a User Port daughterboard to offer that. If backup is the main target, then using the parallel port as an output and the hardware serial line as a clocked serial port input would give much faster throughput than the IEC. A micro-USB to go cable strung out from inside the case would be all that is needed to make the USB flash readily available toward the front of the system.

WiFI may be what a certain cluster wants, and while those who have multiple retro systems would get economies with a fast serial port to a WiFi modem approach, a PiModem on a User Port daughter board or expansion card might be a better solution for those who only have the CX16.

If its connecting to the PC, a EPP parallel port and compatible USB-Parallel adapter cable might be the easiest way to go.

In any event, it's obviously not my call, but I wouldn't want to bank on it being an add that is used by 60%+ of the audience benefiting from the dedicated serial chip approach over the bit bang serial or parallel port approach or microcontroller based approaches without having a strong market read to support that.

 

Link to comment
Share on other sites

...which gets us to Demographics.  8BG makes noises that rhyme with "ecosystem" and of course we're all adults and understand the multiple variables influencing adoption.  We could write a BASIC program that simulates it, out of whimsy.

At the surface, dropping an $8 part smacks of a Tramiel strategy.  But the argument is more subtle than that, because this is not a mass-market consumer device like the C64.

In short, it won't affect the primary adopters, who will tend to understand technology.  And we are capable, patient, thoughtful, argumentative, adult problem solvers. 

* * *

My prediction is that there will be more noise, and also more than one solution, worked on over the course of a decade or more, two of which will be viable but never get full adoption by the user base.  That's how these things work in this ecosystem.

* * *

I'd love to be proven wrong, but I suspect the easiest solution will win, or, if the cheapest solution gets close enough, then it could capture the flag.  For example, an IEC solution could be easy, could be cheap, or could be neither.

(Note: I've mentioned before how swapping in/out the VERA SD card is not something to be done casually on a regular basis.  In other words, in the long run, it's not cheap if you wear out the VERA card slot.)

 

Edited by rje
Link to comment
Share on other sites

4 hours ago, rje said:

 

(Note: I've mentioned before how swapping in/out the VERA SD card is not something to be done casually on a regular basis.  In other words, in the long run, it's not cheap if you wear out the VERA card slot.)

 

Ouch - I hadn't looked closely before but from stills on the most recent video, it looks like the SD card socket on VERA is an SMT standard sized SD socket. Replacing a damaged one is going to require a hot air rework station and have significant risk of lifting one or more pads. Anyone with a need to swap SD cards should consider also getting an SD extension cable. They're ugly as sin, but only a few dollars to replace.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 3/16/2021 at 11:19 PM, rje said:

I'd love to be proven wrong, but I suspect the easiest solution will win, or, if the cheapest solution gets close enough, then it could capture the flag.  For example, an IEC solution could be easy, could be cheap, or could be neither.

Seems to me like an EPP parallel port would be cheap enough and fast enough. All it really requires is sifting through the marketplace noise to have a parallel port to USB adapter that supports a register level parallel port driver. They exist, and they are cheap, but they exist alongside parallel port to USB port adapters that do NOT have register level parallel port drivers. That supports access to PCs for transport, access to PCs as emulated back up mass storage, access to microcontrollers that can host USB, and of course then that gives flash USB drives and WiFi.

Also seems like the cheapest expansion card that supports WiFi out of the box is going to get going. For a wireless connection, that can slide in under an EPP parallel port because while a parallel to USB adapter is a legacy adapter with massive economies of scale, it's still two parts to get the adapter and then the RPi 0-W or Banana Pi 0 or whatever to handle the wireless communication, so an integrated solution built onto a batch produced card has an opportunity to come in a notch cheaper.

Also, the cheaper solution that supports USB flash drive file movement seems likely to get going. With the $4 Pi Pico supporting USB hosting, it seems to be that a User Port Pi Pico hat could support IEC for plug and play start up of a Midnight Commander style utility that can move files between the SD card and a USB Flash drive.

The first approach gets cheaper if a dedicated RS-232C 115kpbs serial port is available, since you get a USB to serial adapter and don't have to have the connector to the User Port ... but that's not a reduction in full system cost, it's just cost shifting, in that the serial port chip and the serial connector is already included in the system price. An RS-232C hat for a Pi Pico versus a User Port hat ... in the second situation, the Pi Pico is nestled inside the case and only IEC and USB cables come out, so it can be a bare board, in the first case you'd want to have an enclosure in that ... the two hats would be roughly equivalent in cost otherwise, so the dedicate serial chip isn't even pulling the add-on cost down.

So its a "nice to have" -- and I certainly would be happy if it was there -- but I can see why it ended up getting knocked out not once, but twice (the 6551, and then the Vera based FIFO serial input buffer). When you add on top the people for whom the bit banged serial is "fast enough" and it would just be "nice" if it was faster, It seems likely to me that a substantial proportion of CX16 users wouldn't use the dedicated fast serial port if it was available, AND over 50% of uses of the dedicate fast serial port IF it WAS included can make do without it.

A lot of that comes down to VIA based User Port that has all of the A port and more of the B port than was available in the C64 CIA based User Port. So it was moving the banking registers off of the VIA's that opened up those User Port uses.

Edited by BruceMcF
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use