1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-28 19:29:53 +00:00
Commit Graph

850 Commits

Author SHA1 Message Date
mrdudz
8e5f6b822d fix setjmp.h 2022-08-28 20:05:11 +02:00
Bob Andrews
623f047397
Merge pull request #1509 from mrdudz/rremd
C64 Retro Replay EMD driver
2022-08-11 01:11:16 +02:00
Bob Andrews
38c4449ab1
Merge pull request #1826 from alejandro-colomar/master
Make NULL conform to POSIX
2022-08-11 01:10:16 +02:00
Alejandro Colomar
f14e793197 Make NULL conform to POSIX
POSIX.1-2008 tightened the definition of NULL to be 0 cast to the
type 'void *'.

Defining NULL as 0 is problematic, because it requires users to
cast NULL to a pointer type before passing it to variadic
functions.  Using POSIX's definition is safer, because NULL can be
used in all contexts without a cast, due to the alignment of
'void *' and 'char *' being the same.  It also helps the compiler
be able to detect when NULL is being used in an integer context.

Link: <http://ewontfix.com/11/>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2022-08-10 12:56:23 +02:00
ZeroByteOrg
5608453aea Fixed YM2151 struct to match HW behavior 2022-08-08 16:16:37 -05:00
mrdudz
416040dfb6 add prototype for static driver 2022-07-24 23:43:53 +02:00
Bob Andrews
6239fbe18c
Revert "rename '_poserror' to '__poserror'" 2022-07-24 18:14:21 +02:00
Christian Groessler
758d9466c0 rename '_poserror' to '__poserror'
The old name could be non-conforming to the C standard. The new name
is definitely in the "implementation name space".

See issue #1796.
2022-07-24 00:33:56 +02:00
Bob Andrews
19ddffecba
Merge pull request #1770 from devkev/lynx_darkbrown
lynx: fix TGI_COLOR_DARKBROWN
2022-07-21 00:03:37 +02:00
Bob Andrews
092c0a6531
Update lynx.h
remove TGI_COLOR_DARKBROWN
2022-07-20 23:54:57 +02:00
Kevin Pulo
3ef8dd3c0c lynx: fix TGI_COLOR_DARKBROWN 2022-06-16 15:06:02 +10:00
Dave Plummer
8f9777d9e0 Fix ushot overflow, capitalization 2022-06-06 15:14:01 -07:00
Dave Plummer
799aec23a6 Add KIM-1 Support 2022-06-04 13:00:48 -07:00
polluks2
c2b8479ea3
Fixed typo 2022-05-30 17:10:33 +02:00
Bob Andrews
e0cc3650e4
Merge branch 'master' into missing-purple 2022-05-17 15:34:51 +02:00
mrdudz
3640beaa46 fix some header files to conform with C99 hopefully, should fix issue #1670 2022-05-08 19:29:57 +02:00
Greg King
a5e69e7ea6 Upgraded the cx16 library to the Commander X16 Kernal ROM's prerelease 39. 2022-04-29 16:56:54 -04:00
Karri Kaksonen
6a6aa094fa
Merge branch 'cc65:master' into atari7800conio 2022-04-18 12:40:18 +03:00
mrdudz
3c1641e3e3 remove dangling spaces 2022-04-17 16:05:19 +02:00
Karri Kaksonen
6b16b99192 Fix conflicts with some conio routines 2022-04-05 10:35:59 +03:00
Fabrizio Caruso
2414a832d7 Make the intermediate gray/green levels available 2022-04-02 23:47:36 +02:00
Karri Kaksonen
786b4310d0
Merge branch 'cc65:master' into atari7800 2022-03-05 19:09:05 +02:00
Karri Kaksonen
8c975dfb36 Remove garbage 2022-03-01 07:03:29 +02:00
Karri Kaksonen
3266e70de4 Add target atari7800 2022-03-01 06:44:55 +02:00
Karri Kaksonen
328781bf8a Add target atari7800 2022-03-01 06:44:26 +02:00
Karri Kaksonen
4e406b744c Mark index 0 as TRANSPARENT. Let palette start from index 1 2022-02-24 08:50:36 +02:00
Jeff Tranter
2bf8be5b3b Fix some commonly made spelling errors in comments. 2022-02-21 15:44:31 -05:00
Greg King
bae2821d5a Added telestrat to <time.h>.
That library has clock().
2022-02-03 18:23:23 -05:00
polluks
8e60102e8e Removed the colour purple
This commit may break compatibility.
2022-02-02 00:58:50 +01:00
polluks
a29a1b0a59 Added more purple (rain) 2022-01-31 02:18:01 +01:00
Sven Michael Klose
666f266e90 Move strnlen() to non-ANSI section. 2021-12-25 14:21:47 +01:00
Sven Michael Klose
c9ccc82b9f strnlen(): Add comment with POSIX standard. 2021-12-25 09:12:13 +01:00
Sven Michael Klose
921e549172 Add standard C library function strnlen(). 2021-12-24 23:44:57 +01:00
Oliver Schmidt
8b0de8a931
Merge branch 'master' into master 2021-11-23 22:56:51 +01:00
Wayne Parham
11d81b1f43 Stylistic changes 2021-06-15 16:39:28 -05:00
Christian Groessler
c90c3c9133 stdio.inc,stdio.h: set CBM PATH_MAX/FILENAME_MAX value to 255
Some parts of the runtime library cannot handle larger paths.
2021-06-10 20:08:58 +02:00
Christian Groessler
ae9101961e stdio.inc,stdio.h: increase CBM PATH_MAX/FILENAME_MAX value to 256+1 2021-06-10 20:08:58 +02:00
Christian Groessler
9a523abbfb limits.h: provide PATH_MAX
- stdio.h: define FILENAME_MAX to PATH_MAX
- stdio.h, stdio.inc: increase FILENAME_MAX/PATH_MAX for Atari
  (For DOSes with subdirectory support.)
2021-06-10 20:08:58 +02:00
Wayne Parham
7d6541274d Changes to I/O access 2021-06-09 10:23:42 -05:00
Wayne Parham
33af3d7997 sym1.h updates 2021-06-06 23:53:53 -05:00
Wayne Parham
6c4c959141 Sym-1 lib changes 2021-06-06 21:28:03 -05:00
Greg King
6bedade593 Fixed the creativision function prototypes.
Added const to a pointer parameter.
2021-05-29 08:37:38 -04:00
Wayne Parham
ae9434e02e seven-segment display update 2021-05-23 15:22:33 -05:00
mrdudz
6d560f4236 change prototype for GraphicsString() to void __fastcall__ GraphicsString(const void *myGfxString); 2021-05-18 15:16:14 +02:00
mrdudz
5fc9d3f048 change driver _install calls from taking "void*" to "const void*" 2021-05-16 22:57:28 +02:00
Wayne Parham
f81aefe8bd Synertek Systems Sym-1 config files 2021-05-09 17:13:24 -05:00
Oliver Schmidt
07bd5089ec Define CLOCKS_PER_SEC as _clocks_per_sec() if _clocks_per_sec() is actually available.
There are programs checking for the existence of CLOCKS_PER_SEC before usage. We don't want to mislead them.
2021-05-09 19:27:33 +02:00
Oliver Schmidt
5d84a4ba13 Removed non-ASCII chars. 2021-04-19 16:06:10 +02:00
Oliver Schmidt
f272bc8f42 Removed non-ASCII chars. 2021-04-19 15:50:52 +02:00
Greg King
ffc30c0c6e Added RAM_BANK and ROM_BANK macro definitions to cx16.h header. 2021-04-18 01:39:44 -04:00
acqn
31c1172a3a zlib: Use correct (un)signedness of char in prototypes and functions.
Also ensure we are using the same constness qualifiers.
2021-03-30 19:41:20 +02:00
mrdudz
7d528d9eb0 fix typo 2021-03-19 22:26:49 +01:00
jede
41f796bbe1 left and right mask are inverted : fix in telestrat.h 2021-03-15 21:10:29 -04:00
jede
872739b5f4 Fix comments, return line and bordercolor return 2021-03-03 22:14:29 +01:00
jedeoric
ba4310f589
Merge branch 'master' into master 2021-03-01 23:03:34 +01:00
jede
02e52fe24d Fix many bugs 2021-03-01 22:33:12 +01:00
Christian Groessler
b12758fe53 include/atari.h: fix typo in _setcolor() prototype 2021-02-16 14:07:47 +01:00
Greg King
98f8064b83 Made the directory functions compatible with the Commander X16's DOS.
It's directory listing's last line says, "mb free."
2021-02-15 08:56:31 -05:00
baktrasf
2e9bada1f2 Atari 5200 OS header refinements 2020-12-25 01:35:38 +01:00
baktrasf
1c72da4904 Add operating system symbols for the Atari 5200 target 2020-12-25 01:35:38 +01:00
Polluks
c59e8277ae Added prototype 2020-11-18 10:28:19 +01:00
Christian Groessler
262631039d atari.h, atari5200.h: style fixes 2020-10-28 21:12:32 +01:00
Christian Groessler
3537210674 add waitvsync() for atari and atari5200 2020-10-28 21:12:32 +01:00
Oliver Schmidt
f723147f04 Streamlined clock rate handling.
* Docs say that CLK_TCK is an obsolete alias of CLOCKS_PER_SEC so there's no point in individual definitions.
* All targets determining the clock rate at runtime can use a common handling.
2020-10-25 14:06:44 +01:00
Greg King
0f66f7569e Updated the cx16 library to the upstream project's prerelease 38. 2020-10-17 14:48:01 -04:00
Greg King
4905329ff6 Fixed the misspelling of "height" in a GEOS header. 2020-10-12 08:33:45 -04:00
mrdudz
83cc115112 re-add define for pad bits hw address, which was accidently removed in some refactor commit 2020-08-26 15:51:20 +02:00
Greg King
75dc234988 Guarded the static_assert macro with a C standards test. 2020-08-21 15:15:19 -04:00
Jesse Rosenstock
3df6c383c0 Add support for static_assert
Add C11's _Static_assert and static_assert macro.

This is like #error, but is handled at a later stage
of translation, so it is possible to check sizes of
types, values of enums, etc.

https://en.cppreference.com/w/c/language/_Static_assert
https://port70.net/~nsz/c/c11/n1570.html#6.7.10
2020-07-30 19:17:11 +02:00
Greg King
b60b303c5d Added a missing asterisk to a "hardware" struct definition. 2020-07-20 21:40:44 -04:00
Greg King
4296cbaf82 Added a 320x200x256 TGI driver to the Commander X16 library.
Made the mandelbrot sample program handle the X16's 256 colors.
2020-07-15 17:30:58 -04:00
Christian Groessler
72fff0cfbc atari.h: fix definition of KEY_UP
noticed by Stefan Wessels
2020-07-15 23:00:12 +02:00
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
Greg King
410e4502ee Added a 160x192x2 TGI (graphics) driver to the VIC-20 library.
The driver requires a special linker configuration: "vic20-tgi.cfg".
The VIC-20 computer needs at least 8K of expansion RAM!

"tgidemo.c" needed to be adjusted because the VIC-20's vertical (y) range is greater than its horizontal (x) range -- the opposite of most other platforms.  Also, the circle demo would jam on the VIC-20.
2020-07-08 05:55:30 -04:00
Dirk Jagdmann
6465c3b687 change order of declarations. 2020-06-22 23:55:45 +02:00
Dirk Jagdmann
ba79b2db9b add kerberos em driver variable. 2020-06-22 23:55:45 +02:00
Oliver Schmidt
37107174c6 Added waitvsync() for the Enhanced Apple //e.
The implementation is a bit tricky as it requires to take different code paths for the //e, the //c and the IIgs. Additionally the //c only provides a VBL IRQ flag supposed to be used by an IRQ handler to determine what triggered the IRQ. However, masking IRQs on the CPU, activating the VBL IRQ, clearing any pending VBL IRQs and then polling for the IRQ flag does the trick.
2020-06-18 21:44:57 +02:00
Oliver Schmidt
6adf175691 Optimized get_ostype() return values for asm usage.
Making sure that all but //c machines have bit 6 clear allows to use BIT/BVS to detect the //c machines.
2020-06-15 19:31:18 +02:00
Greg King
14c62f1368 Allowed the TGI API to support 256 colors. 2020-06-04 12:58:05 -04:00
Greg King
68eb0f2cdc Put the Telestrat static drivers names together. 2020-05-28 10:33:08 -04:00
Greg King
3890492a9b Added a JOY_FIRE() macro to the Atmos and Telestrat C headers. 2020-05-28 09:59:21 -04:00
jede
532240a2db Telestrat joystick management 2020-05-28 08:50:20 -04:00
Greg King
cbf0c1d1dd Updated the cx16 library to the Commander X16's ROM prerelease 37. 2020-05-02 13:46:06 -04:00
itaych
31daa706b7 PMG_SIZE_QUAD is 3, not 2.
From "Mapping the Atari": "Size of player. POKE with zero or two for normal size (eight color clocks wide), POKE with one to double a player's width (sixteen color clocks wide), and POKE with three for quadruple width (32 color clocks wide). Each player can have its own width set."
2020-04-16 17:06:18 +02:00
IrgendwerA8
ce80624f62 ctype size optimization 2020-02-03 20:45:09 +01:00
Daniel Serpell
f68cc06ec7 Fixes Atari OS devhdl_t, init field needs an JMP byte.
This fixes issue #1002.
2020-01-29 13:58:10 +01:00
Greg King
b66f7272af Updated the cx16 library to the ROM's prerelease 36. 2020-01-11 02:20:52 -05:00
Greg King
3fa253d31f Updated the cx16 library to the Commander X16 Kernal's prerelease 35. 2019-12-25 10:56:32 -05:00
Greg King
cab4910a7d Added the missing BANK_RAM array to the Commander X16's header. 2019-12-10 05:59:33 -05:00
mc78
db971d8a65 Removed unnecessary #include <cc65.h> from convert.c
Adjusted block comments to predominant style
2019-11-19 14:08:00 +01:00
mc78
1dee2360fa added additional empty line after header guard in cc65.h to conform to other headers 2019-11-19 14:08:00 +01:00
mc78
8d2617110f Removed additional exit constants definitions from cc65.h to stdlih.h. Guarded the definitions by #ifdef. Removed cc65.h includes from abort and assert implementations. 2019-11-19 14:08:00 +01:00
mc78
a139c4057c Removed CC65_ prefixes from exit statements in abort and assert code as well from definition 2019-11-19 14:08:00 +01:00
mc78
16a66f19e1 Replaced enum in cc65.h by defines. added comment that cc65 exit constants should not redefine 0 and 1 as they are reserved for exit_success and exit_failure 2019-11-19 14:08:00 +01:00
mc78
3daecfb3dd Added enum for cc65 exit codes. replaced stdlib exit code names constants in libsrc with cc65 exit code named constants 2019-11-19 14:08:00 +01:00
Greg King
5da525e0ea Added a standard mouse driver to the cx16 library. 2019-11-16 14:51:24 -05:00
Greg King
d78133e1f0 Updated cx16 to match the Commander X16 ROMs and emulator, release 34. 2019-11-16 13:11:40 -05:00
Greg King
9fa90e2265 Added VERA peek() and poke() to the cx16 library.
They simplify C programs' direct access to VERA's internal address space.
2019-10-24 05:15:42 -04:00
Stefan
96547d1dd4 Fix colors for #948 2019-10-09 06:15:38 -04:00
Greg King
3cece61525 Added character codes to change between the two CBM fonts. 2019-10-01 04:16:44 -04:00