IDEDOS

Last updated
IDEDOS
Developer Josef Souček, Tomáš Přibyl, Jan Vorlíček, Jan Hlaváček, Kajtár Zsolt
Written in 6502/65816 assembly language
Initial release1996;28 years ago (1996)
Latest release 0.90
Latest preview 0.91 beta
Available in English
Platforms Commodore 64, 128 and SuperCPU
Default
user interface
Command-line interface
License GPLv2
Official website idedos.ide64.org

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.

Contents

Architecture

The C64 KERNAL 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 CBM DOS), 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 CD-ROM 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 June 2004.

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

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.

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, CD-ROM 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

IDEDOS 0.90

This is the current stable, the latest version is 20100509 (patch 45). Most notable differences to 0.89 are:

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.

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

IDEDOS 0.91 beta

This is still in development. Most notable differences to 0.90 are:

Related Research Articles

<span class="mw-page-title-main">Commodore 1581</span>

The Commodore 1581 is a 3½-inch double-sided double-density floppy disk drive that was released by Commodore Business Machines (CBM) in 1987, primarily for its C64 and C128 home/personal computers. The drive stores 800 kilobytes using an MFM encoding but formats different from the MS-DOS, Amiga, and Mac Plus formats. With special software it's possible to read C1581 disks on an x86 PC system, and likewise, read MS-DOS and other formats of disks in the C1581, provided that the PC or other floppy handles the "720 kB" size format. This capability was most frequently used to read MS-DOS disks. The drive was released in the summer of 1987 and quickly became popular with bulletin board system (BBS) operators and other users.

A disk operating system (DOS) is a computer operating system that resides on and can use a disk storage device, such as a floppy disk, hard disk drive, or optical disc. A disk operating system provides a file system for organizing, reading, and writing files on the storage disk, and a means for loading and running programs stored on that disk. Strictly speaking, this definition does not include any other functionality, so it does not apply to more complex OSes, such as Microsoft Windows, and is more appropriately used only for older generations of operating systems.

<span class="mw-page-title-main">Commodore 128</span> Home computer released in 1985

The Commodore 128, also known as the C128, C-128, or C= 128, is the last 8-bit home computer that was commercially released by Commodore Business Machines (CBM). Introduced in January 1985 at the CES in Las Vegas, it appeared three years after its predecessor, the Commodore 64, the bestselling computer of the 1980s. Approximately 2.5 million C128s were sold during its four year production run.

AmigaDOS is the disk operating system of the AmigaOS, which includes file systems, file and directory manipulation, the command-line interface, and file redirection.

Apple DOS is the disk operating system for the Apple II computers from late 1978 through early 1983. It was superseded by ProDOS in 1983. Apple DOS has three major releases: DOS 3.1, DOS 3.2, and DOS 3.3; each one of these three releases was followed by a second, minor "bug-fix" release, but only in the case of Apple DOS 3.2 did that minor release receive its own version number, Apple DOS 3.2.1. The best-known and most-used version is Apple DOS 3.3 in the 1980 and 1983 releases. Prior to the release of Apple DOS 3.1, Apple users had to rely on audio cassette tapes for data storage and retrieval.

OS/8 is the primary operating system used on the Digital Equipment Corporation's PDP-8 minicomputer.

Commodore BASIC, also known as PET BASIC or CBM-BASIC, is the dialect of the BASIC programming language used in Commodore International's 8-bit home computer line, stretching from the PET (1977) to the Commodore 128 (1985).

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 related versions used in its successors: the VIC-20, Commodore 64, Plus/4, Commodore 16, and Commodore 128.

The Amiga Fast File System is a file system used on the Amiga personal computer. The previous Amiga filesystem was never given a specific name and known originally simply as "DOS" or AmigaDOS. Upon the release of FFS, the original filesystem became known as Amiga Old File System (OFS). OFS, which was primarily designed for use with floppy disks, had been proving slow to keep up with hard drives of the era. FFS was designed as a full replacement for the original Amiga filesystem. FFS differs from its predecessor mainly in the removal of redundant information. Data blocks contain nothing but data, allowing the filesystem to manage the transfer of large chunks of data directly from the host adapter to the final destination.

<span class="mw-page-title-main">Commodore DOS</span> Operating system

Commodore DOS, also known as CBM DOS, is the disk operating system used with Commodore's 8-bit computers. Unlike most other DOSes, which are loaded from disk into the computer's own RAM and executed there, CBM DOS is executed internally in the drive: the DOS resides in ROM chips inside the drive, and is run there by one or more dedicated MOS 6502 family CPUs. Thus, data transfer between Commodore 8-bit computers and their disk drives more closely resembles a local area network connection than typical disk/host transfers.

<span class="mw-page-title-main">Commodore 64 peripherals</span>

The Commodore 64 home computer used various external peripherals. Due to the backwards compatibility of the Commodore 128, most peripherals would also work on that system. There is also some compatibility with the VIC-20 and Commodore PET.

<span class="mw-page-title-main">Fast loader</span> Software acceleration program for file loading

A fast loader is a software program for a home computer, such as the Commodore 64 or ZX Spectrum, that accelerates the speed of file loading from floppy disk or compact cassette.

The CMD FD series was Creative Micro Designs (CMD)'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 1600 kB of storage using standard double-sided, high-density floppies, while the FD-4000 also allowed the use of 3200 kB extra-high density (ED) floppies. In contrast, the Commodore 1581 3½" drive only supported 800 kB double-sided, double-density disks.

The Linux booting process involves multiple stages and is in many ways similar to the BSD and other Unix-style boot processes, from which it derives. Although the Linux booting process depends very much on the computer architecture, those architectures share similar stages and software components, including system startup, bootloader execution, loading and startup of a Linux kernel image, and execution of various startup scripts and daemons. Those are grouped into 4 steps: system startup, bootloader stage, kernel stage, and init process. When a Linux system is powered up or reset, its processor will execute a specific firmware/program for system initialization, such as the power-on self-test, invoking the reset vector to start a program at a known address in flash/ROM, then load the bootloader into RAM for later execution. In IBM PC–compatible personal computers (PCs), this firmware/program is either a BIOS or a UEFI monitor, and is stored in the mainboard. In embedded Linux systems, this firmware/program is called boot ROM. After being loaded into RAM, the bootloader will execute to load the second-stage bootloader. The second-stage bootloader will load the kernel image into memory, decompress and initialize it, and then pass control to this kernel image. The second-stage bootloader also performs several operation on the system such as system hardware check, mounting the root device, loading the necessary kernel modules, etc. Finally, the first user-space process starts, and other high-level system initializations are performed.

Amiga support and maintenance software performs service functions such as formatting media for a specific filesystem, diagnosing failures that occur on formatted media, data recovery after media failure, and installation of new software for the Amiga family of personal computers—as opposed to application software, which performs business, education, and recreation functions.

<span class="mw-page-title-main">SpartaDOS X</span> Disk operating system

SpartaDOS X is a disk operating system for the Atari 8-bit computers that closely resembles MS-DOS. It was developed and sold by ICD in 1987-1993, and many years later picked up by the third-party community SpartaDOS X Upgrade Project, which still maintains the software.

<span class="mw-page-title-main">AmigaOS</span> Operating system for Amiga computers

AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early versions of AmigaOS required the Motorola 68000 series of 16-bit and 32-bit microprocessors. Later versions, after Commodore's demise, were developed by Haage & Partner and then Hyperion Entertainment. A PowerPC microprocessor is required for the most recent release, AmigaOS 4.

<span class="mw-page-title-main">DOS</span> Family of IBM PC-compatible operating systems

DOS is a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible systems from other manufacturers include DR-DOS (1988), ROM-DOS (1989), PTS-DOS (1993), and FreeDOS (1998). MS-DOS dominated the IBM PC compatible market between 1981 and 1995.

The IBM Personal Computer Basic, commonly shortened to IBM BASIC, is a programming language first released by IBM with the IBM Personal Computer, Model 5150 in 1981. IBM released four different versions of the Microsoft BASIC interpreter, licensed from Microsoft for the PC and PCjr. They are known as Cassette BASIC, Disk BASIC, Advanced BASIC (BASICA), and Cartridge BASIC. Versions of Disk BASIC and Advanced BASIC were included with IBM PC DOS up to PC DOS 4. In addition to the features of an ANSI standard BASIC, the IBM versions offered support for the graphics and sound hardware of the IBM PC line. Source code could be entered with a full-screen editor, and limited facilities were provided for rudimentary program debugging. IBM also released a version of the Microsoft BASIC compiler for the PC concurrently with the release of PC DOS 1.10 in 1982.

References

  1. "IDEDOS 0.91 beta project page".