1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00
cc65 - a freeware C compiler for 6502 based systems
Go to file
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
asminc Added waitvsync() for the Enhanced Apple //e. 2020-06-18 21:44:57 +02:00
cfg Added a 160x192x2 TGI (graphics) driver to the VIC-20 library. 2020-07-08 05:55:30 -04:00
doc Added a 160x192x2 TGI (graphics) driver to the VIC-20 library. 2020-07-08 05:55:30 -04:00
include Implemented some CONIO peek functions. 2020-07-12 22:19:55 +02:00
libsrc Implemented some CONIO peek functions. 2020-07-12 22:19:55 +02:00
samples Added a 160x192x2 TGI (graphics) driver to the VIC-20 library. 2020-07-08 05:55:30 -04:00
src Comment fix. 2020-07-12 12:35:42 +02:00
test Set .NOTPARALLEL in test/misc and test/val 2020-07-10 13:08:19 +02:00
testcode change whitespace 2020-06-22 23:55:45 +02:00
util util/zlib/deflater: Fix several compiler warnings. 2019-06-19 19:01:30 +02:00
.gitattributes Added .gitattributes to force LF line endings on commit. 2017-03-12 18:13:18 +01:00
.gitignore Don't ignore more than necessary. 2016-06-01 22:36:38 +02:00
.travis.yml Migrate 'encrypted variables' variables to 'repository settings'. 2017-05-17 20:56:21 +02:00
LICENSE Simplified license. 2015-05-05 21:56:23 +02:00
Makefile Added "html" and "info" goals to the top-level Makefile. 2017-05-24 18:49:02 -04:00
Makefile.travis The doc now lives in the 'master' branch of the 'doc' project. 2018-09-18 23:39:11 +02:00
README.md Normalized Atari naming. 2020-02-17 11:07:52 +01:00

Windows Snapshot

Documentation

Wiki

Build Status

cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several other tools.

cc65 has C and runtime library support for many of the old 6502 machines, including

  • the following Commodore machines:
    • VIC20
    • C16/C116 and Plus/4
    • C64
    • C128
    • CBM 510 (aka P500)
    • the 600/700 family
    • newer PET machines (not 2001).
  • the Apple ][+ and successors.
  • the Atari 8-bit machines.
  • the Atari 2600 console.
  • the Atari 5200 console.
  • GEOS for the C64, C128 and Apple //e.
  • the Bit Corporation Gamate console.
  • the NEC PC-Engine (aka TurboGrafx-16) console.
  • the Nintendo Entertainment System (NES) console.
  • the Watara Supervision console.
  • the VTech Creativision console.
  • the Oric Atmos.
  • the Oric Telestrat.
  • the Lynx console.
  • the Ohio Scientific Challenger 1P.

The libraries are fairly portable, so creating a version for other 6502s shouldn't be too much work.