close

轉自 http://diy123.blogspot.tw/search/label/dosbox

補充一下:(2019-02-24)

大富翁三一直沒音效,查了一下,發現是rich3.conf裡頭的irq為7,改成5就行了!!

--

久很久以前,在廣大的網路世界裡 ... 

這個開頭蠻像星際大戰的說 XD,好吧,總之呢,在二年前,我曾在舊網頁寫了幾篇玩老遊戲的教學,後來人變忙碌了(其實是懶了:P)又久未接觸該程式,因此幾篇教學就一直未更新。昨天無意中得知dosbox釋出了0.72版,想說就弄個簡單的教學,也就是 ... 只要照著我這樣做,大概就能輕鬆地玩老遊戲 ... 吧?!

由於這算第一篇教學--目前只打算寫個二篇就好,所以呢,先補上幾個相關連結吧!

Dosbox官網
http://dosbox.sourceforge.net/

我舊站的幾個教學
http://www.diy123.idv.tw/pages/main.htm
(請見首頁上方的 玩Dos遊戲 那四篇連結)

另外聲明一下,玩dos老遊戲需要懂一些基本的dos指令,這些指令我好像曾在舊的教學網頁有提過,若是沒有的話,那可能要請你找一些書或查一下google了。

開始之前先說明一下,這個教學僅針對硬碟版的遊戲,若是光碟版的話,其實只要光碟機讀的到,我相信應該直接install即可,不至於會有大問題,不過我並沒有拿光碟試過,所以若出問題的話,請直接找別的討論區問看看 (嗯,要先講這段話來逃避一下責任 XD)

另外一點呢,要套用我的東西,請先抓我用的這個版本的dosbox,也就是0.72版,然後呢,安裝路徑請不要照預設的路徑,而是改裝在 C:\DOSBox-0.72,而且要在主目錄下建立一個名稱叫 game 的資料夾,如下圖所示 (請按縮圖以觀看原圖)


這個取名叫 game 的資料夾,請將你要執行的遊戲全放在這裡面,以我的例子來講,我的game資料夾裡又有五個資料夾,每一個資料夾就是每一個硬碟遊戲,pal就是仙劍奇俠傳,csc2000即模擬城市2000 ... ... 以此類推。



好,在明白了上面我囉哩叭嗦講的一堆東西後,請先將dosbox安裝起來 (記得裝在我上面寫的路徑裡),裝好後,請由 [開始工具列] 的 [所有程式] 找到 [dosbox-0.72] 裡的[dosbox.conf] 這個檔案,如果程式無法開啟這個檔案,請利用windows內建的記事本來開啟它。

※以下就是dosbox.conf檔的內容,請留意我改為橘色的地方,其他地方照預設就好※

# This is the configurationfile for DOSBox 0.72.
# Lines starting with a # are commentlines.
# They are used to (briefly) document the effect of each option.

[sdl]
# fullscreen -- Start dosbox directly in fullscreen.
# fulldouble -- Use double buffering in fullscreen.
# fullresolution -- What resolution to use for fullscreen: original or fixed size (e.g. 1024x768).
# windowresolution -- Scale the window to this size IF the output device supports hardware scaling.
# output -- What to use for output: surface,overlay,opengl,openglnb,ddraw.
# autolock -- Mouse will automatically lock, if you click on the screen.
# sensitiviy -- Mouse sensitivity.
# waitonerror -- Wait before closing the console if dosbox has an error.
# priority -- Priority levels for dosbox: lowest,lower,normal,higher,highest,pause (when not focussed).
# Second entry behind the comma is for when dosbox is not focused/minimized.
# mapperfile -- File used to load/save the key/event mappings from.
# usescancodes -- Avoid usage of symkeys, might not work on all operating systems.

fullscreen=false
這裡是設定dosbox是否要開全螢幕的選項,若false改設為true,就會以全螢幕的方式來執行dosbox,當然你也可以不設全螢幕,當你想要全螢幕時再按 Alt + Enter 來切換即可。

fulldouble=false
fullresolution=original
假設dosbox成為全螢幕後,你希望這個全螢幕的解晰度為多少?
預設是你螢幕現在使用的解晰度,你也可以自行設定,比如我現在用1280x1024的解晰度,我也可以將預設的 original 改為 1024x768,這樣當我開全螢幕時,相當於是用1024x768的解晰度在執行dosbox,不過一般應該照預設即可。

windowresolution=original
output=surface
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper.txt
usescancodes=true

[dosbox]
# language -- Select another language file.
# memsize -- Amount of memory DOSBox has in megabytes.
# machine -- The type of machine tries to emulate:hercules,cga,tandy,pcjr,vga.
# captures -- Directory where things like wave,midi,screenshot get captured.

language=
machine=vga
captures=capture
memsize=16
這裡是設定dosbox模擬出來的環境下所擁有的記憶體,預設是16MB,你也可以自行調整,不過一般而言,dos遊戲大概16或32MB即可勝任了。

[render]
# frameskip -- How many frames DOSBox skips before drawing one.
# aspect -- Do aspect correction, if your output method doesn't support scaling this can slow things down!.
# scaler -- Scaler used to enlarge/enhance low resolution modes.
# Supported are none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x,
# 2xsai,super2xsai,supereagle,advinterp2x,advinterp3x,
# tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3x.
# If forced is appended (like scaler=hq2x forced), the scaler will be used
# even if the result might not be desired.

frameskip=0
aspect=false
scaler=normal2x

[cpu]
# core -- CPU Core used in emulation: normal,simple,dynamic,auto.
# auto switches from normal to dynamic if appropriate.
# cycles -- Amount of instructions DOSBox tries to emulate each millisecond.
# Setting this value too high results in sound dropouts and lags.
# You can also let DOSBox guess the correct value by setting it to max.
# The default setting (auto) switches to max if appropriate.
# cycleup -- Amount of cycles to increase/decrease with keycombo.
# cycledown Setting it lower than 100 will be a percentage.

core=auto
cycles=6500
這裡和dosbox的速度有關,你可以自己調看看,或是照預設值也行,我是給它調到6500,這個值越高遊戲模擬的速度也越流暢,不過相對地也耗電腦的資源,所以調太高未必有用。
另外,除了這裡的設定外,也可以搭配 Ctrl+F11 及 Ctrl+F12 在執行dosbox時直接做設定。Ctrl+F11是降低cycle值,而 Ctrl+F12 則是提升cycle值,這二個數值降低或提升的幅度可由下面做設定。

cycleup=500
設定每次按 Ctrl+F12 所提升的cycle值,預設是500。

cycledown=20
設定每次按 Ctrl+F11 所下降的cycle值,預設是20。

※若以上關於cycle的東西你還是看不懂也沒關係,請直接照預設值即可,不必修改。你只要記得在執行dosbox來玩遊戲時,萬一不流暢的時候可以按 Ctrl+F12 來試試。

[mixer]
# nosound -- Enable silent mode, sound is still emulated though.
# rate -- Mixer sample rate, setting any devices higher than this will
# probably lower their sound quality.
# blocksize -- Mixer block size, larger blocks might help sound stuttering
# but sound will also be more lagged.
# prebuffer -- How many milliseconds of data to keep on top of the blocksize.

nosound=false
rate=22050
blocksize=2048
prebuffer=10

[midi]
# mpu401 -- Type of MPU-401 to emulate: none, uart or intelligent.
# device -- Device that will receive the MIDI data from MPU-401.
# This can be default,alsa,oss,win32,coreaudio,none.
# config -- Special configuration options for the device. In Windows put
# the id of the device you want to use. See README for details.

mpu401=intelligent
device=default
config=

[sblaster]
# sbtype -- Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16.
# sbbase,irq,dma,hdma -- The IO/IRQ/DMA/High DMA address of the soundblaster.
# mixer -- Allow the soundblaster mixer to modify the DOSBox mixer.
# oplmode -- Type of OPL emulation: auto,cms,opl2,dualopl2,opl3.
# On auto the mode is determined by sblaster type.
# All OPL modes are 'Adlib', except for CMS.
# oplrate -- Sample rate of OPL music emulation.

sbtype=sb16
sbbase=220
irq=5
設定音效卡的irq值,預設好像是7,不過若是執行遊戲時沒有音效的話,這裡改為5試試。

dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050

[gus]
# gus -- Enable the Gravis Ultrasound emulation.
# gusbase,irq1,irq2,dma1,dma2 -- The IO/IRQ/DMA addresses of the
# Gravis Ultrasound. (Same IRQ's and DMA's are OK.)
# gusrate -- Sample rate of Ultrasound emulation.
# ultradir -- Path to Ultrasound directory. In this directory
# there should be a MIDI directory that contains
# the patch files for GUS playback. Patch sets used
# with Timidity should work fine.

gus=true
gusrate=22050
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND

[speaker]
# pcspeaker -- Enable PC-Speaker emulation.
# pcrate -- Sample rate of the PC-Speaker sound generation.
# tandy -- Enable Tandy Sound System emulation (off,on,auto).
# For auto Tandysound emulation is present only if machine is set to tandy.
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
# disney -- Enable Disney Sound Source emulation. Covox Voice Master and Speech Thing compatible.

pcspeaker=true
pcrate=22050
tandy=auto
tandyrate=22050
disney=true

[joystick]
# joysticktype -- Type of joystick to emulate: auto (default), none,
# 2axis (supports two joysticks,
# 4axis (supports one joystick, first joystick used),
# 4axis_2 (supports one joystick, second joystick used),
# fcs (Thrustmaster), ch (CH Flightstick).
# none disables joystick emulation.
# auto chooses emulation depending on real joystick(s).
# timed -- enable timed intervals for axis. (false is old style behaviour).
# autofire -- continuously fires as long as you keep the button pressed.
# swap34 -- swap the 3rd and the 4th axis. can be useful for certain joysticks.
# buttonwrap -- enable button wrapping at the number of emulated buttons.

joysticktype=auto
timed=true
autofire=false
swap34=false
buttonwrap=true

[serial]
# serial1-4 -- set type of device connected to com port.
# Can be disabled, dummy, modem, nullmodem, directserial.
# Additional parameters must be in the same line in the form of
# parameter:value. Parameter for all types is irq.
# for directserial: realport (required), rxdelay (optional).
# for modem: listenport (optional).
# for nullmodem: server, rxdelay, txdelay, telnet, usedtr,
# transparent, port, inhsocket (all optional).
# Example: serial1=modem listenport:5000

serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled

[dos]
# xms -- Enable XMS support.
# ems -- Enable EMS support.
# umb -- Enable UMB support.
# keyboardlayout -- Language code of the keyboard layout (or none).

xms=true
ems=true
umb=true
keyboardlayout=none

[ipx]
# ipx -- Enable ipx over UDP/IP emulation.

ipx=false

[autoexec]
# Lines in this section will be run at startup.
請直接複製下面三行綠字加入
mount C C:\DOSBox-0.72\game
mount d h:\ -t cdrom
C:
在上面第二行裡,請將 h 改為你自己的光碟機代號

※以上即為dosbox.conf檔的內容

OK,現在我稍微講一下,當你執行dosbox後會出現一個類似dos的畫面,而且游標會停在C:\>的後面。現在我們只要記一個指令 cd 即可。請對照最上面的第二張圖,我們現在的位置如果切成windows來看的話,就是像那張圖那樣,在game這個資料夾裡面。假設我們要進到pal這個資料夾裡,在windows下只要點二下滑鼠即可,但在dos下,則要打 cd pal 才行,注意cd和pal中間有空一格哦。

cd這個指令就相當於點滑鼠一樣,以此類推,若我們要進入csc2000這資料夾的話,就是鍵入cd csc2000這樣。若是我們想回一頁的話,就打 cd..,這樣就能回上一層目錄了。如果上面這段話都看不懂也沒差,只要知道 cd+空一格+你放遊戲的資料夾名稱 就好。

進到遊戲資料夾後,國產遊戲大概都是輸入 play 就能玩了,國外則不一定,總之呢,先在windows裡開遊戲資料夾起來看一下,將裡面副檔名為 exe 或 bat 的檔案名稱記起來,然後在dosbox下輸入這些檔名看看是否能進入遊戲裡。

講了一堆,總之大概就是這樣啦,我想會dos的人應該在conf檔設定好後就會了,因為接下來面對的就是傳統的dos介面了,是吧 ^_^

--

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 dizzy03 的頭像
    dizzy03

    碎碎念

    dizzy03 發表在 痞客邦 留言(0) 人氣()