Skip to content
This repository was archived by the owner on Nov 22, 2023. It is now read-only.

Commit 2b07204

Browse files
authored
Merge branch 'cc65:master' into kim1
2 parents d2a8e90 + 65ce036 commit 2b07204

File tree

218 files changed

+92395
-977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+92395
-977
lines changed

.github/workflows/snapshot-on-push-master.yml

+18-2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,23 @@ jobs:
9696
name: cc65-snapshot-win64.zip
9797
path: cc65-snapshot-win64.zip
9898

99+
- name: Get the online documents repo.
100+
uses: actions/checkout@v2
101+
with:
102+
repository: cc65/doc
103+
path: doc.git
104+
- name: Update the online documents.
105+
run: |
106+
cd doc.git
107+
rm *.*
108+
cp ../html/*.* .
109+
git config user.name "cc65-github"
110+
git config user.email "cc65.nomail@github.com"
111+
git config push.default simple
112+
git add -A
113+
git commit -m "Updated from cc65 commit ${GITHUB_SHA}."
114+
#git push -v
115+
99116
# enter secrets under "repository secrets"
100117
- name: Upload snapshot to sourceforge
101118
uses: nogsantos/scp-deploy@master
@@ -106,6 +123,5 @@ jobs:
106123
port: ${{ secrets.SSH_PORT }}
107124
user: ${{ secrets.SSH_USER }}
108125
key: ${{ secrets.SSH_KEY }}
109-
110-
# TODO: Update docs at https://github.com/cc65/doc
126+
111127
# TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io

Contributing.md

+11
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ This is an ongoing controversial topic - everyone knows that. However, the follo
2424

2525
The (bash) scripts used to check the above rules can be found in ```.github/check```. You can also run all checks using ```make check```.
2626

27+
### identifiers and symbol names
28+
29+
* any symbols that are exported from source files and/or appear in header files should not be in the "_symbol" form in C, or "__symbol" form in assembly. This way we evade the problem that "_symbol" may or may not be reserved by that standard.
30+
2731
### misc
2832

2933
* 80 characters is the desired maximum width of files. But, it isn't a "strong" rule; sometimes, you will want to type longer lines, in order to keep the parts of expressions or comments together on the same line.
@@ -159,6 +163,13 @@ The only exception to the above are actions that are exclusive to the github act
159163

160164
* the printf family of function does not completely implement all printf modifiers and does not behave as expected in some cases - all this should be documented in detail
161165

166+
## Floating point support
167+
168+
The first step is implementing the datatype "float" as IEEE488 floats. Help welcomed!
169+
170+
* WIP compiler/library changes are here: https://github.com/cc65/cc65/pull/1777
171+
* free software library with testbench is here: http://www.jhauser.us/arithmetic/
172+
162173
## Test suite
163174

164175
* specific tests to check the optimizer (rather than the codegenerator) are needed.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# About cc65
22

33
cc65 is a complete cross development package for 65(C)02 systems, including
4-
a powerful macro assembler, a C compiler, linker, librarian and several
4+
a powerful macro assembler, a C compiler, linker, archiver and several
55
other tools. cc65 has C and runtime library support for many of the old 6502 machines.
66
For details look at the [Website](https://cc65.github.io).
77

asminc/cx16.inc

+2-2
Original file line numberDiff line numberDiff line change
@@ -538,11 +538,11 @@ NMIVec := $0318
538538
; YM2151 audio chip
539539
.struct YM2151
540540
.org $9F40
541+
ADDR .byte
541542
.union
543+
DATA .byte
542544
STATUS .byte
543-
ADDR .byte
544545
.endunion
545-
DATA .byte
546546
.endstruct
547547

548548
; X16 Emulator device

cfg/telestrat.cfg

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
FEATURES {
2+
STARTADDRESS: default = $1000;
3+
}
4+
15
SYMBOLS {
26
__ORIXHDR__: type = import;
37
__STACKSIZE__: type = weak, value = $0800; # 2K stack
@@ -7,7 +11,7 @@ SYMBOLS {
711
MEMORY {
812
ZP: file = "", define = yes, start = $00B0, size = $003A;
913
ORIXHDR: file = %O, type = ro, start = $0000, size = $001F;
10-
MAIN: file = %O, define = yes, start = $0800, size = __RAMEND__ - __MAIN_START__;
14+
MAIN: file = %O, define = yes, start = %S, size = __RAMEND__ - __MAIN_START__;
1115
BSS: file = "", start = __ONCE_RUN__, size = __RAMEND__ - __STACKSIZE__ - __ONCE_RUN__;
1216
}
1317
SEGMENTS {

cfg/vic20-asm.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SYMBOLS {
66
}
77
MEMORY {
88
ZP: file = "", start = $0002, size = $001A, define = yes;
9-
LOADADDR: file = %O, start = $1001, size = $0002;
9+
LOADADDR: file = %O, start = %S - 2, size = $0002;
1010
MAIN: file = %O, start = %S, size = $0DF3 - %S;
1111
}
1212
SEGMENTS {

doc/atari.sgml

+1-15
Original file line numberDiff line numberDiff line change
@@ -442,19 +442,7 @@ package delivers the same feature.</em>
442442
You can switch back to the ATASCII mapping by including
443443
"<tt/atari_atascii_charmap.h/".
444444

445-
A final note: Since cc65 has currently some difficulties with string merging
446-
under different mappings, defining remapped strings works only flawlessly
447-
with static array initialization:
448-
449-
<tscreen><verb>
450-
#include &lt;atari_screen_charmap.h&gt;
451-
char pcScreenMappingString[] = "Hello Atari!";
452-
453-
#include &lt;atari_atascii_charmap.h&gt;
454-
char pcAtasciiMappingString[] = "Hello Atari!";
455-
</verb></tscreen>
456-
457-
delivers correct results, while
445+
Example:
458446

459447
<tscreen><verb>
460448
#include &lt;atari_screen_charmap.h&gt;
@@ -464,8 +452,6 @@ char* pcScreenMappingString = "Hello Atari!";
464452
char* pcAtasciiMappingString = "Hello Atari!";
465453
</verb></tscreen>
466454

467-
does not.
468-
469455
<sect1>Keyboard codes<p>
470456

471457
For direct keyboard scanning in conjunction with e.g. the OS location "CH" (764/$2FC),

doc/cc65.sgml

+21-4
Original file line numberDiff line numberDiff line change
@@ -1202,17 +1202,34 @@ The compiler defines several macros at startup:
12021202

12031203
This macro is defined if the target is the Commodore Plus/4 (-t plus4).
12041204

1205-
<tag><tt>__STDC_HOSTED__</tt></tag>
1206-
1207-
This macro is expands to the integer constant 1.
1208-
12091205
<tag><tt>__SIM6502__</tt></tag>
12101206

12111207
This macro is defined if the target is sim65 in 6502 mode (-t sim6502).
12121208

12131209
<tag><tt>__SIM65C02__</tt></tag>
1210+
12141211
This macro is defined if the target is sim65 in 65C02 mode (-t sim65c02).
12151212

1213+
<tag><tt>__STDC_HOSTED__</tt></tag>
1214+
1215+
This macro expands to the integer constant 1.
1216+
1217+
<tag><tt>__STDC_NO_ATOMICS__</tt></tag>
1218+
1219+
This macro expands to the integer constant 1 if the language standard is cc65 (--standard cc65).
1220+
1221+
<tag><tt>__STDC_NO_COMPLEX__</tt></tag>
1222+
1223+
This macro expands to the integer constant 1 if the language standard is cc65 (--standard cc65).
1224+
1225+
<tag><tt>__STDC_NO_THREADS__</tt></tag>
1226+
1227+
This macro expands to the integer constant 1 if the language standard is cc65 (--standard cc65).
1228+
1229+
<tag><tt>__STDC_NO_VLA__</tt></tag>
1230+
1231+
This macro expands to the integer constant 1 if the language standard is cc65 (--standard cc65).
1232+
12161233
<tag><tt>__SUPERVISION__</tt></tag>
12171234

12181235
This macro is defined if the target is the Supervision (-t supervision).

include/c64.h

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ extern void c64_ram_emd[];
145145
extern void c64_ramcart_emd[];
146146
extern void c64_reu_emd[];
147147
extern void c64_vdc_emd[];
148+
extern void c64_rrr_emd[];
148149
extern void dtv_himem_emd[];
149150
extern void c64_hitjoy_joy[];
150151
extern void c64_numpad_joy[];

include/cx16.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,11 @@ struct __vera {
285285

286286
/* Audio chip */
287287
struct __ym2151 {
288+
unsigned char reg; /* Register number for data */
288289
union {
289-
unsigned char reg; /* Register number for data */
290+
unsigned char data;
290291
unsigned char status; /* Busy flag */
291292
};
292-
unsigned char data;
293293
};
294294
#define YM2151 (*(volatile struct __ym2151 *)0x9F40)
295295

include/lynx.h

-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
#define TGI_COLOR_YELLOW COLOR_YELLOW
8484
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
8585
#define TGI_COLOR_GREEN COLOR_GREEN
86-
#define TGI_COLOR_DARKBROWN COLOR_DARKBROWN
8786
#define TGI_COLOR_PURPLE COLOR_PURPLE
8887
#define TGI_COLOR_BLUE COLOR_BLUE
8988
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE

include/serial.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ unsigned char __fastcall__ ser_open (const struct ser_params* params);
148148
/* "Open" the port by setting the port parameters and enable interrupts. */
149149

150150
unsigned char ser_close (void);
151-
/* "Close" the port. Clear buffers and and disable interrupts. */
151+
/* "Close" the port. Clear buffers and disable interrupts. */
152152

153153
unsigned char __fastcall__ ser_get (char* b);
154154
/* Get a character from the serial port. If no characters are available, the
@@ -171,6 +171,3 @@ unsigned char __fastcall__ ser_ioctl (unsigned char code, void* data);
171171

172172
/* End of serial.h */
173173
#endif
174-
175-
176-

include/stddef.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ typedef unsigned size_t;
5454

5555
/* NULL pointer */
5656
#ifndef _HAVE_NULL
57-
#define NULL 0
57+
#define NULL ((void *) 0)
5858
#define _HAVE_NULL
5959
#endif
6060

libsrc/apple2/ser/a2.ssc.s

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
;----------------------------------------------------------------------------
5858
; I/O definitions
5959

60-
ACIA = $C088
60+
Offset = $8F ; Move 6502 false read out of I/O to page $BF
61+
62+
ACIA = $C088-Offset
6163
ACIA_DATA = ACIA+0 ; Data register
6264
ACIA_STATUS = ACIA+1 ; Status register
6365
ACIA_CMD = ACIA+2 ; Command register
@@ -197,6 +199,7 @@ SER_OPEN:
197199
asl
198200
asl
199201
asl
202+
adc Offset ; Assume carry to be clear
200203
tax
201204

202205
; Check if the handshake setting is valid

0 commit comments

Comments
 (0)