『楼 主』:
用于Config.sys的并列配置菜单 ConfigP.Mnu v4.02
[已使用 LLM 解释]
一、特点
1. 常见的配置菜单是逐级往下执行,不可返回,像串联。嵌套级数多时,菜单项目将会呈级数放大趋势,使菜单编写比较繁琐,重复项较多。本配置菜单是并列关系,菜单编写简捷,可阅读性强,为菜单界面布置提供较大灵活性。
2. 所有可选择项目布置在1个界面上,阅读方便,选择快捷。
3. 工作在800×600 16位增强色(114模式)。
4. 可加载jpg格式背景图像。如果不加载背景图像,则用背景颜色替代。
5. 可加载中文字库(hzk16/gbk16字体,压缩/非压缩字体,自带字体),内嵌中英文字符显示程序,为显示中文菜单提供了一个良好的平台。
6. 可屏蔽Config.sys处理过程中的显示信息。
二、简要说明
1. 选项组分为2类:复选类选项组(CheckOption),单选类选项组(RadioOption)。
复选类选项组用来加载相容的驱动程序,可不选或全选。
单选类选项组用来加载互斥的驱动程序,应选择1项且只能选择1项。
2. 项目分为2类:预加载项目(LoadItem),普通项目(Item)。
预加载项目是启动时缺省加载的项目。
3. 项目之间可以关联,有2类:被选关联(relate),未选关联(unrelate)。
被选关联:主控被选,被控有效。
未选关联:主控被选,被控无效。
有效,则可选,才有被选/未选之分。
无效,则不可选,皆按未选对待。
利用被选关联,可以组成多级菜单。利用未选关联,可以屏蔽有关项目。
4. 配置块(block)是按需要组织在一起的一组驱动程序。可在配置块里设定参数,遥控'AutoExec.bat'。可在'block=0'之前和'block=end'之后放置公共配置块。
5. 如果不加载中文字体,则显示英文。
三、使用方法
1. 选项组选择方法
按Tab或`键
2. 项目选择方法
按方向键顺序循环选择
3. 项目设定方法
复选类选项组 按空格或回车键,选定/清除
单选类选项组 按方向键的同时既被选定
4. 菜单退出方法
按Esc或退格键
只有1组单选类选项组时,可按空格或回车键
选择'退出'按钮,按空格或回车键
5. 开关参数
/s 屏蔽config.sys显示信息。
/u 解除屏蔽。
6. 英文字母大小写转换
在同一行中,默认为大写,遇^转换。
例:c^onfig^p.m^nu 显示为 ConfigP.Mnu
四、语法说明
1. 选项组
; 选项组顺序号CheckOption=左上角x,左上角y,右下角x,右下角y=项目布置=标签颜色,标签内容
; 选项组顺序号RadioOption=左上角x,左上角y,右下角x,右下角y=项目布置=标签颜色,标签内容
选项组类型 CheckOption 复选类选项组;RadioOption 单选类选项组
选项组顺序号 0-99 顺序编号
选项组范围 左上角为原点,水平象素x(0-799),垂直象素y(0-599)
项目布置 1行有几列(1,2,3,...)
标签颜色 红(00-ff)绿(00-ff)兰(00-ff)
标签内容
例: =100,100,700,140=3=ffff00,上位内存管理
=100,170,700,250=4=,加载光驱驱动
2. 项目颜色
; color=未选项背景,未选项前景,被选项背景,被选项前景
缺省 黑,白,白,高白
背景/前景颜色 红(00-ff)绿(00-ff)兰(00-ff)
未选项背景也就是屏幕背景(未加载图像或加载部分图像时)
未选项背景=被选项背景时,加载图像时字符以图像为背景
未选项背景≠被选项背景时,加载图像时字符以被选项背景取代图像背景
例: =000000,808080,808080,ffffff
=000080,808080,000080,ffffff
3. 字体
; rem font=字体名称
字体类型 hzk16/gbk16 压缩/非压缩 自带字体(可用于任何语言)
字体名称 可带路径
自带字体格式 偏移 长度 描述
00 2字节 字符数量(x)
02 2x字节 字符内码(8100-ffff)
2x+02 32x 字符点阵映象,横向取模
注:附带16j.dot/16g.dot为压缩hzk16/gbk16字体
可使用本是的Mkfon.com生成自带字体
例:=16g.dot
4. 动态项目提示
; rem prompt=列=提示颜色
缺省 8列,被选项前景
提示位置 列(1-83) 行在时间位置
提示颜色 红(00-ff)绿(00-ff)兰(00-ff)
例: =3=ff0000
==ff0000
=
5. 等待时间
; time=行=时间,标签
缺省 33行60秒
时间位置 行(1-33)
时间长度 秒(0-60)
时间标签 "剩余时间"
例: =32=30,剩余时间
=32=30
=32
=
6. 背景图像
; image=水平象素偏移,垂直象素偏移=名称
缺省 偏移0,0
图像位置 左上角为原点(0,0),水平象素(0-799),垂直象素(0-599)
图像名称 jpg格式,最大象素800*600
例: =0,0=lt.jpg
==lt.jpg
=500,100=xy.jpg
7. 关联
; relate=主控项目顺序号,主控项目顺序号,...=被控项目顺序号,被控项目顺序号,...
关联类型 relate 被选关联, unrelate 未选关联
例: =1=3,4 =1,2=3,4
8. 注释
; note=行,列=注释颜色,注释内容
注释位置 行(1-33),列(1-100)
注释颜色 红(00-ff)绿(00-ff)兰(00-ff)
注释内容
例: =2,20=800000,中文 MSDOS_7.1 启动盘
=2,20=,中文 MSDOS_7.1 启动盘
9. 项目
; 项目顺序号LoadItem=配置块顺序号,配置块顺序号,...=项目标题=项目动态提示
; 项目顺序号Item=配置块顺序号,配置块顺序号,...=项目内容
项目顺序号 0-99 顺序编号
配置块顺序号 该项目所包含的配置块
项目标题
项目动态提示
例: LoadItem=0,9=加载 umbpci=使用上位内存
10. 配置块
; block=配置块顺序号
....
; block=end
配置块顺序号 0-99 顺序编号
end 配置块结束符
例: ; block=0
decice=umbpci.sys
set cm=cdrom
; block=1
decice=emm386.exe
...
; block=end
五、其他说明
1. rem可用'; '代替。
2.选项组标签颜色(或注释内容颜色),全部缺省时按未选项目前景处理,否则按前一选项组标签颜色(或注释内容颜色)处理。
3. 颜色可参考'web_216颜色表',但不局限于此表。
例1:特点 多选项组,加载全屏图像
选择第2项目“最小加载”时,屏蔽第3-20项目
device=ConfigP.Mnu /s
; color=000099,bbbbbb,000099,ffffff
; prompt=12=ff33ff
; time=32=10,剩余时间
; image=0,0=lt.jpg
; font=16g.dot
; note=2,40=00ffff,中文 MSDOS_7.1 启动盘
; note=3,30=,─────────────────────
; note=33,29=00ff00,按T^ab选择项目组,按方向键选择项目,按回车键更改
; unrelate=2=3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
; 0RadioOption=100,100,700,140=3=ffcc00,上位内存管理
; 0LoadItem=0,20=umbpci=使用上位内存
; 1item=1,20=emm386=使用上位内存,扩充内存
; 2item=21=最小系统
; 1CheckOption=100,170,700,250=4=,加载光驱驱动
; 3LoadItem=2=udvd
; 4Item=3=qcdrom
; 5Item=4=gcdrom
; 6Item=5=uide
; 7item=6=vide-cdd
; 8item=7=aspicd
; 9item=8=usbcd
; 2CheckOption=100,280,700,320=4=,加载 usb 驱动
; 10item=9=usbaspi
; 11item=10=di1000dd
; 12item=11=aspiohci
; 13item=12=aspiuhci
; 3CheckOption=100,350,700,450=4=,项目支持
; 14Loaditem=13=长文件名
; 15Loaditem=14=中文=加载acios,支持gbk
; 16Loaditem=15=鼠标
; 17item=16=高速缓存=在DOS下按装Windows,必须先运行此磁盘高速缓存程序,以加快安装。
; 18item=17=vpc9x文件共享=在vpc5.2中共享文件夹
; 19item=18=vpc2k7文件共享=在vpv2007中共享文件夹
; 20item=19=ntfs分区=ntfs分区读写支持
device=himem.sys
; block=0
device=umbpci.sys
; block=1
device=emm386.exe NOEMS
; block=2
device=udvd.sys /d:udv-cd
; block=3
device=qcdrom.sys /d:qcd-cd
; block=4
device=gcdrom.sys /d:gcd-cd
; block=5
DEVICE=uide.sys /s40 /d:uid-cd
; block=6
device=vide-cdd.sys /d:vid-cd
; block=7
device=aspicd.sys /d:asp-cd
; block=8
device=usbcd.sys /d:usb-cd
; block=9
device=usbaspi.sys /r /NORST
; block=10
device=di1000dd.sys
; block=11
device=aspiohci.sys /int /all
; block=12
device=aspiuhci.sys /int /all
; block=13
set cwjm=1
; block=14
set zw=1
; block=15
set sb=1
; block=16
set gshc=1
; block=17
set vpc=1
; block=18
set vpc=2
; block=19
set ntfs=1
; block=20
dos=high,umb,auto
; block=21
set zx=1
; block=end
fcbshigh=4,0
fileshigh=30
buffershigh=30,0
lastdrive=z
device=ConfigP.Mnu /u
对应的autoexec.bat
@echo off
set DIRCMD=/O:N /O:G /P /4
path=a:\;c:\;z:\
if not %zx%#==1# goto cwjm
set zx=
goto end
:cwjm
if not %cwjm%#==1# goto sb
LFNFOR ON
DOSLFN /C- /Z:CP936UNI.TBL > nul
set cwjm=
:sb
if not %sb%#==1# goto gshc
ctmouse > nul
mousclip > nul
set sb=
:gshc
if not %gshc%#==1# goto vpc1
smartdrv /X 4096 2048 > nul
set gshc=
:vpc1
if not %vpc%#==1# goto vpc2
fshare98 > nul
:: idle > nul
set vpc=
goto ntfs
:vpc2
if not %vpc%#==2# goto ntfs
fshare07 > nul
set vpc=
:ntfs
if not %ntfs%#==1# goto zw
call nt.bat > nul
set ntfs=
:zw
if not %zw%#==1# goto gg
call ac.bat > nul
set zw=
:gg
doskey > nul
SHCDX33c /d:?udv-cd /d:?qcd-cd /d:?gcd-cd /d:?uid-cd /d:?vid-cd /d:?asp-cd /d:?usb-cd > nul
ansi > nul
call m.bat
:end
例2:特点 只有1组单选类选项组,加载局部图像
device=ConfigP.Mnu /s
; color=0000bb,bbbbbb,0000bb,ffffff
; time=31=10,剩余时间
; prompt=8=ff33ff
; font=16g.dot
; image=500,100=xy.jpg
; note=2,40=00ffff,中文 MSDOS_7.1 启动盘
; note=3,30=,─────────────────────
; note=33,38=00ff00,按方向键选择项目,按回车键执行
; RadioOption=100,100,450,500=1=cccc00,选择启动模式
; item=0=保护模式 加载 EMM386=使用上位内存
; item=0,2,4=保护模式 加载 EMM386 和 CD-ROM
; item=0,2,3,4=保护模式 加载 EMM386 , CD-ROM 和 USB
; item=1=实模式 加载 UMBPCI
; LoadItem=1,2,4=实模式 加载 UMBPCI 和 CD-ROM
; item=1,2,3,4=实模式 加载 UMBPCI , CD-ROM 和 USB
device=himem.sys
; block=0
device=emm386.exe noems
; block=1
device=umbpci.sys
; block=2
devicehigh=vide-cdd.sys /d:ide-cd
devicehigh=aspicd.sys /d:scsi-cd
; block=3
device=usbcd.sys /d:usb-cd
device=usbaspi.sys /r
device=aspiohci.sys /int /all
device=aspiuhci.sys /int /all
device=di1000dd.sys
; block=4
set cdrom=1
; block=end
dos=high,umb,auto
fcbshigh=4,0
fileshigh=30
buffershigh=30,0
lastdrivehigh=32
stackshigh=9,256
device=ConfigP.Mnu /u
例3:特点 多级选择
选择第0项目“DOS工具箱”时,第3、4项目才有效(可选择)
......
; relate=0=3,4
; RadioOption=100,100,700,140 6,8,10,72=3=ffcc00,选择类型
; 0Item==DOS工具箱
; 1Loaditem=0=纯DOS
; 2item=3=江民杀毒
; RadioOption=100,225,700,265=2=ffcc00,DOS工具箱
; 3LoadItem=1=ghost8.3
; 4item=2=中文版DM
........
; block=0
set config=dos
; block=1
set config=ghost
; block=2
set config=dm
; block=3
set config=jm
........
v4.00 2009/4/6
修改:由显示模式111(640×480 16位增强色)改为显示模式114(800×600 16位增强色),容纳更多信息
增加:字体格式,可加载hzk16、gbk16字体,可加载压缩、非压缩字体,可加载自带字体
增加:项目动态提示,便于详细描述项目用途
修改:可以在虚拟机VM中正常使用
修改:选项组位置由行列确定改为由象素确定
修改:内部使用保护模式,不需要预先加载himem.sys
修改:按钮文字由“继续”改为“确定”
修改:关联算法
v4.01 2009/4/26
修改:上下方向键可在本列移动,左右方向键可跨行移动
修正:项目标题字符数量被限制
改进:与虚拟机的兼容性
v4.02 2009/5/11
修改:关联表达式可设置多项主控
Last edited by yaya on 2009-5-11 at 23:13 ]
### Features
1. Common configuration menus are executed step by step and cannot be returned, like a series. When the nesting level is large, the menu items will show a trend of being magnified by the level, making menu writing more cumbersome and having more repeated items. This configuration menu is in a parallel relationship, the menu writing is concise, and the readability is strong, providing greater flexibility for menu interface layout.
2. All selectable items are arranged on 1 interface, which is convenient to read and select quickly.
3. Works in 800×600 16-bit enhanced color (mode 114).
4. Can load jpg format background images. If no background image is loaded, it is replaced by the background color.
5. Can load Chinese character fonts (hzk16/gbk16 fonts, compressed/non-compressed fonts, built-in fonts), and embed Chinese and English character display programs, providing a good platform for displaying Chinese menus.
6. Can shield the display information in the processing of Config.sys.
### Brief Description
1. Option groups are divided into 2 types: check-type option groups (CheckOption), and radio-type option groups (RadioOption).
- Check-type option groups are used to load compatible drivers, and can be not selected or all selected.
- Radio-type option groups are used to load mutually exclusive drivers, and 1 item should be selected and only 1 item can be selected.
2. Items are divided into 2 types: pre-load items (LoadItem), and ordinary items (Item).
- Pre-load items are the items that are loaded by default at startup.
3. Items can be associated, and there are 2 types: selected association (relate), and unselected association (unrelate).
- Selected association: The master control is selected, and the controlled one is valid.
- Unselected association: The master control is selected, and the controlled one is invalid.
- If it is valid, it can be selected, and then there are selected/unselected distinctions.
- If it is invalid, it cannot be selected, and all are treated as unselected.
- Using selected association, multi-level menus can be composed. Using unselected association, relevant items can be shielded.
4. Configuration block (block) is a group of drivers organized together as needed. Parameters can be set in the configuration block, and 'AutoExec.bat' can be remotely controlled. Public configuration blocks can be placed before 'block=0' and after 'block=end'.
5. If no Chinese font is loaded, English is displayed.
### Usage Method
1. Option group selection method
- Press Tab or ` key
2. Item selection method
- Cycle selection in order by pressing the direction keys
3. Item setting method
- Check-type option group: Press space or Enter key to select/clear
- Radio-type option group: While pressing the direction key, it is selected
4. Menu exit method
- Press Esc or Backspace key
- When there is only 1 group of radio-type option groups, press space or Enter key
- Select the 'Exit' button, press space or Enter key
5. Switch parameters
- /s: Shield the display information of config.sys.
- /u: Remove the shield.
6. English letter case conversion
- In the same line, it is uppercase by default, and converted when encountering ^.
- Example: c^onfig^p.m^nu is displayed as ConfigP.Mnu
### Syntax Description
1. Option group
; Option group sequence number CheckOption=upper left x, upper left y, lower right x, lower right y=item arrangement=label color, label content
; Option group sequence number RadioOption=upper left x, upper left y, lower right x, lower right y=item arrangement=label color, label content
Option group type CheckOption check-type option group; RadioOption radio-type option group
Option group sequence number 0-99 sequential numbering
Option group range Upper left is the origin, horizontal pixel x(0-799), vertical pixel y(0-599)
Item arrangement Number of columns in 1 line(1,2,3,...)
Label color Red(00-ff) Green(00-ff) Blue(00-ff)
Label content
Example: =100,100,700,140=3=ffff00, Upper memory management
=100,170,700,250=4=, Load CD-ROM driver
2. Item color
; color=background color of unselected item, foreground color of unselected item, background color of selected item, foreground color of selected item
Default Black, White, White, High White
Background/foreground color Red(00-ff) Green(00-ff) Blue(00-ff)
Background color of unselected item is also the screen background (when no image is loaded or part of the image is loaded)
When background color of unselected item = background color of selected item, when loading the image, the characters use the image as the background
When background color of unselected item ≠ background color of selected item, when loading the image, the characters use the background color of selected item instead of the image background
Example: =000000,808080,808080,ffffff
=000080,808080,000080,ffffff
3. Font
; rem font=font name
Font type hzk16/gbk16 compressed/non-compressed built-in font (can be used for any language)
Font name Can have a path
Built-in font format Offset Length Description
00 2 bytes Number of characters(x)
02 2x bytes Character internal code(8100-ffff)
2x+02 32x Character dot matrix image, horizontal bit reversal
Note: 16j.dot/16g.dot are attached as compressed hzk16/gbk16 fonts
Mkfon.com can be used to generate built-in fonts in this version
Example: =16g.dot
4. Dynamic item prompt
; rem prompt=column=prompt color
Default 8 columns, foreground color of selected item
Prompt position Column(1-83) Line at the time position
Prompt color Red(00-ff) Green(00-ff) Blue(00-ff)
Example: =3=ff0000
==ff0000
=
5. Waiting time
; time=line=time, label
Default 33 lines 60 seconds
Time position Line(1-33)
Time length Seconds(0-60)
Time label "Remaining time"
Example: =32=30, Remaining time
=32=30
=32
=
6. Background image
; image=horizontal pixel offset, vertical pixel offset=name
Default Offset 0,0
Image position Upper left is the origin(0,0), horizontal pixel(0-799), vertical pixel(0-599)
Image name jpg format, maximum pixel 800*600
Example: =0,0=lt.jpg
==lt.jpg
=500,100=xy.jpg
7. Association
; relate=master control item sequence number, master control item sequence number,...=controlled item sequence number, controlled item sequence number,...
Association type relate selected association, unrelate unselected association
Example: =1=3,4 =1,2=3,4
8. Comment
; note=line, column=comment color, comment content
Comment position Line(1-33), column(1-100)
Comment color Red(00-ff) Green(00-ff) Blue(00-ff)
Comment content
Example: =2,20=800000, Chinese MSDOS_7.1 boot disk
=2,20=, Chinese MSDOS_7.1 boot disk
9. Item
; Item sequence number LoadItem=configuration block sequence number, configuration block sequence number,...=item title=item dynamic prompt
; Item sequence number Item=configuration block sequence number, configuration block sequence number,...=item content
Item sequence number 0-99 sequential numbering
Configuration block sequence number The configuration blocks included in this item
Item title
Item dynamic prompt
Example: LoadItem=0,9=Load umbpci=Use upper memory
10. Configuration block
; block=configuration block sequence number
....
; block=end
Configuration block sequence number 0-99 sequential numbering
end Configuration block end symbol
Example: ; block=0
decice=umbpci.sys
set cm=cdrom
; block=1
decice=emm386.exe
...
; block=end
### Other Instructions
1. rem can be replaced by '; '.
2. The label color of the option group (or the comment content color), when all are default, is processed according to the foreground color of the unselected item, otherwise it is processed according to the label color of the previous option group (or the comment content color).
3. The color can refer to the 'web_216 color table', but is not limited to this table.
Example 1: Features Multi-option groups, load full-screen image
When selecting the 2nd item "Minimum load", the 3rd-20th items are shielded
device=ConfigP.Mnu /s
; color=000099,bbbbbb,000099,ffffff
; prompt=12=ff33ff
; time=32=10, Remaining time
; image=0,0=lt.jpg
; font=16g.dot
; note=2,40=00ffff, Chinese MSDOS_7.1 boot disk
; note=3,30=, ─────────────────────
; note=33,29=00ff00, Press T^ab to select item group, press direction key to select item, press Enter to change
; unrelate=2=3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
; 0RadioOption=100,100,700,140=3=ffcc00, Upper memory management
; 0LoadItem=0,20=umbpci=Use upper memory
; 1item=1,20=emm386=Use upper memory, expand memory
; 2item=21=Minimum system
; 1CheckOption=100,170,700,250=4=, Load CD-ROM driver
; 3LoadItem=2=udvd
; 4Item=3=qcdrom
; 5Item=4=gcdrom
; 6Item=5=uide
; 7item=6=vide-cdd
; 8item=7=aspicd
; 9item=8=usbcd
; 2CheckOption=100,280,700,320=4=, Load usb driver
; 10item=9=usbaspi
; 11item=10=di1000dd
; 12item=11=aspiohci
; 13item=12=aspiuhci
; 3CheckOption=100,350,700,450=4=, Item support
; 14Loaditem=13=Long file name
; 15Loaditem=14=Chinese=Load acios, support gbk
; 16Loaditem=15=Mouse
; 17item=16=Cache=When installing Windows under DOS, you must run this disk cache program first to speed up the installation.
; 18item=17=Vpc9x file sharing=Share folder in vpc5.2
; 19item=18=Vpc2k7 file sharing=Share folder in vpv2007
; 20item=19=NTFS partition=NTFS partition read and write support
device=himem.sys
; block=0
device=umbpci.sys
; block=1
device=emm386.exe NOEMS
; block=2
device=udvd.sys /d:udv-cd
; block=3
device=qcdrom.sys /d:qcd-cd
; block=4
device=gcdrom.sys /d:gcd-cd
; block=5
DEVICE=uide.sys /s40 /d:uid-cd
; block=6
device=vide-cdd.sys /d:vid-cd
; block=7
device=aspicd.sys /d:asp-cd
; block=8
device=usbcd.sys /d:usb-cd
; block=9
device=usbaspi.sys /r /NORST
; block=10
device=di1000dd.sys
; block=11
device=aspiohci.sys /int /all
; block=12
device=aspiuhci.sys /int /all
; block=13
set cwjm=1
; block=14
set zw=1
; block=15
set sb=1
; block=16
set gshc=1
; block=17
set vpc=1
; block=18
set vpc=2
; block=19
set ntfs=1
; block=20
dos=high,umb,auto
; block=21
set zx=1
; block=end
fcbshigh=4,0
fileshigh=30
buffershigh=30,0
lastdrive=z
device=ConfigP.Mnu /u
Corresponding autoexec.bat
@echo off
set DIRCMD=/O:N /O:G /P /4
path=a:\;c:\;z:\
if not %zx%#==1# goto cwjm
set zx=
goto end
:cwjm
if not %cwjm%#==1# goto sb
LFNFOR ON
DOSLFN /C- /Z:CP936UNI.TBL > nul
set cwjm=
:sb
if not %sb%#==1# goto gshc
ctmouse > nul
mousclip > nul
set sb=
:gshc
if not %gshc%#==1# goto vpc1
smartdrv /X 4096 2048 > nul
set gshc=
:vpc1
if not %vpc%#==1# goto vpc2
fshare98 > nul
:: idle > nul
set vpc=
goto ntfs
:vpc2
if not %vpc%#==2# goto ntfs
fshare07 > nul
set vpc=
:ntfs
if not %ntfs%#==1# goto zw
call nt.bat > nul
set ntfs=
:zw
if not %zw%#==1# goto gg
call ac.bat > nul
set zw=
:gg
doskey > nul
SHCDX33c /d:?udv-cd /d:?qcd-cd /d:?gcd-cd /d:?uid-cd /d:?vid-cd /d:?asp-cd /d:?usb-cd > nul
ansi > nul
call m.bat
:end
Example 2: Features Only 1 group of radio-type option groups, load partial image
device=ConfigP.Mnu /s
; color=0000bb,bbbbbb,0000bb,ffffff
; time=31=10, Remaining time
; prompt=8=ff33ff
; font=16g.dot
; image=500,100=xy.jpg
; note=2,40=00ffff, Chinese MSDOS_7.1 boot disk
; note=3,30=, ─────────────────────
; note=33,38=00ff00, Press direction key to select item, press Enter to execute
; RadioOption=100,100,450,500=1=cccc00, Select boot mode
; item=0=Protected mode Load EMM386=Use upper memory
; item=0,2,4=Protected mode Load EMM386 and CD-ROM
; item=0,2,3,4=Protected mode Load EMM386, CD-ROM and USB
; item=1=Real mode Load UMBPCI
; LoadItem=1,2,4=Real mode Load UMBPCI and CD-ROM
; item=1,2,3,4=Real mode Load UMBPCI, CD-ROM and USB
device=himem.sys
; block=0
device=emm386.exe noems
; block=1
device=umbpci.sys
; block=2
devicehigh=vide-cdd.sys /d:ide-cd
devicehigh=aspicd.sys /d:scsi-cd
; block=3
device=usbcd.sys /d:usb-cd
device=usbaspi.sys /r
device=aspiohci.sys /int /all
device=aspiuhci.sys /int /all
device=di1000dd.sys
; block=4
set cdrom=1
; block=end
dos=high,umb,auto
fcbshigh=4,0
fileshigh=30
buffershigh=30,0
lastdrivehigh=32
stackshigh=9,256
device=ConfigP.Mnu /u
Example 3: Features Multi-level selection
When selecting the 0th item "DOS Toolbox", the 3rd and 4th items are valid (can be selected)
......
; relate=0=3,4
; RadioOption=100,100,700,140 6,8,10,72=3=ffcc00, Select type
; 0Item==DOS Toolbox
; 1Loaditem=0=Pure DOS
; 2item=3=Jiangmin antivirus
; RadioOption=100,225,700,265=2=ffcc00,DOS Toolbox
; 3LoadItem=1=ghost8.3
; 4item=2=Chinese version DM
........
; block=0
set config=dos
; block=1
set config=ghost
; block=2
set config=dm
; block=3
set config=jm
........
v4.00 2009/4/6
Modified: Changed from display mode 111 (640×480 16-bit enhanced color) to display mode 114 (800×600 16-bit enhanced color) to accommodate more information
Added: Font format, can load hzk16, gbk16 fonts, can load compressed, non-compressed fonts, can load built-in fonts
Added: Dynamic item prompt, convenient for detailed description of item usage
Modified: Can be used normally in virtual machine VM
Modified: The option group position is determined by pixels instead of rows and columns
Modified: Uses protected mode internally, no need to pre-load himem.sys in advance
Modified: The button text is changed from "Continue" to "OK"
Modified: Association algorithm
v4.01 2009/4/26
Modified: Up and down direction keys can move in this column, left and right direction keys can move across rows
Corrected: The number of characters in the item title is limited
Improved: Compatibility with virtual machine
v4.02 2009/5/11
Modified: The association expression can set multiple masters
Last edited by yaya on 2009-5-11 at 23:13 ]
LLM 解释
这是一份针对 CN-DOS 论坛关于 ConfigP.Mnu v4.02 讨论帖的技术解析与补充说明。
1. 软件定位与核心机制
ConfigP.Mnu 是由 yaya 开发的 Config.sys 增强插件。其核心价值在于打破了 MS-DOS 原生配置菜单([Menu] 块)的线性串联限制,实现了并列式、图形化的交互界面。
在传统的 Config.sys 中,若要实现多组驱动的自由组合,开发者必须编写大量的嵌套菜单块(Block),导致配置逻辑随功能增加呈几何倍数复杂化。ConfigP.Mnu 通过在图形界面下实时处理关联逻辑(relate/unrelate),并将选择结果映射到特定的配置块(block),极大简化了复杂启动盘的制作。
2. 技术细节解析
GBK 汉字内码转换算法
在帖子中,本是(Post #2)与 yaya(Post #3)讨论了汉字内码转字库偏移量的算法。这是 DOS 时代中文显示的核心技术。
-
本是提出的算法:是标准的区位码/GBK 逻辑判断法,通过判断高位字节(AH)和低位字节(AL)的范围,将 GBK 编码空间(非连续)映射到连续的字库偏移地址。
-
yaya 的算法:
((ch1-0x81)*0xbe+(ch2-0x40)-ch2/0x80)*2*10 (十六进制)。
-
0xbe (190) 是 GBK 每个区位对应的字符总数。
-
-ch2/0x80 是为了处理 GBK 编码中跳过的 0x7F 位(DEL 键)。
- 最后乘以
2*10(即 32 字节)对应 16x16 点阵字库中每个汉字占用的存储空间。
关联逻辑 (Relate/Unrelate)
这是该工具最强大的功能。
-
relate(被选关联):主控项选中后,被控项才变为可用状态(Enabled)。常用于制作二级子菜单。
-
unrelate(未选关联):主控项选中后,被控项强制失效(Disabled)。常用于排除互斥驱动(如加载了
UMBPCI 就不能加载 EMM386)。
-
历史修正:在早期版本中,关联逻辑仅支持单对单或单对多。v4.02 修正了算法,支持多主控项关联,解决了 VeDe 在 Post #13 中提出的“无法指定多个主控项目顺序号”的问题。
3. 环境与兼容性问题纠正
800×600 分辨率与 VBE 模式
v4.0 引入了 VESA VBE 模式 0x114 (800x600, 16-bit High Color)。
-
显示不全问题(Post #17/20):VeDe 发现屏幕右侧标题显示不全。这并非纯粹的软件 Bug,而是当年 DOS 硬件环境的典型现象:
-
VBE 兼容性:部分显卡(或老旧虚拟机的 VBE 实现)对非标准 VBE 模式的逻辑扫描线宽度(Scanline Width)处理不一致,导致横向像素越界时坐标计算偏移。
-
坐标溢出:早期版本中项目标题长度可能被硬编码限制在特定缓冲区内,yaya 在 v4.01 中明确修正了“项目标题字符数量限制”。
虚拟机兼容性
Post #19 提到的虚拟机差异是 DOS 开发的常态。
-
QEMU/Bochs:对 VBE 寄存器的模拟较为底层,若程序未正确处理显存分页(Bank Switching)或线性帧缓冲区(LFB),容易花屏。
-
VMware/VirtualBox:对 VBE 2.0+ 支持较好,这也是为何 xiaolongkun0 在这些环境下无法复现问题的原因。
4. 关键更新总结 (v4.0 - v4.02)
-
保护模式集成:v4.0 开始内部使用保护模式处理显示逻辑,不再强依赖
HIMEM.SYS 预加载,提高了在某些特殊引导环境下的稳定性。
-
字体支持:支持压缩格式的
.dot 字库。这在 DOS 软盘时代至关重要,因为完整的 GBK 字库文件体积超过 1MB,通过压缩可以显著节省启动盘空间。
-
交互改进:v4.01 引入了真正的二维导航,方向键不再是简单的线性循环,而是可以根据 UI 布局进行逻辑上的上下左右移动。
5. 使用建议与规范
在编写 Config.sys 时,请务必注意 ConfigP.Mnu 的两次调用:
-
第一次调用:
device=ConfigP.Mnu /s。/s 参数用于静默模式,防止 DOS 原生的配置行回显破坏图形界面。
-
配置定义:在两次调用之间定义所有的
block 块和 UI 参数。
-
第二次调用:
device=ConfigP.Mnu /u。/u 参数用于解除屏蔽并释放临时资源,确保后续驱动加载信息的正常显示。
技术前提:该工具依赖显卡对 VESA 1.2+ 标准的支持。在一些仅支持 VGA (640x480, 16 colors) 的极老旧工业级硬件上可能无法运行。
附件
1: MS-DOS-2009-04-07-15-06-31.png (2009-4-7 04:12, 245.38 KiB,下载次数: 22)
附件
2: MS-DOS-2009-04-07-15-06-59.png (2009-4-7 04:13, 247.09 KiB,下载次数: 15)
附件
3: ConfigP4.02.part1.rar (2009-5-11 23:12, 292.97 KiB,下载次数: 331)
附件
4: ConfigP4.02.part2.rar (2009-5-11 23:12, 292.97 KiB,下载次数: 304)
附件
5: ConfigP4.02.part3.rar (2009-5-11 23:12, 93.57 KiB,下载次数: 213)
|