Jump to content
IGNORED

XFD & ATR File Formats


Recommended Posts

Does anyone have details of the XFD & ATR file formats, or can you point me in the right direction?

 

I'm trying to build a library of Content Importers for XNA and I thought it would be a fun thing to have some Atari format importers thrown into the mix as well. :cool:

 

Here!

Link to comment
Share on other sites

Does anyone have details of the XFD & ATR file formats, or can you point me in the right direction?

 

I'm trying to build a library of Content Importers for XNA and I thought it would be a fun thing to have some Atari format importers thrown into the mix as well. :cool:

 

Here!

 

What is the definition of a paragraph? I am looking at 'wPars' and 'btParsHigh'

 

Is 'size' in Bytes or Sectors?

 

Also are there any other common malformations of the ATR format? (Other than the size of the first three sectors, mentioned)

Link to comment
Share on other sites

What is the definition of a paragraph? I am looking at 'wPars' and 'btParsHigh'

 

A paragraph is 16 ($10) bytes. This terminology probably came from 8086 assembly language...

 

The description of wPars actually says this:

 

size of this disk image, in paragraphs (size/$10)

 

Is 'size' in Bytes or Sectors?

 

In "size of this disk image", he's talking about bytes.

 

A single-density 720-sector floppy image would have 5760 paragraphs (720 sectors * 128 bytes each = 91260 bytes, divide by 16 aka $10). So wPars would be 5760 and btParsHigh would be zero... you only ever have a non-zero btParsHigh if the image size is one megabyte or larger.

 

Also are there any other common malformations of the ATR format? (Other than the size of the first three sectors, mentioned)

 

I've run into atr images where the size according to the ATR header claims the file should be bigger than the actual size of the file (e.g. it says there are 5760 paragraphs, but the actual file is 46208 bytes aka 361 sectors). These files work OK on emulators; the "extra" sectors are just treated as being full of zeroes.

 

The XFD "format" is no format at all, BTW. It's just a raw dump of the disk data, with no header or structure. You have to recognize them by name... and you might want to give a warning to the user if the file's size in bytes isn't divisible by 128 (but you should probably process the file anyway).

Link to comment
Share on other sites

i think the two atr util's atr util and make atr only support 16 meg limit as does the utr making util in a800win(+)....I think (havent tried them in a while and i've never had much need for 16 meg images, unless there's a way for transfering single atr images onto a 16meg atr image and load each file from a menu)

Link to comment
Share on other sites

What is the definition of a paragraph? I am looking at 'wPars' and 'btParsHigh'

 

A paragraph is 16 ($10) bytes. This terminology probably came from 8086 assembly language...

 

The description of wPars actually says this:

 

size of this disk image, in paragraphs (size/$10)

 

 

Many thanks for the explanation.

 

The whole divide by 16 confused me a little :roll:

 

But as you mentioned about 8086, and as ATR grew up around Nick Kennedy's SIO2PC. Who in his docs says he "enjoys assembly"... I guess this is where the ATR code was born I guess it makes sense.

 

The XFD was the xformer format(or as you say lack there of) from Emulators inc.

 

One more question :D as the header is 16 byte, is this included in the wPars count (+/- 1)?

I would think not but I just ask in case this also is a common mistake, as you also mention issues in reported size versus actual size problems.

Edited by Sub(Function(:))
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...