mirror of
https://github.com/mi57730/a2d.git
synced 2025-02-18 02:30:50 +00:00
Makefile tweaks
This commit is contained in:
parent
c48bf17e6f
commit
cffe277cc9
@ -7,12 +7,9 @@ OUTDIR = out
|
||||
|
||||
HEADERS = $(wildcard ../*.inc) $(wildcard ../inc/*.inc) $(wildcard *.inc)
|
||||
|
||||
DAS = calculator show_text_file date puzzle show_image_file
|
||||
DAS = calculator show.text.file date puzzle show.image.file
|
||||
|
||||
# ProDOS file type for DAs is $F1 ($ is pesky)
|
||||
EXTENSION = F1
|
||||
|
||||
TARGETS = $(patsubst %,$(OUTDIR)/%.$(EXTENSION),$(DAS))
|
||||
TARGETS = $(patsubst %,$(OUTDIR)/%.$$F1,$(DAS))
|
||||
|
||||
.PHONY: clean all
|
||||
all: $(OUTDIR) $(TARGETS)
|
||||
@ -22,10 +19,24 @@ $(OUTDIR):
|
||||
|
||||
clean:
|
||||
rm -f $(OUTDIR)/*.o
|
||||
rm -f $(TARGETS)
|
||||
rm -f $(OUTDIR)/*.list
|
||||
rm -f $(OUTDIR)/*.built
|
||||
rm -f $(OUTDIR)/*.\$$F1
|
||||
rm -f $(OUTDIR)/*.sys
|
||||
|
||||
$(OUTDIR)/%.o: %.s $(HEADERS)
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||
|
||||
$(OUTDIR)/%.$(EXTENSION): $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o $@ $<
|
||||
# Built DeskTop segments
|
||||
$(OUTDIR)/%.built: $(OUTDIR)/%.o asm.cfg
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
|
||||
# Desk Accessories .$F1
|
||||
$(OUTDIR)/%.$$F1: $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
xattr -w prodos.AuxType '@' '$@'
|
||||
|
||||
# System Files .SYS
|
||||
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
xattr -wx prodos.AuxType '00 20' $@
|
||||
|
@ -19,7 +19,7 @@ function do_make {
|
||||
}
|
||||
|
||||
function verify {
|
||||
diff "orig/$1.bin" "out/$1.F1" \
|
||||
diff "orig/$1.bin" "out/$1.\$F1" \
|
||||
&& (cecho green "diff $1 good" ) \
|
||||
|| (tput blink ; cecho red "DIFF $1 BAD" ; return 1)
|
||||
}
|
||||
@ -28,24 +28,30 @@ function stats {
|
||||
echo "$1: "$(../res/stats.pl < "$1")
|
||||
}
|
||||
|
||||
function mount {
|
||||
uppercase=$(echo "$1" | tr /a-z/ /A-Z/)
|
||||
cp "out/$1" "mount/$uppercase" \
|
||||
&& (cecho green "mounted $uppercase" ) \
|
||||
|| (cecho red "failed to mount $uppercase" ; return 1)
|
||||
}
|
||||
|
||||
#do_make clean
|
||||
do_make all
|
||||
|
||||
# Verify original and output match
|
||||
echo "Verifying diffs:"
|
||||
verify "calculator"
|
||||
verify "show_text_file"
|
||||
verify "show.text.file"
|
||||
verify "date"
|
||||
verify "puzzle"
|
||||
|
||||
# Compute stats
|
||||
echo "Unidentified symbols:"
|
||||
stats "calculator.s"
|
||||
stats "show_text_file.s"
|
||||
stats "show.text.file.s"
|
||||
stats "date.s"
|
||||
stats "puzzle.s"
|
||||
|
||||
cat out/show_image_file.F1 > mount/SHOW.IMAGE.FILE.\$F1 \
|
||||
&& echo "Updated mountable file (SIF)"
|
||||
|
||||
#cat calc_fixed.F1 > mount/TEST.\$F1 \
|
||||
# && echo "Updated mountable file (Test)"
|
||||
# Mountable directory
|
||||
echo "Copying files to mount/"
|
||||
mount 'show.image.file.$F1'
|
||||
|
@ -10,9 +10,7 @@ HEADERS = $(wildcard ../*.inc) $(wildcard ../inc/*.inc) $(wildcard *.inc)
|
||||
SEGMENTS = loader mgtk desktop invoker \
|
||||
ovl1 ovl1a ovl5 ovl6 ovl7
|
||||
|
||||
EXTENSION = built
|
||||
|
||||
TARGETS = $(patsubst %,$(OUTDIR)/%.$(EXTENSION),$(SEGMENTS))
|
||||
TARGETS = $(patsubst %,$(OUTDIR)/%.built,$(SEGMENTS))
|
||||
|
||||
.PHONY: clean all
|
||||
all: $(OUTDIR) $(TARGETS)
|
||||
@ -22,10 +20,24 @@ $(OUTDIR):
|
||||
|
||||
clean:
|
||||
rm -f $(OUTDIR)/*.o
|
||||
rm -f $(TARGETS)
|
||||
rm -f $(OUTDIR)/*.list
|
||||
rm -f $(OUTDIR)/*.built
|
||||
rm -f $(OUTDIR)/*.\$$F1
|
||||
rm -f $(OUTDIR)/*.sys
|
||||
|
||||
$(OUTDIR)/%.o: %.s $(HEADERS)
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||
|
||||
$(OUTDIR)/%.$(EXTENSION): $(OUTDIR)/%.o asm.cfg
|
||||
$(CC65)/ld65 $(CCFLAGS) -o $@ $<
|
||||
# Built DeskTop segments
|
||||
$(OUTDIR)/%.built: $(OUTDIR)/%.o asm.cfg
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
|
||||
# Desk Accessories .$F1
|
||||
$(OUTDIR)/%.$$F1: $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
xattr -w prodos.AuxType '@' '$@'
|
||||
|
||||
# System Files .SYS
|
||||
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
xattr -wx prodos.AuxType '00 20' $@
|
||||
|
@ -74,7 +74,7 @@ pathname passed at $2006 (see ProDOS TLM).
|
||||
|
||||
### Initializer
|
||||
|
||||
`desktop.s`
|
||||
(in `desktop.s`)
|
||||
|
||||
Loaded at $800-$FFF, this does one-time initialization of the
|
||||
DeskTop. It is later overwritten when any desk accessories are
|
||||
@ -82,7 +82,7 @@ run.
|
||||
|
||||
### MouseGraphics ToolKit (MGTK)
|
||||
|
||||
`a2d.s`
|
||||
`mgtk.s`
|
||||
|
||||
AUX $4000-$851E is the GUI library used for the DeskTop application
|
||||
and (presumably) for disk copy and Selector apps (TBD).
|
||||
@ -196,3 +196,7 @@ $0100 +-------------+ +-------------+
|
||||
| Zero Page | | Zero Page |
|
||||
$0000 +-------------+ +-------------+
|
||||
```
|
||||
|
||||
The Disk Copy command replaces large chunks of memory and is best
|
||||
thought of as a separate application. When exiting, the DeskTop is
|
||||
restarted from the beginning.
|
||||
|
17
desktop/orig/make_chunks.sh
Executable file
17
desktop/orig/make_chunks.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_loader skip=$(( 0x0)) count=$(( 0x580))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_mgtk skip=$(( 0x580)) count=$((0x451F))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_desktop skip=$(( 0x4A9F)) count=$((0xE3E1))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_invoker skip=$((0x12E80)) count=$(( 0x160))
|
||||
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl1 skip=$((0x12FE0)) count=$(( 0x200))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl1a skip=$((0x131E0)) count=$(( 0x200))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl1b skip=$((0x133E0)) count=$((0x2200))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl1c skip=$((0x155E0)) count=$(( 0xB00))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl2 skip=$((0x160E0)) count=$((0x1400))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl3 skip=$((0x174E0)) count=$((0x1000))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl4 skip=$((0x184E0)) count=$((0x2000))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl5 skip=$((0x1A4E0)) count=$(( 0x800))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl6 skip=$((0x1ACE0)) count=$(( 0x800))
|
||||
dd if=DESKTOP2.\$F1 bs=1 of=DESKTOP2_ovl7 skip=$((0x1B4E0)) count=$(( 0x800))
|
@ -39,6 +39,7 @@ for t in $TARGETS; do
|
||||
verify $t
|
||||
done;
|
||||
|
||||
# Compute stats
|
||||
echo "Unidentified symbols:"
|
||||
for t in $TARGETS; do
|
||||
stats "$t.s"
|
||||
|
Loading…
x
Reference in New Issue
Block a user