msxbuild/lib/make/mb_openmsx.mk

42 lines
1.6 KiB
Makefile
Raw Normal View History

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
MB_OPENMSX_SPEED ?= $(if $(findstring turboR,$(MB_OPENMSX_MACHINE)),100,333)
2021-07-04 00:12:48 +00:00
MB_OPENMSX_EXTS ?=
MB_OPENMSX_EXTRA_MEM ?= -ext ram4mb
2024-06-21 19:38:40 +00:00
MB_OPENMSX_JOYPORTA ?=
MB_OPENMSX_JOYPORTB ?=
MB_OPENMSX_SCALE_FACTOR ?= 3
2020-12-23 17:14:13 +00:00
MB_OPENMSX_ARGS = \
-machine $(MB_OPENMSX_MACHINE) \
2021-07-04 00:12:48 +00:00
-ext slotexpander -ext ide $(MB_OPENMSX_EXTRA_MEM) $(MB_OPENMSX_EXTS) \
2021-07-06 18:42:46 +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-20 22:06:06 +00:00
-script $(PATH_MSXBUILD_REAL)/lib/openmsx/omsxctl.tcl
2020-12-23 17:14:13 +00:00
# TODO: add run flag to disable xml output like "-control stdio-boot-only"
ifeq ($(OS),Windows_NT)
2021-07-06 18:42:46 +00:00
MB_OPENMSX_CMD = $(PATH_OPENMSX)/openmsx $(MB_OPENMSX_ARGS) -control stdio < $(PATH_MSXBUILD_REAL)/lib/openmsx/boot_stdio.xml
2020-12-23 17:14:13 +00:00
else
2021-07-06 18:42:46 +00:00
MB_OPENMSX_CMD = $(PATH_OPENMSX)/openmsx $(MB_OPENMSX_ARGS) -control stdio < $(PATH_MSXBUILD_REAL)/lib/openmsx/boot_stdio.xml | sed -n -e 's/.*>\(.*\)<.*/\1/p' | tail -n+3
2020-12-23 17:14:13 +00:00
endif
define _mb_openmsx_run
2021-07-04 00:12:48 +00:00
@echo === Running openMSX
2024-06-20 22:06:06 +00:00
$(call mb_msxhub_file,$(PATH_MSXBUILD_REAL)/lib/openmsx,OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.tcl)
2020-12-23 17:14:13 +00:00
FAIL_AFTER_BOOT=$(MB_OPENMSX_BOOT_TIMEOUT) \
FAIL_AFTER_PATH=bin \
BOOT_HDD_PATH="$(1)" \
BOOT_HDD_IMAGE="$(1)/../dsk.img" \
2024-06-21 19:38:40 +00:00
JOYPORTA=$(MB_OPENMSX_JOYPORTA) \
JOYPORTB=$(MB_OPENMSX_JOYPORTB) \
SCALE_FACTOR=$(MB_OPENMSX_SCALE_FACTOR) \
2024-06-21 19:07:00 +00:00
SPEED=$(MB_OPENMSX_SPEED) \
2020-12-23 17:14:13 +00:00
$(MB_OPENMSX_CMD)
endef
2021-07-06 02:28:45 +00:00
define mb_openmsx_dosctl
2024-06-20 22:06:06 +00:00
$(call mb_msxhub_file,$(1),OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.com)
2020-12-23 17:14:13 +00:00
$(call _mb_openmsx_run,$(1))
endef