Giter Club home page Giter Club logo

Comments (9)

andrewbird avatar andrewbird commented on August 26, 2024

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.

adoxa avatar adoxa commented on August 26, 2024

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.

andrewbird avatar andrewbird commented on August 26, 2024

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.

andrewbird avatar andrewbird commented on August 26, 2024

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.

ecm-pushbx avatar ecm-pushbx commented on August 26, 2024

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.

andrewbird avatar andrewbird commented on August 26, 2024

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.

adoxa avatar adoxa commented on August 26, 2024

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.

andrewbird avatar andrewbird commented on August 26, 2024

Okay, thanks. Do you have the source of a test case I can experiment with?

from kernel.

adoxa avatar adoxa commented on August 26, 2024

RDRVSX32 - a FAT32 RAM drive, NASM source (look around line 986).

from kernel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.