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

non-sequent sector numbers - how-to? #488

Open
hanz45ru opened this issue Sep 16, 2024 · 5 comments
Open

non-sequent sector numbers - how-to? #488

hanz45ru opened this issue Sep 16, 2024 · 5 comments

Comments

@hanz45ru
Copy link

As I see in diskdefs.cfg, there's possibility to define non-sequent sector numbers. But, when I try to put something like it, into custom format description, i get "invalid literal for int() with base 10". Is t possible only for selected disk encodings, not for any?? Or i do something wrong? Below is my try:
disk zx.isdos.800
cyls = 80
heads = 2
tracks * ibm.mfm
secs = 1,2,3,4,9
bps = 1024
h = 0
end
end

@keirf
Copy link
Owner

keirf commented Sep 16, 2024

Currently it's not possible, except by using the generic format ibm.scan.

@hanz45ru
Copy link
Author

this perfectly works for read, but if I want to write IMG, sector nums probably will be in sequence 1-5. So, if not possible, then only solution is HFE format.

@keirf
Copy link
Owner

keirf commented Sep 16, 2024

You could use a verifiable format like ImageDisk (IMD)?

I could probably also allow id to be specified as a list in the diskdef config.

@keirf keirf reopened this Sep 16, 2024
@hanz45ru
Copy link
Author

hanz45ru commented Sep 17, 2024

let me explain.
when the task is "read floppy and get files" - there's two ways: read "ibm.scan" or read HFE and export to IMG.
when the task is "read, store, and write back" - i can just use hfe (also it's good for FlashFloppy)
But, sometimes floppies, formated on BDI (Betadisk interface), mostly on bad drives, have problems with layout. due to index inconsistency, some sectors are shifted along the track. So, it will be fine, when I can read hfe, export it to IMG, and write back with perfect gaps and daylight-clear structure.
The second fact: sector with ID 9 is essential for BDI. Machine starts reading from 9 sector, to detect disk compatibility. So, 5*1024 layout, used by IS-DOS, allow boot-up thru the "buffer overflow" way.
Then, it will be fine to have possibility to write in format, that allows non-sequental sector ID's.
IMD, or Teledisk TD0 stores gaps lenght, even bad ones, and in case described here, have no anything more than hfe.

@keirf
Copy link
Owner

keirf commented Sep 17, 2024

IMD doesn't store gap lengths. You should try it. For example:

gw read --format=ibm.scan name.imd
gw convert --format=ibm.scan name.imd name.img
gw convert name.imd name.hfe
gw write name.imd

So you can read to IMD, then create IMG and "perfect" HFE. And use the IMD to write back too. The need for --format=ibm.scan on the second command line above is a bit of a shame. I'll see about fixing that to make it automatic.

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