AlbiDOS is the DOS driver for MicroSD card reader and USB mass storage of the Albireo expansion card from PulkoTronics.
It provides as much as possible a backward compatibility with default AMSDOS ROM. Then, it matches all AMSDOS and Firmware cassette manager APIs and you should simply rely on AMSDOS and Firmware documentation.
Anyway, a few additional things are available and are explained below.
Additionally, do not hesitate to come and chat with us at #cpc or #cpc-fr (freenode IRC network).
Installation:
- AlbiDOS can work in any ROM slot but, for a better experience, it should always be in a slot with a lower number than AMSDOS or other compatible DOS (such as iMPdos).
- AlbiDOS can work in two different modes (the current mode is displayed at boot screen):
- Integrated: AMSDOS was found in a higher slot number and all fallback and compatibility mechanism are installed.
- Standalone: AMSDOS was not found an AlbiDOS will just handle Albireo drives (no fallback is possible).
- AlbiDOS can also be installed in ROM slot 7 for maximum compatibility (some old softwares are relying directly on ROM slot 7 to handle DOS instead of using system-friendly way). In that case you should install AMSDOS to slot 15 to ensure its memory allocation is always &A700 (also for maximum compatibility). Any additional AMSDOS compatible DOS (such as iMPdos) should be then installed between 7 and 15 (to take advantage of AlbiDOS RSX passthrough feature).
- This is the better way to have softwares which are manually initializing ROM 7 as DOS to work on MicroSD card or USB stick through AlbiDOS.
- Also, when softwares are manually initializing ROM 7 as DOS, AlbiDOS will automatically find and initialize AMSDOS too, so that if that software was started from floppy, it will continue to work normally from floppy. Additionally, AlbiDOS retains the current drive, so that badly coded softwares which are expecting floppy drive A will now also work from drive B.
- Please note that ParaDOS cannot be installed in slot 15 (it will crash). If you want to use AlbiDOS and ParaDOS together your are stuck with ParaDOS in slot 7 (better) or 6, and AlbiDOS in a slot between 1 and 6.
Using drives and path:
- AlbiDOS handles file path in all API provided with a filename.
- Basic LOAD"path" command (as well as OPENIN"path" or RUN"path") can be used for navigation in the file system, it selects the current media and directory).
- Basic SAVE"dir/" command (as well as OPENOUT"dir/") can be used to create a directory "dir" in the current path.
- Paths are formed this way: [DEVNAME:][path/]file. Where DEVNAME can be either a logical drive or a DOS device name.
- Logical drives are A and B (user number can be appended like with AMSDOS but with no effect on non-AMSDOS devices). By default, A points to the MicroSD card and B to the USB Mass Storage device.
- DOS device names are:
- SD for the MicroSD card,
- UMS for the USB Mass Storage device,
- DFA for the floppy disc A,
- DFB for the floppy disc B,
- TAPE for the tape.
- Path can have up to 8 directories in depth: dir1/dir2/.../dir7/dir8.
- ":" is referencing the root of the current (or preceding) drive.
- LOAD":" go back to root for current path.
- LOAD":file": open file at the current drive root.
- "/" is referencing the parent directory.
- LOAD"/": go to parent directory for current path.
- LOAD"/file": open file at the parent directory from the current path.
- LOAD"dirA1/dirB1//dirA2/file" is equivalent to LOAD"dirA2/file".
- LOAD"DEVNAME:" selects provided DEVNAME as the media associated with the current drive.
- ":" is referencing the root of the current (or preceding) drive.
- AlbiDOS retains the current active disc ROM (AMSDOS or AlbiDOS), current drive (A or B), current media selected for each drive, and path so that you will get them back at next reboot. This information is stored in a file named !ALBIREO.CFG at root of MicroSD card.
- |DISC then reboot: you will reboot using current floppy drive by default (could be A or B).
- |DOS then reboot: you will reboot using current Albireo drive by default (could be A or B).
- LOAD"dir1/dir2" then reboot, the default path will remain dir1/dir2.
Integration with other DOS:
- AlbiDOS integrates a passthrough for RSX and BIOS vectors, which means that when it is not activated (for instance after a |DISC was issued or when another DOS took over read/write indirections), it will just pass commands to this ROM in a transparent manner.
- |DOS activates AlbiDOS.
- |DISC, |DISC.IN, |DISC.OUT calls are wrapped to the next ROM implementing them (which is usually AMSDOS, but which could also be RODOS or any DOS ROM dealing with disc drives).
- |TAPE, |TAPE.IN and |TAPE.OUT are installing back firmware tape read/write indirections.
- All other RSX will be redirected the ROM owning read/write indirections (it ensures that |ERA, |REN, |DIR, and so on will always be used from the proper ROM).
- Relevant CTRL x BIOS vectors will be exclusively redirected to the AMSDOS ROM when it owns indirections (wherever it is located, not necessary in slot 7).
New file types
- AlbiDOS handles two new file binary types:
- Type &08: configuration file (!ALBIREO.CFG is of this type).
- Type &0A: symbolic link file (files created with |MAKELINK are of this type).
At boot:
- If Albireo expansion card is not found, then AlbiDOS will do nothing.
- Pressing SHIFT (but not CONTROL) will skip AlbiDOS.
- Pressing CONTROL (but not SHIFT) will force AlbiDOS to reset its configuration (old !ALBIREO.CFG file is deleted and a beep is emitted).
- Pressing both SHIFT and CONTROL has no effect.
- If an incompatible configuration file is found (because of an AlbiDOS new version), it will be re-created automatically (in that case a beep is also emitted).
Improved RSX:
- |DRIVE[[,"A|B"][,DEVNAME]:
- Without parameters; it will display the list of the detected devices on the system (SDCard, USB, floppy and tape) and the A/B drives configuration and selection.
- With one parameter it works exactly like with AMSDOS.
- With two parameters, it let you select which media to attach to a drive.
- |REN,"new file or directory name","path to file or directory to rename": now a full path to the file to rename can be given. Please note that the new file name shall still be a stock file name (|REN cannot be used to move files).
- |ERA,"pattern to file or directory": now a full path to the file to delete can be given and confirmation is asked on directories and read-only files (note that erasing a symbolic link will actually delete the link itself, not its target).
- |DIR,"pattern": patten can now include a path.
New RSX:
- |DOS: activate AlbiDOS media handling (regular |DISC or |TAPE will switch you back to exclusive floppy disc or tape handling).
- |PATH[,@a$]: return the current path (on display if no variable pointer is provided).
- |PROTECT,"pattern to file": mark a file as read-only.
- |UNPROTECT,"pattern to file or directory": mark a file as read and write.
- |HIDE,"pattern to file or directory": mark a file as hidden (system).
- |SHOW,"pattern to file or directory": mark a file as visible (user).
- |MAKELINK,"path to link to create","path to the file or directory to link": create a symbolic link (note that the link target can be itself a link).
- |READLINK,"path to link"[,@a$]: return the target path of a link (on display if no variable pointer is provided).
- |INFO,"pattern to file": list files with detailed information (similar to Utopia's |INFO).
- Like with |DIR and CAT the character "*" is added at end of file if it is read-only.
- Hidden files are also displayed; they are marked with a "!" character.
- Size is displayed in 32-bit hexadecimal value.
- If present, information from the binary header are displayed. They are prefixed with the file type represented by a character (computed as in Amstrad Soft968 specifications or Utopia):
- Legacy ones:
- "$" for a BASIC file.
- "%" for a protected file.
- "&" for a binary file.
- "'" for a protected binary file.
- "(" for a screen image file.
- "*" for an ASCII file.
- New ones:
- "," for an AlbiDOS configuration file.
- "." for an AlbiDOS link file.
- Legacy ones:
New BIOS vectors:
-
CTRL J: command.
-
Input:
- C = command identifier.
- Other input registers depends on the command.
-
Output:
- Carry = 1: success (registers values depends on the command).
- Carry = 0: failure (unknown command or invalid input).
-
Altered:
- Only command output registers are modified.
-
Available commands:
-
CMD_CAT_FAKED_PARENT (0): automatically add a faked « parent » directory entry at the beginning of the CAS_IN_CATALOG buffer. This entry is named "/".
- Input:
- A = status, &00=Yes, &FF=No (default).
- Output:
- A = old value.
- Input:
-
CMD_DEVICE_LIST (1): return the list of the supported DOS devices names.
- Input:
- DE = 64 bytes buffer where to store the list.
- Output:
- DE = pointer to the input buffer filled with the list of the supported DOS devices. Each device name is a string terminated with a bit 7 to 1 on the last character. The character 255 marks the end of the list.
- Input:
-
CMD_DEVICE_INFO (2): get detailled information about a DOS device.
- Input:
- HL = pointer to the name of the DOS device to get information from (in a form of a string terminated by bit 7 = 1).
- DE = 64 bytes buffer where to store information.
- Output:
- DE = pointer to the input buffer with device detailled information:
- 1 byte: device attributes
- Bit 0: device availability (a media is inserted).
- Bit 1: device supports directories.
- Bit 2: device is write protected.
- Bit 3: device is removable.
- 1 byte: filesystem identified (not implemented yet, always 255).
- 4 bytes: free space in kilo-bytes (LSB first).
- 4 bytes: capacity in kilo-bytes (LSB first).
- n bytes: description of the device (string terminated with bit 7 = 1).
- 1 byte: device attributes
- DE = pointer to the input buffer with device detailled information:
- Input:
-
CMD_CAT_FAKED_PARENT (0): automatically add a faked « parent » directory entry at the beginning of the CAS_IN_CATALOG buffer. This entry is named "/".
-
-
CTRL Z: alias to |DOS RSX. To be used to detect that AlbiDOS is a DOS ROM compatible with AMSDOS and to provide a generic way to activate it. Any newly coded DOS ROM should implement this BIOS vector (for instance, iMPdos does).
CAS_IN_OPEN:
- If a directory path is given as input, then it will enter it and update the current path. In this case it will return with NC and Z flags, and A = DSK_ERR_DIRECTORY_CHANGED (&17) or DSK_ERR_QUIET_DIRECTORY_CHANGED (&97). No file is actually opened.
- As a consequence, LOAD"dir" or OPENIN"dir" enters the directory « dir ».
CAS_IN_CLOSE: Nothing special.
CAS_IN_ABANDON: Nothing special.
CAS_IN_CHAR: Nothing special.
CAS_IN_DIRECT: Nothing special.
CAS_RETURN: Nothing special.
CAS_TEST_EOF: Nothing special.
CAS_OUT_OPEN:
- If a path terminated by "/" is given, then a directory is created. In this case it will return with C and Z flags, and no file is actually opened.
- As a consequence, SAVE"dir/" or OPENOUT"dir/" creates a directory « dir ».
CAS_OUT_CLOSE: Nothing special.
CAS_OUT_ABANDON: Nothing special.
CAS_OUT_CHAR: Nothing special.
CAS_OUT_DIRECT: Nothing special.
CAS_IN_CATALOG:
- If returned DE = &FFFF, it means that free size if at least 65535KB (it could be up to 16TB).
- In returned buffer:
- If a file size is &FFFF, it means that the file is at least 65535KB (it could be up to 4GB).
- If an entry if both read-only and has a size of 0 byte, then it means that it is a directory.
- During catalog display:
- Sizes display switches automatically between KB, MB, GB or TB depending on the actual size.
- Directories are marked [DIR] instead of putting the size.
- Indication about read-only directories is skipped because of compatibility limitation in buffer storage (you need to use |INFO or |DIR to see this information).