FDD Support Based on ao486 Implementation

kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: FDD Support Based on ao486 Implementation

Unread post by kitune-san »

@spark2k06 @Newsdee
I sent a PM.
User avatar
spark2k06
Core Developer
Posts: 864
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: FDD Support Based on ao486 Implementation

Unread post by spark2k06 »

MicroCoreLabs wrote:
As kitune-san says, the last microcode change that solves the problem of the state of the carry flag in NOT instructions, makes the loading of some floppies fail, in any BIOS... curiously the loading of operating systems fails, but only in the floppy version and also, curiously, it can load floppies of PC Booter type games... let's see if we can find out the cause:

https://github.com/MiSTer-devel/PCXT_Mi ... 7f311765b2
User avatar
spark2k06
Core Developer
Posts: 864
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: FDD Support Based on ao486 Implementation

Unread post by spark2k06 »

spark2k06 wrote: Sun Oct 30, 2022 2:15 pm
MicroCoreLabs wrote:
As kitune-san says, the last microcode change that solves the problem of the state of the carry flag in NOT instructions, makes the loading of some floppies fail, in any BIOS... curiously the loading of operating systems fails, but only in the floppy version and also, curiously, it can load floppies of PC Booter type games... let's see if we can find out the cause:

https://github.com/MiSTer-devel/PCXT_Mi ... 7f311765b2
With this microcode change, what has happened is that TEST_FX.COM now fails:
MCL86_TEST_FX.png
MCL86_TEST_FX.png (125.18 KiB) Viewed 4804 times
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: FDD Support Based on ao486 Implementation

Unread post by kitune-san »

Changed microcode. (TEST)
Attachments
PCXT.zip
(1.21 MiB) Downloaded 154 times
User avatar
spark2k06
Core Developer
Posts: 864
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: FDD Support Based on ao486 Implementation

Unread post by spark2k06 »

kitune-san wrote: Sun Oct 30, 2022 3:15 pm Changed microcode. (TEST)
FDD problem solved and passes all MCL86 tests, KEYB fails again
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: FDD Support Based on ao486 Implementation

Unread post by kitune-san »

spark2k06 wrote: Sun Oct 30, 2022 3:19 pm
kitune-san wrote: Sun Oct 30, 2022 3:15 pm Changed microcode. (TEST)
FDD problem solved and passes all MCL86 tests, KEYB fails again
Really? Maybe I sent the wrong one?
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: FDD Support Based on ao486 Implementation

Unread post by kitune-san »

Changes are as follows:
https://github.com/kitune-san/PCXT_MiST ... 461649593b

The OF CF is cleared immediately before the DIV / IDIV / MUL /IMUL instruction.
User avatar
spark2k06
Core Developer
Posts: 864
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: FDD Support Based on ao486 Implementation

Unread post by spark2k06 »

kitune-san wrote: Sun Oct 30, 2022 3:30 pm Changes are as follows:
https://github.com/kitune-san/PCXT_MiST ... 461649593b

The OF CF is cleared immediately before the DIV / IDIV / MUL /IMUL instruction.
Sorry, it's all right now.

I had tried with a KEYB that I modified to make it fail... nothing, forget it. Make me a pull request ;-)
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: FDD Support Based on ao486 Implementation

Unread post by kitune-san »

OK
I'm tired today. I will continue tomorrow.
User avatar
spark2k06
Core Developer
Posts: 864
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: FDD Support Based on ao486 Implementation

Unread post by spark2k06 »

kitune-san wrote: Sun Oct 30, 2022 3:43 pm OK
I'm tired today. I will continue tomorrow.
I will send the fix for everyone tomorrow as well.
MicroCoreLabs
Core Developer
Posts: 96
Joined: Sun Jun 05, 2022 6:12 pm
Location: California
Has thanked: 6 times
Been thanked: 86 times
Contact:

Re: FDD Support Based on ao486 Implementation

Unread post by MicroCoreLabs »

I now see that the CF/OV flags are used by iDIV and DIV so need to be cleared. IMUL and MUL clears these flags in the microcode so no changes are needed.

I will update the microcode ASAP. IDIV is easy because the first microcode instruction is currently a NOP which can easily be changed to the CF/OV clear instruction. DIV will be a bit harder are there are no gaps to insert the CF/OV flag clearing microcode.
User avatar
spark2k06
Core Developer
Posts: 864
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: FDD Support Based on ao486 Implementation

Unread post by spark2k06 »

MicroCoreLabs wrote: Sun Oct 30, 2022 6:26 pm I now see that the CF/OV flags are used by iDIV and DIV so need to be cleared. IMUL and MUL clears these flags in the microcode so no changes are needed.

I will update the microcode ASAP. IDIV is easy because the first microcode instruction is currently a NOP which can easily be changed to the CF/OV clear instruction. DIV will be a bit harder are there are no gaps to insert the CF/OV flag clearing microcode.
Ok, I will wait for your solution before sending the release update.
MicroCoreLabs
Core Developer
Posts: 96
Joined: Sun Jun 05, 2022 6:12 pm
Location: California
Has thanked: 6 times
Been thanked: 86 times
Contact:

Re: FDD Support Based on ao486 Implementation

Unread post by MicroCoreLabs »

The updated microcode has been uploaded to my GitHub repository. Please let me know how it works!
User avatar
spark2k06
Core Developer
Posts: 864
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 961 times

Re: FDD Support Based on ao486 Implementation

Unread post by spark2k06 »

MicroCoreLabs wrote: Sun Oct 30, 2022 9:00 pm The updated microcode has been uploaded to my GitHub repository. Please let me know how it works!
It works properly, thank you! I have already sent an update to everyone.
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: FDD Support Based on ao486 Implementation

Unread post by kitune-san »

https://forum.vcfed.org/index.php?threa ... ions.9694/

According to this information, 740k and 1.2M FDDs are supported from a certain version of BIOS or later.
I only have the '82 BIOS (T1501512).
However, if anyone has an '86 BIOS, that might be worth a try.

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

Re: FDD Support Based on ao486 Implementation

Unread post by jca »

Here are various version, including the 86 version, but in source code. You have to build them.
https://github.com/Gawlas/IBM-PC-BIOS

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

Re: FDD Support Based on ao486 Implementation

Unread post by jca »

I found the 86 version, it comes in U18 and U19 BIN files. I got the 09 MAY 86 version as it corrects some bugs, including the handling of the extended KB. First I did a binary copy of U18+U19 but I had my suspicions.
I looked into the repo to see how the IBM BIOS was built and I had 2 surprises:
It comes from the same site where I found mine (https://www.minuszerodegrees.net/bios/bios.htm)
The binary copy has to be U19+U18.
I will test it during lunch time.

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

Re: FDD Support Based on ao486 Implementation

Unread post by jca »

IBM BIOS MAY 86 quick and dirty first impressions:
It supports the extended KB.
It reads 360K and 720K floppies.
It does not like 1.2M floppies: Scandisk fails.

breiztiger
Top Contributor
Posts: 427
Joined: Sun May 24, 2020 7:17 pm
Has thanked: 23 times
Been thanked: 93 times

Re: FDD Support Based on ao486 Implementation

Unread post by breiztiger »

checkit 3 return a 720ko 3"1/2 floppy with 86 bios

CPC-Power Staff
TheCorfiot
Posts: 8
Joined: Sun May 24, 2020 7:21 pm
Been thanked: 1 time

Re: FDD Support Based on ao486 Implementation

Unread post by TheCorfiot »

hello chaps

im finding that loading any good image as drive b: doesnt appear instead when i select drive b at the dos prompt it tells me to insert disc for drive b and press enter.
doing so gives me the B prompt but a dir actually still lists drive a:

drive b just doesnt seem to be accessible

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

Re: FDD Support Based on ao486 Implementation

Unread post by jca »

You are right: 1 floppy in A, 1 floppy in B. DIR B: asks to place a floppy in B and list the floppy in A.
I unmounted the floppy in A and DIR B: fails with drive B not ready.

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

Re: FDD Support Based on ao486 Implementation

Unread post by jca »

I remember that on AO486 under Win95 the B drive did not work but worked on MSDOS. I just tested it under MSDOS and it works. I could not try on Win95: I did not use AO486 in a very, very long time and my WinXX VHDs do not boot any longer.

Edit: I found a Win98 VHD: A and B work properly.

EDIT2: I managed to start Win95: Safe Mode, Scandisk, restart and now it is OK. Drive A and B are OK. The problem with drive B was a long time ago and I did not remember that it had been fixed.

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

Re: FDD Support Based on ao486 Implementation

Unread post by spark2k06 »

It seems to depend on the way the controller is implemented (which, remember, is inherited from ao486), and its compatibility with the BIOS used. From the checks I have been able to make:

  • With the BIOS JukoST, micro8088... as well as Tandy 1000, the two floppy drives are recognised and you can work with them without problems.

  • With the original BIOS by IBM, GlaBios, as well as pcxt31 by Ya`akov Miles, only one unit is recognised, and therefore, if you try to use B:, you actually use the only unit that is recognised. Moreover, with the latter (pcxt31), not even a DIR works.

In short, the way the controller is implemented, the recognition of the two units and its proper functioning or compatibility with different storage capacities depends on the BIOS used.

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

Re: FDD Support Based on ao486 Implementation

Unread post by jca »

WARNING WARNING!
Following the post by @spark2k06 I decided to make some test and discovered by chance a problem with BIOSes "supporting" different floppy sizes:
micro8088 supports 1.44M floppies, it can also read/write 720K floppies and 360K floppies It can only format 1.44M floppies.
IBM-5160-V3 should support 360K and 1.2M floppies, in reality can only read/write 360K and 720K floppies. It can only format 720K floppies.
The floppy controller inherited from ao486 is indeed a strange beast.

TheCorfiot
Posts: 8
Joined: Sun May 24, 2020 7:21 pm
Been thanked: 1 time

Re: FDD Support Based on ao486 Implementation

Unread post by TheCorfiot »

spark2k06 wrote: Sat Dec 17, 2022 7:38 am

It seems to depend on the way the controller is implemented (which, remember, is inherited from ao486), and its compatibility with the BIOS used. From the checks I have been able to make:

  • With the BIOS JukoST, micro8088... as well as Tandy 1000, the two floppy drives are recognised and you can work with them without problems.

  • With the original BIOS by IBM, GlaBios, as well as pcxt31 by Ya`akov Miles, only one unit is recognised, and therefore, if you try to use B:, you actually use the only unit that is recognised. Moreover, with the latter (pcxt31), not even a DIR works.

In short, the way the controller is implemented, the recognition of the two units and its proper functioning or compatibility with different storage capacities depends on the BIOS used.

Thanks for the explanation, I feel however that as the core is based on the PC XT and Tandy 1000 that it would be nice to stick with the original BIOS files to get both both drives working.. there is a lot of software out there spread over 2 floppy images.

Thanks BTW for all your hard work with this core, its actually one of my favourites on the Mister

User avatar
Newsdee
Top Contributor
Posts: 830
Joined: Mon May 25, 2020 1:07 am
Has thanked: 98 times
Been thanked: 209 times

Re: FDD Support Based on ao486 Implementation

Unread post by Newsdee »

TheCorfiot wrote: Mon Dec 26, 2022 10:33 am

it would be nice to stick with the original BIOS files to get both both drives working.. there is a lot of software out there spread over 2 floppy images.

Is there any game that requires 2 floppies to work?

Some BIOS limitations are due to the original hardware they were designed for; not an issue of the core per se.

When I'm not sure, I mount a vhd in ao486 to perform any installations, then switch back to PCXT to play.
in Tandy mode.

flynnsbit
Top Contributor
Posts: 550
Joined: Sun May 24, 2020 8:07 pm
Has thanked: 179 times
Been thanked: 307 times
Contact:

Re: FDD Support Based on ao486 Implementation

Unread post by flynnsbit »

you could always include the second floppy in the vhd in a folder like flppy2 and then in the autoexec put "SUBST B: C:\FLPPY2". That should work 99% of the time.

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

Re: FDD Support Based on ao486 Implementation

Unread post by spark2k06 »

I noticed that in the GlaBIOS repository someone has requested support for 1.44Mb drive, as it currently works on micro8088:

https://github.com/640-KB/GLaBIOS/issue ... 1367689560

As suggested at the moment, you can also use XBIOS to have that support in any other BIOS:

https://www.minuszerodegrees.net/2M-XBI ... as%20B.htm

kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: FDD Support Based on ao486 Implementation

Unread post by kitune-san »

FDD does not work properly when using 8086bios with PCXT_20230120.rbf or later release versions.
The point of change from PCXT_20230114 to PCXT_20230120 should be investigated.

UPDATE:
This issue seems to have occurred since commit c063a5635c7137a9b495f2f54237e53b31093ef1.
https://github.com/MiSTer-devel/PCXT_Mi ... 3b31093ef1

kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: FDD Support Based on ao486 Implementation

Unread post by kitune-san »

kitune-san wrote: Sun Apr 30, 2023 12:46 pm

FDD does not work properly when using 8086bios with PCXT_20230120.rbf or later release versions.
The point of change from PCXT_20230114 to PCXT_20230120 should be investigated.

UPDATE:
This issue seems to have occurred since commit c063a5635c7137a9b495f2f54237e53b31093ef1.
https://github.com/MiSTer-devel/PCXT_Mi ... 3b31093ef1

I am not sure why, but I set Hercules Graphics to "No" and it (DOS setup) works now. :)

Post Reply