Zalt virtual devices over USB

I still don’t have any IO hardware in the Zalt system. I am working on a general high-speed bus design with Ron, but that is far from usable at this stage.

Virtual Devices

So the idea came to tunnel all the smart IO devices I would like to build virtually over USB to and from the PC. The PSoC (kit) System Controller has a (device) USB port on it and dropping in the USB design component in the PSoC design service and configuring that to two-way USB bulk transfer basically is all you need to get that working.

The Virtual Devices app on the PC is a C++ application in Visual Studio using Qt as an application framework and libusb as a USB library.

I had some trouble getting the event system working on a Qt Console application, so I turned it into a Gui application. I guess the eventing system is tied to the (Windows) event loop. The application installs an application-level event filter that catches all the key strokes – when the keyboard button on the Gui is active. These keyboard events are put in a USB protocol message of my own design and send to the PSoC. That is about all the app does at this moment. Future plans include having a virtual file system. Not sure about video yet – perhaps start with character based.

The PSoC has a new UsbProcessor component that (for now only) receives the protocol messages sent from the PC app and dispatches them to the correct device handler. I changed the Keyboard device to now handle the protocol messages and signal availability to the Z80 using the interrupt and vector that was already in place. The Z80 will then use IO to come and get the key code.

virtual-devices

Smart IO Devices

The whole idea of making the virtual devices PC app is to develop the stream-based smart-devices Z80 API. The bus I mentioned earlier uses a high-level protocol to communicate with each smart-IO-device. The idea being that the Z80 programs does not want to know or care about file sectors or tracks – it only care about files, directory structure and content.

So now I can write the API that will be used to access remote data of the smart-devices over the bus. I can even start to code the bus protocol I had in mind to see if it covers all the bases. But first things first – small steps.

Advertisements
Published in: on January 25, 2017 at 10:40 am  Leave a Comment  

The URI to TrackBack this entry is: https://jacobielectronix.wordpress.com/2017/01/25/zalt-virtual-devices-over-usb/trackback/

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: