2009年12月22日 星期二

Identity Verification Form

之前花了一筆錢申請 IDP 入會, 但是沒注意到我帳號的名字(自己習慣的英文名)跟付款用的名字(中文)不一樣, 結果 Apple 審核不過...

"We are unable to activate your iPhone Developer Program membership because we are unable to successfully verify your identity..."

並要求填 Identity Verification Form 給他們...熟門道的人都清楚 Apple 的一些部門在世界各地, 這人工作業可能是要等很很久也不一定(聽說有人等好幾個禮拜), 可我詢問信用銀行早已經請款了, 這到很快 :_

還好後續我沒遇到什麼麻煩, 我有把處理過程貼在 iphoneTW 討論區, 因為也有人也遇到相同身份驗證問題, 如下:

----------------------------------------------------------------------------
我昨天(指11/4/2009)剛申請 IDP 個人$99...今天收到 Active Code 但也是...要求我 Fax 一個 Identity Verification Form 算我沒察覺到. 因為

1. 直接使用原先的 apple id 裡面的 first/last 名字 我輸入的是 xxx xxx (我之前填自己的英文名, 但非護照上的譯音)

2. apple store 帶出來的是我以前在 itune 填入的信用卡名字 OOO (中文) 的資料, 我沒多加考慮 ..一直按下去

慘...也不知道他們那邊顯示我的名字是什麼, 不知道再耗到多久...
btw 剛打電話問, 信用卡公司問有沒有一筆 3200 扣了沒...答 "昨天扣了" 真厲害 :_

建議下次有新人要請, 請務必 apple id 裡的 / 跟信用卡都填相同名字, 看是不是比較順...

1. 2009/11/05 中午輸入 Active Code 結果 "We are unable to activate...", 我有在該網頁, 填 contact page 詢問關於 Identity Verification Form 的事

2009/11/05 下午 由 asia.dev@asia.apple.com 發 需要我寄在 Apple Store 的該筆 "screenshot of your Apple Order Status" 給他們, 並給我一個 Follow-up 號碼, 我寄了但後面幾天沒再回我. (我當時想亞洲是不是比較快, 就暫時不做 fax 動作)

2. 2009/11/06 收到 devenroll@apple.com 主動通知 Program Enrollment Update: Notarized ID Required ...(估計是美國發的)...再等看看亞洲是不是有處理此問題...

3. 2009/11/09 上午 想還是算了, 照正規 fax 那文件到美國好了. PDF 印出把我護照 copy 貼了上去 fax, 但我(因為公司事務機有 scanner 功能)還是順便 scan 成 jpeg 再 mail 給 11/06 內提及說有問題 mailto:devprograms@apple.com 地址, 內容說我已經 fax 並 mail scan 給你們

4. 2009/11/09 沒多久又收到新的 Follow-up 號碼來自 devprograms@apple.com ((我想是針對我剛剛發的信, 他們都會給追蹤碼)

5. 2009/11/10 凌晨(我已經睡了,美國人努力工作中...) devenroll@apple.com 發的說 information 不符問題已經 removed, 請用原啟動碼再試一次

6. 2009/11/10 早上再收到來自 devprograms@apple.com 針對2009/11/09 的 Follow-up 號碼說 IDP 啟動碼已經 ok 請再試一次, 有點擔心釋不是輸入又有新的問題, 輸入進入後, 已經回報成功加入 IDP 了 ^^

總結:
1.也許我不要等 asia.dev@asia.apple.com 直接把 IV Form 發 mail 給 devprograms@apple.com就好了? (也省 fax 錢)

2.看樣子 IDP 個人申請目前都很快了.

2009年11月19日 星期四

上實機了 iPhone 3GS ^^

下方是玩家控制黃棒, 上方是電腦控制青棒, 中間有一個 RGB 方塊會碰到邊界或棒子會反彈.

不過實際玩起來竟發現一件小插曲...

只有我以黃棒為主觀的控制. 也就是 iPhone 右翻時(螢幕面先水平朝天空, 再轉往朝右), 黃棒是向左移(有點像水平儀的泡泡一樣, 因傾斜浮起來), iPhone 左翻時, 黃棒向右移.

我一直覺得很習慣. 給朋友 Shark 看, 他開始玩時, 竟說我左右翻的操作做錯了方向了. 我說哪有!!

就給他老婆 Benjo 測, 也是拐了拐打不到球, 想一想, 他們應該是以方塊為主體, 方塊移右邊, 就隨他方向, 操作螢幕翻右邊, 反之方塊移左邊, 就操作螢幕翻左邊 . 或是以為黃棒是重物, 翻轉(傾斜)使他下沈...

回家不太相信只有自己是這樣, 給老婆試, 她也是也是那樣操作...所以很難打到方塊 Haha 心想如果這樣逆向當困難度的遊戲也不錯阿!

以前飛行模擬遊戲的搖桿也是有這樣的問題, 有的第一次接觸的玩家會把搖桿往上(前)移動, 以為飛機會往上飛, 但實際飛機是往下飛的, 所以遊戲裡常有做兩種操作方式的切換 (p.s. 真的飛機不會這樣做兩套吧)

2009年11月18日 星期三

C/C++ 函示指標的使用

這是我找到(已知)最好 C/C++ 函示指標使用的教學網站

The Function Pointer Tutorials

函示指標的技巧我滿愛用的, 但語法規則常常忘記, 每次修正好後, 一段時間之後再寫新的, 又報 compile 錯誤, 人老了, 寫 20 幾年的 C 了, 這個總是要再查一下他的範例寫法 :_

恩...需要找時間把這網站的資料下載一下免得他倒了.

How to Implement a Callback to a non-static C++ Member Function ?

單這個就打死 90% 的 C/C++ 程式設計師了吧 ^^

2009年11月11日 星期三

不止 Hello World


如果只是秀一個 Hello World 很遜, 上面畫面是我試寫的一個小 APP, 直接在我的 PC 上跑 XP 上跑 VMWare 上跑 iATKOS 上執行 XCode + iPhone SDK 上跑 iPhone 模擬器 (好繞 ^^).... 成功 PING PONG! (向 Atari 的第一支遊戲致敬, 1975 年 by Al Alcorn)

這 App 測試了幾個基本東西:
1. OpenGL 2D 精確畫圖
2. Touch 移動
3. 三軸加速感應

其實我有一台老 iBook G4 透過 "技巧" 也可以安裝 iPhone SDK (官方 iPhone SDK 只能在 Apple 的 i386 機器上安裝), 但在 PC 上開發對我來更能駕輕就熟阿!

這種開 VMware 模擬雙平台方式開發, 對我來說不是第一次, 以前作其他嵌入式系統也有這樣, 在 PC 上用熟悉的工具, 撰寫程式碼, 然後在 VMWare + Linux 或控制遠端機器讀取這些程式碼(共享)來編譯!

如果沒有從事跨平台程式的寫作人可能無法領會. 有機會碰到就知道了.

2009年11月3日 星期二

A detail steps to insatll iATKOS v7 in VMware Workstation v6.5.3

My PC is Intel Core2 6400 w/ 2GB RAM
I think the other H/W are not important for VMware because it always simulate them as generic devices

Host OS is Windows XP SP3 w/ last patches (11.1.2009)

as the MD5 for the ISO image of 'iATKOS v7 DVD 10.5.7.for Intel.AMD' I got is 6395be5253f53f716ed042db1dd599f3
don't need to burn it to a phsical DVD

Following are after my many test and also thanks to those forerunners provided their experiences in internet...


A) Setup a new virtual machine
=====================================================
1. What type of configuration do you want?
select 'Custom (advance)
click 'Next'
2. Hardware compatibility:
select 'Workstation 6.5'
click 'Next'
3. Install from:
select 'Installer disc image file'
browse or enter your iso path like
'D:\OSX86\iATKOS_v7.iso'
click 'Next'
4. Guest operating system:
select 'Other'
Version:
select 'FreeBSD 64-bit'
click 'Next'
5. Virtual machine name:
enter any name you like as my case
'iATKOS v7'
Location:
browse or enter a folder name which has enough
space as my
case
'E:\My Virtual Machines\iATKOS_v7'
click 'Next'
6. Numer of processors:
select any you like as my case
'One'
click 'Next'
7. Memory for this virtual machine:
pull to or enter '1024' MB or depand on you like
click 'Next'
8. Network connection:
select 'Use netwtok address translation'
click 'Next'
8. I/O adapter types:
select 'LSI Logic'
click 'Next'
9. Disk:
select 'Create a new virtual disk'
click 'Next'
10. Virtual disk type:
select 'SCSI'
click 'Next'
11. Maximun disk size:
enter any number > 8 G as my case '20' GB
select 'Store virtual disk as a signle file' or
any you like
click 'Next'
12. Disk File:
use default name or any you like
click 'Next'
13. in last Ready to create VM screen
select 'Power on this virtual machine after
creation'
click 'Finish'

B) Before MacOS install
=====================================================
1. when in Drawin/x86 booting...
click mouse on the booting screen to let vm has
input focuse
2. When see press any key bla bla...
press 'F8' key to enter the startup options
3. after boot: prompt
enter 'busratio=20'

NOTE: this is very important and tricky some said
need to add -v like
busratio=20 -v
or
busratio=20 cpus=1 -v
...
4. after wheeling
a) if it just reboot again
goto 3 try another options (sorry i can't help
you)
b) if it is lucky to see apple GUI dialog screen
click the button to continue
5. in iATKOS v7 welcome screen
click 'Continue'
6. in license aggrement screen
click 'Agree'
7. in select a destination screen
you need to create a partition first
in the top menu click 'Utilities' -> select 'Disk
Utility'
-----------------------------------------------------
8. in the left list select '20 GB VMware...'
in the right multi-tabs click 'Partition' tab
9. in the Partition group
Volumn Scheme:
select '1 Partition' or other you like
Name:
any name you like
Format:
select 'Mac OS extended (journaled)'
'Install Mac 9 Disk Drivers' is selected in my
case
click 'Option...' button below
10. in Chose a partition scheme bla bla...
select 'Master Boot Record'
NOTE: the default scheme will cause later
installation failure
click 'OK' to close this window
11. now click 'Apply' button below
12. in Partition Disk dialog
Are you sure bla bla...
click 'Partition' botton!
13. if in the left list below '20 GB VMware...' has
new hardisk(s) appeared
close this window
-----------------------------------------------------
14. it should has a hardisk icon appeared
select it
click 'Continue'
15. click 'customize' will pop a new window
16. select 'Restore Defaults' button first
beside the default options, add following to
be selected
'X86 Patches'->'Kernel'->'9.5.0 Kernel voodoo'
NOTE: otherwise you will get endless
reboot after step C.2
'Drivers'->'PS/2 mouse/keyboard'->Voodoo PS/2
driver
NOTE: otherwise MacOS can't identify the
keyboard/mouse after startup
and other options if you know what them are
'Drivers'->'NTFS-3G'
NOTE: 1. so you can WRTIE the USB or
removable drive w/ NTFS format
2. may cause undeleted files
(.DS_Store .Trashes ..) in drive
'Langusages'->any you like
press 'done' to close the window
17. click 'Install'
18. you can skip the installation DVD checking
19. see a blue progress bar going and wait wait wait

C) After MacOS install
=====================================================
1. when finished and after first reboot you see a
green cameleon in the top below an apple and a
blue bar is counting down to startup and said
'Press any key to enter startup options...'
do it!
2. it will stop couting down
press any key (but not 'Enter' key) to enter the
options 'busratio=20' again
or
busratio=20 cpus=1 -v
or
busratio=20 -f -v
...
then press 'Enter' key
3. after wheeling
a) if it just reboot again
goto step C.2 try other options (sorry i can't
help you)
or
reinstall from A.1 and pick another options in
step B.16
b) if it is lucky to see apple GUI dialog screen
click the button to continue
5. just by the instructrions to setup your user
account

D) After MacOS setup
=====================================================
1. After you setup your user account
2. find Terminal.app ins
Finder->Applications->Utilities
3. open up terminal and type
'sudo nano /Library/Preferences/SystemConfigurati
on/com.apple.Boot.plist'
then enter your password
4. where it says
Kernel Flags

put busratio=20 between the and
like this 'busratio=20'
then save the file by Ctrl-O
so you can skip C.2 when next reboot
NOTE: some times it still freezed in cameleon
counting down screen then just repeat
the trick as step C.2 or reset VM
MEMO: 1. it is recommanded to use vmware
suspend function when close vmware ^^
2. maybe need to install other 'X86
Patches'?
close Terminal.app
5. find System Preferences.app in
Finder->Applications->System Preferences
adjust the machine sleep setting
Hardware / Energy Saver
'Put the computer to sleep bla bla...'
->Never
'Put the display to sleep bla bla...'
->Never
to avoid dead sleep after long time idle
6. all is done
now you can examine the MacOS as u wish...

NOTE: it seems no sound for Voodoo HDA driver was
failed but multimedia is not my purpose so
I don't care of it

2009年1月8日 星期四

程式除錯 - 掃除地雷

程式除錯前, 必須先瞭解常犯的錯誤

...(待完成)

1. stack over run

...(待完成)

2. read invalid address

...(待完成)

3. write invalid address

...(待完成)

混合 C 與 C++ 程式碼的技巧

混合 C 與 C++ 程式碼的技巧

常常有些人問我這個問題, 我想原本專案就是用 C++ 寫的比較沒此困擾, 想加入一個已經寫好的 C 程式碼

...(待完成)

參考文章:
http://developers.sun.com/solaris/articles/mixing.html