2020-12-23 17:14:13 +00:00
|
|
|
|
|
2024-07-10 18:48:32 +00:00
|
|
|
|
MB_OPENMSX_PATH ?=
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_PATH,"Optional path where openMSX binary is located.")
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_BOOT_TIMEOUT ?= 25
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_BOOT_TIMEOUT,"Timeout in seconds to guard for boot failures.")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_BOOT_OS ?= nextor
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_BOOT_OS,"The default OS to run$$(MB_MAKE_COMMA) valid values are; nextor$$(MB_MAKE_COMMA)msxdos1$$(MB_MAKE_COMMA)msxdos2")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_MACHINE ?= Philips_NMS_8250
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_MACHINE,"The default MSX machine to use.",$(MB_OPENMSX_MACHINE))
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_MACHINE_RAM ?= ram1mb
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_MACHINE_RAM,"Extra ram extension for machine allowed: off$$(MB_MAKE_COMMA)ram16k$$(MB_MAKE_COMMA)ram64k$$(MB_MAKE_COMMA)ram512k$$(MB_MAKE_COMMA)ram1mb$$(MB_MAKE_COMMA)ram2mb$$(MB_MAKE_COMMA)ram4mb")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_SPEED ?= $(if $(findstring turboR,$(MB_OPENMSX_MACHINE)),100,333)
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_SPEED,"The throttled MSX emulation speed.")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_ARGS ?=
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_ARGS,"Extra arguments to invoke openMSX with.")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_HDD_SIZE ?= 4m
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_HDD_SIZE,"The default fire-hdd disk image size.")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_SCALE_FACTOR ?= 3
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_SCALE_FACTOR,"The gui scale factor to display the emulation.")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_THROTTLE ?= off
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_THROTTLE,"An on/off flag to control throttling globally.")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_HEADLESS ?= on
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable,MB_OPENMSX_HEADLESS,"Controls if openMSX starts headless.")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-02 02:11:13 +00:00
|
|
|
|
MB_OPENMSX_RENDERER ?= SDLGL-PP
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable-deep,MB_OPENMSX_RENDERER,"The gui renderer used to display the window head with.")
|
2024-07-02 01:27:14 +00:00
|
|
|
|
|
2024-07-07 13:02:36 +00:00
|
|
|
|
MB_OPENMSX_STDOUT_IGNORE ?= off
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable-deep,MB_OPENMSX_STDOUT_IGNORE,"Kills logging...rm after issues openMSX are solved.")
|
2024-07-08 02:23:37 +00:00
|
|
|
|
|
2024-07-07 13:02:36 +00:00
|
|
|
|
MB_OPENMSX_STDERR_IGNORE ?= off
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable-deep,MB_OPENMSX_STDERR_IGNORE,"Kills logging...rm after issues openMSX are solved.")
|
2024-07-07 02:33:03 +00:00
|
|
|
|
|
2024-07-14 22:31:46 +00:00
|
|
|
|
MB_OPENMSX_FIRE_PIPE_SMOKE ?=
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-variable-flow,MB_OPENMSX_FIRE_PIPE_SMOKE,"Word count of total openMSX executions.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define mb-openmsx-setup
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-make-check-arg2,$(0),$(1),$(2))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/stdio.xml),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)openmsx/stdio.xml,$(1)$(MB_@WORK)$(notdir $(1))))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/share))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/settings.xml),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)openmsx/share/settings.xml,$(1)$(MB_@WORK)$(notdir $(1))/share))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/scripts),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/share/scripts))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/scripts/boot_exec.tcl),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)openmsx/share/scripts/boot_exec.tcl,$(1)$(MB_@WORK)$(notdir $(1))/share/scripts))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/scripts/fail_after.tcl),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)openmsx/share/scripts/fail_after.tcl,$(1)$(MB_@WORK)$(notdir $(1))/share/scripts))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/scripts/fire_hdd.tcl),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)openmsx/share/scripts/fire_hdd.tcl,$(1)$(MB_@WORK)$(notdir $(1))/share/scripts))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/scripts/headless.tcl),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)openmsx/share/scripts/headless.tcl,$(1)$(MB_@WORK)$(notdir $(1))/share/scripts))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/scripts/night_flight.tcl),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)openmsx/share/scripts/night_flight.tcl,$(1)$(MB_@WORK)$(notdir $(1))/share/scripts))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/scripts/omsxctl.tcl),,$(call mb-make-call,mb-msxhub-file,$(1)$(MB_@WORK)$(notdir $(1))/share/scripts,OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.tcl))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/extensions),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/share/extensions))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/share/extensions/fire-hdd.xml),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)openmsx/share/extensions/fire-hdd.xml,$(1)$(MB_@WORK)$(notdir $(1))/share/extensions))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-msxrom-setup,$(1))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-msxrom-extension-ide-nextor,$(1))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-msxrom-machine-$(2),$(1))
|
2024-06-25 10:42:54 +00:00
|
|
|
|
endef
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-function-deep,mb-openmsx-setup,"Setup openMSX local build home folder for machine.","<dir> <machine>")
|
2024-07-02 21:18:20 +00:00
|
|
|
|
|
2024-07-05 22:11:54 +00:00
|
|
|
|
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define _mb-openmsx-path
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(MB_OPENMSX_PATH),$(MB_OPENMSX_PATH)/$(1),$(1))
|
2024-07-10 18:48:32 +00:00
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define _mb-openmsx-run
|
2024-07-14 22:31:46 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(eval MB_OPENMSX_FIRE_PIPE_SMOKE $(MB_MAKE_APPEND) OK)
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-os-echo-command,$(MB_I18N_OPENMSX_STARTUP) $@ - $(2))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)$(MB_@WORK)$(notdir $(1))/persistent/fire-hdd/untitled1/sync),,$(call mb-make-call,mb-os-dir-create,$(1)$(MB_@WORK)$(notdir $(1))/persistent/fire-hdd/untitled1/sync))
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )BOOT_WATCHDOG=$(MB_OPENMSX_BOOT_TIMEOUT) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )FIRE_HDD_PATH="$(1)" \
|
|
|
|
|
$(MB_ᕽᕽᕽ )FIRE_HDD_SIZE=$(MB_OPENMSX_HDD_SIZE) \
|
2024-07-14 18:53:44 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )FIRE_HDD_IMAGE="$(1)$(MB_@WORK)$(notdir $(1))/persistent/fire-hdd/untitled1/image-hda.dsk" \
|
|
|
|
|
$(MB_ᕽᕽᕽ )FIRE_HDD_PATH_EXPORT="$(1)$(MB_@WORK)$(notdir $(1))/persistent/fire-hdd/untitled1/sync" \
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )SCALE_FACTOR=$(MB_OPENMSX_SCALE_FACTOR) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )SPEED=$(MB_OPENMSX_SPEED) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )HEADLESS=$(MB_OPENMSX_HEADLESS) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )RENDERER=$(MB_OPENMSX_RENDERER) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )THROTTLE=$(MB_OPENMSX_THROTTLE) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )NF_PREFIX=$(MB_FLIGHT_PREFIX) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )NF_SEPERATOR=$(MB_FLIGHT_SEPERATOR) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )NF_RECORD_FLAG=$(MB_FLIGHT_RECORD_FLAG) \
|
2024-07-14 18:53:44 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )OPENMSX_HOME="$(1)$(MB_@WORK)$(notdir $(1))" \
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,_mb-openmsx-path,openmsx) \
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )-machine $(2) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )-ext slotexpander \
|
|
|
|
|
$(MB_ᕽᕽᕽ )-ext fire-hdd \
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(filter ram16k,$(3)),-ext ram16k) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(filter ram64k,$(3)),-ext ram64k) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(filter ram512k,$(3)),-ext ram512k) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(filter ram1mb,$(3)),-ext ram1mb) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(filter ram4mb,$(3)),-ext ram2mb) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(filter ram4mb,$(3)),-ext ram4mb) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(MB_OPENMSX_ARGS) \
|
2024-07-14 18:53:44 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )-control stdio < $(1)$(MB_@WORK)$(notdir $(1))/stdio.xml \
|
2024-07-12 15:59:26 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(filter on,$(MB_OPENMSX_STDOUT_IGNORE)),$(MB_OS_STDOUT_IGNORE)) \
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(filter on,$(MB_OPENMSX_STDERR_IGNORE)),$(MB_OS_STDERR_IGNORE))
|
2024-07-14 18:53:44 +00:00
|
|
|
|
$(MB_ᕽᕽᕽ )rsync --checksum --recursive "$(1)$(MB_@WORK)$(notdir $(1))/persistent/fire-hdd/untitled1/sync/" "$(1)/"
|
2020-12-23 17:14:13 +00:00
|
|
|
|
endef
|
2021-07-06 02:28:45 +00:00
|
|
|
|
|
2024-07-02 21:18:20 +00:00
|
|
|
|
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define _mb-openmsx-dosctl-bat
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)/z80.bat),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)emuctl/z80.bat,$(1)))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)/reboot.bat),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)emuctl/reboot.bat,$(1)))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)/shutdown.bat),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)emuctl/shutdown.bat,$(1)))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)/mbboot80.com),,$(call mb-make-call,mb-os-file-copy,$(MB_@BASEPATH)emuctl/mbboot80.com,$(1)))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)/omsxctl.com),,$(call mb-make-call,mb-msxhub-file,$(1),OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.com))
|
2024-06-29 00:49:16 +00:00
|
|
|
|
endef
|
|
|
|
|
|
2024-07-02 21:18:20 +00:00
|
|
|
|
|
2024-07-16 14:45:37 +00:00
|
|
|
|
define mb-openmsx-dosctl
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-make-check-arg1,$(0),$(1))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,mb-openmsx-setup,$(1),$(if $(2),$(2),$(MB_OPENMSX_MACHINE)))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)/utils),$(call mb-make-call,_mb-openmsx-dosctl-bat,$(1)/utils),$(call mb-make-call,_mb-openmsx-dosctl-bat,$(1)))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(if $(wildcard $(1)/command.com),,$(if $(wildcard $(1)/command2.com),,$(call mb-make-call,mb-msxhub-get-$(MB_OPENMSX_BOOT_OS)-boot,$(1))))
|
|
|
|
|
$(MB_ᕽᕽᕽ )$(call mb-make-call,_mb-openmsx-run,$(1),$(if $(2),$(2),$(MB_OPENMSX_MACHINE)),$(if $(3),$(3),$(MB_OPENMSX_MACHINE_RAM)))
|
2020-12-23 17:14:13 +00:00
|
|
|
|
endef
|
2024-07-16 14:45:37 +00:00
|
|
|
|
$(call mb-make-call,mb-doc-function,mb-openmsx-dosctl,"Starts openMSX with dos controller.","<dir> [machine] [mem-ext]")
|
2024-07-07 02:33:03 +00:00
|
|
|
|
|