Image Map Image Map
Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Keyboard differences. Msdos 3.3 vs Msdos 5

  1. #21

    Default

    The behavior you describe still sounds like a BIOS difference as DOS doesn't directly read the keyboard hardware it calls BIOS INT 16h. During startup DOS does check the extended flag (40:96h bit 4) and if it is set then it uses the extended keyboard (101 or 104-key) INT 16h functions 10h and 11h to read and scan the keyboard instead of standard keyboard functions 00h and 01h. Older versions of DOS didn't do this though so later versions are simply exposing a BIOS issue where it isn't initializing enough of the BIOS data area since later bytes were unused. Most PC compatibles zero the unused bytes of the BIOS data area thus this problem doesn't occur.
    Last edited by pcdosretro; November 18th, 2019 at 09:10 AM.

  2. #22

    Default

    Quote Originally Posted by pcdosretro View Post
    The behavior you describe still sounds like a BIOS difference as DOS doesn't directly read the keyboard hardware it calls BIOS INT 16h. During startup DOS does check the extended flag (40:96h bit 4) and if it is set then it uses the extended keyboard (101 or 104-key) INT 16h functions 10h and 11h to read and scan the keyboard instead of standard keyboard functions 00h and 01h. Older versions of DOS didn't do this though so later versions are simply exposing a BIOS issue where it isn't initializing enough of the BIOS data area since later bytes were unused. Most PC compatibles zero the unused bytes of the BIOS data area thus this problem doesn't occur.
    I believe you are correct.
    I made 3 changes to the BDA - 40:80, 40:82 and 40:96. I think the first 2 are "don't care" but the last one... bit 4 being set seemed to be the issue.

    The investment in time to learn how to modify and compile XUB is really paying off. I suspect the BDA needs to be corrected during BIOS init, and before DOS starts. Otherwise one could imagine a little piece of code that runs from Autoexec.BAT that pokes the right values into the BDA. In any case, having a fix for the original BIOS, that is embodied in an add-on BIOS, is tidy.

    So I guess I can have a Z-171 with a huge disk drive now, and I can go ahead with my plan to expand RAM with 1MB of SRAM.

  3. #23
    Join Date
    Mar 2017
    Location
    New Jersey, USA
    Posts
    527

    Default

    You could probably also make a tiny driver invoked from CONFIG.SYS that adjusts the BDA then exits. But calling a tiny COM file from AUTOEXEC.BAT is probably a lot more convenient.

  4. #24

    Default

    Quote Originally Posted by Twospruces View Post
    I believe you are correct.
    I made 3 changes to the BDA - 40:80, 40:82 and 40:96. I think the first 2 are "don't care" but the last one... bit 4 being set seemed to be the issue.

    The investment in time to learn how to modify and compile XUB is really paying off. I suspect the BDA needs to be corrected during BIOS init, and before DOS starts. Otherwise one could imagine a little piece of code that runs from Autoexec.BAT that pokes the right values into the BDA. In any case, having a fix for the original BIOS, that is embodied in an add-on BIOS, is tidy.

    So I guess I can have a Z-171 with a huge disk drive now, and I can go ahead with my plan to expand RAM with 1MB of SRAM.
    You can probably ignore 40:80 and 40:82 (keyboard buffer start and keyboard buffer end), only the BIOS itself deals directly with those locations. Note the original IBM PC BIOS (versions 1 and 2) did not use those locations, that was added with version 3 of the PC BIOS and used with all IBM BIOSes afterward. Most XT compatibles copied this but I guess the Zenith Z-171 did not. I would suggest disassembling the Z-171 and studying what it is doing. For comparison you can look at the IBM BIOS source code on my website here - https://sites.google.com/site/pcdosretro/ibmpcbios

    As for 40:96 this is checked early in IO.SYS initialization before CONFIG.SYS is read so not even a device driver will be able to fix this. Try putting SWITCHES=/K in CONFIG.SYS, that should fix the issue as that should force the use of the standard BIOS keyboard functions (INT 16h functions 00h and 01h).

  5. #25

    Default

    Had to keep pushing. Tried MSDOS 6.22. of course, it booted right up.
    Pretty happy with the progress here. While not out of the box compatible, it is certainly looking pretty good.
    In order to incorporate the XT-CF card AND to use with MSDOS 5 or 6.22 I needed 4 patches via XUB Bios

    1) not a patch but use XUB with so called "late-init INT13h" which in fact in Z171 is early-init.
    2) fix to memory detection.. BIOS was mis calculating RAM size by adding 018h to word at 40:13 (2 bytes)
    3) patch to correct HDD count at boot up @ 40:75 (one byte)
    4) patch to reset keyboard flags3 @ 40:96 (one byte)

  6. #26

    Default

    Quote Originally Posted by Twospruces View Post
    Had to keep pushing. Tried MSDOS 6.22. of course, it booted right up.
    Pretty happy with the progress here. While not out of the box compatible, it is certainly looking pretty good.
    In order to incorporate the XT-CF card AND to use with MSDOS 5 or 6.22 I needed 4 patches via XUB Bios

    1) not a patch but use XUB with so called "late-init INT13h" which in fact in Z171 is early-init.
    2) fix to memory detection.. BIOS was mis calculating RAM size by adding 018h to word at 40:13 (2 bytes)
    3) patch to correct HDD count at boot up @ 40:75 (one byte)
    4) patch to reset keyboard flags3 @ 40:96 (one byte)
    That XUB sounds a bit iffy, why don't you use your PCs native BIOS ? SWITCHES=/K to force the use of standard keyboard BIOS functions is supported in DOS 4.0 and later. You would still need to set the keyboard type flag at 40:96 bit 4 properly for other programs to work correctly. To properly support 101/104-key enhanced keyboards the BIOS should issue keyboard controller commands to check for the presence of such a keyboard and set the keyboard type flag at 40:96 appropriately.

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
  •