2009年4月13日 星期一

NK.BIN boot process

NK.BIN 開機流程

During the kernel boot process, the following calls are made in the order shown:

StartUp() db1200\kernel\hal\startup.s

KernelStart() / KernelInitialize() PRIVATE\WINCEOS\COREOS\NK\KERNEL\MIPS\startup.s

OEMInitDebugSerial()

OEMInit()

KernelInit()

HeapInit()

InitMemoryPool()

ProcInit()

SchedInit()

FirstSchedule()

SystemStartupFunc()

IOCTL_HAL_POSTINIT


Build Au1200 WINCE Image

1. 裝RMI Au1200 BSP 1.51


1. 修改 kernel\hal\init.c 中
oeminit() 把 bclk 關掉 不然 High speed USB 會有問題

2. Hang after -OEMInit

Memory Map 可能需要調整
in C:\WINCE500\PLATFORM\Db1200\Files\config.bib

NK 86100000 01F00000 RAMIMAGE
RAM 81B00000 04600000 RAM

2009年4月12日 星期日

2009年4月9日 星期四

PSP 的音樂探險

PSP 的音樂公用程式為 SonicStage 目前版本為 4.3 可至Sony官方網站下載。
PSP 可播放 MP3 、WMA(要透過網路啟動此功能)、AAC(m4a mp4, 在2.7 版開始支援)、還有Sony 的獨家 ATRAC3。

要用ATRAC3的話 光是只把轉換過後的丟到PSP資料夾裏是不行的
(後來發現簡單的方法 把附檔名.OMA 改成 .AA3丟掉 Music資料夾就行了)
要讓SonicStage 來輕鬆地幫我們做這件事... (同時也把保護的機制加了進去)
傳輸方法有兩種
1. 標準模式
也就是用ATRAC3 plus 的格式 最高可達352Kbps 但是會加入保護機制(OpenMG)。
而OpenMG 好像要跟有 MagicGate 功能的 Memory Stick 卡在一起運作。
2. ATRAC3 模式
相容於舊的Sony ATRAC3 Player 的模式 使用 ATRAC3 但最高只有132Kbps。

ATRAC3檔案的原始副檔名為「aa3」,若經過OpenMG進行版權保護加密後,則會變成「omg」或「oma」。

SonicStage 也支援無損壓縮 ATRAC Advanced Lossless (但PSP不支援播放)
(硬體方面,SONY至2006年10月發表之NW-S700F、NW-S600才完全支援AAL。 ) -- from wikipedia

Visual Studio 2008 PDB

發現一件奇怪的事
在Visual Studio 2008 中
Create 一個 Smart Device 的Project
其產生的 PDB 檔為 vc80.pdb (?)

然而 把另一個Project 從 VS2005 轉成 VS2008
其產生的 PDB 檔為 vc90.pdb

在VS2008下 Windows 的Project
是正常的 vc90.pdb

是Linker path 不對嗎(呼叫到 VS2005的Linker?因為我 VS2005 VS2008 2種都有裝)
有做過實驗 其呼叫的Linker是 9.0版本的
有人知道答案嗎?

2009年4月8日 星期三

Hex Workshop

Hex Workshop 6.01 不能Right Click Load 桌面上的檔案
應該是不支援中文 "桌面" 這2個字 Cause Problem

在 Visual Studio 中 編譯 .s (Assembly)檔

要使用 mipsasm 而非 ml

mipsasm.exe 在 \VC\ce\bin\x86_mips 下


The MIPS edition of Visual C++ includes a stand-alone assembler.
The assembler does not have all of the restrictions that inline assembly does; in particular, using the stand-alone assembler is the only way to create functions written only in assembly code.
However, in some respects the stand-alone assembler is less convenient, because you cannot refer as easily to objects in C and C++ source code.
MIPS stand-alone assembler driver is Mipsasm.exe. Mipsasm recognizes assembly language source files that end with .asm or .s file extensions.
The following code example shows how to assemble and link prog.asm into an executable in one step from the command line.
mipsasm -DMIPS -QMmips2 prog.asm /link /entry:mainACRTStartup
/subsystem:windowsce /nodefaultlib corelibc.lib coredll.lib
The next code example shows how to assemble an assembly language source file into an object file without linking, using the "-c" assembler switch.
mipsasm -DMIPS -QMmips2 -c prog.asm
To see more assembler options, type the following at the command line:
mipsasm /?

奇怪的是
#include ok (有default include directory?)
#include failed