Trying to Solve Strange Problems

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Trying to Solve Strange Problems

Unread post by jca »

I had been experiencing strange problems with this core. I made several posts about it but so far it went nowhere so I decided to start from zero making simple tests. My problem appeared when trying to use CtMouse and the KEYB command.
I first redid my MSDOS 6.22 boot disk with a new VHD and used the same install floppies as I was using before.
For the BIOSes I use:
IBM-5160 created using the script from the repo.
IBM-5160-V3 created my own script, posted in this forum. This BIOS supports the IBM extended Keyboard.
JukoST created using the script from the repo.
micro8088 from the repo.
Tandy created using the script from the repo.

I will make a post per test and it may take some time.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Trying to Solve Strange Problems

Unread post by jca »

First test.
This test is for the mouse driver, made under MSDOS 6.22 using conventional memory (no memory manager used in CONFIG.SYS).
The test is very basic and just done to see if problems I experienced before still exist.
It consist of using the EDIT command twice in a row.

  1. MOUSE.COM Microsoft Mouse Driver V8.20
    1.1 MDA Video Adapter.
    Note: Micro8088 and Tandy BIOS do not boot using this adapter. The core get stuck at the splash screen and the core need to be reloaded.
    Test OK for IBM-5160, IBM5160-V3 and JukoST.
    1.2 CGA/Tandy Video Adapter.
    Test OK with all BIOSes.

  2. CuteMouse V 2.0 alpha 4
    2.1 MDA Video Adapter.
    Note: Micro8088 and Tandy BIOS do not boot using this adapter. The core get stuck at the splash screen and the core need to be reloaded.
    Test OK for IBM-5160, IBM5160-V3 and JukoST.
    2.2 CGA/Tandy Video Adapter.
    IBM5160: EDIT gives a black screen and the core has to be reset.
    IBM-5160-V3: Test OK.
    JukoST: EDIT crashes the core which has to be reset.
    micro8088: the mouse does not work in EDIT and quitting EDIT crashes the core.
    Tandy: Test OK.

User avatar
kathleen
Top Contributor
Posts: 421
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 243 times
Been thanked: 138 times

Re: Trying to Solve Strange Problems

Unread post by kathleen »

@jca,
You should see the same behavior with Qbasic (which is needed to run EDIT actually)
They are many other bioses where EDIT (or Qbasic) works.

かすりん

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Trying to Solve Strange Problems

Unread post by jca »

Thanks for the comment. I did not know that EDIT and QBASIC were intimately linked. I take note for later on tests.
For the moment I just test with the problems I experienced. Next is the use of the KEYB command and after that the same 2 test when using a memory manager.
Once I figure out what works and what doesn't I will make more tests with the BIOSes known to work.
Any comment/suggestion on each test will be greatly appreciated

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Trying to Solve Strange Problems

Unread post by jca »

Second test.
This test is for using the kEYB command in order to use the keys on the IBM extended keyboard. Test made under MSDOS 6.22 using conventional memory (no memory manager used in CONFIG.SYS).
I was getting an Invalid Media Type using Scandisk on a 1.44M floppy under micro8088 BIOS. This was when using a memory manager.
This test will be done without memory manager.
I use the following command in AUTOEXEC.BAT:
C:\DOS\KEYB US, , C:\DOS\KEYBOARD.SYS /E
The test consists of running SCANDISK A:.
Test not done with Tandy and micro8088 BIOSes as they do not support MDA.
Note 1:
I found this on Micro8088 Github:
Micro 8088: Implement setting 40x25 CGA mode using DIP switches.
I guess that on PCXT The "DIP Switches are set to CGA".

Note 2:
Once I started my test things got a lot more complicated due to the rotten nature of the Disk Controller.
The errors I get are the same when the kEYB command is not used.

  1. MDA Video adapter

1.1 IDM-5160 BIOS:
360K floppy: Scandisk found a problem with drive A ...
720K Floppy: OK.
1.44M Floppy: Same error as 360K floppy.
I also cannot format a floppy of any size, FORMAT always wants to format a 360K floppy but always fails with Invalid Media or Track 0 Bad.

1.2 IBM-5160-V3 BIOS:
360K floppy: OK
720K Floppy: OK
1.44M Floppy: Scandisk encountered a Data Error while reading the FAT on Drive A:

1.3 JukoST BIOS:
Same as IBM-5160 BIOS.

  1. CGA/Tandy Video Adapter

2.1 IBM-5160, IBM-5160-V3 and JukoST BIOS:
Same results as in MDA mode.

2.2 Micro 8088 BIOS:
360K Floppy: OK.
720K Floppy: OK.
1.44M Floppy: OK.

2.3 Tandy BIOS:
360K floppy: Scandisk found a problem with drive A ...
720K Floppy: OK.
1.44M Floppy: Same error as 360K floppy.

What to think about all of that?
First the error I was getting with Micro 8088 with memory manager does not occur but this test is without memory manager which will be done later.

The test also showed the strangeness of the Floppy Controller. See also this post viewtopic.php?p=65981#p65981.
There is also a lot of posts regarding the Floppy Controller at viewtopic.php?p=60646#p60646 so what follows may already be known.

IBM-5160 BIOS supports 360K and 720K floppies.
IBM-5160-V3 BIOS supports 360K and 720K floppies.
JukoST BIOS supports 360K and 720K floppies.
Micro 8088 BIOS supports 360K, 720K and 1.44M floppies.
Tandy BIOS supports 360K and 720K floppies.
Note: It has been noted that not all these formats can be used reliably but they seem to work in Read mode, they tend to fail in Write mode. I did not make exhaustive tests. Use at your own risk.

Do not try to use B: drive. If a floppy is in drive A DIR B: = DIR A:, if no floppy in drive A -> Drive B not ready.
Do not try to FORMAT any floppy, you will likely destroy it. I did not make exhaustive tests as I got a floppy indigestion.

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Trying to Solve Strange Problems

Unread post by spark2k06 »

jca wrote: Mon Dec 19, 2022 12:53 am

I found this on Micro8088 Github:
Micro 8088: Implement setting 40x25 CGA mode using DIP switches.
I guess that on PCXT The "DIP Switches are set to CGA".

If you look at the PCXT core sources you will see that the DIP switch is modified according to the selected video card:

Code: Select all

    assign  sw = mda_mode ? 8'b00111101 : 8'b00101101; // PCXT DIP Switches (MDA or CGA 80)
    assign  port_c_in[3:0] = port_b_out[3] ? sw[7:4] : sw[3:0];

Selecting one card or the other (MDA or CGA/Tandy) does not imply disabling the other, they work in parallel, but the DIP switch is modified so that the BIOSes that use it boot with one card or the other, which, obviously, micro8088 is not doing... it seems that it actually simply detects the presence of CGA, and prioritises it over MDA.

Again, it is not a core issue but a BIOS issue.

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: Trying to Solve Strange Problems

Unread post by spark2k06 »

Now we check the BIOS configuration file, and it appears that the DIP switches and floppy drives are setted by default from here:

https://github.com/MiSTer-devel/PCXT_Mi ... /setup.inc

Code: Select all

default_floppy	db	cmos_1440 << 4	; one 1.44 MB floppy drive
default_equip	db	21h		; CGA 80x25, one floppy drive

And since the BIOS is actually part of the project version called xi8088, with NVRAM RTC capabilities that are not implemented in the core, but a basic ao486-based RTC (remember that this core is about supporting a PCXT, not PC/AT features) for setting the date and time, any other desired configuration must be done by recompiling the BIOS.

By the way, the capabilities of the BIOS in terms of floppy disk drive are as follows:

Monitor_1_20221219-095902-549549.png
Monitor_1_20221219-095902-549549.png (8.23 KiB) Viewed 5231 times

But as I have just said, if you need one or the other, you must have several versions of the BIOS with the appropriate settings.

In short, each BIOS is different and each one is designed to support different hardware.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Trying to Solve Strange Problems

Unread post by jca »

spark2k06 wrote: Mon Dec 19, 2022 8:15 am

...
Selecting one card or the other (MDA or CGA/Tandy) does not imply disabling the other, they work in parallel, but the DIP switch is modified so that the BIOSes that use it boot with one card or the other, which, obviously, micro8088 is not doing... it seems that it actually simply detects the presence of CGA, and prioritises it over MDA.

Again, it is not a core issue but a BIOS issue.

Thanks for the explanation. At the moment I am just doing tests and reports what I am seeing without digging to find the origin of the problem. For micro8088 and MDA I was just curious, had a look on Github and found this mention of DIP switch without going any further.
At this stage I am not going to blame any problem on anything (core. BIOS, software).

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Trying to Solve Strange Problems

Unread post by jca »

Thanks also for the explanation regarding the FD controller, I was just reporting what I saw, not trying to understand the reasons.

Post Reply