Image Map Image Map
Results 1 to 7 of 7

Thread: Are hard drives that used 1024 byte sectors still common in vintage PCs?

  1. #1

    Default Are hard drives that used 1024 byte sectors still common in vintage PCs?

    I'm writing FAT16A/B CHS (non-LBA) file system access code as part of an MS-DOS program that i'm writing in 8086 assembly language.
    I plan to release this program (it's a game) for people to run on their actual hardware.
    I found the DOS file services to be a little too restrictive, so i'm writing my own procedures for reading sectors of the hard drive.

    I'm using int 13h non-extended, so at the moment i'm only able to access drives up to 504 Megabytes. (C/H/S - 0/0/1 up to 1023/15/63)
    If the BIOS does translation, I can access drives with reported 8-bit head numbers.
    A 4GB drive installed in my Pentium MMX laptop reports a geometry of 992/128/63, of which I can access every sector.

    I know if I really cared about compatibility I should be using the DOS services, but I still want my hand-written code to work on a wide array of machines.
    (In the case of writing sectors, i'll use the DOS services for the sake of preventing user data corruption.)

    I've been searching online for weird, non-standard BIOS quirks and other oddities, but the only thing I could find that would undoubtedly break my code is 1024 byte sectors.
    Even attempting to load the MBR would crash my program. Buffer overflow.

    I don't want to double my 512 byte sector buffer, and add more complexity to my code (different calculations for different sized sectors), if there is basically zero chance of ever encountering such a drive.

  2. #2
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    33,646
    Blog Entries
    18

    Default

    Except for some optical media, you're probably safe. ST506 drives, being basically "dumb" could be formatted for nearly any sector size, as long as the controller allowed it. 256 byte sectors weren't unusual. 1024, not so much.

    Although, there was an OS hack back in the days of MS-DOS 3.3 to accommodate larger drives by hooking the INT 13H BIOS and blocking up larger (1024, 2048...) byte sectors to extend the capacity limits of FAT16. It wasn't common, but it was out there.

  3. #3

    Default

    Quote Originally Posted by codyw1996 View Post
    I found the DOS file services to be a little too restrictive, so i'm writing my own procedures for reading sectors of the hard drive.
    What's exactly the problem with DOS file services?
    You're unlikely to encounter 1024-byte sectors, but very likely to run into other problems with bypassing DOS: network drives, CD-ROM, HPFS, NTFS, Dosbox...

  4. #4

    Default

    Oh ok, thanks. I should have started this thread in the Vintage Computer Hardware section.
    It should probably be moved there.

  5. #5

    Default

    Quote Originally Posted by Xacalite View Post
    What's exactly the problem with DOS file services?
    There's no real issue, I just wanted to do it myself. I like reinventing the wheel.

    Quote Originally Posted by Xacalite View Post
    You're unlikely to encounter 1024-byte sectors, but very likely to run into other problems with bypassing DOS: network drives, CD-ROM, HPFS, NTFS, Dosbox...
    I do most of my development in DOSBox. I mount ann hdd image, so Int 13 works fine.
    As far as the other stuff goes, If the user wants to run my game on hardware then they'll need either a master or slave hdd installed with a FAT16 partition that lies within the first 8 gigs of the drive.
    Otherwise, they can play it in DOSBox. So, no issue.
    Last edited by codyw1996; December 30th, 2017 at 12:57 PM.

  6. #6
    Join Date
    Aug 2006
    Location
    Chicagoland, Illinois, USA
    Posts
    6,328
    Blog Entries
    1

    Default

    Quote Originally Posted by codyw1996 View Post
    I found the DOS file services to be a little too restrictive, so i'm writing my own procedures for reading sectors of the hard drive.
    There are only downsides to doing this. I highly recommend you don't do this since you just run the risk of limiting your audience if they have a configuration that doesn't work with your routines. For example, your routines won't work with any system using disk compression (ie. Stacker, drivespace, etc.).

    The one time I thought it was worthwhile to write my own DOS was when I was writing 8088 Domination; I found that DOS was double-buffering the data it was giving me, which wasted time. I later discovered that requesting data from sector-aligned locations prompted DOS to transfer the data (either from disk or from BUFFERS) directly to DS:DX without buffering it first. So, I redesigned 8088 Domination to create data files where all datums were sector-aligned (which can be guaranteed because all files start on a sector boundary). I was able to hit over 300KB/s reads on a controller that used DMA for transfers, on a 4.77 MHz 8088, using the existing DOS.
    Offering a bounty for:
    - A working Sanyo MBC-775, Olivetti M24, or Logabax 1600
    - Music Construction Set, IBM Music Feature edition (has red sticker on front stating IBM Music Feature)

  7. #7
    Join Date
    Jan 2013
    Location
    Marietta, GA
    Posts
    3,364

    Default

    I don't know about hard drives, but the OEM DOS 1.25 and 2.x for the Eagle 1600 used 1024 byte sectors on their quad-density 5.25" floppy disks.

    I was quite surprised when I ran the Norton Utilities 4.5 under Eagle's DOS and it opened up the disk image just fine.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •