mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-26 02:49:18 +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
|
||||
|
||||
# Listing files (to review offsets)
|
||||
*.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!
|
||||
* Sort Directory - _not started_
|
||||
|
||||
New desk accessories:
|
||||
* [Show DHR File](show_dhr_file.s) - in progress!
|
||||
|
||||
## Desk Accessory Details
|
||||
|
||||
* Loaded at $800 through (at least) $14FF
|
||||
* Copy themselves from Main into Aux memory (same location)
|
||||
* Can call into ProDOS MLI and A2D entry points ($4000, etc)
|
||||
|
||||
## Process
|
||||
## Files
|
||||
|
||||
* `go.sh` - bash script used to drive the initial disassembly
|
||||
(now commented out) and building
|
||||
* `Makefile` - cleans/builds targets
|
||||
* `go.sh` - bash script to build, verify, and copy files
|
||||
|
||||
* `*.bin` - original binary (type $F1, start $800)
|
||||
* `*.info` - da65 "info" file - used to inform disassembly
|
||||
* `*.s` - source (originally generated using da65, now modified)
|
||||
* `*` - linked target - byte-for-byte identical with original
|
||||
|
@ -2,36 +2,16 @@
|
||||
|
||||
set -e
|
||||
|
||||
CC65=~/dev/cc65/bin
|
||||
|
||||
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
|
||||
make clean
|
||||
make all
|
||||
|
||||
# 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
|
||||
$CC65/ld65 --config apple2-asm.cfg -o dhr dhr.o
|
||||
cat show_dhr_file.F1 > mount/SHOW.DHR.FILE.\$F1 \
|
||||
&& echo "Updated mounted file"
|
||||
|
||||
# Show output for review
|
||||
#less $list
|
||||
less dhr.list
|
||||
#less dhr.list
|
||||
|
BIN
desk.acc/stf
BIN
desk.acc/stf
Binary file not shown.
Loading…
Reference in New Issue
Block a user