Página 2 de 2

Re: Error de carga del RTC.SYS

Publicado: 18 Oct 2019, 00:48
por mcleod_ideafix
robuttley escribió:
17 Oct 2019, 23:01
Did you ever do this, Mcleod? And if not - what would be involved, broadly, in writing such a driver? Is it a project you think that an enthusiastic amateur such as myself might try to do? :D
The source code for the "fake" RTC.SYS is available from the repository, at /software/rtcsys. It's just the RTC.SYS from Fabio and Victor, but returning always the same date and time. This is the format:

Código: Seleccionar todo

; OUTPUT
; reg BC is Date
;		year - 1980 (7 bits) + month (4 bits) + day (5 bits)
;
; reg DE is Time
;	hours (5 bits) + minutes (6 bits) + seconds/2 (5 bits)
You could start from this bare bones module to add support from a kind of time keeping. Just use the FRAMES system variable as a counter with a resolution of 20 miliseconds per count. 50 counts are 1 second.

Re: Error de carga del RTC.SYS

Publicado: 21 Oct 2019, 14:10
por aowen
SE Basic 4.2 does something like this (although UnoDOS 3 doesn't check for an RTC). It has an extra byte for FRAMES which enables it to store the date/time as a positive integer version of UNIX time (QNX time). The next version of UnoDOS 3 should be able to convert this into the correct date stamp. Then to enter the time you can just POKE FRAMES wiht the current UNIX time (https://time.is/Unix_time_now).