skiselev / 8088_bios

BIOS for Intel 8088 based computers
GNU General Public License v3.0
515 stars 61 forks source link

Bios extension causes CGA gaphics to not update #18

Closed cshunt closed 1 year ago

cshunt commented 2 years ago

Hi Sergey,

Working with the micro 8088 with proton chip I have run into a couple of odd issues. I am using several components from an ibm 5155, floppy controller/disk drive and ibm CGA card.

I assumed I could use the XT-IDE i had running the ibm and drop it into this board, flash the rom with bios-micro8088.bin and all would function. (xt-ide version from 2020)

In practice, I get the screen below. The video card has a blinking cursor but the screen fails to update. I have seen the CF card accessed, I even used serdrive.exe through a serial cable and see the computer booting, accessing files and keyboard work but the graphics adapter seems to disconnect.

... Now in contrast, If I use the version of XT-IDE included in your rom. The top of screen menus for drives A/C/comDetect/romBoot show up and booting progresses.

I am guessing that the CGA rom data is being shifted to a different location when extended bios is being used (or if it is not exactly 8kb) I'm waiting on some parts to come in for the vga card to see if it only related to CGA vs a video bios card.

20220807_090314

Great project. You have awesome documentation and instructions. I would put a recommendation that the PLD/GAL chip is not really optional. Making any changes to XT-IDE configuration is not easy (load xt-ide.bin and xtidecfg.com on a dos machine, make edits, recompile/burn that section with programmer), changing the setting for floppy drive requires recompile.

skiselev commented 2 years ago

Hi Cody,

I didn't quite understand the issue that you have with XT-IDE and the CGA. Do you think that XT-IDE BIOS is working, but it fails to print anything on the screen? I've seen similar issues with VGA, when for whatever reason XT-IDE BIOS will not update screen when VGA decides to work in monochrome mode. I never noticed this issue when VGA is working in color mode. Might be an XT-IDE BIOS bug, especially that the behavior changes when switching the XT-IDE BIOS version. Since the version included with Micro 8088 BIOS seems to work for you, I can suggest that you'd use it

The CGA doesn't have a BIOS extension (the CGA support is integrated in the system BIOS), so there is nothing shift around.

The U16 SPLD/GAL is optional. The system will work with U14 74*00 instead with two limitations: System Flash ROM writes will not be supported, UMBs will not be supported. Some people cannot obtain or program SPLDs, and for them it might be an acceptable tradeoff...

It is correct that you need xtidecfg.com to update the XT-IDE BIOS configuration. XT-IDE Universal BIOS is a separate project. Potentially it could have implemented an integrated EEPROM/Flash ROM configuration utility, but it doesn't. Fortunately you don't need to change the configuration often...

Changing floppy configuration does not require recompile. If you have SPLD/GAL installed, your JF1 jumper is open, and you're using one of the supported Flash ROMs, the integrated Micro 8088 BIOS setup utility (invoked by pressing F1 during boot) will allow you to set the floppy configuration. Otherwise, you can use a hexadecimal editor, for example one included in your EPROM programmer software, to update the floppy drives configuration. I recall you've inquired about using SST39SF040 instead of SST39SF010A. Currently Micro 8088 BIOS will not recognize SST39SF040 and work with it. You can update the BIOS code and add the ID for this Flash ROM: The code is around line 274 in flash.inc. Add another condition for SST39SF040. Something like:

.try_sst39sf010:
    cmp cx,0B5BFh       ; BF = SST, B5 = SST39SF010
    jne .try_sst39sf040
    mov cx,4096         ; sector size is 4 KiB
    jmp short .write_erase_byte

.try_sst39sf040:
    cmp cx,0B7BFh       ; BF = SST, B7 = SST39SF040
    jne .try_am29f010
    mov cx,4096         ; sector size is 4 KiB
    jmp short .write_erase_byte

.try_am29f010:

Thanks, Sergey

skiselev commented 2 years ago

I've added necessary code to support SST39SF020A and SST39SF040 Flash ROM ICs. Please pull the latest updates from this repository and test

cshunt commented 2 years ago

Thanks for the code/update. When I pick up a PLD I will update and give that a try.

I tried using F1 to edit the bios, due to the lack of PLD, settings are not saved, it appears settings are not temporary until reboot. This required a compile with setup.inc line 26 changed to: default_floppy db cmos_720 << 4 ; that let the ibm floppy controller work. (i have board for 1.44mb/serial pcb but have not acquired parts.)

I will try to clear up what I wrote above.

  1. tried booting micro8088 with bios-micro8088.bin + xtide rom on isa card + ibm CGA card = computer boots but display only shows screen above. hd light indicates that computer is still booting and loading dos.
  2. booting bios-micro8088xtide.bin worked. I had to adjust settings using xtidecfg.com and get the updated 8k onto flash. (perhaps adding a link to the cfg file would be beneficial?)
  3. using a new version of xtide w/settings updated then loading that onto first 8k of bios-micro8088.bin did not work.

I will report more once i get a vga card (that works in 8 bit mode) to test with. This issue might also be related to flaky 40 year old CGA card.

On another note, I added 10k resistors between pins 1 to gnd & 30 to gnd on rom f040. This made the system stable. Prior to this boot required power on, then press reset, system would randomly hang.

xtide cfg version that looks close to the version used in your bios. https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xtideuniversalbios/XTIDE_Universal_BIOS_v2.0.0_beta3.zip

skiselev commented 1 year ago

Hi Cody,

The extra address pins (pin 1 and 30) on 39SF040 would need to be grounded. No need to use resistors, they can be simply connected to the ground.

Did you figure the XT IDE BIOS issue yet?

cshunt commented 1 year ago

Hi @skiselev

I have the micro 8088 running well with a VGA card, no issues. Using the 39SF040 for rom as well. I have booted both with XTIDE on the bios and with external XTIDE card/bios, both work, the version is a bit selective. Using the version you have compiled in the bios works either way. I have not setup the PLD but recompiling the bios with desired settings works.

Thanks, I will close the issue with this comment.