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

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.

NEW: READS COMPRESSED LZ4 EXECUTABLE FILES
(created with mad
super packer 6.3)

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.

DOS boots in a few seconds, more RAM, more FUN.
 

DUP (loaded upon the DOS-command, LiteDUP can be on any drive)


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

 TinyTERM for terminal activities, downloads R: from 850/APE or uses it's own Rverter-routines.
   

DOWNLOAD LiteDOS 3.b
Read me, Change-LOG
(4-january-2020)
Looking for LiteDOS 2, click here...

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 3 is just like any other DOS version you know for the Atari 8 bit.
LiteDUP is now external, so loading DUP takes a few seconds extra.
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 LiteDUP, 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 / LiteDUP are designed to run on a 16k unexpanded Atari (400/800/XL/XE).
*) LiteDOS supports diskettes from 80k up to 720k as well as partitions on harddrives up to 16Mb.
*) 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 or Update a previous version of LiteDOS.
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/LiteDUP:
The Disc Utility Package.
Here you can copy, erase, load files and more.
Read below the manual.

3/ TinyTERM:
This is a small terminal program that let you talk to any R: device present.
If no R: is present, it will try to download it from 850/APE, if present.
Else it uses it's own Rverter-type drivers.
See my SIO2WiFi page for my WiFi=modem build around a cheap $2,- ESP 8266 module.

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/ 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 new 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.

6/ Various Basic and Executables to play/experiment with.


-


How to use LiteDUP (Disc Utility Package):

MANUAL:

LiteDUP comes with a small built-in command-line, with 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 DUP commands are destructive (will erase user-memory), so save your program before entering DUP.
If you are only going to use the DIR-command and your program is smaller then 10k, it will be kept in memory on return.

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

On commands that require to write to a diskette, the screen will flash red and waits for the Y-key for confirmation.
 
Examples:
<return>     = Directory of the default drive.
D <return>  = Directory of the default drive.
1 <return>  = Directory of drive 1, setting D1 as 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.
3 A*.*        = Directory of all files on the D3, starting with the letter A, setting D3 as default drive.
C2GAME.XEX = Copy the file GAME.XEX from the default drive to drive D2:, setting D2 as the copy-drive.
C GAME.XEX = Copy the file GAME.XEX from the default drive to last copied-to-drive.
C A*.*          = Copy all files trating with A from the default drive to the last copied-to-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.
G 13B0       = Run programm stored at $13B0.
W               = Write LiteDUP to the default drive.
W1             = Write LiteDUP to D1, setting D1 as default drive.

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 (B):
If you want to re-boot, press B <return>
Very handy if you do not want to power-cycle your machine.

Write DUP (W):
Write LiteDUP.XEX to any drive.

Run address (G xxxx):
Jump to a programm stored at location xxxx, where xxxx must be a valid 4 digit hex-address.


DIRECTORY (D, NUM 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 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:
*) Using the wildcard option, only the first 16 matching files are copied. Due to the amount of memory available for this operation.
**) 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" <komma> "new name" <return>


-


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) for 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.
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 file found in the VTOC will be loaded and executed, a RTS (installing drivers) 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.