1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-18 15:05:14 +00:00
Commit Graph

348 Commits

Author SHA1 Message Date
Oliver Schmidt
842c151edd Replaced _systime with clock_gettime.
We want to add the capability to not only get the time but also set the time, but there's no "setter" for the "getter" time().

The first ones that come into mind are gettimeofday() and settimeofday(). However, they take a struct timezone argument that doesn't make sense - even the man pages says "The use of the timezone structure is obsolete; the tz argument should normally be specified as NULL." And POSIX says "Applications should use the clock_gettime() function instead of the obsolescent gettimeofday() function."

The ...timeofday() functions work with microseconds while the clock_...time() functions work with nanoseconds. Given that we expect our targets to support only 1/10 of seconds the microseconds look preferable at first sight. However, already microseconds require the cc65 data type 'long' so it's not such a relevant difference to nanoseconds. Additionally clock_getres() seems useful.

In order to avoid code duplication clock_gettime() takes over the role of the actual time getter from _systime(). So time() now calls clock_gettime() instead of _systime().

For some reason beyond my understanding _systime() was mentioned in time.h. _systime() worked exactly like e.g. _sysremove() and those _sys...() functions are all considered internal. The only reason I could see would be a performance gain of bypassing the time() wrapper. However, all known _systime() implementations internally called mktime(). And mktime() is implemented in C using an iterative algorithm so I really can't see what would be left to gain here. From that perspective I decided to just remove _systime().
2018-08-15 16:06:44 +02:00
Olli Savia
e6e9c72f66 Added CHKOUT and CLRCHN 2018-08-15 11:53:17 +02:00
Olli Savia
3e94f7f55c Moved C128 specific definitions to cbm_kernal.inc 2018-07-01 09:58:39 +03:00
Olli Savia
f185e28892 cbmkernal.inc -> cbm_kernal.inc 2018-06-29 16:14:00 +03:00
Olli Savia
8c4a0768cc TAB to space conversion 2018-06-22 11:29:03 +03:00
Olli Savia
accfc14fb1 RESTOR and VECTOR moved under own ifdef/endif block 2018-06-22 11:21:00 +03:00
Olli Savia
a22e19a902 Added asminc/cbmkernal.inc 2018-06-21 18:32:38 +03:00
Marco van den Heuvel
ad7b339c44 Added C64 Turbo Master accelerator code and documentation. 2018-04-30 14:30:35 -07:00
Marco van den Heuvel
11629bcf99 Added C65/C64DX accelerator code and documentation. 2018-04-27 14:22:41 -07:00
Marco van den Heuvel
f2e46f0fdf Added C64 Chameleon accelerator code and documentation. 2018-04-25 12:53:29 -07:00
Oliver Schmidt
fc61bc79c5
Merge pull request #629 from blackystardust/master
Added C128 accelerator code and documentation for both C128 mode and C128 in C64 mode.
2018-04-25 15:08:11 +02:00
Oliver Schmidt
fe33a39d6c
Merge pull request #628 from ops/VIAFIX_PET
Pet: Add missing VIA register names
2018-04-23 15:58:13 +02:00
Marco van den Heuvel
3f5683b391 Added C128 in C64 mode accelerator code and documentation. 2018-04-20 12:08:28 -07:00
Olli Savia
7292b571de Added missing VIA register names. 2018-04-20 21:24:37 +03:00
Oliver Schmidt
305c6e7ae4
Merge pull request #626 from blackystardust/master
Added c64dtv accelerator code and documentation.
2018-04-20 20:01:16 +02:00
Oliver Schmidt
53df4da8e8
Merge pull request #625 from ops/VIAFIX
VIC-20: Add missing VIA register names
2018-04-18 17:09:35 +02:00
Oliver Schmidt
d314a27e76
Merge pull request #627 from jedeoric/master
[Telestrat target] fix fwrite bug, cputc, chline, remove & mkdir added
2018-04-16 22:46:56 +02:00
jede
e34ef0fc17 add cputc & remove 2018-04-14 21:52:11 +02:00
Marco van den Heuvel
6076316f38 Added c64dtv accelerator code and documentation. 2018-04-14 10:40:13 -07:00
Olli Savia
7b1db91d36 Changed register addresses relative to the base address 2018-04-14 18:45:15 +03:00
Olli Savia
59cb7da334 VIA1 and VIA2 no longer marked deprecated 2018-04-14 08:39:30 +03:00
Marco van den Heuvel
859422f357 Fixed non-address constants. 2018-04-12 09:35:02 -07:00
Olli Savia
165b98bba5 Added missing VIA registers. Register names from the COMPUTE!'s book 'Mapping the VIC' 2018-04-11 22:38:23 +03:00
Marco van den Heuvel
89c3ed6d7f Added C64/C128 SuperCPU accelerator functions and started on a generic framework for accelerators. 2018-04-09 19:36:53 -07:00
Marco van den Heuvel
03ba3f7473 Added c16/plus4 fast(), isfast() and slow() functions, and updated the documentation accordingly. 2018-03-23 14:27:15 -07:00
Oliver Schmidt
dacee3b9ed Removed IRQ support from TGI drivers.
All but one TGI drivers didn't use IRQs. Especially when the TGI driver kernel was the only .interruptor this meant quite some unnecessary overhead because it pulled in the whole IRQ infrastructure.

The one driver using IRQs (the graphics driver for the 160x102x16 mode on the Lynx) now uses a library reference to set up a JMP to its IRQ handler.
2018-02-02 18:15:45 +01:00
Oliver Schmidt
1976d6cd32 Removed IRQ support from joystick drivers.
All but one joystick drivers didn't use IRQs. Espsecially when the joystick driver kernel was the only .interruptor this meant quite some unnecessary overhead because it pulled in the whole IRQ infrastructure.

I was told that the one driver using IRQs (the DXS/HIT-4 Player joystick driver for the C64) can be reworked to not do it. Until this is done that driver is defunct.
2018-02-01 22:38:36 +01:00
Oliver Schmidt
fb193933cb
Merge pull request #552 from polluks/master
Added Oric-1 compatibility #550
2017-12-16 18:26:34 +00:00
Stefan
6faef87b49 Fixed Oric-1 compatibility #550 2017-12-15 23:51:39 +01:00
mrdudz
8902730756 cbm stuff from greggs pull request 2017-12-11 19:52:11 +01:00
Oliver Schmidt
947b09ad96 Removed OPC_EOR_abx duplicate. 2017-12-07 20:39:28 +01:00
Greg King
1912287231 Added missing names for the CIA registers in the C64/C128. 2017-11-25 13:29:50 -05:00
Oliver Schmidt
6034b68f06 Bumped API version.
Removal of the joy_masks array with 7f52a770d9 was exactly the very type of change asking for a new API version.
2017-11-21 22:42:43 +01:00
jede
807b55862d Now mkdir is working 2017-10-28 00:37:47 +02:00
jede
aaf8863de5 Merge branch 'master' of https://github.com/jedeoric/cc65 2017-10-23 23:04:22 +02:00
jede
ebfd218f62 Comment correction 2017-10-23 23:02:54 +02:00
jede
ed4458c162 Comment correction 2017-10-23 23:00:43 +02:00
jedeoric
af1c7f0c8b Merge branch 'master' into master 2017-10-22 23:11:18 +02:00
jede
93f202850a toascii.s added, doc updated, tgi_line & tgi_outtext are available 2017-10-22 23:06:56 +02:00
Oliver Schmidt
4da1d3232f Merge pull request #504 from jedeoric/master
[Telestrat] TGI initialization,  some bugs (clrscr) correction, cgetc optimization, irq management
2017-10-22 11:14:55 +00:00
jede
2b7d4fff5a comment correction 2017-10-20 21:29:16 +02:00
jede
351a5ab20a Now setPixel works in TGI. 2017-10-20 21:03:30 +02:00
jede
7107019d6f Adding IRQVec 2017-10-16 17:33:10 +02:00
jede
2ee7cf0377 I/O identifiers added 2017-10-16 16:11:37 +02:00
jede
256ba6bddf Adding XSOUT : Send A register to RS232 2017-10-16 16:06:18 +02:00
Oliver Schmidt
3a6430b13d Merge pull request #494 from jedeoric/master
[telestrat] Adding some vars, adding getcwd management, changing ZP address and ZP length
2017-09-27 09:52:19 +02:00
jede
95a88a787d remove FILENAME_MAX 2017-09-25 21:47:05 +02:00
jede
d8904c550b Fixing buffer overflow with cwd command (FILENAME_MAX must be at 50 +1 bytes) 2017-09-25 21:39:57 +02:00
jede
60e41e3110 Adding XVARS primitive 2017-09-24 19:22:43 +02:00
jede
1c7c44e12c adding some vars 2017-09-24 11:46:52 +02:00