CALL USBMOUNT
This page was last modified 10:48, 5 July 2021 by Mars2000you.

Contents

Effect

Displays, mounts or unmounts a disk image file when you use a storage device connected to the USB port of the Rookie Drive.

Notes:

  • A disk image file will be mounted as read-only if it has the read-only attribute set.
  • The system doesn't currently provide any way to create, delete, rename, move, change attributes, or otherwise manipulate the directories and disk image files on the storage device from within the MSX itself; you'll have to do that from another USB-capable computer (you can, of course, write to mounted disk image files using the MSX-DOS commands or Disk BASIC instructions).

Syntaxes

  • CALL USBMOUNT
  • CALL USBMOUNT ("<DiskName>")
  • CALL USBMOUNT (<DiskNumber>)

Parameters

When used without any parameter, CALL USBMOUNT will display the name of the disk image that is currently mounted.

<DiskName> is the name of the disk image that will be mounted. It must be in the current directory.

If you want to mount a file of another directory, change to that directory first using CALL USBCD.

<DiskNumber> is a number between -1 and 255:

  • if you use -1, the currently mounted disk image will be unmounted
  • if you use 0, the default file in the current directory will be mounted
  • if you use a number between 1 and 255, the nth file in the current directory will be mounted. Hidden files and files whose name starts with an underscore "_" character don't count.

Examples

CALL USBMOUNT ("TEST.DSK")
CALL USBMOUNT (25)

Hot Swap mechanism

This mechanism can be used with the 35 first disk image files in a directory and is very useful for multi-disk games, as it allows to quickly mount a different disk image file from the same directory when the system is about to perform disk access (for example when a game displays "change disk and press any key").

You need to press the key corresponding to the numbers 1-9 or the letters A-Z, then the nth disk image file found in the directory of the currently mounted file will be mounted right before the actual disk access happens. For example, press "1" to mount the first file, or "A" to mount the 10th file.

Alternatively, you can press the Code/Kana key instead. Then the CAPS led will lit (if enabled) and the system will wait for you to press the appropriate 1-9 or A-Z key; or you can just press Code/Kana again if you change your mind.

The files taken in account when using this mechanism are the same ones that are listed in the boot menu, this means that hidden files and files whose name starts with an underscore "_" character won't be counted.

Related to

CALL USBCD, CALL USBFILES, CALL USBHELP, CALL USBMENU, CALL USBMOUNTR

Compatibility

RookieDrive BASIC