Changes

Albireo

2,776 bytes added, 11 April
/* I/O ports */
== 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:
* USB host port, allowing to connect USB mass storage, mouse, and other USB peripherals
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.''' <br> == General ==
=== What's in it? ===
* 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 <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.
==== 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.
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.
=== How does it work? ===* There are two main devices: All interrupts on 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 board were handled by a the SC16C650B, mapped at FEB0-FEB7. This is similar to the chip used on most PC hardware and some Amiga expansions like the SilverSurfer.* There It is an FT230X chip to convert the UART to USB for connecting with a modern PC (standard serial ports unclear how they are not that common anymore, and they wouldn't be fast enough anyway)treated in version 2. 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 interrupts0.
=== What is it useful for? ===Not much currently because there is no software yet, but in This Albireo version has solder jumpers on bottom side (JP2 & JP3) to change the future: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!).
* 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* Connect This will allow to another computer like the CPC Booster, load snapshotfor example, DSK or other files from it and write them to floppies or the use one board for 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) the other to connect the CPC various USB devices: mouse, MIDI controller, printer, whatever you need (as long as you find someone to the Internetwrite a driver).
There are Strictly speaking, it might be possible to handle both a drivers in FutureOS mouse and SymbOS a USB stick on one card by using a USB hub. But this has to use 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] [[File:Albireo with an USB mouse2.0 top.jpg|500px]] [[File:Albireo 2.0 bottom.jpg|500px]] <br>
== Hardware ==
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 ====
* 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 ===
* [[UniDOS]] ([[AMSDOS]] compatible and modular DOS; see [https://unidos.cpcscene.net UniDOS official website])
* [[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)
* [[FutureOS]] (USB mouse support)
* [[AlbiDOS]] **'''deprecated''', replaced by [[UniDOS]]** ([[AMSDOS]] compatible DOS driver; see [https://framagit.org/shinra/albireo/albireodos/-/wikis/home AlbiDOS documentation])
<br> ==List of compatible mouses = Upcoming software = 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]].* Serial communication to communicate 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 PCmore complex driver anyway.* Hewlett Packard HP 100 <br>
== Links ==
*[https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/albireo-usbsdserial-interface-for-cpc/ Topic 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]
*[[Media:Ch376ds1.pdf|CH376 datasheet]] [[Media:CH376DS2.PDF|CH376 auxiliary commands]] USB flash drive or 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
 
<br>
[[Category:DATA Storage]]
[[Category:Peripherals]]
[[Category:FutureOS]]
13,147
edits