Split msxhub packages and dos from openmsx launcher
This commit is contained in:
parent
e256594b8e
commit
fd0debd0fc
22
README.md
22
README.md
|
@ -65,12 +65,24 @@ Current set is WIP.
|
|||
* mb_link_asm_dos = alias for mb_link_asm_0100
|
||||
* mb_hex2com
|
||||
* mb_hex2dat
|
||||
* mb_openmsx_dos2
|
||||
* mb_openmsx_macro80
|
||||
* mb_openmsx_dosctl
|
||||
* mb_msxhub_file
|
||||
* mb_msxhub_get_dos2
|
||||
* mb_msxhub_get_macro80
|
||||
* mb_assert_file_equals = note: text file only
|
||||
* mb_package_dos1
|
||||
* mb_package_dos2
|
||||
* mb_package_nextor
|
||||
* mb_package_macro80
|
||||
* mb_package_z80asmuk
|
||||
* mb_package_popcom
|
||||
* mb_package_dmphex
|
||||
* mb_package_baskom
|
||||
* mb_package_pmarc
|
||||
* mb_package_lhpack
|
||||
* mb_package_lhext
|
||||
* mb_package_gunzip
|
||||
* mb_package_tunzip
|
||||
* mb_package_turbo
|
||||
* mb_package_binldr
|
||||
* mb_package_gfxage
|
||||
* mb_autoexec_append_cmd
|
||||
* mb_autoexec_append_echo
|
||||
* mb_autoexec_append_rem
|
||||
|
|
3
lib/emuctl/mouse.bat
Normal file
3
lib/emuctl/mouse.bat
Normal file
|
@ -0,0 +1,3 @@
|
|||
rem Add mouse to openMSX
|
||||
omsxctl plug joyporta mouse
|
||||
omsxctl plug
|
2
lib/emuctl/shutdown.bat
Normal file
2
lib/emuctl/shutdown.bat
Normal file
|
@ -0,0 +1,2 @@
|
|||
rem Exit openMSX
|
||||
omsxctl exit 0
|
2
lib/emuctl/z80.bat
Normal file
2
lib/emuctl/z80.bat
Normal file
|
@ -0,0 +1,2 @@
|
|||
rem Goto normal z80 speed
|
||||
omsxctl set speed 100
|
|
@ -2,6 +2,8 @@
|
|||
MB_AUTOEXEC_BYSELF ?= true
|
||||
MB_AUTOEXEC_BYSELF_MSG ?= Generated by msxbuild Makefile
|
||||
MB_AUTOEXEC_TEXTMODE ?= 80
|
||||
MB_AUTOEXEC_TEXTCOLOR ?= 15,0,0
|
||||
MB_AUTOEXEC_VERSION ?= true
|
||||
MB_AUTOEXEC_STARTUP_TIMEOUT ?= 60
|
||||
MB_AUTOEXEC_STARTUP_EXITCODE ?= 124
|
||||
MB_AUTOEXEC_TEST_TIMEOUT ?= 120
|
||||
|
@ -39,6 +41,8 @@ define mb_autoexec_write_default
|
|||
$(if $(filter 40,$(MB_AUTOEXEC_TEXTMODE)),$(call mb_autoexec_append_echo,$(1),Enabled mode 40.))
|
||||
$(if $(filter 80,$(MB_AUTOEXEC_TEXTMODE)),$(call mb_autoexec_append_cmd,$(1),mode 80))
|
||||
$(if $(filter 80,$(MB_AUTOEXEC_TEXTMODE)),$(call mb_autoexec_append_echo,$(1),Enabled mode 80.))
|
||||
$(call mb_autoexec_append_cmd,$(1),COLOR $(MB_AUTOEXEC_TEXTCOLOR))
|
||||
$(if $(filter true,$(MB_AUTOEXEC_VERSION)),$(call mb_autoexec_append_cmd,$(1),ver))
|
||||
endef
|
||||
|
||||
define mb_autoexec_open_gui
|
||||
|
@ -46,7 +50,7 @@ define mb_autoexec_open_gui
|
|||
$(call mb_autoexec_write_default,$(1))
|
||||
$(call mb_autoexec_append_gui_mode,$(1))
|
||||
$(call mb_autoexec_append_stop_fail,$(1))
|
||||
$(call mb_autoexec_append_echo,$(1),Type 'omsxctl exit' to stop emulation.)
|
||||
$(call mb_autoexec_append_echo,$(1),Type 'shutdown' or 'omsxctl exit' to stop emulation.)
|
||||
endef
|
||||
define mb_autoexec_open_gui_cmd
|
||||
$(call mb_autoexec_open_gui,$(1))
|
||||
|
|
|
@ -20,30 +20,3 @@ define mb_msxhub_file
|
|||
$(if $(wildcard $(1)/$(call _mb_lowercase,$(notdir $(2)))),,$(call mb_copy,$(MB_MSXHUB_CACHE)/$(2),$(1)/$(call _mb_lowercase,$(notdir $(2)))))
|
||||
$(if $(filter true,$(3)),$(call mb_copy,$(MB_MSXHUB_CACHE)/$(2),$(1)/$(call _mb_lowercase,$(notdir $(2)))))
|
||||
endef
|
||||
|
||||
define mb_msxhub_get_dos1
|
||||
$(call mb_msxhub_file,$(1),MSXDOS1/1.03-2/get/MSXDOS1/MSXDOS.SYS)
|
||||
$(call mb_msxhub_file,$(1),MSXDOS1/1.03-2/get/MSXDOS1/COMMAND.COM)
|
||||
endef
|
||||
|
||||
define mb_msxhub_get_dos2
|
||||
$(call mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/MSXDOS2.SYS)
|
||||
#$(call mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/COMMAND2.COM)
|
||||
$(call mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/COMMAND2.COM)
|
||||
endef
|
||||
|
||||
define mb_msxhub_get_nextor
|
||||
$(call mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/MSXDOS2.SYS)
|
||||
#$(call mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/COMMAND2.COM)
|
||||
$(call mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/COMMAND2.COM)
|
||||
$(call mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/NEXTOR.SYS)
|
||||
$(call mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/NSYSVER.COM)
|
||||
endef
|
||||
|
||||
define mb_msxhub_get_macro80
|
||||
$(call mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/CREF80.COM)
|
||||
$(call mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/L80.COM)
|
||||
$(call mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/LIB80.COM)
|
||||
$(call mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/M80.COM)
|
||||
endef
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
MB_OPENMSX_BOOT_TIMEOUT ?= 25
|
||||
MB_OPENMSX_MACHINE ?= Philips_NMS_8250
|
||||
MB_OPENMSX_JOYPORTA ?=
|
||||
MB_OPENMSX_JOYPORTB ?=
|
||||
MB_OPENMSX_SETTING := $(PATH_MSXBUILD_REAL)/lib/openmsx/boot_settings.xml
|
||||
MB_OPENMSX_EXTS ?=
|
||||
MB_OPENMSX_EXTRA_MEM ?= -ext ram4mb
|
||||
|
@ -28,34 +26,10 @@ define _mb_openmsx_run
|
|||
FAIL_AFTER_PATH=bin \
|
||||
BOOT_HDD_PATH="$(1)" \
|
||||
BOOT_HDD_IMAGE="$(1)/../dsk.img" \
|
||||
JOYPORTA=$(MB_OPENMSX_JOYPORTA) \
|
||||
JOYPORTB=$(MB_OPENMSX_JOYPORTB) \
|
||||
$(MB_OPENMSX_CMD)
|
||||
endef
|
||||
|
||||
define _mb_openmsx_run_dos
|
||||
define mb_openmsx_dosctl
|
||||
$(call mb_msxhub_file,$(1),OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.com)
|
||||
$(call _mb_openmsx_run,$(1))
|
||||
endef
|
||||
|
||||
# TODO: add msx1+allversions of dos to https://github.com/fr3nd/msxhub-packages/issues/18
|
||||
#define mb_openmsx_dos1
|
||||
# $(call mb_msxhub_get_dos1,$(1))
|
||||
# $(call _mb_openmsx_run_dos,$(1))
|
||||
#endef
|
||||
|
||||
define mb_openmsx_dos2
|
||||
$(call mb_msxhub_get_dos2,$(1))
|
||||
$(call _mb_openmsx_run_dos,$(1))
|
||||
endef
|
||||
|
||||
define mb_openmsx_nextor
|
||||
$(call mb_msxhub_get_nextor,$(1))
|
||||
$(call _mb_openmsx_run_dos,$(1))
|
||||
endef
|
||||
|
||||
define mb_openmsx_macro80
|
||||
$(call mb_msxhub_get_macro80,$(1))
|
||||
$(call mb_openmsx_dos2,$(1))
|
||||
endef
|
||||
|
||||
|
|
102
lib/make/mb_packages.mk
Normal file
102
lib/make/mb_packages.mk
Normal file
|
@ -0,0 +1,102 @@
|
|||
# MSXHUB fetch package files functions
|
||||
define mb_package_emuctl
|
||||
$(call mb_copy,$(PATH_MSXBUILD)/lib/emuctl/mouse.bat,$(1))
|
||||
$(call mb_copy,$(PATH_MSXBUILD)/lib/emuctl/shutdown.bat,$(1))
|
||||
$(call mb_copy,$(PATH_MSXBUILD)/lib/emuctl/z80.bat,$(1))
|
||||
endef
|
||||
|
||||
#
|
||||
# Operating System
|
||||
#
|
||||
define mb_package_dos1
|
||||
$(call mb_msxhub_file,$(1),MSXDOS1/1.03-2/get/MSXDOS1/MSXDOS.SYS)
|
||||
$(call mb_msxhub_file,$(1),MSXDOS1/1.03-2/get/MSXDOS1/COMMAND.COM)
|
||||
endef
|
||||
define mb_package_dos2
|
||||
$(call mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/MSXDOS2.SYS)
|
||||
$(call mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/COMMAND2.COM)
|
||||
endef
|
||||
# TODO: remove MSXDOS2.SYS...
|
||||
define mb_package_nextor
|
||||
$(call mb_msxhub_file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/MSXDOS2.SYS)
|
||||
$(call mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/NEXTOR.SYS)
|
||||
$(call mb_msxhub_file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/COMMAND2.COM)
|
||||
endef
|
||||
|
||||
|
||||
#
|
||||
# Compilers
|
||||
#
|
||||
define mb_package_macro80
|
||||
$(call mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/CREF80.COM)
|
||||
$(call mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/L80.COM)
|
||||
$(call mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/LIB80.COM)
|
||||
$(call mb_msxhub_file,$(1),MACRO80/2.0-1/get/MACRO80/M80.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/HEXTOCOM.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/HEXTOBIN.COM)
|
||||
endef
|
||||
define mb_package_z80asmuk
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/BINTOASM.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/DUMP.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/HEXTOCOM.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/PRL.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/PRNTOSYM.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/RSX.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/ZSM.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/ZSMPP.COM)
|
||||
$(call mb_msxhub_file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/HEXTOBIN.COM)
|
||||
endef
|
||||
|
||||
|
||||
#
|
||||
# Compressors
|
||||
#
|
||||
define mb_package_pmarc
|
||||
$(call mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMARC.COM)
|
||||
$(call mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMCAT.COM)
|
||||
$(call mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMEXE2.COM)
|
||||
$(call mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMEXT.COM)
|
||||
$(call mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMSET.COM)
|
||||
$(call mb_msxhub_file,$(1),PMARC/2.0-1/get/PMARC/PMSFX2.COM)
|
||||
endef
|
||||
define mb_package_lhpack
|
||||
$(call mb_msxhub_file,$(1),LHPACK/1.00-1/get/LHPACK/lhpack.com)
|
||||
endef
|
||||
define mb_package_lhext
|
||||
$(call mb_msxhub_file,$(1),LHEXT/1.34-2/get/LHEXT/lhext.com)
|
||||
endef
|
||||
define mb_package_gunzip
|
||||
$(call mb_msxhub_file,$(1),GUNZIP/1.1-1/get/GUNZIP/gunzip.com)
|
||||
endef
|
||||
define mb_package_tunzip
|
||||
$(call mb_msxhub_file,$(1),TUNZIP/0.91-1/get/TUNZIP/tunzip.com)
|
||||
endef
|
||||
define mb_package_popcom
|
||||
$(call mb_msxhub_file,$(1),POPCOM/1.00-2/get/POPCOM/popcom.com)
|
||||
endef
|
||||
|
||||
|
||||
#
|
||||
# Tools
|
||||
#
|
||||
define mb_package_turbo
|
||||
$(call mb_msxhub_file,$(1),TURBO/2.1-1/get/TURBO/turbo.com)
|
||||
endef
|
||||
define mb_package_baskom
|
||||
$(call mb_msxhub_file,$(1),BASKOM/1.0-1/get/BASKOM/baskom.com)
|
||||
endef
|
||||
define mb_package_binldr
|
||||
$(call mb_msxhub_file,$(1),BINLDR/1.0.2-1/get/BINLDR/BINLDR.COM)
|
||||
endef
|
||||
define mb_package_dmphex
|
||||
$(call mb_msxhub_file,$(1),DMPHEX/1.00-1/get/DMPHEX/dmphex.com)
|
||||
endef
|
||||
|
||||
|
||||
#
|
||||
# Graphics editors
|
||||
#
|
||||
define mb_package_gfxage
|
||||
$(call mb_msxhub_file,$(1),GFXAGE/0.99-1/get/GFXAGE/gfxage.com)
|
||||
endef
|
||||
|
|
@ -14,5 +14,6 @@ PATH_MSXBUILD_REAL := $(if $(realpath $(PATH_MSXBUILD)),$(realpath $(PATH_MSXBUI
|
|||
include $(PATH_MSXBUILD)/lib/make/mb_base.mk
|
||||
include $(PATH_MSXBUILD)/lib/make/mb_autoexec.mk
|
||||
include $(PATH_MSXBUILD)/lib/make/mb_msxhub.mk
|
||||
include $(PATH_MSXBUILD)/lib/make/mb_packages.mk
|
||||
include $(PATH_MSXBUILD)/lib/make/mb_openmsx.mk
|
||||
include $(PATH_MSXBUILD)/lib/make/mb_build.mk
|
||||
|
|
|
@ -4,17 +4,20 @@ BUILD_HELP += \\n\\t* $(TEST_AHELLO_M80)/ahello.com\\n\\t* test-ahello-m8
|
|||
|
||||
$(TEST_AHELLO_M80):
|
||||
$(call mb_mkdir,$(TEST_AHELLO_M80))
|
||||
$(call mb_package_emuctl,$(TEST_AHELLO_M80))
|
||||
$(call mb_package_macro80,$(TEST_AHELLO_M80))
|
||||
$(call mb_package_nextor,$(TEST_AHELLO_M80))
|
||||
|
||||
$(TEST_AHELLO_M80)/%.mac: test/ahello-m80/%.mac | $(TEST_AHELLO_M80)
|
||||
$(call mb_unix2dos,$<,$@)
|
||||
|
||||
$(TEST_AHELLO_M80)/ahello.rel: $(TEST_AHELLO_M80)/ahello.mac
|
||||
$(call mb_autoexec_cmd,$(TEST_AHELLO_M80),m80 =ahello/Z)
|
||||
$(call mb_openmsx_macro80,$(TEST_AHELLO_M80))
|
||||
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
|
||||
|
||||
$(TEST_AHELLO_M80)/ahello.hex: $(TEST_AHELLO_M80)/ahello.rel
|
||||
$(call mb_autoexec_cmd,$(TEST_AHELLO_M80),l80 ahello$(MB_COMMA)ahello/N/X/Y/E)
|
||||
$(call mb_openmsx_macro80,$(TEST_AHELLO_M80))
|
||||
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
|
||||
|
||||
$(TEST_AHELLO_M80)/ahello.com: $(TEST_AHELLO_M80)/ahello.hex
|
||||
$(call mb_hex2com,$(TEST_AHELLO_M80)/ahello.hex,$(TEST_AHELLO_M80)/ahello.com)
|
||||
|
@ -22,11 +25,11 @@ $(TEST_AHELLO_M80)/ahello.com: $(TEST_AHELLO_M80)/ahello.hex
|
|||
.PHONY: test-ahello-m80-run
|
||||
test-ahello-m80-run: $(TEST_AHELLO_M80)/ahello.com
|
||||
$(call mb_autoexec_open_gui,$(TEST_AHELLO_M80))
|
||||
$(call mb_openmsx_macro80,$(TEST_AHELLO_M80))
|
||||
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
|
||||
|
||||
.PHONY: test-ahello-m80-assert
|
||||
test-ahello-m80-assert: $(TEST_AHELLO_M80)/ahello.com
|
||||
$(call mb_delete,$(TEST_AHELLO_M80)/test.out)
|
||||
$(call mb_autoexec_cmd_test,$(TEST_AHELLO_M80),ahello > test.out)
|
||||
$(call mb_openmsx_macro80,$(TEST_AHELLO_M80))
|
||||
$(call mb_openmsx_dosctl,$(TEST_AHELLO_M80))
|
||||
grep "M80: Hello world..." $(TEST_AHELLO_M80)/test.out
|
||||
|
|
|
@ -4,6 +4,8 @@ BUILD_HELP += \\n\\t* $(TEST_AHELLO_SDCC)/ahello.com\\n\\t* test-ahello-s
|
|||
|
||||
$(TEST_AHELLO_SDCC):
|
||||
$(call mb_mkdir,$(TEST_AHELLO_SDCC))
|
||||
$(call mb_package_emuctl,$(TEST_AHELLO_SDCC))
|
||||
$(call mb_package_nextor,$(TEST_AHELLO_SDCC))
|
||||
|
||||
$(TEST_AHELLO_SDCC)/%.rel: test/ahello-sdcc/%.asm | $(TEST_AHELLO_SDCC)
|
||||
$(call mb_compile_asm,$@,$<)
|
||||
|
@ -17,11 +19,11 @@ $(TEST_AHELLO_SDCC)/ahello.com: $(TEST_AHELLO_SDCC)/ahello.hex
|
|||
.PHONY: test-ahello-sdcc-run
|
||||
test-ahello-sdcc-run: $(TEST_AHELLO_SDCC)/ahello.com
|
||||
$(call mb_autoexec_open_gui,$(TEST_AHELLO_SDCC))
|
||||
$(call mb_openmsx_dos2,$(TEST_AHELLO_SDCC))
|
||||
$(call mb_openmsx_dosctl,$(TEST_AHELLO_SDCC))
|
||||
|
||||
.PHONY: test-ahello-sdcc-assert
|
||||
test-ahello-sdcc-assert: $(TEST_AHELLO_SDCC)/ahello.com
|
||||
$(call mb_delete,$(TEST_AHELLO_SDCC)/test.out)
|
||||
$(call mb_autoexec_cmd_test,$(TEST_AHELLO_SDCC),ahello > test.out)
|
||||
$(call mb_openmsx_dos2,$(TEST_AHELLO_SDCC))
|
||||
$(call mb_openmsx_dosctl,$(TEST_AHELLO_SDCC))
|
||||
grep "SDCC: Hello world..." $(TEST_AHELLO_SDCC)/test.out
|
||||
|
|
Loading…
Reference in a new issue