The Commodore 1540 (also known as the VIC-1540) was the companion floppy disk drive for the Commodore VIC-20 home computer. It used single-sided 5¼" floppy disks, on which it stored roughly 170 KB of data utilizing Commodore's GCR data encoding scheme.
Because of the low price of both the VIC-20 and the 1540, this combination was the first computer with a disk drive to be offered on the US market for under $1,000, although the combination of the Commodore 64 and 1541 would prove more enduring. The 1540 was an "intelligent peripheral" in that it had its own 6502 CPU (just like its VIC-20 host) and a resident DOS on-board in ROM – contrary to almost all other home computer systems of the time, where the DOS was loaded from a boot floppy¹ and was executed on the computer's CPU.
Due to a timing conflict with the C64's video chip, the C64 did not work properly with the 1540. The better-known 1541 was mechanically and electronically identical to the 1540 but had a revised ROM that permitted it to work with the C64 by slowing the drive down slightly. However, it was possible to revert the 1541 into 1540 mode with a Commodore BASIC software command (
OPEN 15,8,15, "UI-" : CLOSE 15) to permit better speed when used with a VIC-20.
The 1540 is relatively rare because the C64 followed close on the heels of the VIC-20, so the 1540 was quickly discontinued. Most 1540s still in existence were modified with a 1541 ROM so it would work with a C64. Unmodified 1540s are now considered collector's items.
(¹exception: the BBC Micro's DFS, installable as a ROM chip in the computer itself)