Comments (3)
So I ran this through lldb and discovered that the code is on some path that involves DADiskCreateFromBSDName
which was unexpected since this isn't a disk image. That clue led me to BlockDevice
code which recognizes a match when BlockDevice::IsFileHDD
is true.
Turns out that this file has a size which happens to be an exact multiple of SECTOR_SIZE
(512) and so rather than being treated as a SuperCardPro input it got handed to the BlockDevice class instead.
I was able to workaround this by appending an extra byte at the end of the file:
printf '\x00' >> test.scp
Not sure if this would still be an issue in the current version if it tries the SuperCardPro before the other driver, but it certainly seems to give the block device driver first dibs in the last macOS build that's available.
from samdisk.
Thanks for reporting this, and your analysis of the problem.
It all stems from SAMdisk's attempt to work out the type of arguments being passed on the command-line. Once it's decided (perhaps incorrectly) it goes all in on that assumed type, with no way to steer it back in the right direction -- that can lead to some confusing error messages. I think false-positives in IsFileHDD has become more of an issue over time because MAX_IMAGE_SIZE been increased from perhaps only 4MiB in early versions to the current 256MiB value, needed to accept multi-revolution flux images.
As a short-term fix I'd recommend having IsFileHDD always return false. I'll make a start on moving the other commands away from the argument detection where possible.
from samdisk.
Ah, didn't realize the code published here would still compile on macOS.
A nice feature long-term would be letting us specify the input/output types explicitly instead of from the file and/or its name.
from samdisk.
Related Issues (12)
- SuperCardPro image format 1.6 HOT 6
- 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
- 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
- 800KB raw images may be mis-detected as MGT HOT 2
- Could you provide an updated nightly? HOT 7
- 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
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.