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

(previously known as TinyDOS)
Updated: Oktober-2019

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

"E.T. phone home"


SMALL: uses only 2k RAM, leaving 4k more free memory.
(XL/XE with 64k: even 8k more when using Turbo Basic)
EFFICIENT: 1016 FreeSectors on a MD disk or 700 FreeSectors on a SD disk !
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.08
Read me, Change-LOG
(19-oktober-2019)

Want something smaller? Try LiteDOS-XS.... ;-)
The zip has 2 empty bootable templates in SD and MD format.
(SD/MD only, 1 shared buffer, 1k more RAM, DUP: DIR [number|enter, empty line|enter] / loading [enter] only)
or
GameDOS version LiteDOS-RO (Read_only) another 0.5k extra RAM, same DUP as -XS

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 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.
I am always working on this DOS of mine, fixing reported issues, or to change things for the better.
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 (XL/XE with 64k):
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 (ESPP6.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.
Driver installs on page 6, buffer in page 4.
See my SIO2WiFi page for more details.

6/ RUNBAS.XEX:
This is a small machine code that runs the first file with the name *.BAS it finds.
BASIC must be enabled for it to work.
So, when you have created a mew disk with autorun enabled and RUNBAS.XEX is the first file in the directory:
You can create a disk that automatically runs BASIC programs, thought this might be of usage. :-)
With Turbo Basic, you can name your file AUTORUN.BAS and Turbo Basic will do this for you.


-


How to use DUP (Dos Utility Package), a command shell is built-in in LiteDOS:

MANUAL:

LiteDOS comes with a small built-in command-line, with five basic frequently used DUP-functions.
Other functions, like Format/Init a new disk, are done with external programs.
Built-in functions are LOAD COPY DIRECTORY ERASE and RENAME.
Using the first letter of the command or by simply pressing <return>.

All five built-in commands are non destructive, thus your program is safe while you are in DUP.

The command-line format being:
<command><space or drive-ID><filename 11 characters or name with "*.?" wildcard allowed>
Optional second filename must be on the position where the file-size starts, wildcards are NOT allowed (Used in the Rename Function).
Note:
-The second character MUST be a valid <drive-ID> or <space>.
 
Examples:
D <return>  = Directory of the default drive.
D1<return> = Directory of drive 1, setting D1 as default drive.
D A*.*        = Directory of all files on the default drive, starting with the letter A.
C2GAME.XEX = Copy the file GAME.XEX from the default drive to drive D2:, setting D2 as the copy-drive.
L4LOSTSPACE = Load the file LOSTSPAC.E from D4, setting D4 as default drive, if the file directs, it will be Run.
L4LOST*.*     = Will probably do the same, if no other files are found first starting with LOST.
E OLD.FIL = Erase the file OLD.FIL from the default drive.
R PIETHEINXEX KLAAS = Rename the file PIETHEIN.XEX on the default drive to KLAAS.

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.

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


EXIT Command-line/DUP (X):

Exit the shell by typing X <return> or press RESET


RE-BOOT/POWER-UP (P):
If you want to re-boot/power-up, press P <return>
Very handy if you do not want to power-cycle your machine.


DIRECTORY (D or return):
Type D <return> or Dx <return> or <return> on a empty line or a line that starts with the default <inverse> selected drive.
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*.* <return>
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>, the default drive after booting is D1


LOAD (L/return):
After you have done a directory-listing, simply navigate to the file you want to load
and 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):
This function will copy any file from a supported DOS-type to any LiteDOS formatted disk.
After you have done a directory-listing, simple navigate to the file you want to copy.
Type Cx just in front of the filename. Where <x> is the destination drive, that can range from 1-8.
If you do not specify a destination drive, you get an error-168.

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 default 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 when using the cop command, 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.
**) The default drive to copy files to, after booting is D1


ERASE (E):
After you have done a directory-listing, simple navigate to the file you want to erase.
Type E utmost left 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 in the left margin, navigate to the end of the file name and (over)type the new name on the filename-size, press return.
Make sure the first character starts on the first digit of the filename-size.
Or just type R <space/drive-ID> "old name" <space> "new name" <return>
NOTE:
-"old name" MUST be 11 characters in size, "new name" can be any size, LiteDOS will pad with <space> or cut-off any access characters.
-Do NOT use * <asterisk> . <dot> ? <question mark> as these are special characters.
-Use <SPACE> to pad the filenames to 11 characters with the last 3 characters being the extension.

You messed up?
If you and renamed a file to a unloadable name (error-170), then do the Rename again, using the navigation method.
Now, additionally, change all illegal characters in the "old name" with ?.

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


-


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 sectors 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.