1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-30 08:57:49 +00:00
cc65/libsrc/cbm510
Oliver Schmidt eb9872c684 Added clock_settime() for some CBMs.
The CIA TOD only stores the time but not the date. Therefore the date set by clock_settime() ist just stored inside the C library for retrieval via clock_gettime().

The "very special" handling of 12AM/PM is based on https://groups.google.com/d/msg/comp.sys.cbm/ysVYSX4AMbc/vHrXCWEhCOUJ saying:

==========

24hr: Wr => Rd => Nx
--------------------
  0 : 92 => 12 => 01   <= Switch from 00 to 01 (24-hour notation)
  1 : 01 => 01 => 02
  2 : 02 => 02 => 03
 11 : 11 => 11 => 92
 12 : 12 => 92 => 81   <= Switch from 12 to 13 (24-hour notation)
 13 : 81 => 81 => 82
 14 : 82 => 82 => 83
 23 : 91 => 91 => 12

1. column ("24hr"): hour to be tested (decimal)
2. column ("Wr"):   hour written to TOD register (BCD)
3. column ("Rd"):   hour read from TOD register (BCD) immediately after writing the value in column 2 to see the conversion between AM/PM, if any
4. column ("Nx"):   next hour (BCD) after the hour switch

==========

Thanks Paul!
2018-08-18 01:29:40 +02:00
..
emd Create static drivers directly from source files. 2014-06-04 23:50:18 +02:00
joy Removed IRQ support from joystick drivers. 2018-02-01 22:38:36 +01:00
mou Changed literal zeroes of the style "#>0" into the style "#>$0000". 2014-09-10 19:15:07 -04:00
ser Create static drivers directly from source files. 2014-06-04 23:50:18 +02:00
_scrsize.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
banking.s Fixed typo. 2018-08-15 16:06:44 +02:00
break.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
cgetc.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
clrscr.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
color.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
cpeekcolor.s cbm stuff from greggs pull request 2017-12-11 19:52:11 +01:00
cputc.s Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
crt0.s Refined the comments in the target start-up files. 2014-08-24 10:10:20 -04:00
devnum.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
doesclrscr.s cbm stuff from greggs pull request 2017-12-11 19:52:11 +01:00
extzp.inc Made Olivers devnum patch (r4588) work with the PET-II models. On these 2010-02-20 19:46:51 +00:00
extzp.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
gettime.s Added clock_settime() for some CBMs. 2018-08-18 01:29:40 +02:00
irq.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
joy_stat_stddrv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
joy_stddrv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
kbhit.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
kclose.s More cbm510 changes to make file I/O and kernal access work 2003-12-27 16:11:14 +00:00
kernal.s Updated comment 2018-07-01 09:54:39 +03:00
kiobase.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
kopen.s More cbm510 changes to make file I/O and kernal access work 2003-12-27 16:11:14 +00:00
krdtim.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
kreadst.s More cbm510 changes to make file I/O and kernal access work 2003-12-27 16:11:14 +00:00
kscnkey.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
kscreen.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
ksetnam.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
ksettim.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
kudtim.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
libref.s Added library reference ser_libref to SER interface. 2013-06-01 11:03:14 +02:00
mainargs.s Renamed INITBSS to INIT and INIT to ONCE. 2016-03-06 21:27:19 +01:00
mcbdefault.s Renamed INITBSS to INIT and INIT to ONCE. 2016-03-06 21:27:19 +01:00
mouse_stat_stddrv.s Added a driver to the CBM510 library that lets a joystick pretend to be a mouse. 2013-08-23 03:06:00 -04:00
mouse_stddrv.s Added a driver to the CBM510 library that lets a joystick pretend to be a mouse. 2013-08-23 03:06:00 -04:00
mouseref.s Added a driver to the CBM510 library that lets a joystick pretend to be a mouse. 2013-08-23 03:06:00 -04:00
peeksys.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
pencalib.c Added a cbm510 lightpen driver. 2013-09-09 17:03:40 -04:00
pokesys.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
randomize.s Fixed the random-seed generators for the Commodore targets. 2015-09-11 10:03:07 -04:00
revers.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
settime.s Added clock_settime() for some CBMs. 2018-08-18 01:29:40 +02:00
sysuname.s New uname function 2003-08-12 17:24:02 +00:00
tmcommon.s Added clock_settime() for some CBMs. 2018-08-18 01:29:40 +02:00
waitvsync.s Removed stray /t char. 2018-08-15 16:06:44 +02:00