Compare commits
510 commits
revert-141
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
06d423d503 | ||
|
ca5462a698 | ||
|
412fd70404 | ||
|
b65084b459 | ||
|
bfd76b6dd7 | ||
|
91a5eb3770 | ||
|
4121c64295 | ||
|
b7ba02d76f | ||
|
2414a832d7 | ||
|
885b360a41 | ||
|
d5cb3661f3 | ||
|
426e93b4bf | ||
|
26ab64f207 | ||
|
e4193451d4 | ||
|
4e8f62fb96 | ||
|
67def0ca0d | ||
|
2c00f1e898 | ||
|
84dba7f6ae | ||
|
5115a1b50f | ||
|
4a71a1fbb2 | ||
|
8d0b0e6ffc | ||
|
4c3120b935 | ||
|
865be55e66 | ||
|
d0d0941a64 | ||
|
c577ec1383 | ||
|
d6009721d4 | ||
|
220171d0da | ||
|
0851474757 | ||
|
79c243ccef | ||
|
4cf7db1ef5 | ||
|
58de94edd4 | ||
|
004a57bdff | ||
|
d12c2d6810 | ||
|
9f2d27d9c1 | ||
|
266f35ee37 | ||
|
38b330482d | ||
|
889f3a7c14 | ||
|
52d7991b9b | ||
|
b2ae73879b | ||
|
2f4e2a34c3 | ||
|
dd6c1cfb7d | ||
|
6001d3eab9 | ||
|
25ecaf873b | ||
|
21c093476f | ||
|
eb86bc33b9 | ||
|
9cb81f1410 | ||
|
3466abc60c | ||
|
2feba69622 | ||
|
f36b9b544d | ||
|
10c1b050c7 | ||
|
786b4310d0 | ||
|
2d0bc67c41 | ||
|
cc9535e82f | ||
|
3cb85fd5e8 | ||
|
7664a2f61e | ||
|
dc9c0fe90b | ||
|
81338a61c3 | ||
|
d368005912 | ||
|
1cb18182ed | ||
|
53b1a18680 | ||
|
c8956ce19b | ||
|
18412e1cd2 | ||
|
4379f9cc8f | ||
|
1ba39b678c | ||
|
0587d9f5d4 | ||
|
bca8fcb947 | ||
|
a88704c6b5 | ||
|
d679faaf22 | ||
|
b861f6df8f | ||
|
c293b299d8 | ||
|
d059682692 | ||
|
8c975dfb36 | ||
|
3266e70de4 | ||
|
328781bf8a | ||
|
5ef420af5a | ||
|
b74de2319f | ||
|
4e406b744c | ||
|
f8cdb2ab63 | ||
|
39df6f8f66 | ||
|
a49bf13b25 | ||
|
5d8cf4ec48 | ||
|
2bf8be5b3b | ||
|
fffb4c3b40 | ||
|
02a46e0237 | ||
49b4a57add | |||
|
0f6cb5b114 | ||
|
0e45976f9b | ||
|
388ae87cb3 | ||
|
904a77e03c | ||
|
2bda128ef1 | ||
|
d006317b0e | ||
|
14988f5dda | ||
|
bfa9e77523 | ||
|
7c417359ec | ||
|
1df61b6ec7 | ||
|
364e72921c | ||
|
9088d66758 | ||
|
3d0013ab30 | ||
|
ad82392428 | ||
|
24c8de87c2 | ||
|
6dbafda53f | ||
|
86b6514c16 | ||
|
30b00ed076 | ||
|
118e73ddf9 | ||
|
1f51a9f587 | ||
|
5747fa4df3 | ||
|
9dd13d7047 | ||
|
ee345600b4 | ||
|
9cb005c98f | ||
|
449341f873 | ||
|
470b648b9f | ||
|
84d639e40c | ||
|
e488d7b2a6 | ||
|
10b8920ecc | ||
|
dfe478b154 | ||
|
94d1bfc450 | ||
|
0436c6e314 | ||
|
1ff68e2894 | ||
|
e0745204b6 | ||
|
766e0e2144 | ||
|
9308f5147d | ||
|
096c28bb52 | ||
|
2ea9cf0449 | ||
|
179f2d05aa | ||
|
b3217ccb03 | ||
|
d23c9b6aa5 | ||
|
61dc15cad0 | ||
|
afe9d6a2eb | ||
|
4e5b521903 | ||
|
98bc021c5a | ||
|
f64ee3370d | ||
|
bae2821d5a | ||
|
7bbc006014 | ||
|
24227482ea | ||
|
f7fa81b244 | ||
|
a26778744a | ||
|
e3ca14116d | ||
|
7118c9236b | ||
|
112e216e53 | ||
|
98f862b8fb | ||
|
25363ae00a | ||
|
c50f5c9467 | ||
|
d8366132c7 | ||
|
b00cb182d9 | ||
|
ccb77735d2 | ||
|
a0fc95bb15 | ||
|
333c31e4ce | ||
|
6e5a988f85 | ||
|
82f55a930a | ||
|
e327071615 | ||
|
e66a54ac14 | ||
|
97c83de37b | ||
|
11bcaba99b | ||
|
908173b663 | ||
|
91cf347f31 | ||
|
273721e05e | ||
|
43fdc8781d | ||
|
90cc44b410 | ||
|
d1ae098190 | ||
|
9da9b979f2 | ||
|
ad1ebb697f | ||
|
6332f090d9 | ||
|
4579a7e181 | ||
|
c3e01062ea | ||
|
fc12b19659 | ||
|
91920f807e | ||
|
3aeaa36a58 | ||
|
12f9a2f1f8 | ||
|
22a3d55e40 | ||
|
1f6bc6240f | ||
|
92bfbeb8ab | ||
|
cf1bc4fad4 | ||
|
6beb090193 | ||
|
38511843e5 | ||
|
06725c166e | ||
|
1bcf93d010 | ||
|
4920ffa23a | ||
|
683739d6fc | ||
|
05b8af07aa | ||
|
3bd72b9659 | ||
|
0707cdbe2c | ||
|
f4702cbc40 | ||
|
412a30987a | ||
|
34dd29556f | ||
|
de158c0847 | ||
|
d1cbb1deeb | ||
|
666f266e90 | ||
|
65564a158c | ||
|
bdd18d958b | ||
|
58dd28f053 | ||
|
ba93ab07bc | ||
|
87fe2f5d0e | ||
|
c9ccc82b9f | ||
|
0b84465276 | ||
|
921e549172 | ||
|
6ac4aa4e20 | ||
|
7d6b6ef986 | ||
|
cff0f71ea8 | ||
|
7ffbf7aa75 | ||
|
c32846dc6e | ||
|
884f72637b | ||
|
2235830e31 | ||
|
1cdd4676b2 | ||
|
89909cd4ed | ||
|
6a76d6d905 | ||
|
37d0c4066c | ||
|
1d3318c247 | ||
|
9e9b3dbaca | ||
|
230f4d3807 | ||
|
325ff9667e | ||
|
366701e066 | ||
|
33cf8608b7 | ||
|
2feadf865c | ||
|
b35a9d97a6 | ||
|
332742b688 | ||
|
bd94879be2 | ||
|
308b5b68e9 | ||
|
a39c23f796 | ||
|
f09f0dd913 | ||
|
ad009f0ff6 | ||
|
4eaf68d414 | ||
|
380f6e7db5 | ||
|
1d36f255ec | ||
|
622d2c4e39 | ||
|
cb0dca0ca7 | ||
|
37e7e65f43 | ||
|
8b0de8a931 | ||
|
a7e6f9840c | ||
|
1918f0ac9b | ||
|
6637e28831 | ||
|
f796c26091 | ||
|
ba33c3f57d | ||
|
4f87c7cc64 | ||
|
c3d7a90084 | ||
|
f6636635fa | ||
|
c48e821c4b | ||
|
674a543909 | ||
|
2338e70709 | ||
fd8d51497c | |||
|
94445cd16f | ||
|
cf1c0b6774 | ||
|
86f1965202 | ||
|
6ba8a385a0 | ||
|
eeaa111835 | ||
|
28b1687aaf | ||
|
fb7b880dc0 | ||
|
bd23ad4d6d | ||
|
52e4387929 | ||
|
62da869e49 | ||
|
5f4605c4fc | ||
|
d6ef8326f9 | ||
|
85d345088d | ||
|
5d90087e66 | ||
|
82bdc77e41 | ||
|
bed61df837 | ||
|
a93542e80c | ||
|
f1f700799b | ||
|
f98e5f4feb | ||
|
11d81b1f43 | ||
|
fcda94f258 | ||
|
4db50e8e93 | ||
|
faf6266cde | ||
|
c9bb1483ac | ||
|
9e6c1d1303 | ||
|
14d05c61b6 | ||
|
af3d4581d3 | ||
|
f636d4e634 | ||
|
24f5bac899 | ||
|
31128d4809 | ||
|
25a35d6b59 | ||
|
f3db74395d | ||
|
7f1f0249f3 | ||
|
c90c3c9133 | ||
|
ae9101961e | ||
|
9a523abbfb | ||
|
7d6541274d | ||
|
d69e81cd66 | ||
|
5adb29ce31 | ||
|
1d7bf7355c | ||
|
004c60de39 | ||
|
dcacba472a | ||
|
09862e7ce9 | ||
|
2a25921515 | ||
|
2635655e8c | ||
|
89fb731e2e | ||
|
ed9f9ccbab | ||
|
886e9e83b2 | ||
|
6cf4bd99bb | ||
|
79757ee280 | ||
|
732a5fb9a7 | ||
|
5eafd8115f | ||
|
975e43892f | ||
|
a3fce656b7 | ||
|
88ee45e9ef | ||
|
dc9333a3bb | ||
|
c961782192 | ||
|
0bbff54378 | ||
|
33af3d7997 | ||
|
9d509735a8 | ||
|
64afb50d5a | ||
|
6c4c959141 | ||
|
e687f2f048 | ||
|
7d5fc7eb43 | ||
|
69e2313a63 | ||
|
1c16e46f23 | ||
|
39ef63cbbc | ||
|
d5d9183ccf | ||
|
6ebe551919 | ||
|
3584c4c87f | ||
|
4d5fe38540 | ||
|
79be6dec16 | ||
|
0bfa13722b | ||
|
fe003eedd4 | ||
|
0d3c827d80 | ||
|
ee5014c595 | ||
|
c0f29993e0 | ||
|
6bedade593 | ||
|
4973fc2246 | ||
|
010eea12a2 | ||
|
30830e1348 | ||
|
65c640d2cf | ||
|
022935320c | ||
|
ae3d3a4b5d | ||
|
adda9438d2 | ||
|
ae9434e02e | ||
|
db395e5988 | ||
|
0db23a8951 | ||
|
4865caa593 | ||
|
b08dc28cc1 | ||
|
e13f57e86c | ||
|
663268dca9 | ||
|
681c9594cc | ||
|
0ae1aad3d3 | ||
|
6d560f4236 | ||
|
d14148ab4f | ||
|
4a57656f69 | ||
|
d736032675 | ||
|
c53059468e | ||
|
d2da30a7e2 | ||
|
5fc9d3f048 | ||
|
ce487651b0 | ||
|
1450f146a5 | ||
|
43ca887263 | ||
|
a9af6aa743 | ||
|
4ba3ff3048 | ||
|
53f0552fe7 | ||
|
e9fd87d07a | ||
|
aecb01986a | ||
|
86bd6b9add | ||
|
930dc7efc2 | ||
|
18ae09f682 | ||
|
dfba8d77ca | ||
|
321bac4178 | ||
|
09e0e74124 | ||
|
e5813cfb1a | ||
|
af4c4f6aaf | ||
|
5d198d6842 | ||
|
f09ffb2a45 | ||
|
3d541d0d10 | ||
|
05f545e189 | ||
|
93762a2117 | ||
|
feccc68c54 | ||
|
467844963a | ||
|
bcc670ee36 | ||
|
bda5bf70ce | ||
|
82ee502f57 | ||
|
07dd1e3849 | ||
|
18f94d1fe0 | ||
|
ef74226993 | ||
|
ef8c70c7af | ||
|
b7856ddd4f | ||
|
a2def19de5 | ||
|
27e04b36b0 | ||
|
f81aefe8bd | ||
|
aea5db48cb | ||
|
044a0838a3 | ||
|
6e79379405 | ||
|
ab9db5b503 | ||
|
07bd5089ec | ||
|
9dffc8ab0f | ||
|
b1f81d5e21 | ||
|
4c37f12a4d | ||
|
80877a600a | ||
|
3ea330f15f | ||
|
0fbf2af09d | ||
|
729690e9e9 | ||
|
c9f242e566 | ||
|
216bb22b20 | ||
|
04cd884f8f | ||
|
b9a3c78888 | ||
|
8e02f8f5ec | ||
|
50a58e7706 | ||
|
83e7c37277 | ||
|
e9a72b2462 | ||
|
f3663b8d2e | ||
|
71bd6415d6 | ||
|
1f4ce41846 | ||
|
4866ee53e6 | ||
|
080cb1bac9 | ||
|
5d84a4ba13 | ||
|
f272bc8f42 | ||
|
fd3d5d35fb | ||
|
f901adba22 | ||
|
9cea9ce5e2 | ||
|
cb64aaf20c | ||
|
328345b9c3 | ||
|
24d36854d2 | ||
|
896f463a23 | ||
|
bfb7c936aa | ||
|
a982f6a668 | ||
|
ac08482fa3 | ||
|
ee8c7b47bc | ||
|
7be3b53f72 | ||
|
2120dd662c | ||
|
9941855dc6 | ||
|
f7613b529c | ||
|
1993d5c091 | ||
|
83ee928fb1 | ||
|
c915b5d7f3 | ||
|
ffc30c0c6e | ||
|
6e61093e79 | ||
|
6bb1b6953f | ||
|
eb1cf750f2 | ||
|
5f8d163045 | ||
|
e435da6234 | ||
|
0ed41db478 | ||
|
39700c77ee | ||
|
bd8eae67f1 | ||
|
f5365c7ffd | ||
|
2583dfb71a | ||
|
4c0ee3e0d8 | ||
|
5d05451ab2 | ||
|
1a3628df1a | ||
|
2864b3ef8a | ||
|
91fd30611a | ||
|
200b420562 | ||
|
4a38965384 | ||
|
b802efde54 | ||
|
31c1172a3a | ||
|
cb8fbf4772 | ||
|
edecbc86b8 | ||
|
bf1bb7a032 | ||
|
54920193e5 | ||
|
1bd04e8462 | ||
|
d2bc449598 | ||
|
02392d6220 | ||
|
f273b1ebcb | ||
|
710c6c6f2f | ||
|
0f1386ff4c | ||
|
3755e4a863 | ||
|
d3cd668585 | ||
|
55e89416cd | ||
|
531a31722e | ||
|
203c4da15b | ||
|
3c2e7ce41c | ||
|
f8835d2867 | ||
|
82fb9aa418 | ||
|
bbfc24770e | ||
|
325b7b4ab3 | ||
|
a51d6d40de | ||
|
cc040ca04a | ||
|
57e69d9647 | ||
|
7d528d9eb0 | ||
|
9ec9d1e20c | ||
|
6974c1ff12 | ||
|
cd116e5ba0 | ||
|
9b05fe9982 | ||
|
358d750b3e | ||
|
64449f0f54 | ||
|
d3c495e8b9 | ||
|
b02838439c | ||
|
8eeaaa3f36 | ||
|
99c7fe0ada | ||
|
f5972dfd08 | ||
|
aa6fdf58b8 | ||
|
c4a2620e29 | ||
|
0a8ca3041a | ||
|
4376b83390 | ||
|
bd5d5b7385 | ||
|
41f796bbe1 | ||
|
b9fd318985 | ||
|
c0d638a26d | ||
|
4f26650228 | ||
|
23fba6cc37 | ||
|
a05dddd0d6 | ||
|
facc1b4914 | ||
|
df64fd859c | ||
|
48badc0816 | ||
|
bc8cca9fc4 | ||
|
f122837955 | ||
|
d6f2fda575 | ||
|
8ae5a4a134 | ||
|
ab4ca51848 | ||
|
558dfa285e | ||
|
24d63a96b1 | ||
|
f9ca091bd0 | ||
|
1d8479b411 | ||
|
1dcb21eaa7 | ||
|
872739b5f4 | ||
|
cdbe23c351 | ||
|
3adddf5825 | ||
|
185c451000 | ||
|
ba4310f589 | ||
|
abef6566e7 | ||
|
8ec6d28f92 | ||
|
256b22f1c7 | ||
|
02e52fe24d | ||
|
0636c4bc30 | ||
|
5fa7b90e05 | ||
|
b8889bf37e |
476 changed files with 15577 additions and 5028 deletions
66
.github/workflows/build-on-pull-request.yml
vendored
Normal file
66
.github/workflows/build-on-pull-request.yml
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
name: Build Pull Request
|
||||
on: [pull_request]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
name: Build and Test (Linux)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install Dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64
|
||||
|
||||
- shell: bash
|
||||
run: git config --global core.autocrlf input
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build the tools.
|
||||
shell: bash
|
||||
run: make -j2 bin USER_CFLAGS=-Werror
|
||||
- name: Build the utilities.
|
||||
shell: bash
|
||||
run: make -j2 util
|
||||
- name: Build the platform libraries.
|
||||
shell: bash
|
||||
run: make -j2 lib QUIET=1
|
||||
- name: Run the regression tests.
|
||||
shell: bash
|
||||
run: make test QUIET=1
|
||||
- name: Test that the samples can be built.
|
||||
run: make -C samples platforms
|
||||
- name: Test that the targettest programs can be built.
|
||||
run: make -C targettest platforms
|
||||
- name: Build the document files.
|
||||
shell: bash
|
||||
run: make -j2 doc
|
||||
- name: Build 64-bit Windows versions of the tools.
|
||||
run: |
|
||||
make -C src clean
|
||||
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
|
||||
|
||||
build_windows:
|
||||
name: Build (Windows)
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- shell: bash
|
||||
run: git config --global core.autocrlf input
|
||||
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
|
||||
- name: Build app (debug)
|
||||
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
|
||||
|
||||
- name: Build app (release)
|
||||
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
|
108
.github/workflows/snapshot-on-push-master.yml
vendored
Normal file
108
.github/workflows/snapshot-on-push-master.yml
vendored
Normal file
|
@ -0,0 +1,108 @@
|
|||
name: Snapshot Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
master
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_windows:
|
||||
name: Build (Windows)
|
||||
if: github.repository == 'cc65/cc65'
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- shell: bash
|
||||
run: git config --global core.autocrlf input
|
||||
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
|
||||
- name: Build app (debug)
|
||||
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Debug
|
||||
|
||||
- name: Build app (release)
|
||||
run: msbuild src\cc65.sln -t:rebuild -property:Configuration=Release
|
||||
|
||||
build_linux:
|
||||
name: Build, Test, and Snapshot (Linux)
|
||||
if: github.repository == 'cc65/cc65'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install Dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install linuxdoc-tools-info gcc-mingw-w64-x86-64 gcc-mingw-w64-i686
|
||||
|
||||
- shell: bash
|
||||
run: git config --global core.autocrlf input
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build the tools.
|
||||
shell: bash
|
||||
run: |
|
||||
make -j2 bin USER_CFLAGS=-Werror
|
||||
make -j2 util
|
||||
- name: Build the platform libraries.
|
||||
shell: bash
|
||||
run: make -j2 lib QUIET=1
|
||||
- name: Run the regression tests.
|
||||
shell: bash
|
||||
run: make test QUIET=1
|
||||
- name: Test that the samples can be built.
|
||||
shell: bash
|
||||
run: make -j2 samples
|
||||
- name: Remove the output from the samples tests.
|
||||
shell: bash
|
||||
run: make -C samples clean
|
||||
- name: Remove programs in util directory
|
||||
shell: bash
|
||||
run: make -C util clean
|
||||
- name: Build the document files.
|
||||
shell: bash
|
||||
run: make -j2 doc
|
||||
- name: Build and package 64-bit Windows versions of the tools.
|
||||
run: |
|
||||
make -C src clean
|
||||
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32-
|
||||
make zip
|
||||
mv cc65.zip cc65-snapshot-win64.zip
|
||||
- name: Build and package 32-bit Windows versions of the tools.
|
||||
run: |
|
||||
make -C src clean
|
||||
make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
|
||||
make zip
|
||||
mv cc65.zip cc65-snapshot-win32.zip
|
||||
|
||||
- name: Upload a 32-bit Snapshot Zip
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cc65-snapshot-win32.zip
|
||||
path: cc65-snapshot-win32.zip
|
||||
- name: Upload a 64-bit Snapshot Zip
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cc65-snapshot-win64.zip
|
||||
path: cc65-snapshot-win64.zip
|
||||
|
||||
# enter secrets under "repository secrets"
|
||||
- name: Upload snapshot to sourceforge
|
||||
uses: nogsantos/scp-deploy@master
|
||||
with:
|
||||
src: cc65-snapshot-win32.zip
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
remote: ${{ secrets.SSH_DIR }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
user: ${{ secrets.SSH_USER }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
|
||||
# TODO: Update docs at https://github.com/cc65/doc
|
||||
# TODO: Publish snapshot zip at https://github.com/cc65/cc65.github.io
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -7,3 +7,6 @@
|
|||
/testwrk/
|
||||
/wrk/
|
||||
/cc65.zip
|
||||
/util/atari/*.exe
|
||||
/util/gamate/*.exe
|
||||
|
||||
|
|
10
.travis.yml
10
.travis.yml
|
@ -9,14 +9,14 @@ jobs:
|
|||
- sudo apt-get update
|
||||
- sudo apt-get install linuxdoc-tools linuxdoc-tools-info binutils-mingw-w64-i686 gcc-mingw-w64-i686 sshpass
|
||||
script:
|
||||
- make bin USER_CFLAGS=-Werror
|
||||
- make lib QUIET=1
|
||||
- make -j2 bin USER_CFLAGS=-Werror
|
||||
- make -j2 lib QUIET=1
|
||||
- make test QUIET=1
|
||||
- make samples
|
||||
- make -j2 samples
|
||||
- make -C src clean
|
||||
- make bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
|
||||
- make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32-
|
||||
- make -C samples clean
|
||||
- make doc zip
|
||||
- make -j2 doc zip
|
||||
after_success:
|
||||
- make -f Makefile.travis
|
||||
|
||||
|
|
6
Makefile
6
Makefile
|
@ -1,4 +1,4 @@
|
|||
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test
|
||||
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test util
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
|
@ -6,6 +6,7 @@ all mostlyclean clean install zip:
|
|||
@$(MAKE) -C src --no-print-directory $@
|
||||
@$(MAKE) -C libsrc --no-print-directory $@
|
||||
@$(MAKE) -C doc --no-print-directory $@
|
||||
@$(MAKE) -C util --no-print-directory $@
|
||||
@$(MAKE) -C samples --no-print-directory $@
|
||||
|
||||
avail unavail bin:
|
||||
|
@ -23,6 +24,9 @@ samples:
|
|||
test:
|
||||
@$(MAKE) -C test --no-print-directory $@
|
||||
|
||||
util:
|
||||
@$(MAKE) -C util --no-print-directory $@
|
||||
|
||||
%65:
|
||||
@$(MAKE) -C src --no-print-directory $@
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
[Windows Snapshot](https://sourceforge.net/projects/cc65/files/cc65-snapshot-win32.zip)
|
||||
|
||||
[Linux Snapshot DEB and RPM](https://software.opensuse.org//download.html?project=home%3Astrik&package=cc65)
|
||||
|
||||
[Documentation](https://cc65.github.io/doc)
|
||||
|
||||
[Wiki](https://github.com/cc65/wiki/wiki)
|
||||
|
||||
[![Build Status](https://api.travis-ci.org/cc65/cc65.svg?branch=master)](https://travis-ci.org/cc65/cc65/builds)
|
||||
[![Snapshot Build](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml/badge.svg?branch=master)](https://github.com/cc65/cc65/actions/workflows/snapshot-on-push-master.yml)
|
||||
|
||||
cc65 is a complete cross development package for 65(C)02 systems, including
|
||||
a powerful macro assembler, a C compiler, linker, librarian and several
|
||||
|
@ -25,6 +27,7 @@ including
|
|||
- the Atari 8-bit machines.
|
||||
- the Atari 2600 console.
|
||||
- the Atari 5200 console.
|
||||
- the Atari 7800 console.
|
||||
- GEOS for the C64, C128 and Apple //e.
|
||||
- the Bit Corporation Gamate console.
|
||||
- the NEC PC-Engine (aka TurboGrafx-16) console.
|
||||
|
@ -35,6 +38,8 @@ including
|
|||
- the Oric Telestrat.
|
||||
- the Lynx console.
|
||||
- the Ohio Scientific Challenger 1P.
|
||||
- the Commander X16.
|
||||
- the Synertek Systems Sym-1.
|
||||
|
||||
The libraries are fairly portable, so creating a version for other 6502s
|
||||
shouldn't be too much work.
|
||||
|
|
287
asminc/ascii_charmap.inc
Normal file
287
asminc/ascii_charmap.inc
Normal file
|
@ -0,0 +1,287 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* ascii_charmap.inc */
|
||||
;/* */
|
||||
;/* No translations, encodings are stored as they were typed in the host. */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 2019-09-07, Greg King */
|
||||
;/* */
|
||||
;/* This software is provided "as-is", without any expressed or implied */
|
||||
;/* warranty. In no event will the authors be held liable for any damages */
|
||||
;/* arising from the use of this software. */
|
||||
;/* */
|
||||
;/* Permission is granted to anyone to use this software for any purpose, */
|
||||
;/* including commercial applications, and to alter it and redistribute it */
|
||||
;/* freely, subject to the following restrictions: */
|
||||
;/* */
|
||||
;/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
;/* claim that you wrote the original software. If you use this software */
|
||||
;/* in a product, an acknowledgment in the product documentation would be */
|
||||
;/* appreciated, but is not required. */
|
||||
;/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
;/* be misrepresented as being the original software. */
|
||||
;/* 3. This notice must not be removed or altered from any source */
|
||||
;/* distribution. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
;/* ASCII */
|
||||
.charmap $00, $00
|
||||
.charmap $01, $01
|
||||
.charmap $02, $02
|
||||
.charmap $03, $03
|
||||
.charmap $04, $04
|
||||
.charmap $05, $05
|
||||
.charmap $06, $06
|
||||
.charmap $07, $07
|
||||
.charmap $08, $08
|
||||
.charmap $09, $09
|
||||
.charmap $0A, $0A
|
||||
.charmap $0B, $0B
|
||||
.charmap $0C, $0C
|
||||
.charmap $0D, $0D
|
||||
.charmap $0E, $0E
|
||||
.charmap $0F, $0F
|
||||
.charmap $10, $10
|
||||
.charmap $11, $11
|
||||
.charmap $12, $12
|
||||
.charmap $13, $13
|
||||
.charmap $14, $14
|
||||
.charmap $15, $15
|
||||
.charmap $16, $16
|
||||
.charmap $17, $17
|
||||
.charmap $18, $18
|
||||
.charmap $19, $19
|
||||
.charmap $1A, $1A
|
||||
.charmap $1B, $1B
|
||||
.charmap $1C, $1C
|
||||
.charmap $1D, $1D
|
||||
.charmap $1E, $1E
|
||||
.charmap $1F, $1F
|
||||
.charmap $20, $20
|
||||
.charmap $21, $21
|
||||
.charmap $22, $22
|
||||
.charmap $23, $23
|
||||
.charmap $24, $24
|
||||
.charmap $25, $25
|
||||
.charmap $26, $26
|
||||
.charmap $27, $27
|
||||
.charmap $28, $28
|
||||
.charmap $29, $29
|
||||
.charmap $2A, $2A
|
||||
.charmap $2B, $2B
|
||||
.charmap $2C, $2C
|
||||
.charmap $2D, $2D
|
||||
.charmap $2E, $2E
|
||||
.charmap $2F, $2F
|
||||
.charmap $30, $30
|
||||
.charmap $31, $31
|
||||
.charmap $32, $32
|
||||
.charmap $33, $33
|
||||
.charmap $34, $34
|
||||
.charmap $35, $35
|
||||
.charmap $36, $36
|
||||
.charmap $37, $37
|
||||
.charmap $38, $38
|
||||
.charmap $39, $39
|
||||
.charmap $3A, $3A
|
||||
.charmap $3B, $3B
|
||||
.charmap $3C, $3C
|
||||
.charmap $3D, $3D
|
||||
.charmap $3E, $3E
|
||||
.charmap $3F, $3F
|
||||
.charmap $40, $40
|
||||
.charmap $41, $41
|
||||
.charmap $42, $42
|
||||
.charmap $43, $43
|
||||
.charmap $44, $44
|
||||
.charmap $45, $45
|
||||
.charmap $46, $46
|
||||
.charmap $47, $47
|
||||
.charmap $48, $48
|
||||
.charmap $49, $49
|
||||
.charmap $4A, $4A
|
||||
.charmap $4B, $4B
|
||||
.charmap $4C, $4C
|
||||
.charmap $4D, $4D
|
||||
.charmap $4E, $4E
|
||||
.charmap $4F, $4F
|
||||
.charmap $50, $50
|
||||
.charmap $51, $51
|
||||
.charmap $52, $52
|
||||
.charmap $53, $53
|
||||
.charmap $54, $54
|
||||
.charmap $55, $55
|
||||
.charmap $56, $56
|
||||
.charmap $57, $57
|
||||
.charmap $58, $58
|
||||
.charmap $59, $59
|
||||
.charmap $5A, $5A
|
||||
.charmap $5B, $5B
|
||||
.charmap $5C, $5C
|
||||
.charmap $5D, $5D
|
||||
.charmap $5E, $5E
|
||||
.charmap $5F, $5F
|
||||
.charmap $60, $60
|
||||
.charmap $61, $61
|
||||
.charmap $62, $62
|
||||
.charmap $63, $63
|
||||
.charmap $64, $64
|
||||
.charmap $65, $65
|
||||
.charmap $66, $66
|
||||
.charmap $67, $67
|
||||
.charmap $68, $68
|
||||
.charmap $69, $69
|
||||
.charmap $6A, $6A
|
||||
.charmap $6B, $6B
|
||||
.charmap $6C, $6C
|
||||
.charmap $6D, $6D
|
||||
.charmap $6E, $6E
|
||||
.charmap $6F, $6F
|
||||
.charmap $70, $70
|
||||
.charmap $71, $71
|
||||
.charmap $72, $72
|
||||
.charmap $73, $73
|
||||
.charmap $74, $74
|
||||
.charmap $75, $75
|
||||
.charmap $76, $76
|
||||
.charmap $77, $77
|
||||
.charmap $78, $78
|
||||
.charmap $79, $79
|
||||
.charmap $7A, $7A
|
||||
.charmap $7B, $7B
|
||||
.charmap $7C, $7C
|
||||
.charmap $7D, $7D
|
||||
.charmap $7E, $7E
|
||||
.charmap $7F, $7F
|
||||
|
||||
;/* beyond ASCII */
|
||||
.charmap $80, $80
|
||||
.charmap $81, $81
|
||||
.charmap $82, $82
|
||||
.charmap $83, $83
|
||||
.charmap $84, $84
|
||||
.charmap $85, $85
|
||||
.charmap $86, $86
|
||||
.charmap $87, $87
|
||||
.charmap $88, $88
|
||||
.charmap $89, $89
|
||||
.charmap $8A, $8A
|
||||
.charmap $8B, $8B
|
||||
.charmap $8C, $8C
|
||||
.charmap $8D, $8D
|
||||
.charmap $8E, $8E
|
||||
.charmap $8F, $8F
|
||||
.charmap $90, $90
|
||||
.charmap $91, $91
|
||||
.charmap $92, $92
|
||||
.charmap $93, $93
|
||||
.charmap $94, $94
|
||||
.charmap $95, $95
|
||||
.charmap $96, $96
|
||||
.charmap $97, $97
|
||||
.charmap $98, $98
|
||||
.charmap $99, $99
|
||||
.charmap $9A, $9A
|
||||
.charmap $9B, $9B
|
||||
.charmap $9C, $9C
|
||||
.charmap $9D, $9D
|
||||
.charmap $9E, $9E
|
||||
.charmap $9F, $9F
|
||||
.charmap $A0, $A0
|
||||
.charmap $A1, $A1
|
||||
.charmap $A2, $A2
|
||||
.charmap $A3, $A3
|
||||
.charmap $A4, $A4
|
||||
.charmap $A5, $A5
|
||||
.charmap $A6, $A6
|
||||
.charmap $A7, $A7
|
||||
.charmap $A8, $A8
|
||||
.charmap $A9, $A9
|
||||
.charmap $AA, $AA
|
||||
.charmap $AB, $AB
|
||||
.charmap $AC, $AC
|
||||
.charmap $AD, $AD
|
||||
.charmap $AE, $AE
|
||||
.charmap $AF, $AF
|
||||
.charmap $B0, $B0
|
||||
.charmap $B1, $B1
|
||||
.charmap $B2, $B2
|
||||
.charmap $B3, $B3
|
||||
.charmap $B4, $B4
|
||||
.charmap $B5, $B5
|
||||
.charmap $B6, $B6
|
||||
.charmap $B7, $B7
|
||||
.charmap $B8, $B8
|
||||
.charmap $B9, $B9
|
||||
.charmap $BA, $BA
|
||||
.charmap $BB, $BB
|
||||
.charmap $BC, $BC
|
||||
.charmap $BD, $BD
|
||||
.charmap $BE, $BE
|
||||
.charmap $BF, $BF
|
||||
.charmap $C0, $C0
|
||||
.charmap $C1, $C1
|
||||
.charmap $C2, $C2
|
||||
.charmap $C3, $C3
|
||||
.charmap $C4, $C4
|
||||
.charmap $C5, $C5
|
||||
.charmap $C6, $C6
|
||||
.charmap $C7, $C7
|
||||
.charmap $C8, $C8
|
||||
.charmap $C9, $C9
|
||||
.charmap $CA, $CA
|
||||
.charmap $CB, $CB
|
||||
.charmap $CC, $CC
|
||||
.charmap $CD, $CD
|
||||
.charmap $CE, $CE
|
||||
.charmap $CF, $CF
|
||||
.charmap $D0, $D0
|
||||
.charmap $D1, $D1
|
||||
.charmap $D2, $D2
|
||||
.charmap $D3, $D3
|
||||
.charmap $D4, $D4
|
||||
.charmap $D5, $D5
|
||||
.charmap $D6, $D6
|
||||
.charmap $D7, $D7
|
||||
.charmap $D8, $D8
|
||||
.charmap $D9, $D9
|
||||
.charmap $DA, $DA
|
||||
.charmap $DB, $DB
|
||||
.charmap $DC, $DC
|
||||
.charmap $DD, $DD
|
||||
.charmap $DE, $DE
|
||||
.charmap $DF, $DF
|
||||
.charmap $E0, $E0
|
||||
.charmap $E1, $E1
|
||||
.charmap $E2, $E2
|
||||
.charmap $E3, $E3
|
||||
.charmap $E4, $E4
|
||||
.charmap $E5, $E5
|
||||
.charmap $E6, $E6
|
||||
.charmap $E7, $E7
|
||||
.charmap $E8, $E8
|
||||
.charmap $E9, $E9
|
||||
.charmap $EA, $EA
|
||||
.charmap $EB, $EB
|
||||
.charmap $EC, $EC
|
||||
.charmap $ED, $ED
|
||||
.charmap $EE, $EE
|
||||
.charmap $EF, $EF
|
||||
.charmap $F0, $F0
|
||||
.charmap $F1, $F1
|
||||
.charmap $F2, $F2
|
||||
.charmap $F3, $F3
|
||||
.charmap $F4, $F4
|
||||
.charmap $F5, $F5
|
||||
.charmap $F6, $F6
|
||||
.charmap $F7, $F7
|
||||
.charmap $F8, $F8
|
||||
.charmap $F9, $F9
|
||||
.charmap $FA, $FA
|
||||
.charmap $FB, $FB
|
||||
.charmap $FC, $FC
|
||||
.charmap $FD, $FD
|
||||
.charmap $FE, $FE
|
||||
.charmap $FF, $FF
|
|
@ -924,7 +924,7 @@ KEY_QUESTIONMARK = KEY_SLASH | KEY_SHIFT
|
|||
KEY_CLEAR = KEY_LESSTHAN | KEY_SHIFT
|
||||
KEY_INSERT = KEY_GREATERTHAN | KEY_SHIFT
|
||||
|
||||
KEY_UP = KEY_UNDERLINE | KEY_CTRL
|
||||
KEY_UP = KEY_DASH | KEY_CTRL
|
||||
KEY_DOWN = KEY_EQUALS | KEY_CTRL
|
||||
KEY_LEFT = KEY_PLUS | KEY_CTRL
|
||||
KEY_RIGHT = KEY_ASTERISK | KEY_CTRL
|
||||
|
|
8
asminc/atari7800.inc
Normal file
8
asminc/atari7800.inc
Normal file
|
@ -0,0 +1,8 @@
|
|||
; Atari 7800 TIA & RIOT read / write registers
|
||||
;
|
||||
; Karri Kaksonen (karri@sipo.fi), 2022
|
||||
|
||||
; TIA, RIOT & MARIA registers mapping
|
||||
.include "atari7800_tia.inc"
|
||||
.include "atari7800_riot.inc"
|
||||
.include "atari7800_maria.inc"
|
39
asminc/atari7800_maria.inc
Normal file
39
asminc/atari7800_maria.inc
Normal file
|
@ -0,0 +1,39 @@
|
|||
; Atari 7800 MARIA read / write registers
|
||||
;
|
||||
|
||||
; Read registers
|
||||
BKGRND := $20
|
||||
P0C1 := $21
|
||||
P0C2 := $22
|
||||
P0C3 := $23
|
||||
MWSYNC := $24
|
||||
P1C1 := $25
|
||||
P1C2 := $26
|
||||
P1C3 := $27
|
||||
MSTAT := $28
|
||||
P2C1 := $29
|
||||
P2C2 := $2A
|
||||
P2C3 := $2B
|
||||
DPPH := $2C
|
||||
P3C1 := $2D
|
||||
P3C2 := $2E
|
||||
P3C3 := $2F
|
||||
DPPL := $30
|
||||
P4C1 := $31
|
||||
P4C2 := $32
|
||||
P4C3 := $33
|
||||
CHBASE := $34
|
||||
P5C1 := $35
|
||||
P5C2 := $36
|
||||
P5C3 := $37
|
||||
OFFSET := $38
|
||||
P6C1 := $39
|
||||
P6C2 := $3A
|
||||
P6C3 := $3B
|
||||
CTRL := $3C
|
||||
P7C1 := $3D
|
||||
P7C2 := $3E
|
||||
P7C3 := $3F
|
||||
|
||||
; Write registers
|
||||
|
20
asminc/atari7800_riot.inc
Normal file
20
asminc/atari7800_riot.inc
Normal file
|
@ -0,0 +1,20 @@
|
|||
; Atari 7800 RIOT read / write registers
|
||||
;
|
||||
; Source: DASM - vcs.h
|
||||
; Details available in: Stella Programmer's Guide by Steve Wright
|
||||
;
|
||||
; Florent Flament (contact@florentflament.com), 2017
|
||||
|
||||
; Read registers
|
||||
SWCHA := $0280
|
||||
CTLSWA := $0281
|
||||
SWCHB := $0282
|
||||
CTLSWB := $0283
|
||||
INTIM := $0284
|
||||
TIMINT := $0285
|
||||
|
||||
; Write registers
|
||||
TIM1T := $0294
|
||||
TIM8T := $0295
|
||||
TIM64T := $0296
|
||||
T1024T := $0297
|
69
asminc/atari7800_tia.inc
Normal file
69
asminc/atari7800_tia.inc
Normal file
|
@ -0,0 +1,69 @@
|
|||
; Atari 7800 TIA read / write registers
|
||||
;
|
||||
; Source: DASM - vcs.h
|
||||
; Details available in: Stella Programmer's Guide by Steve Wright
|
||||
;
|
||||
; Florent Flament (contact@florentflament.com), 2017
|
||||
|
||||
; Read registers
|
||||
VSYNC := $00
|
||||
VBLANK := $01
|
||||
WSYNC := $02
|
||||
RSYNC := $03
|
||||
NUSIZ0 := $04
|
||||
NUSIZ1 := $05
|
||||
COLUP0 := $06
|
||||
COLUP1 := $07
|
||||
COLUPF := $08
|
||||
COLUBK := $09
|
||||
CTRLPF := $0A
|
||||
REFP0 := $0B
|
||||
REFP1 := $0C
|
||||
PF0 := $0D
|
||||
PF1 := $0E
|
||||
PF2 := $0F
|
||||
RESP0 := $10
|
||||
RESP1 := $11
|
||||
RESM0 := $12
|
||||
RESM1 := $13
|
||||
RESBL := $14
|
||||
AUDC0 := $15
|
||||
AUDC1 := $16
|
||||
AUDF0 := $17
|
||||
AUDF1 := $18
|
||||
AUDV0 := $19
|
||||
AUDV1 := $1A
|
||||
GRP0 := $1B
|
||||
GRP1 := $1C
|
||||
ENAM0 := $1D
|
||||
ENAM1 := $1E
|
||||
ENABL := $1F
|
||||
HMP0 := $20
|
||||
HMP1 := $21
|
||||
HMM0 := $22
|
||||
HMM1 := $23
|
||||
HMBL := $24
|
||||
VDELP0 := $25
|
||||
VDELP1 := $26
|
||||
VDELBL := $27
|
||||
RESMP0 := $28
|
||||
RESMP1 := $29
|
||||
HMOVE := $2A
|
||||
HMCLR := $2B
|
||||
CXCLR := $2C
|
||||
|
||||
; Write registers
|
||||
CXM0P := $00
|
||||
CXM1P := $01
|
||||
CXP0FB := $02
|
||||
CXP1FB := $03
|
||||
CXM0FB := $04
|
||||
CXM1FB := $05
|
||||
CXBLPF := $06
|
||||
CXPPMM := $07
|
||||
INPT0 := $08
|
||||
INPT1 := $09
|
||||
INPT2 := $0A
|
||||
INPT3 := $0B
|
||||
INPT4 := $0C
|
||||
INPT5 := $0D
|
301
asminc/atari_atascii_charmap.inc
Normal file
301
asminc/atari_atascii_charmap.inc
Normal file
|
@ -0,0 +1,301 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* atari_atascii_charmap.inc */
|
||||
;/* */
|
||||
;/* Atari system standard string mapping ISO-8859-1 -> AtASCII */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* C 2016 Christian Krueger */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* This software is provided 'as-is', without any expressed or implied */
|
||||
;/* warranty. In no event will the authors be held liable for any damages */
|
||||
;/* arising from the use of this software. */
|
||||
;/* */
|
||||
;/* Permission is granted to anyone to use this software for any purpose, */
|
||||
;/* including commercial applications, and to alter it and redistribute it */
|
||||
;/* freely, subject to the following restrictions: */
|
||||
;/* */
|
||||
;/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
;/* claim that you wrote the original software. If you use this software */
|
||||
;/* in a product, an acknowledgment in the product documentation would be */
|
||||
;/* appreciated but is not required. */
|
||||
;/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
;/* be misrepresented as being the original software. */
|
||||
;/* 3. This notice may not be removed or altered from any source */
|
||||
;/* distribution. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
.charmap $00, $00
|
||||
.charmap $01, $01
|
||||
.charmap $02, $02
|
||||
.charmap $03, $03
|
||||
.charmap $04, $04
|
||||
.charmap $05, $05
|
||||
.charmap $06, $06
|
||||
.charmap $07, $FD
|
||||
.charmap $08, $08
|
||||
.charmap $09, $7F
|
||||
.charmap $0A, $9B
|
||||
.charmap $0B, $0B
|
||||
.charmap $0C, $7D
|
||||
.charmap $0D, $0D
|
||||
.charmap $0E, $0E
|
||||
.charmap $0F, $0F
|
||||
|
||||
.charmap $10, $10
|
||||
.charmap $11, $11
|
||||
.charmap $12, $12
|
||||
.charmap $13, $13
|
||||
.charmap $14, $14
|
||||
.charmap $15, $15
|
||||
.charmap $16, $16
|
||||
.charmap $17, $17
|
||||
.charmap $18, $18
|
||||
.charmap $19, $19
|
||||
.charmap $1A, $1A
|
||||
.charmap $1B, $1B
|
||||
.charmap $1C, $1C
|
||||
.charmap $1D, $1D
|
||||
.charmap $1E, $1E
|
||||
.charmap $1F, $1F
|
||||
|
||||
.charmap $20, $20
|
||||
.charmap $21, $21
|
||||
.charmap $22, $22
|
||||
.charmap $23, $23
|
||||
.charmap $24, $24
|
||||
.charmap $25, $25
|
||||
.charmap $26, $26
|
||||
.charmap $27, $27
|
||||
.charmap $28, $28
|
||||
.charmap $29, $29
|
||||
.charmap $2A, $2A
|
||||
.charmap $2B, $2B
|
||||
.charmap $2C, $2C
|
||||
.charmap $2D, $2D
|
||||
.charmap $2E, $2E
|
||||
.charmap $2F, $2F
|
||||
|
||||
.charmap $30, $30
|
||||
.charmap $31, $31
|
||||
.charmap $32, $32
|
||||
.charmap $33, $33
|
||||
.charmap $34, $34
|
||||
.charmap $35, $35
|
||||
.charmap $36, $36
|
||||
.charmap $37, $37
|
||||
.charmap $38, $38
|
||||
.charmap $39, $39
|
||||
.charmap $3A, $3A
|
||||
.charmap $3B, $3B
|
||||
.charmap $3C, $3C
|
||||
.charmap $3D, $3D
|
||||
.charmap $3E, $3E
|
||||
.charmap $3F, $3F
|
||||
|
||||
.charmap $40, $40
|
||||
.charmap $41, $41
|
||||
.charmap $42, $42
|
||||
.charmap $43, $43
|
||||
.charmap $44, $44
|
||||
.charmap $45, $45
|
||||
.charmap $46, $46
|
||||
.charmap $47, $47
|
||||
.charmap $48, $48
|
||||
.charmap $49, $49
|
||||
.charmap $4A, $4A
|
||||
.charmap $4B, $4B
|
||||
.charmap $4C, $4C
|
||||
.charmap $4D, $4D
|
||||
.charmap $4E, $4E
|
||||
.charmap $4F, $4F
|
||||
|
||||
.charmap $50, $50
|
||||
.charmap $51, $51
|
||||
.charmap $52, $52
|
||||
.charmap $53, $53
|
||||
.charmap $54, $54
|
||||
.charmap $55, $55
|
||||
.charmap $56, $56
|
||||
.charmap $57, $57
|
||||
.charmap $58, $58
|
||||
.charmap $59, $59
|
||||
.charmap $5A, $5A
|
||||
.charmap $5B, $5B
|
||||
.charmap $5C, $5C
|
||||
.charmap $5D, $5D
|
||||
.charmap $5E, $5E
|
||||
.charmap $5F, $5F
|
||||
|
||||
.charmap $60, $60
|
||||
.charmap $61, $61
|
||||
.charmap $62, $62
|
||||
.charmap $63, $63
|
||||
.charmap $64, $64
|
||||
.charmap $65, $65
|
||||
.charmap $66, $66
|
||||
.charmap $67, $67
|
||||
.charmap $68, $68
|
||||
.charmap $69, $69
|
||||
.charmap $6A, $6A
|
||||
.charmap $6B, $6B
|
||||
.charmap $6C, $6C
|
||||
.charmap $6D, $6D
|
||||
.charmap $6E, $6E
|
||||
.charmap $6F, $6F
|
||||
|
||||
.charmap $70, $70
|
||||
.charmap $71, $71
|
||||
.charmap $72, $72
|
||||
.charmap $73, $73
|
||||
.charmap $74, $74
|
||||
.charmap $75, $75
|
||||
.charmap $76, $76
|
||||
.charmap $77, $77
|
||||
.charmap $78, $78
|
||||
.charmap $79, $79
|
||||
.charmap $7A, $7A
|
||||
.charmap $7B, $7B
|
||||
.charmap $7C, $7C
|
||||
.charmap $7D, $7D
|
||||
.charmap $7E, $7E
|
||||
.charmap $7F, $7F
|
||||
|
||||
.charmap $80, $80
|
||||
.charmap $81, $81
|
||||
.charmap $82, $82
|
||||
.charmap $83, $83
|
||||
.charmap $84, $84
|
||||
.charmap $85, $85
|
||||
.charmap $86, $86
|
||||
.charmap $87, $87
|
||||
.charmap $88, $88
|
||||
.charmap $89, $89
|
||||
.charmap $8A, $8A
|
||||
.charmap $8B, $8B
|
||||
.charmap $8C, $8C
|
||||
.charmap $8D, $8D
|
||||
.charmap $8E, $8E
|
||||
.charmap $8F, $8F
|
||||
|
||||
.charmap $90, $90
|
||||
.charmap $91, $91
|
||||
.charmap $92, $92
|
||||
.charmap $93, $93
|
||||
.charmap $94, $94
|
||||
.charmap $95, $95
|
||||
.charmap $96, $96
|
||||
.charmap $97, $97
|
||||
.charmap $98, $98
|
||||
.charmap $99, $99
|
||||
.charmap $9A, $9A
|
||||
.charmap $9B, $9B
|
||||
.charmap $9C, $9C
|
||||
.charmap $9D, $9D
|
||||
.charmap $9E, $9E
|
||||
.charmap $9F, $9F
|
||||
|
||||
.charmap $A0, $A0
|
||||
.charmap $A1, $A1
|
||||
.charmap $A2, $A2
|
||||
.charmap $A3, $A3
|
||||
.charmap $A4, $A4
|
||||
.charmap $A5, $A5
|
||||
.charmap $A6, $A6
|
||||
.charmap $A7, $A7
|
||||
.charmap $A8, $A8
|
||||
.charmap $A9, $A9
|
||||
.charmap $AA, $AA
|
||||
.charmap $AB, $AB
|
||||
.charmap $AC, $AC
|
||||
.charmap $AD, $AD
|
||||
.charmap $AE, $AE
|
||||
.charmap $AF, $AF
|
||||
|
||||
.charmap $B0, $B0
|
||||
.charmap $B1, $B1
|
||||
.charmap $B2, $B2
|
||||
.charmap $B3, $B3
|
||||
.charmap $B4, $B4
|
||||
.charmap $B5, $B5
|
||||
.charmap $B6, $B6
|
||||
.charmap $B7, $B7
|
||||
.charmap $B8, $B8
|
||||
.charmap $B9, $B9
|
||||
.charmap $BA, $BA
|
||||
.charmap $BB, $BB
|
||||
.charmap $BC, $BC
|
||||
.charmap $BD, $BD
|
||||
.charmap $BE, $BE
|
||||
.charmap $BF, $BF
|
||||
|
||||
.charmap $C0, $C0
|
||||
.charmap $C1, $C1
|
||||
.charmap $C2, $C2
|
||||
.charmap $C3, $C3
|
||||
.charmap $C4, $C4
|
||||
.charmap $C5, $C5
|
||||
.charmap $C6, $C6
|
||||
.charmap $C7, $C7
|
||||
.charmap $C8, $C8
|
||||
.charmap $C9, $C9
|
||||
.charmap $CA, $CA
|
||||
.charmap $CB, $CB
|
||||
.charmap $CC, $CC
|
||||
.charmap $CD, $CD
|
||||
.charmap $CE, $CE
|
||||
.charmap $CF, $CF
|
||||
|
||||
.charmap $D0, $D0
|
||||
.charmap $D1, $D1
|
||||
.charmap $D2, $D2
|
||||
.charmap $D3, $D3
|
||||
.charmap $D4, $D4
|
||||
.charmap $D5, $D5
|
||||
.charmap $D6, $D6
|
||||
.charmap $D7, $D7
|
||||
.charmap $D8, $D8
|
||||
.charmap $D9, $D9
|
||||
.charmap $DA, $DA
|
||||
.charmap $DB, $DB
|
||||
.charmap $DC, $DC
|
||||
.charmap $DD, $DD
|
||||
.charmap $DE, $DE
|
||||
.charmap $DF, $DF
|
||||
|
||||
.charmap $E0, $E0
|
||||
.charmap $E1, $E1
|
||||
.charmap $E2, $E2
|
||||
.charmap $E3, $E3
|
||||
.charmap $E4, $E4
|
||||
.charmap $E5, $E5
|
||||
.charmap $E6, $E6
|
||||
.charmap $E7, $E7
|
||||
.charmap $E8, $E8
|
||||
.charmap $E9, $E9
|
||||
.charmap $EA, $EA
|
||||
.charmap $EB, $EB
|
||||
.charmap $EC, $EC
|
||||
.charmap $ED, $ED
|
||||
.charmap $EE, $EE
|
||||
.charmap $EF, $EF
|
||||
|
||||
.charmap $F0, $F0
|
||||
.charmap $F1, $F1
|
||||
.charmap $F2, $F2
|
||||
.charmap $F3, $F3
|
||||
.charmap $F4, $F4
|
||||
.charmap $F5, $F5
|
||||
.charmap $F6, $F6
|
||||
.charmap $F7, $F7
|
||||
.charmap $F8, $F8
|
||||
.charmap $F9, $F9
|
||||
.charmap $FA, $FA
|
||||
.charmap $FB, $FB
|
||||
.charmap $FC, $FC
|
||||
.charmap $FD, $FD
|
||||
.charmap $FE, $FE
|
||||
.charmap $FF, $FF
|
303
asminc/atari_screen_charmap.inc
Normal file
303
asminc/atari_screen_charmap.inc
Normal file
|
@ -0,0 +1,303 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* atari_screen_charmap.inc */
|
||||
;/* */
|
||||
;/* Atari system internal string mapping ISO-8859-1 -> Internal/Screen-Code */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* C 2016 Christian Krueger */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* This software is provided 'as-is', without any expressed or implied */
|
||||
;/* warranty. In no event will the authors be held liable for any damages */
|
||||
;/* arising from the use of this software. */
|
||||
;/* */
|
||||
;/* Permission is granted to anyone to use this software for any purpose, */
|
||||
;/* including commercial applications, and to alter it and redistribute it */
|
||||
;/* freely, subject to the following restrictions: */
|
||||
;/* */
|
||||
;/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
;/* claim that you wrote the original software. If you use this software */
|
||||
;/* in a product, an acknowledgment in the product documentation would be */
|
||||
;/* appreciated but is not required. */
|
||||
;/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
;/* be misrepresented as being the original software. */
|
||||
;/* 3. This notice may not be removed or altered from any source */
|
||||
;/* distribution. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
.charmap $00, $40
|
||||
.charmap $01, $41
|
||||
.charmap $02, $42
|
||||
.charmap $03, $43
|
||||
.charmap $04, $44
|
||||
.charmap $05, $45
|
||||
.charmap $06, $46
|
||||
.charmap $07, $FD
|
||||
.charmap $08, $48
|
||||
.charmap $09, $7F
|
||||
.charmap $0A, $DB
|
||||
.charmap $0B, $4B
|
||||
.charmap $0C, $7D
|
||||
.charmap $0D, $4D
|
||||
.charmap $0E, $4E
|
||||
.charmap $0F, $4F
|
||||
|
||||
.charmap $10, $50
|
||||
.charmap $11, $51
|
||||
.charmap $12, $52
|
||||
.charmap $13, $53
|
||||
.charmap $14, $54
|
||||
.charmap $15, $55
|
||||
.charmap $16, $56
|
||||
.charmap $17, $57
|
||||
.charmap $18, $58
|
||||
.charmap $19, $59
|
||||
.charmap $1A, $5A
|
||||
.charmap $1B, $5B
|
||||
.charmap $1C, $5C
|
||||
.charmap $1D, $5D
|
||||
.charmap $1E, $5E
|
||||
.charmap $1F, $5F
|
||||
|
||||
.charmap $20, $00
|
||||
|
||||
.charmap $21, $01
|
||||
.charmap $22, $02
|
||||
.charmap $23, $03
|
||||
.charmap $24, $04
|
||||
.charmap $25, $05
|
||||
.charmap $26, $06
|
||||
.charmap $27, $07
|
||||
.charmap $28, $08
|
||||
.charmap $29, $09
|
||||
.charmap $2A, $0A
|
||||
.charmap $2B, $0B
|
||||
.charmap $2C, $0C
|
||||
.charmap $2D, $0D
|
||||
.charmap $2E, $0E
|
||||
.charmap $2F, $0F
|
||||
|
||||
.charmap $30, $10
|
||||
.charmap $31, $11
|
||||
.charmap $32, $12
|
||||
.charmap $33, $13
|
||||
.charmap $34, $14
|
||||
.charmap $35, $15
|
||||
.charmap $36, $16
|
||||
.charmap $37, $17
|
||||
.charmap $38, $18
|
||||
.charmap $39, $19
|
||||
.charmap $3A, $1A
|
||||
.charmap $3B, $1B
|
||||
.charmap $3C, $1C
|
||||
.charmap $3D, $1D
|
||||
.charmap $3E, $1E
|
||||
.charmap $3F, $1F
|
||||
|
||||
.charmap $40, $20
|
||||
.charmap $41, $21
|
||||
.charmap $42, $22
|
||||
.charmap $43, $23
|
||||
.charmap $44, $24
|
||||
.charmap $45, $25
|
||||
.charmap $46, $26
|
||||
.charmap $47, $27
|
||||
.charmap $48, $28
|
||||
.charmap $49, $29
|
||||
.charmap $4A, $2A
|
||||
.charmap $4B, $2B
|
||||
.charmap $4C, $2C
|
||||
.charmap $4D, $2D
|
||||
.charmap $4E, $2E
|
||||
.charmap $4F, $2F
|
||||
|
||||
.charmap $50, $30
|
||||
.charmap $51, $31
|
||||
.charmap $52, $32
|
||||
.charmap $53, $33
|
||||
.charmap $54, $34
|
||||
.charmap $55, $35
|
||||
.charmap $56, $36
|
||||
.charmap $57, $37
|
||||
.charmap $58, $38
|
||||
.charmap $59, $39
|
||||
.charmap $5A, $3A
|
||||
.charmap $5B, $3B
|
||||
.charmap $5C, $3C
|
||||
.charmap $5D, $3D
|
||||
.charmap $5E, $3E
|
||||
.charmap $5F, $3F
|
||||
|
||||
.charmap $60, $60
|
||||
.charmap $61, $61
|
||||
.charmap $62, $62
|
||||
.charmap $63, $63
|
||||
.charmap $64, $64
|
||||
.charmap $65, $65
|
||||
.charmap $66, $66
|
||||
.charmap $67, $67
|
||||
.charmap $68, $68
|
||||
.charmap $69, $69
|
||||
.charmap $6A, $6A
|
||||
.charmap $6B, $6B
|
||||
.charmap $6C, $6C
|
||||
.charmap $6D, $6D
|
||||
.charmap $6E, $6E
|
||||
.charmap $6F, $6F
|
||||
|
||||
.charmap $70, $70
|
||||
.charmap $71, $71
|
||||
.charmap $72, $72
|
||||
.charmap $73, $73
|
||||
.charmap $74, $74
|
||||
.charmap $75, $75
|
||||
.charmap $76, $76
|
||||
.charmap $77, $77
|
||||
.charmap $78, $78
|
||||
.charmap $79, $79
|
||||
.charmap $7A, $7A
|
||||
.charmap $7B, $7B
|
||||
.charmap $7C, $7C
|
||||
.charmap $7D, $7D
|
||||
.charmap $7E, $7E
|
||||
.charmap $7F, $7F
|
||||
|
||||
.charmap $80, $C0
|
||||
.charmap $81, $C1
|
||||
.charmap $82, $C2
|
||||
.charmap $83, $C3
|
||||
.charmap $84, $C4
|
||||
.charmap $85, $C5
|
||||
.charmap $86, $C6
|
||||
.charmap $87, $C7
|
||||
.charmap $88, $C8
|
||||
.charmap $89, $C9
|
||||
.charmap $8A, $CA
|
||||
.charmap $8B, $CB
|
||||
.charmap $8C, $CC
|
||||
.charmap $8D, $CD
|
||||
.charmap $8E, $CE
|
||||
.charmap $8F, $CF
|
||||
|
||||
.charmap $90, $D0
|
||||
.charmap $91, $D1
|
||||
.charmap $92, $D2
|
||||
.charmap $93, $D3
|
||||
.charmap $94, $D4
|
||||
.charmap $95, $D5
|
||||
.charmap $96, $D6
|
||||
.charmap $97, $D7
|
||||
.charmap $98, $D8
|
||||
.charmap $99, $D9
|
||||
.charmap $9A, $DA
|
||||
.charmap $9B, $DB
|
||||
.charmap $9C, $DC
|
||||
.charmap $9D, $DD
|
||||
.charmap $9E, $DE
|
||||
.charmap $9F, $DF
|
||||
|
||||
.charmap $A0, $80
|
||||
.charmap $A1, $81
|
||||
.charmap $A2, $82
|
||||
.charmap $A3, $83
|
||||
.charmap $A4, $84
|
||||
.charmap $A5, $85
|
||||
.charmap $A6, $86
|
||||
.charmap $A7, $87
|
||||
.charmap $A8, $88
|
||||
.charmap $A9, $89
|
||||
.charmap $AA, $8A
|
||||
.charmap $AB, $8B
|
||||
.charmap $AC, $8C
|
||||
.charmap $AD, $8D
|
||||
.charmap $AE, $8E
|
||||
.charmap $AF, $8F
|
||||
|
||||
.charmap $B0, $90
|
||||
.charmap $B1, $91
|
||||
.charmap $B2, $92
|
||||
.charmap $B3, $93
|
||||
.charmap $B4, $94
|
||||
.charmap $B5, $95
|
||||
.charmap $B6, $96
|
||||
.charmap $B7, $97
|
||||
.charmap $B8, $98
|
||||
.charmap $B9, $99
|
||||
.charmap $BA, $9A
|
||||
.charmap $BB, $9B
|
||||
.charmap $BC, $9C
|
||||
.charmap $BD, $9D
|
||||
.charmap $BE, $9E
|
||||
.charmap $BF, $9F
|
||||
|
||||
.charmap $C0, $A0
|
||||
.charmap $C1, $A1
|
||||
.charmap $C2, $A2
|
||||
.charmap $C3, $A3
|
||||
.charmap $C4, $A4
|
||||
.charmap $C5, $A5
|
||||
.charmap $C6, $A6
|
||||
.charmap $C7, $A7
|
||||
.charmap $C8, $A8
|
||||
.charmap $C9, $A9
|
||||
.charmap $CA, $AA
|
||||
.charmap $CB, $AB
|
||||
.charmap $CC, $AC
|
||||
.charmap $CD, $AD
|
||||
.charmap $CE, $AE
|
||||
.charmap $CF, $AF
|
||||
|
||||
.charmap $D0, $B0
|
||||
.charmap $D1, $B1
|
||||
.charmap $D2, $B2
|
||||
.charmap $D3, $B3
|
||||
.charmap $D4, $B4
|
||||
.charmap $D5, $B5
|
||||
.charmap $D6, $B6
|
||||
.charmap $D7, $B7
|
||||
.charmap $D8, $B8
|
||||
.charmap $D9, $B9
|
||||
.charmap $DA, $BA
|
||||
.charmap $DB, $BB
|
||||
.charmap $DC, $BC
|
||||
.charmap $DD, $BD
|
||||
.charmap $DE, $BE
|
||||
.charmap $DF, $BF
|
||||
|
||||
.charmap $E0, $E0
|
||||
.charmap $E1, $E1
|
||||
.charmap $E2, $E2
|
||||
.charmap $E3, $E3
|
||||
.charmap $E4, $E4
|
||||
.charmap $E5, $E5
|
||||
.charmap $E6, $E6
|
||||
.charmap $E7, $E7
|
||||
.charmap $E8, $E8
|
||||
.charmap $E9, $E9
|
||||
.charmap $EA, $EA
|
||||
.charmap $EB, $EB
|
||||
.charmap $EC, $EC
|
||||
.charmap $ED, $ED
|
||||
.charmap $EE, $EE
|
||||
.charmap $EF, $EF
|
||||
|
||||
.charmap $F0, $F0
|
||||
.charmap $F1, $F1
|
||||
.charmap $F2, $F2
|
||||
.charmap $F3, $F3
|
||||
.charmap $F4, $F4
|
||||
.charmap $F5, $F5
|
||||
.charmap $F6, $F6
|
||||
.charmap $F7, $F7
|
||||
.charmap $F8, $F8
|
||||
.charmap $F9, $F9
|
||||
.charmap $FA, $FA
|
||||
.charmap $FB, $FB
|
||||
.charmap $FC, $FC
|
||||
.charmap $FD, $FD
|
||||
.charmap $FE, $FE
|
||||
.charmap $FF, $FF
|
||||
|
|
@ -77,6 +77,8 @@ VIC_SPR_EXP_Y := $D017
|
|||
VIC_SPR_EXP_X := $D01D
|
||||
VIC_SPR_MCOLOR := $D01C
|
||||
VIC_SPR_BG_PRIO := $D01B
|
||||
VIC_SPR_COLL := $D01E
|
||||
VIC_SPR_BG_COLL := $D01F
|
||||
|
||||
VIC_SPR_MCOLOR0 := $D025
|
||||
VIC_SPR_MCOLOR1 := $D026
|
||||
|
|
291
asminc/cbm_petscii_charmap.inc
Normal file
291
asminc/cbm_petscii_charmap.inc
Normal file
|
@ -0,0 +1,291 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* cbm_petscii_charmap.inc */
|
||||
;/* */
|
||||
;/* CBM system standard string mapping ISO-8859-1 -> PetSCII */
|
||||
;/* */
|
||||
;/* */
|
||||
;/* 2019-03-10, Greg King */
|
||||
;/* */
|
||||
;/* This software is provided "as-is", without any expressed or implied */
|
||||
;/* warranty. In no event will the authors be held liable for any damages */
|
||||
;/* arising from the use of this software. */
|
||||
;/* */
|
||||
;/* Permission is granted to anyone to use this software for any purpose, */
|
||||
;/* including commercial applications, and to alter it and redistribute it */
|
||||
;/* freely, subject to the following restrictions: */
|
||||
;/* */
|
||||
;/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
;/* claim that you wrote the original software. If you use this software */
|
||||
;/* in a product, an acknowledgment in the product documentation would be */
|
||||
;/* appreciated, but is not required. */
|
||||
;/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
;/* be misrepresented as being the original software. */
|
||||
;/* 3. This notice must not be removed or altered from any source */
|
||||
;/* distribution. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
.charmap $00, $00
|
||||
.charmap $01, $01
|
||||
.charmap $02, $02
|
||||
.charmap $03, $03
|
||||
.charmap $04, $04
|
||||
.charmap $05, $05
|
||||
.charmap $06, $06
|
||||
.charmap $07, $07
|
||||
.charmap $08, $14
|
||||
.charmap $09, $09
|
||||
.charmap $0A, $0D
|
||||
.charmap $0B, $11
|
||||
.charmap $0C, $93
|
||||
.charmap $0D, $0A
|
||||
.charmap $0E, $0E
|
||||
.charmap $0F, $0F
|
||||
.charmap $10, $10
|
||||
.charmap $11, $0B
|
||||
.charmap $12, $12
|
||||
.charmap $13, $13
|
||||
.charmap $14, $08
|
||||
.charmap $15, $15
|
||||
.charmap $16, $16
|
||||
.charmap $17, $17
|
||||
.charmap $18, $18
|
||||
.charmap $19, $19
|
||||
.charmap $1A, $1A
|
||||
.charmap $1B, $1B
|
||||
.charmap $1C, $1C
|
||||
.charmap $1D, $1D
|
||||
.charmap $1E, $1E
|
||||
.charmap $1F, $1F
|
||||
|
||||
.charmap $20, $20
|
||||
.charmap $21, $21
|
||||
.charmap $22, $22
|
||||
.charmap $23, $23
|
||||
.charmap $24, $24
|
||||
.charmap $25, $25
|
||||
.charmap $26, $26
|
||||
.charmap $27, $27
|
||||
.charmap $28, $28
|
||||
.charmap $29, $29
|
||||
.charmap $2A, $2A
|
||||
.charmap $2B, $2B
|
||||
.charmap $2C, $2C
|
||||
.charmap $2D, $2D
|
||||
.charmap $2E, $2E
|
||||
.charmap $2F, $2F
|
||||
.charmap $30, $30
|
||||
.charmap $31, $31
|
||||
.charmap $32, $32
|
||||
.charmap $33, $33
|
||||
.charmap $34, $34
|
||||
.charmap $35, $35
|
||||
.charmap $36, $36
|
||||
.charmap $37, $37
|
||||
.charmap $38, $38
|
||||
.charmap $39, $39
|
||||
.charmap $3A, $3A
|
||||
.charmap $3B, $3B
|
||||
.charmap $3C, $3C
|
||||
.charmap $3D, $3D
|
||||
.charmap $3E, $3E
|
||||
.charmap $3F, $3F
|
||||
|
||||
.charmap $40, $40
|
||||
.charmap $41, $C1
|
||||
.charmap $42, $C2
|
||||
.charmap $43, $C3
|
||||
.charmap $44, $C4
|
||||
.charmap $45, $C5
|
||||
.charmap $46, $C6
|
||||
.charmap $47, $C7
|
||||
.charmap $48, $C8
|
||||
.charmap $49, $C9
|
||||
.charmap $4A, $CA
|
||||
.charmap $4B, $CB
|
||||
.charmap $4C, $CC
|
||||
.charmap $4D, $CD
|
||||
.charmap $4E, $CE
|
||||
.charmap $4F, $CF
|
||||
.charmap $50, $D0
|
||||
.charmap $51, $D1
|
||||
.charmap $52, $D2
|
||||
.charmap $53, $D3
|
||||
.charmap $54, $D4
|
||||
.charmap $55, $D5
|
||||
.charmap $56, $D6
|
||||
.charmap $57, $D7
|
||||
.charmap $58, $D8
|
||||
.charmap $59, $D9
|
||||
.charmap $5A, $DA
|
||||
.charmap $5B, $5B
|
||||
.charmap $5C, $BF
|
||||
.charmap $5D, $5D
|
||||
.charmap $5E, $5E
|
||||
.charmap $5F, $A4
|
||||
|
||||
.charmap $60, $AD
|
||||
.charmap $61, $41
|
||||
.charmap $62, $42
|
||||
.charmap $63, $43
|
||||
.charmap $64, $44
|
||||
.charmap $65, $45
|
||||
.charmap $66, $46
|
||||
.charmap $67, $47
|
||||
.charmap $68, $48
|
||||
.charmap $69, $49
|
||||
.charmap $6A, $4A
|
||||
.charmap $6B, $4B
|
||||
.charmap $6C, $4C
|
||||
.charmap $6D, $4D
|
||||
.charmap $6E, $4E
|
||||
.charmap $6F, $4F
|
||||
.charmap $70, $50
|
||||
.charmap $71, $51
|
||||
.charmap $72, $52
|
||||
.charmap $73, $53
|
||||
.charmap $74, $54
|
||||
.charmap $75, $55
|
||||
.charmap $76, $56
|
||||
.charmap $77, $57
|
||||
.charmap $78, $58
|
||||
.charmap $79, $59
|
||||
.charmap $7A, $5A
|
||||
.charmap $7B, $B3
|
||||
.charmap $7C, $DD
|
||||
.charmap $7D, $AB
|
||||
.charmap $7E, $B1
|
||||
.charmap $7F, $DF
|
||||
|
||||
.charmap $80, $80
|
||||
.charmap $81, $81
|
||||
.charmap $82, $82
|
||||
.charmap $83, $83
|
||||
.charmap $84, $84
|
||||
.charmap $85, $85
|
||||
.charmap $86, $86
|
||||
.charmap $87, $87
|
||||
.charmap $88, $88
|
||||
.charmap $89, $89
|
||||
.charmap $8A, $8A
|
||||
.charmap $8B, $8B
|
||||
.charmap $8C, $8C
|
||||
.charmap $8D, $8D
|
||||
.charmap $8E, $8E
|
||||
.charmap $8F, $8F
|
||||
.charmap $90, $90
|
||||
.charmap $91, $91
|
||||
.charmap $92, $92
|
||||
.charmap $93, $0C
|
||||
.charmap $94, $94
|
||||
.charmap $95, $95
|
||||
.charmap $96, $96
|
||||
.charmap $97, $97
|
||||
.charmap $98, $98
|
||||
.charmap $99, $99
|
||||
.charmap $9A, $9A
|
||||
.charmap $9B, $9B
|
||||
.charmap $9C, $9C
|
||||
.charmap $9D, $9D
|
||||
.charmap $9E, $9E
|
||||
.charmap $9F, $9F
|
||||
|
||||
.charmap $A0, $A0
|
||||
.charmap $A1, $A1
|
||||
.charmap $A2, $A2
|
||||
.charmap $A3, $A3
|
||||
.charmap $A4, $A4
|
||||
.charmap $A5, $A5
|
||||
.charmap $A6, $A6
|
||||
.charmap $A7, $A7
|
||||
.charmap $A8, $A8
|
||||
.charmap $A9, $A9
|
||||
.charmap $AA, $AA
|
||||
.charmap $AB, $AB
|
||||
.charmap $AC, $AC
|
||||
.charmap $AD, $AD
|
||||
.charmap $AE, $AE
|
||||
.charmap $AF, $AF
|
||||
.charmap $B0, $B0
|
||||
.charmap $B1, $B1
|
||||
.charmap $B2, $B2
|
||||
.charmap $B3, $B3
|
||||
.charmap $B4, $B4
|
||||
.charmap $B5, $B5
|
||||
.charmap $B6, $B6
|
||||
.charmap $B7, $B7
|
||||
.charmap $B8, $B8
|
||||
.charmap $B9, $B9
|
||||
.charmap $BA, $BA
|
||||
.charmap $BB, $BB
|
||||
.charmap $BC, $BC
|
||||
.charmap $BD, $BD
|
||||
.charmap $BE, $BE
|
||||
.charmap $BF, $BF
|
||||
|
||||
.charmap $C0, $60
|
||||
.charmap $C1, $61
|
||||
.charmap $C2, $62
|
||||
.charmap $C3, $63
|
||||
.charmap $C4, $64
|
||||
.charmap $C5, $65
|
||||
.charmap $C6, $66
|
||||
.charmap $C7, $67
|
||||
.charmap $C8, $68
|
||||
.charmap $C9, $69
|
||||
.charmap $CA, $6A
|
||||
.charmap $CB, $6B
|
||||
.charmap $CC, $6C
|
||||
.charmap $CD, $6D
|
||||
.charmap $CE, $6E
|
||||
.charmap $CF, $6F
|
||||
.charmap $D0, $70
|
||||
.charmap $D1, $71
|
||||
.charmap $D2, $72
|
||||
.charmap $D3, $73
|
||||
.charmap $D4, $74
|
||||
.charmap $D5, $75
|
||||
.charmap $D6, $76
|
||||
.charmap $D7, $77
|
||||
.charmap $D8, $78
|
||||
.charmap $D9, $79
|
||||
.charmap $DA, $7A
|
||||
.charmap $DB, $7B
|
||||
.charmap $DC, $7C
|
||||
.charmap $DD, $7D
|
||||
.charmap $DE, $7E
|
||||
.charmap $DF, $7F
|
||||
|
||||
.charmap $E0, $E0
|
||||
.charmap $E1, $E1
|
||||
.charmap $E2, $E2
|
||||
.charmap $E3, $E3
|
||||
.charmap $E4, $E4
|
||||
.charmap $E5, $E5
|
||||
.charmap $E6, $E6
|
||||
.charmap $E7, $E7
|
||||
.charmap $E8, $E8
|
||||
.charmap $E9, $E9
|
||||
.charmap $EA, $EA
|
||||
.charmap $EB, $EB
|
||||
.charmap $EC, $EC
|
||||
.charmap $ED, $ED
|
||||
.charmap $EE, $EE
|
||||
.charmap $EF, $EF
|
||||
.charmap $F0, $F0
|
||||
.charmap $F1, $F1
|
||||
.charmap $F2, $F2
|
||||
.charmap $F3, $F3
|
||||
.charmap $F4, $F4
|
||||
.charmap $F5, $F5
|
||||
.charmap $F6, $F6
|
||||
.charmap $F7, $F7
|
||||
.charmap $F8, $F8
|
||||
.charmap $F9, $F9
|
||||
.charmap $FA, $FA
|
||||
.charmap $FB, $FB
|
||||
.charmap $FC, $FC
|
||||
.charmap $FD, $FD
|
||||
.charmap $FE, $FE
|
||||
.charmap $FF, $FF
|
305
asminc/cbm_screen_charmap.inc
Normal file
305
asminc/cbm_screen_charmap.inc
Normal file
|
@ -0,0 +1,305 @@
|
|||
;/*****************************************************************************/
|
||||
;/* */
|
||||
;/* cbm_screen_charmap.inc */
|
||||
;/* */
|
||||
;/* c Copyright 2019, Gerhard W. Gruber (sparhawk@gmx.at) */
|
||||
;/* */
|
||||
;/* When using CBM mode, this include converts character literals */
|
||||
;/* from ASCII to screen-code mapping, so you can write directly */
|
||||
;/* to the screen memory. */
|
||||
;/* */
|
||||
;/* If this include is used, no additional macros are needed. */
|
||||
;/* */
|
||||
;/*****************************************************************************/
|
||||
|
||||
; Char $00 -> c + 128
|
||||
.charmap $00, $80
|
||||
|
||||
; Char $01 ... $1A -> c + 128 + 64 control alphabet
|
||||
.charmap $01, $C1
|
||||
.charmap $02, $C2
|
||||
.charmap $03, $C3
|
||||
.charmap $04, $C4
|
||||
.charmap $05, $C5
|
||||
.charmap $06, $C6
|
||||
.charmap $07, $C7
|
||||
.charmap $08, $C8
|
||||
.charmap $09, $C9
|
||||
.charmap $0A, $CA
|
||||
.charmap $0B, $CB
|
||||
.charmap $0C, $CC
|
||||
.charmap $0D, $CD
|
||||
.charmap $0E, $CE
|
||||
.charmap $0F, $CF
|
||||
.charmap $10, $D0
|
||||
.charmap $11, $D1
|
||||
.charmap $12, $D2
|
||||
.charmap $13, $D3
|
||||
.charmap $14, $D4
|
||||
.charmap $15, $D5
|
||||
.charmap $16, $D6
|
||||
.charmap $17, $D7
|
||||
.charmap $18, $D8
|
||||
.charmap $19, $D9
|
||||
.charmap $1A, $DA
|
||||
|
||||
; Char $1B ... $1F -> c + 128
|
||||
.charmap $1B, $9B
|
||||
.charmap $1C, $9C
|
||||
.charmap $1D, $9D
|
||||
.charmap $1E, $9E
|
||||
.charmap $1F, $9F
|
||||
|
||||
; Char $20 ... $3F -> c
|
||||
.charmap $20, $20
|
||||
.charmap $21, $21
|
||||
.charmap $22, $22
|
||||
.charmap $23, $23
|
||||
.charmap $24, $24
|
||||
.charmap $25, $25
|
||||
.charmap $26, $26
|
||||
.charmap $27, $27
|
||||
.charmap $28, $28
|
||||
.charmap $29, $29
|
||||
.charmap $2A, $2A
|
||||
.charmap $2B, $2B
|
||||
.charmap $2C, $2C
|
||||
.charmap $2D, $2D
|
||||
.charmap $2E, $2E
|
||||
.charmap $2F, $2F
|
||||
.charmap $30, $30
|
||||
.charmap $31, $31
|
||||
.charmap $32, $32
|
||||
.charmap $33, $33
|
||||
.charmap $34, $34
|
||||
.charmap $35, $35
|
||||
.charmap $36, $36
|
||||
.charmap $37, $37
|
||||
.charmap $38, $38
|
||||
.charmap $39, $39
|
||||
.charmap $3A, $3A
|
||||
.charmap $3B, $3B
|
||||
.charmap $3C, $3C
|
||||
.charmap $3D, $3D
|
||||
.charmap $3E, $3E
|
||||
.charmap $3F, $3F
|
||||
|
||||
; Char $40 -> c - 64
|
||||
.charmap $40, $00
|
||||
|
||||
; Char $41 ... $5A -> c upper-case alphabet
|
||||
.charmap $41, $41
|
||||
.charmap $42, $42
|
||||
.charmap $43, $43
|
||||
.charmap $44, $44
|
||||
.charmap $45, $45
|
||||
.charmap $46, $46
|
||||
.charmap $47, $47
|
||||
.charmap $48, $48
|
||||
.charmap $49, $49
|
||||
.charmap $4A, $4A
|
||||
.charmap $4B, $4B
|
||||
.charmap $4C, $4C
|
||||
.charmap $4D, $4D
|
||||
.charmap $4E, $4E
|
||||
.charmap $4F, $4F
|
||||
.charmap $50, $50
|
||||
.charmap $51, $51
|
||||
.charmap $52, $52
|
||||
.charmap $53, $53
|
||||
.charmap $54, $54
|
||||
.charmap $55, $55
|
||||
.charmap $56, $56
|
||||
.charmap $57, $57
|
||||
.charmap $58, $58
|
||||
.charmap $59, $59
|
||||
.charmap $5A, $5A
|
||||
|
||||
; Char $5B ... $5F -> c - 64
|
||||
.charmap $5B, $1B
|
||||
.charmap $5C, $1C
|
||||
.charmap $5D, $1D
|
||||
.charmap $5E, $1E
|
||||
.charmap $5F, $1F
|
||||
|
||||
; Char $60 -> c - 32
|
||||
.charmap $60, $40
|
||||
|
||||
; Char $61 ... $7A -> c - 32 - 64 lower-case alphabet
|
||||
.charmap $61, $01
|
||||
.charmap $62, $02
|
||||
.charmap $63, $03
|
||||
.charmap $64, $04
|
||||
.charmap $65, $05
|
||||
.charmap $66, $06
|
||||
.charmap $67, $07
|
||||
.charmap $68, $08
|
||||
.charmap $69, $09
|
||||
.charmap $6A, $0A
|
||||
.charmap $6B, $0B
|
||||
.charmap $6C, $0C
|
||||
.charmap $6D, $0D
|
||||
.charmap $6E, $0E
|
||||
.charmap $6F, $0F
|
||||
.charmap $70, $10
|
||||
.charmap $71, $11
|
||||
.charmap $72, $12
|
||||
.charmap $73, $13
|
||||
.charmap $74, $14
|
||||
.charmap $75, $15
|
||||
.charmap $76, $16
|
||||
.charmap $77, $17
|
||||
.charmap $78, $18
|
||||
.charmap $79, $19
|
||||
.charmap $7A, $1A
|
||||
|
||||
; Char $7B ... $7F -> c - 32
|
||||
.charmap $7B, $5B
|
||||
.charmap $7C, $5C
|
||||
.charmap $7D, $5D
|
||||
.charmap $7E, $5E
|
||||
.charmap $7F, $5F
|
||||
|
||||
; Char $80 -> c + 64
|
||||
.charmap $80, $C0
|
||||
|
||||
; Char $81 ... $9A -> c control alphabet
|
||||
.charmap $81, $81
|
||||
.charmap $82, $82
|
||||
.charmap $83, $83
|
||||
.charmap $84, $84
|
||||
.charmap $85, $85
|
||||
.charmap $86, $86
|
||||
.charmap $87, $87
|
||||
.charmap $88, $88
|
||||
.charmap $89, $89
|
||||
.charmap $8A, $8A
|
||||
.charmap $8B, $8B
|
||||
.charmap $8C, $8C
|
||||
.charmap $8D, $8D
|
||||
.charmap $8E, $8E
|
||||
.charmap $8F, $8F
|
||||
.charmap $90, $90
|
||||
.charmap $91, $91
|
||||
.charmap $92, $92
|
||||
.charmap $93, $93
|
||||
.charmap $94, $94
|
||||
.charmap $95, $95
|
||||
.charmap $96, $96
|
||||
.charmap $97, $97
|
||||
.charmap $98, $98
|
||||
.charmap $99, $99
|
||||
.charmap $9A, $9A
|
||||
|
||||
; Char $9B ... $9F -> c + 64
|
||||
.charmap $9B, $DB
|
||||
.charmap $9C, $DC
|
||||
.charmap $9D, $DD
|
||||
.charmap $9E, $DE
|
||||
.charmap $9F, $DF
|
||||
|
||||
; Char $A0 ... $BF -> c - 64
|
||||
.charmap $A0, $60
|
||||
.charmap $A1, $61
|
||||
.charmap $A2, $62
|
||||
.charmap $A3, $63
|
||||
.charmap $A4, $64
|
||||
.charmap $A5, $65
|
||||
.charmap $A6, $66
|
||||
.charmap $A7, $67
|
||||
.charmap $A8, $68
|
||||
.charmap $A9, $69
|
||||
.charmap $AA, $6A
|
||||
.charmap $AB, $6B
|
||||
.charmap $AC, $6C
|
||||
.charmap $AD, $6D
|
||||
.charmap $AE, $6E
|
||||
.charmap $AF, $6F
|
||||
.charmap $B0, $70
|
||||
.charmap $B1, $71
|
||||
.charmap $B2, $72
|
||||
.charmap $B3, $73
|
||||
.charmap $B4, $74
|
||||
.charmap $B5, $75
|
||||
.charmap $B6, $76
|
||||
.charmap $B7, $77
|
||||
.charmap $B8, $78
|
||||
.charmap $B9, $79
|
||||
.charmap $BA, $7A
|
||||
.charmap $BB, $7B
|
||||
.charmap $BC, $7C
|
||||
.charmap $BD, $7D
|
||||
.charmap $BE, $7E
|
||||
.charmap $BF, $7F
|
||||
|
||||
; Char $C0 ... $DF -> c - 128
|
||||
.charmap $C0, $40
|
||||
|
||||
; Char $C1 ... $DA -> c - 128 - 64 lower-case alphabet
|
||||
.charmap $C1, $01
|
||||
.charmap $C2, $02
|
||||
.charmap $C3, $03
|
||||
.charmap $C4, $04
|
||||
.charmap $C5, $05
|
||||
.charmap $C6, $06
|
||||
.charmap $C7, $07
|
||||
.charmap $C8, $08
|
||||
.charmap $C9, $09
|
||||
.charmap $CA, $0A
|
||||
.charmap $CB, $0B
|
||||
.charmap $CC, $0C
|
||||
.charmap $CD, $0D
|
||||
.charmap $CE, $0E
|
||||
.charmap $CF, $0F
|
||||
.charmap $D0, $10
|
||||
.charmap $D1, $11
|
||||
.charmap $D2, $12
|
||||
.charmap $D3, $13
|
||||
.charmap $D4, $14
|
||||
.charmap $D5, $15
|
||||
.charmap $D6, $16
|
||||
.charmap $D7, $17
|
||||
.charmap $D8, $18
|
||||
.charmap $D9, $19
|
||||
.charmap $DA, $1A
|
||||
|
||||
; Char $DB ... $DF -> c - 128
|
||||
.charmap $DB, $5B
|
||||
.charmap $DC, $5C
|
||||
.charmap $DD, $5D
|
||||
.charmap $DE, $5E
|
||||
.charmap $DF, $5F
|
||||
|
||||
; Char $E0 ... $FF -> c - 128
|
||||
.charmap $E0, $60
|
||||
.charmap $E1, $61
|
||||
.charmap $E2, $62
|
||||
.charmap $E3, $63
|
||||
.charmap $E4, $64
|
||||
.charmap $E5, $65
|
||||
.charmap $E6, $66
|
||||
.charmap $E7, $67
|
||||
.charmap $E8, $68
|
||||
.charmap $E9, $69
|
||||
.charmap $EA, $6A
|
||||
.charmap $EB, $6B
|
||||
.charmap $EC, $6C
|
||||
.charmap $ED, $6D
|
||||
.charmap $EE, $6E
|
||||
.charmap $EF, $6F
|
||||
.charmap $F0, $70
|
||||
.charmap $F1, $71
|
||||
.charmap $F2, $72
|
||||
.charmap $F3, $73
|
||||
.charmap $F4, $74
|
||||
.charmap $F5, $75
|
||||
.charmap $F6, $76
|
||||
.charmap $F7, $77
|
||||
.charmap $F8, $78
|
||||
.charmap $F9, $79
|
||||
.charmap $FA, $7A
|
||||
.charmap $FB, $7B
|
||||
.charmap $FC, $7C
|
||||
.charmap $FD, $7D
|
||||
.charmap $FE, $7E
|
||||
.charmap $FF, $7F
|
|
@ -5,21 +5,21 @@
|
|||
;** Screen
|
||||
SCREEN_ROWS = 24
|
||||
SCREEN_COLS = 32
|
||||
SCREEN_PTR = $3A
|
||||
CURSOR_X = $3C
|
||||
CURSOR_Y = $3D
|
||||
SCREEN_PTR := $3A
|
||||
CURSOR_X := $3C
|
||||
CURSOR_Y := $3D
|
||||
|
||||
;** VDP
|
||||
VDP_DATA_R = $2000
|
||||
VDP_STATUS_R = $2001
|
||||
VDP_DATA_W = $3000
|
||||
VDP_CONTROL_W = $3001
|
||||
VDP_DATA_R := $2000
|
||||
VDP_STATUS_R := $2001
|
||||
VDP_DATA_W := $3000
|
||||
VDP_CONTROL_W := $3001
|
||||
|
||||
;** PIA
|
||||
PIA0_DATA = $1000
|
||||
PIA0_STATUS = $1001
|
||||
PIA1_DATA = $1002
|
||||
PIA1_STATUS = $1003
|
||||
PIA0_DATA := $1000
|
||||
PIA0_STATUS := $1001
|
||||
PIA1_DATA := $1002
|
||||
PIA1_STATUS := $1003
|
||||
|
||||
;** General
|
||||
CH_VLINE = 33
|
||||
|
@ -30,11 +30,11 @@ CH_LLCORNER = 37
|
|||
CH_LRCORNER = 38
|
||||
|
||||
;** I/O (Zero-page variables)
|
||||
ZP_KEYBOARD = $10
|
||||
ZP_JOY0_DIR = $11
|
||||
ZP_JOY1_DIR = $13
|
||||
ZP_JOY0_BUTTONS = $16
|
||||
ZP_JOY1_BUTTONS = $17
|
||||
ZP_KEYBOARD := $10
|
||||
ZP_JOY0_DIR := $11
|
||||
ZP_JOY1_DIR := $13
|
||||
ZP_JOY0_BUTTONS := $16
|
||||
ZP_JOY1_BUTTONS := $17
|
||||
|
||||
;** Joystick direction values (ZP_JOY0_DIR/ZP_JOY1_DIR)
|
||||
JOY_N = $49
|
||||
|
@ -54,8 +54,13 @@ JOY_WNW = $4C
|
|||
JOY_NW = $4B
|
||||
JOY_NNW = $4A
|
||||
|
||||
;** BIOS
|
||||
BIOS_IRQ1_ADDR = $FF3F
|
||||
BIOS_IRQ2_ADDR = $FF52
|
||||
BIOS_NMI_RESET_ADDR = $F808
|
||||
BIOS_WRITE_VDP_REG = $FE1F
|
||||
;** BIOS routines
|
||||
BIOS_NMI_RESET_ADDR := $F808
|
||||
BIOS_PLAY_TUNE1 := $FBD6
|
||||
BIOS_PLAY_SONG := $FBED
|
||||
BIOS_PLAY_TUNE2 := $FCE6
|
||||
BIOS_WRITE_VDP_REG := $FE1F
|
||||
BIOS_QUIET_PSG := $FE54
|
||||
BIOS_POKE_PSG := $FE77
|
||||
BIOS_IRQ1_ADDR := $FF3F
|
||||
BIOS_IRQ2_ADDR := $FF52
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2002-2003 Ullrich von Bassewitz */
|
||||
;/* Römerstrasse 52 */
|
||||
;/* Roemerstrasse 52 */
|
||||
;/* D-70794 Filderstadt */
|
||||
;/* EMail: uz@cc65.org */
|
||||
;/* */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2002-2006, Ullrich von Bassewitz */
|
||||
;/* Römerstraße 52 */
|
||||
;/* Roemerstrasse 52 */
|
||||
;/* D-70794 Filderstadt */
|
||||
;/* EMail: uz@cc65.org */
|
||||
;/* */
|
||||
|
|
|
@ -50,7 +50,6 @@ PET_2000 = $CA
|
|||
PET_3000 = $FC
|
||||
PET_4000 = $FD
|
||||
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
; Vector and other locations
|
||||
|
||||
|
@ -59,7 +58,25 @@ BRKVec := $0092
|
|||
NMIVec := $0094
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: 6522 VIA2
|
||||
; I/O: 6520 PIA1
|
||||
|
||||
PIA1 := $E810 ; PIA1 base address
|
||||
PIA1_PORTA := PIA1+$0 ; Port A (PA) and data direction register A (DDRA)
|
||||
PIA1_PACTL := PIA1+$1 ; Port A control register (CRA)
|
||||
PIA1_PORTB := PIA1+$2 ; Port B (PB) and data direction register B (DDRB)
|
||||
PIA1_PBCTL := PIA1+$3 ; Port B control register (CRB)
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: 6520 PIA2
|
||||
|
||||
PIA2 := $E820 ; PIA2 base address
|
||||
PIA2_PORTA := PIA2+$0 ; Port A (PA) and data direction register A (DDRA)
|
||||
PIA2_PACTL := PIA2+$1 ; Port A control register (CRA)
|
||||
PIA2_PORTB := PIA2+$2 ; Port B (PB) and data direction register B (DDRB)
|
||||
PIA2_PBCTL := PIA2+$3 ; Port B control register (CRB)
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O: 6522 VIA
|
||||
|
||||
VIA := $E840 ; VIA base address
|
||||
VIA_PB := VIA+$0 ; Port register B
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;* *
|
||||
;* *
|
||||
;*(C) 2003-2006, Ullrich von Bassewitz *
|
||||
;* Römerstrasse 52 *
|
||||
;* Roemerstrasse 52 *
|
||||
;* D-70794 Filderstadt *
|
||||
;*EMail: uz@cc65.org *
|
||||
;* *
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;* */
|
||||
;* */
|
||||
;* (C) 2003-2005, Ullrich von Bassewitz */
|
||||
;* Römerstrasse 52 */
|
||||
;* Roemerstrasse 52 */
|
||||
;* D-70794 Filderstadt */
|
||||
;* EMail: uz@cc65.org */
|
||||
;* */
|
||||
|
@ -44,7 +44,9 @@ EOF = -1
|
|||
.if .defined(__APPLE2__)
|
||||
FILENAME_MAX = 64+1
|
||||
.elseif .defined(__ATARI__)
|
||||
FILENAME_MAX = 12+1
|
||||
FILENAME_MAX = 63+1
|
||||
.elseif .defined(__CBM__)
|
||||
FILENAME_MAX = 255
|
||||
.elseif .defined(__LUNIX__)
|
||||
FILENAME_MAX = 80+1
|
||||
.elseif .defined(__TELESTRAT__)
|
||||
|
|
186
asminc/sym1.inc
Normal file
186
asminc/sym1.inc
Normal file
|
@ -0,0 +1,186 @@
|
|||
; ---------------------------------------------------------------------------
|
||||
;
|
||||
; SYM-1 definitions
|
||||
;
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
RAMSTART := $0200 ; Entry point
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Monitor Functions
|
||||
; ---------------------------------------------------------------------------
|
||||
WARM := $8003 ; Monitor entry
|
||||
SVNMI := $809B ; Save NMI entry
|
||||
INBYTE := $81D9 ; Get two HEX characters and pack
|
||||
ASCNIB := $8275 ; Test for carriage-return
|
||||
INCCMP := $82B2 ; Increment pointer
|
||||
CHKSAD := $82DD ; Compute checksum
|
||||
OUTPC := $82EE ; Display program counter
|
||||
OUTBYT := $82FA ; Print byte as two ASCII characters
|
||||
OUTS2 := $8319 ; Print pointer
|
||||
INSTAT := $8386 ; Determine if key is pressed
|
||||
GETKEY := $88AF ; Get key (disregarding monitor login)
|
||||
SCAND := $8906 ; Flash LED display (once)
|
||||
KEYQ := $8923 ; Test for keypress
|
||||
BEEP := $8972 ; Make a beep
|
||||
CONFIG := $89A5 ; Configure I/O
|
||||
OUTDSP := $89C1 ; Output to on-board LED display
|
||||
INCHR := $8A1B ; Input character and convert to uppercase
|
||||
OUTCHR := $8A47 ; Output character
|
||||
INTCHR := $8A58 ; Input character without case conversion
|
||||
DLYF := $8AE6 ; Delay 1 bit time
|
||||
DLYH := $8AE9 ; Delay 1/2 bit time
|
||||
RESET := $8B4A ; Hard reset
|
||||
ACCESS := $8B86 ; Unlock lowest 4K memory
|
||||
NACCES := $8B9C ; Lock lowest 4K memory
|
||||
L8C78 := $8C78 ; Link to tape
|
||||
DUMPT := $8E87 ; Dump memory to tape
|
||||
LOADT := $8C78 ; Load memory from tape
|
||||
TAPEMODE := $00FD ; Top bit on for high-speed
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; System Memory
|
||||
; ---------------------------------------------------------------------------
|
||||
DISBUF := $A640 ; On-Board Display Buffer
|
||||
DISBUF0 := $A640 ; Left-Most digit
|
||||
DISBUF1 := $A641 ; Second digit
|
||||
DISBUF2 := $A642 ; Third
|
||||
DISBUF3 := $A643 ; Fourth
|
||||
DISBUF4 := $A644 ; Fifth
|
||||
DISBUF5 := $A645 ; Sixth and right-most digit
|
||||
DISBUF6 := $A646 ; Not-used / right of display (shift buffer)
|
||||
RDIG := $A645 ; Right-most digit (same as DISBUF5)
|
||||
P3L := $A64A ; Parameter 3 (low-byte)
|
||||
P3H := $A64B ; (high-byte)
|
||||
P2L := $A64C ; Parameter 2
|
||||
P2H := $A64D ;
|
||||
P1L := $A64E ; Parameter 1
|
||||
P1H := $A64F
|
||||
PARNR := $A649 ; Number of Parameters Entered
|
||||
PADBIT := $A650 ; Pad Bits for Carriage Return
|
||||
SDBYT := $A651 ; Baud Rate for RS232 (01-4800,06-2400,10-1200,24-600,4C-300,D5-110)
|
||||
ERCNT := $A652 ; Error Count (Max FF)
|
||||
TECHO := $A653 ; Terminal Echo (bit-7=ECHO/NO, 6=CTL-O TOGGLE)
|
||||
TOUTFL := $A654 ; Output Flags (bit-7=CRT IN, 6=TTY IN, 5=TTY OUT, 4=CRT OUT)
|
||||
KSHFL := $A655 ; Keyboard Shift Flag
|
||||
TV := $A656 ; Trace Velocity (0=Single Step)
|
||||
LSTCOM := $A657 ; Last Monitor Command
|
||||
MAXRC := $A658 ; Maximum Record Length for Memory Dump
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Register Followers
|
||||
; ---------------------------------------------------------------------------
|
||||
PCLR := $A659 ; Program Counter (low-byte)
|
||||
PCHR := $A65A ; (high-byte)
|
||||
SR := $A65B ; Stack Pointer
|
||||
FR := $A65C ; Status Register Flags
|
||||
AR := $A65D ; A Register
|
||||
XR := $A65E ; X Register
|
||||
YR := $A65F ; Y Register
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O Vectors (3 bytes each)
|
||||
; ---------------------------------------------------------------------------
|
||||
INVEC := $A660 ; Input Character
|
||||
OUTVEC := $A663 ; Output Character
|
||||
INSVEC := $A666 ; Input Status
|
||||
URSVEC := $A669 ; Unrecognized Syntax
|
||||
URCVEC := $A66C ; Unrecognized Command / Error
|
||||
SCNVEC := $A66F ; Scan On-board Display
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Trace and Interrupt Vectors (2 bytes each)
|
||||
; ---------------------------------------------------------------------------
|
||||
EXEVEC := $A672 ; Exec and Alternate InVec
|
||||
TRCVEC := $A674 ; Trace
|
||||
UBRKVC := $A676 ; User Break after Monitor
|
||||
UIRQVC := $A678 ; User non-break IRQ after Monitor
|
||||
NMIVEC := $A67A ; Non-Maskable Interrupt
|
||||
RSTVEC := $A67C ; Reset
|
||||
IRQVEC := $A67E ; Interrupt Request
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; I/O Registers
|
||||
; ---------------------------------------------------------------------------
|
||||
;
|
||||
; 6532 (U27)
|
||||
;
|
||||
PADA := $A400 ; Keyboard / Display
|
||||
P3DA := $A402 ; Serial I/O
|
||||
DDPADA := $A401 ; Data-Direction Register for PADA
|
||||
DDP3DA := $A403 ; Data-Direction Register for P3DA
|
||||
WEDRTA := $A404 ; Write-Edge Detect Read Timer A
|
||||
WEDRFA := $A405 ; Write-Edge Detect Read-Int Flags A
|
||||
WEDRTB := $A406 ; Write-Edge Detect Read Timer B
|
||||
WEDRFB := $A407 ; Write-Edge Detect Read-Int Flags B
|
||||
TIM0001 := $A41C ; Timer / 1
|
||||
TIM0008 := $A41D ; Timer / 8
|
||||
TIM0064 := $A41E ; Timer / 64
|
||||
TIM1024 := $A41F ; Timer / 1024
|
||||
;
|
||||
; 6522 (U25)
|
||||
;
|
||||
OR1A := $A001 ; Input / Output Register for 1A
|
||||
DDR1A := $A003 ; Data-Direction Register for 1A
|
||||
OR1B := $A000 ; Input / Output Register for 1B
|
||||
DDR1B := $A002 ; Data-Direction Register for 1B
|
||||
TIC1L := $A004 ;
|
||||
TIC1H := $A005 ;
|
||||
TIL1L := $A006 ;
|
||||
TIL1H := $A007 ;
|
||||
T2L1L := $A008 ;
|
||||
T2C1L := $A008 ;
|
||||
T2C1H := $A009 ;
|
||||
SR1 := $A00A ;
|
||||
ACR1 := $A00B ;
|
||||
PCR1 := $A00C ;
|
||||
IFR1 := $A00D ;
|
||||
IER1 := $A00E ;
|
||||
DR1A := $A00F ;
|
||||
;
|
||||
; 6522 (U28)
|
||||
;
|
||||
OR2A := $A801 ; Input / Output Register for 2A
|
||||
DDR2A := $A803 ; Data-Direction Register for 2A
|
||||
OR2B := $A800 ; Input / Output Register for 2B
|
||||
DDR2B := $A802 ; Data-Direction Register for 2B
|
||||
TIC2L := $A804 ;
|
||||
TIC2H := $A805 ;
|
||||
TIL2L := $A806 ;
|
||||
TIL2H := $A807 ;
|
||||
T2L2L := $A808 ;
|
||||
T2C2L := $A808 ;
|
||||
T2C2H := $A809 ;
|
||||
SR2 := $A80A ;
|
||||
ACR2 := $A80B ;
|
||||
PCR2 := $A80C ;
|
||||
IFR2 := $A80D ;
|
||||
IER2 := $A80E ;
|
||||
DR2A := $A80F ;
|
||||
;
|
||||
; 6522 (U29)
|
||||
;
|
||||
OR3A := $AC01 ; Write-Protect RAM, Debug On/Off, I/O-3A
|
||||
DDR3A := $AC03 ; Data-Direction Register for 3A
|
||||
OR3B := $AC00 ; Input / Output Register for 3B
|
||||
DDR3B := $AC02 ; Data-Direction Register for 3B
|
||||
TIC3L := $AC04 ;
|
||||
TIC3H := $AC05 ;
|
||||
TIL3L := $AC06 ;
|
||||
TIL3H := $AC07 ;
|
||||
T2L3L := $AC08 ;
|
||||
T2C3L := $AC08 ;
|
||||
T2C3H := $AC09 ;
|
||||
SR3 := $AC0A ;
|
||||
ACR3 := $AC0B ;
|
||||
PCR3 := $AC0C ;
|
||||
IFR3 := $AC0D ;
|
||||
IER3 := $AC0E ;
|
||||
DR3A := $AC0F ;
|
|
@ -48,33 +48,33 @@ TR7 := $13
|
|||
|
||||
DEFAFF := $14
|
||||
|
||||
IRQSVA := $21 ; Used to save A when a BRK call occurs
|
||||
IRQSVX := $22 ; Used to save X when a BRK call occurs
|
||||
IRQSVY := $23 ; Used to save Y when a BRK call occurs
|
||||
IRQSVP := $24 ; Used to save P when a BRK call occurs
|
||||
IRQSVA := $21 ; Used to save A when a BRK call occurs
|
||||
IRQSVX := $22 ; Used to save X when a BRK call occurs
|
||||
IRQSVY := $23 ; Used to save Y when a BRK call occurs
|
||||
IRQSVP := $24 ; Used to save P when a BRK call occurs
|
||||
|
||||
ADSCR := $26
|
||||
SCRNB := $28 ; Id of the current window
|
||||
SCRNB := $28 ; Id of the current window
|
||||
|
||||
ADKBD := $2A ; Address ASCII conversion table
|
||||
ADKBD := $2A ; Address ASCII conversion table
|
||||
|
||||
|
||||
PTR_READ_DEST := $2C ; Used for XFREAD and XWRITE only in TELEMON 3.x
|
||||
PTR_READ_DEST := $2C ; Used for XFREAD and XWRITE only in TELEMON 3.x
|
||||
|
||||
ADCLK := $40 ; Address for clock display
|
||||
ADCLK := $40 ; Address for clock display
|
||||
TIMEUS := $42
|
||||
TIMEUD := $44
|
||||
TIMEUD := $44 ; Counter clock (1/10 of a second)
|
||||
|
||||
|
||||
HRSX := $46
|
||||
HRSY := $47
|
||||
|
||||
XLPRBI := $48 ; Printer flag (b7)
|
||||
XLPRBI := $48 ; Printer flag (b7)
|
||||
|
||||
HRSX40 := $49
|
||||
HRSX6 := $4A
|
||||
|
||||
ADHRS := $4B ; Hires screen address (word)
|
||||
ADHRS := $4B ; Hires screen address (word)
|
||||
|
||||
HRS1 := $4D
|
||||
HRS2 := $4F
|
||||
|
@ -275,8 +275,9 @@ XFWRITE = $3B ; Only in TELEMON 3.x write file (bank 7 of Orix
|
|||
; Clock primitive
|
||||
XRECLK = $3C ; Reset clock
|
||||
XCLCL = $3D ; Close clock
|
||||
XWRCLK = $3E ; Displays clock in the adress in A & Y registers
|
||||
XWRCLK = $3E ; Displays clock in the address in A & Y registers
|
||||
|
||||
; Sound primitives
|
||||
XSONPS = $40 ; Send data to PSG register (14 values)
|
||||
XOUPS = $42 ; Send Oups sound into PSG
|
||||
XPLAY = $43 ; Play a sound
|
||||
|
@ -284,10 +285,25 @@ XSOUND = $44
|
|||
XMUSIC = $45
|
||||
XZAP = $46 ; Send Zap sound to PSG
|
||||
XSHOOT = $47
|
||||
|
||||
; Path Management
|
||||
XGETCWD = $48 ; Get current CWD
|
||||
XPUTCWD = $49 ; Chdir
|
||||
|
||||
; File management
|
||||
XMKDIR = $4B ; Create a folder. Only available in TELEMON 3.x (bank 7 of Orix)
|
||||
|
||||
XHCHRS = $4C ; Hard copy hires
|
||||
|
||||
; File management
|
||||
XRM = $4D ; Remove a folder or a file. Only available in TELEMON 3.x (bank 7 of Orix)
|
||||
|
||||
XFWR = $4E ; Put a char on the first screen. Only available in TELEMON 3.x (bank 7 of Orix)
|
||||
XGOKBD = $52
|
||||
|
||||
; Keyboard primitives
|
||||
XALLKB = $50 ; Read Keyboard, and populate KBDCOL
|
||||
XKBDAS = $51 ; Ascii conversion
|
||||
XGOKBD = $52 ; Swap keyboard type (Qwerty, French ...)
|
||||
|
||||
; Buffer management
|
||||
XECRBU = $54 ; Write A or AY in the buffer
|
||||
|
@ -299,8 +315,27 @@ XDEFBU = $59 ; Reset all value of the buffer
|
|||
XBUSY = $5A ; Test if the buffer is empty
|
||||
|
||||
XMALLOC = $5B ; Only in TELEMON 3.x (bank 7 of Orix)
|
||||
|
||||
; RS232 primitives
|
||||
XSDUMP = $5C ; RS232 input dump
|
||||
XCONSO = $5D ; Swap screen into RS232 terminal
|
||||
XSLOAD = $5E ; Read a file from RS232
|
||||
XSSAVE = $5F ; Write a file to RS232
|
||||
|
||||
; Minitel primitives
|
||||
XMLOAD = $60 ; Read a file from Minitel
|
||||
XMSAVE = $61 ; Write a file to Minitel
|
||||
|
||||
XFREE = $62 ; Only in TELEMON 3.x (bank 7 of Orix)
|
||||
|
||||
; Next Minitel primitives
|
||||
XWCXFI = $63 ; Wait connection
|
||||
XLIGNE = $64 ;
|
||||
XDECON = $65 ; Minitel disconnection
|
||||
XMOUT = $66 ; Send a byte to minitel (from A)
|
||||
|
||||
XSOUT = $67 ; Send accumulator value (A) to RS232, available in TELEMON 2.4 & 3.x : if RS232 buffer is full, the Oric Telestrat freezes
|
||||
|
||||
XHRSSE = $8C ; Set hires position cursor
|
||||
XDRAWA = $8D ; Draw a line absolute
|
||||
XDRAWR = $8E ; Draw a line (relative)
|
||||
|
@ -324,7 +359,7 @@ PWD_PTR = $00
|
|||
|
||||
; ---------------------------------------------------------------------------
|
||||
;
|
||||
BUFTRV := $100
|
||||
BUFTRV := $100
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
|
@ -337,7 +372,7 @@ FLGTEL := $20D
|
|||
KOROM := $20E ; Used to compute the size of all rom bank. The result is store here. The value is in KB
|
||||
KORAM := $20F ; Used to compute the size of all ram bank. The result is store here. The value is in KB
|
||||
; Time management
|
||||
TIMED := $210
|
||||
TIMED := $210 ; Clock (1/10 of seconds)
|
||||
TIMES := $211
|
||||
TIMEM := $212
|
||||
TIMEH := $213
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
;/* */
|
||||
;/* */
|
||||
;/* (C) 2003 Ullrich von Bassewitz */
|
||||
;/* Römerstrasse 52 */
|
||||
;/* Roemerstrasse 52 */
|
||||
;/* D-70794 Filderstadt */
|
||||
;/* EMail: uz@cc65.org */
|
||||
;/* */
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
;
|
||||
; Vic20 generic definitions. Stolen mostly from c64.inc - Steve Schmidtke
|
||||
; VIC-20 generic definitions. Stolen mostly from c64.inc -- Steve Schmidtke
|
||||
;
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Zero page, Commodore stuff
|
||||
|
||||
|
@ -36,6 +35,8 @@ KBDREPEAT := $28a
|
|||
KBDREPEATRATE := $28b
|
||||
KBDREPEATDELAY := $28c
|
||||
|
||||
RSSTAT := $297 ; RS-232 device driver status
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Screen size
|
||||
|
||||
|
@ -89,7 +90,7 @@ VIA1_T1LH := VIA1+$7 ; Timer 1 latch, high byte
|
|||
VIA1_T2CL := VIA1+$8 ; Timer 2, low byte
|
||||
VIA1_T2CH := VIA1+$9 ; Timer 2, high byte
|
||||
VIA1_SR := VIA1+$A ; Shift register
|
||||
VIA1_CR := VIA1+$B ; Auxiliary control register
|
||||
VIA1_ACR := VIA1+$B ; Auxiliary control register
|
||||
VIA1_PCR := VIA1+$C ; Peripheral control register
|
||||
VIA1_IFR := VIA1+$D ; Interrupt flag register
|
||||
VIA1_IER := VIA1+$E ; Interrupt enable register
|
||||
|
@ -111,7 +112,7 @@ VIA2_T1LH := VIA2+$7 ; Timer 1 latch, high byte
|
|||
VIA2_T2CL := VIA2+$8 ; Timer 2, low byte
|
||||
VIA2_T2CH := VIA2+$9 ; Timer 2, high byte
|
||||
VIA2_SR := VIA2+$A ; Shift register
|
||||
VIA2_CR := VIA2+$B ; Auxiliary control register
|
||||
VIA2_ACR := VIA2+$B ; Auxiliary control register
|
||||
VIA2_PCR := VIA2+$C ; Peripheral control register
|
||||
VIA2_IFR := VIA2+$D ; Interrupt flag register
|
||||
VIA2_IER := VIA2+$E ; Interrupt enable register
|
||||
|
|
67
cfg/atari7800.cfg
Normal file
67
cfg/atari7800.cfg
Normal file
|
@ -0,0 +1,67 @@
|
|||
# Atari VCS 7800 linker configuration file for cc65
|
||||
# In order to add the a78 header to the build you can add
|
||||
# "--force-import __EXEHDR__" to the command line
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0600; # C stack
|
||||
__CARTSIZE__: type = weak, value = $8000;
|
||||
__VEC_BOTTOM__: value = $fffa, type = export;
|
||||
__VEC_SIZE__: value = $6, type = export;
|
||||
__ENCRYPT_BOTTOM__: value = $ff7a, type = export;
|
||||
__ENCRYPT_SIZE__: value = $80, type = export;
|
||||
__MEMORY_TOP__: value = __ENCRYPT_BOTTOM__, type = export;
|
||||
__INIT_SIZE__: value = 121, type = export;
|
||||
__MEMORY_INIT__: value = __MEMORY_TOP__ - __INIT_SIZE__, type = export;
|
||||
__MEMORY_BOTTOM__: value = $10000 - __CARTSIZE__, type = weak;
|
||||
__FREE_ROM_SIZE__: value = __MEMORY_INIT__ - __MEMORY_BOTTOM__, type = export;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0040, size = $00C0, type = rw;
|
||||
SP: file = "", define = yes, start = $0140, size = $00C0, type = rw;
|
||||
RAM1: file = "", define = yes, start = $1800, size = $0840, type = rw;
|
||||
RAM2: file = "", define = yes, start = $2100, size = $0040, type = rw;
|
||||
RAM3: file = "", define = yes, start = $2200, size = $0600, type = rw;
|
||||
# For emulators you also need a header file
|
||||
HEADER: file = %O, start = $0000, size = 128;
|
||||
# "Normal" cartridge rom. Multiple banks arent supported
|
||||
# by this script. You may change the rom size, but keep
|
||||
# two things in mind:
|
||||
# - start must be a multiple of $1000
|
||||
# - ROM must end at $ff79
|
||||
ROM: file = %O, define = yes, start = __MEMORY_BOTTOM__, size = __FREE_ROM_SIZE__, type = ro, fill = yes, fillval = $ff;
|
||||
ROMS: file = %O, define = yes, start = __MEMORY_INIT__, size = __INIT_SIZE__, type = ro, fill = yes, fillval = $ff;
|
||||
# Encryption stuff
|
||||
ROME: file = %O, start = __ENCRYPT_BOTTOM__, size = __ENCRYPT_SIZE__, type = ro, fill = yes, fillval = $ff;
|
||||
# Interrupt vectors
|
||||
ROMV: file = %O, start = __VEC_BOTTOM__, size = __VEC_SIZE__, type = ro, fill = yes, fillval = $ff;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||
STARTUP: load = ROMS, type = ro, define = yes;
|
||||
ONCE: load = ROMS, type = ro, define = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, define = yes, align = 256;
|
||||
DATA: load = ROM, run = RAM1, type = rw, define = yes;
|
||||
BSS: load = RAM1, type = bss, define = yes;
|
||||
VECTORS: load = ROMV, type = ro, define = yes;
|
||||
ENCRYPTION: load = ROME, type = ro define = yes;
|
||||
}
|
||||
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
segment = RODATA;
|
||||
CONDES: type = interruptor,
|
||||
label = __INTERRUPTOR_TABLE__,
|
||||
count = __INTERRUPTOR_COUNT__,
|
||||
segment = RODATA,
|
||||
import = __CALLIRQ__;
|
||||
}
|
20
cfg/c128-asm.cfg
Normal file
20
cfg/c128-asm.cfg
Normal file
|
@ -0,0 +1,20 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $1c01;
|
||||
}
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0002, size = $00FE, define = yes;
|
||||
LOADADDR: file = %O, start = %S - 2, size = $0002;
|
||||
MAIN: file = %O, start = %S, size = $D000 - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = MAIN, type = ro, optional = yes;
|
||||
CODE: load = MAIN, type = rw;
|
||||
RODATA: load = MAIN, type = ro, optional = yes;
|
||||
DATA: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, optional = yes, define = yes;
|
||||
}
|
46
cfg/sym1-32k.cfg
Normal file
46
cfg/sym1-32k.cfg
Normal file
|
@ -0,0 +1,46 @@
|
|||
# sym1-32k.cfg (32k)
|
||||
#
|
||||
# for Sym-1 with 32kb RAM
|
||||
#
|
||||
# ld65 --config sym1-32k.cfg -o <prog>.bin <prog>.o
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0200;
|
||||
CONDES: segment = STARTUP,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = STARTUP,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0200; # 512 byte program stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = %O, define = yes, start = $0000, size = $00F7;
|
||||
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
|
||||
RAM: file = %O, define = yes, start = %S, size = $8000 - %S - __STACKSIZE__;
|
||||
MONROM: file = "", define = yes, start = $8000, size = $1000;
|
||||
EXT: file = "", define = yes, start = $9000, size = $1000;
|
||||
IO: file = "", define = yes, start = $A000, size = $1000;
|
||||
RAE1: file = "", define = yes, start = $B000, size = $1000;
|
||||
BASROM: file = "", define = yes, start = $C000, size = $2000;
|
||||
RAE2: file = "", define = yes, start = $E000, size = $1000;
|
||||
TOP: file = "", define = yes, start = $F000, size = $1000;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
|
46
cfg/sym1-4k.cfg
Normal file
46
cfg/sym1-4k.cfg
Normal file
|
@ -0,0 +1,46 @@
|
|||
# sym1-4k.cfg (4k)
|
||||
#
|
||||
# for Sym-1 with 4kb RAM
|
||||
#
|
||||
# ld65 --config sym1-4k.cfg -o <prog>.bin <prog>.o
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0200;
|
||||
CONDES: segment = STARTUP,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = STARTUP,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = %O, define = yes, start = $0000, size = $00F7;
|
||||
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
|
||||
RAM: file = %O, define = yes, start = %S, size = $1000 - %S - __STACKSIZE__;
|
||||
MONROM: file = "", define = yes, start = $8000, size = $1000;
|
||||
EXT: file = "", define = yes, start = $9000, size = $1000;
|
||||
IO: file = "", define = yes, start = $A000, size = $1000;
|
||||
RAE1: file = "", define = yes, start = $B000, size = $1000;
|
||||
BASROM: file = "", define = yes, start = $C000, size = $2000;
|
||||
RAE2: file = "", define = yes, start = $E000, size = $1000;
|
||||
TOP: file = "", define = yes, start = $F000, size = $1000;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
|
46
cfg/sym1.cfg
Normal file
46
cfg/sym1.cfg
Normal file
|
@ -0,0 +1,46 @@
|
|||
# sym1-4k.cfg (4k)
|
||||
#
|
||||
# for Sym-1 with 4kb RAM
|
||||
#
|
||||
# ld65 --config sym1-4k.cfg -o <prog>.bin <prog>.o
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0200;
|
||||
CONDES: segment = STARTUP,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = STARTUP,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = %O, define = yes, start = $0000, size = $00F7;
|
||||
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
|
||||
RAM: file = %O, define = yes, start = %S, size = $1000 - %S - __STACKSIZE__;
|
||||
MONROM: file = "", define = yes, start = $8000, size = $1000;
|
||||
EXT: file = "", define = yes, start = $9000, size = $1000;
|
||||
IO: file = "", define = yes, start = $A000, size = $1000;
|
||||
RAE1: file = "", define = yes, start = $B000, size = $1000;
|
||||
BASROM: file = "", define = yes, start = $C000, size = $2000;
|
||||
RAE2: file = "", define = yes, start = $E000, size = $1000;
|
||||
TOP: file = "", define = yes, start = $F000, size = $1000;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
|
19
cfg/vic20-asm.cfg
Normal file
19
cfg/vic20-asm.cfg
Normal file
|
@ -0,0 +1,19 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $1001;
|
||||
}
|
||||
SYMBOLS {
|
||||
__LOADADDR__: type = import;
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0002, size = $001A, define = yes;
|
||||
LOADADDR: file = %O, start = $1001, size = $0002;
|
||||
MAIN: file = %O, start = %S, size = $0DF3 - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
BSS: load = MAIN, type = bss, optional = yes, define = yes;
|
||||
}
|
|
@ -33,7 +33,7 @@ more information.
|
|||
|
||||
The standard binary file format generated by the linker for the
|
||||
Apple ][ target is an <url name="AppleSingle"
|
||||
url="http://kaiser-edv.de/documents/AppleSingle_AppleDouble.pdf"> file.
|
||||
url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file.
|
||||
The default load address is $803.
|
||||
|
||||
<bf/AppleCommander 1.4.0/ or later (available at <url
|
||||
|
@ -73,7 +73,7 @@ system takes care of actually moving the code into the Language Card.
|
|||
|
||||
The amount of memory available in the Language Card for generated code depends
|
||||
on the <ref id="link-configs" name="linker configuration"> parameters. There are
|
||||
several usefull settings:
|
||||
several useful settings:
|
||||
|
||||
<descrip>
|
||||
|
||||
|
@ -281,7 +281,7 @@ AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is <tt/-p/.
|
|||
If the cc65 program can be successfully linked as system program using the linker
|
||||
configuration <ref id="apple-sys-cfg" name="apple2-system.cfg">, but
|
||||
uses the heap either explicitly or implicitly (i.e. by loading a driver) then
|
||||
the memory from $800 to $2000 can be added to the heap by calling
|
||||
the memory from $800 to $1FFF can be added to the heap by calling
|
||||
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.
|
||||
|
||||
|
||||
|
@ -370,7 +370,7 @@ The names in the parentheses denote the symbols to be used for static linking of
|
|||
In memory constrained situations the memory from $803 to $1FFF
|
||||
can be made available to a program by calling <tt/_heapadd ((void *) 0x0803, 0x17FD);/
|
||||
at the beginning of <tt/main()/. Doing so is beneficial even if the program
|
||||
doesn't use the the heap explicitly because loading the driver (and in fact
|
||||
doesn't use the heap explicitly because loading the driver (and in fact
|
||||
already opening the driver file) uses the heap implicitly.
|
||||
|
||||
</descrip><p>
|
||||
|
@ -428,8 +428,8 @@ The names in the parentheses denote the symbols to be used for static linking of
|
|||
|
||||
<tag><tt/a2.ssc.ser (a2_ssc_ser)/</tag>
|
||||
Driver for the Apple II Super Serial Card. Supports up to 19200 baud,
|
||||
hardware flow control (RTS/CTS) and interrupt driven receives. Note
|
||||
that because of the peculiarities of the 6551 chip transmits are not
|
||||
requires hardware flow control (RTS/CTS) and does interrupt driven receives.
|
||||
Note that because of the peculiarities of the 6551 chip transmits are not
|
||||
interrupt driven, and the transceiver blocks if the receiver asserts
|
||||
flow control because of a full buffer.
|
||||
|
||||
|
@ -575,15 +575,13 @@ url="ca65.html" name="assembler manual">.
|
|||
|
||||
<tag>Explanation of File Types</tag>
|
||||
|
||||
ProDOS associates a file type and an auxiliary type with each file.
|
||||
ProDOS 8 associates a file type and an auxiliary type with each file.
|
||||
These type specifications are separate from the file's name, unlike
|
||||
Windows which uses the file name's suffix (a.k.a.
|
||||
extension) to specify the file type. For example, <tt/.exe/,
|
||||
<tt/.doc/, or <tt/.bat/.
|
||||
The ProDOS low-level
|
||||
Machine-Language Interface (MLI) functions for creating and opening
|
||||
files require these types to be specified. And if they don't match
|
||||
with the file being opened, the operation may fail.
|
||||
The ProDOS 8 Machine-Language Interface (MLI) function for creating a
|
||||
file require these types to be specified.
|
||||
|
||||
In contrast, the ISO C function <tt/fopen()/ and the POSIX function
|
||||
<tt/open()/ have no parameter to specify either a file type or an
|
||||
|
@ -606,8 +604,6 @@ url="ca65.html" name="assembler manual">.
|
|||
The header file <tt/apple2_filetype.h/ also defines many values
|
||||
that can be used to set these variables. It is included in
|
||||
<tt/apple2.h/, which is in turn included in <tt/apple2enh.h/.
|
||||
So it isn't necessary to include it directly. Just
|
||||
include one of <tt/apple2.h/ or <tt/apple2enh.h/.
|
||||
|
||||
<tag>Example</tag>
|
||||
|
||||
|
@ -624,8 +620,8 @@ url="ca65.html" name="assembler manual">.
|
|||
carriage return instead of a line-feed (Linux/BSD/MacOS) or
|
||||
carriage return, line-feed pair (Windows).
|
||||
|
||||
The "sequential" text file terminology is in contrast to a
|
||||
"random-access" text file which would
|
||||
The 'sequential' text file terminology is in contrast to a
|
||||
'random-access' text file which would
|
||||
have a fixed-length, non-zero record length, so that the
|
||||
file position of any individual record can be calculated.
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ more information.
|
|||
|
||||
The standard binary file format generated by the linker for the
|
||||
enhanced Apple //e target is an <url name="AppleSingle"
|
||||
url="http://kaiser-edv.de/documents/AppleSingle_AppleDouble.pdf"> file.
|
||||
url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file.
|
||||
The default load address is $803.
|
||||
|
||||
<bf/AppleCommander 1.4.0/ or later (available at <url
|
||||
|
@ -73,7 +73,7 @@ system takes care of actually moving the code into the Language Card.
|
|||
|
||||
The amount of memory available in the Language Card for generated code depends
|
||||
on the <ref id="link-configs" name="linker configuration"> parameters. There are
|
||||
several usefull settings:
|
||||
several useful settings:
|
||||
|
||||
<descrip>
|
||||
|
||||
|
@ -281,7 +281,7 @@ AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is <tt/-p/.
|
|||
If the cc65 program can be successfully linked as system program using the linker
|
||||
configuration <ref id="apple-sys-cfg" name="apple2enh-system.cfg">, but
|
||||
uses the heap either explicitly or implicitly (i.e. by loading a driver) then
|
||||
the memory from $800 to $2000 can be added to the heap by calling
|
||||
the memory from $800 to $1FFF can be added to the heap by calling
|
||||
<tt/_heapadd ((void *) 0x0800, 0x1800);/ at the beginning of <tt/main()/.
|
||||
|
||||
|
||||
|
@ -376,7 +376,7 @@ The names in the parentheses denote the symbols to be used for static linking of
|
|||
In memory constrained situations the memory from $803 to $1FFF
|
||||
can be made available to a program by calling <tt/_heapadd ((void *) 0x0803, 0x17FD);/
|
||||
at the beginning of <tt/main()/. Doing so is beneficial even if the program
|
||||
doesn't use the the heap explicitly because loading the driver (and in fact
|
||||
doesn't use the heap explicitly because loading the driver (and in fact
|
||||
already opening the driver file) uses the heap implicitly.
|
||||
|
||||
</descrip><p>
|
||||
|
@ -428,8 +428,8 @@ The names in the parentheses denote the symbols to be used for static linking of
|
|||
|
||||
<tag><tt/a2e.ssc.ser (a2e_ssc_ser)/</tag>
|
||||
Driver for the Apple II Super Serial Card. Supports up to 19200 baud,
|
||||
hardware flow control (RTS/CTS) and interrupt driven receives. Note
|
||||
that because of the peculiarities of the 6551 chip transmits are not
|
||||
requires hardware flow control (RTS/CTS) and does interrupt driven receives.
|
||||
Note that because of the peculiarities of the 6551 chip transmits are not
|
||||
interrupt driven, and the transceiver blocks if the receiver asserts
|
||||
flow control because of a full buffer.
|
||||
|
||||
|
@ -580,15 +580,13 @@ url="ca65.html" name="assembler manual">.
|
|||
|
||||
<tag>Explanation of File Types</tag>
|
||||
|
||||
ProDOS associates a file type and an auxiliary type with each file.
|
||||
ProDOS 8 associates a file type and an auxiliary type with each file.
|
||||
These type specifications are separate from the file's name, unlike
|
||||
Windows which uses the file name's suffix (a.k.a.
|
||||
extension) to specify the file type. For example, <tt/.exe/,
|
||||
<tt/.doc/, or <tt/.bat/.
|
||||
The ProDOS low-level
|
||||
Machine-Language Interface (MLI) functions for creating and opening
|
||||
files require these types to be specified. And if they don't match
|
||||
with the file being opened, the operation may fail.
|
||||
The ProDOS 8 Machine-Language Interface (MLI) function for creating a
|
||||
file require these types to be specified.
|
||||
|
||||
In contrast, the ISO C function <tt/fopen()/ and the POSIX function
|
||||
<tt/open()/ have no parameter to specify either a file type or an
|
||||
|
@ -611,8 +609,6 @@ url="ca65.html" name="assembler manual">.
|
|||
The header file <tt/apple2_filetype.h/ also defines many values
|
||||
that can be used to set these variables. It is included in
|
||||
<tt/apple2.h/, which is in turn included in <tt/apple2enh.h/.
|
||||
So it isn't necessary to include it directly. Just
|
||||
include one of <tt/apple2.h/ or <tt/apple2enh.h/.
|
||||
|
||||
<tag>Example</tag>
|
||||
|
||||
|
@ -629,8 +625,8 @@ url="ca65.html" name="assembler manual">.
|
|||
carriage return instead of a line-feed (Linux/BSD/MacOS) or
|
||||
carriage return, line-feed pair (Windows).
|
||||
|
||||
The "sequential" text file terminology is in contrast to a
|
||||
"random-access" text file which would
|
||||
The 'sequential' text file terminology is in contrast to a
|
||||
'random-access' text file which would
|
||||
have a fixed-length, non-zero record length, so that the
|
||||
file position of any individual record can be calculated.
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ Special locations:
|
|||
The startup code rearranges the memory as follows:
|
||||
|
||||
<enum>
|
||||
<item>Sceen memory and display list are moved below the program start address.
|
||||
<item>Screen memory and display list are moved below the program start address.
|
||||
<item>The ROM is disabled, making the memory in the areas [$C000-$CFFF]
|
||||
and [$D800-$FFF9] available.
|
||||
<item>Character generator data is copied from ROM to the CHARGEN location specified in the
|
||||
|
@ -131,7 +131,7 @@ With the default load address of $2400 this gives a usable memory range o
|
|||
[$2400-$CFFF].
|
||||
|
||||
Please note that the first load chunk (which checks the system
|
||||
compatibilty and available memory) will always be loaded at
|
||||
compatibility and available memory) will always be loaded at
|
||||
$2E00, regardless of the specified start address. This address
|
||||
can only be changed by a custom linker config file.
|
||||
|
||||
|
@ -305,7 +305,7 @@ The names are the usual ones you can find in system reference manuals. Example:
|
|||
...
|
||||
</verb></tscreen>
|
||||
|
||||
Please note that memory location 762/$2FA is called "<tt/char_/" while the orignal name "<tt/char/" conflicts with the C keyword.
|
||||
Please note that memory location 762/$2FA is called "<tt/char_/" while the original name "<tt/char/" conflicts with the C keyword.
|
||||
|
||||
If you like to use the OS names and locations for the original Atari 800 operating system, please "<tt/#define OSA/" before including the
|
||||
<tt/atari.h/ header file.
|
||||
|
@ -401,7 +401,7 @@ OS.sdlst = &DisplayList;
|
|||
...
|
||||
</verb></tscreen>
|
||||
|
||||
Please inspect the <tt/_antic.h/ header file to detemine the supported
|
||||
Please inspect the <tt/_antic.h/ header file to determine the supported
|
||||
instruction names. Modifiers on instructions can be nested without need
|
||||
for an order:
|
||||
|
||||
|
@ -410,7 +410,7 @@ for an order:
|
|||
Please mind that ANTIC has memory alignment requirements for "player
|
||||
missile graphics"-data, font data, display lists and screen memory. Creation
|
||||
of a special linker configuration with appropriate aligned segments and
|
||||
switching to that segment in the c-code is usually neccessary. A more memory
|
||||
switching to that segment in the c-code is usually necessary. A more memory
|
||||
hungry solution consists in using the "<tt/posix_memalign()/" function in
|
||||
conjunction with copying your data to the allocated memory.
|
||||
|
||||
|
@ -675,9 +675,9 @@ The default callbacks definition (<tt/mouse_def_callbacks/) is an alias for the
|
|||
|
||||
<sect1>RS232 device drivers<p>
|
||||
|
||||
Currently there is one RS232 driver. It uses the R: device (therefore
|
||||
an R: driver needs to be installed) and was tested with the 850
|
||||
interface module.
|
||||
Currently there is one RS232 driver. It supports up to 9600 baud, requires hardware flow control
|
||||
(RTS/CTS) and uses the R: device (therefore an R: driver needs to be installed). It was tested
|
||||
with the 850 interface module.
|
||||
|
||||
<table>
|
||||
<tabular ca="rr">
|
||||
|
@ -726,6 +726,11 @@ for sectors 1 to 3, regardless of the type of diskette.
|
|||
The console I/O is speed optimized therefore support for XEP80 hardware
|
||||
or f80.com software is missing. Of course you may use stdio.h functions.
|
||||
|
||||
<tt/cprintf/ targets a 40 character line. On a 20-column display this has
|
||||
the unexpected effect of a blank line after your text. On such displays you can either
|
||||
use for example <tt/gotoxy(20,0)/ to target the "next" line, or you can switch to <tt/write()/
|
||||
function which does not have this side effect.
|
||||
|
||||
|
||||
<sect>Technical details<label id="techdetail"><p>
|
||||
|
||||
|
@ -1141,8 +1146,8 @@ ld65: Error: Missing memory area assignment for segment 'MAINHDR'
|
|||
</verb></tscreen>
|
||||
|
||||
The old "HEADER" memory description contained six bytes: $FFFF
|
||||
and the first and last memory addess of the program. For the "system
|
||||
check" load chunk this had to be split into two memory assigments. The
|
||||
and the first and last memory address of the program. For the "system
|
||||
check" load chunk this had to be split into two memory assignments The
|
||||
"HEADER" now only contains the $FFFF. The main program's first
|
||||
and last memory address were moved to a new segment, called "MAINHDR",
|
||||
which in the new linker config file goes into its own memory area (also
|
||||
|
@ -1170,7 +1175,7 @@ When using cl65, you can leave it out with this command line:
|
|||
cl65 -Wl -D__SYSTEM_CHECK__=1 <arguments>
|
||||
</verb></tscreen>
|
||||
|
||||
The value you assign to <tt/__SYSTEM_CHECK_/ doesn't matter. If the
|
||||
The value you assign to <tt/__SYSTEM_CHECK__/ doesn't matter. If the
|
||||
<tt/__SYSTEM_CHECK__/ symbol is defined, the load chunk won't be included.
|
||||
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ The runtime library provides a default game name which is "cc65
|
|||
compiled". To change that, one has to link a file which puts data into
|
||||
the "<tt/CARTNAME/" segment.
|
||||
|
||||
For reference, here's the default version used by the cc65 libary:
|
||||
For reference, here's the default version used by the cc65 library:
|
||||
<tscreen><verb>
|
||||
.export __CART_NAME__: absolute = 1
|
||||
.macpack atari
|
||||
|
|
157
doc/atari7800.sgml
Normal file
157
doc/atari7800.sgml
Normal file
|
@ -0,0 +1,157 @@
|
|||
<!doctype linuxdoc system>
|
||||
|
||||
<article>
|
||||
<title>Atari 7800 specific information for cc65
|
||||
<author>
|
||||
<url url="mailto:karri@sipo.fi" name="Karri Kaksonen"><newline>
|
||||
|
||||
<abstract>
|
||||
An overview over the Atari 7800 runtime system as it is implemented
|
||||
for the cc65 C compiler.
|
||||
</abstract>
|
||||
|
||||
<!-- Table of contents -->
|
||||
<toc>
|
||||
|
||||
<!-- Begin the document -->
|
||||
|
||||
<sect>Overview<p>
|
||||
|
||||
This file contains an overview of the Atari 7800 runtime system as it
|
||||
comes with the cc65 C compiler. It describes the memory layout, Atari
|
||||
7800 specific header files and any pitfalls specific to that platform.
|
||||
|
||||
<sect>Binary format<p>
|
||||
|
||||
The default binary output format generated by the linker for the Atari
|
||||
7800 target is a 48K cartridge image.
|
||||
|
||||
<sect>A78 header<p>
|
||||
|
||||
There is lots of different cart hardware available for the atari7800.
|
||||
Some carts have ROM, RAM, sound hardware, non-volatile high score chips.
|
||||
In order to know what kind of hardware the cart build requires there is
|
||||
a header file of 128 bytes in front of the binary.
|
||||
|
||||
The default build creates a cart file for a 48K rom cart without any
|
||||
extra features like the pokey audio chip or extra RAM.
|
||||
|
||||
In order to make cc65 more user friendly the build will add the a78
|
||||
header automatically. This allows you to run the binary on emulators
|
||||
and flash carts on the real console.
|
||||
|
||||
<sect>Encryption<p>
|
||||
|
||||
In order to boot the game in a mode that supports atari7800 functions
|
||||
the cart must be encrypted after the linking phase.
|
||||
There is a program called sign7800 that can be used to sign the cart.
|
||||
The encryption is not required for running the cart on emulators.
|
||||
You can also run atari2600 games without encryption.
|
||||
|
||||
<sect>Memory layout<p>
|
||||
|
||||
cc65 generated programs with the default setup can use RAM from
|
||||
from $1800 to $203f.
|
||||
The 4k RAM is then mapped to zero page area.
|
||||
$2040 to $20ff is visible as zero page.
|
||||
After that we have a vero small RAM area that is unused.
|
||||
$2100 to $213f.
|
||||
Then we mirror a second block from the RAM to become the hardware stack.
|
||||
This would be from $2140 to $21ff.
|
||||
|
||||
The C-stack starts at $2800 and it can grow down to $2200.
|
||||
|
||||
size of the system stack can be customized by defining the
|
||||
__STACKSIZE__ linker variable.
|
||||
|
||||
Special locations:
|
||||
|
||||
<descrip>
|
||||
<tag/Stack/ The C runtime stack is located at $2800 -
|
||||
__STACKSIZE__ and growing downwards.
|
||||
|
||||
<tag/Heap/ The C heap is located at $2200 and grows upwards.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
<sect>Start-up condition<p>
|
||||
|
||||
When powered-up, the Atari 7800 TIA registers contain random
|
||||
values. During the initialization phase, the start-up code needs to
|
||||
initialize the TIA registers to sound values (or else the console has
|
||||
an unpredictable behavior). In this implementation, zeros are written
|
||||
to all of TIA registers during the start-up phase.
|
||||
|
||||
Note that RIOT registers (mostly timers) are left uninitialized, as
|
||||
they don't have any consequence on the console behavior.
|
||||
|
||||
<sect>Platform specific header files<p>
|
||||
|
||||
Programs containing Atari 7800 specific code may use the
|
||||
<tt/atari7800.h/ header file.
|
||||
|
||||
The following pseudo variables declared in the <tt/atari7800.h/ header
|
||||
file allow access to the Atari 7800 TIA, MARIA & RIOT chips registers.
|
||||
|
||||
<descrip>
|
||||
|
||||
<tag><tt/TIA/</tag> The <tt/TIA/ structure allows read/write access
|
||||
to the Atari 7800 TIA chip registers. See the <tt/_tia.h/ header
|
||||
file located in the include directory for the declaration of the
|
||||
structure. Also refer to the Stella Programmer's Guide by Steve
|
||||
Wright for a detailed description of the chip and its registers.
|
||||
|
||||
<tag><tt/RIOT/</tag> The <tt/RIOT/ structure allows read/write
|
||||
access to the Atari 7800 RIOT chip registers. See the
|
||||
<tt/_riot.h/ header file located in the include directory for the
|
||||
declaration of the structure. Also refer to the Stella Programmer's
|
||||
Guide by Steve Wright for a detailed description of the chip and its
|
||||
registers.
|
||||
|
||||
<tag><tt/MARIA/</tag> The <tt/MARIA/ structure allows read/write
|
||||
access to the Atari 7800 MARIA chip registers. See the
|
||||
<tt/_maria.h/ header file located in the include directory for the
|
||||
declaration of the structure.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
||||
<sect>Loadable drivers<p>
|
||||
|
||||
There are no drivers for the Atari 7800.
|
||||
|
||||
|
||||
<sect>Limitations<p>
|
||||
|
||||
TBD
|
||||
|
||||
|
||||
<sect>Other hints<p>
|
||||
|
||||
One may write a custom linker configuration file to tune the memory
|
||||
layout of a program. See the <tt/atari7800.cfg/ file in the cfg
|
||||
directory as a starting point.
|
||||
|
||||
|
||||
<sect>License<p>
|
||||
|
||||
This software is provided 'as-is', without any expressed or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
<enum>
|
||||
<item> The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
<item> Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
<item> This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
</enum>
|
||||
|
||||
</article>
|
|
@ -176,10 +176,11 @@ No mouse drivers are currently available for the Atmos.
|
|||
|
||||
<tag><tt/atmos-acia.ser (atmos_acia_ser)/</tag>
|
||||
Driver for the Telestrat integrated serial controller and the Atmos with a
|
||||
serial add-on.
|
||||
Note that, because of the peculiarities of the 6551 chip, together with the
|
||||
use of the NMI, transmits are not interrupt driven; and, the transceiver
|
||||
blocks if the receiver asserts flow control because of a full buffer.
|
||||
serial add-on. Supports up to 19200 baud, requires hardware flow control
|
||||
(RTS/CTS) and does interrupt driven receives. Note that, because of the
|
||||
peculiarities of the 6551 chip, together with the use of the NMI, transmits
|
||||
are not interrupt driven; and, the transceiver blocks if the receiver
|
||||
asserts flow control because of a full buffer.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
|
|
@ -324,9 +324,9 @@ The default drivers, <tt/mouse_stddrv (mouse_static_stddrv)/, point to <tt/c128-
|
|||
<descrip>
|
||||
|
||||
<tag><tt/c128-swlink.ser (c128_swlink_ser)/</tag>
|
||||
Driver for the SwiftLink cartridge. Supports up to 38400 BPS, hardware flow
|
||||
control (RTS/CTS), and interrupt-driven receives. Note that, because of the
|
||||
peculiarities of the 6551 chip, together with the use of the NMI, transmits
|
||||
Driver for the SwiftLink cartridge. Supports up to 38400 baud, requires hardware
|
||||
flow control (RTS/CTS) and does interrupt driven receives. Note that, because of
|
||||
the peculiarities of the 6551 chip, together with the use of the NMI, transmits
|
||||
are not interrupt driven; and, the transceiver blocks if the receiver asserts
|
||||
flow control because of a full buffer.
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ and $FF3F.
|
|||
In memory constrained situations the memory from $400 to $7FF
|
||||
can be made available to a program by calling <tt/_heapadd ((void *) 0x0400, 0x0400);/
|
||||
at the beginning of <tt/main()/. Doing so is beneficial even if the program
|
||||
doesn't use the the heap explicitly because loading a driver uses the heap implicitly.
|
||||
doesn't use the heap explicitly because loading a driver uses the heap implicitly.
|
||||
|
||||
Using <tt/c64-soft80.o/ is as simple as placing it on the linker command
|
||||
line like this:
|
||||
|
@ -410,9 +410,9 @@ The default drivers, <tt/mouse_stddrv (mouse_static_stddrv)/, point to <tt/c64-1
|
|||
<descrip>
|
||||
|
||||
<tag><tt/c64-swlink.ser (c64_swlink_ser)/</tag>
|
||||
Driver for the SwiftLink cartridge. Supports up to 38400 BPS, hardware flow
|
||||
control (RTS/CTS), and interrupt-driven receives. Note that, because of the
|
||||
peculiarities of the 6551 chip, together with the use of the NMI, transmits
|
||||
Driver for the SwiftLink cartridge. Supports up to 38400 baud, requires hardware
|
||||
flow control (RTS/CTS) and does interrupt driven receives. Note that, because of
|
||||
the peculiarities of the 6551 chip, together with the use of the NMI, transmits
|
||||
are not interrupt driven; and, the transceiver blocks if the receiver asserts
|
||||
flow control because of a full buffer.
|
||||
|
||||
|
|
300
doc/ca65.sgml
300
doc/ca65.sgml
|
@ -301,7 +301,7 @@ Here is a description of all the command line options:
|
|||
compiler, see there for a list.
|
||||
|
||||
Depending on the target, the default CPU type is also set. This can be
|
||||
overriden by using the <tt/<ref id="option--cpu" name="--cpu">/ option.
|
||||
overridden by using the <tt/<ref id="option--cpu" name="--cpu">/ option.
|
||||
|
||||
|
||||
<label id="option-v">
|
||||
|
@ -1353,15 +1353,15 @@ writable.
|
|||
|
||||
<sect>Pseudo functions<label id="pseudo-functions"><p>
|
||||
|
||||
Pseudo functions expect their arguments in parenthesis, and they have a result,
|
||||
either a string or an expression.
|
||||
Pseudo functions expect their arguments in parentheses, and they have a result,
|
||||
either a string or an expression value.
|
||||
|
||||
|
||||
<sect1><tt>.ADDRSIZE</tt><label id=".ADDRSIZE"><p>
|
||||
|
||||
The <tt/.ADDRSIZE/ function is used to return the interal address size
|
||||
The <tt/.ADDRSIZE/ function is used to return the internal address size
|
||||
associated with a symbol. This can be helpful in macros when knowing the address
|
||||
size of symbol can help with custom instructions.
|
||||
size of a symbol can help with custom instructions.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1389,7 +1389,7 @@ either a string or an expression.
|
|||
<sect1><tt>.BANK</tt><label id=".BANK"><p>
|
||||
|
||||
The <tt/.BANK/ function is used to support systems with banked memory. The
|
||||
argument is an expression with exactly one segment reference - usually a
|
||||
argument is an expression with exactly one segment reference -- usually a
|
||||
label. The function result is the value of the <tt/bank/ attribute assigned
|
||||
to the run memory area of the segment. Please see the linker documentation
|
||||
for more information about memory areas and their attributes.
|
||||
|
@ -1397,13 +1397,13 @@ either a string or an expression.
|
|||
The value of <tt/.BANK/ can be used to switch memory so that a memory bank
|
||||
containing specific data is available.
|
||||
|
||||
The <tt/bank/ attribute is a 32 bit integer and so is the result of the
|
||||
The <tt/bank/ attribute is a 32-bit integer, and so is the result of the
|
||||
<tt/.BANK/ function. You will have to use <tt><ref id=".LOBYTE"
|
||||
name=".LOBYTE"></tt> or similar functions to address just part of it.
|
||||
|
||||
Please note that <tt/.BANK/ will always get evaluated in the link stage, so
|
||||
an expression containing <tt/.BANK/ can never be used where a constant known
|
||||
result is expected (for example with <tt/.RES/).
|
||||
Please note that <tt/.BANK/ always will get evaluated in the link stage, so
|
||||
an expression containing <tt/.BANK/ never can be used where a constant, known
|
||||
result is expected (for example, with <tt/.RES/).
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1440,7 +1440,7 @@ either a string or an expression.
|
|||
|
||||
<sect1><tt>.BLANK</tt><label id=".BLANK"><p>
|
||||
|
||||
Builtin function. The function evaluates its argument in braces and yields
|
||||
Builtin function. The function evaluates its argument in parentheses and yields
|
||||
"false" if the argument is non blank (there is an argument), and "true" if
|
||||
there is no argument. The token list that makes up the function argument
|
||||
may optionally be enclosed in curly braces. This allows the inclusion of
|
||||
|
@ -1479,7 +1479,7 @@ either a string or an expression.
|
|||
|
||||
<sect1><tt>.CONST</tt><label id=".CONST"><p>
|
||||
|
||||
Builtin function. The function evaluates its argument in braces and
|
||||
Builtin function. The function evaluates its argument in parentheses and
|
||||
yields "true" if the argument is a constant expression (that is, an
|
||||
expression that yields a constant value at assembly time) and "false"
|
||||
otherwise. As an example, the .IFCONST statement may be replaced by
|
||||
|
@ -1489,6 +1489,41 @@ either a string or an expression.
|
|||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.DEF, .DEFINED</tt><label id=".DEFINED"><p>
|
||||
|
||||
Builtin function. The function expects an identifier as argument in parentheses.
|
||||
The argument is evaluated, and the function yields "true" if the identifier
|
||||
is a symbol that already is defined somewhere in the source file up to the
|
||||
current position. Otherwise, the function yields false. As an example, the
|
||||
<tt><ref id=".IFDEF" name=".IFDEF"></tt> statement may be replaced by
|
||||
|
||||
<tscreen><verb>
|
||||
.if .defined(a)
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.DEFINEDMACRO</tt><label id=".DEFINEDMACRO"><p>
|
||||
|
||||
Builtin function. The function expects an identifier as argument in parentheses.
|
||||
The argument is evaluated, and the function yields "true" if the identifier
|
||||
already has been defined as the name of a macro. Otherwise, the function yields
|
||||
false. Example:
|
||||
|
||||
<tscreen><verb>
|
||||
.macro add foo
|
||||
clc
|
||||
adc foo
|
||||
.endmacro
|
||||
|
||||
.if .definedmacro(add)
|
||||
add #$01
|
||||
.else
|
||||
clc
|
||||
adc #$01
|
||||
.endif
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.HIBYTE</tt><label id=".HIBYTE"><p>
|
||||
|
||||
The function returns the high byte (that is, bits 8-15) of its argument.
|
||||
|
@ -1525,6 +1560,23 @@ either a string or an expression.
|
|||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.ISMNEM, .ISMNEMONIC</tt><label id=".ISMNEMONIC"><p>
|
||||
|
||||
Builtin function. The function expects an identifier as argument in parentheses.
|
||||
The argument is evaluated, and the function yields "true" if the identifier
|
||||
is defined as an instruction mnemonic that is recognized by the assembler.
|
||||
Example:
|
||||
|
||||
<tscreen><verb>
|
||||
.if .not .ismnemonic(ina)
|
||||
.macro ina
|
||||
clc
|
||||
adc #$01
|
||||
.endmacro
|
||||
.endif
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.LEFT</tt><label id=".LEFT"><p>
|
||||
|
||||
Builtin function. Extracts the left part of a given token list.
|
||||
|
@ -1719,7 +1771,7 @@ either a string or an expression.
|
|||
|
||||
<sect1><tt>.REF, .REFERENCED</tt><label id=".REFERENCED"><p>
|
||||
|
||||
Builtin function. The function expects an identifier as argument in braces.
|
||||
Builtin function. The function expects an identifier as argument in parentheses.
|
||||
The argument is evaluated, and the function yields "true" if the identifier
|
||||
is a symbol that has already been referenced somewhere in the source file up
|
||||
to the current position. Otherwise the function yields false. As an example,
|
||||
|
@ -1826,24 +1878,6 @@ either a string or an expression.
|
|||
</descrip>
|
||||
|
||||
|
||||
<sect1><tt>.STRAT</tt><label id=".STRAT"><p>
|
||||
|
||||
Builtin function. The function accepts a string and an index as
|
||||
arguments and returns the value of the character at the given position
|
||||
as an integer value. The index is zero based.
|
||||
|
||||
Example:
|
||||
|
||||
<tscreen><verb>
|
||||
.macro M Arg
|
||||
; Check if the argument string starts with '#'
|
||||
.if (.strat (Arg, 0) = '#')
|
||||
...
|
||||
.endif
|
||||
.endmacro
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.SPRINTF</tt><label id=".SPRINTF"><p>
|
||||
|
||||
Builtin function. It expects a format string as first argument. The number
|
||||
|
@ -1863,9 +1897,27 @@ either a string or an expression.
|
|||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.STRAT</tt><label id=".STRAT"><p>
|
||||
|
||||
Builtin function. The function accepts a string and an index as
|
||||
arguments and returns the value of the character at the given position
|
||||
as an integer value. The index is zero based.
|
||||
|
||||
Example:
|
||||
|
||||
<tscreen><verb>
|
||||
.macro M Arg
|
||||
; Check if the argument string starts with '#'
|
||||
.if (.strat (Arg, 0) = '#')
|
||||
...
|
||||
.endif
|
||||
.endmacro
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.STRING</tt><label id=".STRING"><p>
|
||||
|
||||
Builtin function. The function accepts an argument in braces and converts
|
||||
Builtin function. The function accepts an argument in parentheses and converts
|
||||
this argument into a string constant. The argument may be an identifier, or
|
||||
a constant numeric value.
|
||||
|
||||
|
@ -1884,7 +1936,7 @@ either a string or an expression.
|
|||
|
||||
<sect1><tt>.STRLEN</tt><label id=".STRLEN"><p>
|
||||
|
||||
Builtin function. The function accepts a string argument in braces and
|
||||
Builtin function. The function accepts a string argument in parentheses and
|
||||
evaluates to the length of the string.
|
||||
|
||||
Example:
|
||||
|
@ -1901,7 +1953,7 @@ either a string or an expression.
|
|||
|
||||
<sect1><tt>.TCOUNT</tt><label id=".TCOUNT"><p>
|
||||
|
||||
Builtin function. The function accepts a token list in braces. The function
|
||||
Builtin function. The function accepts a token list in parentheses. The function
|
||||
result is the number of tokens given as argument. The token list may
|
||||
optionally be enclosed into curly braces which are not considered part of
|
||||
the list and not counted. Enclosement in curly braces allows the inclusion
|
||||
|
@ -2084,7 +2136,11 @@ Here's a list of all control commands and a description, what they do:
|
|||
|
||||
This will put the string "Hello world" followed by a binary zero into
|
||||
the current segment. There may be more strings separated by commas, but
|
||||
the binary zero is only appended once (after the last one).
|
||||
the binary zero is only appended once (after the last one). Strings will
|
||||
be translated using the current character mapping definition.
|
||||
|
||||
See: <tt><ref id=".BYTE" name=".BYTE"></tt>,<tt><ref id=".CHARMAP" name=".CHARMAP"></tt>,
|
||||
<tt><ref id=".LITERAL" name=".LITERAL"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.ASSERT</tt><label id=".ASSERT"><p>
|
||||
|
@ -2180,7 +2236,8 @@ Here's a list of all control commands and a description, what they do:
|
|||
<sect1><tt>.BYT, .BYTE</tt><label id=".BYTE"><p>
|
||||
|
||||
Define byte sized data. Must be followed by a sequence of (byte ranged)
|
||||
expressions or strings.
|
||||
expressions or strings. Strings will be translated using the current
|
||||
character mapping definition.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -2189,6 +2246,9 @@ Here's a list of all control commands and a description, what they do:
|
|||
.byt "world", $0D, $00
|
||||
</verb></tscreen>
|
||||
|
||||
See: <tt><ref id=".ASCIIZ" name=".ASCIIZ"></tt>,<tt><ref id=".CHARMAP" name=".CHARMAP"></tt>
|
||||
<tt><ref id=".LITERAL" name=".LITERAL"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.CASE</tt><label id=".CASE"><p>
|
||||
|
||||
|
@ -2207,8 +2267,10 @@ Here's a list of all control commands and a description, what they do:
|
|||
|
||||
<sect1><tt>.CHARMAP</tt><label id=".CHARMAP"><p>
|
||||
|
||||
Apply a custom mapping for characters. The command is followed by two
|
||||
numbers. The first one is the index of the source character (range 0..255);
|
||||
Apply a custom mapping for characters for the commands <tt><ref id=".ASCIIZ"
|
||||
name=".ASCIIZ"></tt> and <tt><ref id=".BYTE" name=".BYTE"></tt>. The command
|
||||
is followed by two numbers. The first one is the index of the source character
|
||||
(range 0..255);
|
||||
the second one is the mapping (range 0..255). The mapping applies to all
|
||||
character and string constants <em/when/ they generate output; and, overrides
|
||||
a mapping table specified with the <tt><ref id="option-t" name="-t"></tt>
|
||||
|
@ -2356,7 +2418,7 @@ Here's a list of all control commands and a description, what they do:
|
|||
|
||||
Start a define style macro definition. The command is followed by an
|
||||
identifier (the macro name) and optionally by a list of formal arguments
|
||||
in braces.
|
||||
in parentheses.
|
||||
|
||||
Please note that <tt/.DEFINE/ shares most disadvantages with its C
|
||||
counterpart, so the general advice is, <bf/NOT/ do use <tt/.DEFINE/ if you
|
||||
|
@ -2380,41 +2442,6 @@ Here's a list of all control commands and a description, what they do:
|
|||
See also section <ref id="macros" name="Macros">.
|
||||
|
||||
|
||||
<sect1><tt>.DEF, .DEFINED</tt><label id=".DEFINED"><p>
|
||||
|
||||
Builtin function. The function expects an identifier as argument in braces.
|
||||
The argument is evaluated, and the function yields "true" if the identifier
|
||||
is a symbol that is already defined somewhere in the source file up to the
|
||||
current position. Otherwise the function yields false. As an example, the
|
||||
<tt><ref id=".IFDEF" name=".IFDEF"></tt> statement may be replaced by
|
||||
|
||||
<tscreen><verb>
|
||||
.if .defined(a)
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.DEFINEDMACRO</tt><label id=".DEFINEDMACRO"><p>
|
||||
|
||||
Builtin function. The function expects an identifier as argument in braces.
|
||||
The argument is evaluated, and the function yields "true" if the identifier
|
||||
has already been defined as the name of a macro. Otherwise the function yields
|
||||
false. Example:
|
||||
|
||||
<tscreen><verb>
|
||||
.macro add foo
|
||||
clc
|
||||
adc foo
|
||||
.endmacro
|
||||
|
||||
.if .definedmacro(add)
|
||||
add #$01
|
||||
.else
|
||||
clc
|
||||
adc #$01
|
||||
.endif
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.DESTRUCTOR</tt><label id=".DESTRUCTOR"><p>
|
||||
|
||||
Export a symbol and mark it as a module destructor. This may be used
|
||||
|
@ -3081,7 +3108,7 @@ Here's a list of all control commands and a description, what they do:
|
|||
<sect1><tt>.IFDEF</tt><label id=".IFDEF"><p>
|
||||
|
||||
Conditional assembly: Check if a symbol is defined. Must be followed by
|
||||
a symbol name. The condition is true if the the given symbol is already
|
||||
a symbol name. The condition is true if the given symbol is already
|
||||
defined, and false otherwise.
|
||||
|
||||
See also: <tt><ref id=".DEFINED" name=".DEFINED"></tt>
|
||||
|
@ -3116,7 +3143,7 @@ Here's a list of all control commands and a description, what they do:
|
|||
<sect1><tt>.IFNDEF</tt><label id=".IFNDEF"><p>
|
||||
|
||||
Conditional assembly: Check if a symbol is defined. Must be followed by
|
||||
a symbol name. The condition is true if the the given symbol is not
|
||||
a symbol name. The condition is true if the given symbol is not
|
||||
defined, and false otherwise.
|
||||
|
||||
See also: <tt><ref id=".DEFINED" name=".DEFINED"></tt>
|
||||
|
@ -3125,7 +3152,7 @@ Here's a list of all control commands and a description, what they do:
|
|||
<sect1><tt>.IFNREF</tt><label id=".IFNREF"><p>
|
||||
|
||||
Conditional assembly: Check if a symbol is referenced. Must be followed
|
||||
by a symbol name. The condition is true if if the the given symbol was
|
||||
by a symbol name. The condition is true if the given symbol was
|
||||
not referenced before, and false otherwise.
|
||||
|
||||
See also: <tt><ref id=".REFERENCED" name=".REFERENCED"></tt>
|
||||
|
@ -3170,7 +3197,7 @@ Here's a list of all control commands and a description, what they do:
|
|||
<sect1><tt>.IFREF</tt><label id=".IFREF"><p>
|
||||
|
||||
Conditional assembly: Check if a symbol is referenced. Must be followed
|
||||
by a symbol name. The condition is true if if the the given symbol was
|
||||
by a symbol name. The condition is true if the given symbol was
|
||||
referenced before, and false otherwise.
|
||||
|
||||
This command may be used to build subroutine libraries in include files
|
||||
|
@ -3186,7 +3213,8 @@ Here's a list of all control commands and a description, what they do:
|
|||
.endif
|
||||
</verb></tscreen>
|
||||
|
||||
See also: <tt><ref id=".REFERENCED" name=".REFERENCED"></tt>
|
||||
See also: <tt><ref id=".REFERENCED" name=".REFERENCED"></tt>, and
|
||||
<tt><ref id=".REFERTO" name=".REFERTO"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.IMPORT</tt><label id=".IMPORT"><p>
|
||||
|
@ -3284,23 +3312,6 @@ Here's a list of all control commands and a description, what they do:
|
|||
the feature in more detail.
|
||||
|
||||
|
||||
<sect1><tt>.ISMNEM, .ISMNEMONIC</tt><label id=".ISMNEMONIC"><p>
|
||||
|
||||
Builtin function. The function expects an identifier as argument in braces.
|
||||
The argument is evaluated, and the function yields "true" if the identifier
|
||||
is defined as an instruction mnemonic that is recognized by the assembler.
|
||||
Example:
|
||||
|
||||
<tscreen><verb>
|
||||
.if .not .ismnemonic(ina)
|
||||
.macro ina
|
||||
clc
|
||||
adc #$01
|
||||
.endmacro
|
||||
.endif
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.LINECONT</tt><label id=".LINECONT"><p>
|
||||
|
||||
Switch on or off line continuations using the backslash character
|
||||
|
@ -3356,6 +3367,22 @@ Here's a list of all control commands and a description, what they do:
|
|||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.LITERAL</tt><label id=".LITERAL"><p>
|
||||
|
||||
Define byte sized data. Must be followed by a sequence of (byte ranged)
|
||||
expressions or strings. Strings will disregard the current character
|
||||
mapping definition and will be interpreted literally.
|
||||
|
||||
Example:
|
||||
|
||||
<tscreen><verb>
|
||||
.literal "Hello "
|
||||
.literal "world", $0D, $00
|
||||
</verb></tscreen>
|
||||
|
||||
See: <tt><ref id=".ASCIIZ" name=".ASCIIZ"></tt>,<tt><ref id=".BYTE" name=".BYTE"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.LOBYTES</tt><label id=".LOBYTES"><p>
|
||||
|
||||
Define byte sized data by extracting only the low byte (that is, bits 0-7) from
|
||||
|
@ -3601,6 +3628,21 @@ Here's a list of all control commands and a description, what they do:
|
|||
See: <tt><ref id=".P02" name=".P02"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.POPCHARMAP</tt><label id=".POPCHARMAP"><p>
|
||||
|
||||
Pop the last character mapping from the stack, and activate it.
|
||||
|
||||
This command will switch back to the character mapping that was last pushed onto the
|
||||
character mapping stack using the <tt><ref id=".PUSHCHARMAP" name=".PUSHCHARMAP"></tt>
|
||||
command, and remove this entry from the stack.
|
||||
|
||||
The assembler will print an error message if the mappting stack is empty when
|
||||
this command is issued.
|
||||
|
||||
See: <tt><ref id=".CHARMAP" name=".CHARMAP"></tt>, <tt><ref id=".PUSHCHARMAP"
|
||||
name=".PUSHCHARMAP"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.POPCPU</tt><label id=".POPCPU"><p>
|
||||
|
||||
Pop the last CPU setting from the stack, and activate it.
|
||||
|
@ -3675,6 +3717,22 @@ Here's a list of all control commands and a description, what they do:
|
|||
<tt><ref id=".P4510" name=".P4510"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.PUSHCHARMAP</tt><label id=".PUSHCHARMAP"><p>
|
||||
|
||||
Push the currently active character mapping onto a stack. The stack has a size of 16
|
||||
entries.
|
||||
|
||||
<tt/.PUSHCHARMAP/ allows together with <tt><ref id=".POPCHARMAP"
|
||||
name=".POPCHARMAP"></tt> to switch to another character mapping and to restore the old
|
||||
character mapping later, without knowledge of the current mapping.
|
||||
|
||||
The assembler will print an error message if the character mapping stack is already full,
|
||||
when this command is issued.
|
||||
|
||||
See: <tt><ref id=".CHARMAP" name=".CHARMAP"></tt>, <tt><ref id=".POPCHARMAP"
|
||||
name=".POPCHARMAP"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.PUSHCPU</tt><label id=".PUSHCPU"><p>
|
||||
|
||||
Push the currently active CPU onto a stack. The stack has a size of 8
|
||||
|
@ -3707,6 +3765,46 @@ Here's a list of all control commands and a description, what they do:
|
|||
See: <tt><ref id=".POPSEG" name=".POPSEG"></tt>
|
||||
|
||||
|
||||
<sect1><tt>.REFERTO, .REFTO</tt><label id=".REFERTO"><p>
|
||||
|
||||
Mark a symbol as referenced.
|
||||
|
||||
It is useful in combination with the <tt><ref id=".IFREF" name=".IFREF"></tt>
|
||||
command. A subroutine with two entry points can be created. When the first
|
||||
entry point is called, it sets some default value as an argument, and falls
|
||||
through into the second entry point. <tt>.REFERTO</tt> helps to ensure that
|
||||
the second part is included into binary when only the first entry point is
|
||||
actually used from the code.
|
||||
|
||||
Example:
|
||||
|
||||
<tscreen><verb>
|
||||
.ifref NegateValue ; If this subroutine is used
|
||||
NegateValue: ; Define it
|
||||
lda #0
|
||||
sec
|
||||
sbc Value
|
||||
.ifref ResetValue ; If the ResetValue is also used
|
||||
jmp SetValue ; Jump over it
|
||||
.else
|
||||
.refto SetValue ; Ensure that SetValue will be included
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.ifref ResetValue ; If this subroutine is used
|
||||
ResetValue: ; Define it
|
||||
lda #0 ; Set a default value
|
||||
.refto SetValue ; Ensure that SetValue will be included
|
||||
.endif
|
||||
|
||||
.ifref SetValue ; If this or previous subroutine is used
|
||||
SetValue:
|
||||
sta Value
|
||||
rts
|
||||
.endif
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1><tt>.RELOC</tt><label id=".RELOC"><p>
|
||||
|
||||
Switch back to relocatable mode. See the <tt><ref id=".ORG"
|
||||
|
@ -4342,8 +4440,8 @@ different:
|
|||
For this macro type, the number of actual parameters must match
|
||||
exactly the number of formal parameters.
|
||||
|
||||
To make this possible, formal parameters are enclosed in braces when
|
||||
defining the macro. If there are no parameters, the empty braces may
|
||||
To make this possible, formal parameters are enclosed in parentheses when
|
||||
defining the macro. If there are no parameters, the empty parentheses may
|
||||
be omitted.
|
||||
|
||||
<item> Since <tt><ref id=".DEFINE" name=".DEFINE"></tt> style macros may not
|
||||
|
@ -4393,8 +4491,8 @@ Macros with parameters may also be useful:
|
|||
|
||||
Note that, while formal parameters have to be placed in parentheses,
|
||||
the actual argument used when invoking the macro should not be.
|
||||
The invoked arguments are separated by commas only, if parentheses are
|
||||
used by accident they will become part of the replaced token.
|
||||
The invoked arguments are separated by commas only; if parentheses are
|
||||
used by accident, they will become part of the replaced token.
|
||||
|
||||
If you wish to have an expression follow the macro invocation, the
|
||||
last parameter can be enclosed in curly braces {} to indicate the end of that
|
||||
|
@ -4665,6 +4763,7 @@ compiler, depending on the target system selected:
|
|||
<item><tt/__APPLE2ENH__/ - Target system is <tt/apple2enh/
|
||||
<item><tt/__ATARI2600__/ - Target system is <tt/atari2600/
|
||||
<item><tt/__ATARI5200__/ - Target system is <tt/atari5200/
|
||||
<item><tt/__ATARI7800__/ - Target system is <tt/atari7800/
|
||||
<item><tt/__ATARI__/ - Target system is <tt/atari/ or <tt/atarixl/
|
||||
<item><tt/__ATARIXL__/ - Target system is <tt/atarixl/
|
||||
<item><tt/__ATMOS__/ - Target system is <tt/atmos/
|
||||
|
@ -4688,6 +4787,7 @@ compiler, depending on the target system selected:
|
|||
<item><tt/__SIM6502__/ - Target system is <tt/sim6502/
|
||||
<item><tt/__SIM65C02__/ - Target system is <tt/sim65c02/
|
||||
<item><tt/__SUPERVISION__/ - Target system is <tt/supervision/
|
||||
<item><tt/__SYM1__/ - Target system is <tt/sym1/
|
||||
<item><tt/__VIC20__/ - Target system is <tt/vic20/
|
||||
</itemize>
|
||||
|
||||
|
|
|
@ -231,10 +231,10 @@ The default drivers, <tt/mouse_stddrv (mouse_static_stddrv)/, point to <tt/cbm51
|
|||
|
||||
<tag><tt/cbm510-std.ser (cbm510_std_ser)/</tag>
|
||||
Driver for the 6551 ACIA chip built into the Commodore 510. Supports up to
|
||||
19200 BPS, hardware flow control (RTS/CTS), and interrupt-driven receives.
|
||||
Note that, because of the peculiarities of the 6551 chip, transmits are not
|
||||
interrupt driven; and, the transceiver blocks if the receiver asserts flow
|
||||
control because of a full buffer.
|
||||
19200 baud, requires hardware flow control (RTS/CTS) and does interrupt driven
|
||||
receives. Note that, because of the peculiarities of the 6551 chip, transmits
|
||||
are not interrupt driven; and, the transceiver blocks if the receiver asserts
|
||||
flow control because of a full buffer.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
|
|
@ -212,10 +212,10 @@ No mouse drivers are currently available for the Commodore 610.
|
|||
|
||||
<tag><tt/cbm610-std.ser (cbm610_std_ser)/</tag>
|
||||
Driver for the 6551 ACIA chip built into the Commodore 610. Supports up to
|
||||
19200 BPS, hardware flow control (RTS/CTS), and interrupt-driven receives.
|
||||
Note that, because of the peculiarities of the 6551 chip, transmits are not
|
||||
interrupt driven; and, the transceiver blocks if the receiver asserts flow
|
||||
control because of a full buffer.
|
||||
19200 baud, requires hardware flow control (RTS/CTS) and does interrupt driven
|
||||
receives. Note that, because of the peculiarities of the 6551 chip, transmits
|
||||
are not interrupt driven; and, the transceiver blocks if the receiver asserts
|
||||
flow control because of a full buffer.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
|
|
212
doc/cc65.sgml
212
doc/cc65.sgml
|
@ -198,6 +198,189 @@ Here is a description of all the command line options:
|
|||
Enables debug mode, for debugging the behavior of cc65.
|
||||
|
||||
|
||||
<tag><tt>--debug-tables name</tt></tag>
|
||||
|
||||
Writes symbol table information to a file, which includes details on structs, unions
|
||||
functions, and global variables. For example, given the following code:
|
||||
|
||||
<tscreen><verb>
|
||||
struct l {
|
||||
unsigned char m;
|
||||
unsigned char n;
|
||||
};
|
||||
|
||||
struct hello {
|
||||
unsigned char j;
|
||||
unsigned char k;
|
||||
struct l l;
|
||||
};
|
||||
|
||||
struct sub {
|
||||
unsigned char x;
|
||||
unsigned char y;
|
||||
};
|
||||
|
||||
union xy {
|
||||
struct sub xy;
|
||||
unsigned int mem;
|
||||
};
|
||||
|
||||
typedef struct hello thingy;
|
||||
|
||||
unsigned char single;
|
||||
|
||||
unsigned char test_local_vars_main(void) {
|
||||
static unsigned char wahoo;
|
||||
static unsigned char bonanza = 0x42;
|
||||
unsigned char i;
|
||||
unsigned int j;
|
||||
unsigned int *random;
|
||||
unsigned char *lol;
|
||||
signed char whoa;
|
||||
struct hello wow;
|
||||
thingy *cool;
|
||||
union xy xy;
|
||||
|
||||
return 0;
|
||||
}
|
||||
</verb></tscreen>
|
||||
|
||||
The following output would be produced:
|
||||
|
||||
<tscreen><verb>
|
||||
SC_FUNC: _test_local_vars_main: Symbol table
|
||||
============================================
|
||||
__fixargs__:
|
||||
Flags: SC_CONST SC_DEF
|
||||
Type: unsigned int
|
||||
__argsize__:
|
||||
Flags: SC_CONST SC_DEF
|
||||
Type: unsigned char
|
||||
wahoo:
|
||||
AsmName: M0001
|
||||
Flags: SC_STATIC SC_DEF SC_REF
|
||||
Type: unsigned char
|
||||
bonanza:
|
||||
AsmName: M0002
|
||||
Flags: SC_STATIC SC_DEF SC_REF
|
||||
Type: unsigned char
|
||||
i:
|
||||
Flags: SC_AUTO SC_DEF SC_REF
|
||||
Type: unsigned char
|
||||
j:
|
||||
Flags: SC_AUTO SC_DEF SC_REF
|
||||
Type: unsigned int
|
||||
random:
|
||||
Flags: SC_AUTO SC_DEF SC_REF
|
||||
Type: unsigned int *
|
||||
lol:
|
||||
Flags: SC_AUTO SC_DEF SC_REF
|
||||
Type: unsigned char *
|
||||
whoa:
|
||||
Flags: SC_AUTO SC_DEF SC_REF
|
||||
Type: signed char
|
||||
wow:
|
||||
Flags: SC_AUTO SC_DEF SC_REF
|
||||
Type: struct hello
|
||||
cool:
|
||||
Flags: SC_AUTO SC_DEF SC_REF
|
||||
Type: struct hello *
|
||||
xy:
|
||||
Flags: SC_AUTO SC_DEF SC_REF
|
||||
Type: union xy
|
||||
|
||||
|
||||
|
||||
|
||||
Global symbol table
|
||||
===================
|
||||
thingy:
|
||||
AsmName: _thingy
|
||||
Flags: SC_TYPEDEF 0x100000
|
||||
Type: struct hello
|
||||
single:
|
||||
AsmName: _single
|
||||
Flags: SC_STATIC SC_EXTERN SC_STORAGE SC_DEF SC_REF 0x100000
|
||||
Type: unsigned char
|
||||
test_local_vars_main:
|
||||
AsmName: _test_local_vars_main
|
||||
Flags: SC_FUNC SC_STATIC SC_EXTERN SC_DEF 0x100000
|
||||
Type: unsigned char (void)
|
||||
|
||||
|
||||
|
||||
|
||||
Global tag table
|
||||
================
|
||||
l:
|
||||
Flags: SC_STRUCT SC_DEF
|
||||
Type: (none)
|
||||
hello:
|
||||
Flags: SC_STRUCT SC_DEF
|
||||
Type: (none)
|
||||
sub:
|
||||
Flags: SC_STRUCT SC_DEF
|
||||
Type: (none)
|
||||
xy:
|
||||
Flags: SC_UNION SC_DEF
|
||||
Type: (none)
|
||||
|
||||
|
||||
|
||||
|
||||
Global struct and union definitions
|
||||
=========================
|
||||
|
||||
SC_STRUCT: l
|
||||
============
|
||||
m:
|
||||
Flags: SC_STRUCTFIELD
|
||||
Type: unsigned char
|
||||
n:
|
||||
Flags: SC_STRUCTFIELD
|
||||
Type: unsigned char
|
||||
|
||||
|
||||
|
||||
|
||||
SC_STRUCT: hello
|
||||
================
|
||||
j:
|
||||
Flags: SC_STRUCTFIELD
|
||||
Type: unsigned char
|
||||
k:
|
||||
Flags: SC_STRUCTFIELD
|
||||
Type: unsigned char
|
||||
l:
|
||||
Flags: SC_STRUCTFIELD
|
||||
Type: struct l
|
||||
|
||||
|
||||
|
||||
|
||||
SC_STRUCT: sub
|
||||
==============
|
||||
x:
|
||||
Flags: SC_STRUCTFIELD
|
||||
Type: unsigned char
|
||||
y:
|
||||
Flags: SC_STRUCTFIELD
|
||||
Type: unsigned char
|
||||
|
||||
|
||||
|
||||
|
||||
SC_UNION: xy
|
||||
============
|
||||
xy:
|
||||
Flags: SC_STRUCTFIELD
|
||||
Type: struct sub
|
||||
mem:
|
||||
Flags: SC_STRUCTFIELD
|
||||
Type: unsigned int
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<tag><tt>--debug-opt name</tt></tag>
|
||||
|
||||
The named file contains a list of specific optimization steps to enable or disable.
|
||||
|
@ -395,7 +578,7 @@ Here is a description of all the command line options:
|
|||
|
||||
This option is used to set the target system. The target system determines
|
||||
the character set that is used for strings and character constants and the
|
||||
default CPU. The CPU setting can be overriden by use of the <tt/<ref
|
||||
default CPU. The CPU setting can be overridden by use of the <tt/<ref
|
||||
id="option--cpu" name="--cpu">/ option.
|
||||
|
||||
The following target systems are supported:
|
||||
|
@ -546,6 +729,12 @@ Here is a description of all the command line options:
|
|||
Treat all warnings as errors.
|
||||
<tag><tt/no-effect/</tag>
|
||||
Warn about statements that don't have an effect.
|
||||
<tag><tt/pointer-sign/</tag>
|
||||
Warn if a pointer assignment changes the signedness of the target
|
||||
of a pointer value, and the new signedness wasn't cast explicitly.
|
||||
<tag><tt/pointer-types/</tag>
|
||||
Warn if a pointer assignment changes the type of the target
|
||||
of a pointer value, and the new type wasn't cast explicitly.
|
||||
<tag><tt/remap-zero/</tag>
|
||||
Warn about a <tt/<ref id="pragma-charmap" name="#pragma charmap()">/
|
||||
that changes a character's code number from/to 0x00.
|
||||
|
@ -555,6 +744,10 @@ Here is a description of all the command line options:
|
|||
Warn when passing structs by value.
|
||||
<tag><tt/unknown-pragma/</tag>
|
||||
Warn about #pragmas that aren't recognized by cc65.
|
||||
<tag><tt/unreachable-code/</tag>
|
||||
Warn about unreachable code in cases of comparing constants, etc.
|
||||
<tag><tt/unused-func/</tag>
|
||||
Warn about unused functions.
|
||||
<tag><tt/unused-label/</tag>
|
||||
Warn about unused labels.
|
||||
<tag><tt/unused-param/</tag>
|
||||
|
@ -1012,6 +1205,10 @@ The compiler defines several macros at startup:
|
|||
|
||||
This macro is defined if the target is the Supervision (-t supervision).
|
||||
|
||||
<tag><tt>__SYM1__</tt></tag>
|
||||
|
||||
This macro is defined if the target is the Sym-1 (-t sym1).
|
||||
|
||||
<tag><tt>__TELESTRAT__</tt></tag>
|
||||
|
||||
This macro is defined if the target is the Telestrat (-t telestrat).
|
||||
|
@ -1236,7 +1433,7 @@ parameter with the <tt/#pragma/.
|
|||
|
||||
This pragma is used to display informational messages at compile-time.
|
||||
|
||||
The message intented to be displayed must be a string literal.
|
||||
The message intended to be displayed must be a string literal.
|
||||
|
||||
Example:
|
||||
<tscreen><verb>
|
||||
|
@ -1355,7 +1552,7 @@ parameter with the <tt/#pragma/.
|
|||
Switch compiler warnings on or off. "name" is the name of a warning (see the
|
||||
<tt/<ref name="-W" id="option-W">/ compiler option for a list). The name is
|
||||
followed either by "pop", which restores the last pushed state, or by "on" or
|
||||
"off", optionally preceeded by "push" to push the current state before
|
||||
"off", optionally preceded by "push" to push the current state before
|
||||
changing it.
|
||||
|
||||
Example:
|
||||
|
@ -1380,7 +1577,12 @@ parameter with the <tt/#pragma/.
|
|||
the <tt/Y/ register if it wraps any variadic functions (they have "<tt/.../"
|
||||
in their prototypes).
|
||||
|
||||
The identifier is an 8-bit number that's set into <tt/tmp4/.
|
||||
The identifier is an 8-bit number that's set into <tt/tmp4/. If the identifier
|
||||
is "bank", then ca65's <tt><url url="ca65.html#.BANK" name=".bank"></tt> function will be used
|
||||
to determine the number from the bank attribute defined in the linker config,
|
||||
see <url url="ld65.html#MEMORY" name="Other MEMORY area attributes">. Note that
|
||||
this currently implies that only the least significant 8 bits of the bank attribute
|
||||
can be used.
|
||||
|
||||
The address of a wrapped function is passed in <tt/ptr4/. The wrapper can
|
||||
call that function by using "<tt/jsr callptr4/".
|
||||
|
@ -1654,7 +1856,7 @@ This is the original compiler copyright:
|
|||
|
||||
Anyone may copy or redistribute these programs, provided that:
|
||||
|
||||
1: You don't charge anything for the copy. It is permissable to
|
||||
1: You don't charge anything for the copy. It is permissible to
|
||||
charge a nominal fee for media, etc.
|
||||
|
||||
2: All source code and documentation for the programs is made
|
||||
|
|
|
@ -57,11 +57,11 @@ Short options:
|
|||
-O Optimize code
|
||||
-Oi Optimize code, inline more code
|
||||
-Or Optimize code, honour the register keyword
|
||||
-Os Optimize code, inline standard funtions
|
||||
-Os Optimize code, inline standard functions
|
||||
-S Compile but don't assemble and link
|
||||
-T Include source as comment
|
||||
-V Print the version number
|
||||
-W name[,...] Supress compiler warnings
|
||||
-W name[,...] Suppress compiler warnings
|
||||
-Wa options Pass options to the assembler
|
||||
-Wc options Pass options to the compiler
|
||||
-Wl options Pass options to the linker
|
||||
|
|
|
@ -235,12 +235,12 @@ things to be different from runtime loading:
|
|||
|
||||
<item> Without changing the segment names, all segments take the default
|
||||
names used by the standard linker configurations. This means that the
|
||||
driver code is no longer contingous in memory, instead the code
|
||||
driver code is no longer contiguous in memory, instead the code
|
||||
segment is placed somewhere in between all other code segments, the
|
||||
data segment is placed with all other data segments and so on. If the
|
||||
driver doesn't do strange things this shouldn't be a problem.
|
||||
|
||||
<item> With statically linked code, data and bss segments will get intialized
|
||||
<item> With statically linked code, data and bss segments will get initialized
|
||||
once (when the application is loaded), while a loadable driver will
|
||||
get its initialization each time the driver is loaded into memory
|
||||
(which may be more than once in the lifetime of a program). It depends
|
||||
|
|
|
@ -59,7 +59,7 @@ slower than the same code for unsigned types.
|
|||
|
||||
<sect>Use chars instead of ints if possible<p>
|
||||
|
||||
While in arithmetic operations, chars are immidiately promoted to ints, they
|
||||
While in arithmetic operations, chars are immediately promoted to ints, they
|
||||
are passed as chars in parameter lists and are accessed as chars in variables.
|
||||
The code generated is usually not much smaller, but it is faster, since
|
||||
accessing chars is faster. For several operations, the generated code may be
|
||||
|
|
|
@ -142,13 +142,20 @@ The functions listed below are special for the CX16. See the <url
|
|||
url="funcref.html" name="function reference"> for declarations and usage.
|
||||
|
||||
<itemize>
|
||||
<item>get_ostype
|
||||
<item>set_tv
|
||||
<item>videomode
|
||||
<item>vpeek
|
||||
<item>vpoke
|
||||
<item>get_ostype()
|
||||
<item>set_tv()
|
||||
<item>videomode()
|
||||
<item>vpeek()
|
||||
<item>vpoke()
|
||||
</itemize>
|
||||
|
||||
<tt/cpeekcolor()/ works differently on the Commander X16 than it does on other
|
||||
platforms. Each character has two colors: background and text (foreground).
|
||||
<tt/cpeekcolor()/ returns both colors. The high nybble describes the
|
||||
background color, the low nybble describes the text color. For example, if the
|
||||
function is used on the default screen, then it returns $61, which means
|
||||
white-on-blue.
|
||||
|
||||
|
||||
<sect1>CBM-specific functions<p>
|
||||
|
||||
|
@ -157,32 +164,32 @@ machines. See the <url url="funcref.html" name="function reference"> for
|
|||
declarations and usage.
|
||||
|
||||
<itemize>
|
||||
<item>cbm_close
|
||||
<item>cbm_closedir
|
||||
<item>cbm_k_basin
|
||||
<item>cbm_k_bsout
|
||||
<item>cbm_k_chkin
|
||||
<item>cbm_k_ckout
|
||||
<item>cbm_k_close
|
||||
<item>cbm_k_clrch
|
||||
<item>cbm_k_getin
|
||||
<item>cbm_k_load
|
||||
<item>cbm_k_open
|
||||
<item>cbm_k_readst
|
||||
<item>cbm_k_save
|
||||
<item>cbm_k_second
|
||||
<item>cbm_k_setlfs
|
||||
<item>cbm_k_setnam
|
||||
<item>cbm_k_tksa
|
||||
<item>cbm_load
|
||||
<item>cbm_open
|
||||
<item>cbm_opendir
|
||||
<item>cbm_read
|
||||
<item>cbm_readdir
|
||||
<item>cbm_save
|
||||
<item>cbm_write
|
||||
<item>get_tv
|
||||
<item>waitvsync
|
||||
<item>cbm_close()
|
||||
<item>cbm_closedir()
|
||||
<item>cbm_k_basin()
|
||||
<item>cbm_k_bsout()
|
||||
<item>cbm_k_chkin()
|
||||
<item>cbm_k_ckout()
|
||||
<item>cbm_k_close()
|
||||
<item>cbm_k_clrch()
|
||||
<item>cbm_k_getin()
|
||||
<item>cbm_k_load()
|
||||
<item>cbm_k_open()
|
||||
<item>cbm_k_readst()
|
||||
<item>cbm_k_save()
|
||||
<item>cbm_k_second()
|
||||
<item>cbm_k_setlfs()
|
||||
<item>cbm_k_setnam()
|
||||
<item>cbm_k_tksa()
|
||||
<item>cbm_load()
|
||||
<item>cbm_open()
|
||||
<item>cbm_opendir()
|
||||
<item>cbm_read()
|
||||
<item>cbm_readdir()
|
||||
<item>cbm_save()
|
||||
<item>cbm_write()
|
||||
<item>get_tv()
|
||||
<item>waitvsync()
|
||||
</itemize>
|
||||
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ Here is a description of all the command line options:
|
|||
<tag><tt>-i name, --info name</tt></tag>
|
||||
|
||||
Specify an info file. The info file contains global options that may
|
||||
override or replace command line options plus informations about the code
|
||||
override or replace command line options plus information about the code
|
||||
that has to be disassembled. See the separate section <ref id="infofile"
|
||||
name="Info File Format">.
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ How to debug your code using the VICE and Oricutron emulators.
|
|||
<sect>Overview<p>
|
||||
|
||||
This document describes how to debug your programs using the cc65 development
|
||||
tools and the VICE CBM emulator.
|
||||
tools and the VICE or Oricutron emulator.
|
||||
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ transfer the program to the real machine until it is done.
|
|||
|
||||
<item>An emulator allows many things that are almost impossible one of the
|
||||
original machines. You may set watchpoints (detect read or write access to
|
||||
arbitary addresses), debug interrupt handlers and even debug routines that run
|
||||
arbitrary addresses), debug interrupt handlers and even debug routines that run
|
||||
inside the 1541 floppy.
|
||||
|
||||
<item>You may use the label file generated by the linker to make much more use
|
||||
|
@ -117,7 +117,7 @@ these warnings and errors as long as they reference any problems VICE thinks
|
|||
it has with the labels.
|
||||
|
||||
After loading the labels, they are used by VICE in the disassembler listing,
|
||||
and you may use them whereever you need to specify an address. Try
|
||||
and you may use them wherever you need to specify an address. Try
|
||||
|
||||
<tscreen><verb>
|
||||
d ._main
|
||||
|
@ -126,6 +126,12 @@ and you may use them whereever you need to specify an address. Try
|
|||
as an example (note that VICE needs a leading dot before all labels, and that
|
||||
the compiler prepends an underline under most named labels).
|
||||
|
||||
If you start the emulator from the commandline, you can also load the labels
|
||||
directly using something like this:
|
||||
|
||||
<tscreen><verb>
|
||||
x64sc -moncommands hello.lbl hello.prg
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect>How to use the label file with Oricutron<p>
|
||||
|
@ -138,14 +144,13 @@ load your label file like this:
|
|||
</verb></tscreen>
|
||||
|
||||
After loading the labels, they are used by Oricutron in the disassembler listing,
|
||||
and you may use them whereever you need to specify an address. Try
|
||||
and you may use them wherever you need to specify an address. Try
|
||||
|
||||
<tscreen><verb>
|
||||
d ._main
|
||||
</verb></tscreen>
|
||||
|
||||
as an example (note that VICE needs a leading dot before all labels, and that
|
||||
the compiler prepends an underline under most named labels).
|
||||
as an example.
|
||||
|
||||
|
||||
|
||||
|
|
255
doc/funcref.sgml
255
doc/funcref.sgml
|
@ -298,6 +298,16 @@ function.
|
|||
</itemize>
|
||||
|
||||
|
||||
<sect1><tt/creativision.h/<label id="creativision.h"><p>
|
||||
|
||||
<itemize>
|
||||
<item><ref id="bios_playsound" name="bios_playsound">
|
||||
<item><ref id="psg_delay" name="psg_delay">
|
||||
<item><ref id="psg_outb" name="psg_outb">
|
||||
<item><ref id="psg_silence" name="psg_silence">
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1><tt/ctype.h/<label id="ctype.h"><p>
|
||||
|
||||
<itemize>
|
||||
|
@ -744,6 +754,16 @@ communication, see also <tt>testcode/lib/ser-test.c</tt>.
|
|||
</itemize>
|
||||
|
||||
|
||||
<sect1><tt/sym1.h/<label id="sym1.h"><p>
|
||||
|
||||
<itemize>
|
||||
<item><ref id="beep" name="beep">
|
||||
<item><ref id="fdisp" name="fdisp">
|
||||
<item><ref id="loadt" name="loadt">
|
||||
<item><ref id="dumpt" name="dumpt">
|
||||
</itemize>
|
||||
|
||||
|
||||
<sect1><tt/telestrat.h/<label id="telestrat.h"><p>
|
||||
|
||||
<itemize>
|
||||
|
@ -1659,6 +1679,27 @@ used in presence of a prototype.
|
|||
</quote>
|
||||
|
||||
|
||||
<sect1>beep<label id="beep"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Beep sound.
|
||||
<tag/Header/<tt/<ref id="sym1.h" name="sym1.h">/
|
||||
<tag/Declaration/<tt/void beep(void);/
|
||||
<tag/Description/<tt/beep/ makes a brief tone.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the Sym-1.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="fdisp" name="fdisp">,
|
||||
<ref id="loadt" name="loadt">,
|
||||
<ref id="dumpt" name="dumpt">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>bgcolor<label id="bgcolor"><p>
|
||||
|
||||
<quote>
|
||||
|
@ -1684,6 +1725,44 @@ used in presence of a prototype.
|
|||
</quote>
|
||||
|
||||
|
||||
<sect1>bios_playsound<label id="bios_playsound"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Play a sequence of musical notes.
|
||||
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
|
||||
<tag/Declaration/<tt/void __fastcall__ bios_playsound (const void *a, unsigned char b);/
|
||||
<tag/Description/The function plays chords based on a BASIC statement. Notes and
|
||||
durations are defined in the BASIC manual, chapter 13 on pages 102 resp. 103.
|
||||
<tag/Notes/<itemize>
|
||||
<item>BASIC has a fixed tempo of 18.
|
||||
<item>The function is only available as fastcall function, so it may only be
|
||||
used in presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="psg_delay" name="psg_delay">,
|
||||
<ref id="psg_outb" name="psg_outb">
|
||||
<tag/Example/<verb>
|
||||
#include <creativision.h>
|
||||
void main (void)
|
||||
{
|
||||
static const unsigned char notes[] = {
|
||||
0x77, 0x4F, 0x37,
|
||||
0x4B, 0x05, 0xBB,
|
||||
0x4F, 0x27, 0x83,
|
||||
0x93, 0x9B, 0x93,
|
||||
0x17, 0x4F, 0x96, // played backwards
|
||||
0xAB, 0x17, 0x4F, // three-note chords
|
||||
0x0E // tempo
|
||||
};
|
||||
bios_playsound (notes, sizeof notes);
|
||||
}
|
||||
</verb>
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>bordercolor<label id="bordercolor"><p>
|
||||
|
||||
<quote>
|
||||
|
@ -1778,7 +1857,7 @@ be used in presence of a prototype.
|
|||
<item>The function is specific to the C128.
|
||||
<item>The function will not return to the caller.
|
||||
</itemize>
|
||||
<tag/Availability/C128
|
||||
<tag/Availability/cc65
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
@ -2813,6 +2892,8 @@ location of the cursor in the display screen RAM. That number can be passed to
|
|||
done to make it obvious that peeking doesn't move the cursor in any way. Your
|
||||
program must place the cursor where it wants to peek before it calls any of
|
||||
those functions.
|
||||
<item>On the cx16 (Commander X16) target, this function returns two values: the
|
||||
background color, in the high nybble, and the text color, in the low nybble.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
|
@ -3313,6 +3394,30 @@ int main(void)
|
|||
</quote>
|
||||
|
||||
|
||||
<sect1>dumpt<label id="dumpt"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Dump memory to tape.
|
||||
<tag/Header/<tt/<ref id="sym1.h" name="sym1.h">/
|
||||
<tag/Declaration/<tt/int __fastcall__ dumpt (unsigned char id, const void* start, const void* end);/
|
||||
<tag/Description/<tt/dumpt/ saves memory onto data tape.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the Sym-1.
|
||||
<item>The return value is status. Non-zero status indicates an error.
|
||||
<item>The function is only available as fastcall function, so it may only
|
||||
be used in presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="beep" name="beep">,
|
||||
<ref id="fdisp" name="fdisp">,
|
||||
<ref id="loadt" name="loadt">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>em_commit<label id="em_commit"><p>
|
||||
|
||||
<quote>
|
||||
|
@ -3408,7 +3513,7 @@ loaded.
|
|||
<descrip>
|
||||
<tag/Function/Install an already loaded extended memory driver.
|
||||
<tag/Header/<tt/<ref id="em.h" name="em.h">/
|
||||
<tag/Declaration/<tt/unsigned char _fastcall__ em_install (void* driver);/
|
||||
<tag/Declaration/<tt/unsigned char _fastcall__ em_install (const void* driver);/
|
||||
<tag/Description/The function installs an already loaded extended memory driver
|
||||
and returns an error code. The function may be used to install a driver linked
|
||||
statically to the program.
|
||||
|
@ -3463,7 +3568,7 @@ extended memory that should be supported. There is no autodetect capability.
|
|||
<tag/Declaration/<tt/void* __fastcall__ em_map (unsigned page);/
|
||||
<tag/Description/The function maps one page of extended memory into linear
|
||||
memory and returns a pointer to the page frame. Depending on the hardware
|
||||
and driver, the data is either mapped into the address space or transfered
|
||||
and driver, the data is either mapped into the address space or transferred
|
||||
into a buffer. If you don't need the actual contents of the page (for example
|
||||
because you're going to overwrite it completely), it is better to call
|
||||
<tt/<ref id="em_use" name="em_use">/ instead. <tt/em_use/ will not transfer the
|
||||
|
@ -3671,6 +3776,28 @@ switching the CPU into double clock mode.
|
|||
</quote>
|
||||
|
||||
|
||||
<sect1>fdisp<label id="fdisp"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Flash front-panel display.
|
||||
<tag/Header/<tt/<ref id="sym1.h" name="sym1.h">/
|
||||
<tag/Declaration/<tt/void fdisp(void);/
|
||||
<tag/Description/<tt/fdisp/ flashes front-panel display.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the Sym-1.
|
||||
<item>The front-panel display buffer must be loaded prior to calling fdisp. See the DISPLAY struct definition in sym1.h.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="beep" name="beep">,
|
||||
<ref id="loadt" name="loadt">,
|
||||
<ref id="dumpt" name="dumpt">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>feof<label id="feof"><p>
|
||||
|
||||
<quote>
|
||||
|
@ -3678,7 +3805,7 @@ switching the CPU into double clock mode.
|
|||
<tag/Function/Return the end-of-file indicator of a stream.
|
||||
<tag/Header/<tt/<ref id="stdio.h" name="stdio.h">/
|
||||
<tag/Declaration/<tt/int __fastcall__ feof (FILE* f);/
|
||||
<tag/Description/<tt/feof/ tests the end-of-file indicator ofthe stream
|
||||
<tag/Description/<tt/feof/ tests the end-of-file indicator of the stream
|
||||
<tt/f/, and returns a non zero value if it is set.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The indicator is set only after a read past the end of a file is
|
||||
|
@ -4122,7 +4249,7 @@ const char* optstring);/
|
|||
is a string that contains command line option characters. If a character in
|
||||
<tt/optstring/ is followed by a colon, the option requires an argument. An
|
||||
option on the command line is recognized if it is one of the option characters
|
||||
preceeded by a '-'.
|
||||
preceded by a '-'.
|
||||
<tt/getopt/ must be called repeatedly. It will return each option character
|
||||
found on the command line and <tt/EOF/ (-1) if there is no other option. An
|
||||
option argument is placed in <tt/optarg/, the index of the next element on the
|
||||
|
@ -4731,7 +4858,7 @@ There's no way to check for the number of actually connected joysticks.
|
|||
<descrip>
|
||||
<tag/Function/Install an already loaded driver and return an error code.
|
||||
<tag/Header/<tt/<ref id="joystick.h" name="joystick.h">/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ joy_install (void* driver);/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ joy_install (const void* driver);/
|
||||
<tag/Description/The function installs a driver that was already loaded into
|
||||
memory (or linked statically to the program). It returns an error code
|
||||
(<tt/JOY_ERR_OK/ in case of success).
|
||||
|
@ -4911,6 +5038,30 @@ used in presence of a prototype.
|
|||
</quote>
|
||||
|
||||
|
||||
<sect1>loadt<label id="loadt"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Load memory from tape.
|
||||
<tag/Header/<tt/<ref id="sym1.h" name="sym1.h">/
|
||||
<tag/Declaration/<tt/int __fastcall__ loadt (unsigned char id);/
|
||||
<tag/Description/<tt/loadt/ loads memory from data tape.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is specific to the Sym-1.
|
||||
<item>The return value is status. Non-zero status indicates an error.
|
||||
<item>The function is only available as fastcall function, so it may only
|
||||
be used in presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="beep" name="beep">,
|
||||
<ref id="fdisp" name="fdisp">,
|
||||
<ref id="dumpt" name="dumpt">,
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>ltoa<label id="ltoa"><p>
|
||||
|
||||
<quote>
|
||||
|
@ -4970,7 +5121,7 @@ always be the same.
|
|||
<tag/Header/<tt/<ref id="setjmp.h" name="setjmp.h">/
|
||||
<tag/Declaration/<tt/void __fastcall__ longjmp (jmp_buf buf, int retval);/
|
||||
<tag/Description/The <tt/longjmp/ function restores a program context from the
|
||||
data in <tt/buf/, which must have been set by a preceeding call to
|
||||
data in <tt/buf/, which must have been set by a preceding call to
|
||||
<tt/<ref id="setjmp" name="setjmp">/. Program execution continues as if the
|
||||
call to <tt/<ref id="setjmp" name="setjmp">/ has just returned the value
|
||||
<tt/retval/.
|
||||
|
@ -5184,7 +5335,7 @@ the module just loaded. Possible error codes are:
|
|||
<item><tt/MLOAD_ERR_MEM/ - Not enough memory
|
||||
</itemize>
|
||||
<tag/Notes/<itemize>
|
||||
<item>The <htmlurl url="ld65.html" name="ld65"> linker is needed to create
|
||||
<item>The <url url="ld65.html" name="ld65 linker"> is needed to create
|
||||
relocatable o65 modules for use with this function.
|
||||
<item>The function is available only as a fastcall function; so, it may be used
|
||||
only in the presence of a prototype.
|
||||
|
@ -5614,7 +5765,7 @@ cc65 allows to pass this argument, it is ignored.
|
|||
<tag/Function/Open a directory.
|
||||
<tag/Header/<tt/<ref id="dirent.h" name="dirent.h">/
|
||||
<tag/Declaration/<tt/DIR* __fastcall__ opendir (const char* name);/
|
||||
<tag/Description/<tt/opendir/ opens a directory and returns the direcory
|
||||
<tag/Description/<tt/opendir/ opens a directory and returns the directory
|
||||
descriptor associated with it. On error, NULL is returned and an error code is
|
||||
stored in <tt/errno/.
|
||||
<tag/Notes/<itemize>
|
||||
|
@ -5767,6 +5918,78 @@ be used in presence of a prototype.
|
|||
</quote>
|
||||
|
||||
|
||||
<sect1>psg_delay<label id="psg_delay"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Delay for a short period of time.
|
||||
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
|
||||
<tag/Declaration/<tt/void __fastcall__ psg_delay (unsigned char b);/
|
||||
<tag/Description/The function specifies how long each note or pause between
|
||||
notes should last.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is only available as fastcall function, so it may only be
|
||||
used in presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="psg_outb" name="psg_outb">,
|
||||
<ref id="psg_silence" name="psg_silence">
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>psg_outb<label id="psg_outb"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Output a byte to the PSG.
|
||||
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
|
||||
<tag/Declaration/<tt/void __fastcall__ psg_outb (unsigned char b);/
|
||||
<tag/Description/The function sends a byte to the Programmable Sound
|
||||
Generator, then waits for the PSG to acknowledge.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is only available as fastcall function, so it may only be
|
||||
used in presence of a prototype.
|
||||
</itemize>
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="psg_delay" name="psg_delay">,
|
||||
<ref id="psg_silence" name="psg_silence">
|
||||
<tag/Example/<verb>
|
||||
#include <creativision.h>
|
||||
void main (void)
|
||||
{
|
||||
psg_outb (0x80); // Latch frequency
|
||||
psg_outb (0x07); // Frequency byte 2
|
||||
psg_outb (0x90); // Channel 0 full volume
|
||||
psg_delay (100);
|
||||
psg_silence ();
|
||||
}
|
||||
</verb>
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>psg_silence<label id="psg_silence"><p>
|
||||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Set volume off on each PSG channel.
|
||||
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
|
||||
<tag/Declaration/<tt/void psg_silence (void);/
|
||||
<tag/Description/The function resets the Programmable Sound Generator,
|
||||
then sends $9F, $BF, $DF, $FF to the PSG.
|
||||
<tag/Availability/cc65
|
||||
<tag/See also/
|
||||
<ref id="psg_delay" name="psg_delay">,
|
||||
<ref id="psg_outb" name="psg_outb">
|
||||
<tag/Example/None.
|
||||
</descrip>
|
||||
</quote>
|
||||
|
||||
|
||||
<sect1>qsort<label id="qsort"><p>
|
||||
|
||||
<quote>
|
||||
|
@ -5904,7 +6127,7 @@ pointer you're passing somewhere else, otherwise
|
|||
<tscreen><verb>
|
||||
ptr = realloc (ptr, size);
|
||||
</verb></tscreen>
|
||||
will loose your only copy of <tt/ptr/ if <tt/realloc/ returns <tt/NULL/.
|
||||
will lose your only copy of <tt/ptr/ if <tt/realloc/ returns <tt/NULL/.
|
||||
<item>The function is only available as fastcall function, so it may only
|
||||
be used in presence of a prototype.
|
||||
</itemize>
|
||||
|
@ -6196,7 +6419,7 @@ while (ser_get(&ch) == SER_ERR_NO_DATA)
|
|||
<descrip>
|
||||
<tag/Function/Install an already loaded driver and return an error code.
|
||||
<tag/Header/<tt/<ref id="serial.h" name="serial.h">/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ ser_install (void* driver);/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ ser_install (const void* driver);/
|
||||
<tag/Description/The function installs a driver that was already loaded into
|
||||
memory (or linked statically to the program). It returns an error code
|
||||
(<tt/SER_ERR_OK/ in case of success).
|
||||
|
@ -6741,7 +6964,7 @@ be used in presence of a prototype.
|
|||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Concatentate two strings.
|
||||
<tag/Function/Concatenate two strings.
|
||||
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
||||
<tag/Declaration/<tt/char* __fastcall__ strcat (char* s1, const char* s2);/
|
||||
<tag/Description/The <tt/strcat/ function appends a copy of the string
|
||||
|
@ -7067,7 +7290,7 @@ be used in presence of a prototype.
|
|||
|
||||
<quote>
|
||||
<descrip>
|
||||
<tag/Function/Concatentate two strings.
|
||||
<tag/Function/Concatenate two strings.
|
||||
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
||||
<tag/Declaration/<tt/char* __fastcall__ strncat (char* s1, const char* s2, size_t n);/
|
||||
<tag/Description/The <tt/strncat/ function appends not more than n characters
|
||||
|
@ -7192,7 +7415,7 @@ be used in presence of a prototype.
|
|||
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
||||
<tag/Declaration/<tt/char* __fastcall__ strpbrk (const char* str, const char* set);/
|
||||
<tag/Description/<tt/strpbrk()/ searches within <tt/str/ for the first
|
||||
occurance of any character from <tt/set/. It returns a pointer to that
|
||||
occurrence of any character from <tt/set/. It returns a pointer to that
|
||||
character if found; otherwise, it returns <tt/NULL/.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function is available only as a fastcall function;
|
||||
|
@ -7296,7 +7519,7 @@ be used in presence of a prototype.
|
|||
<tag/Function/Find a substring.
|
||||
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
||||
<tag/Declaration/<tt/char* __fastcall__ strstr (const char* str, const char* substr);/
|
||||
<tag/Description/<tt/strstr/ searches for the first occurance of the string
|
||||
<tag/Description/<tt/strstr/ searches for the first occurrence of the string
|
||||
<tt/substr/ within <tt/str/. If found, it returns a pointer to the copy,
|
||||
otherwise it returns <tt/NULL/.
|
||||
<tag/Notes/<itemize>
|
||||
|
@ -7363,7 +7586,7 @@ the behaviour is undefined.
|
|||
<item>If <tt/n/ is zero, <tt/s1/ may be a NULL pointer.
|
||||
<item>The function is only available as fastcall function, so it may only
|
||||
be used in presence of a prototype.
|
||||
<item>Since cc65 doesn't support different charcter sets, <tt/strxfrm/ will
|
||||
<item>Since cc65 doesn't support different character sets, <tt/strxfrm/ will
|
||||
just copy s2 to s1 using <tt><ref id="strncpy" name="strncpy"></tt>.
|
||||
</itemize>
|
||||
<tag/Availability/ISO 9899
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<article>
|
||||
<title>Gamate System specific information for cc65
|
||||
<author>
|
||||
<url url="mailto:groepaz@gmx.net" name="Groepaz/Hitmen">
|
||||
<url url="mailto:groepaz@gmx.net" name="Groepaz">
|
||||
|
||||
<abstract>
|
||||
An overview over the Gamate runtime system as it is implemented for the
|
||||
|
@ -117,14 +117,7 @@ following functions (and a few others):
|
|||
<sect>Other hints<p>
|
||||
|
||||
<itemize>
|
||||
<item>The Gamate is emulated by MESS (<url url="http://www.mess.org/">),
|
||||
run like this: <tt>mess gamate -debug -window -skip_gameinfo -cart test.bin</tt>
|
||||
</itemize>
|
||||
|
||||
some resources on the Gamate:
|
||||
|
||||
<itemize>
|
||||
<item><url url="http://en.wikipedia.org/wiki/Gamate">
|
||||
<item>some resources on the Gamate: <url url="http://en.wikipedia.org/wiki/Gamate">
|
||||
</itemize>
|
||||
|
||||
<sect>License<p>
|
||||
|
|
|
@ -205,9 +205,9 @@ see them together in the filling box in GeoPaint.
|
|||
|
||||
<sect2>GraphicsString
|
||||
<p>
|
||||
<tt/void GraphicsString (char *myGString)/
|
||||
<tt/void GraphicsString (const void *myGString)/
|
||||
<p>
|
||||
One of the more powerfull routines of GEOS. This function calls other graphic functions depending
|
||||
One of the more powerful routines of GEOS. This function calls other graphic functions depending
|
||||
on the given command string. See the structures chapter for a more detailed description.
|
||||
|
||||
<sect2>Rectangle functions
|
||||
|
@ -652,7 +652,7 @@ For some purposes you might consider using the <tt/dio.h/ interface to disk acce
|
|||
<p>
|
||||
All GEOS disk functions return an error code in the X register. In some cases this is returned by the
|
||||
GEOSLib function (if its type is <tt/char/), but in all cases the last error is saved in the <tt/__oserror/
|
||||
location. If it is nonzero - an error occured. See <tt/gdisk.h/ for the list of possible errorcodes.
|
||||
location. If it is nonzero - an error occurred. See <tt/gdisk.h/ for the list of possible errorcodes.
|
||||
You need to include <tt/errno.h/ to get <tt/__oserror/, together with the standard <tt/errno/. The
|
||||
latter gives less verbose, but still usable information and can be used with <tt/strerror/.
|
||||
Probably you will get more information using <tt/_stroserror/ in a similar way.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<url url="mailto:greg.king5@verizon.net" name="Greg King">
|
||||
|
||||
<abstract>
|
||||
This document describes a compiler that can create GEOS headers and menues for
|
||||
This document describes a compiler that can create GEOS headers and menus for
|
||||
cc65-compiled programs.
|
||||
</abstract>
|
||||
|
||||
|
@ -24,7 +24,7 @@ Optional resources might be menu definitions, other headers (e.g., for data
|
|||
files of an app.), dialog definitions, etc. Without an application's header,
|
||||
GEOS is unable to load and start it.
|
||||
|
||||
Currently, <bf/grc65/ supports only menues and the required header definition,
|
||||
Currently, <bf/grc65/ supports only menus and the required header definition,
|
||||
along with support for building applications with VLIR-structured overlays.
|
||||
|
||||
<bf/grc65/ generates output in two formats: C header and <bf/ca65/ source (.s).
|
||||
|
@ -345,7 +345,7 @@ for addresses.
|
|||
<!-- <appendix> -->
|
||||
<sect>Appendix A -- example.grc<label id="example-grc">
|
||||
<p><tscreen><verb>
|
||||
; Note that MENU can define both menues and submenues.
|
||||
; Note that MENU can define both menus and submenus.
|
||||
; If you want to use any C operators (such as "|", "&", etc.), do it WITHOUT
|
||||
; any spaces between the arguments (the parser is simple and weak).
|
||||
|
||||
|
|
|
@ -124,6 +124,9 @@
|
|||
<tag><htmlurl url="atari5200.html" name="atari5200.html"></tag>
|
||||
Topics specific to the Atari 5200 Game Console.
|
||||
|
||||
<tag><htmlurl url="atari7800.html" name="atari7800.html"></tag>
|
||||
Topics specific to the Atari 7800 Game Console.
|
||||
|
||||
<tag><htmlurl url="atmos.html" name="atmos.html"></tag>
|
||||
Topics specific to the Oric Atmos.
|
||||
|
||||
|
@ -172,6 +175,9 @@
|
|||
<tag><htmlurl url="supervision.html" name="supervision.html"></tag>
|
||||
Topics specific to the Watara Supervision Console.
|
||||
|
||||
<tag><htmlurl url="sym1.html" name="sym1.html"></tag>
|
||||
Topics specific to the Synertek Systems Sym-1.
|
||||
|
||||
<tag><htmlurl url="telestrat.html" name="telestrat.html"></tag>
|
||||
Topics specific to the Oric Telestrat.
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">,<newline>
|
||||
<url url="mailto:cbmnut@hushmail.com" name="CbmNut">,<newline>
|
||||
<url url="mailto:greg.king5@verizon.net" name="Greg King">,<newline>
|
||||
<url url="mailto:groepaz@gmx.net" name="Groepaz">,<newline>
|
||||
<url url="mailto:stephan.muehlstrasser@web.de" name="Stephan Mühlstrasser">
|
||||
|
||||
<abstract>
|
||||
|
@ -458,12 +459,8 @@ Substitute the name of a Commodore computer for that <tt/<sys>/:
|
|||
Start the desired version of the emulator (CBM610 programs run on
|
||||
the CBM II [<tt/xcbm2/] emulator).
|
||||
|
||||
In the Windows versions of VICE, choose <bf>File>Autoboot disk/tape
|
||||
image...</bf>, choose your executable, and click <bf/OK/.
|
||||
|
||||
In the Unix versions, hold down the mouse's first button. Move the pointer to
|
||||
<bf>Smart-attach disk/tape...</bf>, and release the button. Choose your
|
||||
executable, and click <bf/Autostart/.
|
||||
Choose <bf>File>Autostart disk/tape image...</bf>, choose your executable,
|
||||
and click <bf/OK/.
|
||||
|
||||
The file has a 14-byte header which corresponds to a PRG-format BASIC program,
|
||||
consisting of a single line, similar to this:
|
||||
|
@ -499,6 +496,29 @@ The output will appear on a separate line, and you will be returned to a BASIC
|
|||
prompt.
|
||||
|
||||
|
||||
<sect1>Gamate<p>
|
||||
|
||||
Before you can run the cartridge image produced by the linker, the binary has to
|
||||
be patched using the <bf/gamate-fixcart/ tool that is included in the cc65
|
||||
package in the util/gamate/ directory.
|
||||
|
||||
<tscreen><verb>
|
||||
gamate-fixcart <image.bin>
|
||||
</verb></tscreen>
|
||||
|
||||
<sect2>MESS<p>
|
||||
Available at <url
|
||||
url="https://www.mamedev.org">:
|
||||
|
||||
MESS (Multiple Emulator Super System) is a multi system emulator that emulates
|
||||
various cc65 targets. It once started as a MAME fork, but was marged into MAME
|
||||
again at some point.
|
||||
|
||||
<tscreen><verb>
|
||||
mess gamate -debug -window -skip_gameinfo -cart <image.bin>
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1>GEOS<p>
|
||||
Available at <it/Click Here Software's/ <url
|
||||
url="http://cbmfiles.com/geos/index.html" name="GEOS download section">:
|
||||
|
@ -535,17 +555,8 @@ feature on.
|
|||
</quote>
|
||||
|
||||
<quote>
|
||||
VICE even has different ways that depend on which operating system is running
|
||||
the emulator.
|
||||
<itemize>
|
||||
<item>In Windows, you must click on <bf/Options/ (in an always visible menu).
|
||||
Then, you must click on <bf/True drive emulation/.
|
||||
<item>In Unix, you must <em/hold down/ the second button on your mouse. Move
|
||||
the pointer down to <bf/Drive settings/. Then, move the pointer over to
|
||||
<bf/Enable true drive emulation/. (If there is a check-mark in front of
|
||||
those words, that feature already is turned on -- then, move the pointer
|
||||
off of that menu.) Release the mouse button.
|
||||
</itemize>
|
||||
In VICE, got to <bf/Settings/ -> <bf/Settings/, then <bf/Peripheral devices/ ->
|
||||
<bf/Drive/. Then, you must enable the <bf/True drive emulation/ checkbox.
|
||||
</quote>
|
||||
|
||||
Find the <bf/CONVERT/ program on the boot disk [tap the 6-key; then, you
|
||||
|
@ -572,6 +583,29 @@ directory notePad. Look at the eight file-positions on each page until you see
|
|||
The output is shown in a GEOS dialog box; click <bf/OK/ when you have finished
|
||||
reading it.
|
||||
|
||||
Alternatively you can use the <bf/c1541/ program that comes with VICE to write the
|
||||
file to a disk image directly in GEOS format, so it can be used in GEOS directly
|
||||
without having to use the <bf/CONVERT/ program.
|
||||
|
||||
<tscreen><verb>
|
||||
c1541 -attach geos.d64 -geoswrite hello1
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1>Nintendo Entertainment System<p>
|
||||
|
||||
<sect2>Mednafen (NES)<p>
|
||||
Available at <url
|
||||
url="https://mednafen.github.io/releases/">:
|
||||
|
||||
Mednafen is a multi system emulator that emulates a couple of the supported
|
||||
targets of cc65: Apple II/II+, Atari Lynx, Nintendo Entertainment System and
|
||||
PC Engine/TurboGrafx 16.
|
||||
|
||||
<tscreen><verb>
|
||||
mednafen -force_module nes <image.bin>
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1>Ohio Scientific Challenger 1P<p>
|
||||
The <tt/osic1p/ runtime library returns to the boot prompt when the main()
|
||||
|
@ -694,6 +728,32 @@ Press <RETURN>.
|
|||
After hitting the RETURN key, you should see the boot prompt again.
|
||||
|
||||
|
||||
<sect1>PC Engine/TurboGrafx 16<p>
|
||||
|
||||
For the cartridge image produced by the linker to work in emulators and on real
|
||||
hardware, its content must be rearranged so the first 8k block becomes the last
|
||||
8k block in the image.
|
||||
|
||||
For example, for a 32k image this can be done using <bf/dd/ as follows:
|
||||
|
||||
<tscreen><verb>
|
||||
dd if=infile.bin bs=8K skip=3 > outfile.pce
|
||||
dd if=infile.bin bs=8K count=3 >> outfile.pce
|
||||
</verb></tscreen>
|
||||
|
||||
<sect2>Mednafen<p>
|
||||
Available at <url
|
||||
url="https://mednafen.github.io/releases/">:
|
||||
|
||||
Mednafen is a multi system emulator that emulates a couple of the supported
|
||||
targets of cc65: Apple II/II+, Atari Lynx, Nintendo Entertainment System and
|
||||
PC Engine/TurboGrafx 16.
|
||||
|
||||
<tscreen><verb>
|
||||
mednafen -force_module pce <image.pce>
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
<sect1>Contributions wanted<p>
|
||||
|
||||
We need your help! Recommended emulators and instructions for other targets
|
||||
|
|
|
@ -166,6 +166,7 @@ Here is a description of all of the command-line options:
|
|||
<item>apple2
|
||||
<item>apple2enh
|
||||
<item>atari2600
|
||||
<item>atari7800
|
||||
<item>atari
|
||||
<item>atarixl
|
||||
<item>atmos
|
||||
|
@ -760,7 +761,7 @@ There's a library subroutine called <tt/copydata/ (in a module named
|
|||
look at it's inner workings before using it!
|
||||
|
||||
|
||||
<sect1>Other MEMORY area attributes<p>
|
||||
<sect1>Other MEMORY area attributes<label id="MEMORY"><p>
|
||||
|
||||
There are some other attributes not covered above. Before starting the
|
||||
reference section, I will discuss the remaining things here.
|
||||
|
@ -822,7 +823,6 @@ that has a segment reference (for example a symbol). The result of this
|
|||
function is the value of the bank attribute for the run memory area of the
|
||||
segment.
|
||||
|
||||
|
||||
<sect1>Other SEGMENT attributes<p>
|
||||
|
||||
Segments may be aligned to some memory boundary. Specify "<tt/align = num/" to
|
||||
|
@ -887,7 +887,7 @@ also for a segment. The value must be an integer between 0 and 255. It is used
|
|||
as the fill value for space reserved by the assembler's <tt/.ALIGN/ and <tt/.RES/
|
||||
commands. It is also used as the fill value for space between sections (part of a
|
||||
segment that comes from one object file) caused by alignment, but not for
|
||||
space that preceeds the first section.
|
||||
space that precedes the first section.
|
||||
|
||||
To suppress the warning, the linker issues if it encounters a segment that is
|
||||
not found in any of the input files, use "<tt/optional=yes/" as an additional
|
||||
|
|
|
@ -59,6 +59,9 @@ Functions that are <em/not/ available:
|
|||
Functions not available on all supported systems:
|
||||
|
||||
<itemize>
|
||||
<item><tt>clock</tt>: Support depends on the capabilities of the target
|
||||
machine.
|
||||
<p>
|
||||
<item><tt>fopen/fread/fwrite/fclose/fputs/fgets/fscanf</tt>: The functions
|
||||
are built on open/read/write/close. Those latter functions are not available
|
||||
on all systems.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<article>
|
||||
<title>PC-Engine (TurboGrafx 16) System-specific information for cc65
|
||||
<author><url url="mailto:groepaz@gmx.net" name="Groepaz/Hitmen">,<newline>
|
||||
<author><url url="mailto:groepaz@gmx.net" name="Groepaz">,<newline>
|
||||
<url url="mailto:greg.king5@verizon.net" name="Greg King">
|
||||
|
||||
<abstract>
|
||||
|
@ -206,11 +206,6 @@ following functions (and a few others):
|
|||
|
||||
<sect>Other hints<p>
|
||||
|
||||
<itemize>
|
||||
<item><url url="https://mednafen.github.io/" name= "Mednafen"> is a good
|
||||
emulator to use for the PC-Engine.
|
||||
</itemize>
|
||||
|
||||
Some useful resources on PCE coding:
|
||||
|
||||
<itemize>
|
||||
|
|
|
@ -195,10 +195,10 @@ No mouse drivers are currently available for the Plus/4.
|
|||
|
||||
<tag><tt/plus4-stdser.ser (plus4_stdser_ser)/</tag>
|
||||
Driver for the 6551 ACIA chip built into the Plus/4. Supports up to 19200
|
||||
baud, hardware flow control (RTS/CTS) and interrupt driven receives. Note
|
||||
that because of the peculiarities of the 6551 chip transmits are not
|
||||
interrupt driven, and the transceiver blocks if the receiver asserts flow
|
||||
control because of a full buffer.
|
||||
baud, requires hardware flow control (RTS/CTS) and does interrupt driven
|
||||
receives. Note that because of the peculiarities of the 6551 chip transmits
|
||||
are not interrupt driven, and the transceiver blocks if the receiver asserts
|
||||
flow control because of a full buffer.
|
||||
|
||||
You need an adapter to use the builtin port, since the output levels
|
||||
available at the user port don't follow the RS232 standard.
|
||||
|
|
|
@ -85,7 +85,7 @@ Please note:
|
|||
<item> The macro '<tt>SMC_StoreValue</tt>' takes care, that the store
|
||||
operation will occur on the value-position of a SMC-instruction. As
|
||||
you will see, other macros influence other instruction part positions.
|
||||
There is no consistency check, if the targeted SMC instruction acually
|
||||
There is no consistency check, if the targeted SMC instruction actually
|
||||
contains a value. Storing a 'value' on an immplied SMC instruction
|
||||
would corrupt the following memory cell!
|
||||
</enum>
|
||||
|
@ -257,7 +257,7 @@ SMC LoadDefault, { LDX #25 }
|
|||
<label id="Load value">
|
||||
<tag><tt>SMC_LoadValue label (, register)</tt></tag>
|
||||
|
||||
Retreives the value of a SMC line.
|
||||
Retrieves the value of a SMC line.
|
||||
|
||||
Example:
|
||||
<tscreen><verb>
|
||||
|
@ -582,7 +582,7 @@ into a single instruction line. These can be changed of course too.
|
|||
Line 10,11: These lines construct a branch operation for line 8: The
|
||||
X-register will be used to change it from 'inc StoreAccuFirstSection+2'
|
||||
(high-byte operation) to 'beq restoreCode'. Please note: To calculate the
|
||||
relaive branch offset, we introduced a second label
|
||||
relative branch offset, we introduced a second label
|
||||
('RestoreCodeBranchBaseAdr') for to calculate it. Some could also use the
|
||||
internal name of the SMC label, but you should abstain to do so - it may be
|
||||
changed in the future...
|
||||
|
|
173
doc/sym1.sgml
Normal file
173
doc/sym1.sgml
Normal file
|
@ -0,0 +1,173 @@
|
|||
<!doctype linuxdoc system>
|
||||
|
||||
<article>
|
||||
<title>Synertek Systems Sym-1 specific information for cc65
|
||||
<author><url url="mailto:wayne@parhamdata.com" name="Wayne Parham">
|
||||
|
||||
<abstract>
|
||||
An overview over the Sym-1 runtime system as it is implemented for the cc65 C compiler.
|
||||
</abstract>
|
||||
|
||||
<!-- Table of contents -->
|
||||
<toc>
|
||||
|
||||
<!-- Begin the document -->
|
||||
|
||||
<sect>Overview<p>
|
||||
|
||||
This file contains an overview of the Sym-1 runtime system as it comes with the cc65 C compiler.
|
||||
It describes the memory layout, Sym-1 specific header files, available drivers, and any pitfalls
|
||||
specific to the platform.
|
||||
|
||||
Please note that Sym-1 specific functions are just mentioned here, they are described in detail
|
||||
in the separate <url url="funcref.html" name="function reference">. Even functions marked as
|
||||
"platform dependent" may be available on more than one platform. Please see the
|
||||
function reference for more information.
|
||||
|
||||
<sect>Binary format<p>
|
||||
|
||||
The output format generated by the linker for the Sym-1 target is a raw binary BIN file, which
|
||||
is essentially a memory image. You can convert this to a HEX file using BIN2HEX, which is a
|
||||
popular open-source conversion utility program. A HEX file has ASCII representations of the
|
||||
hexadecimal byte values of the machine-language program. So the HEX file can be transferred
|
||||
to the Sym-1 using the RS-232 terminal port, just as if the machine-code was entered by hand.
|
||||
Enter 'm 200' in the monitor and start the HEX file transfer.
|
||||
|
||||
<p>
|
||||
|
||||
Included with this distribution is a 4k configuration file and a 32k config file. The Sym-1
|
||||
on-board memory is limited to 4 kbytes but system memory can be increased to 32 kbytes of
|
||||
contiguous RAM with aftermarket add-on boards. So choose the config file that matches your
|
||||
system configuration before compiling and linking user programs.
|
||||
|
||||
<sect>Memory layout<p>
|
||||
|
||||
The ROMs and I/O areas are defined in the configuration files, as are most of the entry points
|
||||
for useful subroutines in the Sym-1 monitor ROM. cc65 generated programs compiled and linked
|
||||
using 4k config run in the memory range of $200 - $0FFF. The 32k config expands
|
||||
this range to $7FFF. Memory above 32k can be used to extend the heap, as described below.
|
||||
The starting memory location and entry point for running the program is $200, so when the
|
||||
program is transferred to the Sym-1, it is executed by typing 'g 200'. The system returns control
|
||||
back to the monitor ROM when the program terminates, providing the '.' prompt.
|
||||
|
||||
Special locations:
|
||||
|
||||
<descrip>
|
||||
<tag/Text screen/
|
||||
Conio support is not currently available for the Sym-1. But stdio console functions are available.
|
||||
|
||||
<tag/Stack/
|
||||
The C runtime stack is located at $0FFF on 4kb Syms, or at $7FFF for 32kb systems.
|
||||
The stack always grows downwards.
|
||||
|
||||
<tag/Heap/
|
||||
The C heap is located at the end of the program and grows towards the C runtime stack. Extended
|
||||
memory can be added to the heap, as described below.
|
||||
|
||||
</descrip><p>
|
||||
|
||||
<sect>Platform specific header files<p>
|
||||
|
||||
Programs containing Sym-1 code may use the <tt/sym1.h/ header file. See the header file for more information.
|
||||
|
||||
<sect1>Hardware access<p>
|
||||
|
||||
The pseudo variables declared in the <tt/sym1.inc/ include file allow access to hardware located in the
|
||||
address space. See the include file for more information.
|
||||
|
||||
<sect>Loadable drivers<p>
|
||||
|
||||
<sect1>Graphics drivers<p>
|
||||
|
||||
No graphics drivers are currently available for the Sym-1.
|
||||
|
||||
<sect1>Extended memory drivers<p>
|
||||
|
||||
There are no extended memory drivers for the Sym-1. However, there is a way to access memory beyond the
|
||||
32kb boundary, if extended memory is physically present in the system. See the example program,
|
||||
symExtendedMemory, in the samples directory.
|
||||
|
||||
<sect1>Joystick drivers<p>
|
||||
|
||||
No joystick driver is currently available for the Sym-1.
|
||||
|
||||
<sect1>Mouse drivers<p>
|
||||
|
||||
No mouse drivers are currently available for the Sym-1.
|
||||
|
||||
<sect1>RS232 device drivers<p>
|
||||
|
||||
No communication port drivers are currently available for the Sym-1. It has only the "master console"
|
||||
e.g. stdin and stdout.
|
||||
|
||||
<sect>Limitations<p>
|
||||
|
||||
<sect1>Disk I/O<p>
|
||||
|
||||
The existing library for the Sym-1 doesn't implement C file I/O.
|
||||
|
||||
To be more specific, this limitation means that you cannot use any of the following functions (and a few others):
|
||||
|
||||
<itemize>
|
||||
<item>fopen
|
||||
<item>fclose
|
||||
<item>fread
|
||||
<item>fwrite
|
||||
<item>...
|
||||
</itemize>
|
||||
|
||||
<sect>Other hints<p>
|
||||
|
||||
<sect1>sym1.h<p>
|
||||
This header exposes Sym-specific I/O functions that are useful for reading and writing its ports and front panel.
|
||||
See the <tt/sym1.h/ include file for a list of the functions available.
|
||||
|
||||
<sect2>Limited memory applications<p>
|
||||
|
||||
As stated earlier, there are config files for 4kb and 32kb systems. If you have 32kb RAM, then you will probably
|
||||
want to use the sym1-32k configuration, but if not - if you are using the sym1-4k configuration - then you may
|
||||
want to use functions like getchar, putchar, gets and puts rather than functions like scanf and printf.
|
||||
Printf, for example, requires about 1KB because it needs to know how to process all the format specifiers.
|
||||
|
||||
<sect3>Using extended memory<p>
|
||||
|
||||
Memory may be physically present that is addressed at locations above the monitor ROM at $8000. This extended
|
||||
memory is accessible by adding to the heap, as described in the symExtendedMemory sample program.
|
||||
|
||||
<sect4>Sample programs<p>
|
||||
|
||||
All the samples will run on the "stock" 4kb Sym-1, except for symIO and symNotepad, which require 32kb.
|
||||
Additionally, symExtendedMemory shows how to access memory above 32kb, so it expects more than 32kb.
|
||||
These sample programs can be found in the samples/sym1 directory:
|
||||
|
||||
<itemize>
|
||||
<item>symHello prints "Hello World!" and then inputs characters, which are echoed on the screen.
|
||||
It also makes a "beep" sound.</item>
|
||||
<item>symTiny does the same as symHello, but does it with puts() rather than printf() to show the difference
|
||||
in compiled binary size.</item>
|
||||
<item>symDisplay allows entry of a message, which is then displayed by scrolling it across the front panel display.</item>
|
||||
<item>symIO allows access to the Sym-1 digital I/O ports.</item>
|
||||
<item>symNotepad is a simple text entry/retrieval program that uses tape storage.</item>
|
||||
<item>symExtendedMemory demonstrates how to access upper-memory and add it to the heap.</item>
|
||||
</itemize>
|
||||
|
||||
<sect>License<p>
|
||||
|
||||
This software is provided 'as-is', without any expressed or implied warranty. In no event will the authors be held
|
||||
liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter
|
||||
it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
<enum>
|
||||
<item> The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
<item> Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
<item> This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
</enum>
|
||||
|
||||
</article>
|
|
@ -79,7 +79,7 @@ in Telemon, there is no way to load a binary easily.
|
|||
|
||||
Stratsed (the Telestrat operating system) handles files management. Stratsed
|
||||
is loaded to memory from floppy disk. Stratsed vector are declared in asminc/telestrat.inc.
|
||||
But, reverse engineering is required to find how theses vectors works. Please, note that
|
||||
But, reverse engineering is required to find how these vectors works. Please, note that
|
||||
Stratsed is located in overlay memory (bank 0)
|
||||
|
||||
There is no tool to insert a binary in a Stratsed floppy disk.
|
||||
|
@ -194,7 +194,7 @@ if you get input from keyboard by conio cgetc function, you will get direction f
|
|||
|
||||
Anyway, if you don't want to use ROM, you can use joysticks standard drivers in your code.
|
||||
|
||||
The standard driver manages two joysticks. Only one button is managed for theses joysticks.
|
||||
The standard driver manages two joysticks. Only one button is managed for these joysticks.
|
||||
|
||||
Telestrat can handle one button for the left port, and three buttons for the right port (but this port was designed for a mouse).
|
||||
|
||||
|
|
|
@ -555,7 +555,7 @@ tgi_init(); //Set up the default palette and clear the screen.
|
|||
<descrip>
|
||||
<tag/Function/Install an already loaded driver and return an error code.
|
||||
<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ tgi_install (void* driver);/
|
||||
<tag/Declaration/<tt/unsigned char __fastcall__ tgi_install (const void* driver);/
|
||||
<tag/Description/The function installs a driver that was already loaded into
|
||||
memory (or linked statically to the program). It returns an error code
|
||||
(<tt/TGI_ERR_OK/ in case of success).
|
||||
|
|
|
@ -105,7 +105,7 @@ struct __dos2x {
|
|||
unsigned char* zbufp; /* points to user filename */
|
||||
unsigned char* zdrva; /* points to serveral buffers (mostly VTOC) */
|
||||
unsigned char* zsba; /* points to sector buffer */
|
||||
unsigned char errno; /* number of occured error */
|
||||
unsigned char errno; /* number of occurred error */
|
||||
};
|
||||
|
||||
typedef struct __dos2x dos2x_t;
|
||||
|
|
63
include/_maria.h
Normal file
63
include/_maria.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*****************************************************************************/
|
||||
/* */
|
||||
/* _maria.h */
|
||||
/* */
|
||||
/* Atari 7800, Maria chip register hardware structures */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
/* claim that you wrote the original software. If you use this software */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* MARIA registers
|
||||
*/
|
||||
struct __maria {
|
||||
unsigned char bkgrnd;
|
||||
unsigned char p0c1;
|
||||
unsigned char p0c2;
|
||||
unsigned char p0c3;
|
||||
unsigned char wsync;
|
||||
unsigned char p1c1;
|
||||
unsigned char p1c2;
|
||||
unsigned char p1c3;
|
||||
unsigned char mstat;
|
||||
unsigned char p2c1;
|
||||
unsigned char p2c2;
|
||||
unsigned char p2c3;
|
||||
unsigned char dpph;
|
||||
unsigned char p3c1;
|
||||
unsigned char p3c2;
|
||||
unsigned char p3c3;
|
||||
unsigned char dppl;
|
||||
unsigned char p4c1;
|
||||
unsigned char p4c2;
|
||||
unsigned char p4c3;
|
||||
unsigned char chbase;
|
||||
unsigned char p5c1;
|
||||
unsigned char p5c2;
|
||||
unsigned char p5c3;
|
||||
unsigned char offset;
|
||||
unsigned char p6c1;
|
||||
unsigned char p6c2;
|
||||
unsigned char p6c3;
|
||||
unsigned char ctrl;
|
||||
unsigned char p7c1;
|
||||
unsigned char p7c2;
|
||||
unsigned char p7c3;
|
||||
};
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 2003 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
65
include/atari7800.h
Normal file
65
include/atari7800.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*****************************************************************************/
|
||||
/* */
|
||||
/* Atari VCS 7800 TIA & RIOT registers addresses */
|
||||
/* */
|
||||
/* Karri Kaksonen (karri@sipo.fi), 2022 */
|
||||
/* */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef _ATARI7800_H
|
||||
#define _ATARI7800_H
|
||||
|
||||
/* Check for errors */
|
||||
#if !defined(__ATARI7800__)
|
||||
# error This module may only be used when compiling for the Atari 7800!
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* Color defines */
|
||||
#define COLOR_BLACK 0x00
|
||||
#define COLOR_GREY 0x01
|
||||
#define COLOR_LIGHTGREY 0x02
|
||||
#define COLOR_WHITE 0x03
|
||||
|
||||
/* TGI color defines (default palette) */
|
||||
#define TGI_COLOR_BLACK COLOR_BLACK
|
||||
#define TGI_COLOR_GREY COLOR_GREY
|
||||
#define TGI_COLOR_LIGHTGREY COLOR_LIGHTGREY
|
||||
#define TGI_COLOR_WHITE COLOR_WHITE
|
||||
|
||||
/* Masks for joy_read */
|
||||
#define JOY_RIGHT_MASK 0x80
|
||||
#define JOY_LEFT_MASK 0x40
|
||||
#define JOY_DOWN_MASK 0x20
|
||||
#define JOY_UP_MASK 0x10
|
||||
#define JOY_BTN_1_MASK 0x01
|
||||
#define JOY_BTN_2_MASK 0x02
|
||||
|
||||
#define JOY_BTN_A_MASK JOY_BTN_1_MASK
|
||||
#define JOY_BTN_B_MASK JOY_BTN_2_MASK
|
||||
|
||||
#define JOY_BTN_A(v) ((v) & JOY_BTN_A_MASK)
|
||||
#define JOY_BTN_B(v) ((v) & JOY_BTN_B_MASK)
|
||||
|
||||
/* No support for dynamically loadable drivers */
|
||||
#define DYN_DRV 0
|
||||
|
||||
#include <_tia.h>
|
||||
#define TIA (*(struct __tia*)0x0000)
|
||||
|
||||
#include <_riot.h>
|
||||
#define RIOT (*(struct __riot*)0x0280)
|
||||
|
||||
#include <_maria.h>
|
||||
#define MARIA (*(struct __maria*)0x0020)
|
||||
|
||||
/* End of atari7800.h */
|
||||
#endif
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2003 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
/* from ASCII to screen-code mapping, so you can write directly */
|
||||
/* to the screen memory. */
|
||||
/* */
|
||||
/* If this include is used, no additional macroes are needed. */
|
||||
/* If this include is used, no additional macros are needed. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
@ -59,21 +59,21 @@ unsigned long __fastcall__ udiv32by16r16 (unsigned long rhs, unsigned lhs);
|
|||
*/
|
||||
|
||||
int __fastcall__ imul8x8r16 (signed char lhs, signed char rhs);
|
||||
/* Multiplicate two signed 8 bit to yield an signed 16 bit result */
|
||||
/* Multiply two signed 8 bit to yield an signed 16 bit result */
|
||||
|
||||
long __fastcall__ imul16x16r32 (int lhs, int rhs);
|
||||
/* Multiplicate two signed 16 bit to yield a signed 32 bit result */
|
||||
/* Multiply two signed 16 bit to yield a signed 32 bit result */
|
||||
|
||||
unsigned __fastcall__ umul8x8r16 (unsigned char lhs, unsigned char rhs);
|
||||
/* Multiplicate two unsigned 8 bit to yield an unsigned 16 bit result */
|
||||
/* Multiply two unsigned 8 bit to yield an unsigned 16 bit result */
|
||||
|
||||
unsigned long __fastcall__ umul16x8r32 (unsigned lhs, unsigned char rhs);
|
||||
/* Multiplicate an unsigned 16 bit by an unsigned 8 bit number yielding a 24
|
||||
/* Multiply an unsigned 16 bit by an unsigned 8 bit number yielding a 24
|
||||
** bit unsigned result that is extended to 32 bits for easier handling from C.
|
||||
*/
|
||||
|
||||
unsigned long __fastcall__ umul16x16r32 (unsigned lhs, unsigned rhs);
|
||||
/* Multiplicate two unsigned 16 bit to yield an unsigned 32 bit result */
|
||||
/* Multiply two unsigned 16 bit to yield an unsigned 32 bit result */
|
||||
|
||||
unsigned int __fastcall__ mul20 (unsigned char value);
|
||||
/* Multiply an 8 bit unsigned value by 20 and return the 16 bit unsigned
|
||||
|
|
|
@ -70,9 +70,9 @@
|
|||
#define COLOR_WHITE 15
|
||||
|
||||
/* Protos */
|
||||
void __fastcall__ psg_outb(unsigned char b);
|
||||
void __fastcall__ psg_delay(unsigned char b);
|
||||
void psg_silence(void);
|
||||
void __fastcall__ bios_playsound(void *a, unsigned char b);
|
||||
void __fastcall__ psg_outb (unsigned char b);
|
||||
void __fastcall__ psg_delay (unsigned char b);
|
||||
void psg_silence (void);
|
||||
void __fastcall__ bios_playsound (const void *a, unsigned char b);
|
||||
|
||||
#endif /* #ifndef _CVISION_H */
|
||||
|
|
|
@ -278,6 +278,9 @@ struct __vera {
|
|||
#define VIA1 (*(volatile struct __6522 *)0x9F60)
|
||||
#define VIA2 (*(volatile struct __6522 *)0x9F70)
|
||||
|
||||
#define RAM_BANK (VIA1.pra)
|
||||
#define ROM_BANK (VIA1.prb)
|
||||
|
||||
/* A structure with the x16emu's settings registers */
|
||||
struct __emul {
|
||||
unsigned char debug; /* Boolean: debugging enabled */
|
||||
|
@ -295,7 +298,7 @@ struct __emul {
|
|||
#define EMULATOR (*(volatile struct __emul *)0x9FB0)
|
||||
|
||||
/* An array window into the half Mebibyte or two Mebibytes of banked RAM */
|
||||
#define BANK_RAM ((unsigned char[0x2000])0xA000)
|
||||
#define BANK_RAM ((unsigned char *)0xA000)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ unsigned char __fastcall__ em_load_driver (const char* driver);
|
|||
unsigned char em_unload (void);
|
||||
/* Uninstall, then unload the currently loaded driver. */
|
||||
|
||||
unsigned char __fastcall__ em_install (void* driver);
|
||||
unsigned char __fastcall__ em_install (const void* driver);
|
||||
/* Install an already loaded driver. Return an error code. */
|
||||
|
||||
unsigned char em_uninstall (void);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2004 Ullrich von Bassewitz */
|
||||
/* Römerstraße 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -145,6 +145,8 @@
|
|||
|
||||
/* constants for the conio implementation */
|
||||
#define COLOR_BLACK 0x03
|
||||
#define COLOR_GRAY2 0x02
|
||||
#define COLOR_GRAY1 0x01
|
||||
#define COLOR_WHITE 0x00
|
||||
|
||||
#define CH_HLINE 1
|
||||
|
|
|
@ -43,7 +43,7 @@ void __fastcall__ BitOtherClip(void *proc1, void *proc2, char skipl,
|
|||
char skipr, unsigned skiptop,
|
||||
struct iconpic *myIcon);
|
||||
|
||||
void __fastcall__ GraphicsString(char *myGfxString);
|
||||
void __fastcall__ GraphicsString(const void *myGfxString);
|
||||
|
||||
#ifdef __GEOS_CBM__
|
||||
void SetNewMode(void);
|
||||
|
|
|
@ -89,7 +89,7 @@ unsigned char __fastcall__ joy_load_driver (const char* driver);
|
|||
unsigned char joy_unload (void);
|
||||
/* Uninstall, then unload the currently loaded driver. */
|
||||
|
||||
unsigned char __fastcall__ joy_install (void* driver);
|
||||
unsigned char __fastcall__ joy_install (const void* driver);
|
||||
/* Install an already loaded driver. Return an error code. */
|
||||
|
||||
unsigned char joy_uninstall (void);
|
||||
|
|
|
@ -63,6 +63,20 @@
|
|||
|
||||
#define ULONG_MAX 4294967295UL
|
||||
|
||||
/* These defines that are platform dependent */
|
||||
#if defined(__APPLE2__)
|
||||
# define PATH_MAX (64+1)
|
||||
#elif defined(__ATARI__)
|
||||
# define PATH_MAX (63+1)
|
||||
#elif defined(__CBM__)
|
||||
# define PATH_MAX (255) /* should be 256+1, see libsrc/common/_cmd.s why it's not */
|
||||
#elif defined(__LUNIX__)
|
||||
# define PATH_MAX (80+1)
|
||||
#elif defined(__TELESTRAT__)
|
||||
# define PATH_MAX (50+1)
|
||||
#else
|
||||
# define PATH_MAX (16+1)
|
||||
#endif
|
||||
|
||||
|
||||
/* End of limits.h */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2005 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -52,24 +52,25 @@
|
|||
|
||||
|
||||
/* Color defines */
|
||||
#define COLOR_BLACK 0x00
|
||||
#define COLOR_RED 0x01
|
||||
#define COLOR_PINK 0x02
|
||||
#define COLOR_LIGHTGREY 0x03
|
||||
#define COLOR_GREY 0x04
|
||||
#define COLOR_DARKGREY 0x05
|
||||
#define COLOR_BROWN 0x06
|
||||
#define COLOR_PEACH 0x07
|
||||
#define COLOR_YELLOW 0x08
|
||||
#define COLOR_LIGHTGREEN 0x09
|
||||
#define COLOR_GREEN 0x0A
|
||||
#define COLOR_DARKBROWN 0x0B
|
||||
#define COLOR_TRANSPARENT 0x00
|
||||
#define COLOR_BLACK 0x01
|
||||
#define COLOR_RED 0x02
|
||||
#define COLOR_PINK 0x03
|
||||
#define COLOR_LIGHTGREY 0x04
|
||||
#define COLOR_GREY 0x05
|
||||
#define COLOR_DARKGREY 0x06
|
||||
#define COLOR_BROWN 0x07
|
||||
#define COLOR_PEACH 0x08
|
||||
#define COLOR_YELLOW 0x09
|
||||
#define COLOR_LIGHTGREEN 0x0A
|
||||
#define COLOR_GREEN 0x0B
|
||||
#define COLOR_VIOLET 0x0C
|
||||
#define COLOR_BLUE 0x0D
|
||||
#define COLOR_LIGHTBLUE 0x0E
|
||||
#define COLOR_WHITE 0x0F
|
||||
|
||||
/* TGI color defines (default palette) */
|
||||
#define TGI_COLOR_TRANSPARENT COLOR_TRANSPARENT
|
||||
#define TGI_COLOR_BLACK COLOR_BLACK
|
||||
#define TGI_COLOR_RED COLOR_RED
|
||||
#define TGI_COLOR_PINK COLOR_PINK
|
||||
|
@ -81,7 +82,6 @@
|
|||
#define TGI_COLOR_YELLOW COLOR_YELLOW
|
||||
#define TGI_COLOR_LIGHTGREEN COLOR_LIGHTGREEN
|
||||
#define TGI_COLOR_GREEN COLOR_GREEN
|
||||
#define TGI_COLOR_DARKBROWN COLOR_DARKBROWN
|
||||
#define TGI_COLOR_VIOLET COLOR_VIOLET
|
||||
#define TGI_COLOR_BLUE COLOR_BLUE
|
||||
#define TGI_COLOR_LIGHTBLUE COLOR_LIGHTBLUE
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 2003-2006, Ullrich von Bassewitz */
|
||||
/* Römerstraße 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 2003 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2006, Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -136,7 +136,7 @@ unsigned char __fastcall__ ser_load_driver (const char* driver);
|
|||
unsigned char ser_unload (void);
|
||||
/* Uninstall, then unload the currently loaded driver. */
|
||||
|
||||
unsigned char __fastcall__ ser_install (void* driver);
|
||||
unsigned char __fastcall__ ser_install (const void* driver);
|
||||
/* Install an already loaded driver. Return an error code. */
|
||||
|
||||
unsigned char ser_uninstall (void);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 2002-2005, Ullrich von Bassewitz */
|
||||
/* Römerstraße 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2004 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
|
||||
|
@ -64,18 +65,7 @@ extern FILE* stderr;
|
|||
#define SEEK_SET 2
|
||||
#define TMP_MAX 256
|
||||
|
||||
/* Standard defines that are platform dependent */
|
||||
#if defined(__APPLE2__)
|
||||
# define FILENAME_MAX (64+1)
|
||||
#elif defined(__ATARI__)
|
||||
# define FILENAME_MAX (12+1)
|
||||
#elif defined(__LUNIX__)
|
||||
# define FILENAME_MAX (80+1)
|
||||
#elif defined(__TELESTRAT__)
|
||||
# define FILENAME_MAX (50+1)
|
||||
#else
|
||||
# define FILENAME_MAX (16+1)
|
||||
#endif
|
||||
#define FILENAME_MAX PATH_MAX
|
||||
#define L_tmpnam FILENAME_MAX
|
||||
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ int __fastcall__ stricmp (const char* s1, const char* s2); /* DOS/Windows */
|
|||
int __fastcall__ strcasecmp (const char* s1, const char* s2); /* Same for Unix */
|
||||
int __fastcall__ strnicmp (const char* s1, const char* s2, size_t count); /* DOS/Windows */
|
||||
int __fastcall__ strncasecmp (const char* s1, const char* s2, size_t count); /* Same for Unix */
|
||||
size_t __fastcall__ strnlen (const char* s, size_t maxlen); /* POSIX.1-2008 */
|
||||
char* __fastcall__ strlwr (char* s);
|
||||
char* __fastcall__ strlower (char* s);
|
||||
char* __fastcall__ strupr (char* s);
|
||||
|
|
165
include/sym1.h
Normal file
165
include/sym1.h
Normal file
|
@ -0,0 +1,165 @@
|
|||
/*****************************************************************************/
|
||||
/* */
|
||||
/* sym1.h */
|
||||
/* */
|
||||
/* Sym-1 system-specific definitions */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2020 Wayne Parham */
|
||||
/* EMail: wayne@parhamdata.com */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
/* warranty. In no event will the authors be held liable for any damages */
|
||||
/* arising from the use of this software. */
|
||||
/* */
|
||||
/* Permission is granted to anyone to use this software for any purpose, */
|
||||
/* including commercial applications, and to alter it and redistribute it */
|
||||
/* freely, subject to the following restrictions: */
|
||||
/* */
|
||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||
/* claim that you wrote the original software. If you use this software */
|
||||
/* in a product, an acknowledgment in the product documentation would be */
|
||||
/* appreciated but is not required. */
|
||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||
/* be misrepresented as being the original software. */
|
||||
/* 3. This notice may not be removed or altered from any source */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef _SYM1_H
|
||||
#define _SYM1_H
|
||||
|
||||
|
||||
|
||||
/* Check for errors */
|
||||
#if !defined(__SYM1__)
|
||||
# error This module may only be used when compiling for the Sym-1!
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* Display character definitions */
|
||||
#define DISP_1 0x06 // '1'
|
||||
#define DISP_2 0x5B // '2'
|
||||
#define DISP_3 0x4F // '3'
|
||||
#define DISP_4 0x66 // '4'
|
||||
#define DISP_5 0x6D // '5'
|
||||
#define DISP_6 0x7C // '6'
|
||||
#define DISP_7 0x07 // '7'
|
||||
#define DISP_8 0x7F // '8'
|
||||
#define DISP_9 0x67 // '9'
|
||||
#define DISP_0 0x3F // '0'
|
||||
#define DISP_A 0x77 // 'A'
|
||||
#define DISP_b 0x7C // 'b'
|
||||
#define DISP_C 0x39 // 'C'
|
||||
#define DISP_c 0x58 // 'c'
|
||||
#define DISP_d 0x5E // 'd'
|
||||
#define DISP_E 0x79 // 'E'
|
||||
#define DISP_e 0x7B // 'e'
|
||||
#define DISP_F 0x71 // 'F'
|
||||
#define DISP_G 0x7D // 'G'
|
||||
#define DISP_g 0x6F // 'g'
|
||||
#define DISP_H 0x76 // 'H'
|
||||
#define DISP_h 0x74 // 'h'
|
||||
#define DISP_I 0x06 // 'I'
|
||||
#define DISP_i 0x04 // 'i'
|
||||
#define DISP_J 0x1E // 'J'
|
||||
#define DISP_K 0x74 // 'K'
|
||||
#define DISP_L 0x38 // 'L'
|
||||
#define DISP_M_1 0x33 // 'M'
|
||||
#define DISP_M_2 0x27 // 2nd half
|
||||
#define DISP_n 0x54 // 'n'
|
||||
#define DISP_O 0x3F // 'O'
|
||||
#define DISP_o 0x5C // 'o'
|
||||
#define DISP_P 0x73 // 'P'
|
||||
#define DISP_q 0x67 // 'q'
|
||||
#define DISP_r 0x50 // 'r'
|
||||
#define DISP_S 0x6D // 'S'
|
||||
#define DISP_t 0x46 // 't'
|
||||
#define DISP_U 0x3E // 'U'
|
||||
#define DISP_u 0x1C // 'u'
|
||||
#define DISP_V_1 0x64 // 'V'
|
||||
#define DISP_V_2 0x52 // 2nd half
|
||||
#define DISP_W_1 0x3C // 'W'
|
||||
#define DISP_W_2 0x1E // 2nd half
|
||||
#define DISP_Y 0x6E // 'Y'
|
||||
#define DISP_Z 0x5B // 'Z'
|
||||
#define DISP_SPACE 0x00 // ' '
|
||||
#define DISP_PERIOD 0x80 // '.'
|
||||
#define DISP_HYPHEN 0x40 // '-'
|
||||
#define DISP_APOSTR 0x20 // '''
|
||||
#define DISP_EQUAL 0x41 // '='
|
||||
#define DISP_3_BAR 0x49 // '='
|
||||
#define DISP_BOTTOM 0x08 // '_'
|
||||
#define DISP_TOP 0x01 // Top segment
|
||||
#define DISP_LEFT 0x30 // '|' Left side, both segments
|
||||
#define DISP_RIGHT 0x06 // '|' Right side, both segments
|
||||
#define DISP_DEGREE 0x63 // 'o' An 'o' character in the upper segments
|
||||
#define DISP_HAT 0x23 // 'n' An 'n' character in the upper segments
|
||||
#define DISP_FORK 0x62 // 'u' A 'u' character in the upper segments
|
||||
#define DISP_SLASH 0x51 // '/'
|
||||
#define DISP_BACKSLASH 0x34 // '\'
|
||||
#define DISP_TOP_RIGHT 0x02 // Top right segment
|
||||
#define DISP_TOP_LEFT 0x20 // Top left segment
|
||||
#define DISP_LOW_RIGHT 0x04 // Lower right segment
|
||||
#define DISP_LOW_LEFT 0x10 // Lower left segment
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Hardware */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#include <_6522.h>
|
||||
#define VIA1 (*(struct __6522*)0xA000) // U25
|
||||
#define VIA2 (*(struct __6522*)0xA800) // U28
|
||||
#define VIA3 (*(struct __6522*)0xAC00) // U29
|
||||
|
||||
|
||||
struct _display {
|
||||
unsigned char d0; // left-most seven-segment display
|
||||
unsigned char d1; // second seven-segment display
|
||||
unsigned char d2; // third seven-segment display
|
||||
unsigned char d3; // fouth seven-segment display
|
||||
unsigned char d4; // fifth seven-segment display
|
||||
unsigned char d5; // sixth seven-segment display
|
||||
unsigned char d6; // buffer byte to the right
|
||||
};
|
||||
#define DISPLAY (*(struct _display*)0xA640)
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
void beep (void);
|
||||
/* Beep sound. */
|
||||
|
||||
void fdisp (void);
|
||||
/* Flash display */
|
||||
|
||||
int __fastcall__ loadt (unsigned char);
|
||||
/* Read from tape */
|
||||
|
||||
int __fastcall__ dumpt (unsigned char, const void*, const void*);
|
||||
/* Write to tape */
|
||||
|
||||
|
||||
|
||||
/* End of sym1.h */
|
||||
#endif
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 2003 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
/* */
|
||||
/* */
|
||||
/* (C) 2003 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
# include <atari2600.h>
|
||||
#elif defined(__ATARI5200__)
|
||||
# include <atari5200.h>
|
||||
#elif defined(__ATARI7800__)
|
||||
# include <atari7800.h>
|
||||
#elif defined(__ATMOS__)
|
||||
# include <atmos.h>
|
||||
#elif defined(__CBM__)
|
||||
|
|
|
@ -85,6 +85,8 @@
|
|||
#define CH_LTEE '+'
|
||||
#define CH_RTEE '+'
|
||||
#define CH_CROSS '+'
|
||||
#define CH_HLINE '-'
|
||||
#define CH_VLINE '|'
|
||||
#define CH_CURS_UP 11
|
||||
#define CH_CURS_DOWN 10
|
||||
#define CH_CURS_LEFT 8
|
||||
|
@ -98,8 +100,8 @@
|
|||
/* Masks for joy_read */
|
||||
#define JOY_UP_MASK 0x10
|
||||
#define JOY_DOWN_MASK 0x08
|
||||
#define JOY_LEFT_MASK 0x01
|
||||
#define JOY_RIGHT_MASK 0x02
|
||||
#define JOY_LEFT_MASK 0x02
|
||||
#define JOY_RIGHT_MASK 0x01
|
||||
#define JOY_BTN_1_MASK 0x04
|
||||
|
||||
#define JOY_FIRE_MASK JOY_BTN_1_MASK
|
||||
|
@ -119,3 +121,9 @@ void shoot();
|
|||
void explode();
|
||||
|
||||
void kbdclick1();
|
||||
|
||||
/* The following #defines will cause the matching functions calls in conio.h
|
||||
** to be overlaid by macros with the same names, saving the function call
|
||||
** overhead.
|
||||
*/
|
||||
#define _bordercolor(color) COLOR_BLACK
|
||||
|
|
|
@ -82,7 +82,7 @@ void tgi_unload (void);
|
|||
** necessary.
|
||||
*/
|
||||
|
||||
void __fastcall__ tgi_install (void* driver);
|
||||
void __fastcall__ tgi_install (const void* driver);
|
||||
/* Install an already loaded driver. */
|
||||
|
||||
void tgi_uninstall (void);
|
||||
|
|
|
@ -98,11 +98,13 @@ extern struct _timezone {
|
|||
# define CLOCKS_PER_SEC 50
|
||||
#elif defined(__PCE__)
|
||||
# define CLOCKS_PER_SEC 60
|
||||
#elif defined(__GAMATE__)
|
||||
#elif defined(__GAMATE__)
|
||||
# define CLOCKS_PER_SEC 135 /* FIXME */
|
||||
#elif defined(__GEOS__)
|
||||
#elif defined(__GEOS__)
|
||||
# define CLOCKS_PER_SEC 1
|
||||
#else
|
||||
#elif defined(__TELESTRAT__)
|
||||
# define CLOCKS_PER_SEC 10
|
||||
#elif defined(__ATARI__) || defined (__LYNX__)
|
||||
/* Read the clock rate at runtime */
|
||||
clock_t _clocks_per_sec (void);
|
||||
# define CLOCKS_PER_SEC _clocks_per_sec()
|
||||
|
|
|
@ -114,7 +114,8 @@ int __fastcall__ uncompress (unsigned char* dest, unsigned* destLen,
|
|||
*/
|
||||
|
||||
|
||||
unsigned long __fastcall__ adler32 (unsigned long adler, const char* buf,
|
||||
unsigned long __fastcall__ adler32 (unsigned long adler,
|
||||
const unsigned char* buf,
|
||||
unsigned len);
|
||||
|
||||
/*
|
||||
|
@ -140,7 +141,8 @@ unsigned long __fastcall__ adler32 (unsigned long adler, const char* buf,
|
|||
*/
|
||||
|
||||
|
||||
unsigned long __fastcall__ crc32 (unsigned long crc, const char* buf,
|
||||
unsigned long __fastcall__ crc32 (unsigned long crc,
|
||||
const unsigned char* buf,
|
||||
unsigned len);
|
||||
/*
|
||||
Original zlib description:
|
||||
|
|
|
@ -21,6 +21,7 @@ TARGETS = apple2 \
|
|||
atarixl \
|
||||
atari2600 \
|
||||
atari5200 \
|
||||
atari7800 \
|
||||
atmos \
|
||||
creativision \
|
||||
$(CBMS) \
|
||||
|
@ -34,6 +35,7 @@ TARGETS = apple2 \
|
|||
sim6502 \
|
||||
sim65c02 \
|
||||
supervision \
|
||||
sym1 \
|
||||
telestrat
|
||||
|
||||
DRVTYPES = emd \
|
||||
|
|
|
@ -129,7 +129,7 @@ setbuf: lda #$00 ; Low byte
|
|||
.assert MLI::OPEN::PATHNAME = MLI::INFO::PATHNAME, error
|
||||
|
||||
; Lower file level to avoid program file
|
||||
; being closed by C libary shutdown code
|
||||
; being closed by C library shutdown code
|
||||
ldx LEVEL
|
||||
stx level
|
||||
beq :+
|
||||
|
@ -185,13 +185,13 @@ setbuf: lda #$00 ; Low byte
|
|||
lda #$00 ; '\0'
|
||||
beq :- ; Branch always
|
||||
|
||||
; Call loader stub after C libary shutdown
|
||||
; Call loader stub after C library shutdown
|
||||
: lda #<target
|
||||
ldx #>target
|
||||
sta done+1
|
||||
stx done+2
|
||||
|
||||
; Initiate C libary shutdown
|
||||
; Initiate C library shutdown
|
||||
jmp _exit
|
||||
|
||||
.bss
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue