Jump to content
IGNORED

Sector editor for large 16MB ATR DD image?


foft

Recommended Posts

I'm investigating why some large ATR images are not working with the drive emulator I built into the FPGA. The images work fine with ASPEQT, but not with my code.

I thought the easiest way to debug would be to just check a few sector contents via a sector editor. However I can't find one that works with such large images and double density. Are there any that support this?

 

I can't see anything simple wrong with my code to access the atr sectors:

                        location = offset;
                        if (sector>3)
                        {
                                sector-=4;
                                location += 128*3;
                                location += sector*atr_header.wSecSize;
                                sectorSize = atr_header.wSecSize;
                        }
                        else
                        {
                                location += 128*(sector-1);
                                sectorSize = 128;
                        }

I heard some disks incorrectly have 256 bytes for the first 3 sectors. Is there a good way to check if that is the case?

Link to comment
Share on other sites

EDDY (SpartaDOS X toolkit) will handle these on the A8. The best way (I found) to check for long or short boot sectors was to compute the would-be size of the file according to the paragraph count in the header, then compare this with the actual ATR file size.

 

EDIT: actually I had no recourse to the FAT file size at all. I think I convert paragraphs to bytes, divide by 256, and check if there's any remainder. If there is, the boot sectors are short.

Edited by flashjazzcat
Link to comment
Share on other sites

I guess "how you really read ATR files" is another document we need written....

 

Checking the paragraph count is also the way I handle it in Altirra. Note that if you do encounter this case, there are two subtypes of screwiness to deal with: each 128 byte sector padded to 256 bytes, and three 128 byte sectors followed by 384 bytes of padding. I handle this by checking for whether the second and fifth 128-byte slots are empty.

  • Like 2
Link to comment
Share on other sites

Great thanks. I've just downloaded SDX - I wasn't aware of the update project, fantastic! Errr, they all need flashing to expansions, no boot disk?

 

Thanks for the info on 'how to really read ATR files'. I've not come across any like that yet (I checked this in a sector editor) but sure I will!

Edited by foft
Link to comment
Share on other sites

Well I didn't manage to get Eddy running, crashed on Spartados 3.2 for some reason. I found the issue thanks to Russg's rw13.bas - as referenced here http://atariage.com/forums/topic/223509-floppy-verifier/. Put one disk in aspeqt and the other in my drive emulation...

 

It showed it stopped working at sector 32768! Sure enough looking at the code I'm anding aux2 with 0x7f. Not sure why I'm clearing the top bit, but that appears to be the cause here.

Edited by foft
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...