News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_zhulien

USB Host Controller with Mass Storage Support

Started by zhulien, 20:50, 03 April 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zhulien

We have USB stick support on CPC usually via some type of microcontroller.  I am guessing that Microcontroller is likely the best way to make a USB Host Controller for CPC with floppy, CDROM and perhaps Hard Drive support?  For me, I'd like floppy support - mainly as it might provide an alternative to reading floppies given I have removed my 3" drive to have a USB drive.  Also USB floppy drives are dirt cheap - not to mention CDROM drives too.  

Or would a cut down USB stack be worthwhile on CPC instead and handle it all in software?  What are the likely pitfalls of a software solution?  (no interrupt mechanism or missing packets?)...  I can see a hardware solution can offer DMA via mapped ROMs for reading at least - like an M4 does.

https://www.usb.org/sites/default/files/usbmass-ufi10.pdf

GUNHED

Another solution? Another software? Another long development time for it?

USB? What's bad about using SF3, USIfAC II or ULIfAC?

Or take the Albireo, it has an USB port, you can program it. :)


Form the programmers POV it's just nasty to have a bunch of different hardware solutions an no standard. Do we want to cook all our own soup? Or wouldn't it be better to work together and have some kind(s) of standart(s)?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

eto

Such a solution will appear if someone sees the need for it. Usually a personal need. 

I can just talk for myself, but I don't see a purpose for a USB-floppy adapter or a CD-ROM.

Modern USB floppy drives only support 1.44MB floppies, so you either use disk images or have to support 1.44Mb directly. In the end it's as compatible as any mass storage solution but much less flexible and much more expensive than a SD card or USB drive. 

For CD-ROM it's even less useful. You don't even get the nostalgic feelings from the drive sound. Sure, you will be able to put almost 4000 disk images on a single CD ROM, which sounds great. But they will be read-only.

In both cases a 8GB USB stick is more versatile, costs around 4€ and you probably can put all ever released software onto it. 

Prodatron

We already have the CH376 USB controller in the Albireo and the Usifac2.

The CH376 can handle any USB device afaik, at least HIDs and mass storage, including USB floppies and CD Roms. You just need to write drivers. For CD Roms you have to implement an ISO-9660 file system driver, too (or try to port this one from the MSX).

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

zhulien

I agree that CDROM is pretty much useless unless you want to control an audio CD from the CPC - but for storage, not much use at all.

I didn't know Usifac2 had that inbult, great news.  What documentation do I need to read?

Prodatron

Here is a CH376 data sheet. Starting from page 5 you will find the commands:

https://www.mpja.com/download/ch376ds1.pdf

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

GUNHED

Quote from: zhulien on 15:15, 04 April 23I agree that CDROM is pretty much useless unless you want to control an audio CD from the CPC - but for storage, not much use at all.
Instead of an audio CD you can use SD cards with the MP3 player of the LambdaSpeak FS / III too.  :) You got the LS3 iIrc. Needs less space in addition.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

zhulien

Quote from: GUNHED on 16:05, 05 April 23
Quote from: zhulien on 15:15, 04 April 23I agree that CDROM is pretty much useless unless you want to control an audio CD from the CPC - but for storage, not much use at all.
Instead of an audio CD you can use SD cards with the MP3 player of the LambdaSpeak FS / III too.  :) You got the LS3 iIrc. Needs less space in addition.

yes, it was me who suggested to put that on the LambdaSpeak - which I have too. Sounds fantastic!

GUNHED

http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Prodatron

#9
In this case, the CPC is just acting like a stupid remote control. It doesn't load the data stream from a mass storage device and it doesn't send it to an output device.
It just tells someone, please play this file from your SD (or whatever) card.
TBH yes, playing MP3s already requires additional hardware for the decoding, but just using the CPC as a primitive remote control doesn't have the Z80 spirit for me anymore.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

GUNHED

#10
" In this case, the CPC (snip) doesn't load the data stream from a mass storage device and it doesn't send it to an output device. "

Yes! And that's absolutely great!!!  :) :) :)

Every sound card (Moon Sound) or graphics card (VDP9990) is external hardware. As you told MP3 playing requires extra hardware too.
It is just logic to relieve the CPU from additional load and let the expansions do the hard work. Therefore we have them.
There is absolutely no need to send everything through the bottleneck of the Z80.

It's the same in PC world, no need to stay inefficient with the CPC, just because it's no 8086 PC? That makes imo no sense.

And yes, for some strange reasons there will be always persons only working with a CPC464 with nothing extra.

So, everybody shall be lucky in a personal way.  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

eto

Quote from: GUNHED on 17:16, 12 April 23Every sound card (Moon Sound) or graphics card (VDP9990) is external hardware.

For me, the questions is simple: Is the CPC extended by the device or is the device extended by the CPC? What's the core part of the set-up?

E.g. once you connect a Raspberry to the CPC to run DOOM, but DOOM runs entirely on the Raspberry and only I/O is passed through the CPC, this does no longer make any sense to me. It's just doing it for the sake of doing it. And if you pass through the graphics, the experience even gets worse than without the CPC as an I/O device. Something like this was done lately with a C64. It's not the C64 that is extended by the Raspberry, the Raspberry was extended by the C64, which is doing just the I/O for the Raspberry. 

On the other hand, there are extensions like the VDP9990, where the extension brings new capabilities, but the CPC is still an important part of the overall experience - and not just I/O. Games logic, sound, controls, graphics - all done by the CPC - but the graphics are more powerful thanks to the VDP.

A LambdaSpeak for replaying MP3 from an SDcard (to me) looks much closer to the Raspberry example than to the VDP example. It's not the CPC that is extended to do something, the LambdaSpeak is extended by the CPC to send over commands - and it doesn't really matter if the CPC is part of the set-up.




GUNHED

#12
Of course nobody wants to reduce the CPC to a pure keyboard, just like the c64 with supercpu.

And I see no difference between regulating the volume, number of track, etc. or to regulate what screen is shown with a gfx card.

Regarding MP3: The way of doing it is always the same, doesn't matter if it's a SF3, LS3, or MSX soundcare (connected by an Amsdap).

Imho it's pointless to shuffle everything through the cpu just for the sake of it.

However, we should get back to USB controllers now...
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod