CALL FORMAT
This page was last modified 19:13, 9 April 2020 by Mars2000you. Based on work by Rderooy and Gdx and others.

This instruction is available in Disk Basic and RookieDrive Basic. The Disk Basic instruction can be extended with FormatMaster BASIC.

Contents

CALL FORMAT in Disk Basic

Effect

Formats a disk and deletes all existing files.

Syntax

CALL FORMAT

Usage

This instruction does not take parameters, but asks the needed information in interactive mode. When the instruction is asking questions the procedure can still be cancelled with CTRL+STOP without changing the disk content.

If the system has more than one active physical or logical drive that can be formatted, the first question will be "Drive name?" followed by list of valid options. There can be up to 8 drives (A-H). In case there is only one active drive, this question will be skipped.

The next question depends of what controller the selected drive was associated with. Each disk controller has its own options to select from. Typically you will get a list of different formats that the controller can support. The number of options depends of the disk controller firmware. You can choose them by selecting the appropriate number from the keyboard. If there are no options available this question will be skipped. MSX system can have up to 4 physical disk controllers attached at the same time.

Example

CALL FORMAT
Drive name? (A,B) A

1 - 1 side, double track
2 - 2 sides,double track

? 2
Strike a key when ready
Format complete
Ok

Format

The format used for 3.5" and 5.25" disks is FAT12, as also used by MS-DOS and derivatives. The MSX however does not support sub-directories, unless you use a Turbo R computer, the original MSX-DOS2 cartridge or one of its European versions. This cartridge requires at least a MSX2 computer with internal or external disk drive. Besides, it must be a MSX2 with at least 128kB RAM if you use a MSX-DOS 2 cartridge without built-in memory mapper.

If you use a Turbo R computer or a MSX-DOS 2 cartridge, the formatting will be different if you boot with DOS2 enabled or disabled. DOS2 is not enabled if you boot with a DOS1-formatted disk in drive A (on MSX2 or higher) or if you press the '1' key during the boot sequence (only on MSX Turbo R).

See Design of the FAT file system for more information, including MSX specifics.

Storage capacity

The most used formattings on the MSX disks are as follows:

  • 3.5" Single Sided, Double Density (1DD)
    • 1 side * 80 tracks * 9 sectors per track * 512 bytes per sector = 368640 Bytes (360kB)
  • 3.5" Double Sided, Double Density (2DD)
    • 2 sides * 80 tracks * 9 sectors per track * 512 bytes per sector = 737280 Bytes (720kB)
  • 5.25" Single Sided, Double Density (SS,DD)
    • 1 side * 40 tracks * 9 sectors per track * 512 bytes per sector = 184320 Bytes (180kB)
  • 5.25" Double Sided, Double Density (DS,DD)
    • 2 sides * 40 tracks * 9 sectors per track * 512 bytes per sector = 368640 Bytes (360kB)

Related to

KILL

Compatibility

Disk BASIC 1.0 or higher


CALL FORMAT in Disk Basic + FormatMaster Basic

Effect

Formats a disk and deletes all existing files on MSX2 and higher. The user can choose the normal mode or a fast mode.

Syntax

CALL FORMAT

Usage

This instruction does not take parameters, but asks the needed information in interactive mode. When the instruction is asking questions the procedure can still be cancelled with CTRL+STOP without changing the disk content.

The first question will be "Normal- or Fast- format ? (N,F)". If you answer N, the normal Disk BASIC procedure will follow. If you answer F, you get eventually the question about the drive name, then you will be asked to make a choice between 4 different fast formattings:

  • 1) 40 tracks - 8 sectors a track - FA
  • 2) 80 tracks - 8 sectors a track - FB
  • 3) 40 tracks - 9 sectors a track - F8
  • 4) 80 tracks - 9 sectors a track - F9

FA, FB, F8 and F9 are the media descriptors respectively corresponding to 3.5" 320kB, 640kB, 360kB and 720kB disks.

Compatibility

Disk BASIC 1.0 with FormatMaster BASIC on MSX2 and higher machines

Note: The FormatMaster extension is not compatible with DOS 2.0


CALL FORMAT in RookieDrive Basic

Effect

a) Formats disk inserted in a standard USB floppy disk drive connected to a Rookie Drive interface.

The procedure is similar to the original Disk Basic instruction, but will propose 4 options for the formatting:

  • 1) 720K, full format
  • 2) 720K, quick format
  • 3) 1.44M, full format
  • 4) 1.44M, quick format

The quick format skips the physical formatting and only initializes the boot sector, FAT and root directory of the disk.

Due to MSX-DOS 1 limitations, the 1.44 format is a custom FAT format with 4 sectors per cluster and 3 sectors per FAT. This is a quite big cluster size and for disks with many small files it will be a waste of space, but if you really want to use 1.44M disks in MSX-DOS 1, that's the only way.

b) Formats disk image inserted in a Rookie Drive interface.

Note: experimental and not fully implemented instruction (currently limited to 720kB disk images)

It's therefore recommended to use on PC the Disk Manager utility, available here, for creating new formatted disk images and adding files to them.

Syntax

CALL FORMAT

Related to

CALL CREATEDISK

Compatibility

RookieDrive BASIC