Error de carga del RTC.SYS

Dudas, cuestiones, sugerencias y peticiones en general sobre el proyecto / Questions and requests about the project
Avatar de Usuario
mcleod_ideafix
Mensajes: 815
Registrado: 27 Sep 2015, 00:14
Ubicación: Jerez de la Frontera
Contactar:

Re: Error de carga del RTC.SYS

Mensaje por mcleod_ideafix » 18 Oct 2019, 00:48

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.
http://www.zxuno.com
ZX-Uno · Clon de ordenador ZX Spectrum basado en FPGA

Avatar de Usuario
aowen
Mensajes: 139
Registrado: 07 Oct 2015, 13:32

Re: Error de carga del RTC.SYS

Mensaje por aowen » 21 Oct 2019, 14:10

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).

Responder