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

D88: Add read support for multiple disks in one file. #362

Closed
wants to merge 1 commit into from

Conversation

tdaede
Copy link
Contributor

@tdaede tdaede commented Oct 3, 2023

No description provided.

@tdaede tdaede force-pushed the d88_index branch 2 times, most recently from 210b0a7 to a34afbf Compare October 3, 2023 06:33
@keirf
Copy link
Owner

keirf commented Oct 3, 2023

I'll think about how to integrate this. I'm not keen on multi-disk files (nor compressed disk files) as that's what filesystems and archivers are for. But we should be able to read existing multi-disk files for sure.

@keirf
Copy link
Owner

keirf commented Oct 3, 2023

Do you have an example multi-disk D88 file to hand by the way?

@tdaede
Copy link
Contributor Author

tdaede commented Oct 3, 2023

If you don't like changing the from_file signature you could also do this with the filename, e.g. disk.d88:0 (technically ambiguous but likely not a problem in practice). I also agree that this is a bad idea but I ran up against an in the wild example.

I can send it to you if you like but you can create your own simply by cat-ing two d88 files together.

@keirf
Copy link
Owner

keirf commented Oct 3, 2023

I don't even have any d88 files to hand. Can you give a URL for some?

I'm thinking of extending the :: option syntax but it's not been used when reading existing image files before so it's actually a bit of work. But my.d88::index=1 (for example) would be quite clean.

keirf added a commit that referenced this pull request Oct 4, 2023
keirf added a commit that referenced this pull request Oct 4, 2023
@keirf
Copy link
Owner

keirf commented Oct 4, 2023

This is basically done now in master using the ::index=N option syntax.

It's a bit convoluted because currently options get applied after the file is opened and parsed. Which is pretty dumb. There is more lifting to be done to be able to pass option lists either to __init__ or to the from_file and to_file constructors directly. When that's done, we won't need to parse all the disks in a file, and we can error on out-of-range index more quickly and cleanly.

@keirf
Copy link
Owner

keirf commented Oct 4, 2023

By the way I also am missing test files for a range of other PC-98 formats you added. Like DCP for example, which I think has been broken for a while. Do you have some example images of each type you could upload for me?

@keirf keirf closed this Oct 5, 2023
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

Successfully merging this pull request may close these issues.

2 participants