skiselev / 8088_bios

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

Time and DSE issues in version 0.9.7 #6

Closed spark2k06 closed 4 years ago

spark2k06 commented 4 years ago

Some issues detected in version 0.9.7:

  1. When the time is modified from the setup, it does not seem to apply immediately. A time command in msdos shows the previous time. Only updated after a machine restart (CTRL + ALT + DEL)

  2. The msdos time command always disables the DSE, and it is due to this code in time1.inc:

and dl,cmos_dse     ; mask the daylight saving flag
and ah,~cmos_dse        ; clear daylight saving flag for now
or  ah,dl           ; add it from the input
mov al,cmos_control_b
call    rtc_write       ; write control B register
skiselev commented 4 years ago
  1. Weird. The BIOS setup utility updates the time and the date immediately in RTC using INT 1Ah/AH=03h and INT 1Ah/AH=05h functions. I'll test it on my system.
  2. It must be a bug in MS-DOS then... INT 1Ah/AH=03h sets DSE flag to the value specified in DL. The piece of code that you copied does exactly that. If DOS passes DL=0, the BIOS will disable DSE
spark2k06 commented 4 years ago
  1. If you want I prepare and show a video :-)

  2. I use MS/Dos 6.22. How does MS / DOS (or time command) know the DSE value that must be passed to the DL register with the function 1Ah / AH = 03h? Then, It seems as if it always set 00h in DL.

spark2k06 commented 4 years ago
  1. When time is update from setup, the system timer (INT 1Ah/AH=01h) were not updated. I have fixed it this way.
spark2k06 commented 4 years ago
  1. Here you can see how the service 21h - 2Dh sets the DSE value of the RTC always at 0:

https://youtu.be/DHZTjWwerUQ

Being a bug of INT 21h/2Dh, I think that the best solution for this project would be to save the cmos_dse variable in the flash / cmos and always set it during the start of the BIOS (in rtc_init) from the saved information.

spark2k06 commented 4 years ago

I have created a pull request https://github.com/skiselev/8088_bios/pull/7 on the last changes of this issue, including always keeping the DSE function disabled, as we have discussed by email.

spark2k06 commented 4 years ago

Last modification checked:

https://github.com/skiselev/8088_bios/commit/ec830ea677c56d78a6a47979a4cd59b79a1f59fc

For my part, if you have no other changes in mind, you could already add a new version of the BIOS to the corresponding folder of your Micro8088 repository:

https://github.com/skiselev/micro_8088/tree/master/BIOS