Jump to content
IGNORED

Atari_Ace's Blog - DOS file linkage fixing simplified


RSS Bot

Recommended Posts

In my last post I fixed a couple of Bellcom disks by copying missing sectors from another disk, and then "fixing the links". This post is going to discuss that, and modify our copy tool to do it automatically.

As explained earlier, the last three bytes of a DOS 2.0/2.5 file contains file metadata, specifically the file index, the next sector, and the number of bytes. When a sector is dropped and you find a replacement on another disk, two of these three values are unlikely to be what the other disk expects, and so you need to change them to the correct values.

In almost all cases, the next sector value will be the current sector plus one, and the file index can be inferred from the next sector. So let's add some code to do that to save us from having to do this manually. To do this, we'll replace the copy_sector routine with the following two routines.

 

http://atariage.com/forums/blog/734/entry-14906-dos-file-linkage-fixing-simplified/
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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