Posts Tagged ‘play’ Feed

(Not so) poorman’s Joystick

Tuesday, September 23rd, 2008 Chinese

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.

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.

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!

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

My cockpit controls.

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

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

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 Chinese
Sorry, but this post is not available in English.

最近遇到有一款遊戲,其簡體中文版比英文版賣得平得多,但是只能在簡體中文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:冰封王座》。

Publishing USB and Microcontroller stuff

Monday, April 21st, 2008 Chinese

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.

BYOW (Bring your own Wiimote)

Friday, February 22nd, 2008 Cantonese Chinese

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.

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.

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.

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!

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.

裸照與加密

Monday, February 4th, 2008 Chinese
Sorry, but this post is not available in English.

《星島日報》 “…警方再拘捕四男兩女,並在檢獲的電腦硬碟內,發現近千張裸照…”

風聲咁緊都唔做Encryption…

故事應該好似以下咁發展先有趣…

Day 1

「據消息指,被捕人士在其電腦採用了微軟Windows Vista附帶的BitLocker功能,將整個硬盤加密……警方尚未能証實其硬盤內藏有有關祼照……並要求微軟提供協助」

Day 3

「微軟派出專家為警方破解懷疑涉案電腦,成為破案關鍵,亦使警方可以落案起訴相關人等……」

Day 4

「微軟的破解行為引起行內極大恐防,對其BitLocker的保密性能有極大懷疑,相關的陰謀論亦在網上各大部落格流傳……」
(more…)