First post, by superfury
Just thought I'd mention that little project of mine here.
https://bitbucket.org/superfury/unipcemu_pcxtbios_at/
It's a simple option ROM, which adds support for interrupt 1Ah date/time support like the TIMER.COM 1.2 performs, but as a BIOS ROM with actual BIOS support instead.
So the added functionality (implemented by hooking INT 15h for it's special storage reserved (function call FE00h for setting DS to the data area for storing private data like hooked interrupt data and other settings) from the BIOS and INT 19h for performing the INT 1Ah hook and initialization).
I've currently left the AT functionality for the RTC to simply let the original BIOS handle it (as it has a CMOS on the AT anyways).
The XT otoh actually implements INT 1Ah function 02h and up (the date/time functions), while erroring out (setting the carry flag) on the alarm functions (as the alarm isn't usable anyways with said chip, as well as it's IRQ being unknown).
Tried it under UniPCemu with it's slightly updated RTC (the current commit, which is ahead of the current release) and it seems to work fine. Both the date and time seem to be set correctly on the RTC chip, as well as MS-DOS reading the date/time from the chip. 😁
Verified it's functionality with MS-DOS 6.22 running inside UniPCemu built from the current commit. The current release version of UniPCemu should also work, but lacks some new advanced features (time counter ripple detection while reading the counters and starting newly set time (INT 1Ah function 03h/05h) with sub-second counters properly cleared).
Although it only supports the base address of 240h and no autodetection of any kind is performed (AT is detected by the CMOS chip and disables the whole functionality. I might implement the CMOS method later as well).
Although when testing, I noticed it requires at least a cycle count of ~700 KIPS to operate properly (due to the time update ripple otherwise occurring for all loops trying to read the time fields from the RTC, causing the BIOS to try to keep reading it infinitely, never returning to the caller).
Thoughts?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io