05/13/2008

Touchscreen works!

A reader of this blog, Rebecca, who worked really hard to port Android on to her C760 found out what the touchscreen issue was and sent me a patch for corgi_ts.c! Thank you very much, Rebecca! Following is a part of mail and patch.
I wrote an applet to detect touch events, and found that the Dalvik VM only received "move" events. There was no action of touch pen up detected. So I modified the corgi-ts driver and added codes in function "ts_interrupt_main()".

@@ -215,6 +220,10 @@
/* Enable Falling Edge */
set_irq_type(corgi_ts->irq_gpio, IRQT_FALLING);
corgi_ts->pendown = 0;
+ /* 2008(R) */
+ input_report_key(corgi_ts->input, BTN_TOUCH, corgi_ts->pendown);
+ input_sync(corgi_ts->input);

This patch works on my C3000, too. Now touchscreen works all the time. Fortunately, I don't need much calibrations for now.

It seems Android wants to know not only pressure becomes zero but also pendown becomes zero. Only two lines but very precious lines.

Again, thank you very much, Rebecca! Your contribution is just great!
posted by 安藤恐竜 at 17:40 | Comment(13) | TrackBack(1) | 日記

05/05/2008

Kubench - 3D benchmark application

Kubench is a sample application to measure 3D performance of Android. Download the following file and unpack, then copy bin/Kubench.apk to data/app in android-root, as usual.

o Kubench.tar.gz

After launching Kubench from Home, rotating cube will be shown. By pressing any key, frame rate will be displayed on the window title.

My C3000 runs at around 20fps. The emulator running on ThinkPad X61 (Core2Duo 2.2GHz, Windows Vista) gives me around 22fps. My Linux PC (Athlon 3500+, Ubuntu) shows only 4fps somehow. I haven't resolve this Linux issue yet.

Frame rate is calculated by counting frames drawn in every 3 seconds. It would be not correct way to measure 3D performance, strictly saying. But I guess it would be sufficient practically.

I'd like to write some background of Kubench.

A few weeks ago, Google Japan hold a developer meeting called Android Hackathon. I was luckily able to attend it and had a very interesting discussion with people there.

One of the themes was benchmarking. Once Android handsets go on to the market, performance may very by handset. Some application developers, like 3D game software, worry about how performance could be guranteed for each handset. Too many handsets to be tested. It will be another nightmare for application developers.

Benchmarking may be a solution. Like a Windows Experience score on Vista.

Possible benchmarking item would be;
o Floating point calculation
o 2D
o 3D
o Network throughput
o SQLite
o File I/O

At Android Hackathon, I tried to modify Kube in Api Demo to measure 3D framerate, but I couldn't finish on that day. Today is a holiday in Japan and I try again to implement it.

Cheers,
posted by 安藤恐竜 at 18:16 | Comment(9) | TrackBack(0) | 日記

広告


この広告は60日以上更新がないブログに表示がされております。

以下のいずれかの方法で非表示にすることが可能です。

・記事の投稿、編集をおこなう
・マイブログの【設定】 > 【広告設定】 より、「60日間更新が無い場合」 の 「広告を表示しない」にチェックを入れて保存する。


×

この広告は90日以上新しい記事の投稿がないブログに表示されております。