msxbuild/lib/openmsx/share/scripts/boot_exec.tcl
Willem Cazander 93cb9fd5d6
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 3s
Small fixed and added color options for different things.
2024-07-02 22:56:17 +02:00

46 lines
1,019 B
Tcl

# boot_exec -- Helper commands to autoexec.bat boot scripts.
#
# Adds the following commands to openMSX;
#
# 'boot_exec_setcolor <vdp_fg> <vdp_bg>'
# Sets the VDP colors to defaults or supplied colors.
#
# 'boot_exec_show_host'
# Displays machine boot line message.
#
# 'boot_exec_show_init'
# Displays MSXBUILD openMSX version boot line message.
#
proc boot_exec_setcolor {{vdp_fg 0} {vdp_bg 0}} {
if {$vdp_fg != 0} {
set color_vdp_fg $vdp_fg
} else {
set color_vdp_fg "777"
}
if {$vdp_bg != 0} {
set color_vdp_bg $vdp_bg
} else {
set color_vdp_bg "000"
}
if {([vdpreg 8] != 0) || ([vdpreg 16] != 0)} {
setcolor 15 $color_vdp_fg
setcolor 4 $color_vdp_bg
return "mb::boot color fg $color_vdp_fg bg $color_vdp_bg"
} else {
return "mb::boot color MSX1"
}
}
proc boot_exec_show_host {} {
set result "mb::host "
append result [machine_info config_name]
return $result
}
proc boot_exec_show_init {} {
set result "mb::init MSXBUILD on "
append result [openmsx_info version]
return $result
}