msxbuild/lib/openmsx/share/scripts/boot_exec.tcl

46 lines
1.2 KiB
Tcl
Raw Normal View History

2024-06-30 14:13:44 +00:00
# boot_exec -- Helper commands to autoexec.bat boot scripts.
#
2024-06-30 14:13:44 +00:00
# Adds the following commands to openMSX;
#
# 'boot_exec_color_dark'
# Sets the VDP colors to dark color tones.
#
# 'boot_exec_config_info'
# Displays machine and openMSX version on one line.
#
2024-06-30 14:13:44 +00:00
# Supported environment variables by this script;
#
# VDP_FG=111
# Override the default vdp foreground color.
#
# VDP_BG=369
# Override the default vdp background color.
#
set boot_exec_color_vdp_fg "777"
set boot_exec_color_vdp_bg "000"
2024-06-30 14:13:44 +00:00
proc boot_exec_color_vdp {} {
global boot_exec_color_vdp_fg
global boot_exec_color_vdp_bg
setcolor 15 $boot_exec_color_vdp_fg
setcolor 4 $boot_exec_color_vdp_bg
return "Boot color vdp fg $boot_exec_color_vdp_fg bg $boot_exec_color_vdp_bg"
}
proc boot_exec_config_info {} {
set result "Run machine "
append result [machine_info config_name]
append result " on "
append result [openmsx_info version]
return $result
}
2024-06-30 14:13:44 +00:00
if {[info exists ::env(VDP_FG)] && ([string trim $::env(VDP_FG)] != "")} {
set boot_exec_color_vdp_fg [string trim $::env(VDP_FG)]
}
if {[info exists ::env(VDP_BG)] && ([string trim $::env(VDP_BG)] != "")} {
set boot_exec_color_vdp_bg [string trim $::env(VDP_BG)]
}