mirror of
https://github.com/mi57730/a2d.git
synced 2025-02-16 20:31:09 +00:00
Rework files, add Makefile
This commit is contained in:
parent
c705c4b876
commit
2542a20984
10
desk.acc/.gitignore
vendored
10
desk.acc/.gitignore
vendored
@ -1,2 +1,12 @@
|
|||||||
|
|
||||||
|
# Object files (assembler output, pre-linking)
|
||||||
*.o
|
*.o
|
||||||
|
|
||||||
|
# Listing files (to review offsets)
|
||||||
*.list
|
*.list
|
||||||
|
|
||||||
|
# Output files (ProDOS file type F1)
|
||||||
|
*.F1
|
||||||
|
|
||||||
|
# Directory mounted in Virtual ][ as a ProDOS volume
|
||||||
|
mount
|
||||||
|
22
desk.acc/Makefile
Normal file
22
desk.acc/Makefile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
CC65 = ~/dev/cc65/bin
|
||||||
|
CAFLAGS = --target apple2enh --list-bytes 0
|
||||||
|
CCFLAGS = --config apple2-asm.cfg
|
||||||
|
|
||||||
|
# ProDOS file type is $F1 ($ is pesky)
|
||||||
|
TARGETS = show_text_file.F1 show_dhr_file.F1
|
||||||
|
|
||||||
|
.PHONY: clean all
|
||||||
|
all: $(TARGETS)
|
||||||
|
|
||||||
|
HEADERS = $(wildcard ../*.h)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o
|
||||||
|
rm -f $(TARGETS)
|
||||||
|
|
||||||
|
%.o: %.s $(HEADERS)
|
||||||
|
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||||
|
|
||||||
|
%.F1: %.o
|
||||||
|
$(CC65)/ld65 $(CCFLAGS) -o $@ $<
|
@ -6,18 +6,20 @@ Disassembly of the desk accessories:
|
|||||||
* [Show Text File](show_text_file.s) - in progress!
|
* [Show Text File](show_text_file.s) - in progress!
|
||||||
* Sort Directory - _not started_
|
* Sort Directory - _not started_
|
||||||
|
|
||||||
|
New desk accessories:
|
||||||
|
* [Show DHR File](show_dhr_file.s) - in progress!
|
||||||
|
|
||||||
## Desk Accessory Details
|
## Desk Accessory Details
|
||||||
|
|
||||||
* Loaded at $800 through (at least) $14FF
|
* Loaded at $800 through (at least) $14FF
|
||||||
* Copy themselves from Main into Aux memory (same location)
|
* Copy themselves from Main into Aux memory (same location)
|
||||||
* Can call into ProDOS MLI and A2D entry points ($4000, etc)
|
* Can call into ProDOS MLI and A2D entry points ($4000, etc)
|
||||||
|
|
||||||
## Process
|
## Files
|
||||||
|
|
||||||
* `go.sh` - bash script used to drive the initial disassembly
|
* `Makefile` - cleans/builds targets
|
||||||
(now commented out) and building
|
* `go.sh` - bash script to build, verify, and copy files
|
||||||
|
|
||||||
* `*.bin` - original binary (type $F1, start $800)
|
* `*.bin` - original binary (type $F1, start $800)
|
||||||
* `*.info` - da65 "info" file - used to inform disassembly
|
* `*.info` - da65 "info" file - used to inform disassembly
|
||||||
* `*.s` - source (originally generated using da65, now modified)
|
* `*.s` - source (originally generated using da65, now modified)
|
||||||
* `*` - linked target - byte-for-byte identical with original
|
|
||||||
|
@ -2,36 +2,16 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
CC65=~/dev/cc65/bin
|
make clean
|
||||||
|
make all
|
||||||
original=show_text_file.bin
|
|
||||||
disasm=show_text_file.d
|
|
||||||
|
|
||||||
src=show_text_file.s
|
|
||||||
obj=show_text_file.o
|
|
||||||
list=show_text_file.list
|
|
||||||
out=show_text_file
|
|
||||||
|
|
||||||
# Origin of STF
|
|
||||||
#echo ' .org $800' > $disasm
|
|
||||||
|
|
||||||
# Disassemble original source
|
|
||||||
#$CC65/da65 $original --info show_text_file.info >> $disasm
|
|
||||||
|
|
||||||
#cp $disasm $src
|
|
||||||
|
|
||||||
# Assemble
|
|
||||||
$CC65/ca65 --target apple2enh --listing $list --list-bytes 0 -o $obj $src
|
|
||||||
|
|
||||||
# Link
|
|
||||||
$CC65/ld65 --config apple2-asm.cfg -o $out $obj
|
|
||||||
|
|
||||||
# Verify original and output match
|
# Verify original and output match
|
||||||
diff $original $out
|
diff show_text_file.bin show_text_file.F1 \
|
||||||
|
&& echo "Files match"
|
||||||
|
|
||||||
$CC65/ca65 --target apple2enh --listing dhr.list --list-bytes 0 -o dhr.o dhr.s
|
cat show_dhr_file.F1 > mount/SHOW.DHR.FILE.\$F1 \
|
||||||
$CC65/ld65 --config apple2-asm.cfg -o dhr dhr.o
|
&& echo "Updated mounted file"
|
||||||
|
|
||||||
# Show output for review
|
# Show output for review
|
||||||
#less $list
|
#less $list
|
||||||
less dhr.list
|
#less dhr.list
|
||||||
|
BIN
desk.acc/stf
BIN
desk.acc/stf
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user