Comments (10)
throw CannotWriteException();
why would u use fukken C++ voluntarily
from adflib.
@mankeli, for the operation you wanted, try: adfOpenDev()
, adfCreateFlop ()
, adfCloseDev()
(as in examples/adf_floppy_format.c
).
As for now, it is tested only for std. floppies, not for hard disks. So let know if you test such case.
For the NATIVE/REAL SYSTEM DEVICES, I repeat again: THE CODE IS NOT TESTED. If you want to try it, do it in a safe way (read comments about it in #31).
from adflib.
Rootblock is mandatory, so it should be an error eFct and not a warning wFct. Did you try to dump your physical device as image, then mount it using adflib?
from adflib.
But empty diskettes don't have a rootblock yet. I'm using adfCreateFlop() to initialize diskettes that may have whatever on them. I can work around this by writing a template filesystem on a disk before calling adfMountDev() but that's not really ideal.
Does adfMountDev() have to enforce that there's volumes on the disk? Would it be better suited that volumes are searched when adfMount() or adfDeviceInfo() is called?
from adflib.
First, what is your goal? Then, we'll see if API is able to answer it, or could be improved
from adflib.
It sounds like they would like to use ADFlib to format uninitialized media on a real device, i.e. not adfCreateDumpDevice() then adfCreateFlop(), but adfMountDev() then adfCreateFlop().
Imagine a DOpus program for some kind of CatWeasel device, using ADFlib. The user can format uninitialized floppy disks in their real floppy drive and can read/write files on them thereafter.
from adflib.
Sorry, forgot to reply! I'm just creating adf images within another image file. Using my own low-level functions, like
nFct->adfInitDevice = ercInitDevice ;
nFct->adfNativeReadSector = ercReadSector ;
nFct->adfNativeWriteSector = ercWriteSector ;
nFct->adfReleaseDevice = ercReleaseDevice ;
nFct->adfIsDevNative = ercIsDevNative;
I worked around this by just using empty pre-formatted adf image that I copy to the memory area before.
The ADFlib API kinda looks like you could just format your native disks with it, so imho it's a bit odd that the existing rootblock is required. :) The DOpus example @kyz came up with, is a good use case too. Same kind of template-writing would be necessary there too.
from adflib.
I have precisely the same problem --- I can't create the Device to pass in to adfCreateFlop without first having a filesystem on the floppy disk.
I eventually managed to make it work by faking up a Device like this:
struct Device dev = {};
dev.readOnly = false;
dev.isNativeDev = true;
dev.devType = DEVTYPE_FLOPDD;
dev.cylinders = 80;
dev.heads = 2;
dev.sectors = 11;
adfInitDevice(&dev, nullptr, false);
int res = adfCreateFlop(&dev,
(char*)"FluxEngine FFS", 0);
if (res != RC_OK)
throw CannotWriteException();
from adflib.
First, what is your goal? Then, we'll see if API is able to answer it, or could be improved
MountDev has been designed to mount an existing filesystem. If I remember well, CreateFlop only create a valid filesystem on a floppy disk, and not HDD
from adflib.
Possible to access empty devices since 0.8.0, improved in 0.9.0.
from adflib.
Related Issues (20)
- Updating existing files in an ADF image HOT 22
- CI / GitHub's "Actions" HOT 21
- Things to finish for 0.8.0 HOT 17
- Fuzz testing HOT 6
- API HOT 2
- Memory leaks in adf_dev_hd: not freeing vol after another allocation fails HOT 1
- Branching scheme HOT 2
- Improve adf_salv (salvage) HOT 3
- adflib debian/ HOT 34
- Reading files with incorrect checksums on (data) blocks HOT 3
- Crash on adf_bitm.c:417 using adf_show_metadata HOT 9
- (in)validity of block allocation bitmap HOT 4
- Broken feature in unADF HOT 7
- unadf improperly parses options with an argument HOT 2
- Add tests for dircache updates HOT 3
- adfEndOfFile() never triggers and adfFileRead only gives "blank" data HOT 3
- A generic API for all types of devices HOT 6
- Creating floppy compatible with 1.3 HOT 2
- Opening devices in the current dev branch HOT 2
- Reference: Floppy boot process and physical layout
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 adflib.