DOSBox

来自Ubuntu中文
Luojie-dune留言 | 贡献2010年2月20日 (六) 19:25的版本
跳到导航跳到搜索

运行windows程序则使用 Wine


什么是 DOSBox?

DOSBox是一个使用SDL库的免费开源跨平台的MS-DOS模拟器。它可以模拟:286/386 CPU的现实和保护模式,/XMS/EMS 文件系统,Tandy/Hercules/CGA/EGA/VGA/ VESA 显卡和 SoundBlaster/Gravis Ultra的声卡。


这个模拟器主要是为运行DOS游戏软件而开发的,但是也可能用DOSBox运行其他的MS-DOS程序。

参考资料

DOSBox计划包括的兼容游戏表.

安装=

必须打开Universe源(参见如何添加源)才会安装dosbox

运行DOSBox

终端

DOSBox dosbox . 启动后出现的提示为 Z:\

将软件运行在DOSBox中

挂载驱动器和文件夹: " mount "命令

看到Z: \ 那些熟悉MS-DOS 和command.com准备看C: \ 甚至A: \ 将会感到奇怪. 默认情况下DOSBox并没有开启C:\.如果要给一个,我们必须在虚拟机挂载一个. 实际上, 这意味着我们必须为DOSBox创建一个可以做为C:\的目录.

( N.B. 在接下来的例子中,在整个文档中, 我们假定一个用户叫做"wikiuser". 用你的用户名代替这个. )

在一个常规窗口, (不是DOSBox), 你可以执行

$ mkdir ~/dos/c

这会在你的家目录创建一个 /dos/c 目录. 让DOSBox用这个做为 C:\ 驱动器, 在DOSBox中执行下列命令:

mount c /home/wikiuser/dos/c

DOSBox会将 ~/dos/c/ 的内容做为虚拟C:\. 在DOSBox里你可以在该文件夹下运行任何的DOS程序. 如果这些DOS程序是独立的可执行文件,仅仅需要把它们复制到~/dos/c的子目录下并在DOSBox内运行它们.对于另外的程序,你可能需要它们的安装程序.每一个的详情可以参阅兼容列表.

象这样它也可以挂载可移动磁盘,只需用到可移动磁盘的路径替代.

DOSBox中mount命令的的进一步用法, 参照该命令的 手册页

注意许多例子在官方的DOSBox中具体的对应着MS-DOS或者Windows.当看到一个Windows风格的路径象C:\OLDGAMES ,简单的理解成linux风格的路径. 这些命令的结果是相同的.

挂载磁盘镜像: " imgmount "命令

在DOSBox有可能(很多情况下是必须的)挂载磁盘镜像,用 imgmount 命令.

最常见的是我们要挂载光盘镜像.在DOSBox中挂载光盘镜像,在DOSBox中执行下列命令:

imgmount d /path/to/cd/image.iso -t iso

对于DOSBox虚拟机这将挂载一个iso文件做为CD-ROM.

imgmount命令进阶可以参看它的手册页

注意许多例子在官方的DOSBox中具体的对应着MS-DOS或者Windows.当看到一个Windows风格的路径象C:\OLDGAMES ,简单的理解成linux风格的路径. 这些命令的结果是相同的.

" mount " 命令

Seeing a Z:\ where one might have expected to see C:\ or even A:\ will seem strange to those familiar with MS-DOS and command.com.

DOSBox does not have a C:\ drive enabled by default. To give it one, we must mount one onto the virtual machine.

In practice, this means we must create a directory which can serve as a virtual C:\ drive for DOSBox.

( N.B. In the following examples, and throughout this document, we are assuming a user named "wikiuser". Replace that user-name with yours. )

In a regular terminal, (NOT DOSBox), you can execute

$ mkdir ~/dos/c

which will create the /dos/c directory in your home directory. To have DOSBox use this as its C:\ drive, execute the following command in DOSBox:

mount c /home/wikiuser/dos/c

This makes the contents of ~/dos/c/ the contents of the virtual C:\ drive in DOSBox. You can now run any DOS programs in that directory in DOSBox. If those DOS programs are self-contained executables, it's enough simply to copy them onto a suitable sub-directory in ~/dos/c and run them within DOSBox. For other programs, you may need to run their installers. Consult the compatibility list for details for each one.

It is also possible to mount removeable disks in this way; simply specify the path to the removeable disk instead.

For a more technical discussion of the mount command in DOSBox, consult the manual page for that command.

Note that many of the examples on the official DOSBox will seem to be specific to MS-DOS or Windows. Where you see a Windows-type path like C:\OLDGAMES , simply read a Linux-style path. The result of the commands should be the same.

Mounting Disk Images: the " imgmount " command

It is also possible(and in many cases desireable) to mount disk images in DOSBox, using the imgmount command.

Most commonly, this is used to mount CD-ROM images. To mount a CD-ROM image in DOSBox, execute the following command in DOSBox:

imgmount d /path/to/cd/image.iso -t iso

This will mount an .iso to the DOSBox virtual machine as a CD-ROM.

A more technical discussion of the imgmount command can be found at its manual page

Note that many of the examples on the official DOSBox will seem to be specific to MS-DOS or Windows. Where you see a Windows-type path like C:\OLDGAMES , simply read a Linux-style path. The result of the commands should be the same.





  • 文章来源:官方WIKI
    翻译人员:snoopy2556
    校对人员:bentusi
    文章状态:等待校对