1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/libsrc
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
..
apple2 Added clock_getres() / clock_settime() for the Apple II. 2018-08-15 21:34:35 +02:00
atari Replaced _systime with clock_gettime. 2018-08-15 16:06:44 +02:00
atari2600
atari5200 Removed IRQ support from joystick drivers. 2018-02-01 22:38:36 +01:00
atmos Replaced _systime with clock_gettime. 2018-08-15 16:06:44 +02:00
c16 Replaced _systime with clock_gettime. 2018-08-15 16:06:44 +02:00
c64 Added clock_settime() for some CBMs. 2018-08-18 01:29:40 +02:00
c128 Added clock_settime() for some CBMs. 2018-08-18 01:29:40 +02:00
cbm Added clock_getres() for CBMs. 2018-08-15 19:40:27 +02:00
cbm510 Added clock_settime() for some CBMs. 2018-08-18 01:29:40 +02:00
cbm610 Added clock_settime() for some CBMs. 2018-08-18 01:29:40 +02:00
common Don't pass mode argument to open() from _fopen(). 2018-08-17 23:28:45 +02:00
conio Further optimizations in common/conio. 2018-05-22 16:00:05 +02:00
creativision Removed IRQ support from joystick drivers. 2018-02-01 22:38:36 +01:00
dbg Added "popptr1" which is of common use to save some bytes. 2018-05-20 15:30:18 +02:00
em
gamate Removed IRQ support from joystick drivers. 2018-02-01 22:38:36 +01:00
geos-apple
geos-cbm Made dio_read(), dio_write(), and dio_write_verify() catch sector number conversion errors. 2018-02-23 16:12:12 -05:00
geos-common Replaced _systime with clock_gettime. 2018-08-15 16:06:44 +02:00
joystick Removed IRQ support from joystick drivers. 2018-02-01 22:38:36 +01:00
lynx Removed IRQ support from TGI drivers. 2018-02-02 18:15:45 +01:00
mouse
nes Clean-up because of tgidrv_line.inc 2018-05-22 22:32:50 +00:00
none crt0.s ("none" target): fix initialization of sp variable. 2018-01-11 13:15:19 +01:00
osic1p Removed CBM chartype table. 2017-12-02 11:04:59 +01:00
pce Merge branch 'master' into popptr1 2018-05-21 13:33:14 +02:00
pet Use common include file cbm_kernal.inc 2018-07-01 09:56:37 +03:00
plus4 Replaced _systime with clock_gettime. 2018-08-15 16:06:44 +02:00
runtime Some minor cleanups. 2018-07-26 14:35:26 +02:00
serial
sim6502
supervision spaces instead of tab 2018-06-06 21:18:47 +02:00
telestrat Merge branch 'master' into popptr1 2018-05-21 13:33:14 +02:00
tgi Fixed some code, to adapt to register-use changes caused by pull request #652. 2018-07-27 09:21:31 -04:00
vic20 TAB to space conversion 2018-06-30 16:25:43 +03:00
zlib Fixed some code, to adapt to register-use changes caused by pull request #652. 2018-07-27 09:21:31 -04:00
Makefile Implemented the requested changes. 2018-01-04 11:17:20 +01:00