Fixed mode 80 on msx1 and cleaned boot messages.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 3s

This commit is contained in:
Willem Cazander 2024-07-02 15:34:26 +02:00
parent da35583307
commit 8d84a1e65c
13 changed files with 154 additions and 34 deletions

View file

@ -44,27 +44,27 @@ TODO
When you want to see whats happening do a debug run; When you want to see whats happening do a debug run;
normal run; normal run;
time make assert-all time make bin/@assert-all
real 0m3.223s real 0m3.223s
debug run at 11 Mhz; debug run at 11 Mhz;
time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on make assert-all time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on make vassert-all
real 1m4.856s real 1m4.856s
debug run real msx speed; debug run real msx speed;
time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_OPENMSX_SPEED=100 make assert-all time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_OPENMSX_SPEED=100 make bin/@assert-all
real 2m37.379s real 2m37.379s
debug run with screenshot on exit; (black screens without throttle) debug run with screenshot on exit; (black screens without throttle)
time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_FLIGHT_SCREEN=on make -s assert-all time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on MB_FLIGHT_SCREEN=on make -s bin/@assert-all
real 1m14.043s real 1m14.043s
debug run with video recorder and merge to one video file; debug run with video recorder and merge to one video file;
time MB_OPENMSX_HEADLESS=off MB_FLIGHT_VIDEO=on make -s assert-all time MB_OPENMSX_HEADLESS=off MB_FLIGHT_VIDEO=on make -s bin/@assert-all
real 0m7.136s real 0m7.136s
build parallel; build parallel;
time make -s -j4 assert-all time make -s -j4 bin/@assert-all
real 0m1.817s real 0m1.817s
manual test msxhub on machine; manual test msxhub on machine;
@ -86,6 +86,7 @@ Current set is WIP.
## Errata ## Errata
* Doesn't work on windows * Doesn't work on windows
* TODO: mbboot80+add arg prefix and move to other repro + msxhub package
* TODO: Missing C and mixed support * TODO: Missing C and mixed support
* TODO: Use TCL for BASIC/ASM/C lcov (Cobertura) code coverage * TODO: Use TCL for BASIC/ASM/C lcov (Cobertura) code coverage
@ -104,6 +105,7 @@ Current set is WIP.
* run instance-id or run/process-label to replace hardcoded "untitled1" path * run instance-id or run/process-label to replace hardcoded "untitled1" path
* Remove msg or add ignore sram-fully or blank setting: SRAM file nms8250.cmos not found, assuming blank SRAM content. * Remove msg or add ignore sram-fully or blank setting: SRAM file nms8250.cmos not found, assuming blank SRAM content.
* Video record append mode + optional multiple previds to glue videos as one * Video record append mode + optional multiple previds to glue videos as one
* Video record remove blue start frame on start of recording
* (FIXED) Allow for `set renderer none` in TCL or command argument for headless mode * (FIXED) Allow for `set renderer none` in TCL or command argument for headless mode
* SDL-NULL as window less renderer so that screenshot and/or video works headless * SDL-NULL as window less renderer so that screenshot and/or video works headless
* DocUpdate: Add speed note because it is slow + add example "after quit {export hdd}" * DocUpdate: Add speed note because it is slow + add example "after quit {export hdd}"

BIN
lib/emuctl/mbboot80.com Normal file

Binary file not shown.

View file

@ -5,6 +5,9 @@ MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_SHOW_VERSION,"Print O
MB_AUTOEXEC_SHOW_PATH ?= on MB_AUTOEXEC_SHOW_PATH ?= on
MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_SHOW_PATH,"Print search path on boot.",$(MB_AUTOEXEC_SHOW_PATH)) MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_SHOW_PATH,"Print search path on boot.",$(MB_AUTOEXEC_SHOW_PATH))
MB_AUTOEXEC_SHOW_PROLOG ?= on
MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_SHOW_PROLOG,"Print msxbuild prolog on boot.",$(MB_AUTOEXEC_SHOW_PROLOG))
MB_AUTOEXEC_SHOW_CONFIG ?= on MB_AUTOEXEC_SHOW_CONFIG ?= on
MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_SHOW_CONFIG,"Print host config on boot.",$(MB_AUTOEXEC_SHOW_CONFIG)) MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_SHOW_CONFIG,"Print host config on boot.",$(MB_AUTOEXEC_SHOW_CONFIG))
@ -32,6 +35,9 @@ MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_SAFE_CMD_TIMEOUT,"Saf
MB_AUTOEXEC_SAFE_CMD_EXITCODE ?= 1 MB_AUTOEXEC_SAFE_CMD_EXITCODE ?= 1
MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_SAFE_CMD_EXITCODE,"Safe command execution failure exit code.",$(MB_AUTOEXEC_SAFE_CMD_EXITCODE)) MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_SAFE_CMD_EXITCODE,"Safe command execution failure exit code.",$(MB_AUTOEXEC_SAFE_CMD_EXITCODE))
MB_AUTOEXEC_STARTUP_PROLOG ?= mb::boot MSXBUILD UID $(USER)
MB_DOC_HELP_VARIABLE += $(call mb_doc_variable,MB_AUTOEXEC_STARTUP_PROLOG,"Boot prolog user postfix.",$(MB_AUTOEXEC_STARTUP_PROLOG))
define mb_autoexec_append_cmd define mb_autoexec_append_cmd
echo "$(2)\r" >> $(1)/autoexec.bat echo "$(2)\r" >> $(1)/autoexec.bat
endef endef
@ -80,33 +86,36 @@ MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_autoexec_append_save_video,"Ap
define mb_autoexec_append_safe_test define mb_autoexec_append_safe_test
$(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(if $(3),$(3),$(MB_AUTOEXEC_SAFE_TEST_TIMEOUT)) seconds failed_test $(if $(4),$(4),$(MB_AUTOEXEC_SAFE_TEST_EXITCODE))) $(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(if $(3),$(3),$(MB_AUTOEXEC_SAFE_TEST_TIMEOUT)) seconds failed_test $(if $(4),$(4),$(MB_AUTOEXEC_SAFE_TEST_EXITCODE)))
$(call mb_autoexec_append_echo,$(1),Running test: $(2)) $(call mb_autoexec_append_echo,$(1),mb::safe test $(2))
$(call mb_autoexec_append_cmd,$(1),$(2)) $(call mb_autoexec_append_cmd,$(1),$(2))
endef endef
MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_autoexec_append_safe_test,"Appends running a safe test.","<dir> <cmd> [timeout] [exit-code]") MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_autoexec_append_safe_test,"Appends running a safe test.","<dir> <cmd> [timeout] [exit-code]")
define mb_autoexec_append_safe_cmd define mb_autoexec_append_safe_cmd
$(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(if $(3),$(3),$(MB_AUTOEXEC_SAFE_CMD_TIMEOUT)) seconds failed_cmd $(if $(4),$(4),$(MB_AUTOEXEC_SAFE_CMD_EXITCODE))) $(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(if $(3),$(3),$(MB_AUTOEXEC_SAFE_CMD_TIMEOUT)) seconds failed_cmd $(if $(4),$(4),$(MB_AUTOEXEC_SAFE_CMD_EXITCODE)))
$(call mb_autoexec_append_echo,$(1),Running command: $(2)) $(call mb_autoexec_append_echo,$(1),mb::safe command $(2))
$(call mb_autoexec_append_cmd,$(1),$(2)) $(call mb_autoexec_append_cmd,$(1),$(2))
endef endef
MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_autoexec_append_safe_cmd,"Appends running a safe command.","<dir> <cmd> [timeout] [exit-code]") MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_autoexec_append_safe_cmd,"Appends running a safe command.","<dir> <cmd> [timeout] [exit-code]")
define _mb_autoexec_write_preboot
$(call mb_autoexec_append_cmd,$(1),$(2)mbboot80)
$(call mb_autoexec_append_cmd,$(1),$(2)omsxctl boot_exec_color_vdp)
$(if $(filter on,$(MB_FLIGHT_VIDEO)),$(call mb_autoexec_append_save_video,$(1)))
$(call mb_autoexec_append_cmd,$(1),$(2)omsxctl fail_after $(MB_AUTOEXEC_STARTUP_TIMEOUT) seconds failed_exec $(MB_AUTOEXEC_STARTUP_EXITCODE))
endef
define mb_autoexec_write_default define mb_autoexec_write_default
@echo === Writing autoexec.bat for $@ @echo === Writing autoexec.bat for $@
@echo -n "" > $(1)/autoexec.bat @echo -n "" > $(1)/autoexec.bat
$(if $(filter 40,$(2)),$(call mb_autoexec_append_cmd,$(1),mode 40),$(call mb_autoexec_append_cmd,$(1),mode 80)) $(if $(wildcard $(1)/utils),$(call _mb_autoexec_write_preboot,$(1),utils\),$(call _mb_autoexec_write_preboot,$(1)))
$(call mb_autoexec_append_echo,$(1),==== MSXBUILD ====)
$(if $(filter 40,$(2)),$(call mb_autoexec_append_echo,$(1),Boot mode 40),$(call mb_autoexec_append_echo,$(1),Boot mode 80))
$(call mb_autoexec_append_cmd,$(1),omsxctl boot_exec_color_vdp)
$(if $(filter on,$(MB_FLIGHT_VIDEO)),$(call mb_autoexec_append_save_video,$(1)))
$(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(MB_AUTOEXEC_STARTUP_TIMEOUT) seconds failed_exec $(MB_AUTOEXEC_STARTUP_EXITCODE))
$(if $(filter on,$(MB_AUTOEXEC_SHOW_VERSION)),$(call mb_autoexec_append_cmd,$(1),ver)) $(if $(filter on,$(MB_AUTOEXEC_SHOW_VERSION)),$(call mb_autoexec_append_cmd,$(1),ver))
$(if $(wildcard $(1)/utils),$(call mb_autoexec_append_cmd,$(1),PATH + A:\; A:\UTILS)) $(if $(wildcard $(1)/utils),$(call mb_autoexec_append_cmd,$(1),PATH + A:\UTILS))
$(if $(filter on,$(MB_AUTOEXEC_SHOW_PATH)),$(call mb_autoexec_append_cmd,$(1),PATH)) $(if $(filter on,$(MB_AUTOEXEC_SHOW_PATH)),$(call mb_autoexec_append_cmd,$(1),PATH))
$(if $(filter on,$(MB_AUTOEXEC_SHOW_PROLOG)),$(call mb_autoexec_append_echo,$(1),$(MB_AUTOEXEC_STARTUP_PROLOG)))
$(if $(filter on,$(MB_AUTOEXEC_SHOW_CONFIG)),$(call mb_autoexec_append_cmd,$(1),omsxctl boot_exec_config_info)) $(if $(filter on,$(MB_AUTOEXEC_SHOW_CONFIG)),$(call mb_autoexec_append_cmd,$(1),omsxctl boot_exec_config_info))
$(if $(filter on,$(MB_AUTOEXEC_SHOW_FOLDER)),$(call mb_autoexec_append_echo,$(1),Run folder $(1))) $(if $(filter on,$(MB_AUTOEXEC_SHOW_FOLDER)),$(call mb_autoexec_append_echo,$(1),mb::path $(1)))
$(if $(filter on,$(MB_AUTOEXEC_SHOW_TARGET)),$(call mb_autoexec_append_echo,$(1),Run target $@)) $(if $(filter on,$(MB_AUTOEXEC_SHOW_TARGET)),$(call mb_autoexec_append_echo,$(1),mb::pipe $@))
endef endef
MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_autoexec_write_default,"Write a default autoexec.bat file.","<dir> [text-mode]") MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_autoexec_write_default,"Write a default autoexec.bat file.","<dir>")

View file

@ -20,8 +20,8 @@ define _mb_autoexec_show_gui
$(call mb_autoexec_append_stop_fail,$(1)) $(call mb_autoexec_append_stop_fail,$(1))
$(call mb_autoexec_append_show_gui,$(1)) $(call mb_autoexec_append_show_gui,$(1))
$(if $(filter mouse,$(4)),$(call mb_autoexec_append_joyporta_mouse,$(1))) $(if $(filter mouse,$(4)),$(call mb_autoexec_append_joyporta_mouse,$(1)))
$(call mb_autoexec_append_echo,$(1),Type shutdown to stop emulation) $(call mb_autoexec_append_echo,$(1),mb::exit Type shutdown to stop emulation)
$(if $(3),$(call mb_autoexec_append_echo,$(1),Running command: $(3))) $(if $(3),$(call mb_autoexec_append_echo,$(1),mb::show command $(3)))
$(if $(3),$(call mb_autoexec_append_cmd,$(1),$(3))) $(if $(3),$(call mb_autoexec_append_cmd,$(1),$(3)))
endef endef

View file

@ -92,12 +92,13 @@ define _mb_openmsx_dosctl_bat
$(if $(wildcard $(1)/z80.bat),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/emuctl/z80.bat,$(1))) $(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)/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)/shutdown.bat),,$(call mb_copy,$(PATH_MSXBUILD_REAL)/lib/emuctl/shutdown.bat,$(1)))
$(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))
endef endef
define mb_openmsx_dosctl define mb_openmsx_dosctl
$(call mb_openmsx_setup,$(1),$(if $(2),$(2),$(MB_OPENMSX_MACHINE))) $(call mb_openmsx_setup,$(1),$(if $(2),$(2),$(MB_OPENMSX_MACHINE)))
$(if $(wildcard $(1)/utils),$(call _mb_openmsx_dosctl_bat,$(1)/utils),$(call _mb_openmsx_dosctl_bat,$(1))) $(if $(wildcard $(1)/utils),$(call _mb_openmsx_dosctl_bat,$(1)/utils),$(call _mb_openmsx_dosctl_bat,$(1)))
$(if $(wildcard $(1)/omsxctl.com),,$(call mb_msxhub_file,$(1),OMSXCTL/1.0-1/get/OMSXCTL/omsxctl.com))
$(if $(wildcard $(1)/command.com),,$(if $(wildcard $(1)/command2.com),,$(call mb_msxhub_get_$(MB_OPENMSX_BOOT_OS)_boot,$(1)))) $(if $(wildcard $(1)/command.com),,$(if $(wildcard $(1)/command2.com),,$(call mb_msxhub_get_$(MB_OPENMSX_BOOT_OS)_boot,$(1))))
$(call _mb_openmsx_run,$(1),$(if $(2),$(2),$(MB_OPENMSX_MACHINE)),$(if $(3),$(3),$(MB_OPENMSX_MACHINE_RAM))) $(call _mb_openmsx_run,$(1),$(if $(2),$(2),$(MB_OPENMSX_MACHINE)),$(if $(3),$(3),$(MB_OPENMSX_MACHINE_RAM)))
endef endef

View file

@ -33,13 +33,17 @@ proc boot_exec_color_vdp {{vdp_fg 0} {vdp_bg 0}} {
} else { } else {
set color_vdp_bg $boot_exec_color_vdp_bg set color_vdp_bg $boot_exec_color_vdp_bg
} }
if {([vdpreg 8] != 0) || ([vdpreg 16] != 0)} {
setcolor 15 $color_vdp_fg setcolor 15 $color_vdp_fg
setcolor 4 $color_vdp_bg setcolor 4 $color_vdp_bg
return "Boot color vdp fg $color_vdp_fg bg $color_vdp_bg" return "mb::boot color vdp fg $color_vdp_fg bg $color_vdp_bg"
} else {
return "mb::boot color MSX1"
}
} }
proc boot_exec_config_info {} { proc boot_exec_config_info {} {
set result "Run machine " set result "mb::host "
append result [machine_info config_name] append result [machine_info config_name]
append result " on " append result " on "
append result [openmsx_info version] append result [openmsx_info version]

View file

@ -41,7 +41,7 @@ proc fail_after { timeout {time_unit "time"} {fail_id "fail_after"} {fail_code 2
set msg "" set msg ""
if {$fail_after_prev_timer != 0} { if {$fail_after_prev_timer != 0} {
after cancel $fail_after_prev_timer after cancel $fail_after_prev_timer
set msg "$fail_after_prev_id: Stopped attempt" set msg "mb::fail canceled $fail_after_prev_id"
} }
set fail_after_prev_id $fail_id set fail_after_prev_id $fail_id
if {$time_unit != "time"} { if {$time_unit != "time"} {
@ -52,7 +52,7 @@ proc fail_after { timeout {time_unit "time"} {fail_id "fail_after"} {fail_code 2
puts stderr "error: $err_msg" puts stderr "error: $err_msg"
fail_after_exit fail_after_timer_error 1 fail_after_exit fail_after_timer_error 1
} }
set msg "$msg\n$fail_id: Failure in $timeout $time_unit sec" set msg "$msg\nmb::fail after $timeout $time_unit $fail_id"
} else { } else {
set fail_after_prev_timer 0 set fail_after_prev_timer 0
} }

View file

@ -31,12 +31,12 @@ set headless_renderer_done 0
proc headless_exit {} { proc headless_exit {} {
after time 1 "exit 0" after time 1 "exit 0"
return "Shutdown openMSX" return "mb::head shutdown openMSX"
} }
proc headless_reset {} { proc headless_reset {} {
after time 1 "reset" after time 1 "reset"
return "Reboot openMSX" return "mb::head reboot openMSX"
} }
proc headless_show_gui {} { proc headless_show_gui {} {
@ -45,7 +45,7 @@ proc headless_show_gui {} {
global headless_renderer_type global headless_renderer_type
global headless_renderer_done global headless_renderer_done
if {$headless_renderer_done != 0} { if {$headless_renderer_done != 0} {
return "Requested GUI already showing" return "mb::head GUI already showing"
} }
if {$headless_renderer_type != 0} { if {$headless_renderer_type != 0} {
after time 1 "set renderer $headless_renderer_type" after time 1 "set renderer $headless_renderer_type"
@ -55,7 +55,7 @@ proc headless_show_gui {} {
puts stderr "error: Requested show gui but env.RENDERER is missing." puts stderr "error: Requested show gui but env.RENDERER is missing."
exit 1 exit 1
} }
return "Requested GUI with $headless_renderer_type" return "mb::head GUI renderer $headless_renderer_type"
} }
if {[info exists ::env(RENDERER)] && ([string trim $::env(RENDERER)] != "")} { if {[info exists ::env(RENDERER)] && ([string trim $::env(RENDERER)] != "")} {

View file

@ -33,7 +33,7 @@ proc night_flight_save_screenshot {{prefix_id 0}} {
set file_prefix "$night_flight_prefix$night_flight_seperator" set file_prefix "$night_flight_prefix$night_flight_seperator"
} }
screenshot -prefix $file_prefix screenshot -prefix $file_prefix
return "Flight screenshot saved" return "mb::save flight screenshot"
} }
proc night_flight_save_video {{prefix_id 0}} { proc night_flight_save_video {{prefix_id 0}} {
@ -47,7 +47,7 @@ proc night_flight_save_video {{prefix_id 0}} {
} }
after quit "record stop" after quit "record stop"
after time 1 "record start $night_flight_record_flag -prefix $file_prefix" after time 1 "record start $night_flight_record_flag -prefix $file_prefix"
return "Flight video started" return "mb::save flight video"
} }
if {[info exists ::env(NF_PREFIX)] && ([string trim $::env(NF_PREFIX)] != "")} { if {[info exists ::env(NF_PREFIX)] && ([string trim $::env(NF_PREFIX)] != "")} {

View file

@ -6,7 +6,8 @@ bin/dist-qa-dos1/@assert \
bin/dist-qa-dos2/@assert \ bin/dist-qa-dos2/@assert \
bin/dist-qa-msx1/@assert \ bin/dist-qa-msx1/@assert \
bin/dist-qa-msxhub/@assert \ bin/dist-qa-msxhub/@assert \
bin/make-on-msx/@assert bin/make-on-msx/@assert \
bin/mbboot80-test/@assert
$(PATH_BIN)/@assert-all: | $(ASSERT_ALL_DEPS) $(PATH_BIN)/@assert-all: | $(ASSERT_ALL_DEPS)
@echo === All assertions completed @echo === All assertions completed

View file

@ -0,0 +1,24 @@
MBBOOT80_TEST_MOD := mbboot80-test
MBBOOT80_TEST_SRC := $(PATH_SRC)/$(MBBOOT80_TEST_MOD)
MBBOOT80_TEST_BIN := $(PATH_BIN)/$(MBBOOT80_TEST_MOD)
$(MBBOOT80_TEST_BIN): | $(PATH_BIN)/@prepare
$(call mb_mkdir,$(MBBOOT80_TEST_BIN))
$(MBBOOT80_TEST_BIN)/mbboot80.com: $(MBBOOT80_BIN)/mbboot80.com | $(MBBOOT80_TEST_BIN)
$(call mb_copy,$<,$@)
$(MBBOOT80_TEST_BIN)/@run: | $(MBBOOT80_TEST_BIN)/mbboot80.com
$(call mb_autoexec_show_gui80,$(MBBOOT80_TEST_BIN))
$(call mb_openmsx_dosctl,$(MBBOOT80_TEST_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MBBOOT80_TEST_BIN)/@run,"Run binaries from mbboot80.")
.PHONY: $(MBBOOT80_TEST_BIN)/@run
$(MBBOOT80_TEST_BIN)/@assert: | $(MBBOOT80_TEST_BIN)/mbboot80.com
$(call mb_delete,$(MBBOOT80_TEST_BIN)/ahello.out)
$(call mb_autoexec_safe_test,$(MBBOOT80_TEST_BIN),mbboot80 > mbboot80.out)
$(call mb_openmsx_dosctl,$(MBBOOT80_TEST_BIN))
grep "mb::boot mode 80" $(MBBOOT80_TEST_BIN)/mbboot80.out
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MBBOOT80_TEST_BIN)/@assert,"Assert binaries from mbboot80.")
.PHONY: $(MBBOOT80_TEST_BIN)/@assert

28
src/mbboot80/0module.mk Normal file
View file

@ -0,0 +1,28 @@
MBBOOT80_MOD := mbboot80
MBBOOT80_SRC := $(PATH_SRC)/$(MBBOOT80_MOD)
MBBOOT80_BIN := $(PATH_BIN)/$(MBBOOT80_MOD)
$(MBBOOT80_BIN): | $(PATH_BIN)/@prepare
$(call mb_mkdir,$(MBBOOT80_BIN))
$(MBBOOT80_BIN)/%.rel: $(MBBOOT80_SRC)/%.asm | $(MBBOOT80_BIN)
$(call mb_sdcc_compile_asm,$<,$@)
$(MBBOOT80_BIN)/mbboot80.hex: $(MBBOOT80_BIN)/mbboot80.rel
$(call mb_sdcc_link_asm_bdos,$<,$@)
$(MBBOOT80_BIN)/mbboot80.com: $(MBBOOT80_BIN)/mbboot80.hex
$(call mb_sdcc_hex2bin,$<,$@)
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MBBOOT80_BIN)/mbboot80.com,"Compiles mbboot80.")
$(MBBOOT80_BIN)/@run: | $(MBBOOT80_BIN)/mbboot80.com
$(call mb_autoexec_show_gui80,$(MBBOOT80_BIN))
$(call mb_openmsx_dosctl,$(MBBOOT80_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MBBOOT80_BIN)/@run,"Run the compiled mbboot80.")
.PHONY: $(MBBOOT80_BIN)/@run
$(MBBOOT80_BIN)/@release-local: | $(MBBOOT80_TEST_BIN)/@assert
$(call mb_copy,$(MBBOOT80_BIN)/mbboot80.com,lib/emuctl//mbboot80.com)
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MBBOOT80_BIN)/@release-local,"Updates binary copy in lib/emuctl folder.")
.PHONY: $(MBBOOT80_BIN)/@release-local

51
src/mbboot80/mbboot80.asm Normal file
View file

@ -0,0 +1,51 @@
.area _CODE
JP MAIN
.db 0x0D
.db 0x0D,0x0A
.str "MSXBUILD Boot mode 80 to support msx1 systems."
.db 0x0D,0x0A
.db 0x1A
MAIN:
LD HL,#0x002D
LD A,(0xFCC1)
CALL 0x0C
LD HL,#TXT_MODE80_MSX1
OR A
JP Z,PUT_TXT
LD A,#80
LD (0xF3AE),A
LD A,#0
LD IY,(0xFCC1)
LD IX,#0x5F
CALL 0x1C
LD HL,#TXT_MODE80
PUT_TXT:
LD A,(HL)
CP #0x1D
RET Z
LD E,A
LD C,#2
PUSH HL
CALL 0x5
POP HL
INC HL
JR PUT_TXT
;=========== MSX_TYPE TXT'S
TXT_MODE80:
.str "mb::boot mode 80"
.db 0x0D,0x0A
.db 0x1D
TXT_MODE80_MSX1:
.str "mb::boot mode MSX1"
.db 0x0D,0x0A
.db 0x1D
.area _DATA