1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-20 05:29:39 +00:00
Commit Graph

26 Commits

Author SHA1 Message Date
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
Oliver Schmidt
d7afadb2fe Factored out target specific inclusion of target header.
So far conio.h included the target header to get the CH_... and COLOR_... macros. However tgi.h never did the same to get the TGI_COLOR_... macros. And some time ago the JOY_..._MASK macros moved from joystick.h into the target header yet joystick.h didn't include the target header.

Why wasn't that issue detected so far? Because about every program using TGI and/or the joystick uses CONIO too and therefore includes the target header that way.

However, conceptually it's clean to factor out the target header inclusion and have tgi.h and joystick.h do it like conio.h.

Apart from that user code may make direct use of target.h too.
2018-02-02 12:59:05 +01:00
mrdudz
8902730756 cbm stuff from greggs pull request 2017-12-11 19:52:11 +01:00
Christian Groessler
7623d4ea83 conio.h: include 'creativision.h' when compiling for this target. 2017-09-12 21:57:16 +02:00
Greg King
5802b0963f Made <conio.h> include <atari5200.h> when we compile for the Atari 5200 console.
atari5200.lib has some conio functions.
2017-09-10 12:27:57 -04:00
mrdudz
60285097e3 initial import of the gamate stuff 2015-11-14 13:15:29 +01:00
mrdudz
877fd532c2 Merge remote-tracking branch 'upstream/master' into pcenginetarget 2015-07-11 13:05:26 +02:00
Stephan Mühlstrasser
14c7e9fd16 Rename c1p target to osic1p 2015-02-03 22:42:35 +01:00
mrdudz
1365afa845 more hacking 2014-11-30 11:20:57 +01:00
Stephan Mühlstrasser
4c46287928 Begin to implement C1P conio features. 2014-11-09 00:58:32 +01:00
Greg King
0390c34e88 Changed multi-line C comments into another style.
The left side doesn't look unbalanced.
2014-06-30 16:51:07 -04:00
Oliver Schmidt
83280e1ee2 Have __APPLE2ENH__ imply __APPLE2__ and __ATARIXL__ imply __ATARI__. 2013-06-17 21:34:08 +02:00
Oliver Schmidt
98c47d1877 Introduced target 'atarixl'.
The target 'atarixl' is to be used for Atari XL (and better) machines.
It will disable the OS ROM and enable the Shadow RAM available on
those machine.

Note: This commit is only the inital step towards for this goal that just
replicates the target 'atari' as a starting point!
2013-05-28 21:56:37 +02:00
Oliver Schmidt
85885001b1 Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
cuz
5eadec958c Remove the #error statement if the platform is unknown. This allows use of
conio.h in custom targets.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3793 b7a2c559-68d2-44c3-8de9-860c34a00d81
2007-08-21 13:16:53 +00:00
cuz
5363f9bee3 Allow to replace the color functions in conio.h by macros for platforms
where these functions are dummies anyway.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3422 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-03-26 17:20:27 +00:00
cuz
bb66b590a9 New scanf type routines for conio by Greg King + a few comment changes
git-svn-id: svn://svn.cc65.org/cc65/trunk@3381 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-02-14 09:37:30 +00:00
cuz
38f27c1c16 Add the lynx
git-svn-id: svn://svn.cc65.org/cc65/trunk@3299 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-11-25 11:57:03 +00:00
cuz
f0b8ea1e14 Fixed a problem
git-svn-id: svn://svn.cc65.org/cc65/trunk@3092 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-04 21:25:54 +00:00
cuz
847e1c62eb Minor fixes for the new apple2enh target
git-svn-id: svn://svn.cc65.org/cc65/trunk@2924 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-03-13 23:17:19 +00:00
cuz
e967591be1 More __NES__ stuff
git-svn-id: svn://svn.cc65.org/cc65/trunk@2126 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-05-02 14:45:16 +00:00
cuz
84be05bd55 Add ORIC Atmos support
git-svn-id: svn://svn.cc65.org/cc65/trunk@2048 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-04-13 22:12:40 +00:00
cuz
6e29f555d2 Use && and || in preprocessor #if statements. Other minor changes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@866 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-08 14:39:01 +00:00
cuz
d0e2ffcf57 vcprintf() does now have __fastcall__ calling conventions
git-svn-id: svn://svn.cc65.org/cc65/trunk@522 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-12-02 09:16:07 +00:00
cuz
a17dee1a1c Added standard copyright headers
git-svn-id: svn://svn.cc65.org/cc65/trunk@193 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-07-22 19:03:03 +00:00
uz
53dd513176 This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-05-28 13:40:48 +00:00