蜗牛的壳

蜗牛的壳

me =~ s/nai/liu/m;

浏览模式: 标准 | 列表
2008年02月的文章

WD MBWE Hack: nethostfs


Here is HOWTO add nethostfs on Western Digital My Book World Edition. For Chinese version, visit here(中文版).

Prerequisite: Enable SSH on My Book.

Step 1. Download nethostfs v1.5 source code, unpack and compile.

bash
  1. wget http://www.snailium.net/mbwe/nethostfs15src.tar.gz
  2. tar -xzvf nethostfs15src.tar.gz
  3. cd nethostfs15src
  4. make
  5. cp nethostfs /usr/sbin
  6. chmod 755 /usr/sbin/nethostfs
  7. chown root:root /usr/sbin/nethostfs

Step 2. Create shared folder /PSP/ through My Book Storage Manager.

Step 3. Create service script nethostfs under /etc/init.d/.

/etc/init.d/nethostfs
  1. #!/bin/sh
  2. #
  3. # Starts or stops the nethostfs for remote PSP access.
  4.  
  5. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  6. NAME="nethostfs"
  7. DESC="Remote PSP access"
  8.  
  9. case "$1" in
  10.   start)
  11.         echo -n "Starting $DESC: $NAME"
  12.         nice -n 10 nethostfs /shares/internal/PSP &
  13.         echo "..."
  14.         ;;
  15.    stop)
  16.         echo -n "Stopping $DESC: $NAME"
  17.         killall nethostfs
  18.         echo "."
  19.         ;;
  20.    *)
  21.         N=/etc/init.d/$NAME
  22.         echo "Usage: $N {start|stop}" >&2
  23.         exit 2
  24. esac
  25.  
  26. exit 0
  27.  

Step 4. Make start/stop link under /etc/init.d/.

bash
  1. cd /etc/init.d/
  2. ln -s /etc/init.d/nethostfs S91nethostfs
  3. ln -s /etc/init.d/nethostfs K09nethostfs

Step 5. Reboot My Book World Edition


Note 1 - nice -n 10 is used in service script to adjust process priorities, in order to avoid nethostfs consumes too much CPU resource.
Note 2 - This works perfect for iRshell, as well as PPA (which uses iRshell's WiFi code)

WD MBWE 改造 — nethostfs


Western Digital My Book 所使用的 BusyBox 可塑性还是很高的。

想到正好在用 PPA 在 PSP 上通过 WiFi 看电影,干脆把 nethostfs 服务也集成到 My Book 里面好了。(English Version

前期准备:在 My Book 上加装 SSH 服务

第一步:按照下面的方法下载 nethostfs v1.5 源代码,解包,编译。

bash
  1. wget http://www.snailium.net/mbwe/nethostfs15src.tar.gz
  2. tar -xzvf nethostfs15src.tar.gz
  3. cd nethostfs15src
  4. make
  5. cp nethostfs /usr/sbin
  6. chmod 755 /usr/sbin/nethostfs
  7. chown root:root /usr/sbin/nethostfs

第二步:通过 My Book 共享储存管理器建立 PSP 共享文件夹。

第三步:在 /etc/init.d/ 下建立 nethostfs 服务脚本。

/etc/init.d/nethostfs
  1. #!/bin/sh
  2. #
  3. # Starts or stops the nethostfs for remote PSP access.
  4.  
  5. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  6. NAME="nethostfs"
  7. DESC="Remote PSP access"
  8.  
  9. case "$1" in
  10.   start)
  11.         echo -n "Starting $DESC: $NAME"
  12.         nice -n 10 nethostfs /shares/internal/PSP &
  13.         echo "..."
  14.         ;;
  15.    stop)
  16.         echo -n "Stopping $DESC: $NAME"
  17.         killall nethostfs
  18.         echo "."
  19.         ;;
  20.    *)
  21.         N=/etc/init.d/$NAME
  22.         echo "Usage: $N {start|stop}" >&2
  23.         exit 2
  24. esac
  25.  
  26. exit 0
  27.  

第四步:在 /etc/init.d/ 下建立相关启动/关闭服务链接。

bash
  1. cd /etc/init.d/
  2. ln -s /etc/init.d/nethostfs S91nethostfs
  3. ln -s /etc/init.d/nethostfs K09nethostfs

第五步:重启 My Book。


注意 1:在服务脚本中,使用了 nice -n 10 调整进程的优先级,防止 nethostfs 占用过多资源。
注意 2:此方法也适用于 iRshell。(PPA 的 WiFi 部分使用的是 iRshell 的源代码)

PS2游戏改造 Iteration 1


玩了很长时间的《无双·远吕智》(无双大蛇),对其中的 CG 和 BGM 已经厌烦了。最近无意间看到有恶搞的无双大蛇幸运星OP,干脆拿来集成一下。

说做就做。把网上下来的镜像挂上开始 dump 文件。

但是光荣也不是吃素的,打开光盘之后发现里面都是打包好的文件,分别是 LINKDATA.ANS、LINKDATA.BNS、LINKDATA.CNS 和 LINKDATA.DNS。又是无意间,发现专门为《战国无双2猛将传》准备的 CNS 解包工具。下载、解压缩、sm2m /cu 解开 CNS,获得一堆 .pss 文件(美版是10个,日版24个,多出来的都是无双系列前几部的宣传片)。这里要插一句,PSS 文件和 MPG 文件差不多,都是 MPEG2 的封装器,用 MPC 内置的 MPEG2 Splitter 可以分离观看。但是无双系列的 CG 音频都是压缩过的 ADPCM 格式,找解码器比较麻烦。但是无所谓,用下面讲到的 PSS Plex 可以转换成 WAV 音频。再回来说这10个 PSS 文件,都是片头片尾和各国结局 CG。其中比较小的几个是光荣的 Logo、ProLogic II Logo 和 w-force Logo。

确定了 PSS 之后,就要准备替换了。下面要介绍 PSS 分离/合成软件 PSS Plex。十分简单的小程序,带图形界面。拿到工具之后,当然要先分离一个 PSS 看一下参数。640x448 分辨率、MPEG2 编码、4500kbps 码流。确定好之后开始准备替换影片。

将下载好的 .flv 影片用 Procoder 压缩成 MPEG2 影片(m2v+wav)。具体怎么压缩在这里就不说了,毕竟 320x240 的 .flv 画质很不好,需要用很多滤镜才能保证画质清晰无色块。压缩完了之后,用 PSS Plex 合成 .pss 文件,注意要选上“Compress sound (ADPCM)”选项。然后将 008.pss(w-force Logo)替换掉。

在合成 LINKDATA.CNS 的时候需要注意,sm2m /cp 需要94个文件(000.pss - 093.pss),所以从 010.pss 开始,建立94个垃圾文件(用命令行更方便些)。然后再 sm2m /cp 合成 LINKDATA.CNS。

最后,拿出 CD/DVD Generator 2.0cdvd iml2iso,制作光盘镜像。《无双·远吕智》并不是用 LBA 寻址,所以文件的顺序无所谓,DUMMY.BIN 还是要加入的。记得先用 CD/DVD Generator 导出 .iml 文件,然后用 iml2iso 生成镜像。

最后的最后,当然就是刻盘啦。不过刻盘之前最好先用 PS2 模拟器模拟一下,确保 ISO 没有问题。

好啦,第一回合结束。过几天再研究一下其他的 CG。

注意:如果分离 PSS 之后发现有 .sub 文件(字幕?),那么说明这个文件暂时不能替换。因为 PSS Plex 的 bug,在合并 .sub 文件的时候会出现异常。而如果不加入 .sub 文件,运行游戏 100% 死机。


参考资料:
1. http://bbs.a9vg.com/read.php?tid=762507&fpage=1&toread=&page=1




« 2008年02月 »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

标签

用户


链接


归档


信息

  • 分类数量: 15
  • 文章数量: 307
  • 评论数量: 114
  • 标签数量: 556
  • 附件数量: 510
  • 引用数量: 0
  • 注册用户: 12
  • 今日访问: 109
  • 总访问量: 778608
  • 程序版本: 1.6


加拿大中文电话

  • CIBC
    1-888-298-8822
  • TD Canada Trust
    1-800-387-2828
  • HSBC
    1-888-310-4722
  • Scotia Bank
    1-800-830-8080
  • RBC Royal Bank
    1-888-769-2598
  • Rogers TV
    1-800-787-7953
    1-866-406-7239
  • Rogers Wireless
    1-800-828-9828
    or *2288
  • Fido
    1-866-888-3436
  • Bell Home Phone
    1-800-715-1888
  • Bell ExpressVu
    1-888-759-3474
  • UPS Delivery
    1-800-233-8133