VIC-1541
From C64-Wiki
Short name for the Commodore disk drive VIC-1541 (also CBM-1541 or Commodore-1541; in Germany VC-1541), which is useable with 5,25"-disks. This disk drive has only one read/write head. It is connected with a data cable on the serial bus to the Commodore 64. In consequence of the long production time of the C64, the VIC-1541 was produces with various cases, with internal or external power supplies, starting in 1983. Two newer models were introduced later, the VIC-1541C (in 1986) and the VIC-1541-II (in 1988).
Contents |
[edit] Features
The successor of the VIC-1540, which can only be used with the VIC-20, can be used with the C64 and with some newer Commodore computers like C128/D/DCR, C16/116 and Plus/4. On the front of the case are 2 LEDs - a green for power control and a red for working status. When the red LED is flashing, an error occurred.
On the back side of the case are two interfaces for serial data cables, the power switch and power connector. On the VIC-1541-II are two DIP-switches to change the device number (default 8). Depending on what model the current supply was, this happened with a rubber connector or a power-supply.
One side of a 5,25"-disk in the VIC-1541 has a capacity of 174,848 bytes, which are 683 blocks, but only 664 blocks are useable.
The VIC-1541 disk drive knows the following file formats:
- PRG program files (maximum filesize approximately 200 blocks)
- SEQ sequential files (only usable with computer applications; max. filesize 168.656 Bytes)
- USR user-files (special format of a sequential file)
- REL relative files (only usable with computer applications; max. filesize 167.132 Bytes with max. 65.535 data sets)
- DEL deleted files (with hints or manipulation of the directory this file type can be viewed)
- If the < char is printed after the file format, the file cannot be overwritten. It is write-protected by software.
- If the * char is printed after the file format, the file isn't properly closed. The deleting of this file is done only through the DOS command VALIDATE!
- Maximal number of files in a directory is 144
The data transfer rate is about 300 Bytes/s, but can be higher by using a fast loader (up to about 10 KByte/s). The used version of Commodore DOS is 2.6.
[edit] Technical Details
- Chips: MOS 6502 (CPU) with ca. 1 MHz, 2x VIA 6522
- RAM: 2 KByte (4x 2114)
- ROM: 16 KByte; type numbers:
1541-1: 325302-01 (DOS V2.6 LoROM $C000-$DFFF),
901229-XX (DOS V2.6 HiROM $E000-$FFFF)
1541-C: 251968-01 (DOS V2.6 $C000-$FFFF)
1541-2: 251968-03 (DOS V2.6 $C000-$FFFF)
- Interfaces: serial bus
- Total capacity: 174,848 bytes per disk
- Sequential files: 168,656 bytes per disk
- Relative files: 167,132 bytes per disk, 65,535 records per file
- Entries of a directory: 144 per disk
- Sectors per track: 17 to 21
- Tracks: 35
- Blocks: 683 (664 blocks free)
- Dimensions: 97×200×374 mm (3.8×7.8×14.7 inches)
- Weight: 5 kg (11 lb)
- Current supply: 100,120,220 or 240V with 50 or 60 Hz
- Power input: 25W
[edit] Disk Drive Commands
The disk drive is controlled using a number of drive commands.
- Format a disk (NEW)
OPEN 1,8,15,"N:Diskname, ID": CLOSE 1- or:
OPEN 1,8,15: PRINT#1,"N:Diskname, ID": CLOSE 1 - The diskname has got max. 16 chars and the ID has got 2 chars.
- Initialize drive (INITIALIZE) e.g. to detect disk change
OPEN 1,8,15,"I":CLOSE 1- Validate a disk (VALIDATE)
- Does a check/rebuild of the disk's maintenance data structures (directory, block allocation map, etc.)
OPEN 1,8,15,"V": CLOSE 1- Copy files (COPY)
OPEN 1,8,15,"C:NewFile=OldFile": CLOSE 1- The command string might be maximal 40 chars in lenght!
- Concatenate files (COMBINE)
OPEN 1,8,15,"C:NewFile=1.OldFile,2.OldFile,...": CLOSE 1- The command string might be maximal 40 chars in length!
- Rename a file (RENAME)
OPEN 1,8,15,"R:New_Name=Old_Name":CLOSE 1- Delete a file (SCRATCH)
OPEN 1,8,15,"S:filename": CLOSE 1- Wildcards such as * (matches any chars) or ? (matches one char) are supported.
- For example:
OPEN 1,8,15,"S:*":CLOSE 1all files of a disk will be deleted. - With comma (,) more than one file can be deleted.
- Overwrite a file (REPLACE)
SAVE"@:filename",8or
OPEN 1,8,15,"@:filename,S,W": CLOSE 1.
- The REPLACE command is buggy - it may fail and you could lose all data of a disk. The better way is to first to use SCRATCH and after that the BASIC command SAVE.
- These BASIC-commands can be used with the disk drive, too: CLOSE, GET#, INPUT#, LOAD, OPEN, PRINT#, SAVE and VERIFY and status variable ST.
[edit] Hints
- Activate VIC-20 mode for VIC1541 (slightly faster, incompatible with C64):
OPEN 15,8,15,"UI-":CLOSE 15 - Activate C64 mode for VIC1541:
OPEN 15,8,15,"UI+":CLOSE 15
- device number (8…15) can be changed temporarily by software with:
OPEN 15,8,15:PRINT#15,"M-W";CHR$(119);CHR$(0);CHR$(2);CHR$(device number+32)+CHR$(device numver+64):CLOSE 15
- device number (8…11) can be changed permanently by hardware over DIP-switches ( 1-2 or A-B):
| Device number | DIP-1/A | DIP-2/B |
|---|---|---|
| 8 | on | on |
| 9 | off | on |
| 10 | on | off |
| 11 | off | off |
| top: on - bottom: off | ||
- In some models, that don't have any DIP-switches, the device number can be set by manipulating the terminal tag. The terminal tags are called "device jumpers" on the board of the disk drive.
[edit] Content of the test-/demo diskette
Side 1:
13 HOW TO USE PRG (engl. instruction 1.part) 5 HOW TO USE TWO PRG (engl. instruction 2.part) 1 C-64 WEDGE PRG (Utility Starter C64) 4 VIC-20 WEDGE PRG (Utility Starter für VIC/VC20) 4 DOS 5.1 PRG (Utility Main Program) 11 COPY/ALL PRG (Copy Program) 9 PRINTER TEST PRG (Printer Test) 4 DISK ADDR CHANGE PRG (Change device number by software) 4 DIR PRG (Easier using of disk commands) 6 VIEW BAM PRG (BAM Viewer) 4 CHECK DISK PRG (Diskcheck with VALIDATE) 14 DISPLAY T&S PRG (Block Viewer in Decimal or Hexadecimal) 9 PERFORMANCE TEST PRG (Floppy Check) 5 SEQUENTIAL FILE PRG (Program example for SEQ-files) 13 RANDOM FILE PRG (Program example for special DOS-Commands) 558 BLOCKS FREE
Remark: The content of the test-/demo diskette can change slightly depending on the year of construction or modell.
[edit] Links
| Wikipedia: Commodore_1541 |
