skiselev / 8088_bios

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

RTC8088 is recognized only on 0x70 Port #71

Open explit7 opened 1 month ago

explit7 commented 1 month ago

I see here Micro8088 BIOS is looking for RTC on 0x70 Port https://github.com/skiselev/8088_bios/blob/32f82ebde058d5f92dab9f1da4e5b1906e72c9df/src/rtc.inc#L556

Maybe it can be changed, that it should look on other Ports too (all DIP Settings of RTC8088) ?

Originally posted by @explit7 in https://github.com/spark2k06/RTC8088/issues/9#issuecomment-2166957322

skiselev commented 4 weeks ago

It's a good question. I personally don't like the idea of autodetecting the RTC or anything else on the ISA bus.

The ISA bus does not provide a reliable mechanism for detecting controllers, at least not without implementing the ISA PnP extension. Other controllers can be configured to use RTC8088 addresses (0x240, 0x2A0, 0x2C0, 0x340, 0x3A0, 0x3C0) and trying to write these ports as a part of the autodetection procedure might have unintended consequences.

It is possible to update 8088 BIOS to use port other than 0x70 for the RTC It would require just a few changes in the code. There might be some legitimate reasons to do that. For example, it has been reported that the FE2010 chipset (without "A" suffix), does not fully decode the I/O addresses, and writing ports 0x70 and 0x71 actually writes PPI ports 0x60 and 0x61 on the chipset, messing up with the keyboard functionality.

wrljet commented 4 weeks ago

It's a good question. I personally don't like the idea of autodetecting the RTC or anything else on the ISA bus.

The ISA bus does not provide a reliable mechanism for detecting controllers, at least not without implementing the ISA PnP extension. Other controllers can be configured to use RTC8088 addresses (0x240, 0x2A0, 0x2C0, 0x340, 0x3A0, 0x3C0) and trying to write these ports as a part of the autodetection procedure might have unintended consequences.

I agree with that.

Let me add.. Back in the day I worked at Qualitas on 386MAX. We did a lot of auto-detecting, things like oddball A20 Gates, etc. We encountered one motherboard which didn't have fully decoded I/O ports, and our fiddling around caused it to erase the Flash BIOS and brick a few customers' boards.

explit7 commented 4 weeks ago

Thanks for explanation @skiselev - When the default port on Micro8088 for RTC is 0x70 - Than it should stay like this. It was not clear for me, why DSCLOCK.SYS can't detect the RTC on Port 0x70, when in my understanding the RTC8088 should be RTC for Micro8088 System in first place because its "your baby", and in the second place it should be compatible with other XT Systems.

But its absolut ok, when you see it in the different way.