Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Overwrite existing file byte for byte in the same sections in an ADF #96

Open
ourIThome opened this issue May 10, 2019 · 6 comments

Comments

@ourIThome
Copy link

I have an ADF file that was created from a disk with a bad block on it.
Only one file on the ADF fails to work, and reports a read/write error if you open it from inside an amiga.

I have the same file on another disk (good working copy), where I can see via a hex editor that it matches. Same size and several pages in a hex editor the bytes match perfectly -- up until the bad block are reached.

The file is fragmented on the floppy ... so not in one contiguous order ... so I cant just hex edit the ADF from a hex editor and overwrite the affected bytes. I'd like to somehow overwrite all the bytes used in the broken file on the ADF, and have my fixed file dumped byte for byte in the same order over the top of the broken one.

hope this makes sense?

This would help to fix some other disks I have. I'd like to retain the disk as it was imaged, without dumping the contents and creating a new "defragged" floppy disk.

Regards

Stephen

@QkiZMR
Copy link

QkiZMR commented May 10, 2019

Why you don't want to defrag floppy image? Is it because of some software protection?

@ourIThome
Copy link
Author

I wish to try and preserve the disk, with even any left over file fragments that might be useful in the future to be recovered. Its more about preservation with recovery, than preservation with clean and tidy. I know ... a strange request :)

@QkiZMR
Copy link

QkiZMR commented May 11, 2019

I would try to mount ADF file in emulator, then remove file that is on faulty blocks. Next copy same file from good source. File can be copied on good blocks but it depends how many free blocks are on this ADF file.
If system will try to save file on same faulty blocks because there's no free blocks I would try to clear free blocks. I remember that some disk tools have this option, I don't remember which one. After clearing free blocks I would try to copy file from good source again.

@ourIThome
Copy link
Author

Thats going to potentially overwrite good blocks with other data on it (deleted content).
An inplace overwrite is what I would love to see with these tools. This is about preserving the ADF with the data as it is ...but fixing the bytes for a specific file ... where it was corrupted in its previous physical form is what im trying to achieve.

If the github owner thinks this isnt possible, then I ask them to close the request.

@QkiZMR
Copy link

QkiZMR commented May 11, 2019

I know what you want achieve but you didn't say that you want preserve delete files.
I think it's hard to do, this overwrite in place.
I would check offset where bad data begins in file and check to which block on disk belongs. Then check how long disk error is. But for this you need disk editor and better to do this with Amiga software.

@ourIThome
Copy link
Author

The thing with doing it from an amiga OS, the OS kicks in and stops progress if it detects what it thinks is a bad block. Other times a CRC error doesnt always show or indicate where it is. Then sometimes Im clicking next next next scrolling through the bytes and cant find where the problem is. I have a contact with a private tool for fixing Amiga disks from a PC... and he managed to fix the few I've passed over. However the tool is private and not for public release. So I have a work around I can currently use ... but I would prefer a tool like this to have method I could use to do this myself.

Yeah sorry if I wasn't clear about the preservation thing ... I just want to touch the bad bytes and fix with good known bytes without affecting anything else.

Anyway, have a good weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants