在新的X server開啟wine遊戲

在25期的Full Circle雜誌有提到在第二個X server玩wine模擬的遊戲可以得到比較流暢的執行速度。方法為

一、設定允許開啟另一個X伺服器(Ubuntu預設是用戶不能開啟):

sudo gedit /etc/X11/Xwrapper.config (man Xwrapper.config察看相關資訊)

將"allowed_users=console"改成"allowed_users=anybody"

儲存然後離開

二、寫shell Script將執行自動化:

FIFA08遊戲範例:
####################################################################

#!/bin/bash
X :2 -ac -terminate & nvidia-settings --load-config-only & sleep 2
DISPLAY=:2 nice -20 env WINEPREFIX="/home/vinci/.wine" WINEDEBUG=-all wine "C:\Program Files\EA Sports\FIFA 08\FIFA08.exe"

####################################################################
1.終端機執行X -help 可查詢相關參數

解決wine模擬FIFA遊戲的手把問題

由於wine可以在linux下面玩windows的遊戲,剛好FIFA所出的一系列足球遊戲可以執行,於是買了一支Logitech Dual Action的手把,想要好好來大幹一場。無耐linux就是linux
免費開源軟體背後的意義就是出了問題就要自己解決,就當作是提升實力的一種。
剛買來的手把,說是可以完美支援遊戲的,但是在linux下面就不是這麼一回事。插上電腦後在linux下面測試完全沒有問題,但是只要我玩FIFA遊戲,右邊的蘑菇頭就是沒有辦法使用。上網找了一堆資料,但是就是沒有人的問題像我一樣。後來我無意間發現了解決的方法(我也不知道為什麼會想到...)

我修改了遊戲安裝目錄裏面的\EA Sports\FIFA 08\deta\devdata.dat
這個文件,原來FIFA遊戲把我的羅技搖桿看成是預設的搖桿了。難怪我蘑菇頭怎麼推就是推不出特殊動作

於是我搜尋了Logitech Dual Action的字串,把裡面數字部份的按鍵設定複製起來
From 沒有標題的相簿


再來搜尋Default Pad並且取代原有的按鍵設定內容。
From 沒有標題的相簿


儲存後把devdate.dat的檔案複製到遊戲在我的文件下自動生出的FIFA 08資料夾裏面還有個user的資料夾

完成!
PS:不知道其他廠牌的搖桿能不能用這樣的方法...

####################################################################
附上數字代表的意義:
The line
DEADZONES=0.3,0.3,0.3
defines the sensibility of the gamepad and usually you can keep the default values without problems.

The blue stream is used for navigating the menu. The green stream is used for playing. The Red one I don’t know. There is not any reason to have them different, so you can replicate the same stream three times

Now let’s go to see the stream structure, they are triplets of numbers separated by commas. The numbers themselves are separated by vertical bars. The 2nd and 3rd number of each triplet identify a special function in the game as described in the following table.

Standard key Function 2nd and 3rd number
W Through Ball \GK Charge 0|2
D Shoot\Conservative tackle 1|2
S Pass\Switch Player 2|2
A Cross\Long pass\Sliding tackle 3|2
Escape Escape 8|2
5 numericpad Change mentality 9|2
Q Trigger run 10|2
Z Cancel\Dummy move 11|2
Unknown 12|2
E Sprint 13|2
C Pace control\Walk defense 14|2
Shift First touch 15|2

Arrows
Left joystick Movements 20|3
21|4
22|5
23|6

Shift Arrows
Right joystick First touch\free style movements 24|3
25|4
26|5
27|6

Numeric Pad
Digital pad Tactic selector 16|19
1720
18|21
19|22

The first number of each triplet is the “identifier” of a control on your gamepad. Changing the first number of a triplet you change the control assigned to a specific function.
Unfotunately the control “identifier” is not a standard and so the only way to proceed to try.

Let’s see an example
2|24|3, Assigns axes 2 and 5 to “first touch movements”

2|25|4,
5|26|5,
5|27|6,

1|22|5, Assigns axes 0 and 1 to “movements”
1|23|6,
0|20|3,
0|21|4,

0|18|21, Assigns pad 0 “Tactic selector”
0|19|22,
0|16|19,
0|17|20,

0|2|2, Assign key 0 to Pass\Switch Player
1|0|2, Assign key 1 to Through Ball \GK Charge
2|3|2, Assign key 2 to Cross\Long pass\Sliding tackle
3|1|2, Assign key 3 to Shoot\Conservative tackle
4|10|2, Assign key 4 to Trigger run
5|13|2, Assign key 5 to Sprint
6|11|2, Assign key 6 to Cancel\Dummy move
7|14|2, Assign key 7 to Pace control\Walk defense
9|8|2, Assign key 9 to Escape
8|9|2, Assign key 8 to Change mentality
10|12|2, Assign key 10 to Unknown
11|15|2 Assign key 11 to First touch

Cedega7.3 in Ubuntu9.04

直接安裝deb時會顯示缺少python2.4-dbus
但是源裡面卻沒有這套件,於是在ubuntu fourm

CD into the place that cedega is in and run:
$mkdir -p cedega_000133_all/DEBIAN
This will create an "all folder."
Then simply run all of these:
$ar p cedega_000133_all.deb data.tar.gz | tar zx -C cedega_000133_all/
$ar p cedega_000133_all.deb control.tar.gz | tar zx -C cedega_000133_all/DEBIAN/
$mv cedega_000133_all.deb cedega_000133_all.prerebuild.deb
$perl -pi -e 's/python2.4-dbus/python-dbus/' cedega_000133_all/DEBIAN/control
$dpkg-deb --build cedega_000133_all
$rm -rf cedega_000133_all
$sudo dpkg -i cedega_000133_all.deb

聚會成祭日

下午3點多,因颱風的影響,外邊下著雨。突然一陣鈴響驚醒了我,但話筒中的內容卻更令我震
驚。

我的胃突然變得很不舒服,腦中不斷地浮現出你以前的樣子,你的笑聲似乎還是剛剛才聽過。

其他同學聽聞你的惡耗也如同我一樣吃驚、瞬間整個人都呆掉。

詢問原因,才知道你最進出了車禍,但不完整的資訊卻令我更加妄想猜測,這使我更不舒服了。

國中畢業後到現在我們見面的次數卻屈指可數,以前沒有定下的約會更加使我懊悔不已。

腦中的回憶最鮮艷的竟然是5年前打籃球的邀約,以及你的過節問候簡訊。

還記得我們以前常常一群人聚在一起遊玩、還記得以前英語課幫你用注音標示念法、打籃球時的

神準令我們佩服、你自創搞笑的龍捲風保齡球姿勢曾經令我們捧腹大笑、你爽朗的笑聲猶言在

耳。

天啊!這麼開朗善良的一個人老天爺就這麼收走。我的好朋友,我還打算回去後要找你出來聚

聚,怎知演變成了我要匆忙回家只為了見你一面。26號星期五,見你面的時候我真不知道該用什

麼樣的心情了,也許我會沈默不語、也許我會暗自落淚或是嚎啕大哭。不管我怎麼表現,都無法

完整顯示出我心中的沉痛的與不捨。

你已經在我心中留下最美好的時刻,希望在天上你還可以把你的開朗傳染。

永別了,吾友。