Cleaned machine boot messages.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -7s

This commit is contained in:
Willem Cazander 2024-06-28 19:04:15 +02:00
parent dc8b8a535e
commit 2896fa31bf
4 changed files with 59 additions and 32 deletions

View file

@ -54,16 +54,16 @@ When you want to see whats happening do a debug run;
real 0m2.400s
debug run at 11 Mhz;
time MB_OPENMSX_RENDERER=SDL MB_OPENMSX_THROTTLE=on make assert-all
time MB_OPENMSX_RENDERER=on MB_OPENMSX_THROTTLE=on make assert-all
real 0m49.609s
debug run real msx speed;
time MB_OPENMSX_RENDERER=SDL MB_OPENMSX_THROTTLE=on MB_OPENMSX_SPEED=100 make assert-all
time MB_OPENMSX_RENDERER=on MB_OPENMSX_THROTTLE=on MB_OPENMSX_SPEED=100 make assert-all
real 2m37.379s
debug run with video recorder;
time MB_OPENMSX_RENDERER=SDL MB_OPENMSX_RECORDER=on make assert-all
real 0m6.556s
time MB_OPENMSX_RENDERER=on MB_OPENMSX_RECORDER=on make -s -j4 assert-all
real 0m4.479s
build parallel;
time make -s -j4 assert-all

View file

@ -1,6 +1,4 @@
MB_AUTOEXEC_BYSELF ?= on
MB_AUTOEXEC_BYSELF_MSG ?= Run msxbuild:
MB_AUTOEXEC_VERSION ?= on
MB_AUTOEXEC_STARTUP_TIMEOUT ?= 60
MB_AUTOEXEC_STARTUP_EXITCODE ?= 124
@ -19,10 +17,8 @@ define mb_autoexec_append_rem
$(call mb_autoexec_append_cmd,$(1),rem $(2))
endef
define mb_autoexec_append_gui_mode
$(call mb_autoexec_append_echo,$(1),Enabling SDL renderer.)
$(call mb_autoexec_append_cmd,$(1),omsxctl set renderer SDL)
$(call mb_autoexec_append_echo,$(1),Enabling CPU throttling.)
$(call mb_autoexec_append_cmd,$(1),omsxctl set throttle on)
$(call mb_autoexec_append_echo,$(1),Enabling boot GUI mode.)
$(call mb_autoexec_append_cmd,$(1),omsxctl boot_gui_mode)
endef
define mb_autoexec_append_stop_fail
$(call mb_autoexec_append_echo,$(1),Disabling automatic failure.)
@ -44,13 +40,15 @@ endef
define mb_autoexec_write_default
@echo === Writing autoexec.bat for $(notdir $(1))
@echo -n "" > $(1)/autoexec.bat
$(call mb_autoexec_append_cmd,$(1),omsxctl setcolor 4 000)
$(call mb_autoexec_append_cmd,$(1),omsxctl setcolor 15 777)
$(if $(filter 40,$(2)),$(call mb_autoexec_append_cmd,$(1),mode 40),$(call mb_autoexec_append_cmd,$(1),mode 80))
$(if $(filter 40,$(2)),$(call mb_autoexec_append_echo,$(1),Enabled mode 40.),$(call mb_autoexec_append_echo,$(1),Enabled mode 80.))
$(call mb_autoexec_append_cmd,$(1),omsxctl fail_after $(MB_AUTOEXEC_STARTUP_TIMEOUT) seconds failed_exec $(MB_AUTOEXEC_STARTUP_EXITCODE))
$(call mb_autoexec_append_cmd,$(1),omsxctl setcolor 4 000)
$(call mb_autoexec_append_cmd,$(1),omsxctl setcolor 15 777)
$(if $(filter on,$(MB_AUTOEXEC_VERSION)),$(call mb_autoexec_append_cmd,$(1),ver))
$(if $(filter on,$(MB_AUTOEXEC_BYSELF)),$(call mb_autoexec_append_echo,$(1),$(MB_AUTOEXEC_BYSELF_MSG) $(notdir $(1))))
$(if $(filter on,$(MB_AUTOEXEC_VERSION)),$(call mb_autoexec_append_cmd,$(1),omsxctl machine_info config_name))
$(if $(filter on,$(MB_AUTOEXEC_VERSION)),$(call mb_autoexec_append_cmd,$(1),omsxctl openmsx_info version))
$(call mb_autoexec_append_echo,$(1),Run msxbuild: $(notdir $(1)))
endef
define _mb_autoexec_open_gui

View file

@ -12,7 +12,8 @@ MB_OPENMSX_JOYPORTA ?=
MB_OPENMSX_JOYPORTB ?=
MB_OPENMSX_SCALE_FACTOR ?= 3
MB_OPENMSX_THROTTLE ?= off
MB_OPENMSX_RENDERER ?=
MB_OPENMSX_RENDERER ?= off
MB_OPENMSX_RENDERER_TYPE ?= SDL
MB_OPENMSX_RECORDER ?= off
MB_OPENMSX_CTLCACHE ?= $(MB_CACHE)/msxbuild/omsxctl
@ -48,6 +49,7 @@ define _mb_openmsx_run
SCALE_FACTOR=$(MB_OPENMSX_SCALE_FACTOR) \
SPEED=$(MB_OPENMSX_SPEED) \
RENDERER=$(MB_OPENMSX_RENDERER) \
RENDERER_TYPE=$(MB_OPENMSX_RENDERER_TYPE) \
THROTTLE=$(MB_OPENMSX_THROTTLE) \
RECORDER=$(if $(filter on,$(MB_OPENMSX_RECORDER)),"$(1)-omsx/output.avi") \
OPENMSX_USER_DATA="$(1)-omsx/share" \

View file

@ -1,11 +1,20 @@
# boot_env -- Sets various openMSX settings based from environment variables.
#
# Typically used in automation tools which run openMSX without human interaction.
#
# Adds the following command to openMSX;
#
# 'boot_gui_mode'
# Enableds the renderer and throttle from the inside.
#
# Supported environment variables by this script;
#
# RENDERER=SDL
# RENDERER=on|off
# Override video output from command line.
#
# RENDERER_TYPE=SDL
# Select video renderer type.
#
# SCALE_FACTOR=3
# Override video scale factor for SDL renderer.
#
@ -25,8 +34,26 @@
# Enables the the video recorder.
#
if {[info exists ::env(RENDERER)] && ([string trim $::env(RENDERER)] != "")} {
if {[catch {set renderer [string trim $::env(RENDERER)]} err_msg]} {
# Enabled openMSX gui from inside
proc boot_gui_mode {} {
global renderer
global throttle
global boot_env_renderer_type
if {$boot_env_renderer_type != 0} {
set renderer $boot_env_renderer_type
set throttle on
}
}
# Globals
set boot_env_renderer_type 0
if {[info exists ::env(RENDERER_TYPE)] && ([string trim $::env(RENDERER_TYPE)] != "")} {
set boot_env_renderer_type [string trim $::env(RENDERER_TYPE)]
}
if {[info exists ::env(RENDERER)] && ([string trim $::env(RENDERER)] == "on")} {
if {[catch {set renderer $boot_env_renderer_type} err_msg]} {
puts stderr "error: env.RENDERER value $err_msg"
exit 1
}