mirror of
https://codeberg.org/hkzlab/TK2000_floppicator.git
synced 2025-12-26 01:22:30 +11:00
Add empty floppicator project
This commit is contained in:
parent
667ffdd197
commit
be70ff936e
29 changed files with 2153 additions and 0 deletions
48
Makefile
Normal file
48
Makefile
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
VPATH = src
|
||||
|
||||
# Apple Commander tool JAR
|
||||
ACMD=/d/Users/hkzla/software/applecommander/AppleCommander-ac-1.11.0.jar
|
||||
JAVA=/c/Program\ Files/Microsoft/jdk-21.0.8.9-hotspot/bin/java.exe
|
||||
|
||||
# Program output
|
||||
SW_NAME=floppicator
|
||||
|
||||
PRG=master
|
||||
|
||||
# Libraries
|
||||
LIBS=clib-6502.a
|
||||
|
||||
ASM_SRCS = tk2k_startup.s preserve_zero_pages.s disk2.s
|
||||
C_SRCS = main.c
|
||||
|
||||
# Object files
|
||||
OBJS = $(ASM_SRCS:%.s=%.o) $(C_SRCS:%.c=%.o)
|
||||
|
||||
all: $(SW_NAME).woz
|
||||
|
||||
%.o: %.s
|
||||
as6502 --core=6502 --list-file=$(@:%.o=obj/%.lst) -o obj/$@ $<
|
||||
|
||||
%.o: %.c
|
||||
cc6502 --core=6502 -O2 --list-file=$(@:%.o=obj/%.lst) --char-is-unsigned --pedantic-errors -o obj/$@ $<
|
||||
|
||||
$(PRG).hex: $(OBJS)
|
||||
(cd obj ; ln6502 -g ../linker-files/linker.scm $^ -o ../out/$@ $(LIBS) -l --cross-reference --cstartup=tk2k --no-automatic-placement-rules --output-format intel-hex --rom-code)
|
||||
|
||||
$(PRG).bin: $(PRG).hex
|
||||
(cd out ; objcopy -I ihex -O binary $(PRG).hex $(PRG).bin)
|
||||
|
||||
$(SW_NAME).dsk: $(PRG).bin
|
||||
(cd out ; cp ../dsk/TK2048_AUTO_BRUN.dsk ./$(SW_NAME).dsk; \
|
||||
cat $(PRG).bin | $(JAVA) -jar $(ACMD) -p $(SW_NAME).dsk HELLO B 0x800;)
|
||||
|
||||
$(SW_NAME).woz: $(SW_NAME).dsk
|
||||
(cd out ; dsk2woz ./$(SW_NAME).dsk ./$(SW_NAME).woz)
|
||||
|
||||
clean:
|
||||
-rm obj/*.o
|
||||
-rm obj/*.lst
|
||||
-rm out/*.hex
|
||||
-rm out/*.bin
|
||||
-rm out/*.dsk
|
||||
-rm out/*.woz
|
||||
Loading…
Add table
Add a link
Reference in a new issue