Jump to content
IGNORED

bored so i did this


sup8pdct

Recommended Posts

Just for giggles and something to do while I am waiting for my broken right arm to heal,

I decided to have a close look at DosXE because the docs says it can work the 16meg drives

but there was nothing to set one up. I have always woundered about that since it was released.

The docs don't go into any detail about drive type and how to make different ones. So with

all my now spare time doing nothing for next 6 or so weeks I dissassembled dosXE and

had a look. Discovered several things and worked out the drive type table.

DosXE can work with 16MEG drives BUT I had to set it up manually with disk editors etc and used it

on my SIO2USB.

Drive type table and VTOC info is below for who ever has any interest.

Will be amazed if anyone askes for a blank 16meg image that I have made.:)

 

 

 

 

 

 

DosXE drive type table. 8 in total. In memory, starting at $D800. Also written to disk.

5 setup as standard are AT810 :SSSD, AT1050 :SSED, XF551 :DSDD,130RAM and SSDD.

 

1-6 ;asci name eg:'XF551' unused bytes set to $00

7 ;number of sectors in Vtoc

8 ;? could be number of sectors per bit of Vtoc. always set to $01

9-10 ;number of sectors on disk +1. max = $FFFF. LO-HI

11-12 ;number of usable (free) sectors after format. LO-HI

;Single/enhanced density has the real numbers /2.

;DosXE uses every block as 256 bytes so single and enhanced

; are treated as 2 sectors per block

13 ;First byte of VTOC map

14 ;first directory sector. always right after last vtoc sector =byte 7 +4

15-16 ;SIO routine to use for data block. LO-HI

17-18 ;Sio routine to use for command frame LO-HI

19 ;Read cmd. usally $52. xf551 has high bit set

20 ;Write cmd. can be $57 or $50. xf551 has high bit set

21 ;Speed byte for command frame

22 ;speed byte for data frame

23 ;format command. xf551 has high bit set

24 ;format time out value

25 ;percom block: number of tracks

26 ;percom block: step rate

27-28 ;percom block: sect per track hi-lo

29 ;percom block: number of sides -1

30 ;percom block: 0=FM 4=MFM

31-32 ;percom block: bytes per sect HI-LO

 

Sio routine entry points used by dos XE.

$D5D uses rom sio routines after enabling os rom. Use for PBI devices

speed is always 19200 unless PBI devices or custom OS with high speed sio is used.

Ignores speed byte in drive type table.

$FE5 High speed sio routine. Uses Speed byte. Doesn't jump to PBI devices

$DF32 Entry point for data frame for 128 byte sector drives only. always uses rom sio

$13F7 Entry for ram disk data frame

$1445 entry for ramdisk command frame

 

XF551 is set to use DSDD only. uses $D5D for command, $FE5 for data. DosXE uses XF551 highspeed sio for

DSDD only. XF551 can be set to at810 and AT1050

 

Dosxe cannot set up the vtoc properly above 8112 sectors.

Dosxe locks up the computer if drive size is 65535 sectors during format.

If drive type asci string doesn't match what dosxe has in it's table, drive will not be read

If percom block doesn't match what what dosxe has in its drive type, drive will not be read.

Exception for real unmodifyed 810 and 1050 drives. only asci string is used.

This affects SIO2USB.SIO2USB percom block always has 1 for number of tracks regardless of drive size.

 

VTOC 1st sector setup

1-6 ;copy of drivetype table 7-12

7-8 ;file number to use for next new file -1 LO-HI

9-10 ;Random number used to id drive. unique for each disk. both numbers must be different.

12 ;byte 13 of drive type table, 1st VTOC byte

13- end ;rest of VTOC. DosXE sets all to $FF for as many as needed

 

Random number is used through out disk as part of sector labels

 

SETUP.COM file doesn't display sector number properly for sector count above $8000. displays a negative number.

 

 

 

 

James

Link to comment
Share on other sites

That's very interesting. I once tried to investigate DOS XE disk format and also wondered if it can map 16 MB disks. Even contacted its author, but that didn't help much (he does not remember anything about DOS XE). Here is some information I have found out:

 

http://www.aspmessageboard.com/showpost.php?p=897429&postcount=12

 

I hope that when we merge this and your findings, we'll be able to recreate the relevant technical information (if it is not already available somewhere, but I found nothing).

Link to comment
Share on other sites

That's very interesting. I once tried to investigate DOS XE disk format and also wondered if it can map 16 MB disks. Even contacted its author, but that didn't help much (he does not remember anything about DOS XE). Here is some information I have found out:

 

http://www.aspmessag...29&postcount=12

 

I hope that when we merge this and your findings, we'll be able to recreate the relevant technical information (if it is not already available somewhere, but I found nothing).

 

very nice read.

I should point out that the 1st boot sector bytes $10 -$2F is the drive type table that I have described.

maybe now a program will need to be written to add drive types to dos xe itself, format the disk and add the correct vtoc for disks larger then 8112 sectors.

I can supply you a dos xe that will support the 8112 sector disk, but will need to send you an image of a 16meg one.

The $00 for the format command only applies to the ramdisk.

 

james

Link to comment
Share on other sites

Will be amazed if anyone askes for a blank 16meg image that I have made.:)

 

I'm interested in having a look-see, rather than taking the time to do it myself...

 

Wow. didn't expect this.

 

have attached an atr of dosxe on 16meg drive. Just set to drive 1 and boot

I have SIO2USB and it's percom block is different to what APE sends so have added drive types to this dosXE so I can read other dosXE disks.

DosXE is a pain in this regard, if percomblock doesn't match drive type, it errors out. May need to change dosxe or get Sio2Usb changed to match.

I also had a drive type for 8112 sectors which DosXE will format properly but haven't included it.

Please don't try to format a 16meg drive, it won't work. If you plan to run more then 1 16meg image, email me so I can send a blank one with a different volume number.

 

James

DOSXE16M.zip

Link to comment
Share on other sites

  • 3 weeks later...

While messing around with dosxe (still) I realised I made a single large mistake in the drive type table.

Byte $16 should always be $01. have ammended the discription below.

Have attached an ammended dosxe 16meg image. Using the old one will result in much less free memory for programs etc.

 

Where is the edit button? it no longer appears for me otherwise i would have edited my first post.

 

 

 

 

 

DOS XE file system format

===================

 

General:

-------

 

* physical sector sizes: 128 and 256 bytes.

* max. fs capacity: 65535 clusters (15,62 MB)

* max. file length: 366,21 KB (or 7,81 MB?)

* max. number of files per disk: 65536

* directory structure: hierarchical

* max. number of files per directory: 1280

* filename: 8+3

* method of mapping files: file maps

* method of sector allocation: bitmap

 

Allocation unit:

---------------

 

The allocation unit (or logical sector) is a 256-byte "cluster", or two physical sectors in single and medium density, one in double density. Mapping physical sectors into clusters takes into account the sector 0, even if it does not physically exist. So, in double density sectr 0 is cluster 0, sector 1 - cluster 1 and so on. In single and medium density cluster 0 consists of sectors 0 and 1, cluster 1 - sectors 2 and 3, cluster 2 - sectors 4 and 5 and so on.

 

Boot sectors:

------------

 

The first three sectors contain DOS XE bootloader. Apart from that bytes $09-$0F of the sector (not cluster) 1 contain the DOS configuration information, and bytes $10-$2F - disk information.

 

$09 - number of files possible to open at a time. Default 3, max. 7.

 

$0A - a bitmap of active drives: bits 7 6 5 4 3 2 1 0 correspond to drives 1 2 3 4 5 6 7 8. A bit set to 1 means that the corresponding drive is active.

 

$0B - meaning unknown, value $00

 

$0C-$0D Buffers base address

 

$0E - meaning unknown, value $B1

 

$0F - meaning unknown, value $34

 

$10-$15 - an ASCII string, up to 6 characters, padded with zeros, if shorter, symbolizing the density (or disk type):

 

- AT810 - single density

- AT1050 - medium density

- SSDD - single sided double density

- XF551 - double sided double density

- 130RAM - 130XE ramdisk

 

$16 - meaning unknown. Value always 1. Could be number of 256 byte blocks used for buffer?.

setting this number high reduces amount of free memory.

 

$17 - meaning unknown. could be number of clusters assigned to each VTOC bit. value always $01

Setting this to $02 halves the size of vtoc but writing files errors out.

 

 

$18-$19 - total number of clusters on the disk +1

if value is $ffff, do not add 1

 

$1A-$1B - initial number of free clusters on the disk

 

$1C - First byte of vtoc bitmap. used during vtoc building after format.

Works for disk sizes up to $1FB0 sectors. Larger sizes requires custom format program.

 

$1D - number of the first cluster of the main directory.

 

$1E-$1F - Address of sio routine in dosxe to use for data frame. Lo,Hi

 

$20-$21 - Address of sio routine in dosxe to use for command frame. Lo,Hi

$D5D Use os rom sio. PBI devices also use this entry.

$FE5 High speed sio routine. uses $24 or $25 for audio freq

$DF32 Sio entry for 128 byte sector disks, data frame only. Uses rom sio only

$13F7 Entry for Ramdisk data frame only

$1445 Entry for ramdisk command frame only

 

$22 - SIO command "Read sector", "R" for standard, "R"+$80 for XF551 fast mode.

 

$23 - SIO command "Write sector", "W" for standard etc. Can also be "P"

 

$24 - Pokey's AUDF3/4 value to generate the command baud rate, $00 for standard, $28 for XF551 fast mode.

 

$25 - Pokey's AUDF3/4 value to generate the data baud rate, $00 for standard, $10 for XF551 fast mode.

 

$26 - SIO command "Format disk" for this disk type, "!" for standard interleave, "!"+$80 for turbo interleave. If the disk does noot need formatting (ramdisks etc.), $00.

 

$27 - Format timeout value.

 

$28-$2f - first 8 bytes of the PERCOM block defining the disk parameters (number of tracks, sectors per track, sector size etc.)

 

VTOC:

----

 

The VTOC is held in the cluster 4 (sector 4 in DD, sectors 8-9 in SD and ED). In the first 10 bytes there is disk information as follows:

 

$00 - Same as $16 above

 

$01 - Same as $17 above

 

$02-$03 - total number of clusters on disk, plus 1. copied from $18,$19 above

 

$04-$05 - number of currently free clusters. copied from $1A,$1B above when formatted

 

$06-$07 - number of files and directories on the disk (= volume sequrntial number), intially $0000

 

$08-$09 - volume random number

 

The further part of the VTOC, from byte $0A onwards, is occupied by the bitmap. If a bit is set to 1, it means that the corresponding cluster is free, or it is in use otherwise. Bit 7 of each byte is assigned to a cluster of a lower number, and the subsequent bits of the byte correspond to subsequent clusters. The cluster 0 has no corresponding bit in the bitmap, the bit 7 of the first byte in the bitmap (byte $0a of VTOC) corresponds to cluster 1, bit 6 - to cluster 2, bit 5 - to cluster 3 etc.

 

Initially the first free cluster of the disk is cluster 6, and the first byte of the bitmap has a value of 000111 (clusters 1-5 in use, 6-8 free). Dosxe format routine copies this byte from $1C above.

 

Dos XE cannot properly setup the VTOC above 8112 ($1FB0) sectors. This number = 4 full sectors of VTOC map making the 1st VTOC byte = 0

 

Directories:

-----------

 

The main directory begins right after the VTOC, and initially occupies only one cluster. Its number is indicated by the byte $1d of the bootsector.

 

A single direcotry entry consists of 49 bytes:

 

$00 - status byte:

 

- bit 7 = 1, file deleted

- bit 6 = 1, file in use. In closed files bit 7 and 6 always have opposite values.

- bit 5 - unused

- bit 4 - unused

- bit 3 - unused

- bit 2 = 1, the file is open for write. Bits 7 and 6 are simultaneously set to 1.

- bit 1 = 1, file protected

- bit 0 = 1, subdirectory

 

$01-$08 - file name padded with spaces, if necessary

 

$09-$0b - file name extension padded with spaces

 

$0c-$0d - number of data clusters occupied by the file. $0000 for a dir.

 

$0e - number of data bytes in the last cluster of the file. $00 for a dir.

 

$0f-$10 - global file number (volume sequential number at the time when the file or dir was created, plus 1).

 

$11-$12 - volume random number (same as in VTOC)

 

$13-$14 - dir: number of the first cluster of the directory data

file: number of the first cluster of the file map

 

$15-$2a - dir: 22 zeros

file: 11 numbers of subsequent cluster of the file map

($0000 - unassigned)

 

$2b-$2c - file creation date:

 

- bits 0-4 day of month

- bits 5-8 month ($01 = January etc.)

- bits 9-15 year-1900

 

$2d-$2e - file modification date (same format as above)

 

$2f-$30 - unknown bytes (always zeroed)

 

Every newly created file gets status $c4. After the file is closed, bits 7 and 2 of this value are zeroed.

 

Directory data clusters

-----------------------

 

Each cluster of the directory always contains a integer number of directory entries, maximum 5. If the directory has more entries, the 6th entry is stored to a next cluster of the directory etc.

 

Bytes $f5-$f7 are unused, and the last 8 bytes ($f8-$ff) contain information about the directory:

 

$f8-$f9 - number of the next cluster of the directory ($0000 - last one)

 

$fa-$fb - global file number ($0000 - main directory)

 

$fc-$fd - volume random number (same as in VTOC)

 

$fe - directory chain cluster number (starting from $00)

 

$ff - cluster type ($ff = directory)

 

Files:

-----

 

The file map

 

The file map consists of clusters indicated by the bytes $13-$2a of the directory entry. The first 250 bytes of the map's cluster contain up to 125 numbers of data clusters allocated for the file. The last six bytes contains additional information:

 

$fa-$fb - global file number

 

$fc-$fd - volume random number (same as in VTOC)

 

$fe - map's cluster number in the current file (starting from $00)

 

$ff - cluster type ($80 - file map)

 

The directory entry provides 24 bytes for the list of the map clusters. Because the cluster number is 16-bit, the file map may extend to max. 12 clusters. 12 clusters * 125 data entries * 250 bytes (see below) results in the maximum file extent of 1500 clusters, or 375000 bytes (366.2 KB). If there isn't any other method of linking longer files, this is the ultimate file length limit in this file system.

 

Data clusters

 

Each data cluster contains up to 250 bytes of data. The last six bytes contain additional information:

 

$fa-$fb - global file number

 

$fc-$fd - volume random number (same as in VTOC)

 

$fe-$ff - the number of the data cluster in the current file (starting from $0000)

 

The maximum "number if data cluster" is 32767. The higher byte is always a positive value and thus forms the cluster type mark (<= $7f = data cluster).

dosxe16m.zip

  • Like 1
Link to comment
Share on other sites

Thanks. I always thought this an interesting if flawed DOS. Someone should write a decent com processor for it.

 

Where is the edit button? it no longer appears for me otherwise i would have edited my first post.

It was (enormously inconveniently) removed, I believe, owing to overuse and abuse by certain posters, who would edit topics until all sense of continuity had vanished.

 

There are now fifteen or so golden minutes of opportunity following the submission of one's original post while its edit button remains active...

Edited by flashjazzcat
Link to comment
Share on other sites

  • 13 years later...

Yes. But don't ask me how it works, instead:

"Press START to continue, press SELECT to abort."

 

 

 

And if you are ever unsure what to do, then "press START to continue, press SELECT to abort."

 

You want to kill the author of DOS XE ? "Press START to continue, press SELECT to abort."

 

Want to play a game of Wargames ? "Press START to continue, press SELECT to abort."

(And don't forget, the password is JOSHUA.)

 

DOSXE_format.zip

  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...