feature set string is now compressed too
This commit is contained in:
1 parent
c3335393c2
commit
37b32759dc
14 files changed
+294
-196
No files matched your search
@@ -57,7 +57,7 @@ SRC_TOOLS = $(wildcard tools/*.c,tools/*.cc)
|
|||||||
|
|
||||||
# Generated files
|
# Generated files
|
||||||
|
|
||||||
GEN_BASIC = build/,generated/packed_strings.s build/,generated/float_constants.s
|
GEN_BASIC = build/,generated/float_constants.s
|
||||||
GEN_KERNAL =
|
GEN_KERNAL =
|
||||||
|
|
||||||
# List of build directories
|
# List of build directories
|
||||||
@@ -78,10 +78,19 @@ CFG_M65 = c64/,,config_mega65.s
|
|||||||
CFG_U64 = c64/,,config_ultimate64.s
|
CFG_U64 = c64/,,config_ultimate64.s
|
||||||
CFG_X16 = c64/,,config_cx16.s
|
CFG_X16 = c64/,,config_cx16.s
|
||||||
|
|
||||||
|
# List of files with generated strings
|
||||||
|
|
||||||
|
GEN_STR_CUS = $(DIR_CUS)/,generated/packed_strings.s
|
||||||
|
GEN_STR_GEN = $(DIR_GEN)/,generated/packed_strings.s
|
||||||
|
GEN_STR_TST = $(DIR_TST)/,generated/packed_strings.s
|
||||||
|
GEN_STR_M65 = $(DIR_M65)/,generated/packed_strings.s
|
||||||
|
GEN_STR_U64 = $(DIR_U64)/,generated/packed_strings.s
|
||||||
|
GEN_STR_X16 = $(DIR_X16)/,generated/packed_strings.s
|
||||||
|
|
||||||
# Dependencies - helper variables
|
# Dependencies - helper variables
|
||||||
|
|
||||||
DEP_BASIC = $(SRC_BASIC) $(SRCDIR_BASIC) $(GEN_BASIC)
|
DEP_BASIC = $(SRC_BASIC) $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||||
DEP_KERNAL = $(SRC_KERNAL) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
DEP_KERNAL = $(SRC_KERNAL) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||||
|
|
||||||
# List of tools
|
# List of tools
|
||||||
|
|
||||||
@@ -196,42 +205,42 @@ build/chargen_pxlfont.patched: $(TOOL_PATCH_CHARGEN) build/chargen_pxlfont.rom
|
|||||||
# Dependencies - BASIC and KERNAL
|
# Dependencies - BASIC and KERNAL
|
||||||
|
|
||||||
$(DIR_CUS)/OUTB_x.BIN $(DIR_CUS)/BASIC_combined.vs: \
|
$(DIR_CUS)/OUTB_x.BIN $(DIR_CUS)/BASIC_combined.vs: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_CUS) $(DIR_CUS)/KERNAL_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_CUS) $(GEN_STR_CUS) $(DIR_CUS)/KERNAL_combined.sym
|
||||||
$(DIR_GEN)/OUTB_x.BIN $(DIR_GEN)/BASIC_combined.vs: \
|
$(DIR_GEN)/OUTB_x.BIN $(DIR_GEN)/BASIC_combined.vs: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_GEN) $(DIR_GEN)/KERNAL_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_GEN) $(GEN_STR_GEN) $(DIR_GEN)/KERNAL_combined.sym
|
||||||
$(DIR_TST)/OUTB_x.BIN $(DIR_TST)/BASIC_combined.vs: \
|
$(DIR_TST)/OUTB_x.BIN $(DIR_TST)/BASIC_combined.vs: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_TST) $(DIR_TST)/KERNAL_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_TST) $(GEN_STR_TST) $(DIR_TST)/KERNAL_combined.sym
|
||||||
$(DIR_U64)/OUTB_x.BIN $(DIR_U64)/BASIC_combined.vs: \
|
$(DIR_U64)/OUTB_x.BIN $(DIR_U64)/BASIC_combined.vs: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_U64) $(DIR_U64)/KERNAL_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_U64) $(GEN_STR_U64) $(DIR_U64)/KERNAL_combined.sym
|
||||||
|
|
||||||
$(DIR_CUS)/OUTK_x.BIN $(DIR_CUS)/KERNAL_combined.vs $(DIR_CUS)/KERNAL_combined.sym: \
|
$(DIR_CUS)/OUTK_x.BIN $(DIR_CUS)/KERNAL_combined.vs $(DIR_CUS)/KERNAL_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_CUS)
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_CUS) $(GEN_STR_CUS)
|
||||||
$(DIR_GEN)/OUTK_x.BIN $(DIR_GEN)/KERNAL_combined.vs $(DIR_GEN)/KERNAL_combined.sym: \
|
$(DIR_GEN)/OUTK_x.BIN $(DIR_GEN)/KERNAL_combined.vs $(DIR_GEN)/KERNAL_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_GEN)
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_GEN) $(GEN_STR_GEN)
|
||||||
$(DIR_TST)/OUTK_x.BIN $(DIR_TST)/KERNAL_combined.vs $(DIR_TST)/KERNAL_combined.sym: \
|
$(DIR_TST)/OUTK_x.BIN $(DIR_TST)/KERNAL_combined.vs $(DIR_TST)/KERNAL_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_TST)
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_TST) $(GEN_STR_TST)
|
||||||
$(DIR_U64)/OUTK_x.BIN $(DIR_U64)/KERNAL_combined.vs $(DIR_U64)/KERNAL_combined.sym: \
|
$(DIR_U64)/OUTK_x.BIN $(DIR_U64)/KERNAL_combined.vs $(DIR_U64)/KERNAL_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_U64)
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_U64) $(GEN_STR_U64)
|
||||||
|
|
||||||
$(DIR_M65)/OUTB_0.BIN $(DIR_M65)/BASIC_0_combined.vs $(DIR_M65)/BASIC_0_combined.sym: \
|
$(DIR_M65)/OUTB_0.BIN $(DIR_M65)/BASIC_0_combined.vs $(DIR_M65)/BASIC_0_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_M65) $(DIR_M65)/KERNAL_0_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_M65) $(GEN_STR_M65) $(DIR_M65)/KERNAL_0_combined.sym
|
||||||
$(DIR_M65)/OUTK_0.BIN $(DIR_M65)/KERNAL_0_combined.vs $(DIR_M65)/KERNAL_0_combined.sym: \
|
$(DIR_M65)/OUTK_0.BIN $(DIR_M65)/KERNAL_0_combined.vs $(DIR_M65)/KERNAL_0_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_M65)
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_M65) $(GEN_STR_M65)
|
||||||
|
|
||||||
$(DIR_X16)/OUTB_0.BIN $(DIR_X16)/BASIC_0_combined.vs $(DIR_X16)/BASIC_0_combined.sym: \
|
$(DIR_X16)/OUTB_0.BIN $(DIR_X16)/BASIC_0_combined.vs $(DIR_X16)/BASIC_0_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_X16) $(DIR_X16)/KERNAL_0_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_X16) $(GEN_STR_X16) $(DIR_X16)/KERNAL_0_combined.sym
|
||||||
$(DIR_X16)/OUTK_0.BIN $(DIR_X16)/KERNAL_0_combined.vs $(DIR_X16)/KERNAL_0_combined.sym: \
|
$(DIR_X16)/OUTK_0.BIN $(DIR_X16)/KERNAL_0_combined.vs $(DIR_X16)/KERNAL_0_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_X16)
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_X16) $(GEN_STR_X16)
|
||||||
|
|
||||||
$(DIR_M65)/basic.seg_1 $(DIR_M65)/BASIC_1_combined.vs $(DIR_M65)/BASIC_1_combined.sym: \
|
$(DIR_M65)/basic.seg_1 $(DIR_M65)/BASIC_1_combined.vs $(DIR_M65)/BASIC_1_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_M65) $(DIR_M65)/KERNAL_0_combined.sym $(DIR_M65)/BASIC_0_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_M65) $(GEN_STR_M65) $(DIR_M65)/KERNAL_0_combined.sym $(DIR_M65)/BASIC_0_combined.sym
|
||||||
$(DIR_M65)/kernal.seg_1 $(DIR_M65)/KERNAL_1_combined.vs $(DIR_M65)/KERNAL_1_combined.sym: \
|
$(DIR_M65)/kernal.seg_1 $(DIR_M65)/KERNAL_1_combined.vs $(DIR_M65)/KERNAL_1_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_M65) $(DIR_M65)/KERNAL_0_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_M65) $(GEN_STR_M65) $(DIR_M65)/KERNAL_0_combined.sym
|
||||||
|
|
||||||
$(DIR_X16)/basic.seg_1 $(DIR_X16)/BASIC_1_combined.vs $(DIR_X16)/BASIC_1_combined.sym: \
|
$(DIR_X16)/basic.seg_1 $(DIR_X16)/BASIC_1_combined.vs $(DIR_X16)/BASIC_1_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_X16) $(DIR_X16)/KERNAL_0_combined.sym $(DIR_X16)/BASIC_0_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_BASIC) $(CFG_X16) $(GEN_STR_X16) $(DIR_X16)/KERNAL_0_combined.sym $(DIR_X16)/BASIC_0_combined.sym
|
||||||
$(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1_combined.vs $(DIR_X16)/KERNAL_1_combined.sym: \
|
$(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1_combined.vs $(DIR_X16)/KERNAL_1_combined.sym: \
|
||||||
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_X16) $(DIR_X16)/KERNAL_0_combined.sym
|
$(TOOL_ASSEMBLER) $(TOOL_BUILD_SEGMENT) $(DEP_KERNAL) $(CFG_X16) $(GEN_STR_X16) $(DIR_X16)/KERNAL_0_combined.sym
|
||||||
|
|
||||||
$(DIR_CUS)/OUTx_x.BIN: $(DIR_CUS)/OUTB_x.BIN $(DIR_CUS)/OUTK_x.BIN
|
$(DIR_CUS)/OUTx_x.BIN: $(DIR_CUS)/OUTB_x.BIN $(DIR_CUS)/OUTK_x.BIN
|
||||||
$(DIR_GEN)/OUTx_x.BIN: $(DIR_GEN)/OUTB_x.BIN $(DIR_GEN)/OUTK_x.BIN
|
$(DIR_GEN)/OUTx_x.BIN: $(DIR_GEN)/OUTB_x.BIN $(DIR_GEN)/OUTK_x.BIN
|
||||||
@@ -257,69 +266,96 @@ build/symbols_ultimate64.vs: $(DIR_U64)/BASIC_combined.vs $(DIR_U64)/KER
|
|||||||
|
|
||||||
# Rules - BASIC and KERNAL intermediate files
|
# Rules - BASIC and KERNAL intermediate files
|
||||||
|
|
||||||
build/,generated/packed_strings.s: $(TOOL_GENERATE_STRINGS)
|
$(GEN_STR_CUS): $(TOOL_GENERATE_STRINGS) $(CFG_CUS)
|
||||||
@mkdir -p build/,generated
|
@mkdir -p $(DIR_CUS)/,generated
|
||||||
$(TOOL_GENERATE_STRINGS) -o build/,generated/packed_strings.s
|
$(TOOL_GENERATE_STRINGS) -o $@ -c $(CFG_CUS)
|
||||||
|
|
||||||
|
$(GEN_STR_GEN): $(TOOL_GENERATE_STRINGS) $(CFG_GEN)
|
||||||
|
@mkdir -p $(DIR_GEN)/,generated
|
||||||
|
$(TOOL_GENERATE_STRINGS) -o $@ -c $(CFG_GEN)
|
||||||
|
|
||||||
|
$(GEN_STR_TST): $(TOOL_GENERATE_STRINGS) $(CFG_TST)
|
||||||
|
@mkdir -p $(DIR_TST)/,generated
|
||||||
|
$(TOOL_GENERATE_STRINGS) -o $@ -c $(CFG_TST)
|
||||||
|
|
||||||
|
$(GEN_STR_M65): $(TOOL_GENERATE_STRINGS) $(CFG_M65)
|
||||||
|
@mkdir -p $(DIR_M65)/,generated
|
||||||
|
$(TOOL_GENERATE_STRINGS) -o $@ -c $(CFG_M65)
|
||||||
|
|
||||||
|
$(GEN_STR_U64): $(TOOL_GENERATE_STRINGS) $(CFG_U64)
|
||||||
|
@mkdir -p $(DIR_U64)/,generated
|
||||||
|
$(TOOL_GENERATE_STRINGS) -o $@ -c $(CFG_U64)
|
||||||
|
|
||||||
|
$(GEN_STR_X16): $(TOOL_GENERATE_STRINGS) $(CFG_X16)
|
||||||
|
@mkdir -p $(DIR_X16)/,generated
|
||||||
|
$(TOOL_GENERATE_STRINGS) -o $@ -c $(CFG_X16)
|
||||||
|
|
||||||
build/,generated/float_constants.s: $(TOOL_GENERATE_CONSTANTS)
|
build/,generated/float_constants.s: $(TOOL_GENERATE_CONSTANTS)
|
||||||
@mkdir -p build/,generated
|
@mkdir -p build/,generated
|
||||||
$(TOOL_GENERATE_CONSTANTS) -o build/,generated/float_constants.s
|
$(TOOL_GENERATE_CONSTANTS) -o build/,generated/float_constants.s
|
||||||
|
|
||||||
|
GEN_STR_custom = $(GEN_STR_CUS)
|
||||||
|
GEN_STR_generic = $(GEN_STR_GEN)
|
||||||
|
GEN_STR_testing = $(GEN_STR_TST)
|
||||||
|
GEN_STR_mega65 = $(GEN_STR_M65)
|
||||||
|
GEN_STR_ultimate64 = $(GEN_STR_U64)
|
||||||
|
GEN_STR_cx16 = $(GEN_STR_X16)
|
||||||
|
|
||||||
.PRECIOUS: build/target_%/OUTB_x.BIN build/target_%/BASIC_combined.vs
|
.PRECIOUS: build/target_%/OUTB_x.BIN build/target_%/BASIC_combined.vs
|
||||||
build/target_%/OUTB_x.BIN build/target_%/BASIC_combined.vs:
|
build/target_%/OUTB_x.BIN build/target_%/BASIC_combined.vs:
|
||||||
@mkdir -p build/target_$*
|
@mkdir -p build/target_$*
|
||||||
@rm -f $@* build/target_$*/BASIC*
|
@rm -f $@* build/target_$*/BASIC*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r STD -s BASIC -i BASIC-$* -o OUTB_x.BIN -d build/target_$* -l a000 -h e4d2 c64/,,config_$*.s $(SRCDIR_BASIC) $(GEN_BASIC)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r STD -s BASIC -i BASIC-$* -o OUTB_x.BIN -d build/target_$* -l a000 -h e4d2 c64/,,config_$*.s $(SRCDIR_BASIC) $(GEN_BASIC) $(GEN_STR_$*)
|
||||||
|
|
||||||
.PRECIOUS: build/target_%/OUTK_x.BIN build/target_%/KERNAL_combined.vs build/target_%/KERNAL_combined.sym
|
.PRECIOUS: build/target_%/OUTK_x.BIN build/target_%/KERNAL_combined.vs build/target_%/KERNAL_combined.sym
|
||||||
build/target_%/OUTK_x.BIN build/target_%/KERNAL_combined.vs build/target_%/KERNAL_combined.sym:
|
build/target_%/OUTK_x.BIN build/target_%/KERNAL_combined.vs build/target_%/KERNAL_combined.sym:
|
||||||
@mkdir -p build/target_$*
|
@mkdir -p build/target_$*
|
||||||
@rm -f $@* build/target_$*/KERNAL*
|
@rm -f $@* build/target_$*/KERNAL*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r STD -s KERNAL -i KERNAL-$* -o OUTK_x.BIN -d build/target_$* -l e4d3 -h ffff c64/,,config_$*.s $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r STD -s KERNAL -i KERNAL-$* -o OUTK_x.BIN -d build/target_$* -l e4d3 -h ffff c64/,,config_$*.s $(SRCDIR_KERNAL) $(GEN_KERNAL) $(GEN_STR_$*)
|
||||||
|
|
||||||
# Rules - BASIC and KERNAL intermediate files, for Mega65
|
# Rules - BASIC and KERNAL intermediate files, for Mega65
|
||||||
|
|
||||||
$(DIR_M65)/OUTB_0.BIN $(DIR_M65)/BASIC_0_combined.vs $(DIR_M65)/BASIC_0_combined.sym:
|
$(DIR_M65)/OUTB_0.BIN $(DIR_M65)/BASIC_0_combined.vs $(DIR_M65)/BASIC_0_combined.sym:
|
||||||
@mkdir -p $(DIR_M65)
|
@mkdir -p $(DIR_M65)
|
||||||
@rm -f $@* $(DIR_M65)/BASIC_0*
|
@rm -f $@* $(DIR_M65)/BASIC_0*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s BASIC_0 -i BASIC_0-mega65 -o OUTB_0.BIN -d $(DIR_M65) -l a000 -h e4d2 $(CFG_M65) $(SRCDIR_BASIC) $(GEN_BASIC)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s BASIC_0 -i BASIC_0-mega65 -o OUTB_0.BIN -d $(DIR_M65) -l a000 -h e4d2 $(CFG_M65) $(GEN_STR_M65) $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||||
|
|
||||||
$(DIR_M65)/OUTK_0.BIN $(DIR_M65)/KERNAL_0_combined.vs $(DIR_M65)/KERNAL_0_combined.sym:
|
$(DIR_M65)/OUTK_0.BIN $(DIR_M65)/KERNAL_0_combined.vs $(DIR_M65)/KERNAL_0_combined.sym:
|
||||||
@mkdir -p $(DIR_M65)
|
@mkdir -p $(DIR_M65)
|
||||||
@rm -f $@* $(DIR_M65)/KERNAL_0*
|
@rm -f $@* $(DIR_M65)/KERNAL_0*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_0 -i KERNAL_0-mega65 -o OUTK_0.BIN -d $(DIR_M65) -l e4d3 -h ffff $(CFG_M65) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_0 -i KERNAL_0-mega65 -o OUTK_0.BIN -d $(DIR_M65) -l e4d3 -h ffff $(CFG_M65) $(GEN_STR_M65) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||||
|
|
||||||
$(DIR_M65)/basic.seg_1 $(DIR_M65)/BASIC_1_combined.vs $(DIR_M65)/BASIC_1_combined.sym:
|
$(DIR_M65)/basic.seg_1 $(DIR_M65)/BASIC_1_combined.vs $(DIR_M65)/BASIC_1_combined.sym:
|
||||||
@mkdir -p $(DIR_M65)
|
@mkdir -p $(DIR_M65)
|
||||||
@rm -f $@* $(DIR_M65)/basic.seg_1 $(DIR_M65)/BASIC_1*
|
@rm -f $@* $(DIR_M65)/basic.seg_1 $(DIR_M65)/BASIC_1*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s BASIC_1 -i BASIC_1-mega65 -o basic.seg_1 -d $(DIR_M65) -l 4000 -h 5fff $(CFG_M65) $(SRCDIR_BASIC) $(GEN_BASIC)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s BASIC_1 -i BASIC_1-mega65 -o basic.seg_1 -d $(DIR_M65) -l 4000 -h 5fff $(CFG_M65) $(GEN_STR_M65) $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||||
|
|
||||||
$(DIR_M65)/kernal.seg_1 $(DIR_M65)/KERNAL_1_combined.vs $(DIR_M65)/KERNAL_1_combined.sym:
|
$(DIR_M65)/kernal.seg_1 $(DIR_M65)/KERNAL_1_combined.vs $(DIR_M65)/KERNAL_1_combined.sym:
|
||||||
@mkdir -p $(DIR_M65)
|
@mkdir -p $(DIR_M65)
|
||||||
@rm -f $@* $(DIR_M65)/kernal.seg_1 $(DIR_M65)/KERNAL_1*
|
@rm -f $@* $(DIR_M65)/kernal.seg_1 $(DIR_M65)/KERNAL_1*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_1 -i KERNAL_1-mega65 -o kernal.seg_1 -d $(DIR_M65) -l 4000 -h 5fff $(CFG_M65) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r M65 -s KERNAL_1 -i KERNAL_1-mega65 -o kernal.seg_1 -d $(DIR_M65) -l 4000 -h 5fff $(CFG_M65) $(GEN_STR_M65) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||||
|
|
||||||
# Rules - BASIC and KERNAL intermediate files, for Commander X16
|
# Rules - BASIC and KERNAL intermediate files, for Commander X16
|
||||||
|
|
||||||
$(DIR_X16)/OUTB_0.BIN $(DIR_X16)/BASIC_0_combined.vs $(DIR_X16)/BASIC_0_combined.sym:
|
$(DIR_X16)/OUTB_0.BIN $(DIR_X16)/BASIC_0_combined.vs $(DIR_X16)/BASIC_0_combined.sym:
|
||||||
@mkdir -p $(DIR_X16)
|
@mkdir -p $(DIR_X16)
|
||||||
@rm -f $@* $(DIR_X16)/BASIC_0*
|
@rm -f $@* $(DIR_X16)/BASIC_0*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s BASIC_0 -i BASIC_0-x16 -o OUTB_0.BIN -d $(DIR_X16) -l c000 -h e4d2 $(CFG_X16) $(SRCDIR_BASIC) $(GEN_BASIC)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s BASIC_0 -i BASIC_0-x16 -o OUTB_0.BIN -d $(DIR_X16) -l c000 -h e4d2 $(CFG_X16) $(GEN_STR_X16) $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||||
|
|
||||||
$(DIR_X16)/OUTK_0.BIN $(DIR_X16)/KERNAL_0_combined.vs $(DIR_X16)/KERNAL_0_combined.sym:
|
$(DIR_X16)/OUTK_0.BIN $(DIR_X16)/KERNAL_0_combined.vs $(DIR_X16)/KERNAL_0_combined.sym:
|
||||||
@mkdir -p $(DIR_X16)
|
@mkdir -p $(DIR_X16)
|
||||||
@rm -f $@* $(DIR_X16)/KERNAL_0*
|
@rm -f $@* $(DIR_X16)/KERNAL_0*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s KERNAL_0 -i KERNAL_0-x16 -o OUTK_0.BIN -d $(DIR_X16) -l e4d3 -h ffff $(CFG_X16) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s KERNAL_0 -i KERNAL_0-x16 -o OUTK_0.BIN -d $(DIR_X16) -l e4d3 -h ffff $(CFG_X16) $(GEN_STR_X16) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||||
|
|
||||||
$(DIR_X16)/basic.seg_1 $(DIR_X16)/BASIC_1_combined.vs $(DIR_X16)/BASIC_1_combined.sym:
|
$(DIR_X16)/basic.seg_1 $(DIR_X16)/BASIC_1_combined.vs $(DIR_X16)/BASIC_1_combined.sym:
|
||||||
@mkdir -p $(DIR_X16)
|
@mkdir -p $(DIR_X16)
|
||||||
@rm -f $@* $(DIR_X16)/basic.seg_1 $(DIR_X16)/BASIC_1*
|
@rm -f $@* $(DIR_X16)/basic.seg_1 $(DIR_X16)/BASIC_1*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s BASIC_1 -i BASIC_1-x16 -o basic.seg_1 -d $(DIR_X16) -l a000 -h bfff $(CFG_X16) $(SRCDIR_BASIC) $(GEN_BASIC)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s BASIC_1 -i BASIC_1-x16 -o basic.seg_1 -d $(DIR_X16) -l a000 -h bfff $(CFG_X16) $(GEN_STR_X16) $(SRCDIR_BASIC) $(GEN_BASIC)
|
||||||
|
|
||||||
$(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1_combined.vs $(DIR_X16)/KERNAL_1_combined.sym:
|
$(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1_combined.vs $(DIR_X16)/KERNAL_1_combined.sym:
|
||||||
@mkdir -p $(DIR_X16)
|
@mkdir -p $(DIR_X16)
|
||||||
@rm -f $@* $(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1*
|
@rm -f $@* $(DIR_X16)/kernal.seg_1 $(DIR_X16)/KERNAL_1*
|
||||||
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s KERNAL_1 -i KERNAL_1-x16 -o kernal.seg_1 -d $(DIR_X16) -l a000 -h bfff $(CFG_X16) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
@$(TOOL_BUILD_SEGMENT) -a ../../$(TOOL_ASSEMBLER) -r X16 -s KERNAL_1 -i KERNAL_1-x16 -o kernal.seg_1 -d $(DIR_X16) -l a000 -h bfff $(CFG_X16) $(GEN_STR_X16) $(SRCDIR_KERNAL) $(GEN_KERNAL)
|
||||||
|
|
||||||
# Rules - BASIC and KERNAL
|
# Rules - BASIC and KERNAL
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
// #define CONFIG_IEC_JIFFYDOS_BLANK
|
// #define CONFIG_IEC_JIFFYDOS_BLANK
|
||||||
// #define CONFIG_IEC_BURST_CIA1 // please keep disabled for now
|
// #define CONFIG_IEC_BURST_CIA1 // please keep disabled for now
|
||||||
// #define CONFIG_IEC_BURST_CIA2 // please keep disabled for now
|
// #define CONFIG_IEC_BURST_CIA2 // please keep disabled for now
|
||||||
// #define CONFIG_IEC_BURST_SOFT // please keep disabled for now
|
// #define CONFIG_IEC_BURST_MEGA_65 // please keep disabled for now
|
||||||
|
|
||||||
#define CONFIG_TAPE_NORMAL
|
#define CONFIG_TAPE_NORMAL
|
||||||
#define CONFIG_TAPE_TURBO
|
#define CONFIG_TAPE_TURBO
|
||||||
@@ -135,7 +135,6 @@
|
|||||||
#define CONFIG_BANNER_FANCY
|
#define CONFIG_BANNER_FANCY
|
||||||
// #define CONFIG_BANNER_BRAND
|
// #define CONFIG_BANNER_BRAND
|
||||||
#define CONFIG_SHOW_FEATURES
|
#define CONFIG_SHOW_FEATURES
|
||||||
#define CONFIG_SHOW_PAL_NTSC
|
|
||||||
|
|
||||||
|
|
||||||
// Debug options
|
// Debug options
|
||||||
|
|||||||
@@ -148,12 +148,12 @@
|
|||||||
.error "CONFIG_IEC_DOLPHINDOS_FAST requires CONFIG_IEC_DOLPHINDOS"
|
.error "CONFIG_IEC_DOLPHINDOS_FAST requires CONFIG_IEC_DOLPHINDOS"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_SOFT) && !CONFIG_IEC
|
#if (CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_MEGA_65) && !CONFIG_IEC
|
||||||
.error "CONFIG_IEC_BURST_* requires CONFIG_IEC"
|
.error "CONFIG_IEC_BURST_* requires CONFIG_IEC"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_IEC_BURST_SOFT && !CONFIG_MB_MEGA_65
|
#if CONFIG_IEC_BURST_MEGA_65 && !CONFIG_MB_MEGA_65
|
||||||
.error "CONFIG_IEC_BURST_SOFT requires CONFIG_MB_MEGA_65"
|
.error "CONFIG_IEC_BURST_MEGA_65 requires CONFIG_MB_MEGA_65"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.var selected_iec_burst = 0;
|
.var selected_iec_burst = 0;
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
#if CONFIG_IEC_BURST_CIA2
|
#if CONFIG_IEC_BURST_CIA2
|
||||||
.eval selected_iec_burst++
|
.eval selected_iec_burst++
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_IEC_BURST_SOFT
|
#if CONFIG_IEC_BURST_MEGA_65
|
||||||
.eval selected_iec_burst++
|
.eval selected_iec_burst++
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -358,86 +358,3 @@
|
|||||||
.const CONFIG_COLOR_TXT = $01
|
.const CONFIG_COLOR_TXT = $01
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Function for printing out build features
|
|
||||||
|
|
||||||
.var feature_new_line = false
|
|
||||||
|
|
||||||
.function ADD_FEATURE(current_features, new_feature)
|
|
||||||
{
|
|
||||||
.var features_str = current_features
|
|
||||||
|
|
||||||
.if (!feature_new_line && features_str.size() > 0)
|
|
||||||
{
|
|
||||||
.eval features_str = features_str + ", "
|
|
||||||
}
|
|
||||||
|
|
||||||
.if (feature_new_line)
|
|
||||||
{
|
|
||||||
.eval feature_new_line = false
|
|
||||||
.eval features_str = features_str + @"\r"
|
|
||||||
}
|
|
||||||
|
|
||||||
.return features_str + new_feature
|
|
||||||
}
|
|
||||||
|
|
||||||
.function BUILD_FEATURES_STR()
|
|
||||||
{
|
|
||||||
.var features_str = ""
|
|
||||||
|
|
||||||
#if CONFIG_TAPE_NORMAL && !CONFIG_TAPE_TURBO
|
|
||||||
.eval features_str = ADD_FEATURE(features_str, "TAPE LOAD NORMAL")
|
|
||||||
#endif
|
|
||||||
#if !CONFIG_TAPE_NORMAL && CONFIG_TAPE_TURBO
|
|
||||||
.eval features_str = ADD_FEATURE(features_str, "TAPE LOAD TURBO")
|
|
||||||
#endif
|
|
||||||
#if CONFIG_TAPE_NORMAL && CONFIG_TAPE_TURBO
|
|
||||||
.eval features_str = ADD_FEATURE(features_str, "TAPE LOAD NORMAL TURBO")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.eval feature_new_line = true
|
|
||||||
|
|
||||||
#if CONFIG_IEC
|
|
||||||
.var iec_features_str = "IEC"
|
|
||||||
#if CONFIG_IEC_BURST_CIA1
|
|
||||||
.eval iec_features_str = iec_features_str + " BURST1"
|
|
||||||
#endif
|
|
||||||
#if CONFIG_IEC_BURST_CIA2
|
|
||||||
.eval iec_features_str = iec_features_str + " BURST2"
|
|
||||||
#endif
|
|
||||||
#if CONFIG_IEC_BURST_SOFT
|
|
||||||
.eval iec_features_str = iec_features_str + " BURST"
|
|
||||||
#endif
|
|
||||||
#if CONFIG_IEC_DOLPHINDOS
|
|
||||||
.eval iec_features_str = iec_features_str + " DOLPHIN"
|
|
||||||
#endif
|
|
||||||
#if CONFIG_IEC_JIFFYDOS
|
|
||||||
.eval iec_features_str = iec_features_str + " JIFFY"
|
|
||||||
#endif
|
|
||||||
#if !CONFIG_IEC_BURST_CIA1 && !CONFIG_IEC_BURST_CIA2 && !CONFIG_IEC_BURST_SOFT && !CONFIG_IEC_DOLPHINDOS && !CONFIG_IEC_JIFFYDOS
|
|
||||||
.eval iec_features_str = iec_features_str + " NORMAL"
|
|
||||||
#endif
|
|
||||||
.eval features_str = ADD_FEATURE(features_str, iec_features_str)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.eval feature_new_line = true
|
|
||||||
|
|
||||||
#if CONFIG_RS232_UP2400
|
|
||||||
.eval features_str = ADD_FEATURE(features_str, "UP2400")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_RS232_UP2400
|
|
||||||
.eval features_str = ADD_FEATURE(features_str, "UP9600")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_KEYBOARD_C128
|
|
||||||
.eval features_str = ADD_FEATURE(features_str, "KBD 128")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_KEYBOARD_C65
|
|
||||||
.eval features_str = ADD_FEATURE(features_str, "KBD 65")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.return features_str
|
|
||||||
}
|
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
.label PTR1 = $9E // for tape support, counter of errorneous bytes
|
.label PTR1 = $9E // for tape support, counter of errorneous bytes
|
||||||
.label PTR2 = $9F // for tape support, counter for errorneous bytes correction
|
.label PTR2 = $9F // for tape support, counter for errorneous bytes correction
|
||||||
.label TIME = $A0 // $A0-$A2 jiffy clock
|
.label TIME = $A0 // $A0-$A2 jiffy clock
|
||||||
#if !CONFIG_IEC_JIFFYDOS && !CONFIG_IEC_DOLPHINDOS && !CONFIG_IEC_BURST_CIA1 && !CONFIG_IEC_BURST_CIA2 && !CONFIG_IEC_BURST_SOFT
|
#if !CONFIG_IEC_JIFFYDOS && !CONFIG_IEC_DOLPHINDOS && !CONFIG_IEC_BURST_CIA1 && !CONFIG_IEC_BURST_CIA2 && !CONFIG_IEC_BURST_MEGA_65
|
||||||
.label TSFCNT = $A3 // temporary variable for tape and IEC, [!] our usage differs
|
.label TSFCNT = $A3 // temporary variable for tape and IEC, [!] our usage differs
|
||||||
#else
|
#else
|
||||||
.label IECPROTO = $A3 // -- WIP -- [!] 0 = normal, 1 = JiffyDOS, >= $80 for unknown
|
.label IECPROTO = $A3 // -- WIP -- [!] 0 = normal, 1 = JiffyDOS, >= $80 for unknown
|
||||||
|
|||||||
@@ -43,10 +43,6 @@
|
|||||||
.label print_return = KERNAL().print_return
|
.label print_return = KERNAL().print_return
|
||||||
.label print_space = KERNAL().print_space
|
.label print_space = KERNAL().print_space
|
||||||
|
|
||||||
#if CONFIG_SHOW_FEATURES
|
|
||||||
.label print_features = KERNAL().print_features
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_TAPE_HEAD_ALIGN
|
#if CONFIG_TAPE_HEAD_ALIGN
|
||||||
.label tape_head_align = KERNAL().tape_head_align
|
.label tape_head_align = KERNAL().tape_head_align
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ initmsg_real:
|
|||||||
ldy #$00
|
ldy #$00
|
||||||
#if CONFIG_SHOW_FEATURES
|
#if CONFIG_SHOW_FEATURES
|
||||||
jsr plot_set
|
jsr plot_set
|
||||||
jsr print_features
|
jmp print_features
|
||||||
jmp print_pal_ntsc
|
|
||||||
#else
|
#else
|
||||||
jmp plot_set
|
jmp plot_set
|
||||||
#endif
|
#endif
|
||||||
@@ -111,8 +110,7 @@ initmsg_real:
|
|||||||
ldy #$00
|
ldy #$00
|
||||||
#if CONFIG_SHOW_FEATURES
|
#if CONFIG_SHOW_FEATURES
|
||||||
jsr plot_set
|
jsr plot_set
|
||||||
jsr print_features
|
jmp print_features
|
||||||
jmp print_pal_ntsc
|
|
||||||
#else
|
#else
|
||||||
jmp plot_set
|
jmp plot_set
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4,11 +4,18 @@
|
|||||||
// #LAYOUT# * * #IGNORE
|
// #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
//
|
//
|
||||||
// Print video system on startup banner
|
// Print configured features and current video system on startup banner
|
||||||
//
|
//
|
||||||
|
|
||||||
#if CONFIG_SHOW_FEATURES
|
#if CONFIG_SHOW_FEATURES
|
||||||
|
|
||||||
|
print_features:
|
||||||
|
|
||||||
|
ldx #IDX__STR_FEATURES
|
||||||
|
jsr print_packed_misc_str
|
||||||
|
|
||||||
|
// FALLTROUGH
|
||||||
|
|
||||||
print_pal_ntsc:
|
print_pal_ntsc:
|
||||||
|
|
||||||
ldx #IDX__STR_NTSC
|
ldx #IDX__STR_NTSC
|
||||||
@@ -31,9 +31,6 @@
|
|||||||
.label __MSG_KERNAL_PANIC_ROM_MISMATCH = __msg_kernalpanic_rom_mismatch - __msg_kernal_first
|
.label __MSG_KERNAL_PANIC_ROM_MISMATCH = __msg_kernalpanic_rom_mismatch - __msg_kernal_first
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_SHOW_FEATURES
|
|
||||||
.label __MSG_KERNAL_FEATURES = __msg_kernalfeatures - __msg_kernal_first
|
|
||||||
#endif
|
|
||||||
|
|
||||||
__msg_kernal_first:
|
__msg_kernal_first:
|
||||||
|
|
||||||
@@ -99,11 +96,3 @@ __msg_kernalpanic_rom_mismatch:
|
|||||||
.byte $80 + $48 // end of string mark + 'H'
|
.byte $80 + $48 // end of string mark + 'H'
|
||||||
|
|
||||||
#endif // CONFIG_PANIC_SCREEN
|
#endif // CONFIG_PANIC_SCREEN
|
||||||
|
|
||||||
#if CONFIG_SHOW_FEATURES
|
|
||||||
|
|
||||||
__msg_kernalfeatures:
|
|
||||||
.text BUILD_FEATURES_STR()
|
|
||||||
.byte $80 + $0D // end of string mark + return
|
|
||||||
|
|
||||||
#endif // CONFIG_SHOW_FEATURES
|
|
||||||
@@ -20,7 +20,7 @@ iec_cmd_open: // similar to TKSA, but without turnaround
|
|||||||
!:
|
!:
|
||||||
ora #$F0
|
ora #$F0
|
||||||
|
|
||||||
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
|
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_MEGA_65
|
||||||
pha
|
pha
|
||||||
jsr burst_advertise
|
jsr burst_advertise
|
||||||
pla
|
pla
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ load_iec:
|
|||||||
jsr TALK
|
jsr TALK
|
||||||
bcs load_iec_error
|
bcs load_iec_error
|
||||||
|
|
||||||
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
|
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_MEGA_65
|
||||||
jsr burst_advertise
|
jsr burst_advertise
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ save_iec:
|
|||||||
jsr LISTEN
|
jsr LISTEN
|
||||||
bcs save_iec_dev_not_found
|
bcs save_iec_dev_not_found
|
||||||
|
|
||||||
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_SOFT
|
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || CONFIG_IEC_BURST_MEGA_65
|
||||||
jsr burst_advertise
|
jsr burst_advertise
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_IEC_BURST_SOFT
|
#if CONFIG_IEC_BURST_MEGA_65
|
||||||
|
|
||||||
|
|
||||||
burst_advertise:
|
burst_advertise:
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
// #LAYOUT# STD * #TAKE
|
|
||||||
// #LAYOUT# * KERNAL_0 #TAKE
|
|
||||||
// #LAYOUT# * * #IGNORE
|
|
||||||
|
|
||||||
//
|
|
||||||
// Print configured features on startup banner
|
|
||||||
//
|
|
||||||
|
|
||||||
#if CONFIG_SHOW_FEATURES
|
|
||||||
|
|
||||||
print_features:
|
|
||||||
|
|
||||||
ldx #__MSG_KERNAL_FEATURES
|
|
||||||
!:
|
|
||||||
jmp print_kernal_message
|
|
||||||
|
|
||||||
#endif // CONFIG_SHOW_FEATURES
|
|
||||||
+206
-33
@@ -2,7 +2,7 @@
|
|||||||
// Utility to generate compressed messages and BASIC tokens
|
// Utility to generate compressed messages and BASIC tokens
|
||||||
//
|
//
|
||||||
|
|
||||||
// XXX parse the config file to select the string set (STD, M65, X16) and generate feature string
|
// XXX print somewhere configuration file used to generate strings
|
||||||
// XXX use DualStream class for logging
|
// XXX use DualStream class for logging
|
||||||
// XXX use dictionary compression by finding the set of non-overlapping strings that can be concatenated
|
// XXX use dictionary compression by finding the set of non-overlapping strings that can be concatenated
|
||||||
// to produce full set of strings; some idea for the algorithm (not sure if proper one) is available here
|
// to produce full set of strings; some idea for the algorithm (not sure if proper one) is available here
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <regex>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
std::string CMD_outFile = "out.s";
|
std::string CMD_outFile = "out.s";
|
||||||
|
std::string CMD_cnfFile = "";
|
||||||
|
|
||||||
//
|
//
|
||||||
// Type definition for text/tokens to generate
|
// Type definition for text/tokens to generate
|
||||||
@@ -313,9 +315,8 @@ const StringEntryList GLOBAL_MiscStrings = { ListType::STRINGS_BASIC, "misc",
|
|||||||
{ true, true, true, "STR_ERROR", " ERROR" }, // simply the word error that is attached to the other parts of messages https://fjkraan.home.xs4all.nl/comp/apple2faq/app2asoftfaq.html
|
{ true, true, true, "STR_ERROR", " ERROR" }, // simply the word error that is attached to the other parts of messages https://fjkraan.home.xs4all.nl/comp/apple2faq/app2asoftfaq.html
|
||||||
{ true, true, true, "STR_IN", " IN " },
|
{ true, true, true, "STR_IN", " IN " },
|
||||||
// STD M65 X16 --- misc strings specific to OpenROMs, not present in CBM ROMs
|
// STD M65 X16 --- misc strings specific to OpenROMs, not present in CBM ROMs
|
||||||
{ true, true, true, "STR_PAL", "PAL\r" },
|
|
||||||
{ true, true, true, "STR_NTSC", "NTSC\r" },
|
|
||||||
{ true, true, true, "STR_BRK_AT", "\rBRK AT $" },
|
{ true, true, true, "STR_BRK_AT", "\rBRK AT $" },
|
||||||
|
// Note: depending on configuration, additional strings will be added here
|
||||||
} };
|
} };
|
||||||
|
|
||||||
|
|
||||||
@@ -448,6 +449,8 @@ const StringEntryList GLOBAL_MiscStrings = { ListType::STRINGS_BASIC, "misc",
|
|||||||
"HIGHLIGHT" // $FE $3D
|
"HIGHLIGHT" // $FE $3D
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
std::map<std::string, bool> GLOBAL_ConfigOptions;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Work class definitions
|
// Work class definitions
|
||||||
//
|
//
|
||||||
@@ -464,6 +467,7 @@ private:
|
|||||||
|
|
||||||
void process();
|
void process();
|
||||||
|
|
||||||
|
void generateConfigDepStrings();
|
||||||
void calculateFrequencies();
|
void calculateFrequencies();
|
||||||
void encodeStrings();
|
void encodeStrings();
|
||||||
|
|
||||||
@@ -539,6 +543,7 @@ void DataSet::process()
|
|||||||
{
|
{
|
||||||
std::cout << "Processing layout '" << layoutName() << "'" << std::endl;
|
std::cout << "Processing layout '" << layoutName() << "'" << std::endl;
|
||||||
|
|
||||||
|
generateConfigDepStrings();
|
||||||
calculateFrequencies();
|
calculateFrequencies();
|
||||||
encodeStrings();
|
encodeStrings();
|
||||||
prepareOutput();
|
prepareOutput();
|
||||||
@@ -554,6 +559,101 @@ const std::string &DataSet::getOutput()
|
|||||||
return outFileContent;
|
return outFileContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DataSet::generateConfigDepStrings()
|
||||||
|
{
|
||||||
|
// Generate string to show the build features
|
||||||
|
|
||||||
|
std::string featureStr;
|
||||||
|
|
||||||
|
// Tape support features
|
||||||
|
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_TAPE_NORMAL"] && GLOBAL_ConfigOptions["CONFIG_TAPE_TURBO"])
|
||||||
|
{
|
||||||
|
featureStr = "TAPE LOAD NORMAL TURBO\r";
|
||||||
|
}
|
||||||
|
else if (GLOBAL_ConfigOptions["CONFIG_TAPE_NORMAL"])
|
||||||
|
{
|
||||||
|
featureStr = "TAPE LOAD NORMAL\r";
|
||||||
|
}
|
||||||
|
else if (GLOBAL_ConfigOptions["CONFIG_TAPE_TURBO"])
|
||||||
|
{
|
||||||
|
featureStr = "TAPE LOAD TURBO\r";
|
||||||
|
}
|
||||||
|
|
||||||
|
// IEC support features
|
||||||
|
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_IEC"])
|
||||||
|
{
|
||||||
|
featureStr += "IEC";
|
||||||
|
|
||||||
|
bool extendedIEC = false;
|
||||||
|
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_IEC_BURST_CIA1"])
|
||||||
|
{
|
||||||
|
featureStr += " BURST1";
|
||||||
|
extendedIEC = true;
|
||||||
|
}
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_IEC_BURST_CIA2"])
|
||||||
|
{
|
||||||
|
featureStr += " BURST2";
|
||||||
|
extendedIEC = true;
|
||||||
|
}
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_IEC_BURST_MEGA65"])
|
||||||
|
{
|
||||||
|
featureStr += " BURST";
|
||||||
|
extendedIEC = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_IEC_DOLPHINDOS"])
|
||||||
|
{
|
||||||
|
featureStr += " DOLPHIN";
|
||||||
|
extendedIEC = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_IEC_JIFFYDOS"])
|
||||||
|
{
|
||||||
|
featureStr += " JIFFY";
|
||||||
|
extendedIEC = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!extendedIEC) featureStr += " NORMAL";
|
||||||
|
|
||||||
|
featureStr += "\r";
|
||||||
|
}
|
||||||
|
|
||||||
|
// RS-232 support features
|
||||||
|
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_RS232_UP2400"]) featureStr += "UP2400\r";
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_RS232_UP9600"]) featureStr += "UP9600\r";
|
||||||
|
|
||||||
|
// Keyboard support features
|
||||||
|
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_KEYBOARD_C128"]) featureStr += "KBD 128\r";
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_KEYBOARD_C65"]) featureStr += "KBD 65\r";
|
||||||
|
|
||||||
|
// Add strings to appropriate list
|
||||||
|
|
||||||
|
for (auto &stringEntryList : stringEntryLists)
|
||||||
|
{
|
||||||
|
if (stringEntryList.name != std::string("misc")) continue;
|
||||||
|
|
||||||
|
// List found
|
||||||
|
|
||||||
|
if (GLOBAL_ConfigOptions["CONFIG_SHOW_FEATURES"])
|
||||||
|
{
|
||||||
|
StringEntry newEntry1 = { true, true, true, "STR_PAL", "PAL\r" };
|
||||||
|
StringEntry newEntry2 = { true, true, true, "STR_NTSC", "NTSC\r" };
|
||||||
|
StringEntry newEntry3 = { true, true, true, "STR_FEATURES", featureStr };
|
||||||
|
|
||||||
|
stringEntryList.list.push_back(newEntry1);
|
||||||
|
stringEntryList.list.push_back(newEntry2);
|
||||||
|
stringEntryList.list.push_back(newEntry3);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DataSet::calculateFrequencies()
|
void DataSet::calculateFrequencies()
|
||||||
{
|
{
|
||||||
as1n.clear();
|
as1n.clear();
|
||||||
@@ -899,10 +999,59 @@ void DataSet::prepareOutput()
|
|||||||
// Common helper functions
|
// Common helper functions
|
||||||
//
|
//
|
||||||
|
|
||||||
|
void parseConfigFile()
|
||||||
|
{
|
||||||
|
GLOBAL_ConfigOptions.clear();
|
||||||
|
|
||||||
|
// Open the configuration file
|
||||||
|
|
||||||
|
std::ifstream cnfFile;
|
||||||
|
cnfFile.open(CMD_cnfFile);
|
||||||
|
if (!cnfFile.good()) ERROR("unable to open config file");
|
||||||
|
|
||||||
|
// Parse the file
|
||||||
|
|
||||||
|
size_t lineNum = 0;
|
||||||
|
while (!cnfFile.eof())
|
||||||
|
{
|
||||||
|
lineNum++;
|
||||||
|
std::string workStr;
|
||||||
|
|
||||||
|
// Read a single line, remove leading spaces and tabs
|
||||||
|
|
||||||
|
std::getline(cnfFile, workStr); // XXX check for errors here
|
||||||
|
workStr = std::regex_replace(workStr, std::regex("^[ \t]+"), "");
|
||||||
|
|
||||||
|
// Skip lines which are not preprocessor definitions
|
||||||
|
|
||||||
|
if (workStr.empty() || workStr[0] != '#') continue;
|
||||||
|
|
||||||
|
// Make sure this is '#define '
|
||||||
|
|
||||||
|
if (!std::regex_match(workStr, std::regex("^#define[ \t].*")))
|
||||||
|
{
|
||||||
|
ERROR(std::string("only '#define' preprocessor directives allowed in config files - line ") + std::to_string(lineNum));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get rid of the directive and trailing spaces/comments
|
||||||
|
|
||||||
|
workStr = std::regex_replace(workStr, std::regex("^#define[ \t]+"), "");
|
||||||
|
workStr = std::regex_replace(workStr, std::regex("[ \t]+.*"), "");
|
||||||
|
|
||||||
|
// Add definitin to config option map
|
||||||
|
|
||||||
|
if (workStr.empty()) ERROR(std::string("error parsing config file - line ") + std::to_string(lineNum));
|
||||||
|
|
||||||
|
GLOBAL_ConfigOptions[workStr] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
cnfFile.close();
|
||||||
|
}
|
||||||
|
|
||||||
void printUsage()
|
void printUsage()
|
||||||
{
|
{
|
||||||
std::cout << "\n" <<
|
std::cout << "\n" <<
|
||||||
"usage: generate_strings [-o <out file>]" << "\n\n";
|
"usage: generate_strings [-o <out file>] [-c <configuration file>]" << "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void printBanner()
|
void printBanner()
|
||||||
@@ -918,11 +1067,12 @@ void parseCommandLine(int argc, char **argv)
|
|||||||
|
|
||||||
// Retrieve command line options
|
// Retrieve command line options
|
||||||
|
|
||||||
while ((opt = getopt(argc, argv, "o:")) != -1)
|
while ((opt = getopt(argc, argv, "o:c:")) != -1)
|
||||||
{
|
{
|
||||||
switch(opt)
|
switch(opt)
|
||||||
{
|
{
|
||||||
case 'o': CMD_outFile = optarg; break;
|
case 'o': CMD_outFile = optarg; break;
|
||||||
|
case 'c': CMD_cnfFile = optarg; break;
|
||||||
default: printUsage(); ERROR();
|
default: printUsage(); ERROR();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -930,35 +1080,60 @@ void parseCommandLine(int argc, char **argv)
|
|||||||
|
|
||||||
void writeStrings()
|
void writeStrings()
|
||||||
{
|
{
|
||||||
DataSetSTD dataSetSTD;
|
std::string outputString;
|
||||||
DataSetM65 dataSetM65;
|
|
||||||
DataSetX16 dataSetX16;
|
|
||||||
|
|
||||||
// Add input data to computation objects
|
if (GLOBAL_ConfigOptions["CONFIG_PLATFORM_COMMANDER_X16"])
|
||||||
|
{
|
||||||
|
DataSetX16 dataSetX16;
|
||||||
|
|
||||||
dataSetSTD.addStrings(GLOBAL_Keywords_V2);
|
// Add input data to computation objects
|
||||||
dataSetSTD.addStrings(GLOBAL_Keywords_CC);
|
|
||||||
dataSetSTD.addStrings(GLOBAL_Keywords_CD);
|
|
||||||
dataSetSTD.addStrings(GLOBAL_Errors);
|
|
||||||
dataSetSTD.addStrings(GLOBAL_MiscStrings);
|
|
||||||
|
|
||||||
dataSetM65.addStrings(GLOBAL_Keywords_V2);
|
dataSetX16.addStrings(GLOBAL_Keywords_V2);
|
||||||
dataSetM65.addStrings(GLOBAL_Keywords_CC);
|
dataSetX16.addStrings(GLOBAL_Keywords_CC);
|
||||||
dataSetM65.addStrings(GLOBAL_Keywords_CD);
|
dataSetX16.addStrings(GLOBAL_Keywords_CD);
|
||||||
dataSetM65.addStrings(GLOBAL_Errors);
|
dataSetX16.addStrings(GLOBAL_Errors);
|
||||||
dataSetM65.addStrings(GLOBAL_MiscStrings);
|
dataSetX16.addStrings(GLOBAL_MiscStrings);
|
||||||
|
|
||||||
dataSetX16.addStrings(GLOBAL_Keywords_V2);
|
// Retrieve the results
|
||||||
dataSetX16.addStrings(GLOBAL_Keywords_CC);
|
|
||||||
dataSetX16.addStrings(GLOBAL_Keywords_CD);
|
|
||||||
dataSetX16.addStrings(GLOBAL_Errors);
|
|
||||||
dataSetX16.addStrings(GLOBAL_MiscStrings);
|
|
||||||
|
|
||||||
// Retrieve the results
|
outputString = dataSetX16.getOutput();
|
||||||
|
}
|
||||||
|
else if (GLOBAL_ConfigOptions["CONFIG_PLATFORM_COMMODORE_64"] && GLOBAL_ConfigOptions["CONFIG_MB_MEGA_65"])
|
||||||
|
{
|
||||||
|
DataSetM65 dataSetM65;
|
||||||
|
|
||||||
std::string outputSTD = dataSetSTD.getOutput();
|
// Add input data to computation objects
|
||||||
std::string outputM65 = dataSetM65.getOutput();
|
|
||||||
std::string outputX16 = dataSetX16.getOutput();
|
dataSetM65.addStrings(GLOBAL_Keywords_V2);
|
||||||
|
dataSetM65.addStrings(GLOBAL_Keywords_CC);
|
||||||
|
dataSetM65.addStrings(GLOBAL_Keywords_CD);
|
||||||
|
dataSetM65.addStrings(GLOBAL_Errors);
|
||||||
|
dataSetM65.addStrings(GLOBAL_MiscStrings);
|
||||||
|
|
||||||
|
// Retrieve the results
|
||||||
|
|
||||||
|
outputString = dataSetM65.getOutput();
|
||||||
|
}
|
||||||
|
else if (GLOBAL_ConfigOptions["CONFIG_PLATFORM_COMMODORE_64"])
|
||||||
|
{
|
||||||
|
DataSetSTD dataSetSTD;
|
||||||
|
|
||||||
|
// Add input data to computation objects
|
||||||
|
|
||||||
|
dataSetSTD.addStrings(GLOBAL_Keywords_V2);
|
||||||
|
dataSetSTD.addStrings(GLOBAL_Keywords_CC);
|
||||||
|
dataSetSTD.addStrings(GLOBAL_Keywords_CD);
|
||||||
|
dataSetSTD.addStrings(GLOBAL_Errors);
|
||||||
|
dataSetSTD.addStrings(GLOBAL_MiscStrings);
|
||||||
|
|
||||||
|
// Retrieve the results
|
||||||
|
|
||||||
|
outputString = dataSetSTD.getOutput();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ERROR("unable to determine string set");
|
||||||
|
}
|
||||||
|
|
||||||
// Remove old file
|
// Remove old file
|
||||||
|
|
||||||
@@ -976,11 +1151,7 @@ void writeStrings()
|
|||||||
// Write packed strings
|
// Write packed strings
|
||||||
|
|
||||||
outFile << std::endl << std::endl;
|
outFile << std::endl << std::endl;
|
||||||
outFile << outputSTD;
|
outFile << outputString;
|
||||||
outFile << std::endl << std::endl;
|
|
||||||
outFile << outputM65;
|
|
||||||
outFile << std::endl << std::endl;
|
|
||||||
outFile << outputX16;
|
|
||||||
outFile << std::endl << std::endl;
|
outFile << std::endl << std::endl;
|
||||||
|
|
||||||
// Close the file
|
// Close the file
|
||||||
@@ -999,6 +1170,8 @@ int main(int argc, char **argv)
|
|||||||
printBanner();
|
printBanner();
|
||||||
parseCommandLine(argc, argv);
|
parseCommandLine(argc, argv);
|
||||||
|
|
||||||
|
parseConfigFile();
|
||||||
|
|
||||||
writeStrings();
|
writeStrings();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in new issue
Block a user