2009年3月26日 星期四

安裝 IE8 會導致 Visual Studio 2005 2008 無法Create Smart Device Project

Fuxx, 裝完 IE8 會讓Visual Studio 2005 2008 無法 New Smart Device Project

(更新)
Microsoft 有ps 解決方法了
http://blogs.msdn.com/vcblog/archive/2009/03/28/some-vs2005-and-vs2008-wizards-pop-up-script-error.aspx


要修改registry, 摘要如下

Please follow the following steps:

- Open regedit (on a 64-bit OS, open the 32-bit regedit)

- Under “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\Zones”, create a new key called 1000 (if it isn't already there)

- Under 1000, create a DWORD entry with:

o Name = 1207

o Type = REG_DWORD

o Data = 0x000000

For the workaround to work on VS2005 however, the VS2005 SP1 (and VS2005 SP1 Update for Windows Vista) has to be installed.

2009年3月25日 星期三

WOW Rogue Thinking

1. Max DPS = Max General attack + Max Skill attack
2. Skill Damage = DPE * Energy Generated


Multitate
I. 避免3星毒化 (4 或 5星才毒化)
II. 100% 割裂 coverage
III. 毒化持續時間內用掉最多截肢

2009年3月18日 星期三

PAL NTSC 詳解和 Focus的設定












PAL 864x625x50Hz = 27,000,000
NTSC 858x525x59.94 ~= 27,000,000


PAL-M (a broadcast standard) however should not be confused with "PAL-60" (a video playback system )

跟PAL-M不一樣, PAL-60 是一種 Video Playback System 而不是一廣播標準
由上圖可知 PAL 的 chrominance subcarrier 為4.43MHz
( 正確值是 4.43361875 MHz ) (NTSC是3.579545 MHz)
在focus 453的 PAL register 設定
CHR_FREQ default 0xCB8A092A
27MHz x 0xCB8A092A / 2^32 = 4.4336187487933
得證


HNDP1 是在 Sync Pulse 的後面 ( Back porch )
HNDP2 是在 Active Area的後面 (H-pulse delay, Front Porch)

而VNDP剛好相反
VNDP1 在 Vertical Sync Pulse 前面, Active Area 的後面
VNDP2 在 Vertical Sync Pulse 後面

Back porch refers to the portion in each scan line of a video signal between the end (rising edge) of the horizontal sync pulse and the start of active video. It is used to restore the black level reference in analog video.

In television broadcasting, the front porch is a brief (about 1.5 microsecond) period inserted between the end of each transmitted line of picture and the leading edge of the next line sync pulse. Its purpose was to allow voltage levels to stabilise in older televisions, preventing interference between picture lines.


在 Focus 453, High Resolution 時 MISC register 的 UIM_DEC bit要設成1, 會先把horizontal line
prescale 一半。

要使用Downscaler 時, 注意 Bypass register CAC_Bypass 和 HDS_Bypass 要設定0

2009年3月11日 星期三

To do list

1. Compile GNASH (0.8.5) in Windows & Evaluate performance
2. Compile GNASH WINCE MIPS version.

2009年3月5日 星期四

查找 nk.bin 裡的檔案

viewbin -o nk.bin | findstr /i "elo".

2009年2月24日 星期二

.NET Compact Framework 程式效能檢查方法

很簡單 只要設定
[HKEY_LOCAL_MACHINE\Software\Microsoft\.NETCompactFramework\PerfMonitor]
"Counters"=dword:1

就好了

之後Run .NET Program 然後會在根目錄下產生 "AppName".stat 這個檔案
就可以分析了

設定的code

C#


// Call this method with True to 
// turn on the peformance counters,
// or with False to turn them off.
private void SetPerfCounters(bool perfOn)
{
// Specify values for setting the registry.
string userRoot = "HKEY_LOCAL_MACHINE";
string subkey = "SOFTWARE\\Microsoft\\.NETCompactFramework\\PerfMonitor";
string keyName = userRoot + "\\" + subkey;

int PCset;
if(perfOn == true)
PCset = 1;
else
PCset = 0;

// Set the the registry value.
try
{
Registry.SetValue(keyName, "Counters", PCset);
if(perfOn == true)
MessageBox.Show("Performance Counters On");
else
MessageBox.Show("Performance Counters Off");
}
catch(System.Exception ex)
{
MessageBox.Show(ex.Message);
}
}

WINCE Power Management

我做的專案 會在6分鐘之後 沒有聲音
經調查之後發現是Power Management 關掉聲音

詳細看了一下registry setting 及 Document 後
發現重點如下


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts]
; @CESYSGEN IF PM_PM_DEFAULT_PDD
"ACUserIdle"=dword:3c ; in seconds
"ACSystemIdle"=dword:12c ; in seconds
"ACSuspend"=dword:0 ; in seconds
"BattUserIdle"=dword:3c ; in seconds
"BattSystemIdle"=dword:b4 ; in seconds
"BattSuspend"=dword:12c ; in seconds


如上, 系統經過 ACUserIdle 秒數之後沒動作 會進入 UserIdle模式
如又經過 ACSystemIdle 秒數沒動作 會進入 SystemIdle

在機器上 就是經過 6分鐘 ( 0x3c + 0x12c 秒)之後關掉聲音


還有 WINCE 的Power Managment 有三種方式
只能選擇其一 以避免衝突

GWES, Power Manager, User Control

GWES 是 WinCE 4.1前所用的方式
所以要用 Power Manager 管理的話 必需把 GWES相關設定關掉
如下 ( Registry Default)

; Set GWES registry keys so that it's not fighting with the PM about
; when to suspend the system. Setting DisableGwesPowerOff to a non-
; zero value tells GWES to ignore the settings of the BattPowerOff,
; ExtPowerOff, and WakeupPowerOff values.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power]
"DisableGwesPowerOff"=dword:1

所以解法就是
在 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts] 下
"ACUserIdle"=dword:0


// Reset Timer
You can reset the system state transition timers by creating a named auto-reset event called _T("PowerManager/ReloadActivityTimeouts") and calling SetEvent on the handle of that event. This informs the Power Manager to read transition timer settings again from the Timeouts registry key.