|
雨露
管理员
          DOS非常爱好者
积分 6215
发帖 2601
注册 2006-1-20
状态 离线
|
『楼 主』:
关于"无需中文平台"的中文DOS软件的疑问?
[已使用 LLM 解释]
一般的DOS软件汉化版都需要在中文DOS平台下才能正常运行或显示中文,但有些DOS软件如DiskGen就不需要,为何?
有人说运用了图形化的汉字,我试着将最新版的DOS下的Disk Genius V2.00.0230主程序脱壳,再用editer提取字符,发现跟一般的DOS软件没什么两样,主要菜单也是简体中文句子或短语或词组,将中文译成英文后写回原软件,就变成英文软件了,可以正常运行,当然中文是非常简练的语言,中文软件英文化比英文软件汉化要困难许多!
Generally, the Chinese versions of common DOS software need to run or display Chinese characters normally under a Chinese DOS platform, but some DOS software like DiskGen don't. Why? Some people say that graphical Chinese characters are used. I tried to unpack the main program of the latest version of Disk Genius V2.00.0230 under DOS, then extracted the characters with editer, and found that it was no different from common DOS software. The main menus were also simplified Chinese sentences, phrases or word groups. After translating the Chinese into English and writing it back to the original software, it became an English software and could run normally. Of course, Chinese is a very concise language, and it is much more difficult to translate a Chinese software into English than to localize an English software into Chinese!
LLM 解释
技术背景与原理分析
在 DOS 时代,软件显示中文主要有两种截然不同的技术路径。雨露提到的 DiskGenius(原名 DiskMan)以及 SPFDisk、Norton Utilities 8.0 等软件,之所以能实现“无需外挂中文平台”显示汉字,主要是基于以下技术实现:
1. 图形模式下的点阵绘图(Graphics Mode Rendering)
这是 DiskGenius 等软件最常用的方法。
-
实现原理:软件运行后,会通过 BIOS 中断(如
INT 10H, AX=0013H 或 VESA 模式)切换到图形显示模式。在这种模式下,屏幕不再由硬件字符发生器控制,而是由软件直接操控每一个像素点。
-
内建字库:软件内部集成了一套精简的字模数据(通常是 16x16 点阵)。当程序需要显示汉字时,它会根据汉字的 GB 码(内码)计算出该字在内建字库中的偏移量,然后按照点阵位图(Bitmap)的方式,将像素逐一“画”在显示缓冲区中。
-
为何“没异样”:在反汇编或十六进制编辑器中查看主程序时,你看到的中文短语是内码(编码),而显示效果靠的是字模(数据)。如果你修改了编码(如将中文改为英文),程序逻辑依然会去查找对应字符的点阵,只不过因为你改成了 ASCII 字符,它可能调用了内置的英文点阵绘制函数。
2. VGA/EGA 软字体加载技术(VGA Soft Font / Bit-Mapped Text Mode)
如帖子中提到的 VTM、VT技术 或 acios:
-
实现原理:DOS 字符模式(Text Mode)下,VGA 显卡允许用户自定义显示字符的字形(Font RAM)。这种技术通过修改显卡的字符发生器 RAM,将原本 256 个字符中的部分(通常是高 128 个字符或利用多个字符平面)替换为汉字点阵。
-
局限性:标准 VGA 文本模式只能同时显示 256 或 512 个不同的字符。对于包含数千汉字的中文环境来说不够用,但对于界面固定的工具软件(如 SPFDisk),只需要提取界面用到的几十个特定汉字,将其定义为“自定义字符”即可在文本模式下显示中文。
3. 关于“汉化”与“字符提取”的误区
雨露在帖子中提到,将 DiskGenius 中的中文改为英文后软件正常运行,这证明了软件的逻辑架构:
-
编码转换:软件内部处理的是字符串。在中文版中,字符串存储的是 GBK/GB2312 编码;在英文版中,存储的是 ASCII 编码。
-
渲染逻辑:软件的渲染引擎(Drawing Engine)会判断当前要输出的字符。如果是 ASCII 字符,则调用 BIOS 字体或内置 8x16 字体;如果是双字节字符,则调用内置的 16x16 汉字字库进行绘图。
-
汉化难点:正如雨露所述,中文短语通常比英文短语占用的字节空间更少(例如“确定”占 4 字节,而“OK”仅占 2 字节,“Confirm”则占 7 字节)。在汉化英文软件时,常因目标位置空间不足导致无法直接修改,需要进行复杂的指针重定向(Long Jump)或扩充扇区处理。
4. 关于 FreeDOS command.com 的兼容性
在帖子后期讨论中提及的 FreeDOS 与 MS-DOS 兼容性问题,源于两者的内部实现差异:
-
COMSPEC 与环境块:FreeDOS 的
command.com 在内存管理和环境变量的处理上与微软版本不完全一致。
-
延迟变量处理:FreeDOS 对批处理文件的解析逻辑更接近于后期的增强型 shell,导致某些依赖于 MS-DOS 错误特性的批处理代码在 FreeDOS 下表现不同。
-
引导与初始化:DOS 启动时,内核(IO.SYS/KERNEL.SYS)会传递特定的数据结构给
command.com。如果内核版本与命令解析器版本不匹配(如 MS-DOS 7.1 内核去加载 FreeDOS 的 command.com),常会因环境变量初始化失败而导致无法定位自身路径。
总结
DiskGenius 这类软件本质上是“自带驱动与字库”的自包含程序。它们不依赖操作系统的显示服务,而是直接操作显示硬件。这种做法在当年的优点是兼容性极强(不挑中文平台),缺点是增加了主程序的体积,且无法支持第三方输入法。
|

|
|
2008-11-20 10:22 |
|
|
本是
银牌会员
    
积分 2221
发帖 789
注册 2005-1-27
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
不管采用什么方法,也不论是在图形方式还是字符方式,要显示汉字字形必须要调用汉字字模,如果没有把字模存储在显示卡等硬件中,就不得不自己调用预先存储在内存或外存(如硬盘文件、硬盘固定扇区)上的字模。
主程序中“没有异样”,要看它有无调用覆盖模块,甚至可能在表面上看来是数据文件的假货之中。
——因为电脑不是人脑——它不会闹鬼吧!^_^好怕怕哦!!
No matter what method is used, whether in graphic mode or character mode, to display Chinese character shapes, it is necessary to call Chinese character models. If the character models are not stored in hardware such as the graphics card, one has to call the character models pre - stored in memory or external storage (such as hard disk files, fixed hard disk sectors) by oneself.
In the main program, "no abnormalities" depends on whether it calls the overlay module, and it may even be among fake data files on the surface.
——Because a computer is not a human brain——It won't be haunted, right! ^_^ So scary oh!
|

my major is english----my love is dos----my teacher is the buddha----my friends--how about U |
|
2008-11-20 10:45 |
|
|
sanchuan
初级用户
 
积分 113
发帖 51
注册 2008-11-16 来自 武汉
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
DOS环境下的中文平台要解决的是汉字信息的输入和输出的全部。而汉化版的DOS软件,主要解决的是屏幕输出,与中文平台相比,程序结构相当简捷。其二,GB码有7000多,而一级汉字只有3千多。在3千多一级汉字中,常用的也就一千多。在一个汉化软件中——特别是DOS软件,不重复汉字至多二百个左右,其字模也就7K左右。与中文平台下的字模数据现比,也只是个零头。
In the DOS environment, the Chinese platform needs to solve all aspects of Chinese character information input and output. For the localized version of DOS software, it mainly solves the screen output, and compared with the Chinese platform, its program structure is quite simple. Secondly, GB code has more than 7,000 characters, and there are only more than 3,000 first-level Chinese characters. Among the more than 3,000 first-level Chinese characters, only more than 1,000 are commonly used. In a localized software - especially a DOS software, the number of non - repeated Chinese characters is at most about 200, and its font data is about 7K. Compared with the font data in the Chinese platform, it is just a fraction.
|

三川一笑 |
|
2008-11-29 01:12 |
|
|
雨露
管理员
          DOS非常爱好者
积分 6215
发帖 2601
注册 2006-1-20
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
如果只是要求显示出一个汉化的DOS软件中文界面,这个中文平台应该是很少的,有少于200K且没有LOGO的吗?袖珍龙就算了,兼容性差,显示的字不太好看!
If you just need to display a Chinese interface of a localized DOS software, there are very few such Chinese platforms. Is there one with less than 200K and no logo? Forget about Xiuzhenlong, it has poor compatibility and the displayed characters don't look good!
|

|
|
2008-11-29 08:02 |
|
|
wang6610
银牌会员
    
积分 1246
发帖 488
注册 2003-11-11
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
Originally posted by 雨露 at 2008-11-29 08:02 AM:
如果只是要求显示出一个汉化的DOS软件中文界面,这个中文平台应该是很少的,有少于200K且没有LOGO的吗?袖珍龙就算了,兼容性差,显示的字不太好看!
如能制作出 能根据软件中的汉字(哪怕是人工提取)定制字库的中文平台就好了。
输入法可选。
Last edited by wang6610 on 2008-11-29 at 10:31 ]
Originally posted by Yulu at 2008-11-29 08:02 AM:
If you just need to display a Chinese interface of a localized DOS software, there are very few such Chinese platforms. Is there any that is less than 200K and has no logo? Let's forget about Pocket Dragon, as it has poor compatibility and the displayed characters are not very nice!
It would be great if a Chinese platform could be made that can customize the font library according to the Chinese characters in the software (even if extracted manually).
Input methods are optional.
Last edited by wang6610 on 2008-11-29 at 10:31 ]
|

|
|
2008-11-29 10:29 |
|
|
sanchuan
初级用户
 
积分 113
发帖 51
注册 2008-11-16 来自 武汉
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
兼容性好、少于200K的中文平台,肯定是没有的——GB汉字库就不可能少于200K。楼主提出的问题,应该是解决汉字显示驱动的问题吧?若是如此,至今只有本是先生在解决这个问题——唯一的能够在Config中加载的汉字驱动程序。
顺便加一句,希望本是先生今后的作品通用性广泛、兼容性好、接口或参数简捷。
A Chinese platform with good compatibility and less than 200K is definitely non-existent - the GB Chinese character library cannot be less than 200K. The question raised by the landlord should be about solving the problem of the Chinese character display driver? If so, so far only Mr. Ben Shi is solving this problem - the only Chinese character driver program that can be loaded in Config.
By the way, add that I hope Mr. Ben Shi's future works will be widely universal, have good compatibility, and have simple interfaces or parameters.
|

三川一笑 |
|
2008-11-29 10:41 |
|
|
本是
银牌会员
    
积分 2221
发帖 789
注册 2005-1-27
状态 离线
|
|
2008-11-29 15:53 |
|
|
雨露
管理员
          DOS非常爱好者
积分 6215
发帖 2601
注册 2006-1-20
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
SPFDisk軟體內建系統所顯示的中文字(國喬),不知是如何做到的?
How is the Chinese characters (Guoqiao) displayed in the built-in system of the SPFDisk software achieved?
|

|
|
2008-11-29 16:19 |
|
|
本是
银牌会员
    
积分 2221
发帖 789
注册 2005-1-27
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
这就是图形汉字了,象CL、CREAD、STC、TTE、VTTE、TM等有很多,都是内建小汉字库及其索引然后显示图形汉字,我自己就曾经扩展过甘宝才和吴晓军的版本,可以显示纵横扩大、旋转、下划线等,现在没有人需要了。
This is the graphic Chinese character. There are many like CL, CREAD, STC, TTE, VTTE, TM, etc. They are all built-in small Chinese character libraries and their indices, and then display graphic Chinese characters. I myself once expanded the versions of Gan Baocai and Wu Xiaojun, which can display vertical and horizontal enlargement, rotation, underline, etc. Now no one needs them.
|

my major is english----my love is dos----my teacher is the buddha----my friends--how about U |
|
2008-11-29 16:32 |
|
|
雨露
管理员
          DOS非常爱好者
积分 6215
发帖 2601
注册 2006-1-20
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
如果方便的话,大师可以提供一下呀,这种资料太少了!
If it's convenient, master, can you provide it? There are too few such materials!
|

|
|
2008-11-29 16:34 |
|
|
雨露
管理员
          DOS非常爱好者
积分 6215
发帖 2601
注册 2006-1-20
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
快下班了,最后还想请教一下大师,偶在汉化一些软件时,比如汉化freedos1.0的命令解析程序command.com时,发现它的开机时出现的版权信息用editor2提取不到,(s:3)猜测是加密了,提取出时变成乱码,所以找不到,对吗?
It's almost off work. Finally, I want to ask the master. When I was localizing some software, for example, when localizing the command parsing program command.com of FreeDOS 1.0, I found that the copyright information that appears when it starts up cannot be extracted with editor2. (s:3) It is guessed that it is encrypted, and when extracted, it becomes garbled code, so it cannot be found. Is that right?
|

|
|
2008-11-29 16:41 |
|
|
wang6610
银牌会员
    
积分 1246
发帖 488
注册 2003-11-11
状态 离线
|
|
2008-11-29 17:03 |
|
|
本是
银牌会员
    
积分 2221
发帖 789
注册 2005-1-27
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
Originally posted by 雨露 at 2008-11-29 16:41:
快下班了,最后还想请教一下大师,偶在汉化一些软件时,比如汉化freedos1.0的命令解析程序command.com时,发现它的开机时出现的版权信息用editor2提取不到,(s:3)猜测是加密了,提取出时变成乱码,所以找不到,对吗?
应该是。
Originally posted by Yulu at 2008-11-29 16:41:
It's almost off work. Finally, I still want to ask the master. When I was localizing some software, for example, when localizing the command parser command.com of FreeDOS 1.0, I found that the copyright information that appears when it starts up cannot be extracted with editor2, (s:3) it is guessed that it is encrypted, and it becomes garbled when extracted, so I can't find it, right?
It should be.
|

my major is english----my love is dos----my teacher is the buddha----my friends--how about U |
|
2008-11-29 17:17 |
|
|
本是
银牌会员
    
积分 2221
发帖 789
注册 2005-1-27
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
Originally posted by 雨露 at 2008-11-29 16:34:
如果方便的话,大师可以提供一下呀,这种资料太少了!
如果真的有人需要,我可以考虑放上来。但时间久远,需要整理一下。
Originally posted by Yulu at 2008-11-29 16:34:
If it's convenient, master, can you provide it? There are too few such materials!
If really someone needs it, I can consider putting it up. But it's been a long time, and it needs to be sorted out.
|

my major is english----my love is dos----my teacher is the buddha----my friends--how about U |
|
2008-11-29 17:19 |
|
|
xugaohui
高级用户
   
积分 774
发帖 293
注册 2003-4-16 来自 湖北仙桃
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
本是:
也有人用与vt系统软件相同的技术来显示中文。
http://bbs.wuyou.com/viewthread.php?tid=131706&extra=page%3D1&page=1
这个东西非常好。
目前的vt工具主要是用于config菜单和批处理中。如果想在Qbasic中使用相同的技术可以行吗?能搞一个bas示例程序就好了。
执行生成后的显示中文程序,在运行其它有acsii制表符的程序会显示会乱码或半个汉字。
雨露:
freedos的command.com汉化后也只能在freedos下运行。直接替换msdos 7.1的command.com后就不能用了。
There are also people using the same technology as vt system software to display Chinese characters.
http://bbs.wuyou.com/viewthread.php?tid=131706&extra=page%3D1&page=1
This thing is very good.
Currently, vt tools are mainly used in config menus and batch processing. If you want to use the same technology in Qbasic, can it be done? It would be great to have a bas sample program.
When running the generated Chinese - displaying program, running other programs with ascii tab characters will cause garbled display or half - Chinese characters.
Yulu:
The command.com of freedos after Chinese localization can only run under freedos. Directly replacing the command.com of msdos 7.1 will not work.
|

下载
09年7月7日 更新
感谢网友 囧HQY 提供空间 |
|
2008-11-29 17:32 |
|