Posts Tagged ‘play’ Feed

滑雪和溜冰|Ski & Skate

Thursday, March 26th, 2009
Indoor Ski Center - YinQiXing

Indoor Ski Center - YinQiXing

Since when we started found use for our gym benefits. There is a skating rink nearby as well as an indoor skiing center. It’s just ~50 RMB to skate for 2 hours, and 100 RMB to ski for 2 hours, all equipment (and clothes for skiing) rental included!

Now I know how to ski and skate, not that I could do fancy sharp braking, or spin on the ice, or jumping over a slope…but at least now I can ski and skate just like how I do bicycle – without the need of continous mental attention.

Though the ski center here can only be compared to a short green line of a outdoor skiing center…but I think I am ready for enjoying blue line!

只某日起突然找到花光健身福利的方法。附近就有一個溜冰場和室內滑雪場。溜冰每兩小時才50RMB,滑兩小時雪也只是100RMB左右,當中包括所有器材(滑雪的連滑雪衣),真是超值。

現在我終於可以自在地溜冰和滑雪……我不是指可以做到花巧的急剎車,或者沿地自轉,又或者跳過雪坡而不倒,但至少已經能像騎單車一樣-不需要花精神集中精力去控制也能做到。

比起之前滑雪的情況(1, 2)……當然是天壤之別啦。下次到戶外滑雪場,應該有能力挑戰藍色線了!

(不太)窮人版Joystick|(Not so) poorman’s Joystick

Tuesday, September 23rd, 2008

一直對玩Flight simulator略有興趣,但沒有Joystick實在是難度加倍,尤其是噴射機,用Keyboard實在很準確控制發動機的輸出,很容易就超速或失速,但用mouse的話就很費時間,沒有Autopilot靠keyboard著陸就真的是難過登天。

I like playing flight simulator, although never ever invested a whole lot of time into it. Anyway, playing without joystick is hard, real hard.

Especially with Jet, it’s very difficult to control the engine output precisely with the F1-F4 key, and easily end up with overspeed or underspeed or even stalling if not paying enough attention, but using mouse would be a real waste of time. Landing a Jet with keyboard without Autopilot? It’s barely manageable.

始終玩flight sim都只是三分鐘熱度,所以不想花費一分錢去買一個joystick。

Though I know in the next few weeks I will be playing another game again, I don’t want to spend a buck on joystick.

但辦法還是有的,嘿嘿。我身邊可用的輸入硬件就是比較多的說……

But there is solution…ha, after all i got quite a number of human-interface devices around me.

GlovepiePPJoy,我將我的MIDI keyboard和Wiimote nunchuk的訊號轉換成虛擬Joystick輸入,經過一番功夫配好flightsim內的控制設定後,窮人版Joystick就真正出爐!唯一電台調頻和Autopilot的設定還是需要Mouse代勞,就Control Surface和Engine Control而然,正式可以跟Keyboard講bye bye。

By using Glovepie and PPJoy, I converted my MIDI keyboard and Wiimote nunchuk signal into a virtual joystick. With some fine tuning in the FS’s input settings, finally here is the poorman’s joystick! Only downside is that radio tuning and autopilot settings still require the use of mouse, but for control surface and engine control, I could finally say goodbye with the keyboard!

對應的GlovePIE script: My FS GlovePIE Script。至於Keyboard上面,我把大部份控制項都對應到MIDI ControlChange event。

Here is the GlovePIE Script customized for my set. I mapped the MIDI Keyboard controls to MIDI ControlChange event.

這是我的駕駛艙控制台

My cockpit controls.

Autopilot面板,降落時要Disconnect autopilot方便多……

The autopilot panel, it’s far lot easier to disconnect autopilot while landing and flaring the plane…

發動機控制台、連擾流板和襟翼控制。TOGA按鈕在keyboard的左手邊。

The engine quadrant, completed with spoiler and flap control. The TOGA button is on the left hand side of the keyboard.

後話:以前一直不知道Elevator trim有啥用,用了Poorman’s Joystick控制第一次起飛就感覺到這個東西存在的必要……

後後話:我的系統是Windows Vista和Microsoft Flight Simulator X,以上配置運作無誤。

P.S. I never knew why in the world there is a elevator trim control…but when I take off with the poorman’s joystick for first time, I finally feel the immediate urge for having this control within finger reach.

P.P.S. I am running all these on Windows Vista with Microsoft Flight Simulator X SP2 without a single glitch.

除蟲:要麼就「回水」,要麼就給我動起來!|Debug: Give me what I have paid for!

Wednesday, August 6th, 2008

最近遇到有一款遊戲,其簡體中文版比英文版賣得平得多,但是只能在簡體中文Windows下跑,用意大概是只讓大陸的用戶才能用這個平價版吧。天呀,誰說大陸用戶必然是用簡體中文的Windows?

坊間的確有流傳著一些破解和後門,但有些好的方法在Vista下不能用,有的就只能破一部分等等……為了通過較正當的手段(而不是用綠色版)而玩到這個遊戲,並在好奇心驅使下,就DIY了一把。

先前基本上從未用過Visual Studio以外的Debugger。一般有source code,只是debug一下Managed Code或C++的情況下,VS都能應付有餘。但看來今次「劫數難逃」,還是要認真的學會用WinDbg。

觀察現有的破解方法,以及在Error Message set breakpoint等手段,基本上鎖定遊戲是透過GetSystemDefaultUILanguage等API拿得相關系統安裝語言,還有0×0804 (簡中的Lang ID)是關鍵字之一。在反匯編碼搜一下,就找到相關的流程控制代碼。

本來還打算用DLL Injection/Hooking的方法,讓程式要Call GetSystemDefaultUILanguage的時候,不是Call System的而是Call我創建的替代Function。這方法用於簡單的測試程式上的確無問題,但因種種知名和不知名原因都未能成功應用在該遊戲上。

另一個我在測試用的方法是,在GetSystemDefaultUILanguage set Breakpoint,在返回的時候把返回值改成我想要的。

想起安裝WinDbg它有問我要不要裝SDK,就想起不如用SDK把這個手工方法自動化。一查Document之下發現除了有個SDK Dll之外,原來還提供了一個Managed Wrapper Dll。研究了一會,真的這很容易通個這個API做了一個Debugger程序出來。

經過幾翻修改後,最終成功騙過遊戲我是用簡體中文Windows,而且不需要修改任何程式檔案。

真想不到第一次認真用WinDbg竟然是因為這樣的緣故。話說回來,這個可惡的遊戲叫《魔獸爭霸3:冰封王座》。

發佈和USB相關與單片機的東東|Publishing USB and Microcontroller stuff

Monday, April 21st, 2008

Okay, publishing the work is always the hardest, especially for the first time for a particular project. Now I have Trac and Subversion setup (and BTW, I upgraded Wordpress to 2.5), publishing UsbAvrUsb, hColorLED and UsbHid.

With these software, with a Atmel USB AVR series controller (like AT90USB162) prototype board and some LEDs, you can then control these LEDs to be at any color on the computer, through the shinny USB interface.

Recently I have been involved in some LED side-project, and the whole story by itself should also be blogged…may be in another day.

發佈永遠都是最麻煩的一個動作,尤其是每個Project的第一次。如今我終於弄好Trac和Subversion(題外話:也把Wordpress升到2.5),一口氣發佈UsbAvrUsbColorLEDUsbHid

有了這三個東西,加上一個Atmel USB AVR系(如AT90USB162)的單片機和LED,就可以利用電腦,通過很好玩的USB來控制該組LED的顏色。

事源因為我近來捲入了一個LED小Project,故事本身也是一疋布的長……擇日再寫吧。

回鄉最緊要帶Wiimote|BYOW (Bring your own Wiimote)

Friday, February 22nd, 2008

新年長假,我跟眾多大陸民工一樣回「鄉」過年。長假活動當中梗係離唔開聚舊嘅環節,而多半都係打機打波打邊爐、唱K食飯同睇戲。

新年長假,我跟眾多大陸民工一樣回「鄉」過年。長假活動當中總離不開聚舊的環節,而多半都是玩電玩、打球、火鍋、K歌、吃飯和看電影。

Chinese new year, the mainland workers and I rush back to home before eve. Of course, meeting old friends is a must during the holiday, usually it involves games, badminton, hotpot, karaoke, dinner and movie.

以前未有咁多Friend有Wii,有時返去就會連部Wii都拎埋。而家好多人都有啦,但係大部份人都只係得兩Set Wiimote+Nunchuk。所以近排回鄉一定帶兩Set,先可以發揮出Wii的最大歡樂潛力。加上新出《Wii 大亂鬥X》,咁梗係要四個人玩先係最亂最爽。

以前大多數的朋友都未有添置Wii,有時回去就會將Wii打帶回去。現在很多人都有一台啦,但是大部份人都只得兩套 Wiimote+Nunchuk。所以最怎回鄉都一定帶兩套,這樣才可以發揮出Wii的最大歡樂潛力。加上最出推出的《Wii 大亂鬥X》,當然要四個人玩才會最亂最爽。

Some time ago most friends didn’t buy Wii yet, so I usually brought my own when I went back. Now it’s so common that almost everyone got one, but usually only with two sets of Wiimote+Nunchuk. And that’s why I usually bring two more sets, and then we could push the entertainment-ability of the Wii to the maximum.

其中有一日去銅鑼灣CEO唱K,原來而家每間房已經唔係配PS2 Winning Eleven而係配Wii Sport,咁啱嗰兩Set掣又有係身,四人Tennis即爽,哈。

當中有一天去了銅鑼灣CEO K歌,原來現在房間的標準配備已經是Wii Sport而不是PS2 Winning Eleven,正好Wiimote當日也有帶出來,四個人玩Tennis立即爽,哈。

One day we went to Neway CEO in Causeway Bay, surprised that the PS2 Winning Eleven has been replaced by Wii Sport. Coincidentally, I have the Wiimotes with me on that day, 4-People Tennis was so entertaining.

仲有《Mario & Sonic at the Olympic Games for Wii》,四個人玩四乘五十游泳,同時宣告「手都跛!」

還有《Mario & Sonic at the Olympic Games for Wii》,四個人玩四乘五十游泳,同時宣告「手快要斷啦!」

With the new game — Mario & Sonic at the Olympic Games for Wii, imagine when 4 people doing 4×50 swimming relay, and announcing the “Hands were broken” together!

十幾日就有三場用得著的地方,係回鄉行李當中,繼Laptop、銀包、鎖匙之外都算係用得最多嘅物品。

十數天就有三次派上用場,在回鄉行李當中,繼Laptop、電話、銀包、鎖匙之外都算是用得最多的物品。

It has been used in 3 occasions in ten few days, among the luggage, it is the most used item besides laptop, cell, wallet and keys.