mirror of
https://github.com/digarok/flapple.git
synced 2024-05-28 10:41:27 +00:00
now has cross assembly build pipeling for Merlin32
Still builds with Merlin 16+ (AFAIK) PS- I'm actually feeling quite sick today, so there could be errors/missing files. I'll try to double check when I feel better and catch up at work. :(
This commit is contained in:
parent
661ed219be
commit
75ccbddd9a
BIN
flapple140.po
BIN
flapple140.po
Binary file not shown.
BIN
flapple800.po
BIN
flapple800.po
Binary file not shown.
88
make_bootable
Executable file
88
make_bootable
Executable file
|
@ -0,0 +1,88 @@
|
|||
#!/bin/bash
|
||||
MERLIN="../tools/Merlin32_v1.0/MacOSX/Merlin32"
|
||||
|
||||
# Here's our fancy build pipeline. Output = src/flap (or fmono) (binary file)
|
||||
$MERLIN -V . src/f.s
|
||||
|
||||
#second time with different build flags (MONO=1)
|
||||
sed -i.bak "s/^MONO\(.*\)equ.*/MONO\1equ 1/g" src/f.s
|
||||
$MERLIN -V . src/f.s
|
||||
#revert file to original state (MONO=0)
|
||||
sed -i.bak "s/^MONO\(.*\)equ.*/MONO\1equ 0/g" src/f.s
|
||||
|
||||
|
||||
# This is actually the output file from Merlin
|
||||
# Merlin seems to have problems with periods in names?
|
||||
OUTPUTBIN="src/flap"
|
||||
OUTPUTBIN2="src/fmono"
|
||||
|
||||
# It seems Merlin32 doesn't return response codes?
|
||||
# So my work-around is to check for the outputted binary
|
||||
# and if it doesn't exist, then assembly failed and we stop
|
||||
if [ ! -f $OUTPUTBIN ] || [ ! -f $OUTPUTBIN2 ] ; then
|
||||
echo "Build failed. Merlin32 was not able to generate one of the binaries:"
|
||||
echo " '$OUTPUTBIN' '$OUTPUTBIN2'"
|
||||
echo "See assembler error messages above."
|
||||
echo ""
|
||||
exit
|
||||
fi
|
||||
|
||||
mv src/flap src/flap.system
|
||||
mv src/fmono src/fmono.system
|
||||
|
||||
SRCFILES=(`ls src/*.s`)
|
||||
SYSFILES=(`ls src/PRODOS src/*system`)
|
||||
SRCDIR=src
|
||||
BLDDIR=build/nix
|
||||
|
||||
DISK="flapple"
|
||||
CADIUS="../tools/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"
|
||||
sleep 1
|
||||
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
|
||||
|
||||
#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
|
||||
$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 ""
|
||||
echo ""
|
||||
|
||||
|
||||
echo "Look, I'm no expert, but I think everything went pretty well. (BUILD SUCCEEDED!!!)"
|
||||
echo ""
|
||||
exit
|
5
src/_FileInformation.txt
Normal file
5
src/_FileInformation.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
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)
|
16
src/bird.s
16
src/bird.s
|
@ -13,14 +13,14 @@ SPRITE_COLLISION db 0
|
|||
SPRITE_Y_IDX dw 0
|
||||
SPRITE_X_IDX dw 0
|
||||
|
||||
SPRITE_SCREEN_P equz $00
|
||||
SPRITE_DATA_P equz $02
|
||||
SPRITE_SCREEN_P2 equz $02
|
||||
SPRITE_AUX_P equz $04
|
||||
SPRITE_SCREEN_P3 equz $04
|
||||
SPRITE_MASK_P equz $FA
|
||||
SPRITE_SCREEN_P4 equz $FA
|
||||
SPRITE_IMASK_P equz $FC
|
||||
SPRITE_SCREEN_P equ $00
|
||||
SPRITE_DATA_P equ $02
|
||||
SPRITE_SCREEN_P2 equ $02
|
||||
SPRITE_AUX_P equ $04
|
||||
SPRITE_SCREEN_P3 equ $04
|
||||
SPRITE_MASK_P equ $FA
|
||||
SPRITE_SCREEN_P4 equ $FA
|
||||
SPRITE_IMASK_P equ $FC
|
||||
|
||||
SPRITE_SCREEN_IDX db #$0
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ LOGO_Y db 1
|
|||
LOGO_X db 3
|
||||
LOGO_CURLINE db 0
|
||||
|
||||
SPR_SP equz $00
|
||||
SPR_DP equz $02
|
||||
SPR_SP equ $00
|
||||
SPR_DP equ $02
|
||||
SPR_PIXEL db 00
|
||||
SPR_MASKCOLOR db 0
|
||||
SPR_MASKCOLORH db 0
|
||||
|
|
|
@ -20,8 +20,8 @@ CopyPtr MAC
|
|||
sta ]2+1 ; store high byte
|
||||
<<<
|
||||
|
||||
; HANDLE GREENSCREEN DOODS
|
||||
MONO equ 0 ; set 0 = color mode, 1 = mono mode
|
||||
; HANDLE GREENSCREEN DOODS... MONO flag set 0 = color mode, 1 = mono mode
|
||||
MONO equ 1
|
||||
|
||||
DO MONO
|
||||
dsk fmono.system ; tell compiler output filename
|
||||
|
@ -830,13 +830,13 @@ WaitKey
|
|||
rts
|
||||
|
||||
WaitKeyXY
|
||||
stx ]_waitX
|
||||
stx _waitX
|
||||
:kloop jsr VBlank
|
||||
lda KEY
|
||||
bmi :kpress
|
||||
dex
|
||||
bne :kloop
|
||||
ldx ]_waitX
|
||||
ldx _waitX
|
||||
dey
|
||||
bne :kloop
|
||||
clc
|
||||
|
@ -846,7 +846,7 @@ WaitKeyXY
|
|||
jsr QuitKeyCheck
|
||||
sec
|
||||
rts
|
||||
]_waitX db 0
|
||||
_waitX db 0
|
||||
|
||||
**************************************************
|
||||
* See if we're running on a IIgs
|
||||
|
@ -909,7 +909,7 @@ VBlankX
|
|||
|
||||
InitVBlank
|
||||
lda $FBC0 ; check for IIc
|
||||
bne ]rts ; not a IIc--use VBlankIIeIIgs
|
||||
bne :rts ; not a IIc--use VBlankIIeIIgs
|
||||
|
||||
jsr MLI ; instantiate our interrupt
|
||||
dfb $40
|
||||
|
@ -926,7 +926,7 @@ InitVBlank
|
|||
|
||||
cli
|
||||
|
||||
]rts rts
|
||||
:rts rts
|
||||
|
||||
|
||||
VBLIntParm dfb 2
|
||||
|
@ -944,13 +944,13 @@ VBLIntHandler cld ; Expected by ProDOS
|
|||
:notOurs rts
|
||||
|
||||
mouse ldy $C400,x
|
||||
sty ]jump+1
|
||||
sty :jump+1
|
||||
|
||||
ldx #$C4
|
||||
ldy #$40
|
||||
|
||||
sei
|
||||
]jump jmp $C400
|
||||
:jump jmp $C400
|
||||
|
||||
|
||||
|
||||
|
@ -995,11 +995,11 @@ _compType db #$7e ; $7e - IIe ; $FE - IIgs
|
|||
|
||||
|
||||
|
||||
use util
|
||||
use applerom
|
||||
use dlrlib
|
||||
use pipes
|
||||
use numbers
|
||||
use soundengine
|
||||
use bird
|
||||
put util
|
||||
put applerom
|
||||
put dlrlib
|
||||
put pipes
|
||||
put numbers
|
||||
put soundengine
|
||||
put bird
|
||||
|
||||
|
|
14
src/pipes.s
14
src/pipes.s
|
@ -39,15 +39,15 @@ PipeSet ds MaxPipes*3 ; array of pipe{x,y1,y2}
|
|||
TopPipes ds MaxPipes*2 ; Space for pipe X,Y
|
||||
BotPipes ds MaxPipes*2 ; "
|
||||
|
||||
PIPE_SP equz $F0
|
||||
PIPE_SP equ $F0
|
||||
|
||||
|
||||
PIPE_DP equz $00
|
||||
PIPE_DP0 equz $00
|
||||
PIPE_DP1 equz $02
|
||||
PIPE_DP2 equz $04
|
||||
PIPE_DP3 equz $06
|
||||
PIPE_DP4 equz $08
|
||||
PIPE_DP equ $00
|
||||
PIPE_DP0 equ $00
|
||||
PIPE_DP1 equ $02
|
||||
PIPE_DP2 equ $04
|
||||
PIPE_DP3 equ $06
|
||||
PIPE_DP4 equ $08
|
||||
|
||||
PIPE_RCLIP equ #40
|
||||
PIPE_WIDTH equ #15
|
||||
|
|
Loading…
Reference in New Issue
Block a user