IDEDOS
Encyclopedia
IDEDOS is a ROM
-based disk operating system written in 6502
/65816 assembly language for the Commodore 64
, 128
and SuperCPU
. Its main purpose is to control ATA(PI) devices connected to an IDE64
cartridge and present them like normal Commodore drives. Additionally it supports networked drives (PCLink) and has a built-in machine code monitor
and file manager
.
uses a vector table at page 3 to allow redirection of common kernal file handling and basic functions. This feature is used by IDEDOS to hook into the C64 kernal.
The operating system itself is divided into four pages of 16 KiB which are mapped in when required. The mapping is temporarily switched off while interrupts are running for increased compatibility, however this causes a ≈40 μs latency.
Additional RAM
for buffers and internal data are also mapped in from either the IDE64
cartridge (28 KiB) or the additional RAM of the SuperCPU is used. The standard kernal memory locations at page zero and page two are handled in a kernal-compatible way; temporarily used memory is restored after the routines are finished.
Beyond the kernal table IDEDOS has two new calls for bulk data handling (read/write) which allows much faster data transfer rates than the character-based I/O.
The native file system is non-CBM style at the low level to allow partitions greater than 16 MiB. High-level features like the 16-character filenames or filetypes are retained. Due to complexity and memory requirements, the filesystem creation and consistency check is not part of the operating system, unlike CBM DOS
or CMD DOS.
Additional filesystems like ISO 9660
or FAT
are abstracted internally and mostly use the same routines for handling, thereby little difference is noticeable to user programs, except if some features are not fully implemented.
The device handling is done by additional device numbers assigned to the new devices. The device numbers for IDEDOS devices are configurable and is normally in the range of 10–14. Over the years many programs assumed that there is only device 8 and do not allow selecting anything else; this can be worked around by temporary changing the used IDEDOS device number to 8.
For standard devices, the original kernal routines are used, while IDEDOS devices use custom routines which closely imitate the results and behavior of kernal calls for floppy devices. Kernal calls not going through the vector table (most notably IEC bus-specific calls) present an incompatibility with those programs using them.
Special features (like CD-ROM audio handling) are implemented by new channel 15 commands, while features not found on floppy drives follow the CMD style commands to allow programs to easily support a wider range of devices.
Unlike intelligent external devices which have a separate processor (like 1541 with CBMDOS), IDEDOS runs on the host computer, thereby all disk routines block until finished. This rules out the use of "IRQ loaders" which are commonly used to speed up operation of serial bus peripherals.
Interrupts are generally allowed while IDEDOS is running (they are disabled on rare time-critical operations), however the system was written to be non-reentrant, just like the original kernal.
In 2000 Kajtár Zsolt added CDROM support, new setup code and lot of fixes. Due to limitations of the design the development of a completely rewritten version (0.90) was started by Kajtár Zsolt, which was not ready for general use before 2005. Meanwhile the old version reached 0.898b in 2004.Jun.
In 2009 the 64 KiB limit for the system started to get tight, and the IDEDOS 0.91 beta was started to refactor the code to gain more space and internal flexibility.
Device support
Filesystem
Fastload
Built in fast loader
supported devices:
Fast load can be switched off in setup in case of incompatibility (non-1541 as device 8). Minimum interleave is 7, fast saver is only supported in manager, and uses an interleave of 8. PAL
/NTSC
compatible timing.
PCLink
Custom protocol, sequential access only. Supported devices:
Setup screen
Includes clock with calendar, ability to set drive numbers, screen colours, auto boot, floppy fast loader, basic clock (TI$), power management, write retry, read-ahead and write cache drive settings, CDROM slow down option.
BASIC extensions
The BASIC extension includes disk handling commands (limited to IDEDOS devices), and adds some new error messages. Commands:
File manager
It can be used to navigate around directories, start programs, copy/rename/delete files, create directories, and execute plugins to operate on files. Recursive file copy was only added in 0.898b, and in rare cases it does not work.
Monitor
The monitor is almost exactly the Final cartridge monitor in IDEDOS 0.89. Only standard 6502 opcodes are available. The commands are:
Miscellaneous features
Device support
Filesystem
Fastload
Supported devices:
Device support is automatically detected, but can be disabled manually if needed. PAL/NTSC compatible timing. Fast saver only in the file manager.
PCLink
Custom protocol, sequential access only. Supported devices:
Setup screen
DOS wedge
Mostly the well known standard DOS wedge
commands.
BASIC extensions
The BASIC extension
adds disk handling commands, which can be used with any device because they use CMD style commands.
File manager
The file managers inspiration comes from 0.89, though it was rewritten from scratch. The goal was to have a file manager which not only supports IDEDOS devices, but also works well with CMD and other drives.
Monitor
The monitor was rewritten from scratch, the main inspiration was the CCS64 emulator's monitor, but some command ideas came from FC3/AR7/Vice monitors.
The goal was to have freezer style (all registers including I/O editable) and fast machine code monitor which supports illegal 6502 and SuperCPU emulation mode opcodes.
Commands:
Miscellaneous features
Read-only memory
Read-only memory is a class of storage medium used in computers and other electronic devices. Data stored in ROM cannot be modified, or can be modified only slowly or with difficulty, so it is mainly used to distribute firmware .In its strictest sense, ROM refers only...
-based disk operating system written in 6502
MOS Technology 6502
The MOS Technology 6502 is an 8-bit microprocessor that was designed by Chuck Peddle and Bill Mensch for MOS Technology in 1975. When it was introduced, it was the least expensive full-featured microprocessor on the market by a considerable margin, costing less than one-sixth the price of...
/65816 assembly language for the Commodore 64
Commodore 64
The Commodore 64 is an 8-bit home computer introduced by Commodore International in January 1982.Volume production started in the spring of 1982, with machines being released on to the market in August at a price of US$595...
, 128
Commodore 128
The Commodore 128 home/personal computer was the last 8-bit machine commercially released by Commodore Business Machines...
and SuperCPU
SuperCPU
The SuperCPU was developed by Creative Micro Designs, Inc. It is a processor upgrade for the Commodore 64 and Commodore 128 personal computer platforms. The SuperCPU uses the W65C816S 8/16 bit microprocessor. The unit can have up to 16 MB RAM installed. The unit sported a "Turbo" switch which, when...
. Its main purpose is to control ATA(PI) devices connected to an IDE64
IDE64
The IDE64 interface cartridge is an expansion port device for connecting ATA devices to the C64 or C128 computers.-Hardware:There were several somewhat different versions of this cartridge over the years. The interface was designed by Tomas Pribyl and Jan Vorlicek in 1994...
cartridge and present them like normal Commodore drives. Additionally it supports networked drives (PCLink) and has a built-in machine code monitor
Machine code monitor
A machine code monitor is software built into or separately available for various computers, allowing the user to enter commands to view and change memory locations on the machine, with options to load and save memory contents from/to secondary storage.Machine code monitors became something of a...
and file manager
File manager
A file manager or file browser is a computer program that provides a user interface to work with file systems. The most common operations performed on files or groups of files are: create, open, edit, view, print, play, rename, move, copy, delete, search/find, and modify file attributes, properties...
.
Architecture
The C64 KERNALKERNAL
The KERNAL is Commodore's name for the ROM-resident operating system core in its 8-bit home computers; from the original PET of 1977, followed by the extended but strongly related versions used in its successors; the VIC-20, Commodore 64, Plus/4, C16, and C128...
uses a vector table at page 3 to allow redirection of common kernal file handling and basic functions. This feature is used by IDEDOS to hook into the C64 kernal.
The operating system itself is divided into four pages of 16 KiB which are mapped in when required. The mapping is temporarily switched off while interrupts are running for increased compatibility, however this causes a ≈40 μs latency.
Additional RAM
Ram
-Animals:*Ram, an uncastrated male sheep*Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela-Military:*Battering ram*Ramming, a military tactic in which one vehicle runs into another...
for buffers and internal data are also mapped in from either the IDE64
IDE64
The IDE64 interface cartridge is an expansion port device for connecting ATA devices to the C64 or C128 computers.-Hardware:There were several somewhat different versions of this cartridge over the years. The interface was designed by Tomas Pribyl and Jan Vorlicek in 1994...
cartridge (28 KiB) or the additional RAM of the SuperCPU is used. The standard kernal memory locations at page zero and page two are handled in a kernal-compatible way; temporarily used memory is restored after the routines are finished.
Beyond the kernal table IDEDOS has two new calls for bulk data handling (read/write) which allows much faster data transfer rates than the character-based I/O.
The native file system is non-CBM style at the low level to allow partitions greater than 16 MiB. High-level features like the 16-character filenames or filetypes are retained. Due to complexity and memory requirements, the filesystem creation and consistency check is not part of the operating system, unlike CBM DOS
Commodore DOS
Commodore DOS, aka CBM DOS, was the disk operating system used with Commodore's 8-bit computers. Unlike most other DOS systems before or since—which are booted from disk into the main computer's own RAM at startup, and executed there—CBM DOS was executed internally in the drive: the DOS...
or CMD DOS.
Additional filesystems like ISO 9660
ISO 9660
ISO 9660, also referred to as CDFS by some hardware and software providers, is a file system standard published by the International Organization for Standardization for optical disc media....
or FAT
File Allocation Table
File Allocation Table is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras. FAT file systems are commonly found on floppy disks, flash memory cards, digital cameras, and many other portable devices because of...
are abstracted internally and mostly use the same routines for handling, thereby little difference is noticeable to user programs, except if some features are not fully implemented.
The device handling is done by additional device numbers assigned to the new devices. The device numbers for IDEDOS devices are configurable and is normally in the range of 10–14. Over the years many programs assumed that there is only device 8 and do not allow selecting anything else; this can be worked around by temporary changing the used IDEDOS device number to 8.
For standard devices, the original kernal routines are used, while IDEDOS devices use custom routines which closely imitate the results and behavior of kernal calls for floppy devices. Kernal calls not going through the vector table (most notably IEC bus-specific calls) present an incompatibility with those programs using them.
Special features (like CD-ROM audio handling) are implemented by new channel 15 commands, while features not found on floppy drives follow the CMD style commands to allow programs to easily support a wider range of devices.
Unlike intelligent external devices which have a separate processor (like 1541 with CBMDOS), IDEDOS runs on the host computer, thereby all disk routines block until finished. This rules out the use of "IRQ loaders" which are commonly used to speed up operation of serial bus peripherals.
Interrupts are generally allowed while IDEDOS is running (they are disabled on rare time-critical operations), however the system was written to be non-reentrant, just like the original kernal.
Short history
In 1996 IDEDOS was born, as there was a need for a system to run the IDE64 1.1 card. It was created by Josef Souček (main code) and Tomáš Přibyl (File manager, Final cartridge monitor adaptation). Additional code came by Jan Vorlíček (BASIC extension), Jan Hlaváček (Duart PCLink).In 2000 Kajtár Zsolt added CDROM support, new setup code and lot of fixes. Due to limitations of the design the development of a completely rewritten version (0.90) was started by Kajtár Zsolt, which was not ready for general use before 2005. Meanwhile the old version reached 0.898b in 2004.Jun.
In 2009 the 64 KiB limit for the system started to get tight, and the IDEDOS 0.91 beta was started to refactor the code to gain more space and internal flexibility.
IDEDOS 0.898b
This was the last version of the old IDEDOS series.Device support
- 2 ATA(PI) devices: hard disk, CompactFlash, CDROM, DVD
- DuartUniversal asynchronous receiver/transmitterA universal asynchronous receiver/transmitter, abbreviated UART , is a type of "asynchronous receiver/transmitter", a piece of computer hardware that translates data between parallel and serial forms. UARTs are commonly used in conjunction with communication standards such as EIA RS-232, RS-422 or...
RS-232 card for PCLink - SuperCPUSuperCPUThe SuperCPU was developed by Creative Micro Designs, Inc. It is a processor upgrade for the Commodore 64 and Commodore 128 personal computer platforms. The SuperCPU uses the W65C816S 8/16 bit microprocessor. The unit can have up to 16 MB RAM installed. The unit sported a "Turbo" switch which, when...
v1/v2
Filesystem
- Custom filesystem called OFS 0.02
- Up to 8 GiB, CHSCylinder-head-sectorCylinder-head-sector, also known as CHS, was an early method for giving addresses to each physical block of data on a hard disk drive. In the case of floppy drives, for which the same exact diskette medium can be truly low-level formatted to different capacities, this is still true.Though CHS...
addressing only, covers the whole disk - 16 character filenames.
- Fixed file types of SEQ, PRG, USR.
- Directories are supported.
- Time stamping supported.
- Files up to 4 GiB, sequential access only
- ISO 9660ISO 9660ISO 9660, also referred to as CDFS by some hardware and software providers, is a file system standard published by the International Organization for Standardization for optical disc media....
filesystem support
Fastload
Built in fast loader
Fast loader
A fast loader is a software program for a home computer - most commonly, the Commodore 64 - that accelerates the speed of file loading from the floppy disk drive.- Background :...
supported devices:
- 1541Commodore 1541The Commodore 1541 , made by Commodore International, was the best-known floppy disk drive for the Commodore 64 home computer. The 1541 was a single-sided 170 kilobyte drive for 5¼" disks...
as device 8
Fast load can be switched off in setup in case of incompatibility (non-1541 as device 8). Minimum interleave is 7, fast saver is only supported in manager, and uses an interleave of 8. PAL
PAL
PAL, short for Phase Alternating Line, is an analogue television colour encoding system used in broadcast television systems in many countries. Other common analogue television systems are NTSC and SECAM. This page primarily discusses the PAL colour encoding system...
/NTSC
NTSC
NTSC, named for the National Television System Committee, is the analog television system that is used in most of North America, most of South America , Burma, South Korea, Taiwan, Japan, the Philippines, and some Pacific island nations and territories .Most countries using the NTSC standard, as...
compatible timing.
PCLink
Custom protocol, sequential access only. Supported devices:
- PC64 parallel cable
- Duart RS-232
Setup screen
Includes clock with calendar, ability to set drive numbers, screen colours, auto boot, floppy fast loader, basic clock (TI$), power management, write retry, read-ahead and write cache drive settings, CDROM slow down option.
BASIC extensions
The BASIC extension includes disk handling commands (limited to IDEDOS devices), and adds some new error messages. Commands:
- CD - change working directory
- CDOPEN - open CDROM tray
- CDCLOSE - close CDROM tray
- CHANGE - change HDD device number
- DATE - print date and time
- DIR - normal directory listing
- HDINIT - re-detect IDE devices.
- INIT - initialize memory
- KILL - disable cartridge
- LL - long directory listing with timestamps, and file size in bytes.
- MAN - start file manager
- MKDIR - create directory
- RM - remove file or directory
File manager
It can be used to navigate around directories, start programs, copy/rename/delete files, create directories, and execute plugins to operate on files. Recursive file copy was only added in 0.898b, and in rare cases it does not work.
Monitor
The monitor is almost exactly the Final cartridge monitor in IDEDOS 0.89. Only standard 6502 opcodes are available. The commands are:
- A - Assemble instructions
- B - Bank switch
- C - Compare memory areas
- D - Disassemble from address
- EC - Edit char
- ES - Edit sprite
- F - Fill memory area
- G - Start execution at address
- H - Search pattern
- I - PETSCII display from address
- L - Load memory area
- M - Memory list
- O - Bank switch
- P - Print
- R - Show registers
- S - Save memory area
- T - Transfer memory area
- X - Exit monitor
- @ - Disk command
- # - Convert to hexadecimal
- $ - Convert to decimal
- *r - Read block from floppy drive
- *w - Write block to floppy drive
Miscellaneous features
- Auto boot - can load and start a file on reset or power on.
- Custom screen colours - the default blue screen colours can be changed.
- Set the TI$ BASIC variable to the correct time on reset.
- Displays the start and end address for load.
- Special extension for bulk reading and writing of file data
IDEDOS 0.90
This is the current stable, the latest version is 20100509 (patch 45). Most notable differences to 0.89 are:- CFS 0.11 filesystem allows seekable and relative files, LBA support and partitioning.
- CMD compatible syntax for path handling and channel 15 commands
- Better PCLink protocol to allow the use of ethernet and USB
- Monitor which works like a freezer and is much faster
- More powerful file manager supporting CMD devices
- DOS wedge commands
- Programmable function keys
- BASIC extension support for non-IDEDOS devices
- Additional device support up to 4 ATA(PI) drives, ZIP and LS-120 support
- Support of V4.1 cartridge, linear read/write transfers for additional speed
- The battery on the IDE64 cartridge can be replaced with a supercap now.
Device support
- 4 ATA(PI) devices: hard disk, CompactFlash, CDROM, DVD, LS-120, ZIP-drive
- Duart/SwiftLink/Turbo232/SilverSurfer RS-232, RR-Net/ETFE/ETH64 ethernet, FT245 USB cards for PCLink
- SuperCPU v2
- Additional support for JiffyDOS/DolphinDOS drives
Filesystem
- Custom filesystem called CFS 0.11
- Up to 128 GiB, CHS/LBA addressing, up to 16 partitions
- 16 character file names.
- Customizable 3 character file types.
- Directories and soft links are supported.
- Relative files supported.
- Time stamping supported.
- Files up to 4 GiB, seekable
- ISO 9660ISO 9660ISO 9660, also referred to as CDFS by some hardware and software providers, is a file system standard published by the International Organization for Standardization for optical disc media....
filesystem, partial OFS 0.02 support - FAT12/16/32 slow read-only short filename support with DOS style partition tablesMaster boot recordA master boot record is a type of boot sector popularized by the IBM Personal Computer. It consists of a sequence of 512 bytes located at the first sector of a data storage device such as a hard disk...
Fastload
Supported devices:
- CBM 1541Commodore 1541The Commodore 1541 , made by Commodore International, was the best-known floppy disk drive for the Commodore 64 home computer. The 1541 was a single-sided 170 kilobyte drive for 5¼" disks...
/1571Commodore 1571The Commodore 1571 was Commodore's high-end 5¼" floppy disk drive. With its double-sided drive mechanism, it had the ability to utilize double-sided, double-density floppy disks natively. This was in contrast to its predecessors, the 1541 and 1570, which could fully utilize such disks only if the...
/1581Commodore 1581The Commodore 1581 is a 3½ inch double sided double density floppy disk drive made by Commodore Business Machines primarily for its C64 and C128 home/personal computers. The drive stores 800 kilobytes using an MFM encoding but format different from both MS-DOS , and the Amiga formats. With... - Any drive with JiffyDOS protocol (CMD FDCMD FD seriesThe CMD FD series was Creative Micro Designs 's range of third-party floppy disk drives for the Commodore 8-bit line of home computers. Using 3½" floppy disks, they provided a significantly larger storage capacity than Commodore-produced drives; the FD-2000 offered 1600KB of storage using standard...
) - Additional support for DolphinDOS
Device support is automatically detected, but can be disabled manually if needed. PAL/NTSC compatible timing. Fast saver only in the file manager.
PCLink
Custom protocol, sequential access only. Supported devices:
- IEC serial bus
- PC64 parallel cable
- Duart, SwiftLink, Turbo232 RS-232
- RR-Net, ETFE, ETH64 ethernet
- FT245 USB
Setup screen
- Clock with calendar
- Device number configuration and remapping
- Screen, manager and monitor colours
- Miscellaneous settings(auto boot, floppy fast loader, basic clock (TI$))
- ATA(PI) device settings (power management, write retry, read-ahead and write cache, maximal linear read/write)
DOS wedge
Mostly the well known standard DOS wedge
DOS Wedge
The DOS Wedge was a popular piece of Commodore 64 system software. Written by Bob Fairbairn, it was included by Commodore on the 1541 disk drive Test/Demo Disk and also packaged with the C64 Macro Assembler...
commands.
- @ - DOS command
- @$ - Directory
- @# - Select device
- / - Load BASIC program
- % - Load assembly program
- ' - Verify assembly program
- ↑ - Load BASIC program and execute
- ← - Save BASIC program
- £ - Load and execute assembly program
- . - Change directory
- # - Execute shell
BASIC extensions
The BASIC extension
BASIC extension
BASIC toolkits —not to be confused with widget toolkits—were a common type of program for 1980s 8-bit home computers...
adds disk handling commands, which can be used with any device because they use CMD style commands.
- CD - change working directory
- CDOPEN - open CDROM tray
- CDCLOSE - close CDROM tray
- CHANGE - change device number
- DATE - print date and time
- DEF - redefine function keys
- DIR - normal directory listing
- HDINIT - re-detect IDE devices.
- INIT - initialize memory
- KILL - disable cartridge
- KILLNEW - re-new
- LL - long directory listing with timestamps, and file size in bytes.
- MAN - start file manager
- MKDIR - create directory
- RM - remove file
- RMDIR - remove directory
File manager
The file managers inspiration comes from 0.89, though it was rewritten from scratch. The goal was to have a file manager which not only supports IDEDOS devices, but also works well with CMD and other drives.
Monitor
The monitor was rewritten from scratch, the main inspiration was the CCS64 emulator's monitor, but some command ideas came from FC3/AR7/Vice monitors.
The goal was to have freezer style (all registers including I/O editable) and fast machine code monitor which supports illegal 6502 and SuperCPU emulation mode opcodes.
Commands:
- @ - Disk command, status and directory
- A - Assemble
- B - Memory configuration, select RAM/ROM
- BT - Backtrace
- C - Compare memory
- D - Disassemble
- , - Write hex data to memory and disassemble
- EC - Edit char (binary)
- [ - Write binary data to memory
- ES - Edit sprite (binary)
- ] - Write binary sprite data to memory
- F - Fill memory with byte
- G - Execute at address
- H - Search hex/any/text
- I - Dump memory in PETSCII
- ' - Write PETSCII data to memory
- IO - Dump I/O registers
- - - Write hex data to I/O memory
- IV - Restore I/O vectors
- J - Dump memory in screen code
- . - Write screen code data to memory
- K - Defreeze memory
- L - Load program
- LB - Load binary
- M - Dump memory in hex and PETSCII
- : - Write hex or PETSCII data to memory
- N - Number conversion and calculator
- O - Select work drive
- R - Show registers
- ; - Change registers
- S - Freeze memory/save program
- SB - Save binary
- T - Copy memory
- V - Verify program
- VB - Verify binary
- X - Continue program
- Q - Exit to BASIC warm start
- ←/↑ - Push and pop address(es) to astack.
Miscellaneous features
- Auto boot - can load and start a file on reset or power on.
- Custom screen, monitor and manager colours - the default colours can be changed.
- Set the TI$ BASIC variable to the correct time on reset.
- Displays the start and end address for load/save.
- Special extension for bulk reading and writing of file data
- C128 keyboard support in C64 mode
- Special commands for handling CDROM drives
- Raw directory read
- CMD style long directory lists with timestamps
IDEDOS 0.91 beta
This is still in development. Most notable differences to 0.90 are:- OFS 0.02 support removed
- Protected BASIC, serial and PCLink routines
- F-keys work with interrupts
- Read ($DEF4) works below I/O
- Auto starting programs work from IEC devices now
- PCLink load below I/O
- SilverSurfer PCLink support, PCLink optional
- FAT filesystem read ($DEF4) and load
- Combined CFS and FAT partitions, per partition filesystem support
- Partition list for FAT and ISO9660
- Dynamic drive ennumeration, PCLink detection
- Read ($DEF4) and write ($DEF1) support on modifiable files
- Timestamp update only if modified
- Seeking, modifiable and appendable files on PCLink
- PCLink protocol changes
- PCLink activity LED