1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-15 11:05:56 +00:00
cc65/include
Oliver Schmidt 04cc463452 Implemented some CONIO peek functions.
Please refer to https://github.com/cc65/cc65/pull/532 for background info.

I wrote in https://sourceforge.net/p/cc65/mailman/message/35873183/

===
cputs() wraps to the next line if the strings is too long to fit in the current line. I don't know if it's worth the effort to allow cpeeks() to continue reading from the next line. I'd like to discuss this aspect with the actual implementers.
===

This is still as unclear today as it was when I wrote the above. Therefore this change just doesn't add cpeeks() at all.

Since f8c6c58373 the Apple II CONIO implementation doesn't "need" revers() anymore - meaning that (nearly) every possible value can be placed in VRAM with a straight cputc() (without the need for a previous revers(1)).

The implementation of cpeekc() leverages that cputc() ability by always returning the value that can be fed into cputc() without a previous revers(1). Accordingly, cpeekrevers() always returns 0.

So after the sequence revers(1); cputc(x); a cpeekc() will return a value different from x! However, I don't see this behavior braking the cpeekc() contract. I see the cpeekc() contract being defined by the sequence textcolor(cpeekcolor()); revers(cpeekrevers()); cputc(cpeekc()); placing the very same value in VRAM that there was before. And that contract is fulfilled.
2020-07-12 22:19:55 +02:00
..
em Fixed missing name and semicolon in two device structs. 2017-08-23 01:46:57 -04:00
geos fix for err blank line removal 2018-12-30 18:57:46 +01:00
joystick Removed IRQ support from joystick drivers. 2018-02-02 12:02:52 +01:00
mouse
sys Fixed Visual C++ build (and some style adjustments). 2018-08-19 00:01:40 +02:00
tgi
_6522.h
_6525.h
_6526.h
_6545.h
_6551.h
_antic.h Atari colors into _gtia.h; NMIRES/NMIST as union 2019-01-17 22:44:25 -08:00
_atarios.h Fixes Atari OS devhdl_t, init field needs an JMP byte. 2020-01-29 13:58:10 +01:00
_gtia.h PMG_SIZE_QUAD is 3, not 2. 2020-04-16 17:06:18 +02:00
_heap.h
_mikey.h
_pbi.h
_pia.h Move Atari-specific PIA reg vals to atari.h 2019-02-17 23:23:30 +01:00
_pokey.h Comment adjustments; removed surperfluous keycodes 2019-01-16 23:29:41 -08:00
_riot.h Add C support for Atari 2600 (VCS) 2017-01-13 21:12:22 +01:00
_sid.h
_suzy.h
_ted.h
_tia.h remove TABs 2019-02-05 23:27:52 +01:00
_vdc.h
_vic2.h
_vic.h
6502.h add support for detecting 45GS02 2018-12-30 03:49:26 -05:00
accelerator.h Added C64 Turbo Master accelerator code and documentation. 2018-04-30 14:30:35 -07:00
apple2_filetype.h Corrected comment formatting 2017-07-28 12:16:55 -04:00
apple2.h Implemented some CONIO peek functions. 2020-07-12 22:19:55 +02:00
apple2enh.h Added waitvsync() for the Enhanced Apple //e. 2020-06-18 21:44:57 +02:00
ascii_charmap.h Added a charmap header that converts no character encodings. 2019-09-07 23:02:31 -04:00
assert.h
atari2600.h Harmonized the style of including headers from headers. 2018-02-02 12:28:22 +01:00
atari5200.h Revert "atari5200: fix COLOR defines' names" 2019-04-12 12:49:38 +02:00
atari_atascii_charmap.h Allow use of different charmaps on Atari target 2016-08-19 17:27:41 +02:00
atari_screen_charmap.h Internal/screen character mapping: Supressed warnings for re-map and added documentation. 2016-08-27 22:02:08 +02:00
atari.h Fixed _textcolor definition. 2019-05-08 10:22:12 +02:00
atmos.h Added a JOY_FIRE() macro to the Atmos and Telestrat C headers. 2020-05-28 09:59:21 -04:00
c16.h Moved declarations that are common to the C16 and the Plus4 libraries over to their common header. 2018-04-01 15:47:48 -04:00
c64.h change order of declarations. 2020-06-22 23:55:45 +02:00
c128.h Made the VIC-IIe TGI driver put its bitmap behind the ROMs. 2018-07-29 23:46:03 -04:00
cbm264.h Moved declarations that are common to the C16 and the Plus4 libraries over to their common header. 2018-04-01 15:47:48 -04:00
cbm510.h Removed joy_masks array. 2017-08-19 19:11:28 +02:00
cbm610.h Added a definition for the CBM610's first CIA chip. 2018-02-10 16:14:53 -05:00
cbm_filetype.h
cbm_petscii_charmap.h Added a C header that translates from the source file's encoding to PetSCII. 2019-03-11 09:00:49 -04:00
cbm_screen_charmap.h Renamed a C header. 2019-03-05 21:20:05 -05:00
cbm.h Updated the cx16 library to the ROM's prerelease 36. 2020-01-11 02:20:52 -05:00
cc65.h added additional empty line after header guard in cc65.h to conform to other headers 2019-11-19 14:08:00 +01:00
conio.h Implemented some CONIO peek functions. 2020-07-12 22:19:55 +02:00
creativision.h Fix colors for #948 2019-10-09 06:15:38 -04:00
ctype.h ctype size optimization 2020-02-03 20:45:09 +01:00
cx16.h Updated the cx16 library to the Commander X16's ROM prerelease 37. 2020-05-02 13:46:06 -04:00
dbg.h
device.h Added size_t. 2018-02-10 11:45:50 +01:00
dio.h
dirent.h Use macro actually defined in cbm_filetype.h. 2017-11-06 21:02:14 +01:00
em.h
errno.h Implement exec() for Atari XDOS. 2016-06-13 20:40:01 +02:00
fcntl.h
gamate.h Removed joy_masks array. 2017-08-19 19:11:28 +02:00
geos.h Harmonized the style of including headers from headers. 2018-02-02 12:28:22 +01:00
inttypes.h
iso646.h
joystick.h Factored out target specific inclusion of target header. 2018-02-02 12:59:05 +01:00
limits.h
locale.h
lynx.h Harmonized the style of including headers from headers. 2018-02-02 12:28:22 +01:00
lz4.h Edit comment style, add second const 2017-06-09 10:35:16 +03:00
modload.h
mouse.h Keep low level VIC sprite stuff out of user code. 2015-10-09 18:33:35 +02:00
nes.h Removed joy_masks array. 2017-08-19 19:11:28 +02:00
o65.h
osic1p.h Fix line endings (CRLF -> LF) on all affected files. 2017-03-10 11:21:14 +01:00
pce.h Style changes. 2018-08-30 11:48:46 +02:00
peekpoke.h
pen.h
pet.h cbm stuff from greggs pull request 2017-12-11 19:52:11 +01:00
plus4.h Moved declarations that are common to the C16 and the Plus4 libraries over to their common header. 2018-04-01 15:47:48 -04:00
serial.h
setjmp.h
signal.h
stdarg.h
stdbool.h
stddef.h
stdint.h
stdio.h Harmonized the style of including headers from headers. 2018-02-02 12:28:22 +01:00
stdlib.h Removed unnecessary #include <cc65.h> from convert.c 2019-11-19 14:08:00 +01:00
string.h Fixed strpbrk(). 2018-05-29 14:29:50 -04:00
supervision.h Normalized the definitions of structs in <supervision.h>. 2018-02-06 08:52:36 -05:00
target.h Factored out target specific inclusion of target header. 2018-02-02 12:59:05 +01:00
telestrat.h Put the Telestrat static drivers names together. 2020-05-28 10:33:08 -04:00
tgi.h Added a 160x192x2 TGI (graphics) driver to the VIC-20 library. 2020-07-08 05:55:30 -04:00
time.h Replaced _systime with clock_gettime. 2018-08-15 16:06:44 +02:00
unistd.h
vic20.h Added a 160x192x2 TGI (graphics) driver to the VIC-20 library. 2020-07-08 05:55:30 -04:00
zlib.h zlib: Use correct (un)signedness of char in prototypes and functions. 2019-06-19 19:01:30 +02:00