Merge pull request #28639 from gpchn/master

gpchn translation completed
This commit is contained in:
Xingyu.Wang 2023-02-14 08:39:01 +08:00 committed by GitHub
commit 896a17f46b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 168 additions and 168 deletions

View File

@ -1,168 +0,0 @@
[#]: subject: "How to Install DOSBox in Ubuntu to Play Old Games"
[#]: via: "https://www.debugpoint.com/install-dosbox-ubuntu/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "gpchn"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Install DOSBox in Ubuntu to Play Old Games
======
**Learn how to install DOSBox in Ubuntu and configure it to play old DOS games.**
DOSBox is a free and open-source operating system emulator that can run inside modern Linux systems. It has several components which emulate older hardware so that ancient programs and games can run.
All these make it possible to enjoy the older games and applications in modern Linux distributions.
In this guide, I will show you how to install DOSBox, configure it and play a sample game.
### Install DOSBox in Ubuntu
The main package of DOSBox is available in all the major repo of Linux distributions.
For Ubuntu, Debian, Linux Mint and related distributions use the following command to install it:
```
sudo apt install dosbox
```
For Fedora, CentOS, RHEL and related distributions use the following:
```
sudo dnf install dosbox
```
Arch Linux users, use the following command to install it.
```
pacman -S --needed dosbox
```
That will conclude the installation. Now its time to configure and run.
### Running DOSBox
After installation, type the following from the terminal.
```
dosbox
```
It will show you the following screen showing the DOSBox prompt. This first-time run is essential because it creates the DOSBox configuration file.
Type `exit` to close DOSBox for now.
![DOSBox first time run][1]
The configuration file gives you several options to tweak settings. The file is created at your home directory path `~/.dosbox/dosbox-[version].conf` for Ubuntu.
For fedora, it loads the staging config file from this path`~/.config/dosbox/dosbox-staging.conf`.
By default, you can keep the configuration unchanged. However, if you want, you can change it.
For example, if you want to start DOSBox fullscreen, you can enable and disable the switch. Heres a sample:
```
fullscreen=false
fulldouble=false
fullresolution=original
windowresolution=original
output=surface
autolock=true
sensitivity=100
waitonerror=true
```
You can find all the settings in the official [documentation][2].
### Download old games and run
There are many websites which provide old DOS games. I have used the following website, which provides a fair set of old games which can be played in the modern system.
So, visit the following page and download any game you want.
[Download DOS games][3]
Create a directory in your /home folder and name it dosbox.
```
cd ~mkdir dosbox
```
Now, extract the game which you downloaded (it should be a .exe file) and create a separate folder inside `~/dosbox`.
For example, I downloaded the game “Mario & Luigi (1994)”. And I created a folder called “mario” inside the “dosbox” folder. And placed the game file inside it.
![Keep the game in a separate folder][4]
Now launch dosbox from the terminal.
```
dosbox
```
And type the following to mount the game in a virtual C: drive.
```
mount c ~/dosbox/mario
```
After the above command is complete, change the drive to C:.
```
c:
```
And now, you can type the games file name to run the game.
```
mario
```
![Running the game][5]
![Mario running in DOSBox in Ubuntu][6]
### Keyboard or controller mapping
By default, DOSBox should detect the keyboard or any controller you may have plugged in. However, if you want to change game keybindings, you can run the below command from the terminal.
```
dosbox -startmapper
```
It will give you the following screen with the events tagged to each key. You can click on any key and change it according to your taste.
![DOSBox keyboard and controller mapping][7]
### Conclusion
I hope you managed to run your favourite dos game after installing dosbox in Ubuntu and other distros. DOSBox is one of the coolest pieces of software you can use to run any program, such as [Turbo C][8] and others.
If you have any trouble or questions, let me know in the comment box.
Enjoy!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/install-dosbox-ubuntu/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBox-first-time-run.jpg
[2]: https://www.dosbox.com/wiki/Dosbox.conf#Sections
[3]: https://archive.org/details/softwarelibrary_msdos_games?tab=collection
[4]: https://www.debugpoint.com/wp-content/uploads/2023/02/Keep-the-game-in-a-separate-folder.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2023/02/Running-the-game.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2023/02/Mario-playing-in-DOSBox-in-Ubuntu.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBOox-keyboard-and-controller-mapping.jpg
[8]: https://www.debugpoint.com/setting-up-dosbox-in-ubuntu-to-run-turbo-c/

View File

@ -0,0 +1,168 @@
[#]: subject: "How to Install DOSBox in Ubuntu to Play Old Games"
[#]: via: "https://www.debugpoint.com/install-dosbox-ubuntu/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "gpchn"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
如何在 Ubuntu 中安装 DOSBox 玩老游戏
======
**了解如何在 Ubuntu 中安装 DOSBox并配置它来玩旧的 DOS 游戏。**
DOSBox 是一个免费的开源操作系统模拟器,可以在现代 Linux 系统中运行。它有几个组件可以模仿旧的硬件,以运行旧程序和游戏。
这一切使得在现代 Linux 发行版中享受旧游戏和应用程序成为可能。
在本指南中,我将向您展示如何安装 DOSBox配置它并玩一个示例游戏。
### 在 Ubuntu 中安装 DOSBox
DOSBox 的主软件包在所有主要的 Linux 发行版中都可用。
在 Ubuntu、Debian、LinuxMint 和相关发行版中,使用以下命令安装它:
```
sudo apt install dosbox
```
在 Fedora、CentOS、RHEL 和相关发行版中,使用以下命令安装它:
```
sudo dnf install dosbox
```
在 Arch Linux 中,使用以下命令安装它:
```
pacman -S --needed dosbox
```
这将结束安装。现在是配置和运行的时候了。
### 运行 DOSBox
安装后,从终端键入以下内容:
```
dosbox
```
它将显示以下界面,这是 DOSBox 提示。第一次运行非常重要,因为它会创建 DOSBox 配置文件。
键入 `exit` 暂时关闭 DOSBox。
![DOSBox first time run][1]
配置文件为您提供了几个调整设置的选项。在 Ubuntu 中,该文件创建在 `~/.dosbox/dosbox-[version].conf`
在 Fedora 中,它从以下路径加载临时配置文件 `~/.config/dosbox/dosbox-staging.conf`.
默认情况下,您可以使用默认配置。但是如果您愿意,您可以修改它。
例如,如果您想全屏启动 DOSBox您可以启用或禁用相关设置。像这样:
```
fullscreen=false
fulldouble=false
fullresolution=original
windowresolution=original
output=surface
autolock=true
sensitivity=100
waitonerror=true
```
您可以在官方文档中找到所有的设置选项 [documentation][2].
### 下载以及游玩老游戏
有许多网站提供旧的 DOS 游戏。我使用过下面的网站,它提供了一套可以在现代系统中玩的老游戏。
所以,访问下面的网站,下载您想要的任何游戏。
[下载 DOS 游戏][3]
在您的 /home 目录下创建一个文件夹,并将其命名为 dosbox
```
cd ~mkdir dosbox
```
现在,解压您下载的游戏(应该是一个 .exe 文件),在 `~/dosbox` 目录下创建一个单独的文件夹。
例如,我下载了游戏 “马里奥和路易吉1994”。我在 “dosbox” 文件夹中创建了一个名为 “mario” 的文件夹,并将游戏文件放进去。
![Keep the game in a separate folder][4]
现在从终端启动 dosbox
```
dosbox
```
并键入以下内容,将游戏挂载到虚拟的 C: 盘中:
```
mount c ~/dosbox/mario
```
以上命令完成后,将驱动器更改为 C:
```
c:
```
现在,您可以输入游戏的文件名来运行游戏:
```
mario
```
![Running the game][5]
![Mario running in DOSBox in Ubuntu][6]
### 键盘或控制器映射
默认情况下DOSBox 会自动检测键盘或您插入的控制器。但是,如果您想更改游戏按键绑定,可以从终端运行以下命令:
```
dosbox -startmapper
```
它将显示以下界面,每个键上都标记有事件。您可以点开任何一个键,根据自己的习惯进行更改。
![DOSBox keyboard and controller mapping][7]
### 结论
我希望您在 Ubuntu 和其他发行版中安装了 DOSBox 之后,能够运行您最喜欢的 DOS 游戏。DOSBox 是最酷的软件之一,您可以使用它来运行任何程序,例如 [Turbo C][8] 等。
如果您有任何麻烦或问题,请在评论区告诉我。
享受游戏吧!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/install-dosbox-ubuntu/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[gpchn](https://github.com/gpchn)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBox-first-time-run.jpg
[2]: https://www.dosbox.com/wiki/Dosbox.conf#Sections
[3]: https://archive.org/details/softwarelibrary_msdos_games?tab=collection
[4]: https://www.debugpoint.com/wp-content/uploads/2023/02/Keep-the-game-in-a-separate-folder.jpg
[5]: https://www.debugpoint.com/wp-content/uploads/2023/02/Running-the-game.jpg
[6]: https://www.debugpoint.com/wp-content/uploads/2023/02/Mario-playing-in-DOSBox-in-Ubuntu.jpg
[7]: https://www.debugpoint.com/wp-content/uploads/2023/02/DOSBOox-keyboard-and-controller-mapping.jpg
[8]: https://www.debugpoint.com/setting-up-dosbox-in-ubuntu-to-run-turbo-c/