1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 04:30:10 +00:00
cc65/libsrc/c64
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 Make NMI ready 2018-05-14 23:22:09 +00:00
extra added peek functions for soft80 2017-12-28 01:58:03 +01:00
joy tweak driver to no more use IRQ 2018-03-07 00:20:42 +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
tgi Merge pull request #687 from polluks/patch-12 2018-06-21 22:37:29 +02:00
_scrsize.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
acc_c64dtv_speed.s Merge pull request #631 from blackystardust/master 2018-04-27 20:47:03 +02:00
acc_c65_speed.s Removed obsolete bit opcode. 2018-04-29 12:13:52 -07:00
acc_c128_speed.s Improved the accelerator code. Fixed an infinite loop. 2018-04-26 05:46:34 -04:00
acc_chameleon_speed.s Removed extern keyword from function prototypes. 2018-04-27 09:16:25 -07:00
acc_detect_c64dtv.s Improved the accelerator code. Fixed an infinite loop. 2018-04-26 05:46:34 -04:00
acc_detect_c65.s Fixed a wrong branch. 2018-04-28 13:26:20 -07:00
acc_detect_c128.s Improved the accelerator code. Fixed an infinite loop. 2018-04-26 05:46:34 -04:00
acc_detect_chameleon.s Optimized the code a bit as suggested by Greg. 2018-04-26 09:18:54 -07:00
acc_detect_scpu.s Added C64/C128 SuperCPU accelerator functions and started on a generic framework for accelerators. 2018-04-09 19:36:53 -07:00
acc_detect_turbomaster.s Harmonized the comments (as in added 1 space) ;) 2018-05-03 09:11:20 -07:00
acc_scpu_speed.s Removed extern keyword from function prototypes. 2018-04-27 09:16:25 -07:00
acc_turbomaster_speed.s Optimized the code a bit, thanks to Greg for the suggestions/comments. 2018-05-01 14:46:57 -07:00
bordercolor.s split regular color.s into color.s and bordercolor.s 2015-10-14 17:25:35 +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 remove deleted function from comment 2015-10-14 17:52:14 +02:00
conio.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
cputc.s Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
crt0.s Cleaned up C64 linker configs. 2016-03-13 14:32:07 +01:00
devnum.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
get_ostype.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
get_tv.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 Renamed INITBSS to INIT and INIT to ONCE. 2016-03-06 21:27:19 +01: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
kbrepeat.s Removed dysfunctional kbrepeatdelay() and kbrepeatrate(). 2017-08-30 16:37:59 +02:00
kernal.s TAB to space conversion 2018-06-30 16:25:43 +03:00
kplot.s Changed the solution for the PLOT problem with old -02 kernals to that used 2009-09-27 18:45:08 +00:00
libref.s Cleaned 2 source files by removing commented-out lines that are active in other files. 2013-08-23 07:36:11 -04: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
mcbspritedata.s Allow to override mouse sprite location data. 2015-10-12 20:18:13 +02:00
mouse_stat_stddrv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
mouse_stddrv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
mouseref.s Fixed some line endings. 2013-07-25 13:53:15 -04:00
pencalib.c Fixed some line endings. 2013-07-25 13:53:15 -04: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
soft80_cgetc.s updated comments 2015-10-19 02:47:40 +02:00
soft80_charset.s Renamed INITBSS to INIT and INIT to ONCE. 2016-03-06 21:27:19 +01:00
soft80_color.s updated comments 2015-10-19 02:47:40 +02:00
soft80_conio.s Renamed INITBSS to INIT and INIT to ONCE. 2016-03-06 21:27:19 +01:00
soft80_cpeekc.s convert to petscii 2017-12-28 17:52:27 +01:00
soft80_cpeekcolor.s added peek functions for soft80 2017-12-28 01:58:03 +01:00
soft80_cpeekrevers.s some cleanup 2017-12-28 02:26:23 +01:00
soft80_cpeeks.s added peek functions for soft80 2017-12-28 01:58:03 +01:00
soft80_cputc.s Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
soft80_kclrscr.s use 'soft80_internal_cellcolor' for the current cell color, and CHARCOLOR for the actual textcolor 2015-10-14 17:24:16 +02:00
soft80_kplot.s move some stuff to init segment, saves roughly 1480 bytes :) 2015-10-12 23:39:47 +02:00
soft80_scrsize.s maintain lsb of cursor x position internally, saves some bytes and some cycles too :) 2015-10-12 15:44:41 +02:00
soft80.inc move some stuff to init segment, saves roughly 1480 bytes :) 2015-10-12 23:39:47 +02:00
soft80mono_cgetc.s added size optimized monochrom soft80 driver 2015-10-19 02:49:32 +02:00
soft80mono_color.s added size optimized monochrom soft80 driver 2015-10-19 02:49:32 +02:00
soft80mono_conio.s Renamed INITBSS to INIT and INIT to ONCE. 2016-03-06 21:27:19 +01:00
soft80mono_cpeekcolor.s added peek functions for soft80 2017-12-28 01:58:03 +01:00
soft80mono_cputc.s Introduced internal gotoxy that pops both parameters. 2016-06-05 14:58:38 +02:00
soft80mono_kclrscr.s added size optimized monochrom soft80 driver 2015-10-19 02:49:32 +02:00
soft80mono_kplot.s added size optimized monochrom soft80 driver 2015-10-19 02:49:32 +02:00
status.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
sysuname.s New uname function 2003-08-12 17:24:02 +00:00
tgi_stat_stddrv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
tgi_stddrv.s Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
tmcommon.s Added clock_settime() for some CBMs. 2018-08-18 01:29:40 +02:00
waitvsync.s add headers/fix formatting 2017-07-18 01:04:53 +02:00