Does anyone know how to talk to a memory stick?
-
lw@zi wrote:
I talk to it sometimes. Something along these lines: "Just get in to the slot you little..."
Has it ever responded with, "wrong way - flip me over"?
-
Wow, that's better than I expected. But your little 8bit monster can't keep up with that unless your clocking is insane haha. I ran a 56k baud modem in an old XT once just for grins (one of the rare ones that was small ISA) and the poor thing couldn't even operate at 33.6 :laugh:
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
No, it will not, despite going with a (then) ridiculous clock frequency of up to 6.4 MHz and, as one of the earliest CMOS processors, being famous for reckless overclocking decades before such things came into fashion on PCs. I just leave it to the UART's RTS/CTS signals to take care that not a single bit is lost and let the processor pick up the bytes as fast as it can. I can live with getting 'only' 100%. :-)
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
-
No, it will not, despite going with a (then) ridiculous clock frequency of up to 6.4 MHz and, as one of the earliest CMOS processors, being famous for reckless overclocking decades before such things came into fashion on PCs. I just leave it to the UART's RTS/CTS signals to take care that not a single bit is lost and let the processor pick up the bytes as fast as it can. I can live with getting 'only' 100%. :-)
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
forgive me if i missed it somewhere, but which CPU are you using? 6502 holds a special place in my black little 8 bit heart.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
-
Memory sticks use the USB protocol, which is available at [www.usb.org](http://www.usb.org). The higher-level software protocol is typically USB attached SCSI (UAS), available from the same place. I don't know what protocol is used for mice, keyboards, or hubs, but I'm sure that you can find it on the site as well.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
yup, and AIUI it's a fairly complex protocol to implement properly; you can't just bitbang it via a simple GPIO pin on a microcontroller. To bridge a retroPC to a USb stick what you probably would need to do is to have an RPi/etc that speaks both RS232 (or that can bit-bang whatever retro-protocol that the target computer expects to get its IO on) and USB; and then write an application on it that can translate from USB to retro IO.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
Whatever you do, during the conversation, don't mention it's size. Memory sticks hate that. Also, avoid the question "Does my capacity look big in this USB port?" It's a trick question that can never be answered to the memory stick's satisfaction.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013That's not the worst. Memory sticks never forget any of your mistakes and also store the exact date and time of every (non)event. Just forget any one of them and you suddently must sleep on your couch or in the dog house.
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
-
Quote:
"wrong way - flip me over"?
I had a girlfriend say that to me once, long, long ago.
- I would love to change the world, but they won’t give me the source code.
If this were not the place it is, I would now ask you by which coordinate axis you flipped her over and if that was the right choice.
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
-
yup, and AIUI it's a fairly complex protocol to implement properly; you can't just bitbang it via a simple GPIO pin on a microcontroller. To bridge a retroPC to a USb stick what you probably would need to do is to have an RPi/etc that speaks both RS232 (or that can bit-bang whatever retro-protocol that the target computer expects to get its IO on) and USB; and then write an application on it that can translate from USB to retro IO.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
Dan Neely wrote:
To bridge a retroPC to a USb stick what you probably would need to do is to have an RPi/etc that speaks both RS232 (or that can bit-bang whatever retro-protocol that the target computer expects to get its IO on) and USB; and then write an application on it that can translate from USB to retro IO.
Look at the adapter module that I posted the link to. It's actually intended to be used with a Raspy. The conversion magic is done in the lonely chip on the small board. On one side you have the USB port and on the other side you have the four signals for a UART plus ground, at TTL/CMOS levels and not shifted to RS232 levels. That should work with any UART, 8 bit computer or not. Provided that works as advertised, the big question is what I will have to send over my UART and what response I will get. Maybe I should look for some Raspy users to tell me what they use the adapter for and how they access the USB devices with it.
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
-
I mean the low level protocol, not some framework, API or driver. In my ongoing quest to interface modern devices to very old 8 bit computers I have stumbled over this: DEBO USB TTL: Raspberry Pi -USB-TTL-Schnittstellenwandler, CH340G bei reichelt elektronik[^] Not really rocket science. With this I can send and receive bytes from a USB device with a simple UART. This would solve a few problems at once. A simple cheap memory stick would be all the hard disk' an 8 bit computer would ever need. Don't worry about speed. Mass storage is for many reasons a relatively slow affair on 8 bit computers, beginning with their low bandwith on the bus. Remember what Commodore did with the C64's floppy drives? I could also use a USB keyboard or a mouse. So, with that converter and a UART I can now talk to USB devices. Can I also hook up a USB hub to it and access several USB devices over the same UART? How do I select devices? How do I request or send bytes? Some kind of USB protocol with an embedded device specific protocol?
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
Forgive me, but how exactly do you think that USB interface device will help you? That interface device functions as a USB client. What you need is a device that can function as a USB host. The memory stick would be the client and the host device is what would talk to it and relay the information to your 8-bit.
The difficult we do right away... ...the impossible takes slightly longer.
-
Forgive me, but how exactly do you think that USB interface device will help you? That interface device functions as a USB client. What you need is a device that can function as a USB host. The memory stick would be the client and the host device is what would talk to it and relay the information to your 8-bit.
The difficult we do right away... ...the impossible takes slightly longer.
Thanks. I had to find the datasheet of the chip on the adapter to finally find out what it is for. Like you say, the USB side goes to a PC, which then is the host and the UART side of the adapter goes to a client that only has a UART and can then act as a USB client. It would have been too easy. Back to plan B then. PS/2 for keyboard and mouse, serial ATA to access compact flash memory cards.
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
-
I mean the low level protocol, not some framework, API or driver. In my ongoing quest to interface modern devices to very old 8 bit computers I have stumbled over this: DEBO USB TTL: Raspberry Pi -USB-TTL-Schnittstellenwandler, CH340G bei reichelt elektronik[^] Not really rocket science. With this I can send and receive bytes from a USB device with a simple UART. This would solve a few problems at once. A simple cheap memory stick would be all the hard disk' an 8 bit computer would ever need. Don't worry about speed. Mass storage is for many reasons a relatively slow affair on 8 bit computers, beginning with their low bandwith on the bus. Remember what Commodore did with the C64's floppy drives? I could also use a USB keyboard or a mouse. So, with that converter and a UART I can now talk to USB devices. Can I also hook up a USB hub to it and access several USB devices over the same UART? How do I select devices? How do I request or send bytes? Some kind of USB protocol with an embedded device specific protocol?
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
[USBlyzer - USB Protocol Analyzer and USB Traffic Sniffer for Windows](https://www.usblyzer.com)
-
I mean the low level protocol, not some framework, API or driver. In my ongoing quest to interface modern devices to very old 8 bit computers I have stumbled over this: DEBO USB TTL: Raspberry Pi -USB-TTL-Schnittstellenwandler, CH340G bei reichelt elektronik[^] Not really rocket science. With this I can send and receive bytes from a USB device with a simple UART. This would solve a few problems at once. A simple cheap memory stick would be all the hard disk' an 8 bit computer would ever need. Don't worry about speed. Mass storage is for many reasons a relatively slow affair on 8 bit computers, beginning with their low bandwith on the bus. Remember what Commodore did with the C64's floppy drives? I could also use a USB keyboard or a mouse. So, with that converter and a UART I can now talk to USB devices. Can I also hook up a USB hub to it and access several USB devices over the same UART? How do I select devices? How do I request or send bytes? Some kind of USB protocol with an embedded device specific protocol?
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
The device in the link is something very different than what you are looking for. Remember that USB has devices with Master role; tose are usally the hosts that initate and manage all the comunication on the bus. Then there are Slave devices that respond to master's requests and send out data in an orderly manner, when instructed to do so. The device you are referring is of the latter type; it can only reply to a host requests and it can't talk to other USB devices. What you want to implement is a master node. As you may have understood, the master has very complex tasks to accomplish, since the USB bus is a Plug 'n play thing. One of the first things the master has to do is to enumerate the devices that are on the bus, and it has to do it dynamically, since a device can be added at any time. Then it has to manage the configuration of the device (if needed) and then set up the comunication. Things gets soon very complicated even for a simple comunication with a mass storage. In this case, after the USB 'low level' protocol, you will have to deal also with the "Mass storage" layer. All I remember is that on the Microchip knowledge base there was some application note with a very simple implementation of basic usb protocol master made to be run on a their smallest microcontrollers, but i regret to say that I don't have any link to it anymore. Whatever you do, it will be a huge work, and probably lot of fun ;-). Good luck !
-
The device in the link is something very different than what you are looking for. Remember that USB has devices with Master role; tose are usally the hosts that initate and manage all the comunication on the bus. Then there are Slave devices that respond to master's requests and send out data in an orderly manner, when instructed to do so. The device you are referring is of the latter type; it can only reply to a host requests and it can't talk to other USB devices. What you want to implement is a master node. As you may have understood, the master has very complex tasks to accomplish, since the USB bus is a Plug 'n play thing. One of the first things the master has to do is to enumerate the devices that are on the bus, and it has to do it dynamically, since a device can be added at any time. Then it has to manage the configuration of the device (if needed) and then set up the comunication. Things gets soon very complicated even for a simple comunication with a mass storage. In this case, after the USB 'low level' protocol, you will have to deal also with the "Mass storage" layer. All I remember is that on the Microchip knowledge base there was some application note with a very simple implementation of basic usb protocol master made to be run on a their smallest microcontrollers, but i regret to say that I don't have any link to it anymore. Whatever you do, it will be a huge work, and probably lot of fun ;-). Good luck !
If the idea of the project is to prove that you can do it on that aged CPU, just for fun, I guess you'll have to do the big work of implementing a USB host. If you have a problem that requires a solution, one way or the other, you could use one of the tinier Arduions as a relay: Your old CPU talk through an RS232 interface to an Arduino that acts as a USB host through e.g. The Arduino USB Host Shield[^], forwarding the data to the USB devices. Making the two boards cooperate is a nice challenge as well: You will have to do some protocol development to synchronize activities under two quite different OSes. Not too hard, but well above what you would give as a homework assignment to a freshman CS student. I am sure that there are similar Raspberry Pi solutions, but Pi solutions tend to be more ambitious, larger, more expensive. Arduino solutions are often more limited, but much simpler to handle if all you need is a very simple solution. If you are a soldering iron person: That Arduino web page refers to the MAX3421E[^] chip on the shield. You may of course try to get hold of one of those and add to your setup, avoiding the complexities of an Arduino. You can probably pick up a lot of useful info from the Documentation tab on the Arduino page (such as the diagram for the shield).
-
I mean the low level protocol, not some framework, API or driver. In my ongoing quest to interface modern devices to very old 8 bit computers I have stumbled over this: DEBO USB TTL: Raspberry Pi -USB-TTL-Schnittstellenwandler, CH340G bei reichelt elektronik[^] Not really rocket science. With this I can send and receive bytes from a USB device with a simple UART. This would solve a few problems at once. A simple cheap memory stick would be all the hard disk' an 8 bit computer would ever need. Don't worry about speed. Mass storage is for many reasons a relatively slow affair on 8 bit computers, beginning with their low bandwith on the bus. Remember what Commodore did with the C64's floppy drives? I could also use a USB keyboard or a mouse. So, with that converter and a UART I can now talk to USB devices. Can I also hook up a USB hub to it and access several USB devices over the same UART? How do I select devices? How do I request or send bytes? Some kind of USB protocol with an embedded device specific protocol?
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
CodeWraith wrote:
Remember what Commodore did with the C64's floppy drives?
I had a TRS-80 Model 100, along with the external floppy drive. The drive used RS-232 at a whopping 19.2K baud to talk to the drive, which held an amazing 100K.
Software Zen:
delete this;
-
lw@zi wrote:
I talk to it sometimes. Something along these lines: "Just get in to the slot you little..."
Has it ever responded with, "wrong way - flip me over"?
-
I mean the low level protocol, not some framework, API or driver. In my ongoing quest to interface modern devices to very old 8 bit computers I have stumbled over this: DEBO USB TTL: Raspberry Pi -USB-TTL-Schnittstellenwandler, CH340G bei reichelt elektronik[^] Not really rocket science. With this I can send and receive bytes from a USB device with a simple UART. This would solve a few problems at once. A simple cheap memory stick would be all the hard disk' an 8 bit computer would ever need. Don't worry about speed. Mass storage is for many reasons a relatively slow affair on 8 bit computers, beginning with their low bandwith on the bus. Remember what Commodore did with the C64's floppy drives? I could also use a USB keyboard or a mouse. So, with that converter and a UART I can now talk to USB devices. Can I also hook up a USB hub to it and access several USB devices over the same UART? How do I select devices? How do I request or send bytes? Some kind of USB protocol with an embedded device specific protocol?
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
Converters like the one mentioned are typically only for connecting slave devices to host computers. If you are trying to be the host and use a memory stick, you need a USB Host or OTG peripheral. Something along the lines of the Arduino Host shield if you want a pre-made solution. Arduino USB Host Shield[^]
-
lw@zi wrote:
I talk to it sometimes. Something along these lines: "Just get in to the slot you little..."
Has it ever responded with, "wrong way - flip me over"?
-
If this were not the place it is, I would now ask you by which coordinate axis you flipped her over and if that was the right choice.
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
-
If this were not the place it is, I would now ask you by which coordinate axis you flipped her over and if that was the right choice.
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
-
Quote:
"wrong way - flip me over"?
I had a girlfriend say that to me once, long, long ago.
- I would love to change the world, but they won’t give me the source code.
-
I mean the low level protocol, not some framework, API or driver. In my ongoing quest to interface modern devices to very old 8 bit computers I have stumbled over this: DEBO USB TTL: Raspberry Pi -USB-TTL-Schnittstellenwandler, CH340G bei reichelt elektronik[^] Not really rocket science. With this I can send and receive bytes from a USB device with a simple UART. This would solve a few problems at once. A simple cheap memory stick would be all the hard disk' an 8 bit computer would ever need. Don't worry about speed. Mass storage is for many reasons a relatively slow affair on 8 bit computers, beginning with their low bandwith on the bus. Remember what Commodore did with the C64's floppy drives? I could also use a USB keyboard or a mouse. So, with that converter and a UART I can now talk to USB devices. Can I also hook up a USB hub to it and access several USB devices over the same UART? How do I select devices? How do I request or send bytes? Some kind of USB protocol with an embedded device specific protocol?
I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.