Improve the build to better support building the babel fish translator. Fix the bugs in the filter code for the translator. Based on testing, I think it is working now and matches any file with a name *.md.
This commit is contained in:
parent
1572698a42
commit
b89ad278dc
|
@ -3,7 +3,18 @@
|
||||||
# Apple //GS Build Engine for ORCA and Merlin
|
# Apple //GS Build Engine for ORCA and Merlin
|
||||||
#
|
#
|
||||||
|
|
||||||
all:
|
include make/head.mk
|
||||||
|
|
||||||
|
DISKIMAGE=$(TARGETDIR)/md2teach.2mg
|
||||||
|
ARCHIVE=$(TARGETDIR)/md2teach.shk
|
||||||
|
DESTBOOTIMAGE=$(TARGETDIR)/$(BOOTIMAGE)
|
||||||
|
|
||||||
|
MAMEARGS=apple2gs -skip_gameinfo -speed 3 -mouse -window -resolution 1408x1056 -ramsize 4M -sl7 cffa202
|
||||||
|
EMULATOR=mame
|
||||||
|
|
||||||
|
gen:
|
||||||
|
|
||||||
|
build:
|
||||||
make -f shell.mk
|
make -f shell.mk
|
||||||
make -f babelfish.mk
|
make -f babelfish.mk
|
||||||
|
|
||||||
|
@ -13,3 +24,5 @@ clean:
|
||||||
|
|
||||||
execute:
|
execute:
|
||||||
make -f shell.mk execute
|
make -f shell.mk execute
|
||||||
|
make/createDiskImage "$(DISKIMAGE)" $(DESTBOOTIMAGE) "$(TARGETDIR)/Markdown" "$(TARGETDIR)/md2teach" "$(TARGETDIR)/outfile.txt" test.md
|
||||||
|
make/launchEmulator "$(DISKIMAGE)" "$(DESTBOOTIMAGE)"
|
||||||
|
|
|
@ -9,7 +9,7 @@ include make/head.mk
|
||||||
# where to find files, etc.
|
# where to find files, etc.
|
||||||
|
|
||||||
# The name of your system or binary file to build goes here:
|
# The name of your system or binary file to build goes here:
|
||||||
PGM=markdown
|
PGM=notused
|
||||||
|
|
||||||
# Set the target type you would like to build. The options are:
|
# Set the target type you would like to build. The options are:
|
||||||
# shell - A shell command for ORCA, GNO or other GS shell
|
# shell - A shell command for ORCA, GNO or other GS shell
|
||||||
|
@ -175,10 +175,26 @@ gen:
|
||||||
# clean your build.
|
# clean your build.
|
||||||
genclean:
|
genclean:
|
||||||
|
|
||||||
$(TARGETDIR)/filter.bin: $(OBJDIR)/babelfish/filter.ROOT
|
|
||||||
cd $(OBJDIR); $(LINK) $(LDFLAGS) babelfish/filter keep="$(abspath $@)"
|
|
||||||
|
|
||||||
target: $(TARGETDIR)/filter.bin
|
FILTERTARGET=$(TARGETDIR)/filter.bin
|
||||||
|
INITTARGET=$(TARGETDIR)/init.bin
|
||||||
|
REZFLAGS+= rez='-d TARGETDIR="$(TARGETDIR)"'
|
||||||
|
|
||||||
|
$(OBJDIR)/babelfish/markdown.r: $(FILTERTARGET) $(INITTARGET)
|
||||||
|
|
||||||
|
$(FILTERTARGET): $(OBJDIR)/babelfish/filter.ROOT
|
||||||
|
cd $(OBJDIR); $(LINK) $(LDFLAGS) babelfish/filter keep="$(abspath $@)"
|
||||||
|
|
||||||
|
$(INITTARGET): $(OBJDIR)/babelfish/init.ROOT
|
||||||
|
cd $(OBJDIR); $(LINK) $(LDFLAGS) babelfish/init keep="$(abspath $@)"
|
||||||
|
|
||||||
|
$(TARGETDIR)/Markdown: $(OBJDIR)/babelfish/markdown.r
|
||||||
|
$(MKDIR) $(TARGETDIR)
|
||||||
|
$(RM) $@
|
||||||
|
$(CP) $< $@
|
||||||
|
$(CHTYP) -t $(FILETYPE) $(AUXTYPE) $@
|
||||||
|
|
||||||
|
target: $(TARGETDIR)/Markdown
|
||||||
true
|
true
|
||||||
|
|
||||||
# Do not change anything else below here...
|
# Do not change anything else below here...
|
||||||
|
|
|
@ -37,16 +37,17 @@ offset_fileName gequ 10
|
||||||
|
|
||||||
filter start
|
filter start
|
||||||
|
|
||||||
_d equ 1
|
_b equ 1
|
||||||
ptr equ 5
|
ptr equ _b+2
|
||||||
_rtlb equ 7
|
_d equ ptr+4
|
||||||
DirPtr equ 11
|
_rtlb equ _d+1
|
||||||
retval equ 15
|
DirPtr equ _rtlb+3
|
||||||
|
retval equ DirPtr+4
|
||||||
|
|
||||||
phb ;even up the stack
|
phb ;even up the stack
|
||||||
|
pha
|
||||||
|
pha
|
||||||
phd
|
phd
|
||||||
pha
|
|
||||||
pha
|
|
||||||
tsc
|
tsc
|
||||||
tcd
|
tcd
|
||||||
|
|
||||||
|
@ -60,14 +61,17 @@ retval equ 15
|
||||||
lda [<DirPtr],y
|
lda [<DirPtr],y
|
||||||
sta <ptr+2
|
sta <ptr+2
|
||||||
|
|
||||||
lda [<ptr]
|
ldy #2
|
||||||
|
lda [<ptr],y
|
||||||
cmp #4
|
cmp #4
|
||||||
blt exit
|
blt exit
|
||||||
tay
|
tay
|
||||||
|
|
||||||
short m
|
short m
|
||||||
|
|
||||||
dey
|
iny
|
||||||
|
iny
|
||||||
|
iny
|
||||||
lda [<ptr],y
|
lda [<ptr],y
|
||||||
cmp #'d'
|
cmp #'d'
|
||||||
beq checkM
|
beq checkM
|
||||||
|
@ -85,7 +89,7 @@ checkM anop
|
||||||
checkDot anop
|
checkDot anop
|
||||||
dey
|
dey
|
||||||
lda [<ptr],y
|
lda [<ptr],y
|
||||||
cmp #'m'
|
cmp #'.'
|
||||||
bne noMatch
|
bne noMatch
|
||||||
|
|
||||||
long m
|
long m
|
||||||
|
@ -97,10 +101,10 @@ noMatch anop
|
||||||
long m
|
long m
|
||||||
|
|
||||||
exit anop
|
exit anop
|
||||||
pla
|
|
||||||
pla
|
|
||||||
pld
|
pld
|
||||||
pla
|
pla
|
||||||
|
pla
|
||||||
|
pla
|
||||||
sta 3,s
|
sta 3,s
|
||||||
pla
|
pla
|
||||||
sta 3,s
|
sta 3,s
|
||||||
|
|
|
@ -10,5 +10,7 @@
|
||||||
keep init
|
keep init
|
||||||
|
|
||||||
init start
|
init start
|
||||||
|
phb
|
||||||
|
plb
|
||||||
rtl
|
rtl
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
|
|
||||||
#include "types.rez"
|
#include "types.rez"
|
||||||
#include "babelfish_defs.h"
|
#include "babelfish/babelfish_defs.h"
|
||||||
#include "babelfish_rez.h"
|
#include "babelfish/babelfish_rez.h"
|
||||||
|
|
||||||
|
|
||||||
resource rVersion(TrVersion)
|
resource rVersion(TrVersion)
|
||||||
|
@ -43,8 +43,8 @@ resource rTrData(TrData)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
read rCodeResource(TrFilter, locked, convert) "filter.bin";
|
read rCodeResource(TrFilter, locked, convert) TARGETDIR "/filter.bin";
|
||||||
read rCodeResource(TrInit, locked, convert) "init.bin";
|
read rCodeResource(TrInit, locked, convert) TARGETDIR "/init.bin";
|
||||||
|
|
||||||
|
|
||||||
resource rText(TrImportInfo)
|
resource rText(TrImportInfo)
|
||||||
|
|
|
@ -15,7 +15,7 @@ shift
|
||||||
FILE="$1"
|
FILE="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
BOOTCOPYPATH=""
|
BOOTCOPYPATH="System/SHS.Babelfish"
|
||||||
|
|
||||||
PROGRAM=`basename "$FILE"`
|
PROGRAM=`basename "$FILE"`
|
||||||
TMPDIR=/tmp/a2gs_mount.$$
|
TMPDIR=/tmp/a2gs_mount.$$
|
||||||
|
|
|
@ -197,8 +197,6 @@ executeGUI: all
|
||||||
|
|
||||||
executeShell: all
|
executeShell: all
|
||||||
$(ORCA) --mem $(TARGETDIR)/$(PGM) -d test.md $(TARGETDIR)/outfile.txt
|
$(ORCA) --mem $(TARGETDIR)/$(PGM) -d test.md $(TARGETDIR)/outfile.txt
|
||||||
make/createDiskImage "$(DISKIMAGE)" $(DESTBOOTIMAGE) "$(TARGETDIR)/$(PGM)" "$(TARGETDIR)/outfile.txt" test.md
|
|
||||||
make/launchEmulator "$(DISKIMAGE)" "$(DESTBOOTIMAGE)"
|
|
||||||
|
|
||||||
$(OBJDIR)/%.a: %.c
|
$(OBJDIR)/%.a: %.c
|
||||||
$(COMPILE) $< $(@:.a=) $(CFLAGS) --noroot
|
$(COMPILE) $< $(@:.a=) $(CFLAGS) --noroot
|
||||||
|
|
Loading…
Reference in New Issue