Difference between revisions of "Albireo"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
(Links)
(Links)
 
(38 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== General ==
 
 
=== Intro ===
 
 
 
Albireo is an expansion for the Amstrad CPC computers (all models). Its main goal is to provide reliable, fast, cheap and large storage, which it achieves by using a MicroSD card. But the board has a lot of features packed in:
 
Albireo is an expansion for the Amstrad CPC computers (all models). Its main goal is to provide reliable, fast, cheap and large storage, which it achieves by using a MicroSD card. But the board has a lot of features packed in:
 
* USB host port, allowing to connect USB mass storage, mouse, and other USB peripherals
 
* USB host port, allowing to connect USB mass storage, mouse, and other USB peripherals
Line 9: Line 5:
 
The interface is based on the WCH CH376 chip and allows access to USB mass storage and other USB devices on CPC.
 
The interface is based on the WCH CH376 chip and allows access to USB mass storage and other USB devices on CPC.
  
The CH376 chip implements FAT32 in hardware, which means no filesystem driver is needed on the CPC side. It also implements the lower level aspects of USB, making it relatively easy to write drivers for other USB devices (mouse, joystick, ...).
+
The CH376 chip implements FAT32 in hardware, which means no filesystem driver is needed on the CPC side. This makes it very easy to use the interface with a microSD card, USB stick or hard drive and access files on the FAT32 partition directly, without using a lot of CPU power or memory on the CPC.
 +
 
 +
It also implements the lower level aspects of USB, making it relatively easy to write drivers for other USB devices (mouse, joystick, ...). It is simple enough that the mouse driver was initially written completely in BASIC.
 +
 
 +
The Albireo USB port can drive any USB peripheral, including any standard USB mouse. It is no more needed to dig out a PS/2 compatible mouse for your [[Symbiface II]], or even worse, an Atari/Amiga one for the [[MultiPlay]].
 +
 
 +
'''USB is the solution we need to free ourselves from all the weird, ad-hoc, incompatible, expensive, hard to find CPC hardware extensions that we all suffer from. And it opens up the CPC world to countless existing peripherals.'''
 +
 
 +
<br>
 +
 
 +
== General ==
  
 
=== What's in it? ===
 
=== What's in it? ===
Line 18: Line 24:
 
* Software configurable interrupt routing to either [[NMI]] or INT, or interrupt masking. Multiplexing of several interrupt sources: USB host controller, UART, remotely triggered, and CRTC CURSOR signal interrupts are gathered and easily accessible from a single interrupt status register.
 
* Software configurable interrupt routing to either [[NMI]] or INT, or interrupt masking. Multiplexing of several interrupt sources: USB host controller, UART, remotely triggered, and CRTC CURSOR signal interrupts are gathered and easily accessible from a single interrupt status register.
  
=== Board revisions ===
+
=== How does it work? ===
 +
* There are two main devices: the CH376 handles the USB host and SD card side of things, and is accessed at FE80 (data) and FE81 (command/status). The communication side is handled by a SC16C650B, mapped at FEB0-FEB7. This is similar to the chip used on most PC hardware and some Amiga expansions like the SilverSurfer.
 +
* There is an FT230X chip to convert the UART to USB for connecting with a modern PC (standard serial ports are not that common anymore, and they wouldn't be fast enough anyway). The FT230X also generates 12MHz and 48MHz clocks for the two other chips.
 +
* The 16C650 "modem control" lines are connected to various things (CH376 interrupt, FT230X general IO pin for remote control) and turns them into interrupts.
 +
 
 +
=== What is it useful for? ===
 +
* Use both USB mass storage devices and/or USB mice in [[SymbOS]] with one or two Albireos, which can be connected at the same time
 +
* Access mass storage devices with [[UniDOS]]; use the USB key or SD card directly from BASIC and well-behaving apps (which support extra disk ROMs and a C drive); load games and tools from the mass storage media
 +
 
 +
<br>
 +
 
 +
== Board revisions ==
  
 
The hardware went through multiple iterations before reaching final state. Each version identifies itself on the USB link and the version should be visible in Windows device manager or lsusb on Linux.
 
The hardware went through multiple iterations before reaching final state. Each version identifies itself on the USB link and the version should be visible in Windows device manager or lsusb on Linux.
  
==== Initial prototypes ====
+
=== Initial prototypes ===
  
 
The first prototype was an hand-wired one. There were some changes to I/O ports used since then, so it is not usable anymore.
 
The first prototype was an hand-wired one. There were some changes to I/O ports used since then, so it is not usable anymore.
  
==== Version 0.9 ====
+
=== Version 0.9 ===
  
 
The first 5 boards were manufactured with an early PCB design, which required some wire-patches to get things working. With the wire-patches, this version behaves the same as 1.0.
 
The first 5 boards were manufactured with an early PCB design, which required some wire-patches to get things working. With the wire-patches, this version behaves the same as 1.0.
  
==== Version 1.0 ====
+
=== Version 1.0 ===
  
 
About 20 boards were shipped with version 1.0. Unfortunately, as people started to write software using it it turned out that the serial port chip has compatibility problems with the z80 timings. As a result, this version of the board can use the serial port only with the FIFO disabled, which makes it impossible to reach high baudrates. The board is still perfectly usable if you are interested only in the microSD and USB host port.
 
About 20 boards were shipped with version 1.0. Unfortunately, as people started to write software using it it turned out that the serial port chip has compatibility problems with the z80 timings. As a result, this version of the board can use the serial port only with the FIFO disabled, which makes it impossible to reach high baudrates. The board is still perfectly usable if you are interested only in the microSD and USB host port.
  
==== Version 1.1 ====
+
=== Version 1.1 ===
  
 
This version of the board replaces the serial chip with a slightly different one. The board still reads "v1.0" as it is the same PCB, only the chip used has changed.
 
This version of the board replaces the serial chip with a slightly different one. The board still reads "v1.0" as it is the same PCB, only the chip used has changed.
Line 41: Line 58:
 
Version 1.0 uses a TI TL16C550D chip. Version 1.1 uses a NXP SC16C650B chip.
 
Version 1.0 uses a TI TL16C550D chip. Version 1.1 uses a NXP SC16C650B chip.
  
=== How does it work? ===
+
=== Version 2.0 ===
* There are two main devices: the CH376 handles the USB host and SD card side of things, and is accessed at FE80 (data) and FE81 (command/status). The communication side is handled by a SC16C650B, mapped at FEB0-FEB7. This is similar to the chip used on most PC hardware and some Amiga expansions like the SilverSurfer.
+
* There is an FT230X chip to convert the UART to USB for connecting with a modern PC (standard serial ports are not that common anymore, and they wouldn't be fast enough anyway). The FT230X also generates 12MHz and 48MHz clocks for the two other chips.
+
* The 16C650 "modem control" lines are connected to various things (CH376 interrupt, FT230X general IO pin for remote control) and turns them into interrupts.
+
  
=== What is it useful for? ===
+
Like the previous version, it provides one USB host port and one µSD slot with built-in support for mass storage and FAT filesystem. However, please note '''serial port has been removed'''. It is fully compatible (same port address). Of course, nothing is mapped on serial port addresses.
Not much currently because there is no software yet, but in the future:
+
 
 +
All interrupts on the board were handled by the SC16C650B chip. It is unclear how they are treated in version 2.0.
 +
 
 +
This Albireo version has solder jumpers on bottom side (JP2 & JP3) to change the I/O address from the default &FE80/81 to &FE40/41. You need a cutter and a bit soldering to do this change, though. This allows to plug two Albireo cards simultaneously. The latest Albireo and Unidos ROMs together can already handle this (yay!).
 +
 
 +
This will allow to, for example, use one board for mass storage, and the other to connect various USB devices: mouse, MIDI controller, printer, whatever you need (as long as you find someone to write a driver).
 +
 
 +
Strictly speaking, it might be possible to handle both a mouse and a USB stick on one card by using a USB hub. But this has to be coded and tested, the CH376 documentation is unclear on this topic. [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/albireo-usbsd-interface-for-cpc-new-version-without-serial/msg248489/#msg248489 Source]
  
* Use the USB key or SD card directly from BASIC and well-behaving apps (which support extra disk ROMs and a C drive). Load games and tools from the mass storage media
+
[[File:Albireo 2.0 top.jpg|500px]] [[File:Albireo 2.0 bottom.jpg|500px]]
* Connect to another computer like the CPC Booster, load snapshot, DSK or other files from it and write them to floppies or the mass storage media. A snapshot of 128K could be loaded in 0.86 seconds, a snapshot of 64K in less than 0.43 seconds.
+
* Use SLIP (serial line IP) and a properly setup gateway (Linux machine or similar) to connect the CPC to the Internet.
+
  
There are a drivers in FutureOS and SymbOS to use Albireo with an USB mouse.
+
<br>
  
 
== Hardware ==
 
== Hardware ==
Line 119: Line 138:
 
* When this switch is ON, the DTR signal from the remote side of the serial link is plugged to the DSR line of the UART controller. It then generates an interrupt which the CPC can process.
 
* When this switch is ON, the DTR signal from the remote side of the serial link is plugged to the DSR line of the UART controller. It then generates an interrupt which the CPC can process.
  
== Software ==
+
<br>
=== Software supporting the Albireo ===
+
 
 +
== Software supporting the Albireo ==
 
* [[UniDOS]] ([[AMSDOS]] compatible and modular DOS; see [https://unidos.cpcscene.net UniDOS official website])  
 
* [[UniDOS]] ([[AMSDOS]] compatible and modular DOS; see [https://unidos.cpcscene.net UniDOS official website])  
* [[SymbOS]] (both USB mass storage devices and USB mouse)
+
* [[SymbOS]] (both USB mass storage devices and USB mouse; supports two Albireos connected at the same time)
 
* [[Arkos_Tracker]] 2 (use the CPC AY chip through the USB serial port)
 
* [[Arkos_Tracker]] 2 (use the CPC AY chip through the USB serial port)
 
* [[FutureOS]] (USB mouse support)
 
* [[FutureOS]] (USB mouse support)
Line 128: Line 148:
 
* [[AlbiDOS]] **'''deprecated''', replaced by [[UniDOS]]** ([[AMSDOS]] compatible DOS driver; see [https://framagit.org/shinra/albireo/albireodos/-/wikis/home AlbiDOS documentation])
 
* [[AlbiDOS]] **'''deprecated''', replaced by [[UniDOS]]** ([[AMSDOS]] compatible DOS driver; see [https://framagit.org/shinra/albireo/albireodos/-/wikis/home AlbiDOS documentation])
  
=== Upcoming software ===
+
<br>
* Serial communication to communicate with a PC
+
 
 +
== List of compatible mouses ==
 +
 
 +
The mouse can be used in 2 modes:
 +
* "boot mode" is a simplified mode which is designed for use in PC BIOSes. It removes some of the complexity of HID. The drawback is, it supports only 3 buttons and 2 movement axes. Basically, that means no mouse wheel.
 +
* standard ("report") mode is more complex, and there may be more compatibility problems with different mice.
 +
 
 +
=== Whitelist ===
 +
The following USB mice work seamlessly with the Albireo in [[SymbOS]].
 +
* Genius DX-150X (GM-150028)
 +
* Logitech M100 (still available; 03/2025)
 +
* Logitech M105
 +
* Microsoft 3902C693
 +
 
 +
=== Blacklist ===
 +
This list contains mice that only have a maximum of three buttons and a scroll wheel, but still don't work with the standard Albireo drivers. More complex gaming mice, etc., are not listed, as they would require a more complex driver anyway.
 +
* Hewlett Packard HP 100
 +
 
 +
<br>
  
 
== Links ==
 
== Links ==
 +
*[https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/albireo-usbsdserial-interface-for-cpc/ Albireo] [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/albireo-usbsd-interface-for-cpc-new-version-without-serial/ Albireo 2.0] Topics on CPCWiki forum
 +
*[[Media:Albireo1.0 schematics.pdf|Albireo KiCad schematics]]
 +
*[https://framagit.org/shinra/albireo Albireo project] [https://framagit.org/offset/albireo-acepansion Albireo ACEpansion] on Framagit
 
*[https://pulkomandy.github.io/shinra.github.io/albireo.html Albireo - Programmer's manual]
 
*[https://pulkomandy.github.io/shinra.github.io/albireo.html Albireo - Programmer's manual]
*[[Media:Ch376ds1.pdf|CH376 datasheet]] USB flash drive or SD card controller
+
*[[Media:Ch376ds1.pdf|CH376 datasheet]] [[Media:CH376DS2.PDF|CH376 auxiliary commands]] USB flash drive and SD card controller
 +
*[[Media:CH372DS1.PDF|CH372 datasheet]] [[Media:CH372DS2.PDF|CH372 auxiliary commands]] USB device mode
 +
*[[Media:Usb-in-a-nutshell.pdf|USB in a Nutshell]] Making Sense of the USB Standard
 +
*[https://wiki.osdev.org/USB_Human_Interface_Devices USB Human Interface Devices] on OSDev wiki
 
*[https://www.nxp.com/docs/en/data-sheet/SC16C650B.pdf SC16C650B datasheet] UART
 
*[https://www.nxp.com/docs/en/data-sheet/SC16C650B.pdf SC16C650B datasheet] UART
 +
 +
<br>
  
 
[[Category:DATA Storage]]
 
[[Category:DATA Storage]]
 
[[Category:Peripherals]]
 
[[Category:Peripherals]]
[[Category:FutureOS]]
 

Latest revision as of 20:24, 9 April 2025

Albireo is an expansion for the Amstrad CPC computers (all models). Its main goal is to provide reliable, fast, cheap and large storage, which it achieves by using a MicroSD card. But the board has a lot of features packed in:

  • USB host port, allowing to connect USB mass storage, mouse, and other USB peripherals
  • USB device port, allowing to link the CPC to a modern computer with maximal link speed (faster than the z80 can handle, and with on-board buffer and hardware flow control).

The interface is based on the WCH CH376 chip and allows access to USB mass storage and other USB devices on CPC.

The CH376 chip implements FAT32 in hardware, which means no filesystem driver is needed on the CPC side. This makes it very easy to use the interface with a microSD card, USB stick or hard drive and access files on the FAT32 partition directly, without using a lot of CPU power or memory on the CPC.

It also implements the lower level aspects of USB, making it relatively easy to write drivers for other USB devices (mouse, joystick, ...). It is simple enough that the mouse driver was initially written completely in BASIC.

The Albireo USB port can drive any USB peripheral, including any standard USB mouse. It is no more needed to dig out a PS/2 compatible mouse for your Symbiface II, or even worse, an Atari/Amiga one for the MultiPlay.

USB is the solution we need to free ourselves from all the weird, ad-hoc, incompatible, expensive, hard to find CPC hardware extensions that we all suffer from. And it opens up the CPC world to countless existing peripherals.


General

What's in it?

  • SD and SDHC card mass storage support with fast (6 MHz) SPI link with the SD card. Hardware FAT32 support for easy file access. Raw sector access also possible for homegrown file-systems and other advanced applications.
  • USB host support with built in mass storage driver, also with FAT32 and direct sector access.
  • Generic USB host with direct control of USB endpoints, for connecting other kinds of USB devices.
  • High-speed (1.5 Mbaud) serial link with built-in USB interface for linking with other computers for fast data exchange. Includes flow control, 16 byte FIFO on CPC side, and 512 byte FIFO on remote side, allowing fast buffered and interrupt-driven operation.
  • Software configurable interrupt routing to either NMI or INT, or interrupt masking. Multiplexing of several interrupt sources: USB host controller, UART, remotely triggered, and CRTC CURSOR signal interrupts are gathered and easily accessible from a single interrupt status register.

How does it work?

  • There are two main devices: the CH376 handles the USB host and SD card side of things, and is accessed at FE80 (data) and FE81 (command/status). The communication side is handled by a SC16C650B, mapped at FEB0-FEB7. This is similar to the chip used on most PC hardware and some Amiga expansions like the SilverSurfer.
  • There is an FT230X chip to convert the UART to USB for connecting with a modern PC (standard serial ports are not that common anymore, and they wouldn't be fast enough anyway). The FT230X also generates 12MHz and 48MHz clocks for the two other chips.
  • The 16C650 "modem control" lines are connected to various things (CH376 interrupt, FT230X general IO pin for remote control) and turns them into interrupts.

What is it useful for?

  • Use both USB mass storage devices and/or USB mice in SymbOS with one or two Albireos, which can be connected at the same time
  • Access mass storage devices with UniDOS; use the USB key or SD card directly from BASIC and well-behaving apps (which support extra disk ROMs and a C drive); load games and tools from the mass storage media


Board revisions

The hardware went through multiple iterations before reaching final state. Each version identifies itself on the USB link and the version should be visible in Windows device manager or lsusb on Linux.

Initial prototypes

The first prototype was an hand-wired one. There were some changes to I/O ports used since then, so it is not usable anymore.

Version 0.9

The first 5 boards were manufactured with an early PCB design, which required some wire-patches to get things working. With the wire-patches, this version behaves the same as 1.0.

Version 1.0

About 20 boards were shipped with version 1.0. Unfortunately, as people started to write software using it it turned out that the serial port chip has compatibility problems with the z80 timings. As a result, this version of the board can use the serial port only with the FIFO disabled, which makes it impossible to reach high baudrates. The board is still perfectly usable if you are interested only in the microSD and USB host port.

Version 1.1

This version of the board replaces the serial chip with a slightly different one. The board still reads "v1.0" as it is the same PCB, only the chip used has changed.

You can identify your board from the info it sends on the USB device port, or by checking the serial chip (square chip on the back of the board). Version 1.0 uses a TI TL16C550D chip. Version 1.1 uses a NXP SC16C650B chip.

Version 2.0

Like the previous version, it provides one USB host port and one µSD slot with built-in support for mass storage and FAT filesystem. However, please note serial port has been removed. It is fully compatible (same port address). Of course, nothing is mapped on serial port addresses.

All interrupts on the board were handled by the SC16C650B chip. It is unclear how they are treated in version 2.0.

This Albireo version has solder jumpers on bottom side (JP2 & JP3) to change the I/O address from the default &FE80/81 to &FE40/41. You need a cutter and a bit soldering to do this change, though. This allows to plug two Albireo cards simultaneously. The latest Albireo and Unidos ROMs together can already handle this (yay!).

This will allow to, for example, use one board for mass storage, and the other to connect various USB devices: mouse, MIDI controller, printer, whatever you need (as long as you find someone to write a driver).

Strictly speaking, it might be possible to handle both a mouse and a USB stick on one card by using a USB hub. But this has to be coded and tested, the CH376 documentation is unclear on this topic. Source

Albireo 2.0 top.jpg Albireo 2.0 bottom.jpg


Hardware

I/O ports

The decoding is clean, this means there aren't any mirror ports or undecoded address bits. Just the addresses listed below are used.

The addresses are in the I/O range, which means you access them with the OUT and IN instructions. They are not memory mapped, and to match with the CPC address decoding, the address is decoded on 16 bytes. This makes using OTIR and similar looped instructions tricky, but is required for compatibility with the CPC.

CH376 registers

  • FE80: "DATA" port (read/write)
  • FE81: "COMMAND" (write) and "STATUS" (read) port

SC16C650B registers

Some of the registers are sharing the same address. A register bit (DLAB) is used to switch between the two groups.

Address DLAB Description
FEB0 0 RBR/THR: RX buffer (read), TX buffer (write)
FEB1 0 IER: Interrupt enable
FEB0 1 DLL: Divisor latch LSB
FEB1 1 DLM: Divisor latch MSB
FEB2 IIR/FCR: Interrupt status (read), FIFO control (write)
FEB3 LCR: Line control
FEB4 MCR: Modem control
FEB5 LSR: Line status
FEB6 MSR: Modem status
FEB7 SCR: Scratch register

DIP switches

The board holds 4 DIP switches for configuration. From top to bottom:

S1 - CH376 interrupt enable

  • When this switch is ON, the usb controller is allowed to generate interrupts to signal the CPC when it is done performing an operation.
  • When this switch is OFF, the usb controller is not allowed to generate interrupts. The CPC must then poll the CH376 STATUS register to know wether the operation is finished.

S2 - CH376 reset enable

  • When this switch is ON, the CH376 will be reset at the same time as the CPC (hardware reset only).
  • When this switch is OFF, the CH376 will not be reset, and the CPC must initialize it using the reset command (software reset). In this case, the CH376 internal buffer may be used to store reset resident data (but I don't know if this is of any practical use, yet).

S3 - Remote reset enable

  • When this switch is ON, the DTR signal from the remote side of the serial link is connected to the CPC reset. This means that the remote side computer can trigger the CPC reset by toggling that line.
  • When the switch is OFF, such reset is not allowed and the CPC is safe.

S4 - Remote interrupt enable

  • When this switch is ON, the DTR signal from the remote side of the serial link is plugged to the DSR line of the UART controller. It then generates an interrupt which the CPC can process.


Software supporting the Albireo


List of compatible mouses

The mouse can be used in 2 modes:

  • "boot mode" is a simplified mode which is designed for use in PC BIOSes. It removes some of the complexity of HID. The drawback is, it supports only 3 buttons and 2 movement axes. Basically, that means no mouse wheel.
  • standard ("report") mode is more complex, and there may be more compatibility problems with different mice.

Whitelist

The following USB mice work seamlessly with the Albireo in SymbOS.

  • Genius DX-150X (GM-150028)
  • Logitech M100 (still available; 03/2025)
  • Logitech M105
  • Microsoft 3902C693

Blacklist

This list contains mice that only have a maximum of three buttons and a scroll wheel, but still don't work with the standard Albireo drivers. More complex gaming mice, etc., are not listed, as they would require a more complex driver anyway.

  • Hewlett Packard HP 100


Links