2020-12-23 17:14:13 +00:00
|
|
|
|
2024-06-25 11:05:20 +00:00
|
|
|
MB_OPENMSX_PATH_BIN ?= bin
|
2020-12-23 17:14:13 +00:00
|
|
|
MB_OPENMSX_BOOT_TIMEOUT ?= 25
|
2021-07-04 00:12:48 +00:00
|
|
|
MB_OPENMSX_MACHINE ?= Philips_NMS_8250
|
2024-06-21 22:44:05 +00:00
|
|
|
MB_OPENMSX_SPEED ?= $(if $(findstring turboR,$(MB_OPENMSX_MACHINE)),100,333)
|
2021-07-04 00:12:48 +00:00
|
|
|
MB_OPENMSX_EXTS ?=
|
2024-06-25 10:00:35 +00:00
|
|
|
MB_OPENMSX_EXTRA_SLOT ?= -ext slotexpander
|
2021-07-04 00:12:48 +00:00
|
|
|
MB_OPENMSX_EXTRA_MEM ?= -ext ram4mb
|
2024-06-25 10:42:54 +00:00
|
|
|
MB_OPENMSX_EXTRA_HDD ?= -ext ide-nextor
|
2024-06-25 11:08:46 +00:00
|
|
|
MB_OPENMSX_HDD_SIZE ?= 4m
|
2024-06-21 19:38:40 +00:00
|
|
|
MB_OPENMSX_JOYPORTA ?=
|
|
|
|
MB_OPENMSX_JOYPORTB ?=
|
2024-06-21 20:35:44 +00:00
|
|
|
MB_OPENMSX_SCALE_FACTOR ?= 3
|
2024-06-24 18:41:06 +00:00
|
|
|
MB_OPENMSX_THROTTLE ?= off
|
|
|
|
MB_OPENMSX_RENDERER ?=
|
2024-06-25 10:42:54 +00:00
|
|
|
MB_OPENMSX_SCRIPTS ?= ~/.openMSX/share/scripts
|
2024-06-25 11:12:25 +00:00
|
|
|
MB_OPENMSX_SAVE_ON_EXIT ?= off
|
2020-12-23 17:14:13 +00:00
|
|
|
MB_OPENMSX_ARGS = \
|
|
|
|
-machine $(MB_OPENMSX_MACHINE) \
|
2024-06-25 10:00:35 +00:00
|
|
|
$(MB_OPENMSX_EXTRA_SLOT) \
|
2024-06-25 10:42:54 +00:00
|
|
|
$(MB_OPENMSX_EXTRA_HDD) \
|
2024-06-25 10:00:35 +00:00
|
|
|
$(MB_OPENMSX_EXTRA_MEM) \
|
2024-06-25 10:42:54 +00:00
|
|
|
$(MB_OPENMSX_EXTS)
|
|
|
|
|
|
|
|
define _mb_openmsx_setup
|
|
|
|
$(call mb_msxhub_file,$(MB_OPENMSX_SCRIPTS),OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.tcl)
|
|
|
|
$(call mb_msxhub_file,$(MB_OPENMSX_SCRIPTS),OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.com)
|
|
|
|
$(if $(wildcard $(MB_OPENMSX_SCRIPTS)/boot_env.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/boot_env.tcl,$(MB_OPENMSX_SCRIPTS)))
|
|
|
|
$(if $(wildcard $(MB_OPENMSX_SCRIPTS)/boot_hdd.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/boot_hdd.tcl,$(MB_OPENMSX_SCRIPTS)))
|
|
|
|
$(if $(wildcard $(MB_OPENMSX_SCRIPTS)/fail_after.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/fail_after.tcl,$(MB_OPENMSX_SCRIPTS)))
|
|
|
|
$(if $(wildcard ~/.openMSX/share/extensions/ide-nextor.xml),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/ide-nextor.xml,~/.openMSX/share/extensions/))
|
|
|
|
endef
|
2020-12-23 17:14:13 +00:00
|
|
|
|
|
|
|
define _mb_openmsx_run
|
2021-07-04 00:12:48 +00:00
|
|
|
@echo === Running openMSX
|
2020-12-23 17:14:13 +00:00
|
|
|
FAIL_AFTER_BOOT=$(MB_OPENMSX_BOOT_TIMEOUT) \
|
2024-06-25 11:05:20 +00:00
|
|
|
FAIL_AFTER_PATH=$(MB_OPENMSX_PATH_BIN) \
|
2020-12-23 17:14:13 +00:00
|
|
|
BOOT_HDD_PATH="$(1)" \
|
2024-06-25 11:08:46 +00:00
|
|
|
BOOT_HDD_SIZE=$(MB_OPENMSX_HDD_SIZE) \
|
2024-06-25 11:05:20 +00:00
|
|
|
BOOT_HDD_IMAGE="$(MB_OPENMSX_PATH_BIN)/dsk-$(notdir $(1)).img" \
|
2024-06-21 19:38:40 +00:00
|
|
|
JOYPORTA=$(MB_OPENMSX_JOYPORTA) \
|
|
|
|
JOYPORTB=$(MB_OPENMSX_JOYPORTB) \
|
2024-06-21 20:35:44 +00:00
|
|
|
SCALE_FACTOR=$(MB_OPENMSX_SCALE_FACTOR) \
|
2024-06-21 19:07:00 +00:00
|
|
|
SPEED=$(MB_OPENMSX_SPEED) \
|
2024-06-25 11:12:25 +00:00
|
|
|
SAVE_SETTINGS_ON_EXIT=$(MB_OPENMSX_SAVE_ON_EXIT) \
|
2024-06-24 18:41:06 +00:00
|
|
|
RENDERER=$(MB_OPENMSX_RENDERER) \
|
|
|
|
THROTTLE=$(MB_OPENMSX_THROTTLE) \
|
2024-06-23 22:28:54 +00:00
|
|
|
$(PATH_OPENMSX)/openmsx $(MB_OPENMSX_ARGS) -control stdio < $(PATH_MSXBUILD_REAL)/lib/openmsx/boot_stdio.xml
|
2020-12-23 17:14:13 +00:00
|
|
|
endef
|
2021-07-06 02:28:45 +00:00
|
|
|
|
2024-06-21 18:59:04 +00:00
|
|
|
define mb_openmsx_dosctl
|
2024-06-25 10:42:54 +00:00
|
|
|
$(if $(wildcard $(MB_OPENMSX_SCRIPTS)/omsxctl.tcl),,$(call _mb_openmsx_setup))
|
|
|
|
$(if $(wildcard $(1)/omsxctl.com),,$(call mb_copy,$(MB_OPENMSX_SCRIPTS)/omsxctl.com,$(1)))
|
2020-12-23 17:14:13 +00:00
|
|
|
$(call _mb_openmsx_run,$(1))
|
|
|
|
endef
|