2020-12-23 17:14:13 +00:00
2024-07-02 02:11:13 +00:00
MB_OPENMSX_BOOT_TIMEOUT ?= 25
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_BOOT_TIMEOUT,"Timeout in seconds to guard for boot failures." ,$( MB_OPENMSX_BOOT_TIMEOUT) )
2024-07-02 01:27:14 +00:00
2024-07-02 02:11:13 +00:00
MB_OPENMSX_BOOT_OS ?= nextor
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_BOOT_OS," The default OS to run $( MB_CHAR_COMMA) valid values are; nextor $( MB_CHAR_COMMA) msxdos1 $( MB_CHAR_COMMA) msxdos2 " ,$( MB_OPENMSX_BOOT_OS) )
2024-07-02 01:27:14 +00:00
2024-07-02 02:11:13 +00:00
MB_OPENMSX_MACHINE ?= Philips_NMS_8250
MB_DOC_HELP_VARIABLE += $( 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
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_MACHINE_RAM," Extra ram extension for machine allowed: off $( MB_CHAR_COMMA) ram16k $( MB_CHAR_COMMA) ram64k $( MB_CHAR_COMMA) ram512k $( MB_CHAR_COMMA) ram1mb $( MB_CHAR_COMMA) ram2mb $( MB_CHAR_COMMA) ram4mb " ,$( MB_OPENMSX_MACHINE_RAM) )
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)
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_SPEED,"The throttled MSX emulation speed." ,$( MB_OPENMSX_SPEED) )
2024-07-02 01:27:14 +00:00
2024-07-02 02:11:13 +00:00
MB_OPENMSX_ARGS ?=
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_ARGS,"Extra arguments to invoke openMSX with." ,$( MB_OPENMSX_ARGS) )
2024-07-02 01:27:14 +00:00
2024-07-02 02:11:13 +00:00
MB_OPENMSX_HDD_SIZE ?= 4m
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_HDD_SIZE,"The default fire-hdd disk image size." ,$( MB_OPENMSX_HDD_SIZE) )
2024-07-02 01:27:14 +00:00
2024-07-02 02:11:13 +00:00
MB_OPENMSX_SCALE_FACTOR ?= 3
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_SCALE_FACTOR,"The gui scale factor to display the emulation." ,$( MB_OPENMSX_SCALE_FACTOR) )
2024-07-02 01:27:14 +00:00
2024-07-02 02:11:13 +00:00
MB_OPENMSX_THROTTLE ?= off
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_THROTTLE,"An on/off flag to control throttling globally." ,$( MB_OPENMSX_THROTTLE) )
2024-07-02 01:27:14 +00:00
2024-07-02 02:11:13 +00:00
MB_OPENMSX_HEADLESS ?= on
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_HEADLESS,"Controls if openMSX starts headless." ,$( MB_OPENMSX_HEADLESS) )
2024-07-02 01:27:14 +00:00
2024-07-02 02:11:13 +00:00
MB_OPENMSX_RENDERER ?= SDLGL-PP
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_OPENMSX_RENDERER,"The gui renderer used to display the window head with." ,$( MB_OPENMSX_RENDERER) )
2024-07-02 01:27:14 +00:00
2024-06-30 14:13:44 +00:00
MB_OPENMSX_VDP_FG ?= 151
MB_OPENMSX_VDP_BG ?= 000
2024-06-25 10:42:54 +00:00
2024-07-02 01:27:14 +00:00
2024-06-27 14:58:21 +00:00
d e f i n e m b _ o p e n m s x _ s e t u p
$( 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) )
2024-06-29 13:47:52 +00:00
$( if $( wildcard $( 1) -omsx/share/scripts/boot_exec.tcl) ,,$( call mb_copy,$( PATH_MSXBUILD_REAL) /lib/openmsx/share/scripts/boot_exec.tcl,$( 1) -omsx/share/scripts) )
2024-06-27 18:14:23 +00:00
$( 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) )
2024-06-30 12:23:28 +00:00
$( if $( wildcard $( 1) -omsx/share/scripts/fire_hdd.tcl) ,,$( call mb_copy,$( PATH_MSXBUILD_REAL) /lib/openmsx/share/scripts/fire_hdd.tcl,$( 1) -omsx/share/scripts) )
2024-06-30 11:52:33 +00:00
$( if $( wildcard $( 1) -omsx/share/scripts/headless.tcl) ,,$( call mb_copy,$( PATH_MSXBUILD_REAL) /lib/openmsx/share/scripts/headless.tcl,$( 1) -omsx/share/scripts) )
$( if $( wildcard $( 1) -omsx/share/scripts/night_flight.tcl) ,,$( call mb_copy,$( PATH_MSXBUILD_REAL) /lib/openmsx/share/scripts/night_flight.tcl,$( 1) -omsx/share/scripts) )
2024-06-30 02:06:21 +00:00
$( if $( wildcard $( 1) -omsx/share/scripts/omsxctl.tcl) ,,$( call mb_msxhub_file,$( 1) -omsx/share/scripts,OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.tcl) )
2024-06-27 18:14:23 +00:00
$( if $( wildcard $( 1) -omsx/share/extensions) ,,$( call mb_mkdir,$( 1) -omsx/share/extensions) )
2024-06-30 12:55:48 +00:00
$( if $( wildcard $( 1) -omsx/share/extensions/fire-hdd.xml) ,,$( call mb_copy,$( PATH_MSXBUILD_REAL) /lib/openmsx/share/extensions/fire-hdd.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
e n d e f
2024-07-02 01:27:14 +00:00
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_openmsx_setup,"Setup openMSX local build home folder for machine." ,"<dir> <machine>" )
2020-12-23 17:14:13 +00:00
d e f i n e _ m b _ o p e n m s x _ r u n
2024-06-29 22:12:21 +00:00
@echo = = = openMSX Start for $@
2024-06-29 13:47:52 +00:00
BOOT_WATCHDOG = $( MB_OPENMSX_BOOT_TIMEOUT) \
2024-06-30 12:23:28 +00:00
FIRE_HDD_PATH = " $( 1) " \
FIRE_HDD_SIZE = $( MB_OPENMSX_HDD_SIZE) \
2024-06-30 12:55:48 +00:00
FIRE_HDD_IMAGE = " $( 1) -omsx/persistent/fire-hdd/untitled1/image-hda.dsk " \
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-29 03:07:15 +00:00
HEADLESS = $( MB_OPENMSX_HEADLESS) \
2024-06-24 18:41:06 +00:00
RENDERER = $( MB_OPENMSX_RENDERER) \
THROTTLE = $( MB_OPENMSX_THROTTLE) \
2024-06-30 11:52:33 +00:00
NF_PREFIX = $( MB_FLIGHT_PREFIX) \
NF_SEPERATOR = $( MB_FLIGHT_SEPERATOR) \
NF_RECORD_FLAG = $( MB_FLIGHT_RECORD_FLAG) \
2024-06-30 14:13:44 +00:00
VDP_FG = $( MB_OPENMSX_VDP_FG) \
VDP_BG = $( MB_OPENMSX_VDP_BG) \
2024-06-28 20:29:37 +00:00
OPENMSX_HOME = " $( 1) -omsx " \
2024-06-25 12:52:08 +00:00
$( PATH_OPENMSX) /openmsx \
2024-06-27 14:58:21 +00:00
-machine $( 2) \
2024-06-30 12:55:48 +00:00
-ext slotexpander \
-ext fire-hdd \
2024-07-02 01:27:14 +00:00
$( if $( filter ram16k,$( 3) ) ,-ext ram16k) \
$( if $( filter ram64k,$( 3) ) ,-ext ram64k) \
$( if $( filter ram512k,$( 3) ) ,-ext ram512k) \
$( if $( filter ram1mb,$( 3) ) ,-ext ram1mb) \
$( if $( filter ram4mb,$( 3) ) ,-ext ram2mb) \
$( if $( filter ram4mb,$( 3) ) ,-ext ram4mb) \
$( MB_OPENMSX_ARGS) \
2024-06-27 17:16:26 +00:00
-control stdio < $( 1) -omsx/stdio.xml
2024-06-29 22:12:21 +00:00
@echo = = = openMSX Done for $@
2020-12-23 17:14:13 +00:00
e n d e f
2021-07-06 02:28:45 +00:00
2024-06-29 00:49:16 +00:00
d e f i n e _ m b _ o p e n m s x _ d o s c t l _ b a t
$( if $( wildcard $( 1) /z80.bat) ,,$( call mb_copy,$( PATH_MSXBUILD_REAL) /lib/emuctl/z80.bat,$( 1) ) )
$( 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) ) )
2024-07-02 13:34:26 +00:00
$( if $( wildcard $( 1) /mbboot80.com) ,,$( call mb_copy,$( PATH_MSXBUILD_REAL) /lib/emuctl/mbboot80.com,$( 1) ) )
$( if $( wildcard $( 1) /omsxctl.com) ,,$( call mb_msxhub_file,$( 1) ,OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.com) )
2024-06-29 00:49:16 +00:00
e n d e f
2024-06-21 18:59:04 +00:00
d e f i n e m b _ o p e n m s x _ d o s c t l
2024-06-28 21:38:05 +00:00
$( call mb_openmsx_setup,$( 1) ,$( if $( 2) ,$( 2) ,$( MB_OPENMSX_MACHINE) ) )
2024-06-29 00:49:16 +00:00
$( if $( wildcard $( 1) /utils) ,$( call _mb_openmsx_dosctl_bat,$( 1) /utils) ,$( call _mb_openmsx_dosctl_bat,$( 1) ) )
$( if $( wildcard $( 1) /command.com) ,,$( if $( wildcard $( 1) /command2.com) ,,$( call mb_msxhub_get_$( MB_OPENMSX_BOOT_OS) _boot,$( 1) ) ) )
2024-07-02 01:27:14 +00:00
$( 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
e n d e f
2024-07-02 01:27:14 +00:00
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_openmsx_dosctl,"Starts openMSX with dos controller." ,"<dir> [machine] [mem-ext]" )