空门 的个人资料Gateway to nowhere照片日志列表更多 工具 帮助
2009/11/28

又画了一张

jenny      jenny.ps

     画得差也是有好处的,完全不像当事人——自然不用担心隐私问题。幸好我们生活在数字时代,画像都可以用图像处理技术美化。

2009/11/24

RamDisk 无敌啊

image 
RamDisk

image
Samsung SSD

image
Sandisk Extreme III SDHC

     看来还是在 RamDisk 上 Build 比较靠谱,为了这个升级 64 位系统也值得啊。

2009/11/23

音频设备低烧中

CIMG0676CIMG0679 
CIMG0677CIMG0675
CIMG0680
CIMG0682

      在网上看到有人拿医保的钱买了 Meizu M8,想起来自从我这么做了以后,医保卡里面还剩了些钱。于是我就把钱都取了出来,然后去逛鼎好。我这么一个意志不坚定的人,带着钱去逛鼎好,后果可想而知。我本来是去询问 EMU 0404 USB 的价格,结果遇到了 ECHO INDIGO IOX,一冲动就买了下来。结果还是有些遗憾,其实 IOX 的输入对我完全没用,应该买个 DJX,好歹有个 line-out 可以接耳放啥的。ECHO 至今没有退出 Windows 7 的驱动,Vista 版本的倒是能用,但是热插拔可能导致系统挂起(连蓝屏的机会都不给)。这并不是一个原生的 PCI-X 设备,而是用 PCI/PCI-X Bridge 桥接的,性能应该和 Indigo IO 完全一致(如果不是更差的话)。没有 Line-out,可以不用考虑耳放了,只是可惜了我的 AT-HA20

     当然,这玩意儿的音质还是很棒的,只要把 Audio Core Sample Rate 调到 44.1 kHz,就连 Windows Media 这种劣等的软件也能出靓声(当然一定得把该死的 Equalizer 关掉,不知道哪个脑残默认调了个压缩曲线)。音频器材发烧充分体现了矛盾律,以我的设备为例:当我使用 Meizu M8 和 ATH EC700Ti 的时候,音源不够好;当我使用 Indigo IOx 和 EC700Ti 的时候,耳机不够好……所以,不能带着现金去逛耳机店。

2009/11/22

新画的头像

sample 
特9上打的草稿

sketch2
星巴克修订稿

grayscale
灰度稿

chromatic
彩色稿

portrait
M8 联系人效果图

要开始画画了

     最近两个月一直在跟 Mozilla Firefox 搏斗,虽然乐趣多多,但实在是有些疲惫不堪了。长期敲打键盘实在是不健康,对于脊柱也不太好。虽说 Firefox 只是我的移动研究计划的一个热身运动,但是目前看来,如果不来个软着陆,很可能就是要来个硬着陆了。短期内是不可能进入写作状态的,所以《雨林》的创作计划也没办法恢复。最近又把 Lumix LX3 给卖了,不知道啥时候才能继续 Lone Tree 的拍摄。这么看来,只剩下画画这个选择了。正好我很久都没更新头像了——毕竟安装 Windows 7 Ultimate 以后我做的第一件事情就是安装 ArtRage 2.5。


插播一条广告:

    沉寂多年的 ArtRage 终于要出新版了!一定要第一时间买入。

Project Trotsky: NoScript & AdBlock+

image

     手机上 Firefox 面对的问题永远都是内存问题,恰好 Windows CE 版本中一个 bug 导致 Firefox 无法检测内存不足。因此在访问某些脚本很多的页面(例如 Gizmodo)时,Firefox 会导致系统内存不足,如果手快还能关掉 Firefox,慢一点就得拔电池了。我临时打了个补丁,用一个 Timer 定时检查系统可用物理内存,并设置了一个限额,临时解决了这个问题。当系统内存不足时,Firefox 会停止下载和渲染图片,并中止页面上的脚本,从而避免了系统异常。

     其实,多数内存不足都是脚本造成的,安装 NoScript 扩展就能阻止大多数脚本,顺便把广告也封杀了。AdBlock 对于节约内存的帮助似乎不大,但是能让页面干净很多,图片少了,浏览速度也会快不少。安装了 NoScript 扩展以后,已经可以正常浏览 Gizmodo 的页面了:

PrtScn20091122123437

2009/11/21

Project Trotsky: Fennec Beta 5

PrtScn20091121184520

      Project Trotsky 本是因 Fennec 而起,却走向了另一个方向。今天编译出一个 Fennec Beta 5,简单测试了一下。Beta 5 比之前的版本还是有很多进步的,但是对内存的消耗依然惊人。究其原因,还是因为 Fennec 为了追求触摸交互的可用性,需要不断地缩放,它独特的 Tile Cache Rendering 也需要额外的缓存。查了一下 Fennec Beta 5 的 Release Notes,流畅运行它需要 128M 的 RAM,也难怪 Windows Mobile 版本的 Fennec 沉寂了这么久。Meizu M8 0.9.38 只有 90M 的空闲 RAM,能提供给 Fennec 的不过 70M~80M,仅够塞它的牙缝。

      总体来说,Fennec 是一个优秀的移动浏览器,只是未免超前了一些。不过,考虑到 Fennec 的开发进度,等到 1.0 正式版发布,Windows Mobile 7 的手机也应该上市了。到时候 Meizu M8 兴许也有下一代了,我只希望内存能到 512M。

      想体验 Fennec 的可以去我的 Skydrive 获取编译所需的补丁和可执行代码(需要 7-zip 解压):

http://cid-30f50c1bf7f56351.skydrive.live.com/browse.aspx/Firefox-wince-3.6/Trotsky/Fennec-beta-5

· 电源键可以模拟鼠标双击,用于 tab to zoom
· 支持重力横屏,桌面按 M 键可以返回 Fennec
· 访问复杂页面会导致内存不足,可能需要拔电池

PrtScn20091121182454 PrtScn20091121182505

Project Trotsky: Reading RSS with Brief

portrait-feed portrait-read

landscape-read

landscape-feed

     Brief 是一个用于 RSS 阅读 Firefox 扩展,经过简单的定制,它已经能在 Firefox for M8 上面完美地运行了。Brief 的界面设计对 M8 非常友好,似乎作者考虑到了高 DPI 的移动设备,在 CSS 里面之需要调整几个字体和 padding 就可以适应 M8 的使用了。

     Brief 直接使用 Firefox 的 live bookmarks,很方便,但是却带来了另一个问题——Firefox 总是在启动时更新 live bookmarks,并且每十五分钟就更新一次。这些更新对我来说完全无用的,浪费流量不说,还会由于消耗 CPU 资源和内存——这些对于移动设备都是致命的。要解决这个问题还是很容易的,需要修订 components 目录下面的 nsLivemarkService.js 即可(清空 start 函数)。

    如果有需要可以使用我修订过的版本,但还是需要自己处理 nsLivemarkService.js 和 brief-custom-style.css:

     http://cid-30f50c1bf7f56351.skydrive.live.com/browse.aspx/Firefox-wince-3.6/Trotsky/October%20Revolution/Extensions/Brief

2009/11/20

Project Trotsky: Cache and Memory

     说来惭愧,我在发布的 Firefox for M8 中错误地设置了 cache 参数。检讨一下,这是由于我参考了过时的网页,并且没有做实际调查和实验造成的。我错误地关闭了 Disk Cache,其实即使是 M8 内置的 NAND Device 上,也有足够的空间。其实 Memory Cache 基本上是多余的,在存在 Disk Cache 时只有安全的网页才会被写到 Memory Cache,如果开启 disk_cache_ssl 选项(考虑到手机是私人设备,安全风险并不大),Memory Cache 的利用率很低。

about-config
目前我用的配置

      Namoroka 中提供一些有趣的特性,比如 about:memory 和 about:cache。使用 about:memory 可以看到内存使用情况,如下图所示:

memory-firstmemory-googlememory-final 
启动时内存、打开一个 Google 页面的内存、使用 Brief 后的内存

似乎只有 Memory in use 才是真正被使用的物理内存。总体来说,Firefox 对内存的胃口还是很大的。这也可能是 Jemalloc 总是倾向于获取和保留大块的地址空间,实际使用的物理内存并不多。而 Windows CE 6.0 的剩余内存也证实了这一点(顶栏由“移不动”显示)。使用 about:cache 则可以看到 Cache 的使用情况,不过 CE 版本似乎不能察看条目(会立刻导致非法操作):

about-cache-memory about-cache-disk
禁用 Disk Cache、启用 Disk Cache

M8 的 Disk 上有足够的存储空间,考虑到 Flash 的写入寿命,Cache 应该设置得很大,避免反复写入。

补充:Offline Cache Device 是离线浏览使用的,基本上可以忽略。Media.cache_size 是控制 flash 媒体的 cache,也可以忽略。

2009/11/18

M8 Killer Application: Mozilla Firefox

     这应该不算王婆卖瓜吧——毕竟 Firefox 是 Mozilla 开发的浏览器,而我只是个 weekend hacker 罢了。Google 说得也不错,如今桌面已经不再重要,只要有个浏览器就行了。不过,再好的浏览器,也需要一个好的操作系统才跑得起来。Windows CE 6.0 无疑是一个优秀的操作系统,足以支撑 Firefox 和 Webkit。至于 Opera 和 IE,恐怕已经被远远甩在了后面。

     常用 Google 应用:

 PrtScn20091116094913
PrtScn20091116094844

谷歌地图(桌面版)
PrtScn20091116091339
PrtScn20091116091245
Google Docs(桌面版)
PrtScn20091116090753
PrtScn20091116090732
Google Reader(iPhone版)
PrtScn20091116090445
PrtScn20091116090338
Google Mail(桌面版)

     水木社区(telnet by firebbs/web):

PrtScn20091117234356
PrtScn20091117234246
WWW 版本
PrtScn20091115200115
PrtScn20091115201037
telnet 版本

   RSS 阅读器(powered by brief):

PrtScn20091117165454
PrtScn20091117174932
PrtScn20091117170040

   交通流量:

PrtScn20091118221502 
PrtScn20091118221559

   移动办公:

PrtScn20091118222829 
PrtScn20091118222955
PrtScn20091118223048

   导致内存不足的网站:

PrtScn20091117141539

    Google Wave 桌面版还不能正常使用,不过能加载已经算是奇迹了。如果 Google 推出移动版本的 Wave,Firefox 肯定能游刃有余。此外,Google Mail 也是个内存杀手,可能是集成的 Google Talk 给闹的。

2009/11/15

Project Trotsky: Firefox + FireBBS

PrtScn20091115200115

PrtScn20091115201037 

PrtScn20091115200815 

    Windows CE 6.0 非常强大,对 ttf 格式的字体支持非常好,只需要把字体拷贝到 Windows\Font 目录,就可以在 ucweb/firefox 等 CE 软件中正常使用了。配合一个改版的 FireBBS,我已经可以用 Firefox 作为终端模拟器登录 BBS 了。目前还不能解决发文等问题,但是已经可以正常访问水木了。有了这玩意儿,谁还会想念 N’Term 2008 这种古董呢。

2009/11/14

Project Trotsky: Permenant Refactoring

     跑了一下 Sun Spider,居然已经能进 50s 了:

PrtScn20091114003005
Namoroka 3.6 Beta 2

    使用 Windows Mobile 模式编译的代码支持屏幕动态旋转:

PrtScn20091113184544

PrtScn20091113184600 

      期待 Namoroka 正式发布,取代陈旧的 gecko 1.9.1。

2009/11/8

Project Trotsky: Fire Gestures

Download:

http://cid-30f50c1bf7f56351.skydrive.live.com/browse.aspx/Firefox-wince-3.6/Trotsky/October%20Revolution/Gesture

1. delete grab and drag
	at defaults\profile\extensions\{477c4c36-24eb-11da-94d4-00e08161165f}

2. delete old profile
	at \Documents and Settings\default\Mozilla\Firefox

3. start firefox and wait

4. enable/disable the gesture by ir sensor (above three speaker holes)
5. related pref settings (hack pref.js or visit about:config):
user_pref("extensions.firegestures.keypressgesture", false);
user_pref("extensions.firegestures.mousetrail", false);
user_pref("extensions.firegestures.trigger_button", 0);
user_pref("extensions.firegestures.wheelgesture", false);
user_pref("extensions.trotsky.feature.ir_gesture", true);
user_pref("extensions.trotsky.sensor.ir", true);

使用说明:


        一、删除安装的 Trotsky 捆绑的插件

        \Disk\Programs\Trotsky\defaults\profile\extensions

        二、删除 Firefox Profile

        \Documents and Settings\default\Mozilla\Firefox

        三、安装 Patch (cab),用 7zip 的自便

        四、启动 Firefox 并等待很久

        五、必须使用红外传感器关闭手势,关闭时会震动
            这个设计并不友好,但是能工作

            相关的 pref setting:

user_pref("extensions.firegestures.keypressgesture", false);
user_pref("extensions.firegestures.mousetrail", false);
user_pref("extensions.firegestures.trigger_button", 0);
user_pref("extensions.firegestures.wheelgesture", false);
user_pref("extensions.trotsky.feature.ir_gesture", true);
user_pref("extensions.trotsky.sensor.ir", true);

            熟悉 firefox 的可以直接 hack,否则 about:config

        六、如果 profile 重建,一定要检查 mouse trail,这个影响复杂手势

 

PrtScn20091108123708[1]

2009/11/7

7-zip rocks

image

    重复或者类似文件太多的时候,7-zip 的压缩率太恐怖了。

Project Trotsky: 十月革命纪念版正式发布

revolution
在 Trotskyist 目录下可以找到这份墙纸

     十月革命早已被背叛,被人遗忘。但是这丝毫不能改变这一事件在人类历史中的意义,更不用说对中国人的意义了。当然,对于大多数 Meizu M8 的用户,这一天仅仅是 Mozilla Firefox for M8 正式发布的日子:

下载地址:压缩文件(需要 7-zip),安装文件

Project Trotsky: Announcing October Revolution edition

DISCLAIMER

Mozilla owns Firefox, and nullgate is just a hacker who make it available on Meizu M8.

This software and patch is AS IS, NO SUPPORT, NO WARRANTY, NO BLAH BLAH

This is a private build, so don’t re-distribute the binary without permission from Mozilla.

Build information:

Source Repository

https://hg.mozilla.org/releases/mozilla-1.9.2/fie/dfce9796b38f

Source Patch

nullgate’s private patch for Meizu M8

Compiler

Visual Studio 2008 Pro SP1

SDK

Meizu M8 SDK 0.9.26

System

Vista Business on HP 2710p

Languages

zh-CN, zh-TW, en-US, de, ru

Release notes:

    • jemalloc enabled on customized CE 6.0 SDK (thanks to )
    • menu trimmed (thanks to tgfbeta@newsmth.net)
    • userChrome.css changed (thanks to sly9@newsmth.net)
    • mouse/keyboard emulation by M8’s power-button (thanks to AntiMars@newsmth.net)
    • M8’s SIP supported, allowing to change to large keyboard (thanks to we-hjb@cnblogs.com)
    • M8’s File Browser supported for choosing File and Directory
    • M8’s auto-dialup supported
    • landscape mode supported
    • acceleration sensor used
    • foreground window manipulation
    • does not allow multiple instance of browsers
    • flashlite is supported, but not bundled
    • gles acceleration not available

Know issues:

    • Security components corrupted from time to time (delete profile or delete cert9.db)
    • Profile corrupted occasionly (wait for initialization)
    • Cannot respond to M8’s Task manager (run browser again to bring it to top)
    • All other issue inherited from Namoroka 3.6b2pre

Downloading (both 7z and cab available, download cab if you don’t have 7-zip installed):

http://cid-30f50c1bf7f56351.skydrive.live.com/browse.aspx/Firefox-wince-3.6/Trotsky/October%20Revolution

User Manual:

N/A

2009/11/6

Project Trotsky: Last Issue Solved?

    Since the first day that I’m hacking fennec, this problem is bothering me:

PrtScn20091106214109

http://kb.mozillazine.org/Could_not_initialize_the_browser_security_component

https://bugzilla.mozilla.org/show_bug.cgi?id=469856

http://hg.mozilla.org/mozilla-central/rev/23c2660edce2

    After the patch, I found no problems that if I visited the Google and logged in (establish ssl connection) and visit some pages for the first session. Maybe it’s the patch, or maybe it’s the google thing, or both. Anyway, there is a workaround, and I found no major issues preventing me from releasing firefox for M8.

    The October Revoultion is coming!

BTW: If the problem is still there, try to delete one or two .db files in the profile:

PrtScn20091106214201

Delete cert9.db (maybe key4.db too?)

Project Trotsky: Say NO to Flash


flashlite

     Firefox for Windows CE 支持 ActiveX 和 Flash。但是 Flash 是邪恶的,是对开放网络的一种私有化。正因为如此,我将不会在我自己维护的版本中提供 Flash。事实上,我已经发布过支持 Flash 的 Namoroka Beta 了。而且我公开了所有的 Patch,有需要的人完全可以自己编译一个。

BTW:这个版本的插件有个毛病,一个页面只能显示一个 Flash。不过我本来就不喜欢 Flash,因此不会去研究缘由了。

Project Trotsky: Ready to Ship

     Since Mozilla is merging trunk code into namoroka, I won’t update source code before release to avoid problem. Only three new features have been added into Trotsky version:

1. Bring old browser window to the foreground when user trys to start new browser (also a shake notification)

2. Since I don’t know how to respond to M8’s task manager, Powerbutton-click will be used to activate window (user must hold the phone upside-down).

3. Powerbutton-hold will be used to toggle SIP (user must hold the phone upside-down).

 

l10n-de 
l10n-de has been fixed

SIP-toggle

输入法切换可能只对中文 A4 用户有用,A4 无法输入英文密码
(颠倒手机,长按电源键,有震动提示)

2009/11/5

Project Trotsky: Service Pack 1

http://cid-30f50c1bf7f56351.skydrive.live.com/self.aspx/Firefox-wince-3.6/Trotsky/RC1/Binary/Trotsky.RC1.SP1.cab

跟安装包的语言无关
Language Neutral

Right-Click

Press powerkey quickly to simulate right click, hold powerkey to simulate escape (close dialogs)
短按电源按钮模拟鼠标右键,长按模拟 Escape 键用于关闭对话框

Resize-After Resize-Before 

Double Click Powerkey to resize foreground window
双击电源按钮将窗口最大化(很危险)

4th-intl revolution TROTSKY

Trotskyist Wallpaper included
夹带私货