Author Topic: Albireo - USB/SD/Serial interface for CPC  (Read 55734 times)

0 Members and 1 Guest are viewing this topic.

Offline skywalky

  • CPC664
  • ***
  • Posts: 62
  • Country: es
  • Liked: 17
  • Likes Given: 43
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #25 on: 21:41, 19 October 15 »
@PulkoMandy, one for me, please.

Offline Jungsi

  • CPC464
  • **
  • Posts: 44
  • Country: de
    • Jungsis Corner
  • Liked: 8
  • Likes Given: 7
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #26 on: 21:50, 19 October 15 »
I'll take also one please! :-)

Offline Poliander

  • Supporter
  • CPC6128
  • *
  • Posts: 164
  • Country: de
  • Liked: 80
  • Likes Given: 69
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #27 on: 21:52, 19 October 15 »
I'm also in for one, please.
Schneider CPC 664 • X-MEM • X-MASS • CTM 644 • DMP 2160 — Schneider CPC 6128 • M4 Board • Z-MEM • OSSC

Offline yannis_uno

  • CPC464
  • **
  • Posts: 19
  • Liked: 1
  • Likes Given: 104
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #28 on: 21:58, 19 October 15 »
Count me in for 1 please, thanks!


Offline Rennert

  • CPC464
  • **
  • Posts: 33
  • Country: 00
  • KC Compact
  • Liked: 14
  • Likes Given: 2
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #29 on: 21:58, 19 October 15 »
I buy 1 board please ;)
...KC Compact

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #30 on: 22:40, 19 October 15 »
Some precisions since I get some questions by PM (don't be shy, share your questions here so everyone can get the answers!)


There is no software available for this board currently
What you buy is only the hardware. You will have to write your own drivers for it or wait for someone to provide support (as a tool loadable from disk, a ROM, etc). While I have started some work on a ROM, I make no promises or guarantee that I will get that to work, and if I do, when it will be made available.


What will be possible with appropriate software
Some people will want to use it to load games from it. Remember that it is not a floppy emulator. This means, anything accessing the floppy disk without going through the AMSDOS system ROM, will not load.
Anything that uses AMSDOS, but initializes only ROM 7 or ignores the current drive setting, will not work.


The ROM will also use some memory for itself, which can also create some issues. It's possible to keep the RAM use quite low, but still some bytes will be used at least to store the new RSXs from the ROM.


BASIC programs should not be a problem, more complex software may need some patching. To get an idea, the games with 1 or 2 blue dots listed here will most likely work: http://cngsoft.no-ip.org/cpc_lzx.htm . The one with red dots will not (this is for the unprotected games).


What will be possible without a ROM
If you don't have a ROM expansion already (RamCard, Rom Board, MegaFlash, FlashGordon, X-Mem or similar), this board can still be used with software running in RAM. In that case, the software must be loaded from disk or tape - no autoboot support! The software will of course use some memory for itself, which possibly means even more compatibility problems if you want to use it as a game loader.


I don't plan to provide this kind of software, at all - because I don't need it myself. If someone else decides to attempt it, I can provide support, hints and technical documentation (writing the programming docs and examples is higher on my TODO list than writing the software).

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 491
  • Country: de
    • index.php?action=treasury
  • Liked: 243
  • Likes Given: 1213
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #31 on: 23:02, 19 October 15 »
...count me for another one!
...proudly supported Schnaps Demo and Pentomino, NQ-Music-Disc with GFX

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #32 on: 23:12, 19 October 15 »
Current waiting list
  • 0 - PulkoMandy
  • 1 - OffseT
  • 2 - TFM (x2 - what's up with people ordering two devices? do you use that much CPC to need two boards?)
  • 4 - ||C||-||E||
  • 5 - majikeyric (x2)
  • 7 - CraigsBar (x2)
  • 9 - pelrun
  • 10 - Optimus
  • 11 - AsT
  • 12 - Gryzor
  • 13 - hsimpson
  • 14 - SOS
  • 15 - tonio8bits (x2)
  • 17 - Audronic
  • 18 - gros_minet
  • 19 - Fessor
  • 20 - Sykobee (Briggsy)
  • 21 - skywalky
  • 22 - Jungsi
  • 23 - Poliander
  • 24 - Yannis_uno
  • 25 - Rennert
  • 26 - HAL6128
I have updated the first post with the info from my replies, so they don't get lost in the flow of preorders (already 27 boards to assemble! This will keep me busy during the winter at least)
« Last Edit: 23:15, 19 October 15 by PulkoMandy »

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.280
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1171
  • Likes Given: 79
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #33 on: 23:13, 19 October 15 »
Current waiting list
  • 0 - PulkoMandy
  • 1 - OffseT
  • 2 - TFM (x2 - what's up with people ordering two devices? do you use that much CPC to need two boards?)
  • 4 - ||C||-||E||
  • 5 - majikeyric (x2)
  • 7 - CraigsBar (x2)
  • 9 - pelrun
  • 10 - Optimus
  • 11 - AsT
  • 12 - Gryzor
  • 13 - hsimpson
  • 14 - SOS
  • 15 - tonio8bits (x2)
  • 17 - Audronic
  • 18 - gros_minet
Power supply
There was a question about the power supply required for the board. It needs 5V, and the power consumption is around:
  • Glue logic - 20mA
  • CH376S - 30mA
  • TL16C550D - 10mA
  • FT230X - 8.3mA
Total: 69mA, to which you need to add power for an SD card (30 to 100mA depending on the model chosen) and/or USB devices.
Well my 2 are as follows... 1 for the cpc's easily accessible and interchangeable. The other one will be lost, hidden and embedded in my just CPC tower.
IRC:  #Retro4All on Freenode

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 780
  • Country: es
  • Liked: 628
  • Likes Given: 429
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #34 on: 01:40, 20 October 15 »
1 for me too please!! :)

« Last Edit: 14:54, 20 October 15 by Joseman »

Offline Tai

  • CPC464
  • **
  • Posts: 27
  • Country: 00
  • Liked: 15
  • Likes Given: 106
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #35 on: 01:50, 20 October 15 »
Please, count me in for 1 board!

Offline Grim

  • CPC6128
  • ****
  • Posts: 202
  • Country: gp
  • La pak ba, bèf ka pasé
    • THERE IS NO GAME
  • Liked: 133
  • Likes Given: 67
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #36 on: 06:58, 20 October 15 »
+1 board, thanx.

A few more questions:
  • What's the maximum capacity of the SD card the CH376 can handle? (I haven't looked at the datasheet yet)
  • Does the announced transfer speed (128K snapshot loaded in 0.83s) theoretical or factual? (HOLYSHIFT! 0.83s?! :)
  • Do you accept payment in rum bottles?

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #37 on: 08:21, 20 October 15 »

Max. Storage size

The datasheet doesn't give any limit for the SD card size. It is FAT32, so there is a limit of one partition of 2TB. I did my tests with an USB drive of 2GB and it seems to be working for now. I'm not sure how much space we need to fit the complete CPC software collection?


[edit]
After checking the chinese website of WCH, there is a size limit of "only" 32GB. It does support SDHC cards to allow this. I don't know if a larger drive can be used on USB, I'll have to test that.


Serial speed

For now everything about the serial interface is theoretical - I only drawn the schematics for it. Here is the math:
  • The serial controller gets a 24MHz clock
  • It divides this by 16 internally, to get a 1.5MHz clock
  • It sends/receives 1 bit per clock cycle, so 1.5Mbaud
  • Sending a byte needs 8 data bits + 1 start bit + 1 stop bit, so 0.150 MB/s or 150 KB/s
Is it reachable in real world conditions? On the hardware level, one difficult thing at such high speed on a serial link is keeping the two sides synchronized. This is why the USB adapter is integrated on the board: this way, the USB adapter and the serial controller run on the exact same clock. There is no way they can get out of sync.


On the software level, the z80 will be the limiting factor. Well optimized code could achieve this speed. To help the z80, there are a few features on the board:
  • Buffers: in the UART controller, a 16 byte buffer. In the USB controller, a 512 byte buffer.
  • Hardware flow control: The PC does not need to wait for the CPC to read the bytes. It can send 512 bytes at a time and wait for them to be written, without risk of a byte getting lost because the z80 was doing something else.
  • Interrupts: I don't know yet if this will be useful, the z80 can get an interrupt when the receive buffer is nearly full. This means there is no need to poll the serial port to wait for new bytes, just HALT and wait. The interrupt can also be NMI, in that case the gate array interrupts won't cause any interference (you can run in DI mode).
  • Short serial link: the actual serial link is only a few centimeters long on the board itself, this will limit the risk of data corruption. The rest of the connection is USB, which has strong protection features (CRC) and will get the data safely to the other side. Error checks on the z80 side or checksumming are thus not needed, and explicit acknowledge may not be needed either.
Everything else for the maximal speed is in the hands of people writing the z80 code. Can you write a loop tight enough to run this fast?
« Last Edit: 09:29, 20 October 15 by PulkoMandy »

Offline reidrac

  • Supporter
  • 6128 Plus
  • *
  • Posts: 691
  • Country: gb
  • Trying to gamedev!
    • index.php?action=treasury
    • usebox.net
  • Liked: 1186
  • Likes Given: 729
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #38 on: 10:36, 20 October 15 »
I'd love to have one board, if that's possible. Thanks!
Released The Return of Traxtor, Golden Tail, Magica and The Dawn of Kernel for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

Offline fastofruto

  • Speccy
  • *
  • Posts: 1
  • Country: es
  • Liked: 0
  • Likes Given: 0
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #39 on: 11:16, 20 October 15 »
Hi! One for me please!

Offline cosa_nostra-6128

  • CPC464
  • **
  • Posts: 22
  • Country: es
  • Liked: 7
  • Likes Given: 5
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #40 on: 13:27, 20 October 15 »
Hi! One for me please!,thank very much

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 960
  • Country: fr
  • Liked: 920
  • Likes Given: 141
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #41 on: 13:49, 20 October 15 »
I think I want one too! Thanks!
Targhan/Arkos

Arkos Tracker 2 - alpha 7 now released! - Follow the news on Twitter!
Disark A cross-platform Z80 disassembler/source converter

Imperial Mahjong
Orion Prime

Offline oratyper

  • Speccy
  • *
  • Posts: 1
  • Country: es
  • Liked: 0
  • Likes Given: 0
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #42 on: 14:07, 20 October 15 »
Hello, one for me please  ;D  Thanks

Offline NiNxPe

  • CPC664
  • ***
  • Posts: 73
  • Liked: 195
  • Likes Given: 22
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #43 on: 16:08, 20 October 15 »
+1 plz  :D

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #44 on: 17:33, 20 October 15 »
Max. Storage size

After checking the chinese website of WCH, there is a size limit of "only" 32GB. It does support SDHC cards to allow this. I don't know if a larger drive can be used on USB, I'll have to test that.

In the datasheet V1.0 I found (for chip version &41) the limit the size in general to 32 GB due to the file-system IIRC.



Interrupts: I don't know yet if this will be useful, the z80 can get an interrupt when the receive buffer is nearly full.

Such an interrupt would be a great feature, because it's desirable it the CPU can do something else than data transfer in parallel.

The datasheet is written in bad english, have to browse through it again to find out how to select and load files. But there maybe a better source of information out there in the net.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #45 on: 18:01, 20 October 15 »
CH376 programming resources

Yes, there are some resources that are helpful to better understand the datasheet.
The CooCox driver was helpful: CooCox provides free and open-source CH376 USB disk and SD card file management
My early WIP code for the AMSDOS compatible filesystem ROM: cpctools/resources/CH376 at master · cpcsdk/cpctools · GitHub The file ch376.i has description of all the commands in a more compact form, but not all the details. It should give a good overview of how things work. It includes only the FS commands for now, not the USB low level ones.
Current waiting list
  • 0 - PulkoMandy
  • 1 - OffseT
  • 2 - TFM (x2 - what's up with people ordering two devices? do you use that much CPC to need two boards?)
  • 4 - ||C||-||E||
  • 5 - majikeyric (x2)
  • 7 - CraigsBar (x2)
  • 9 - pelrun
  • 10 - Optimus
  • 11 - AsT
  • 12 - Gryzor
  • 13 - hsimpson
  • 14 - SOS
  • 15 - tonio8bits (x2)
  • 17 - Audronic
  • 18 - gros_minet
  • 19 - Fessor
  • 20 - Sykobee (Briggsy)
  • 21 - skywalky
  • 22 - Jungsi
  • 23 - Poliander
  • 24 - Yannis_uno
  • 25 - Rennert
  • 26 - HAL6128
  • 27 - Joseman
  • 28 - Tai
  • 29 - Grim
  • 30 - reidrac
  • 31 - cosa_nostra_6128
  • 32 - Targhan
  • 33 - oratyper
  • 34 - NiNxPe
Latest design changes
I'm still refining the routing. Today changes:
  • USB device (serial link) connector moved to the side of the board, instead of the top. This will make the cable less annoying when it is plugged
  • Replaced the jumpers for configuration with a DIP switch
« Last Edit: 15:05, 21 October 15 by PulkoMandy »

Offline fgbrain

  • CPC6128
  • ****
  • Posts: 231
  • Country: gr
    • index.php?action=treasury
    • Chaos CPC Homepage
  • Liked: 129
  • Likes Given: 300
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #46 on: 23:15, 20 October 15 »
Hi!

Will it be possible to connect and use USB printers or mice??
That would be great! But then one USB port is not enough ;D
_____

6128 (UK keyboard, Crtc type 0/2), 6128+ (UK keyboard), 3.5" and 5.25" drives, Reset switch and Digiblaster (selfmade), Inicron Romram box, Bryce Megaflash, SVideo & PS/2 mouse, , Magnum Lightgun, X-MEM, X4 Board, C4CPC, Multiface2 X4, RTC X4 and Gotek USB Floppy emulator.

Offline Vandalsk

  • CPC464
  • **
  • Posts: 13
  • Country: de
  • Liked: 4
  • Likes Given: 80
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #47 on: 23:38, 20 October 15 »
Please, count me for 2 boards please! Thanks.
- Schneider CPC 6128 & 3,5" Floppy, Multiface II, Videodigitizer, Symbiface II, Dobbertin Ram Expansion 512 Kb, Marconi Trackball, CPC Booster+, X-Board, X-Mem, HXC Floppy Emulator
- Sinclair PC 200
- Schneider PC 1640
- Atari STf
- Vtech Laser 310, 64 KB Ram, PI 20 Printer Interface,  LP 20 Lightpen, Laser JI 20 Joysticks, Erweiterungsplatine, PP40 Plotter, DD 20 5,25" Floppy, SANYO DM 2112 Monitor
Amstrad NC-100
Atari ST 1040
Amiga 500
Commodore C 64

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #48 on: 23:50, 20 October 15 »
Netter Avatar!  ;) ;D
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #49 on: 00:18, 21 October 15 »
Hi!

Will it be possible to connect and use USB printers or mice??
That would be great! But then one USB port is not enough ;D


Hi,
"Connecting" is of course possible. Getting them to actually do something, however...  :D


More seriously, the controller chip can also handle some other USB devices, as far as I can tell anything HID should not be a problem. However, it is then acting as a simple USB controller, which means the CPC will have to do some work: reading the HID reports as they come on the wire, parsing them (the format is fairly simple), and moving the mouse cursor on screen, of course.


For printers, I have no idea if this would work. It depends on the printer, the interface it exposes and how hard it is for the CPC to generate the data to send to it.


You can read the datasheet for CH375 if you want to get a more precise idea of how the chip works for this.


CH376: usb mass storage / sd card FAT32
CH375: usb host for other kind of devices
CH372: usb device (for plugging the CPC as a "slave" device to another computer - this will probably not be used, by me at least)


The CH376 is compatible with 375 and 372 and is programmed the same way for the relevant parts.