mirror of
https://github.com/mi57730/a2d.git
synced 2025-01-15 23:31:41 +00:00
Move DESKTOP.SYSTEM a.k.a. DESKTOP1 to separate directory
This commit is contained in:
parent
bc5a16f3d6
commit
5f825cfeab
@ -7,6 +7,9 @@ install:
|
||||
make -C /tmp/cc65 ca65 ld65
|
||||
|
||||
script:
|
||||
- cd $TRAVIS_BUILD_DIR/desktop.system &&
|
||||
MAKE_FLAGS="CC65=/tmp/cc65/bin" res/go.sh
|
||||
|
||||
- cd $TRAVIS_BUILD_DIR/desktop &&
|
||||
MAKE_FLAGS="CC65=/tmp/cc65/bin" res/go.sh
|
||||
|
||||
|
@ -37,7 +37,6 @@ modify. Here's a snapshot of the output for some files:
|
||||
|
||||
```
|
||||
Stats:
|
||||
sys.s unscoped: 20 scoped: 15 raw: 4 unrefed: 0
|
||||
desktop_main.s unscoped: 246 scoped: 1109 raw: 60 unrefed: 29
|
||||
desktop_res.s unscoped: 64 scoped: 0 raw: 4 unrefed: 64
|
||||
desktop_aux.s unscoped: 83 scoped: 301 raw: 2 unrefed: 32
|
||||
|
@ -29,8 +29,3 @@ $(OUTDIR)/%.o: %.s $(HEADERS)
|
||||
# Desk Accessory Files
|
||||
$(OUTDIR)/%.built: $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
|
||||
# System Files .SYS
|
||||
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
xattr -wx prodos.AuxType '00 20' $@
|
||||
|
12
desktop.system/.gitignore
vendored
Normal file
12
desktop.system/.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
# Build directory
|
||||
out
|
||||
|
||||
# "Info" files guiding disassembly
|
||||
*.info
|
||||
|
||||
# Directory mounted in Virtual ][ as a ProDOS volume
|
||||
mount
|
||||
|
||||
# OS-specific files
|
||||
.DS_Store
|
31
desktop.system/Makefile
Normal file
31
desktop.system/Makefile
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
CC65 = ~/dev/cc65/bin
|
||||
CAFLAGS = --target apple2enh --list-bytes 0
|
||||
CCFLAGS = --config apple2-asm.cfg
|
||||
|
||||
OUTDIR = out
|
||||
|
||||
HEADERS = $(wildcard ../*.inc)
|
||||
|
||||
TARGETS = $(OUTDIR)/desktop.system.SYS
|
||||
|
||||
.PHONY: clean all
|
||||
all: $(OUTDIR) $(TARGETS)
|
||||
|
||||
$(OUTDIR):
|
||||
mkdir -p $(OUTDIR)
|
||||
|
||||
clean:
|
||||
rm -f $(OUTDIR)/*.o
|
||||
rm -f $(OUTDIR)/*.list
|
||||
rm -f $(OUTDIR)/*.inc
|
||||
rm -f $(OUTDIR)/*.built
|
||||
rm -f $(OUTDIR)/*.SYS
|
||||
|
||||
$(OUTDIR)/%.o: %.s $(HEADERS)
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||
|
||||
# System Files .SYS
|
||||
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
xattr -wx prodos.AuxType '00 20' $@
|
14
desktop.system/README.md
Normal file
14
desktop.system/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# DeskTop diassembly notes - DESKTOP.SYSTEM
|
||||
|
||||
`desktop.system.s`
|
||||
|
||||
A short (8k) loader program. This is responsible for copying the rest
|
||||
to a RAM card (if available), then invoking the main app. The second
|
||||
half is used to "Down load", i.e. copy Selector entries to RAMCard on
|
||||
first boot.
|
||||
|
||||
The file is present in the original distribution as `DESKTOP1` but is
|
||||
renamed `DESKTOP.SYSTEM` in many disk images to be launched at boot.
|
||||
|
||||
The main app (`DESKTOP2`) is invoked by loading only the first segment,
|
||||
which in turn loads the rest of the segments of the file.
|
@ -936,7 +936,7 @@ slot: .byte 0
|
||||
|
||||
prodos_loader_blocks:
|
||||
.assert * = $2C00, error, "Segment length mismatch"
|
||||
.incbin "inc/pdload.dat"
|
||||
.incbin "../inc/pdload.dat"
|
||||
|
||||
.endproc ; copy_desktop_to_ramcard
|
||||
|
4
desktop.system/inc/README.md
Normal file
4
desktop.system/inc/README.md
Normal file
@ -0,0 +1,4 @@
|
||||
## `bs.dat`
|
||||
|
||||
A chunk of BASIC.SYSTEM 1.1, inexplicably found padding out the end of
|
||||
DESKTOP.SYSTEM.SYS.
|
44
desktop.system/res/go.sh
Executable file
44
desktop.system/res/go.sh
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
function cecho {
|
||||
case $1 in
|
||||
red) tput setaf 1 ;;
|
||||
green) tput setaf 2 ;;
|
||||
yellow) tput setaf 3 ;;
|
||||
esac
|
||||
echo -e "$2"
|
||||
tput sgr0
|
||||
}
|
||||
|
||||
function do_make {
|
||||
make $MAKE_FLAGS "$1" \
|
||||
&& (cecho green "make $1 good") \
|
||||
|| (tput blink ; cecho red "MAKE $1 BAD" ; return 1)
|
||||
}
|
||||
|
||||
function verify {
|
||||
diff "orig/$1" "out/$2" \
|
||||
&& (cecho green "diff $2 good" ) \
|
||||
|| (tput blink ; cecho red "DIFF $2 BAD" ; return 1)
|
||||
}
|
||||
|
||||
function stats {
|
||||
echo "$(printf '%-15s' $1)""$(../res/stats.pl < $1)"
|
||||
}
|
||||
|
||||
#do_make clean
|
||||
do_make all
|
||||
|
||||
SOURCES="desktop.system"
|
||||
|
||||
# Verify original and output match
|
||||
echo "Verifying diffs:"
|
||||
verify "DESKTOP.SYSTEM.SYS" "desktop.system.SYS"
|
||||
|
||||
# Compute stats
|
||||
echo "Stats:"
|
||||
for t in $SOURCES; do
|
||||
stats "$t.s"
|
||||
done;
|
@ -10,7 +10,7 @@ HEADERS = $(wildcard ../*.inc) $(wildcard ../inc/*.inc) $(wildcard *.inc)
|
||||
SEGMENTS = loader mgtk desktop invoker \
|
||||
ovl1 ovl1a ovl1b ovl1c ovl2 ovl34567
|
||||
|
||||
TARGETS = $(OUTDIR)/DESKTOP2.built $(OUTDIR)/sys.SYS
|
||||
TARGETS = $(OUTDIR)/DESKTOP2.built
|
||||
|
||||
.PHONY: clean all
|
||||
all: $(OUTDIR) $(TARGETS)
|
||||
@ -45,8 +45,3 @@ $(OUTDIR)/%.built: $(OUTDIR)/%.o asm.cfg
|
||||
# DeskTop combined
|
||||
$(OUTDIR)/DESKTOP2.built: $(patsubst %,$(OUTDIR)/%.built,$(SEGMENTS))
|
||||
cat $(patsubst %,$(OUTDIR)/%.built,$(SEGMENTS)) > $@
|
||||
|
||||
# System Files .SYS
|
||||
$(OUTDIR)/%.SYS: $(OUTDIR)/%.o
|
||||
$(CC65)/ld65 $(CCFLAGS) -o '$@' $<
|
||||
xattr -wx prodos.AuxType '00 20' $@
|
||||
|
@ -1,19 +1,5 @@
|
||||
|
||||
# DeskTop diassembly notes
|
||||
|
||||
## DESKTOP.SYSTEM
|
||||
|
||||
`sys.s`
|
||||
|
||||
A short (8k) loader program. This is responsible for copying
|
||||
the rest to a RAM card (if available), then invoking the main app.
|
||||
The second half is used to "Down load", i.e. copy
|
||||
Selector entries to RAMCard on first boot.
|
||||
|
||||
The file is present in the original distribution as `DESKTOP1` but
|
||||
is renamed `DESKTOP.SYSTEM` in many disk images to be launched at boot.
|
||||
|
||||
## DESKTOP2.$F1
|
||||
# DeskTop diassembly notes - DESKTOP2.$F1
|
||||
|
||||
This is large - 111k. It includes a loader and the DeskTop app with
|
||||
both main memory and aux memory segments, filling everything from
|
||||
|
@ -4,14 +4,3 @@ Header defining various resources in the language card area, used by
|
||||
overlays.
|
||||
|
||||
TODO: Make the linker take care of this, use exports/imports instead.
|
||||
|
||||
|
||||
## `pdload.dat`
|
||||
|
||||
ProDOS Loader blocks, used when formatting a disk.
|
||||
|
||||
|
||||
## `bs.dat`
|
||||
|
||||
A chunk of BASIC.SYSTEM 1.1, inexplicably found padding out the end of
|
||||
DESKTOP.SYSTEM.SYS.
|
||||
|
@ -1409,7 +1409,7 @@ L14E5: .byte $00,$00,$00,$00,$00,$00,$00,$00
|
||||
;;; ============================================================
|
||||
|
||||
.proc prodos_loader_blocks
|
||||
.incbin "inc/pdload.dat"
|
||||
.incbin "../inc/pdload.dat"
|
||||
.endproc
|
||||
.assert .sizeof(prodos_loader_blocks) = $400, error, "Bad data"
|
||||
|
||||
|
@ -33,7 +33,7 @@ do_make all
|
||||
|
||||
COMMON="loader mgtk invoker ovl1 ovl1a ovl1b ovl1c ovl2"
|
||||
TARGETS="desktop $COMMON ovl34567"
|
||||
SOURCES="sys desktop_main desktop_res desktop_aux $COMMON ovl3 ovl4 ovl5 ovl6 ovl7"
|
||||
SOURCES="desktop_main desktop_res desktop_aux $COMMON ovl3 ovl4 ovl5 ovl6 ovl7"
|
||||
|
||||
# Verify original and output match
|
||||
echo "Verifying diffs:"
|
||||
@ -41,7 +41,6 @@ for t in $TARGETS; do
|
||||
verify "DESKTOP2_$t" "$t.built"
|
||||
done;
|
||||
verify "DESKTOP2.\$F1" "DESKTOP2.built"
|
||||
verify "DESKTOP.SYSTEM.SYS" "sys.SYS"
|
||||
|
||||
# Compute stats
|
||||
echo "Stats:"
|
||||
|
@ -22,7 +22,7 @@ DESKTOP.SYSTEM=Type(FF),AuxType(0),VersionCreate(00),MinVersion(B9),Access(E3),F
|
||||
DESKTOP2=Type(F1),AuxType(0),VersionCreate(00),MinVersion(B9),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)
|
||||
EOF
|
||||
|
||||
cp "out/sys.SYS" "$PACKDIR/DESKTOP.SYSTEM"
|
||||
cp "../desktop.system/out/desktop.system.SYS" "$PACKDIR/DESKTOP.SYSTEM"
|
||||
cp "out/DESKTOP2.built" "$PACKDIR/DESKTOP2"
|
||||
|
||||
# Create a new disk image.
|
||||
|
3
inc/README.md
Normal file
3
inc/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
## `pdload.dat`
|
||||
|
||||
ProDOS Loader blocks, used when formatting a disk.
|
Loading…
x
Reference in New Issue
Block a user