Added nestor80 example.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 18s

This commit is contained in:
Willem Cazander 2024-07-15 00:12:42 +02:00
parent 893c848d1d
commit be64071e88
14 changed files with 164 additions and 4 deletions

View file

@ -0,0 +1,74 @@
MB_NESTOR80_PATH ?=
$(call mb_make_call,mb_doc_variable,MB_NESTOR80_PATH,"Optional path where Nestor80 binaries are located.")
MB_NESTOR80_FLAG_VERBOSE ?=--no-show-banner --no-color-output --verbosity 0
$(call mb_make_call,mb_doc_variable_deep,MB_NESTOR80_FLAG_VERBOSE,"The Nestor80 shared verbose flags.")
MB_NESTOR80_N80_FLAGS ?=
$(call mb_make_call,mb_doc_variable_deep,MB_NESTOR80_N80_FLAGS,"The N80 compile flags.")
MB_NESTOR80_LK80_FLAGS ?=
$(call mb_make_call,mb_doc_variable_deep,MB_NESTOR80_LK80_FLAGS,"The LK80 linker flags.")
define _mb_nestor80_path
$(MB_   )$(if $(MB_NESTOR80_PATH),$(MB_NESTOR80_PATH)/$(1),$(1))
endef
define mb_nestor80_compile
$(MB_   )$(call mb_make_call,mb_os_echo_command,$(MB_I18N_NESTOR80_COMPILE) $(2))
$(MB_   )$(call mb_make_call,_mb_nestor80_path,N80) $(1) $(2) $(MB_NESTOR80_N80_FLAGS) $(MB_NESTOR80_FLAG_VERBOSE)
endef
$(call mb_make_call,mb_doc_function,mb_nestor80_compile,"Compiles source code.","<in> <out>")
define mb_nestor80_link
$(MB_   )$(call mb_make_call,mb_os_echo_command,$(MB_I18N_NESTOR80_LINK) $(2) @ $(3))
$(MB_   )$(call mb_make_call,_mb_nestor80_path,LK80) $(MB_NESTOR80_LK80_FLAGS) $(MB_NESTOR80_FLAG_VERBOSE) --code $(3) --output-format bin -o $(2) $(1)
endef
$(call mb_make_call,mb_doc_function,mb_nestor80_link,"Links to custom code location.","<in> <out> <code-loc>")
define mb_nestor80_link_0000
$(MB_   )$(call mb_make_call,mb_nestor80_link,$(1),$(2),0000h)
endef
$(call mb_make_call,mb_doc_function,mb_nestor80_link_0000,"Links to 0x0000.","<in> <out>")
define mb_nestor80_link_0100
$(MB_   )$(call mb_make_call,mb_nestor80_link,$(1),$(2),0100h)
endef
$(call mb_make_call,mb_doc_function,mb_nestor80_link_0100,"Links to 0x0100.","<in> <out>")
define mb_nestor80_link_1000
$(MB_   )$(call mb_make_call,mb_nestor80_link,$(1),$(2),1000h)
endef
$(call mb_make_call,mb_doc_function,mb_nestor80_link_1000,"Links to 0x1000.","<in> <out>")
define mb_nestor80_link_4000
$(MB_   )$(call mb_make_call,mb_nestor80_link,$(1),$(2),4000h)
endef
$(call mb_make_call,mb_doc_function,mb_nestor80_link_4000,"Links to 0x4000.","<in> <out>")
define mb_nestor80_link_8000
$(MB_   )$(call mb_make_call,mb_nestor80_link,$(1),$(2),8000h)
endef
$(call mb_make_call,mb_doc_function,mb_nestor80_link_8000,"Links to 0x8000.","<in> <out>")
define mb_nestor80_link_C000
$(MB_   )$(call mb_make_call,mb_nestor80_link,$(1),$(2),C000h)
endef
$(call mb_make_call,mb_doc_function,mb_nestor80_link_C000,"Links to 0xC000.","<in> <out>")
define mb_nestor80_link_bdos
$(MB_   )$(call mb_make_call,mb_nestor80_link_0100,$(1),$(2))
endef
$(call mb_make_call,mb_doc_function,mb_nestor80_link_bdos,"Links to BDOS.","<in> <out>")

View file

@ -68,6 +68,12 @@ $(call mb_make_call,mb_doc_variable_i18n,MB_I18N_PROJ_ASSERT_COUNT,"Message for
MB_I18N_FLOW_CLONE_REPORT ?= Clone troopers
$(call mb_make_call,mb_doc_variable_i18n,MB_I18N_FLOW_CLONE_REPORT,"Message for total amount of cloned files.")
MB_I18N_NESTOR80_COMPILE ?= Nestor80 compile
$(call mb_make_call,mb_doc_variable_i18n,MB_I18N_NESTOR80_COMPILE,"Message for Nestor80 compiler run.")
MB_I18N_NESTOR80_LINK ?= Nestor80 linking
$(call mb_make_call,mb_doc_variable_i18n,MB_I18N_NESTOR80_LINK,"Message for Nestor80 linker run.")
MB_I18N_SDCC_COMPILE ?= SDCC Compile super
$(call mb_make_call,mb_doc_variable_i18n,MB_I18N_SDCC_COMPILE,"Message for SDCC compiler run.")

View file

@ -21,6 +21,8 @@ MB_I18N_PROJ_DIR_CREATE = FOLDER CREATE:
MB_I18N_PROJ_DIR_DELETE = FOLDER DELETE:
MB_I18N_PROJ_ASSERT_COUNT = TOTAL ASSERT OK:
MB_I18N_FLOW_CLONE_REPORT = GEM⁴ TROOPERS:
MB_I18N_NESTOR80_COMPILE = N80 CHURCH:
MB_I18N_NESTOR80_LINK = LK80 PRAYER:
MB_I18N_SDCC_COMPILE = ATARI COMPILE:
MB_I18N_SDCC_ARLIB = ATARI ARLIB:
MB_I18N_SDCC_LINK = ATARI LINK []:

View file

@ -21,6 +21,8 @@ MB_I18N_PROJ_DIR_CREATE = ᑐᖅᑯᐃᕝᕕᓕᐅᕐᓂᖅ
MB_I18N_PROJ_DIR_DELETE = ᑐᖅᑯᖅᓯᓯᒪᕝᕕᖓ ᐲᔭᖅᑕᐅᓗᓂ
MB_I18N_PROJ_ASSERT_COUNT = ᑲᑎᖦᖢᒋᑦ ᑕᐃᒪᐃᓐᓂᕋᖅᑕᐅᔪᑦ
MB_I18N_FLOW_CLONE_REPORT = ᐃᓐᓈᕈᐃᑦ
MB_I18N_NESTOR80_COMPILE = ᓂᖀᑦ ᓄᑕᐅᙱᑦᑐᑦ ᑲᑎᖅᓱᒐᑦ
MB_I18N_NESTOR80_LINK = ᓱᓪᓗᑯᑖᒃᑯᑦ ᐊᒃᑐᐊᖃᑦᑕᐅᑎᓂᖅ
MB_I18N_SDCC_COMPILE = ᖃᕆᑕᐅᔭᕋᓛᖅᓄᐊᑦᓯᓂᖅ
MB_I18N_SDCC_ARLIB = ᖃᕆᑕᐅᔭᕋᓛᖅᑐᖅᑯᖅᑕᐅᓯᒪᔪᑦ
MB_I18N_SDCC_LINK = ᖃᕆᑕᐅᔭᕋᓛᖅᐊᑦᑕᑕᕐᕕᒃᓴ

View file

@ -21,6 +21,8 @@ MB_I18N_PROJ_DIR_CREATE = フォルダーの作成
MB_I18N_PROJ_DIR_DELETE = フォルダーの削除
MB_I18N_PROJ_ASSERT_COUNT = 完了したアサーションの合計
MB_I18N_FLOW_CLONE_REPORT = クローン・トルーパー
MB_I18N_NESTOR80_COMPILE = ネスターの古いコンパイル
MB_I18N_NESTOR80_LINK = ネストルの古いリンク
MB_I18N_SDCC_COMPILE = 標準マイクロコンパイラ
MB_I18N_SDCC_ARLIB = 標準マイクロビルドライブラリ
MB_I18N_SDCC_LINK = 標準マイクロリンクメッカ図書館

View file

@ -19,7 +19,7 @@ $(call mb_make_call,mb_doc_variable,MB_MSXPIPE_COLOR_BG_RUN_GUI,"Background colo
define mb_msxpipe_safe_cmd
$(MB_   )$(call mb_make_call,mb_autoexec_write_default,$(1),$(if $(4),$(4),$(MB_MSXPIPE_COLOR_FG_SAFE_CMD)),$(if $(),$(5),$(MB_MSXPIPE_COLOR_BG_SAFE_CMD)))
$(MB_   )$(call mb_make_call,mb_autoexec_write_default,$(1),$(if $(4),$(4),$(MB_MSXPIPE_COLOR_FG_SAFE_CMD)),$(if $(5),$(5),$(MB_MSXPIPE_COLOR_BG_SAFE_CMD)))
$(MB_   )$(call mb_make_call,mb_autoexec_append_safe_cmd,$(1),$(2))
$(MB_   )$(call mb_make_call,mb_autoexec_append_exit,$(1))
$(MB_   )$(call mb_make_call,mb_openmsx_dosctl,$(1),$(3))

View file

@ -0,0 +1,32 @@
define __mb_flow_nestor80_bdos_mono
.RECIPEPREFIX := $(MB_@RECIPE)
$(1)/@@prepare-deps:: $(1)/$(3).mac
$(1)/$(3).mac: $(2)/$(3).mac | $(1)/@init
$(MB_@RECIPE)$$(call mb_make_call,mb_os_file_copy,$$<,$$@)
$(MB_   )$$(call mb_make_call,mb_doc_target_deep,$(1)/$(3).mac)
$(MB_   )$$(call mb_make_call,mb_proj_grow_deps_phase,@prepare,$(1)/$(3).mac)
$(1)/@@compile-deps:: $(1)/$(3).rel
$(1)/$(3).rel: $(1)/$(3).mac
$(MB_@RECIPE)$$(call mb_make_call,mb_nestor80_compile,$$<,$$@)
$(MB_   )$$(call mb_make_call,mb_doc_target_deep,$(1)/$(3).rel)
$(MB_   )$$(call mb_make_call,mb_proj_grow_deps_phase,@compile,$(1)/$(3).rel)
$(1)/@@link-deps:: $(1)/$(3).com
$(1)/$(3).com: $(1)/$(3).rel
$(MB_@RECIPE)$$(call mb_make_call,mb_nestor80_link_bdos,$$<,$$@)
$(MB_   )$$(call mb_make_call,mb_doc_target_deep,$(1)/$(3).com)
$(MB_   )$$(call mb_make_call,mb_proj_grow_deps_phase,@link,$(1)/$(3).com)
.RECIPEPREFIX := $(MB_@RECIPEPREFIX)
endef
define mb_flow_nestor80_bdos_mono
$(MB_   )$(call mb_make_call,mb_make_check_arg3,$(0),$(1),$(2),$(3))
$(MB_   )$(call mb_make_call,mb_flow_proj_setup,$(1),@init,$(1))
$(MB_   )$(call mb_make_call,mb_flow_proj_module_run,$(1))
$(MB_   )$(eval $(call mb_make_call,__$(0),$(1),$(2),$(3)))
endef
$(call mb_make_call,mb_doc_function_flow,mb_flow_nestor80_bdos_mono,"Inject flow of Nestor80 toolchain bdos mono file module.","<bin-dir> <src-dir> <objname>")