diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml new file mode 100644 index 000000000..307cbd048 --- /dev/null +++ b/.github/workflows/build-on-pull-request.yml @@ -0,0 +1,191 @@ +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 + 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 SYS=apple2 -C samples + make SYS=apple2 -C samples clean + make SYS=apple2enh -C samples + make SYS=apple2enh -C samples clean + make SYS=atari -C samples + make SYS=atari -C samples clean + make SYS=atarixl -C samples + make SYS=atarixl -C samples clean + make SYS=atari2600 -C samples + make SYS=atari2600 -C samples clean + make SYS=atari5200 -C samples + make SYS=atari5200 -C samples clean + make SYS=atmos -C samples + make SYS=atmos -C samples clean + make SYS=bbc -C samples + make SYS=bbc -C samples clean + make SYS=c128 -C samples + make SYS=c128 -C samples clean + make SYS=c16 -C samples + make SYS=c16 -C samples clean + make SYS=c64 -C samples + make SYS=c64 -C samples clean + make SYS=cbm510 -C samples + make SYS=cbm510 -C samples clean + make SYS=cbm610 -C samples + make SYS=cbm610 -C samples clean + make SYS=creativision -C samples + make SYS=creativision -C samples clean + make SYS=cx16 -C samples + make SYS=cx16 -C samples clean + make SYS=gamate -C samples + make SYS=gamate -C samples clean + make SYS=geos-apple -C samples + make SYS=geos-apple -C samples clean + make SYS=geos-cbm -C samples + make SYS=geos-cbm -C samples clean + make SYS=lunix -C samples + make SYS=lunix -C samples clean + make SYS=lynx -C samples + make SYS=lynx -C samples clean + make SYS=nes -C samples + make SYS=nes -C samples clean + make SYS=osic1p -C samples + make SYS=osic1p -C samples clean + make SYS=pce -C samples + make SYS=pce -C samples clean + make SYS=pet -C samples + make SYS=pet -C samples clean + make SYS=plus4 -C samples + make SYS=plus4 -C samples clean + make SYS=sim6502 -C samples + make SYS=sim6502 -C samples clean + make SYS=sim65c02 -C samples + make SYS=sim65c02 -C samples clean + make SYS=supervision -C samples + make SYS=supervision -C samples clean + make SYS=sym1 -C samples + make SYS=sym1 -C samples clean + make SYS=telestrat -C samples + make SYS=telestrat -C samples clean + make SYS=vic20 -C samples + make SYS=vic20 -C samples clean + - name: Test that the targettest programs can be built. + shell: bash + run: | + make SYS=apple2 -C targettest + make SYS=apple2 -C targettest clean + make SYS=apple2enh -C targettest + make SYS=apple2enh -C targettest clean + make SYS=atari -C targettest + make SYS=atari -C targettest clean + make SYS=atarixl -C targettest + make SYS=atarixl -C targettest clean + make SYS=atari2600 -C targettest + make SYS=atari2600 -C targettest clean + make SYS=atari5200 -C targettest + make SYS=atari5200 -C targettest clean + make SYS=atmos -C targettest + make SYS=atmos -C targettest clean + make SYS=bbc -C targettest + make SYS=bbc -C targettest clean + make SYS=c128 -C targettest + make SYS=c128 -C targettest clean + make SYS=c16 -C targettest + make SYS=c16 -C targettest clean + make SYS=c64 -C targettest + make SYS=c64 -C targettest clean + make SYS=cbm510 -C targettest + make SYS=cbm510 -C targettest clean + make SYS=cbm610 -C targettest + make SYS=cbm610 -C targettest clean + make SYS=creativision -C targettest + make SYS=creativision -C targettest clean + make SYS=cx16 -C targettest + make SYS=cx16 -C targettest clean + make SYS=gamate -C targettest + make SYS=gamate -C targettest clean + make SYS=geos-apple -C targettest + make SYS=geos-apple -C targettest clean + make SYS=geos-cbm -C targettest + make SYS=geos-cbm -C targettest clean + make SYS=lunix -C targettest + make SYS=lunix -C targettest clean + make SYS=lynx -C targettest + make SYS=lynx -C targettest clean + make SYS=nes -C targettest + make SYS=nes -C targettest clean + make SYS=osic1p -C targettest + make SYS=osic1p -C targettest clean + make SYS=pce -C targettest + make SYS=pce -C targettest clean + make SYS=pet -C targettest + make SYS=pet -C targettest clean + make SYS=plus4 -C targettest + make SYS=plus4 -C targettest clean + make SYS=sim6502 -C targettest + make SYS=sim6502 -C targettest clean + make SYS=sim65c02 -C targettest + make SYS=sim65c02 -C targettest clean + make SYS=supervision -C targettest + make SYS=supervision -C targettest clean + make SYS=sym1 -C targettest + make SYS=sym1 -C targettest clean + make SYS=telestrat -C targettest + make SYS=telestrat -C targettest clean + make SYS=vic20 -C targettest + make SYS=vic20 -C targettest clean + - 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 diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml new file mode 100644 index 000000000..83f311568 --- /dev/null +++ b/.github/workflows/snapshot-on-push-master.yml @@ -0,0 +1,107 @@ +name: Snapshot Build +on: + push: + branches: + master +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + 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 + + build_linux: + name: Build, Test and Snaphot (Linux) + runs-on: ubuntu-latest + needs: build_windows + + 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 diff --git a/Makefile b/Makefile index 3331f6fb9..540c214fc 100644 --- a/Makefile +++ b/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 $@ diff --git a/README.md b/README.md index 2a31d42be..33c7d2830 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [Wiki](https://github.com/cc65/wiki/wiki) -[![Build Status](https://app.travis-ci.com/cc65/cc65.svg?branch=master)](https://app.travis-ci.com/cc65/cc65) +[![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 diff --git a/asminc/pet.inc b/asminc/pet.inc index d165bb336..ee96d378c 100644 --- a/asminc/pet.inc +++ b/asminc/pet.inc @@ -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 diff --git a/doc/apple2.sgml b/doc/apple2.sgml index bd01b68dc..09052ade1 100644 --- a/doc/apple2.sgml +++ b/doc/apple2.sgml @@ -33,7 +33,7 @@ more information. The standard binary file format generated by the linker for the Apple ][ target is an file. +url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file. The default load address is $803. parameters. There are -several usefull settings: +several useful settings: @@ -281,7 +281,7 @@ AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is , 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 file. +url="https://nulib.com/library/AppleSingle_AppleDouble.pdf"> file. The default load address is $803. parameters. There are -several usefull settings: +several useful settings: @@ -281,7 +281,7 @@ AppleCommander option to put LOADER.SYSTEM on a ProDOS 8 disk image is , 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 -Sceen memory and display list are moved below the program start address. +Screen memory and display list are moved below the program start address. The ROM is disabled, making the memory in the areas [$C000-$CFFF] and [$D800-$FFF9] available. 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: ... -Please note that memory location 762/$2FA is called " -Please inspect the Technical details