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

System transfer utility #208

Merged
merged 7 commits into from
Jan 12, 2025
Merged

Conversation

eduardocasino
Copy link
Contributor

I'm opening this pull request for review and discussion of a system transfer utility that I've written which copies the reserved sectors and the system files from one disk to another, making it bootable. The destination disk must be formatted. the syntax is:

sys [<src drive>] <dst drive>

Example:

A> sys b:
Transferring boot sectors:
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
Copying system files:
A:BDOS.SYS
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
A:CCP.SYS
rrrrrrrrrrrrrrrrwwwwwwwwwwwwwwww
Done.
A>

It also works with a single drive, asking for floppy swaps.

It checks for the existance of reserved sectors in both source and destination disks and does not attempt a transfer unless there is enough room in the destination, so it should be safe even if the platform does not support it. That means that it could be added to the MINIMAL_APPS group or just include it into the images of the platforms that make sense, like Apple ][ or KIM-1 with K-1013.

WARNING: Until the cpm_bios_seldisk() bug is resolved in llvm-mos, using this utility on an invalid drive can yield unexpected results.

@davidgiven
Copy link
Owner

I think this is definitely worth having. The biggest question is whether it should be combined with mkfs or format --- I think not, as they all do slightly different jobs, and it makes modularisation easier.

One note: if the number of reserved sectors differs between disks, it's a good bet that the BIOS won't work on the new disk, as it'll be looking in the wrong place for the filesystem. Would it make sense to check for equality rather than just checking for enough space?

@eduardocasino
Copy link
Contributor Author

I think this is definitely worth having. The biggest question is whether it should be combined with mkfs or format --- I think not, as they all do slightly different jobs, and it makes modularisation easier.

Agreed, better to keep them apart.

One note: if the number of reserved sectors differs between disks, it's a good bet that the BIOS won't work on the new disk, as it'll be looking in the wrong place for the filesystem. Would it make sense to check for equality rather than just checking for enough space?

Absolutely, I didn't think of that. Changing it.

@davidgiven davidgiven merged commit f52b055 into davidgiven:master Jan 12, 2025
1 check passed
@davidgiven
Copy link
Owner

Merged --- cheers.

@eduardocasino
Copy link
Contributor Author

Thanks. What it is pending is where to add the utility. MINIMAL_APPS? Per image?

Cheers.

@davidgiven
Copy link
Owner

BIG_APPS, I think, as it's no use without mkfs, which is there because it's a C program.

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