Comments (2)
Unfortunately, 800KiB files fall back on MGT for backwards compatibility, to ensure quirky SAM Coupé disks are still recognised. It's also partly to allow zero-filled files to be treated as MGT, where there's no disk content to match against signatures.
It's supposed to be possible to override the format, to change some values from the detected defaults. In your case I hoped using -s 5 (5 sectors per track) or -z 3 (1024 bytes per sector) would be enough to get it correctly recognised, but it doesn't seem to be working. Either it's broken or I never got around to finishing that -- I'll check!
It'd also be worth me changing the MGT reader to only accept file extensions known to be used for MGT disks: .dsk, .img, .mgt. Unfortunately, the first two are quite common disk image extensions. It could perhaps also treat completely blank images as a special case.
Raw formats (including MGT) should only be tried when signature recognition has failed on other types. Perhaps another format is needed to recognise them? The CP/M support in SAMdisk is also fairly tied to SAM Coupé Pro-DOS, so it's unlikely to recognise other CP/M formats without some help.
from samdisk.
I've pushed a couple of commits that should hopefully resolve this.
The MGT file reader is now stricter, and requires either directory signature matches or a .mgt file extension. Blank files and quirky SAM disks without a .mgt extension will fall back to the RAW file handler, which will use the same format, but with a warning.
If the raw file handler guesses the wrong format, you can override parts of it to correct it. The default for an 800K file is still the MGT format:
$ samdisk info 800.img
[800.img]
Warning: input format guessed from file size -- please check
Type: RAW
Format: 250Kbps MFM, 80 cyls, 2 heads, 10 sectors, 512 bytes/sector
However, you can override parts of the geometry:
$ samdisk info 800.img -s5
[800.img]
Type: RAW
Format: 250Kbps MFM, 80 cyls, 2 heads, 5 sectors, 1024 bytes/sector
In that case the sector size has been adjusted to match the change in sector count. You can do it with cyls/heads and it works changing either value too:
$ samdisk info 800.img -z3
[800.img]
Type: RAW
Format: 250Kbps MFM, 80 cyls, 2 heads, 5 sectors, 1024 bytes/sector
Similarly, a completely unrecognised file format such as an empty 810K image will normally be rejected:
$ samdisk info 810.img
[810.img]
Error: unrecognised disk image format
However, providing sufficient details from the 80/2/0/512 default allows it to be recognised:
$ samdisk info 810.img -c81 -s10
[810.img]
Type: RAW
Format: 250Kbps MFM, 81 cyls, 2 heads, 10 sectors, 512 bytes/sector
from samdisk.
Related Issues (12)
- std::bad_alloc can happen in scan_bitstream_mfm_fm() HOT 3
- "copy --repair" duplicates sectors if no offset data are present in one disk image HOT 8
- Could you provide an updated nightly? HOT 7
- SuperCardPro image format 1.6 HOT 6
- "open: No such file or directory" on a certain SCP image HOT 3
- KryoFlux device writing is not supported HOT 9
- Please support conversion to DMK format
- Latest nightly release (20200607 Build) fails to convert 3" SCP copy protected disks HOT 10
- [samdisk 4.0 ALPHA] Segmentation fault on macOS writing to SD card HOT 1
- Copying a disk with '-d' option enabled copies every fourth track to destination image HOT 5
- "overlapped" sectors on Agat disks after commit f5d026d HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samdisk.