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
|
2024-06-27 17:09:38 +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-27 18:14:23 +00:00
|
|
|
MB_OPENMSX_RECORDER ?= off
|
2024-06-27 14:58:21 +00:00
|
|
|
MB_OPENMSX_CTLCACHE ?= $(MB_CACHE)/msxbuild/omsxctl
|
2024-06-25 10:42:54 +00:00
|
|
|
|
2024-06-27 14:58:21 +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-27 14:58:21 +00:00
|
|
|
$(if $(wildcard $(1)-omsx),,$(call mb_mkdir,$(1)-omsx))
|
|
|
|
$(if $(wildcard $(1)-omsx/stdio.xml),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/stdio.xml,$(1)-omsx))
|
2024-06-27 18:14:23 +00:00
|
|
|
$(if $(wildcard $(1)-omsx/share),,$(call mb_mkdir,$(1)-omsx/share))
|
|
|
|
$(if $(wildcard $(1)-omsx/share/settings.xml),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/settings.xml,$(1)-omsx/share))
|
|
|
|
$(if $(wildcard $(1)-omsx/share/scripts),,$(call mb_mkdir,$(1)-omsx/share/scripts))
|
|
|
|
$(if $(wildcard $(1)-omsx/share/scripts/boot_env.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/boot_env.tcl,$(1)-omsx/share/scripts))
|
|
|
|
$(if $(wildcard $(1)-omsx/share/scripts/boot_hdd.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/boot_hdd.tcl,$(1)-omsx/share/scripts))
|
|
|
|
$(if $(wildcard $(1)-omsx/share/scripts/fail_after.tcl),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/scripts/fail_after.tcl,$(1)-omsx/share/scripts))
|
|
|
|
$(if $(wildcard $(1)-omsx/share/scripts/omsxctl.tcl),,$(call mb_copy,$(MB_OPENMSX_CTLCACHE)/omsxctl.tcl,$(1)-omsx/share/scripts))
|
|
|
|
$(if $(wildcard $(1)-omsx/share/extensions),,$(call mb_mkdir,$(1)-omsx/share/extensions))
|
|
|
|
$(if $(wildcard $(1)-omsx/share/extensions/ide-nextor.xml),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/openmsx/share/extensions/ide-nextor.xml,$(1)-omsx/share/extensions))
|
2024-06-27 14:58:21 +00:00
|
|
|
$(call mb_msxrom_setup,$(1))
|
|
|
|
$(call mb_msxrom_extension_ide_nextor,$(1))
|
|
|
|
$(call mb_msxrom_machine_$(2),$(1))
|
2024-06-25 10:42:54 +00:00
|
|
|
endef
|
2020-12-23 17:14:13 +00:00
|
|
|
|
|
|
|
define _mb_openmsx_run
|
2024-06-27 17:09:38 +00:00
|
|
|
@echo === openMSX Start for $(notdir $(1))
|
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-27 14:58:21 +00:00
|
|
|
BOOT_HDD_IMAGE="$(1)-omsx/disk-ide-hda.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-24 18:41:06 +00:00
|
|
|
RENDERER=$(MB_OPENMSX_RENDERER) \
|
|
|
|
THROTTLE=$(MB_OPENMSX_THROTTLE) \
|
2024-06-28 12:31:06 +00:00
|
|
|
RECORDER=$(if $(filter on,$(MB_OPENMSX_RECORDER)),"$(1)-omsx/output.avi") \
|
2024-06-27 18:14:23 +00:00
|
|
|
OPENMSX_USER_DATA="$(1)-omsx/share" \
|
2024-06-25 12:52:08 +00:00
|
|
|
$(PATH_OPENMSX)/openmsx \
|
2024-06-27 14:58:21 +00:00
|
|
|
-machine $(2) \
|
2024-06-25 12:52:08 +00:00
|
|
|
$(MB_OPENMSX_EXTRA_SLOT) \
|
|
|
|
$(MB_OPENMSX_EXTRA_HDD) \
|
|
|
|
$(MB_OPENMSX_EXTRA_MEM) \
|
|
|
|
$(MB_OPENMSX_EXTS) \
|
2024-06-27 17:16:26 +00:00
|
|
|
-control stdio < $(1)-omsx/stdio.xml
|
2024-06-27 17:09:38 +00:00
|
|
|
@echo === openMSX Done for $(notdir $(1))
|
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-27 17:09:38 +00:00
|
|
|
$(if $(wildcard $(1)-omsx),,$(call mb_openmsx_setup,$(1),$(if $(2),$(2),$(MB_OPENMSX_MACHINE))))
|
2024-06-25 13:46:31 +00:00
|
|
|
$(if $(wildcard $(1)/omsxctl.com),,$(call mb_copy,$(MB_OPENMSX_CTLCACHE)/omsxctl.com,$(1)))
|
2024-06-28 12:20:42 +00:00
|
|
|
$(if $(wildcard $(1)/reboot.bat),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/emuctl/reboot.bat,$(1)))
|
|
|
|
$(if $(wildcard $(1)/shutdown.bat),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/emuctl/shutdown.bat,$(1)))
|
|
|
|
$(if $(wildcard $(1)/z80.bat),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/emuctl/z80.bat,$(1)))
|
2024-06-27 17:09:38 +00:00
|
|
|
$(call _mb_openmsx_run,$(1),$(if $(2),$(2),$(MB_OPENMSX_MACHINE)))
|
2020-12-23 17:14:13 +00:00
|
|
|
endef
|