Jump to content
Sign in to follow this  
Larry

ATR Header?

Recommended Posts

Here is info from Nick Kennedy's SIO2PC docs about the ATR header:

 

"WORD = special code* indicating this is an Atari disk file

WORD = size of this disk image, in paragraphs (size/16)

WORD = sector size. (128 or 256) bytes/sector

WORD = high part of size, in paragraphs (added by REV 3.00)"

 

I am not familiar with "paragraphs". If I try to use the typical (low byte + high byte x 256) /16 then I end up with 718.5. (?)

 

Does anyone know how to correctly decipher these "size" numbers (including the "extra" word added by "REV 3.00") ?

 

Thanks,

Larry

Share this post


Link to post
Share on other sites

The size is counted in "16 byte increments", aka paragraphs. For example, 256 bytes = 16 paragraphs. 1024 paragraphs = 16x1024 = 16384 bytes.

Edited by drac030

Share this post


Link to post
Share on other sites

Thanks for the paragraph information, Konrad.

 

I think that I've also determined why the "size" doesn't come up to 720 (with my calculation) -- it would be off by exactly the 3 "single density" boot sectors.

 

If I nail this down, I'll re-post. Google referenced several related posts in the past, but I saw none that really answered my query.

 

Edit:

Yes, that's it! A SD disk/image should contain 720 * 128 = 92160 bytes.

a 90K ATR header shows a "word" value of 128, 22

That would be 22*256 + 128 = 5760 "paragraphs"

5760 * 16 = 92160 bytes.

Thanks, again!

 

-Larry

 

 

The size is counted in "16 byte increments", aka paragraphs. For example, 256 bytes = 16 paragraphs. 1024 paragraphs = 16x1024 = 16384 bytes.

Share this post


Link to post
Share on other sites

Hello Larry,

 

do you still use version 3.00 of SIO2PC ?? Remember, this version has a bug, it produces enhanced density ATR`s with a length of 140kbytes (143,xxx Bytes), so better use a newer version like 4.1x or 4.2x. If you try to copy/download such a 140k ATR with a Sectorcopy program, most of the time the copy program will recognize it as SD/90k, so you have problem there... (which I solved with MyCopier 1.c and setting the "E"nhanced density switch to "on")...

 

-Andreas Koch.

Edited by CharlieChaplin

Share this post


Link to post
Share on other sites

Hi Andreas-

 

Thanks, but I don't use SIO2PC -- just Win APE. However Nick's SIO2PC docs explain the header slightly better than Steve Tucker's Disk Image FAQ's, so I quoted from Nick (verbatim). I don't think that I'd ever heard of the "paragraph" term before.

 

-Larry

 

Hello Larry,

 

do you still use version 3.00 of SIO2PC ?? Remember, this version has a bug, it produces enhanced density ATR`s with a length of 140kbytes (143,xxx Bytes), so better use a newer version like 4.1x or 4.2x. If you try to copy/download such a 140k ATR with a Sectorcopy program, most of the time the copy program will recognize it as SD/90k, so you have problem there... (which I solved with MyCopier 1.c and setting the "E"nhanced density switch to "on")...

 

-Andreas Koch.

Share this post


Link to post
Share on other sites

A 180K double-density disk is off by three sectors of 128 bytes because the first three sectors are ALWAYS 128 bytes, even in double-density. This is because the disk boot process loads three sectors assumed to be 128 bytes each. Double-density disks store the data as 256 bytes sectors, but the control board only returns half the sector data for the first three sectors.

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...