1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-16 02:10:52 +00:00
Commit Graph

696 Commits

Author SHA1 Message Date
Oliver Schmidt
ac0b452834 Added '_' prefix to sin and cos.
Users complained that otherwise the names might clash with their functions.
2019-04-13 11:25:54 +02:00
Christian Groessler
8590de5cf3 Revert "atari5200: fix COLOR defines' names"
This reverts commit 87e653f47b.
2019-04-12 12:49:38 +02:00
Christian Groessler
dfb7c0f24d atari5200: fix COLOR defines' names
COLOR_RED -> COLOR_LIGHTRED and COLOR_GREEN -> COLOR_LIGHTGREEN
2019-04-12 12:49:38 +02:00
Christian Groessler
be6bba66a9 atari5200: conio now uses just four colors altogether
See discussion in PR #870.
2019-04-12 12:49:38 +02:00
Christian Groessler
ec5e38617a atari5200: implement bgcolor() and textcolor()
Includes some other small fixes/cleanups.
2019-04-12 12:49:38 +02:00
Christian Groessler
edd596b2a4 atari: split color.s into bordercolor.s and bgcolor.s 2019-04-12 12:49:38 +02:00
IrgendwerA8
df80d071e8 Added space after function name. 2019-03-29 22:53:04 +01:00
IrgendwerA8
3d8c3a4948 Code review adaptations, removed "cc65_" prefix from functions 2019-03-29 22:53:04 +01:00
IrgendwerA8
db8bd84a82 Changes due to code review. 2019-03-29 22:53:04 +01:00
IrgendwerA8
399250a105 Optimized mul20 & mul40 and extracted to new library. 2019-03-29 22:53:04 +01:00
IrgendwerA8
5c8854fff6 Changed enum for FP-register index. 2019-03-16 20:37:42 +01:00
IrgendwerA8
bcbcbbd9c0 AtariOS: Fix for FPIDX enum 2019-03-13 08:19:04 +01:00
Greg King
2617e9a3c0 Added a C header that translates from the source file's encoding to PetSCII.
It can be used to undo what "cbm_screen_charmap.h" does.  Together, those headers let you mix screen-code and PetSCII string and character literals in a C source file's Assembly output.
2019-03-11 09:00:49 -04:00
Christian Groessler
fc7e79d2cc Merge remote-tracking branch 'irgendwer/AtariOS_Structure' into master 2019-03-11 12:23:09 +01:00
IrgendwerA8
203f4c80d4 Code review changes and improved formatting. 2019-03-09 21:40:57 +01:00
IrgendwerA8
1359ad793d Atari OS: Reestablished DCB structure, fixed union span and timer2. 2019-03-08 11:48:37 +01:00
Greg King
2362db22f7 Renamed a C header.
All of Commodore's 8-bit computer models use the same screen-codes.
2019-03-05 21:20:05 -05:00
Greg King
7e298e347d Fixed the CBM screen-code C header.
Changed the number literals from Assembly format to C format.  Swapped the (upper-/lower-case) mappings of letters because the header converts from ASCII, not PetSCII.
2019-03-05 21:20:05 -05:00
IrgendwerA8
3d9ac21b80 Added missing pointer star for Basic structure. 2019-03-05 00:26:14 +01:00
IrgendwerA8
e1a4910580 Code review changes and build fix. 2019-03-04 23:32:56 +01:00
IrgendwerA8
8ead5f2f5a Access Atari OS variables by structure. 2019-03-03 22:50:57 +01:00
Bill Kendrick
417ef278a3 Move Atari-specific PIA reg vals to atari.h
PIA is also used in the Commodore PET, and for different
purposes (see http://www.6502.org/users/andre/petindex/progmod.html#pia1),
so extracted Atari-specific register #defines and placed them in atari.h.
2019-02-17 23:23:30 +01:00
Oliver Schmidt
10a31d006b Add translation from PETSCII to screen codes. 2019-02-12 17:47:17 +01:00
Christian Groessler
58484449b4 remove TABs 2019-02-05 23:27:52 +01:00
Bill Kendrick
9a83284b7b Cleaned up _pia.h register stuff a bit
Most documentation say that most of the bits are normally set to 1 or 0,
so just mentioning that in the comments.

A.N.A.L.O.G. issue 59 (April 1988) "Bits & Pieces" column, "Atari Zucchini"
(https://www.atarimagazines.com/analog/issue59/bits_pieces.php) implies
that they are used for specific things, but it's not clear enough to be
useful (or specifically states "Too complex and not pertinent").

This is probably sufficient for most purposes; if any PIA / PACTL/PBCTL
experts pop up, they can tell us exactly how those 4 bits can be utilized.
2019-01-17 23:53:53 -08:00
Bill Kendrick
af8eb57f63 Atari colors into _gtia.h; NMIRES/NMIST as union
Use a C "union" to give both read (NMIST) and write (NMIRES) labels
to their shared register in ANTIC. (h/t @groessler).

Consolodate duplicated color definitions (HUE_..., COLOR_... and TGI_COLOR_...;
and the "_gtia_mkcolor()" macro), found in both "atari.h" and "atari5200.h",
moving it to "_gtia.h", which they both share (and which makes the most sense).
2019-01-17 22:44:25 -08:00
Bill Kendrick
32525e0ddb atari.h: Shadow registers for hardware registers 2019-01-17 00:23:04 -08:00
Bill Kendrick
93a13315de Comment adjustments; removed surperfluous keycodes
Cleaned up comments in Atari 8-bit headers.
Internal keycodes (POKEY's KBCODE) were already #defined in atari.h,
so didn't need a whole new set in _pokey.h.
2019-01-16 23:29:41 -08:00
Bill Kendrick
4b61c54092 Relocate register values outside structs, + more
Relocated register #define'd values outside of the structs,
improved comment format, expanded & corrected some things.

h/t Trevin Beattie (https://user.xmission.com/~trevin/) for the PIA
register descriptions.
2019-01-15 01:24:12 -08:00
Bill Kendrick
d52af69d69 Adjustments per most feedback on cc65 PR 831
(I appreciate the feedback!)
2019-01-14 20:47:05 -08:00
Bill Kendrick
5ee3c88017 Some PIA register #defines
Some register #defines for PIA.

(Some may be too Atari-centric -- I know PIA chip was used by PET &
perhaps other platforms supported by cc65.  If so, perhaps we can
define them elsewhere.  Not sure whether they'd be the same for 5200;
I admit I know zilch about that system except that it's _more or less_
an Atari 400)
2019-01-13 21:31:18 -08:00
Bill Kendrick
3783010091 POKEY: Add register #defines & internal kybd codes
Add #defines for certain registers' values.
Also add #defines for internal keyboard codes (unrelated to ATASCII;
e.g. [Q] = 47, [W] = 46, [Shift] adds 64, etc), as seen in KBCODE.
2019-01-13 20:32:55 -08:00
Bill Kendrick
d371d1bd51
Note about hues varying depending on environment
There aren't really standard color names (e.g., Compute!'s Mapping the Atari and First Book of Atari Graphics have different names), and exact colors shown depend on the system & device, anyway. Added a note.
2019-01-13 01:59:41 -08:00
Bill Kendrick
10f44c18a3
Tweaks to description of ANTIC chip in _antic.h
Tweak to comments at the top
2019-01-13 01:58:10 -08:00
Bill Kendrick
95b791bf0e
Added #defines for GTIA register values 2019-01-13 01:57:21 -08:00
Bill Kendrick
ab31b3edfe
Add more register #defines to ANTIC header file
* DMACTL - playfield size, DMA access, PMG resolution
 * CHACTL - inverted text, inverse effects
 * NMIEN

Also, added #define equivalents for Display List mode line instructions
based on Atari 8-bit OS (aka Atari BASIC "GRAPHICS" command) values
(e.g., "DL_GRAPHICS0" == "DL_CHR40x8x1").

Added some more documentation in the comments.

Added macros with assembly language for the start/end of Display List
Interrupt (DLI) functions.
2019-01-13 00:31:31 -08:00
Scott Hutter
59ab140dc9 fix for err blank line removal 2018-12-30 18:57:46 +01:00
Scott Hutter
94e623165d removed fastcall from SetNewMode 2018-12-30 18:57:46 +01:00
Scott Hutter
2f6f468aad Added SetNewMode() to geoslib - #814 2018-12-30 18:57:46 +01:00
Paul Gardner-Stephen
19ca1f6b48 add support for detecting 45GS02 2018-12-30 03:49:26 -05:00
Marc Rintsch
80a43d732d Added missing external declaration of c64_65816_emd. 2018-12-21 09:51:27 +01:00
IrgendwerA8
d0053422e9 Code review aftermath 2: Put defines into parentheses 2018-11-12 14:36:40 +01:00
IrgendwerA8
61a9871c21 Adaptations due to code review. 2018-11-12 14:36:40 +01:00
IrgendwerA8
f86ebbd258 Support for self explanatory KBCODE values 2018-11-12 14:36:40 +01:00
Christian Groessler
6dc7309e50 Atari: add support for BW-DOS. Initially contributed by Daniel Serpell. 2018-09-27 17:37:59 +02:00
Christian Groessler
e9b8f5d814 Atari: Add detection of RealDOS (http://www.realdos.net/realdos.html). 2018-09-06 12:08:50 +02:00
Greg King
b5d939c858 Style changes. 2018-08-30 11:48:46 +02:00
greg-king5
a08192b53e
Merge pull request #706 from xlar54/master
* tgi driver for c128 VIC-II

* Made the VIC-IIe TGI driver put its bitmap behind the ROMs.

* c128-hi.tgi doc
2018-08-29 10:34:05 -04:00
Oliver Schmidt
f8c6c58373 Made Apple II CONIO more flexible.
Originally the Apple II had a 64 char set and used the upper two bits to control inverse and blinking. The Apple //e brought then an alternate char set without blinking but more individual chars. However, it does _not_ contain 128 chars and use the upper bit to control inverse as one would assume. Rather it contains more than 128 chars - the MouseText chars. And because Apple wanted to provide as much backward compatibility as possible with the original char set, the alternate char set has a rather weird layout for chars > 128 with the inverse lowercase chars _not_ at (normal lowercase char + 128).

So far the Apple II CONIO implementation mapped chars 128-255 to chars 0-127 (with the exception of \r and \n). It made use of alternate chars > 128 transparently for the user via reverse(1). The user didn't have direct access to the MouseText chars, they were only used interally for things like chline() and cvline().

Now the mapping of chars 128-255 to 0-127 is removed. Using chars > 128 gives the user direct access to the "raw" alternate chars > 128. This especially give the use direct access to the MouseText chars. But this clashes with the exsisting (and still desirable) revers(1) logic. Combining reverse(1) with chars > 128 just doesn't result in anything usable!

What motivated this change? When I worked on the VT100 line drawing support for Telnet65 on the Apple //e (not using CONIO at all) I finally understood how MouseText is intended to be used to draw arbitrary grids with just three chars: A special "L" type char, the underscore and a vertical bar at the left side of the char box. I notice that with those chars it is possible to follow the CONIO approach to boxes and grids: Combining chline()/cvline() with special CH_... char constants for edges and intersections.

But in order to actually do so I needed to be able to define CH_... constants that when fed into the ordinary cputc() pipeline end up as MouseText chars. The obvious approach was to allow chars > 128 to directly access MouseText chars :-)

Now that the native CONIO box/grid approach works I deleted the Apple //e proprietary textframe() function that I added as replacement quite some years ago.

Again: Please note that chline()/cvline() and the CH... constants don't work with reverse(1)!
2018-08-20 00:30:17 +02:00
Oliver Schmidt
3598fb505d Fixed Visual C++ build (and some style adjustments). 2018-08-19 00:01:40 +02:00