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 13:46:31 +00:00
|
|
|
MB_OPENMSX_CTLCACHE ?= $(MB_CACHE)/omsxctl
|
2024-06-25 11:12:25 +00:00
|
|
|
MB_OPENMSX_SAVE_ON_EXIT ?= off
|
2024-06-25 10:42:54 +00:00
|
|
|
|
2024-06-25 13:30:11 +00:00
|
|
|
# TODO: create openMSX issue to control extensions from the command line.
|
2024-06-25 10:42:54 +00:00
|
|
|
define _mb_openmsx_setup
|
2024-06-25 13:46:31 +00:00
|
|
|
$(if $(wildcard $(MB_OPENMSX_CTLCACHE)),,$(call mb_mkdir,$(MB_OPENMSX_CTLCACHE)))
|
|
|
|
$(call mb_msxhub_file,$(MB_OPENMSX_CTLCACHE),OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.tcl)
|
|
|
|
$(call mb_msxhub_file,$(MB_OPENMSX_CTLCACHE),OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.com)
|
2024-06-25 10:42:54 +00:00
|
|
|
$(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-25 12:52:08 +00:00
|
|
|
$(PATH_OPENMSX)/openmsx \
|
|
|
|
-machine $(MB_OPENMSX_MACHINE) \
|
|
|
|
$(MB_OPENMSX_EXTRA_SLOT) \
|
|
|
|
$(MB_OPENMSX_EXTRA_HDD) \
|
|
|
|
$(MB_OPENMSX_EXTRA_MEM) \
|
|
|
|
$(MB_OPENMSX_EXTS) \
|
2024-06-25 13:46:31 +00:00
|
|
|
-script $(MB_OPENMSX_CTLCACHE)/omsxctl.tcl \
|
2024-06-25 13:24:04 +00:00
|
|
|
-script $(PATH_MSXBUILD_REAL)/lib/openmsx/boot_env.tcl \
|
|
|
|
-script $(PATH_MSXBUILD_REAL)/lib/openmsx/boot_hdd.tcl \
|
|
|
|
-script $(PATH_MSXBUILD_REAL)/lib/openmsx/fail_after.tcl \
|
2024-06-25 13:36:30 +00:00
|
|
|
-setting $(PATH_MSXBUILD_REAL)/lib/openmsx/boot_setting.xml \
|
2024-06-25 12:52:08 +00:00
|
|
|
-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 13:46:31 +00:00
|
|
|
$(if $(wildcard $(MB_OPENMSX_CTLCACHE)/omsxctl.tcl),,$(call _mb_openmsx_setup))
|
|
|
|
$(if $(wildcard $(1)/omsxctl.com),,$(call mb_copy,$(MB_OPENMSX_CTLCACHE)/omsxctl.com,$(1)))
|
2020-12-23 17:14:13 +00:00
|
|
|
$(call _mb_openmsx_run,$(1))
|
|
|
|
endef
|