Atari LiteDOS 2.0
 for 400/800 XL/XE Atari Homecomputers
"just your basic DOS needs"

(previously known as TinyDOS)
Updated: April-2019

Why?: Just for the fun of coding for the Atari.
:-D

"E.T. phone home"


SMALL: uses only 2k, 4k more free memory, even 8k more when using Turbo Basic !
FAST: boots in 2-3 seconds.
SIMPLE: load/copy files wasn't this easy.
COMPATIBLE: reads Atari DOS 2.0 2.5 MyDOS and other compatible disks.
The file-format of a LiteDOS-disk is readable by DOS 2.0/2.5/MyDOS and clones.

    
 

LiteINIT (xex-file), formats/clears/writes LiteDOS to any disk or partition.

   

DOWNLOAD 2.04
Read me, Change-LOG
(5-apr-2019)

For those who want it built-in the OS, the rom-files are in the zip-file:
Just boot your Atari, instant LiteDOS... Hold SELECT to bypass.
(optional FMP = Fast Math Package)

PLEASE LEAVE FEEDBACK
To: "mr-atari @ mr-atari . com" (remove the spaces).
No feedback, No nuts, No glory, No evolution.....
 

Short explanation of this new type of DOS:

LiteDOS is just like any other DOS version you know for the Atari 8 bit.
Basic DUP functions are built-in, so loading DUP takes zero seconds.
LiteDOS supports the reading of files from DOS 2/2.5 and many DOS 2 type clones, like MyDOS.
Where as LiteDOS-disk are also readable by DOS 2/2.5 and clones.
How to work with DUP, you can read lower on this page.

I think this is the fasters booting and smallest DOS version for the Atari Homecomputer you will find.

Free user-memory starts at $1000 or the first 4k-boundary.
Loading any additional drivers will bump this value up.
Read location MEMLO for the current value.

Files can be loaded and saved like you used to.
SAVE or LIST will save files, where LOAD or ENTER will load them.
Wildcards are allowed (using * and ? to search for letters in the filename).
When subdirectories are on a disk/partition, LiteDOS will search for the first file that matches.
If your language supports the DIR command, files will be listed as usual.

To get started, just boot your LiteDOS disk as you would have done with any other DOS.
To enter DUP, type DOS <enter> (as you normally do) or boot LiteDOS without a cartridge inserted.

Please note:
*) LiteDOS is so small, it even runs on a 8k unexpanded Atari 400/800, if you have one. ;-)
*) Files on disks and small partitions with less then 1024 sectors can be read by DOS2/2.5/Clones.
*) Files on larger disks/partitions can be read by DOS that support the "no file-check" bit in the filename-status, like MyDOS.
*) Only the first 64 files can be read by other compatible DOS versions, due to incompatibility in the VTOC-sectors.
*) Never, never, NEVER -I say- NEVER ! try to write with another DOS. But that should be obvious.....
    (MyDOS, for example, will fuck up your disk where it should not touch it)



I am ACTUALLY still writing this DOS-version from scratch just for the fun of coding.
Currently I am working on 2.04 to fix reported issues.
If you have tips, tricks, remarks or incompatible files?
Just drop me an email (zip/attach the software you are running).
To: "mr-atari @ mr-atari . com" (remove the spaces).



Tools/programs that come with LiteDOS are:



1/ LiteINIT:
This tool will let you format and init a LiteDOS disk or partition.
It is self supporting, no need to load it from your LiteDOS-disk, it can be run from any other DOS diskette/partition.
I think it covers all available formats ranging from SD to DD and up to partitons of 65535 sectors.
LiteINIT will give you options for "autorun" and "fast or slow" write (verify Off or On).
Autorun, will effectively try to load/init/run the first file found in the directory up on boot/coldstart.

2/ 850-style R:Driver (Lite850.DRV):
This program will detect and download/install the driver from the 850 or compatible device.
Once the driver is downloaded, the 850 normally will disable another download request.

3/ TinyTERM:
This is a small terminal program that let you talk to any R: device present.

4/ Turbo Basic / Compiler / Runtime:
Turbo-Basic 1.5 compiled to give the maximum amount of free RAM.
Compiler, to compile your turbo basic to a runtime.
Runtime, to run your compiled basic program.

5/ SIO2WiFi (ESP8266.DRV):
This program installs a R-verter compatible handler to communicate with device R:
I use it for my SIO2WiFi interface using an ESP8266-WiFi-module.
It has a tiny terminal built-in for easy setup of your ESP8266-connection.
See my SIO2WiFi page for more details.



Some technical information:



LiteDOS uses the same principle as DOS 2/2.5 and clones for reading files.
The last 3 bytes of the sector contain a sector-link and the number of bytes.
Disks or partitions smaller then 1024 bytes also have a file-id included.
The first sector with file-names is sector 361, same layout as DOS 2/2.5/Clones.

For saving, LiteDOS is different. It uses clusters instead of single sectors.
LiteDOS disks have the directory type set negative, the rest of the byte is the clustersize-1.
So $83 would tell this is a LiteDOS disk with clustersize =4.
The clustersize is also used to limit de VTOC/directory sectors, in this example 4, giving room for 24 file-names.
The first VTOC sector always start at sector 360 then counts up to sector 383 were it wraps inside the cluster.

Also on sector 360 you find the sector-bitmap, which can be 64 byte in size (512 bit).
Each bit tells if a cluster is free to use (set) or occupied (cleared), starting with sector $0000.
On offset $1,2 the number of sectors on this disk and on $71,2 the number of free sectors.

Drivers should set there init routine in location DOSINI ($0C,2) and after its own initialization, the driver should jump to the former values in DOSINI, hence to initialize the other driver(s).
When setting LOMEM, the driver should check if it's not already set higher then what the drivers needs. If it is higher, do NOT set LOMEM. Same goes for HIMEM, if it is already set lower, do NOT set HIMEM.
During installation of the driver, the program should check COLDST ($244). When non zero (power-up in progress) end the installation with a RTS. If coldstart is not in progress, pass the control back to the calling software, using a cold-init to clear the program-area, then a warm-reset.
Drivers can be loaded at any time, it is not needed to load drivers up-on boot, you can load any driver any time you want.
As long as they support the LiteDOS guidelines set out above.

The autorun function is simply a load D1:*.* function, direct after installing DOS.
So the first non-deleted file found in the VTOC will be loaded and executed, a RTS will pass control back to LiteDOS boot-process.
You can manually set the autorun-function to ON, if needed, by changing the last byte on sector 1 from $00 to $FF.



How to use DUP:



Command-shell (a small DUP is built-in) MANUAL:

LiteDOS comes with a small built-in command-line, with some basic functions, frequently used.
Other functions, like Format/Init a new disk, are done with external programs.
Built-in functions are to support stuff we know as LOAD COPY DIRECTORY ERASE and RENAME.

You enter the command-shell with the DOS-command [ DOS <return> ] or boot without a cartridge/language installed.
Once in the command-shell, you get a "number" as prompt.
This is the current selected drive.

The command-shell is non destructive, so you can enter and leave it without loosing your work .
Of course this only is valid if you do not load or perform memory alternated commands....
But doing a DIRECTORY is completely safe. :-)

When you enter a command DUP does not understand, you get error-168 "BAD COMMAND" displayed.

EXIT Command/DUP:
Exit the shell by simply press X <return> or press RESET

RE-BOOT/POWER-UP (P):
If you want to re-boot/power-up, press P <return>

DIRECTORY (D/return):
Type D <return> or Dx <return> or <return> on a empty line.
This will list all files on the current/<x> drive, including free sectors if this is a LiteDOS disk.
Alternatively you can type <D1*.*> or any other wildcard/knows letters to get a list of files from D1 (in this example).
So when you have a large LiteDOS or a MyDOS disk with subdirectories, typing DxARIE*.* <enter>
will give a list of all files (in all directories) starting with ARIE on drive <x>
Large directories can be paused with CONTROL-1 or stopped with <BREAK>.

File-size is 3 digits, values of 1000 and more will be shown as 999.

Please note:
*) The D<x> command will set the internal drive-ID to <x>

LOAD (L/return):
After you have done a directory-listing, simple navigate to the file you want to load.
Simply press <return>, your cursor may be anywhere on the line that holds the filename.
The loader will only load binary files, if the header is correct, it does not check the filename for EXE,OBJ,etc.
- Binary files are loaded and executed as the file-layout specifies.
If the file does not want to run/init, you will return to the command-shell.
If the file can't be loaded, you get error-175 "BAD LOAD FILE" or any other IO-related error.

Alternatively, if you (partially) know the filename and on what drive it is, you can
type L3MYFILE.XEX or L3MY*.* for example to load your program from drive-3.

COPY (C):
After you have done a directory-listing, simple navigate to the file you want to copy.
Type Cx. Where <x> is the destination drive. You must specify <x> else you get Error-168 "BAD COMMAND".
This will copy the file to any LiteDOS formatted disk.

If you know the file to copy and are on the correct internal drive (source file), you can alternatively
type CxMYFILE.BAS. This will search and copy MYFILE.BAS from the internal drive-ID to drive <x>.

The built-in copy function is intended to copy files from one drive to another.
There is a special function implemented when the source and destination drive are the same.
Then the file will be effectively be copied/defragmented to lower sectors (if lower sectors are available).

Please note:
*) You should not use wildcards, due to a bug/incompatibility, the matching letters are filled-in as "?" and used for the destination file.
    Please use RENAME after copy to correct this.

ERASE (E):
After you have done a directory-listing, simple navigate to the file you want to erase.
Type E and press <return>.
This will effectively free al sectors the file has in use and set the filename to deleted.

RENAME (R):
After you have done a directory-listing, simple navigate to the file you want to rename.
Type R, navigate to the end of the file name and type (overtyping the size) <comma> <new name 11 characters exactly> and press <return>.
!!! Make sure the old and new name are 11 characters long, padded with SPACE using the COMMA as separator !!!

This built-in function is perhaps a crude, but a very handy tool to remove typing-mistakes, be careful when using it and obey the input-format.



Easy to find/load programs of which you forgot the name:
Go to the command-shell, using the DOS command.
Do a DIRECTORY of the drive, remember the name.
Press X<return> or RESET to return to your cartridge/language.
Nothing is lost, your program/work is in tact.