CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: arnoldemu on 13:25, 21 January 11

Title: another crazy idea?
Post by: arnoldemu on 13:25, 21 January 11
I had this thought of the cpc being connected to the pc via a usb cable.

The cpc has a very simple interface that exposes the usb "pins" to an I/O port.

The cpc then in effect is a usb device.

So the cpc could pretend to the pc that it is a keyboard (HID), or a small drive (like a pen drive).

Of course the cpc must simulate the usb protocol in software, perhaps this would take too much code.

I expect the speed to be lower than USB 1.0, but then the cpc is doing all the work. in usb terms it has endpoints.

I see it uses 5v, so we're into ttl territory here?

Am I crazy?
Title: Re: another crazy idea?
Post by: MiguelSky on 14:06, 21 January 11
Quote from: arnoldemu on 13:25, 21 January 11Am I crazy?
Of course !! :D But the matter doesn't look a crazy idea...
Title: Re: another crazy idea?
Post by: Bryce on 14:10, 21 January 11
The good news is: No, you're not crazy. I've already put together the plans for something very similar, which up to now I called the PCPARA2 - USB (no idea why, other than the fact that I wanted to use the PCPARA software as a starting point). My version is slightly simpler than what you suggest, in that the CPC doesn't need to worry about the USB stuff. The hardware includes the USB host protocol and does all the handshaking etc. The CPC would just see three 8-bit addresses: Data-in, Data-out and Control. The control address has four readable bits to recieve messages from the interface (Data available / buffer full etc). The other four bits can be set by the CPC to signal Data recieved, Data to be sent, busy etc.

The bad news is: I scribbled the plans down about two years ago, but I've never built it. It used a low cost PIC processor and a few cheap TTL chips (for address decoding) and the usual few resistors / capacitors. It's still on my list of things to do, so if I ever get around to building it, I'll let you know.

Bryce.

Edit: Speed wasn't an issue either, the CPC filled a buffer (4K) and the PIC could transmit it at USB 2.0 speeds.

Correction: I just called up my last version of the design and it was based on a Microchip 18F2455, so it was a 1 or 2K Buffer: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010273
Title: Re: another crazy idea?
Post by: jbaudrand on 14:28, 21 January 11
Hi Bryce, I'm new here,  but after reading all your posts here:
What kind of Wizard are you?
:)



Title: Re: another crazy idea?
Post by: MacDeath on 14:36, 21 January 11
more an Hexenmeister than a wizard IMO...

or perhaps a WirzHard... 8)

So my Arduino Mega1280 could perform this too ?
Title: Re: another crazy idea?
Post by: Bryce on 14:43, 21 January 11
No wizardry involved, I'm just a plain old hardware developer who happens to have a soft spot for the CPC and the other 8-bitters I grew up with. I still prefer using real hardware, so no emulators for me :) And it's fun to design things for these computers, compared to the hardware I design for a living, they move in slow motion :D

Bryce.

@MacDeath: I don't know the Arduino Mega1280, but if it supports the USB Protocol and has a few addressable ports, then probably yes. I'm not a fan of this type of multi-purpose board though, because they usually offer much more than you need for a particular project. The 18F2455 cost around 7€, PCB 2€, other bits maybe 5€, so you can build the whole thing for less than the Arduino alone would cost. But they are very good for experimenting if you don't have the possibility to make your own PCBs.
Title: Re: another crazy idea?
Post by: TFM on 20:32, 21 January 11
Quote from: MiguelSky on 14:06, 21 January 11
Of course !! :D But the matter doesn't look a crazy idea...

LOL!!! ROFL!!!
Title: Re: another crazy idea?
Post by: robcfg on 22:28, 21 January 11
Ok, I'd really love to see Windows telling me something like "Found New Hardware : CPC6128 USB Keyboard"  :laugh: :laugh: :laugh: :laugh:
Title: Re: another crazy idea?
Post by: Bryce on 22:53, 21 January 11
The USB device description is configured in the PICs software, but you could even change it from the CPC if a little software was added to the PIC to allow it. That way you could chose what it reports itself as: 8-Bit Computer, Arnold, CPC6128 it's up to you (can't remember how long they're allowed to be). Obviously it would have to have a default name to avoid errors, but that could then be over-written with a setting in the CPC "driver" program.

Bryce.
Title: Re: another crazy idea?
Post by: TFM on 23:39, 21 January 11
Quote from: robcfg on 22:28, 21 January 11
Ok, I'd really love to see Windows telling me something like "Found New Hardware : CPC6128 USB Keyboard"  :laugh: :laugh: :laugh: :laugh:

I rather like to get a message like "Slave PC found" on the CPC screen  :P
Title: Re: another crazy idea?
Post by: Bryce on 23:44, 21 January 11
For obvious reasons, the PC is the Host Device, so the CPC wouldn't report anything unfortunately.

Bryce.
Title: Re: another crazy idea?
Post by: TFM on 23:53, 21 January 11
Obvious reasons? Pah :P  The PC is good enought to serve with data or to store it. And maybe - if I have a good day - then the PC is allowed to do some calculations with complex numbers in a multidimensional array. But the CPC must rule all this  :police:  Anything else would be a sacrilege!


Honestly, who wants to exchange a good ergonomic PC keyboard with the CPC keyboard?

Better to use the PC as data server or whatever this kind of inferior (since often crashing...) technique can provide  ;D ;D ;D
Title: Re: another crazy idea?
Post by: Bryce on 00:07, 22 January 11
Actually, with obvious, I meant the fact that if the CPC was the host, a much more expensive µP would be required and due to the fact that PCs don't have a USB Device socket, you would have to also design an extension card for the PC and write windows drivers for this :D Not exactly what I'd call an optimised solution :D

But seriously, I'd probably configure the USB Type as a modem (ie: the PC would see "CPC6128" and think this is a modem), due to the fact that you could then write to it with the normal TX / RX commands supported by every OS and language.

Bryce.
Title: Re: another crazy idea?
Post by: TFM on 01:26, 22 January 11
And in turn, the PC can serve the CPC as modem  ;D  to get internet access or whatever you like to do  ;D  Happy weekend!
Title: Re: another crazy idea?
Post by: MacDeath on 03:21, 22 January 11
QuoteOk, I'd really love to see Windows telling me something like "Found New Hardware : CPC6128 USB Keyboard"
If you do it right it is more like :

"Found New Hardwares : CPC6128 USB Keyboard, CPC6128 USB disk drive, CPC6128 CRTC/GA USB 2D Video display card, CPC6128 AY USB SoundCard, CPC6128 USB Digital Gamecontroller, CPC6128 USB Z80 system Hardware emulator..."
:o
Title: Re: another crazy idea?
Post by: Gryzor on 10:08, 22 January 11
So... while it'd be intriguing, what use would it be?

@MacDeath: lol :D :D :D I'd love to see a "Found Tape Drive" message!!! Or, maybe, like with the multi-slot adaptors that you buy, that present a dozen or so drives and THEN the system also recognizes the media: "Found C45" :D

PS Oh, hey, how about: "This device can perform faster"? :)
Title: Re: another crazy idea?
Post by: AMSDOS on 10:25, 22 January 11
Ironically enough the early IBM PCs reckonised Tapes - according to Old Computers (http://www.old-computers.com/museum/computer.asp?st=1&c=274) Tapes were reckonised upto MS-DOS 5!  ;D
Title: Re: another crazy idea?
Post by: Gryzor on 10:30, 22 January 11
Quote from: CP/M User on 10:25, 22 January 11
Ironically enough the early IBM PCs reckonised Tapes - according to Old Computers (http://www.old-computers.com/museum/computer.asp?st=1&c=274) Tapes were reckonised upto MS-DOS 5!  ;D

Yeah, but surely not *these* tapes??
Title: Re: another crazy idea?
Post by: AMSDOS on 12:51, 22 January 11
Perhaps with the right knowledge and know how, I doubt something as ambitious as that has been done though. Perhaps one of those early Amstrad Emulators for the PC knows something about it, I don't really know though.
Powered by SMFPacks Menu Editor Mod