Comments (9)
I've read this a good few times and I'm not quite sure if you are reporting a problem, posting a handy hint, or something else? I think my confusion comes about because I don't know if you have a valid BPB already or you are constructing one from scratch? If existing, the FS info sector value should point to valid data. If you have constructed a BPB, then I believe you can set both the FS info sector and the Backup boot sector to 0xffff to indicate you don't have them. See the note in the last table here http://www.ctyme.com/intr/rb-2985.htm#Table1664
from kernel.
I have a valid BPB (constructed from scratch) with a valid FSIS (sector 1). I want to create the DPB to put it into the CDS. To create the DPB from the BPB the kernel reads the FSIS sector. To read the sector the kernel reads the DPB from the CDS. The CDS doesn't yet have a DPB. I'm not really sure myself if it's a bug or a hint: to create a DPB (for a new drive) with an FSIS you must first create it without.
from kernel.
Yes, I understand now. Skipping read_fsinfo()
would mean you'd have to fix up the cluster fields in the DPB afterwards, which essentially is what you are doing with your workaround. Perhaps a modified version of getblk()
could read without reference to the CDS. Have you tried your test case on another FAT32 aware DOS or Windows 9x, it would be interesting to know if using int21/53 has a more natural flow there?
from kernel.
BTW did you try setting the unit/subunit values in the DPB prior to the call, as suggested by http://www.ctyme.com/intr/rb-2985.htm?
from kernel.
BTW did you try setting the unit/subunit values in the DPB prior to the call, as suggested by http://www.ctyme.com/intr/rb-2985.htm?
That page doesn't seem to mention any instance of "unit"?
from kernel.
I think they are referring to subunit here.
DBP drive byte must be set to valid drive (Windows95-OSR2)
But in any case this is likely only to work if he tests it on Win9x, as FreeDOS's int21/53 calls read_fsinfo()
-> getblk()
-> dskxfer()
-> get_dpb()
-> get_cds()
regardless of subunit's value.
from kernel.
From what I can tell MS-DOS (7.10) ignores FSIS altogether, always writing -1 to the number of free clusters and 0 to the first free cluster.
from kernel.
Okay, thanks. Do you have the source of a test case I can experiment with?
from kernel.
RDRVSX32 - a FAT32 RAM drive, NASM source (look around line 986).
from kernel.
Related Issues (20)
- FAT32 loader installed by FreeDOS SYS with /OEM:EDR doesn't correctly pass the load unit in DL (and vice versa) HOT 1
- fdconfig.sys SHELL=4debug.com will try to load debug.com HOT 3
- Wrong format specifiers if compiled without FAT32 support
- Startup CPU check does not accept NEC V20/V30 as 186-class processors HOT 5
- FAT32 boot loaders: With a (rounded) file size of 128 KiB, either the file data corrupts the FAT sector or vice versa
- Regression: After commit 1c2f541 (2024/02/04) CH357 driver doesn't work anymore (UPDATE) HOT 32
- A small build issue when building using OpenWatcom 1.9 under DOS HOT 3
- gcc/Linux/GNU make fails to build country.sys HOT 13
- Build issue with recent OpenWatcom snapshots requiring `-wcd=106` HOT 8
- sys and boot sector improvements [TODO] HOT 5
- SYS /OEM:W9X /L 0 does not set loadaddr to 0
- ddt.offset confusingly commented HOT 1
- Terminating the device / fdconfig.sys process crashes the system
- DDT / UDSC / UPB structure differs from MS-DOS v6.22/v7.00/v7.10 (and EDR-DOS) HOT 1
- INT25/26 fail for uninitialized FAT-12/16 partitions leading to format error
- Is there anything implemented that uses PartitionMode yet? HOT 4
- FDIMPLES crashes with current kernel HOT 11
- win31support HOT 1
- Suggestion: Work around Xi8088 BIOS bug by setting DS = 40h for 13.41 call HOT 1
- DPB memory invalidation 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 kernel.