diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..85e083a --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: [digarok] +custom: ["https://paypal.me/dagenbrock"] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..09f1c9a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,58 @@ +on: [push] + +jobs: + cicd_pipeline: + runs-on: ubuntu-latest + name: Run assembly and disk image CICD pipeline + steps: + # CHECKOUT AND ASSEMBLE ON EVERY PUSH, ANY BRANCH + - uses: actions/checkout@v1 + - name: Install Merlin + uses: digarok/install-merlin32-action@v0.1.0 + + - name: Assemble Source + run: | + merlin32 -V src/flapple.s + sed -i.bak "s/^MONO\(.*\)equ.*/MONO\1equ 1/g" src/flapple.s + merlin32 -V src/flapple.s + sed -i.bak "s/^MONO\(.*\)equ.*/MONO\1equ 0/g" src/flapple.s + + + - name: Install Cadius + uses: digarok/install-cadius-action@v0.1.0 + + - name: Make Bootable ProDOS Image + if: startsWith(github.ref, 'refs/tags/v') + run: ./make_po.sh + + # EVERYTHING BELOW IS ONLY WHEN VERSION TAGS PUSHED (i.e. tag like "v0.1") + - name: Create Release + id: create_release + if: startsWith(github.ref, 'refs/tags/v') + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + + - name: Upload Release Asset - 140KB ProDOS Image + if: startsWith(github.ref, 'refs/tags/v') + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./flapple140.po + asset_name: flapple140.po + asset_content_type: application/octet-stream + - name: Upload Release Asset - 800KB ProDOS Image + if: startsWith(github.ref, 'refs/tags/v') + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./flapple800.po + asset_name: flapple800.po + asset_content_type: application/octet-stream diff --git a/.gitignore b/.gitignore index d245efd..0c6711b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,8 @@ gsport config.gsport gsos src/PRODOS +PRODOS* +src/*_Output.txt +src/*.system +flapple800.po +flapple140.po diff --git a/README.md b/README.md index d2f84f5..c92a37b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,28 @@ -flapple -======= +# Flapple Bird Flapple Bird - A de-make of Flappy Bird for the Apple II computer -More information about this project is available at http://dagenbrock.com/flappy +![Flapple Gameplay Image](/assets/flapple_gameplay.png?raw=true "Flapple Bird Gameplay Image") -How to run -========== -You can download either disk image and run it with an emulator or transfer it to the respective media and run it on a real machine (recommended). The 3.5" ProDOS disk version is "flapple800.po", and the 5.25" ProDOS disk version is "flapple140.po". +# Download +💾 **[Download Releases Here](https://github.com/digarok/flapple/releases)** -How to build -============ -This is written to compile on Merlin 8/16, but I believe should work with all later Merlin variants. Load Merlin, then 'L'oad the file "flapple.s", finally hit OpenApple-A to assemble and it should build the "flap.system" file. +# How to run +You can download either disk image and run it with an emulator like [GSplus](https://github.com/digarok/gsplus) or transfer it to the respective media and run it on a real machine (recommended). +- `flapple800.po` is the 3.5" ProDOS disk version (800KB) +- `flapple140.po` is the 5.25" ProDOS disk version (140KB) + +It should automatically boot ProDOS and load the color version of Flapple Bird. There is a Monochrome version of the game included on the disk. To run it, quit with the `q` key, and from the ProDOS selector menu (Bitsy-Bye in 2020) run `fmono.system`. + +# How to build +This was originally written to compile on Merlin 8/16, but it's now maintained using [Merlin32](https://github.com/digarok/merlin32/). + +- Classic Merlin16+ on an Apple IIgs + - Load Merlin, then `L`oad the file "flapple.s", finally hit OpenApple-A to assemble and it should build the "flap.system" file. +- Modern PC builds: + - Assemble with `merlin32 src/flapple.s` + - Make disks with `./make_po.sh` + +Requires having `merlin32` and `cadius` commands available on your system. - -Again, more information about this project is available at http://dagenbrock.com/flappy diff --git a/assets/flapple_gameplay.png b/assets/flapple_gameplay.png new file mode 100644 index 0000000..ff3a633 Binary files /dev/null and b/assets/flapple_gameplay.png differ diff --git a/brun.sh b/brun.sh new file mode 100755 index 0000000..70b56f1 --- /dev/null +++ b/brun.sh @@ -0,0 +1,19 @@ +#!/bin/bash +merlin32 -V . src/flapple.s +if [ $? -ne 0 ]; then + echo "Assembly Failed. Exiting." ; exit 1 +fi + + +#second time with different build flags (MONO=1) +sed -i.bak "s/^MONO\(.*\)equ.*/MONO\1equ 1/g" src/flapple.s +merlin32 -V . src/flapple.s +if [ $? -ne 0 ]; then + echo "Assembly Failed. Exiting." ; exit 1 +fi + +#revert file to original state (MONO=0) +sed -i.bak "s/^MONO\(.*\)equ.*/MONO\1equ 0/g" src/flapple.s + +./make_po.sh +gsplus diff --git a/flapple140.po b/flapple140.po deleted file mode 100644 index 68e60a9..0000000 Binary files a/flapple140.po and /dev/null differ diff --git a/flapple800.po b/flapple800.po deleted file mode 100644 index ea860ef..0000000 Binary files a/flapple800.po and /dev/null differ diff --git a/make_bootable b/make_bootable old mode 100755 new mode 100644 index ee37b68..989d660 --- a/make_bootable +++ b/make_bootable @@ -82,6 +82,8 @@ done echo "" echo "" +# Move build log out of source dir to current dir +mv src/*Output.txt . echo "Look, I'm no expert, but I think everything went pretty well. (BUILD SUCCEEDED!!!)" echo "" diff --git a/make_po.sh b/make_po.sh new file mode 100755 index 0000000..f48aeeb --- /dev/null +++ b/make_po.sh @@ -0,0 +1,57 @@ +#!/bin/bash +command -v cadius >/dev/null 2>&1 || { echo "I require CADIUS but it's not installed. Aborting." >&2; exit 1; } + + +SRCFILES=(`ls src/*.s`) +SYSFILES=(`ls PRODOS.2.4.2//PRODOS src/*system`) +SRCDIR=src +BLDDIR=build/ + +DISK="flapple" +CADIUS="cadius" + +if [ ! -d $BLDDIR ] ; then + echo "Build directory for this platform doesn't exist so I will create it." + mkdir -p $BLDDIR ; echo "Created: $BLDDIR" +fi + +# need to autogen +cp src/_FileInformation.txt $BLDDIR + +echo "Creating disk images" +$CADIUS createvolume ${DISK}800.po ${DISK}800 800KB >/dev/null +$CADIUS createvolume ${DISK}140.po ${DISK}140 140KB >/dev/null + +#SYSTEM FILES +echo -n "Processing System files: " +COMMA="" +for f in ${SYSFILES[@]}; +do + FNAME=${f##*/} + echo -n "$COMMA $FNAME" + cp $f $BLDDIR/$FNAME + $CADIUS addfile ${DISK}800.po /${DISK}800/ $BLDDIR/$FNAME >/dev/null + $CADIUS addfile ${DISK}140.po /${DISK}140/ $BLDDIR/$FNAME >/dev/null + COMMA="," +done + +#SOURCE FILES +echo "" +echo -n "Processing Source files: " +COMMA="" +for f in ${SRCFILES[@]}; +do + FNAME=${f##*/} + echo -n "$COMMA $FNAME" + cp $f $BLDDIR/$FNAME + echo "$FNAME=Type(04),AuxType(0000),VersionCreate(24),MinVersion(00),Access(E3)" > $BLDDIR/_FileInformation.txt + $CADIUS sethighbit $BLDDIR/$FNAME >/dev/null + $CADIUS addfile ${DISK}800.po /${DISK}800/ $BLDDIR/$FNAME >/dev/null + $CADIUS addfile ${DISK}140.po /${DISK}140/ $BLDDIR/$FNAME >/dev/null + COMMA="," +done + + +echo "Look, I'm no expert, but I think everything went pretty well. (BUILD SUCCEEDED!!!)" +echo "" +exit diff --git a/src/_FileInformation.txt b/src/_FileInformation.txt index 8cecb27..d04f8e5 100644 --- a/src/_FileInformation.txt +++ b/src/_FileInformation.txt @@ -1,5 +1,3 @@ PRODOS=Type(FF),AuxType(0000),VersionCreate(70),MinVersion(BE),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000) flap.system=Type(FF),AuxType(0000),VersionCreate(70),MinVersion(BE),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000) fmono.system=Type(FF),AuxType(0000),VersionCreate(70),MinVersion(BE),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000) -flap=Type(00),AuxType(0000),VersionCreate(70),MinVersion(BE),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000) -fmono=Type(00),AuxType(0000),VersionCreate(70),MinVersion(BE),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)