2024-06-30 14:13:44 +00:00
|
|
|
# boot_exec -- Helper commands to autoexec.bat boot scripts.
|
2024-06-29 13:47:52 +00:00
|
|
|
#
|
2024-06-30 14:13:44 +00:00
|
|
|
# Adds the following commands to openMSX;
|
2024-06-29 13:47:52 +00:00
|
|
|
#
|
2024-07-02 20:56:17 +00:00
|
|
|
# 'boot_exec_setcolor <vdp_fg> <vdp_bg>'
|
2024-07-01 09:57:30 +00:00
|
|
|
# Sets the VDP colors to defaults or supplied colors.
|
2024-06-29 13:47:52 +00:00
|
|
|
#
|
2024-07-02 20:56:17 +00:00
|
|
|
# 'boot_exec_show_host'
|
|
|
|
# Displays machine boot line message.
|
2024-06-29 13:47:52 +00:00
|
|
|
#
|
2024-07-02 20:56:17 +00:00
|
|
|
# 'boot_exec_show_init'
|
|
|
|
# Displays MSXBUILD openMSX version boot line message.
|
2024-06-30 14:13:44 +00:00
|
|
|
#
|
|
|
|
|
2024-07-02 20:56:17 +00:00
|
|
|
proc boot_exec_setcolor {{vdp_fg 0} {vdp_bg 0}} {
|
2024-07-01 09:57:30 +00:00
|
|
|
if {$vdp_fg != 0} {
|
|
|
|
set color_vdp_fg $vdp_fg
|
|
|
|
} else {
|
2024-07-02 20:56:17 +00:00
|
|
|
set color_vdp_fg "777"
|
2024-07-01 09:57:30 +00:00
|
|
|
}
|
|
|
|
if {$vdp_bg != 0} {
|
|
|
|
set color_vdp_bg $vdp_bg
|
|
|
|
} else {
|
2024-07-02 20:56:17 +00:00
|
|
|
set color_vdp_bg "000"
|
2024-07-01 09:57:30 +00:00
|
|
|
}
|
2024-07-02 13:34:26 +00:00
|
|
|
if {([vdpreg 8] != 0) || ([vdpreg 16] != 0)} {
|
|
|
|
setcolor 15 $color_vdp_fg
|
|
|
|
setcolor 4 $color_vdp_bg
|
2024-07-02 20:56:17 +00:00
|
|
|
return "mb::boot color fg $color_vdp_fg bg $color_vdp_bg"
|
2024-07-02 13:34:26 +00:00
|
|
|
} else {
|
|
|
|
return "mb::boot color MSX1"
|
|
|
|
}
|
2024-06-29 13:47:52 +00:00
|
|
|
}
|
|
|
|
|
2024-07-02 20:56:17 +00:00
|
|
|
proc boot_exec_show_host {} {
|
2024-07-02 13:34:26 +00:00
|
|
|
set result "mb::host "
|
2024-06-29 13:47:52 +00:00
|
|
|
append result [machine_info config_name]
|
|
|
|
return $result
|
|
|
|
}
|
2024-06-30 14:13:44 +00:00
|
|
|
|
2024-07-02 20:56:17 +00:00
|
|
|
proc boot_exec_show_init {} {
|
|
|
|
set result "mb::init MSXBUILD on "
|
|
|
|
append result [openmsx_info version]
|
|
|
|
return $result
|
2024-06-30 14:13:44 +00:00
|
|
|
}
|
2024-07-02 22:38:25 +00:00
|
|
|
|
|
|
|
proc boot_exec_plug_porta {{plug_dev}} {
|
|
|
|
plug joyporta $plug_dev
|
|
|
|
return "mb::plug porta $plug_dev"
|
|
|
|
}
|
|
|
|
|
|
|
|
proc boot_exec_plug_portb {{plug_dev}} {
|
|
|
|
plug joyportb $plug_dev
|
|
|
|
return "mb::plug portb $plug_dev"
|
|
|
|
}
|