[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NIB and DSK questions
You could look at the file size and see if it is a multiple of 35 -- anything not a multiple of 35 is a disk image of uneven size and should be thrown out. Take the file size and divide by 35, and that is the size of each track. Then make a ring buffer for each track, such that reading the end of the track jumps back to the start of the track. There's your disk emulation. :-D
The way that the computer reads a given track is to move the head until it finds sector headers for that track, and then it keeps reading until it finds the header for the given track/sector. After that it grabs the next chunk (the 6/2 encoded data) and then decodes the data. it is possible that your image has more junk inbetween the sectors -- or there is extra and/or repeated data at the end of each track.
If you scan for sector headers and inventory what is actually in the image, it might make more sense -- assuming that the disk uses the same sort of sector header format that Dos and Prodos use. Otherwise all bets are off and you have to roll your own deprotection scheme to translate it and gut the custom RWTS in favor of your own. Or buy something nice for Antoine and he'll probably crack it. :-D
-b