USB + Ethernet + mapped RAM for MSX computers
Hardware design by Daniel Berdugo - dberdugo1 (AT) yahoo (DOT) es
Welcome to the Dumas project page. Dumas is (will be) a combo cartridge that allows any MSX computer to use USB devices and to be connected to an Ethernet network, providing also 512KBytes of standard mapped RAM.
This page provides information about Dumas features, especially the USB controller, which is the most complex component. If you have any question not answered in this page, please feel free to ask us at any of the e-mail addresses shown above.
General information about Dumas
What is Dumas?
Dumas is a cartridge for MSX computers that implements three components:
How can three components work in one single cartridge?
Internally, Dumas implements slot expander circuitry, so what the MSX sees when Dumas is connected is actually three different cartridges, each in one sepparate subslot. This implies that Dumas must be plugged in a primary (not expanded) slot.
Is there any scheduled release date or price for Dumas?
Not yet, as both software and hardware development are complex and time-consuming tasks. All we can say at this moment is that the project advances and a lot of work has been already done; for example, most of the USBorne features explained below have been already implemented. But there is still a lot of work to do.
How will be Dumas packaged? Will it have a case?
Dumas will be delivered with professional-quality case, package and user manual, as well as with a diskette containing utility software.
Why the name Dumas?
Alexandre Dumas was the author of the novel The Three Musketeers. The motto of the musketeers was one for all and all for one, which reflects the main idea beyond the design of the cartridge.
[ Top ]
USBorne is the name of the USB controller integrated in Dumas. This section provides some details about the main features and behavior of this controller.
USborne is an USB 1.1 host controller. This means that it provides the MSX with the ability to manage USB 1.1 compliant devices. Note that almost all USB 2.0 devices will work without problems on a USB 1.1 host, altough at a lower speed (maximum data transfer speed is 450Mbps for USB 2.0 and 12Mbps for USB 1.1).
USB 1.1 has been choosen instead of USB 2.0 mainly for two reasons. First, the USB host controller silicon used, choosen by its simplicity (in both hardware and software) and low price, supports USB 1.1 only. And second, USB 2.0 provides no real benefits to MSX computers compared to USB 1.1.
Any type of USB device can be used with USBorne, as long as appropriate software is written; USBorne BIOS provides user functions for generic communication and data exchange with any USB device. However, the primary intended use for USBorne is the massive storage. Therefore, its BIOS integrates the MSX-DOS 2 kernel and automatically recognizes and manages standard USB massive storage devices when they are plugged, so that the FAT12 partitions present in these devices (also FAT16 partitions if the FAT16 driver is installed) can be mapped to standard DOS drives. MegaSCSI style floppy disk emulation is also supported.
USBorne will provide one single physical USB port, therefore only one USB device can be plugged at once. However, this device can be an USB hub, so that additional devices can be plugged and used. This way, USBorne can handle up to seven USB devices at the same time. No additional hubs can be connected to the main hub, this is a design limitation intended to make the BIOS software simpler and faster.
USBorne is fully plug-and-play capable, this means that USB devices can be plugged and unplugged at any time and these changes will be detected and managed in real time (the computer will only hang for some tenths of seconds) by USBorne BIOS, as long as interrupts are enabled. Of course, it is not advisable to unplug storage devices while data transfer is in progress or there are open files, since data loss can occur.
Besides of the mentioned user functions, USBorne BIOS provides some extra utility applications available from the BASIC prompt via CALL commands. These applications allow the user to perform some basic tasks, like: display a list of connected devices, register or unregister devices (this will be explained later), assign disk partitions to DOS drives, partition a storage device, or even copy the DOS system files (MSXDOS2.SYS and COMMAND2.COM) to any DOS drive. Of course, standard disk applicatins that perform the same tasks will also be provided. But these built-in applications will be useful for people that has no disk drive on the computer, so that in any case it is possible to immediately get started with an USB storage device.
Device addresses and device registration
The USB protocol is similar to the SCSI protocol in that each device connected to the USB bus has an unique address assigned, which allows the host to select the device with which it communicates at a given moment. An USB address can be any number in the range 1-127; in the case of USBorne, devices have addresses in the range 1-7.
However there is an important difference. The address of a SCSI device is fixed in hardware (usually selectable via a switch or a jumper), so the user must be careful to not connect two devices with the same address to the SCSI bus. In the USB world, however, devices have no fixed address. Instead, the host dynamically assigns addresses to the devices when they are plugged. This means that the same device can have different addresses if it is unplugged and plugged again to the host.
For some tasks, however, it is desirable that a given device have a fixed address; for example for disk partition assigment. For this reason, USBorne allows the user to register devices. A registered device has, concerning to USBorne BIOS, some features that unregistered devices have not:
In summary, a registered storage device acts like a SCSI device in regard to device addresses and disk partitions. It is recommended to register those devices that will be used on a regular basis.
Storage devices and drive assignation
USBorne will automatically detect any standard storage device and manage it as such, allowing the user to assign existing disk partitions to DOS drives. A "standard storage device" is one that complies the USB Mass Storage Class Specification, and whose transport protocol is either Bulk-Only Transport or Control/Bulk/Interrupt Protocol. Most of the modern USB storage devices stick to these standards. Devices whose package says "Works on Windows/Linux without drivers" have many chances to be standard.
Unfortunately, as usual there are good devices, fair devices and completely crappy devices around there. Some USB storage devices claim to be standard, but violate the specifications in such a way that render them unusable by USBorne. Therefore it is impossible for us to guarantee that a given device will work with USBorne. However, in the future we will open a web page in which USBorne users will be able to tell their experiences with their particular devices, information that can be useful for other users.
On the other hand, there are devices that act the opposite way: they are standard but claim to be not (usually declaring a device type of "vendor-specific"). USBorne can manage these devices as long as they are registered as camouflaged storage devices. When a device is registered as such, USBorne will store in non-volatile memory the vendor and product identifiers, so that when it is plugged, it will be treated as a storage device even when it claims not to be so.
Regarding DOS drives, USBorne can have, as any other standard DiskROM, from zero to eight drives reserved for itself (this number is easily changeable). These drives can be on any of these states:
Drive assignations can be easily changed by the user. An interisting state is reserved for dynamic assignment. It works as follows: when an unregistered storage device is plugged to USBorne, BIOS will automatically assign the first drive on this state to the first partition on the device (state 3). When the device is unplugged, the drive will become reserved for dynamic assignment (state 2) again. This is useful when temporarily plugging a device just to transfer some files; if these files are in the first partition of the device, the user needs not to bother about making the device visible on a drive.
By the way, the FAT16 driver made by Okei works in USBorne without need for any modification.
USBorne supports floppy disk emulation. This feature allows the execution of programs (usually games) that were released in disks that have no defined filesystem (data is retrieved by directly reading disk sectors), or do not work in MSX-DOS 2.
The method used is similar to the one used by MegaSCSI. The floppies to be emulated are dumped to disk image files in a DOS drive assigned to an USB storage device (the device must be registered). These image files are then assigned to extended drives by using a special program; USBorne provides 16 extended drives. The computer is then reset in emulation mode, DOS will boot with one single drive assigned to USBorne, and the contents of the first extended drive (that is, the contents of the disk image file assigned to that drive) will be read whenever DOS requests sector data. With two keystrokes it is possible to change the extended drive (the disk image file) from which data will be read.
Extended drives can be read or written (by direct sector access) at any time, even when the computer is not in floppy emulation mode. The standard DiskROM routine DSKIO has been extended so that when the drive number passed has bit 7 set, it means that it refers to an extended drive number.
Hubs and power topology
The term power topology refers to the way the electrical power is distributed on the USB bus. It is important because not all devices can be connected to all hubs, as will be explained now.
The USB bus works at a fixed voltage of 5V. Regarding to the power supply, a device can be bus-powered or self-powered. A bus-powered device takes all the power it needs from the USB bus, and is allowed to drain up to 500mA of current this way. A self-powered device has its own external power supply, and is allowed to drain up to 100mA from the USB bus (so that basic communication with the host is possible even when the power supply fails).
An USB hub is a device which has itself USB ports so that additional devices can be connected to the bus. According to the USB specification, hubs can be chained so that up to 127 devices can be connected simultaneously to the USB bus. In the case of USBorne, however, only one level is allowed: a hub can be connected to the USBorne root port, but no additional hubs can be connected to this hub. It has been designed this way to make BIOS simpler and faster. In addition, the maximum number of devices that USBorne BIOS will handle at once is seven (not including the hub itself). In the rare event that a hub with more than seven ports is connected to USBorne, only the first seven ports will be useable.
As any other USB device, hubs can be bus-powered or self-powered. There are important differences between both:
This implies that bus-powered hubs have an important limitation: only self-powered devices can be connected to their ports (or bus-powered devices with an extremely low power consumption). This excludes devices like pendrives, small hard disks or multimedia card readers.
Note also, that the source of power of the hub is the MSX power source itself. A bus-powered hub will take 500mA from MSX, while a self-powered hub will take only 100mA.
For these reasons, here is a strong recommendation: Do NOT use bus-powered hubs with USBorne. Use only self-powered hubs.
On the other hand, there are self-powered hubs whose power supply does not provide the power required according to the number of ports of the hub (500mA per port). This causes that when all the ports are filled with bus-powered devices, some of them will not work.
Therefore, when buying a self-powered hub, look at its power supply and check that it complies the following rule: The power supply of a N-port hub must provide at least N/2 A of current to the hub. This means for example, 2A for a 4 port hub, and 3.5A for a 7 port hub. With lower current, the hub will not work properly when all its ports have devices plugged in. (Note that you should check this rule when buying a hub for your PC as well!)
BIOS function calls
USBorne BIOS provide function calls for programmers, so that they can write software than interacts with USB devices or with USBorne itself. These function calls allow programmers to:
These function calls can be used from any assembler program via a simple interslot call, or even from BASIC programs (see below).
BASIC extended commands
USBorne BIOS provides some BASIC extended commands (that is, commands that are used from the MSX BASIC prompt via the CALL command) that will hopefully be useful for the user. This section briefly explains these commands.
This command allow the usage of all the USBorne BIOS functions from BASIC programs. Registers data address is the address of a 8 byte memory area where the user must set the values of the Z80 registers that will be passed to the function (A is the function number; BC, DE, HL are parameters); the value of the registers after the call (A is an error code; BC, DE, HL are results) will be stored in the same memory area.
For example, the header of the function that retrieves a string descriptor from an USB device is as follows:
The following BASIC program will then retrieve and display an USB string descriptor:
This command will show a summarized list of all the devices currently connected to USBorne. The same list appears when the computer boots. Only the device address and the manufacturer and product names (when they are available) are shown.
Note that if a device has not an assigned USB address, it will not appear on the list. A device may not have an address for a number of reasons; for more detailed information, use the USBMENU utility and check the state of the hub ports (see below).
This command will start a program that allows the user to perform some useful maintenance tasks, namely:
This command will start a program that allows the user to physically format a storage device, and to create FAT12 and FAT16 partitions. This program is very simple, a more complex utility will be supplied on disk.
This command will create the system files COMMAND2.COM and MSXDOS2.SYS on the root directory of the specified drive (it needs not to be an USBorne drive, any existing drive can be specified). Used together with USBFDISK, can be useful to create a bootable disk partition.
[ Top ]
ObsoNET is the name of the 10Base-T Ethernet controller integrated in Dumas. It allows to connect the MSX to an Ethernet network or to an ADSL router.
ObsoNET has its own verion of InterNestor Lite, a TCP/IP stack for MSX computers. A Telnet client and an FTP client are supplied as well, but additional software can be developed by using the user functions provided by the stack.
For those willing a lower-level access to the network, ObsoNET BIOS provides also some useful function calls, that allow the programmer to:
ObsoNET was manufactured as a standalone card in the past, but now it is exclusively one of the components of Dumas.
[ Top ]