honeylab's blog

各種ハードウェアの改造、主にファミコンミニなどをやってます(ました)

FUSO デジタルCo2/O2チェッカー CD-2IRを分解する

ちょっと業務で使う必要があったのでこいつを調達。

「FUSOデジタルCO2・O2チェッカーCD-2IR」

 ほんとはデジタル出力が出るものがほしかったんだけど、
1プローブでCo2,O2が測れてデジタル出力のあるものが見当たらなかったので
次点でアナログ出力のあるこいつに。

Co2はNDIR,O2はガルバニ電池。
O2のレンジは5%~30%、Co2は0.04~5%。
学校の酸素・二酸化炭素の実験なんかで使うためにウチダのカタログに載ってるような商品で、呼気のレベル(2%~)が計測出来ます。

 

その辺で買える室内環境用のCo2センサは3000ppmとか5000ppmとかまでで、
このレンジのものはあまり売ってないのです。
 

ある程度正確性を要する案件なので、単センサは選定できず。
使う前に構造を知っておきたいのと、今後できればセンサ単体でシステムを作りたいので確認のために分解します。

f:id:honeylab:20200221112133j:plain

 

本体裏表

f:id:honeylab:20200221112253j:plain f:id:honeylab:20200221112302j:plain

 

単三電池4本のほか、AC/DCアダプタで動作可能。
左から電源、アナログ出力、センサプローブ端子

f:id:honeylab:20200221112311j:plain

 

f:id:honeylab:20200221112451j:plain

裏蓋をあけたところ

f:id:honeylab:20200221112556j:plain

内部マイコンボードを外したところ。

f:id:honeylab:20200221112724j:plain

メインマイコンボード。CPUはTOSHIBAのTMP86FM29LUG。

f:id:honeylab:20200221112236j:plain

Co2/O2一体型プローブ。開けてみる。

f:id:honeylab:20200221114150j:plain

f:id:honeylab:20200221114159j:plain

f:id:honeylab:20200221114159j:plain

O2センサは SK-25F アナログ電圧が出力されるタイプ

www.figaro.co.jp

 

Co2センサはsenair.comのもので、型番が読めないけどおそらく5%maxのこいつかな。

senseair.com

こっちはmodbusらしい。

f:id:honeylab:20200221114244j:plain

プローブ基板と本体はVCC/GND/緑/白の4芯でつながってるのでi2cあたりに変換してるのかな?
プローブ基板の裏、写真左側のゲジゲジがたぶんそのマイコン

真ん中のはO2センサの出力(0-10mV)のアンプかと。

 

電源を入れると60秒のウォームアップが。バブルシステムではない。

f:id:honeylab:20200221115018j:plain

ウォームアップ後、そこを外気とみなして21% O2に校正してしまうので、
そうでない環境で電源をON/OFFできないのがちょっとあれ。

Co2は明示的に校正ボタンで400ppm。

 

f:id:honeylab:20200221115154j:plain

 

軽く息を吹きかけてみたところ。約1% Co2。

センサの動作環境としてRH 80%までという要求があるので、
測定空気を盤用除湿器に通したところで測定する、という構造を作ってみる予定。

アナログ出力専用ケーブルを発注し忘れてた…作れるけど、仕事なので買う…

ミルキー味のプロテインがウマイ件について

実はわたくし、今でこそこんなんだけど昔はそこそこ水泳のできるオタクだった時期がありまして、


f:id:honeylab:20200218113211j:plain 

f:id:honeylab:20200218113453p:plain  

 

結構幼少期からプロテインとか飲んでいました(飲まされていた)。

出たての頃のザバスプロテインなんかは溶けも悪く、味も悪く、口の中でベッタベタの癖に粉っぽい、というものが多かったのですが、最近はダイエットや女性人気のおかげでバナナやらココアやら出てきておいしいものも多くなりました。

現代人の食事状況から考えると、特別に運動しなくてもたんぱく質の補給をするためにプロテインは飲んだ方がいいともいわれ、メンタルの安定のために必要とされるトリプトファンなど、アミノ酸の原料となるたんぱく質はできるだけ気楽に取ろうといろいろ試したりしていました。

 

そんななか、嫁が見つけてきたこれ。

ビーレジェンドプロテイン ミルキー味

  

 

パードゥン?

「異色のコラボ!」じゃねぇ

とにかく、甘くておいしい、のが売りの商品のようです

飲んでみましたが…

糞甘いww

イチゴオレのイチゴ抜きぐらいwww

ダイエットで甘いものを制限されるストレスを受けるぐらいなら、
ここで潔く甘いものをとってしまえ、という意気込みのよう。
実際、空腹感はすごく抑えられます。中途半端な甘さにするぐらいならこのぐらいでいいわ。

このメーカのほかの商品を見てみましたが、まぁなんだこのふざけた名前のプロテインたちは。

メロメロメロン風味ってお前はひめめか!!!
かめはめ波風味ってなんだ!!!飲んだ後にかめはめ波出ないか確認しちゃうだろ

f:id:honeylab:20200218114241p:plain

いや、面白いシリーズ見つけたわ。
いわゆる一般的な廉価なプロテインよりは若干割高ですが、
無理なくプロテインを楽しくとる人にはかなりおススメですこれ。

ミルキーは500gからあります。

 

 いや、これまじでおいしい。

 

NEOGEO ASP Unlock All games

!!!! WARNING !!!!!

You may broke your console.
If you wait unlock key from vender , you must wait.
You can this with your spare ASP.

 And I can make the "Unlock All USB" but I am busy for waiting new baby.
So I wrote this article for expert hacker who can use solder iron and Linux.


NEOGEO Arcade Stick Pro - Hidden Games Unlocked

Above game list is TRUTH.ASP has 40 games with hidden 20 games.

 

You can unlock all games with below operations,

but you will be rejected from repair service.

 

 

1.Open console.

f:id:honeylab:20191113140442j:plain

2.Take out the PCB from case and remove steel shield cover.

f:id:honeylab:20191113141114j:plain

3.Short "R44" pad for enable UART signal.

f:id:honeylab:20200108015807p:plain

f:id:honeylab:20200108020013p:plain

4.Connect to PC with USB-UART(3.3V level) converter.

"-" to "GND" , ASP "Rx" to PC "TX" , ASP "Tx" to PC "RX"
And set terminal 115200bps,8bit,None.

If connection OK and turn ASP power on , you could see bootup log on terminal.

f:id:honeylab:20200108020242p:plain

 

"root@snk:/ #" is linux terminal with root.

if you cannnot serial "root@snk:/" or hit [Enter] or check connection.

you type command and hit [enter].command line is "one line" if you see separate line.

and put linux expert on your side.

5. change current directory to mod

root@snk:/ # cd /mnt/vendor/res/local

root@snk:/mnt/vendor/res/local

6.check your filesystem

root@snk:/mnt/vendor/res/local # ls -la
drwxrwxrwx root root 2019-10-16 10:20 English
drwxrwxrwx root root 2011-01-01 22:33 Japanese
drwxrwxrwx root root 2019-10-16 10:20 Korean
drwxrwxrwx root root 2019-10-16 10:20 Simplified_Chinese
drwxrwxrwx root root 2019-10-16 10:20 Traditional_Chinese
-rwxrwxrwx root root 834240 2019-10-16 10:21 default.ttf
-rwxrwxrwx root root 186 2019-10-16 10:21 lang_array.ini

7.Enter "Japanese" locale

 I'm using Japanese Game List, if you are not , select "English" or "Korean"...

root@snk:/mnt/vendor/res/local # cd Japanese/

8.See to check the filelist.

root@snk:/mnt/vendor/res/local/Japanese # ls -la
-rwxrwxrwx root root 332 2019-10-16 10:21 copyright.ini
-r-xr-xr-x root root 1745776 2019-10-16 10:21 font.ttf
-rwxrwxrwx root root 229 2019-10-16 10:21 game_type.ini
-rwxrwxrwx root root 2418 2011-01-01 08:45 games.ini
drwxrwxrwx root root 2019-10-16 10:20 help
-rwxrwxrwx root root 2116 2019-10-16 10:21 lock.ini
-rwxrwxrwx root root 1922 2019-10-16 10:21 strings.ini

 "games.ini" is list of default 20 games.
"lock.ini" is list of unlocked hidden 20 games.
if you want to get hidden list, type "cat lock.ini"

9.remount filesystem for modify.

root@snk:/mnt/vendor/res/local/Japanese # mount -o rw,remount /mnt/vendor

 10.make backup before mod

root@snk:/mnt/vendor/res/local/Japanese # cp games.ini games_org.ini

 11.combine "games.ini" and "lock.ini" , and write-out to "games_unlock.ini"

 

root@snk:/mnt/vendor/res/local/Japanese # cat games.ini lock.ini > games_unlock.ini

12.re-check file list.
root@snk:/mnt/vendor/res/local/Japanese # ls -la
-rwxrwxrwx root root 332 2019-10-16 10:21 copyright.ini
-r-xr-xr-x root root 1745776 2019-10-16 10:21 font.ttf
-rwxrwxrwx root root 229 2019-10-16 10:21 game_type.ini
-rwxrwxrwx root root 2418 2011-01-01 08:45 games.ini
-rwxrwxrwx root root 2418 2011-01-01 22:32 games_org.ini
-rwxrwxrwx root root 4534 2011-01-01 22:33 games_unlock.ini
drwxrwxrwx root root 2019-10-16 10:20 help
-rwxrwxrwx root root 2116 2019-10-16 10:21 lock.ini
-rwxrwxrwx root root 1922 2019-10-16 10:21 strings.ini

confirm "games_unlock.ini" size has sum of "games.ini" and "lock.ini" bytes.

12.Do MOD. overwrite "games.ini"

root@snk:/mnt/vendor/res/local/Japanese # cp games_unlock.ini games.ini

13.confirm  your filesystem

root@snk:/mnt/vendor/res/local/Japanese # ls -la
-rwxrwxrwx root root 332 2019-10-16 10:21 copyright.ini
-r-xr-xr-x root root 1745776 2019-10-16 10:21 font.ttf
-rwxrwxrwx root root 229 2019-10-16 10:21 game_type.ini
-rwxrwxrwx root root 4534 2011-01-01 22:33 games.ini
-rwxrwxrwx root root 2418 2011-01-01 22:32 games_org.ini
-rwxrwxrwx root root 4534 2011-01-01 22:33 games_unlock.ini
drwxrwxrwx root root 2019-10-16 10:20 help
-rwxrwxrwx root root 2116 2019-10-16 10:21 lock.ini
-rwxrwxrwx root root 1922 2019-10-16 10:21 strings.ini

 

14. reboot and ....

root@snk:/mnt/vendor/res/local/Japanese # reboot

40 games will be shown.
If your console is not Japanese region , some file's size must be difference.
But same operation will make your console be unlocked.

 

 

NEOGEO Arcade Stick Pro system update detail

NEOGEO ASP stock ui has mechanism for system update.

If on booting up, update.bin and update_desc.ini are placed on / of NAND,
update.bin has called with execv.

With placing "update.img" on USB stroage and insert to ASP , and select "System Update" will place these file onto NAND and reboot.

Next boot will run update working.

 

update.img is legacy zip format.

(it is some special , I could not make zip with WinZip,but open...)

f:id:honeylab:20200107100536p:plain

Update.img(zip) has least two files "[somedir]/update.bin" and "[somedir]/update_desc.ini".

And it must be set password "xugameplay-snk"

 

update.bin is normal ELF executable binary or any.

update_desc.ini likes below.

 #Template
[VERSION]=<v1.0>
[VERSION_CODE]=<1911180932>
[PUBLISH_TIME]=<2019.11.18>
[DESCRIPT]=<Do packed script which execute USB/command.sh>
[LAUNCHER_NAME]=<Honeylab World>
[LAUNCHER_PATH]=</mnt/data/honeylab/command>
[INJECT_PATH]=</mnt/data>
[CRC]=<2904145815>

This update_desc.ini is testing , but it will work with more test.

stock UI's "system update" supports not only game unlock but any works.

NEOGEO Arcade Stick Pro cdkey file format for game unlocking.

・Unlock CD-Key system

Vendor already provided CD-Key files for unlocking two Games.
cdkey zip is contain cdkey/[GAME_TITLE].cdk file.
This hexdumps are METAL_SLUG.cdk and METAL_SLUG2.cdk.

f:id:honeylab:20200105230043p:plain

44 bytes from start are id and check header.Their two cdk file are same binary .

First 4bytes little endian 32-bit is length of least bytes = 0x 00 00 01 28 = 296(dec) bytes.
Next 32bit int is count for something 4byte values : and values[0]=0x00000100

least 0x20 =32(dec)bytes is MD5 encoded data from some data.

 value is [ e3251075554389fe91d17a794861d47b ]

least 0x100 bytes are encrypted cdk file.

openssl can decrypt this data stream.

because stock executable contains a secret key for decrypt them.

f:id:honeylab:20200105231527p:plain

snk $ openssl rsautl -decrypt -inkey snk.pem -in encrypted.dat -out decrypted.dat
snk $ cat decrypted.dat
[SN_NO]=<FFFFFFFFFFFFFF>
[CDKEY]
[ID]=<27>
[NAME]=<mslug>
[CDKEY/]
[ENCRYPT]=<850b405b3dcdaa1543309ad09e1a7f76>

this stream make order unlocking "mslug ,ID 27" to stock system.

openssl can re-generate public key for encrypt cdk file.
so in logically , we can generate cdkey file for unlock other games.

 

 

第二回 技術書同人誌博覧会に出展します

gishohaku.dev

(技書博本編へ 11:00~13:59 に来場される場合には事前予約(無料)が必要です。 14:00 以降は予約なしで入場いただけます)

※予約時間帯は満員となっています。現時点で予約されていない方は14:00以降の入場とのことです。

サークルページはこちらです

gishohaku.dev

既刊2冊と新刊「メガドライブミニのひみつ」を頒布します。

Image
価格はいずれも¥1000となっています。

今回、子連れでの参加となるため予期せぬ早期店じまいや
休憩中座ががある可能性があります。

在庫全部数持ち込みではなく、なんとなくの数量を搬入します。
万が一現地で品切れの際は通販をご案内させていただきます。

 あらかじめご購入を検討の際には twitterなどで一声かけていただけると目安になりますのでご検討ください。

 

家庭の事情により次回の技術書典はお休みにしました。
もしblogの読者、Twitterのフォロワーさんいましたら是非お声がけください。

NEOGEO Arcade Stick ProのOSSソースコードが公開されました!

過去2回分の以下の記事でさんざん悪態をついたOSS非公開の件、
どうやら2回目の記事を書いたちょっとあとぐらいにリンクが変更され

https://github.com/xudarren/NeogeoASP_OSS

こちらのサイトでソースコードが公開されたようです。

記事で指摘した".s"がツリーに戻されていた件も是正され
正しいソースコードに修正されたようにも見えます。
LGPLであるQUIのソースもオブジェクトコードが公開されました。
まだ詳細未確認ですが、この件については一定の対応があったと考え
煽るような内容でソースの公開を迫った態度を若干反省し
ソースコード公開に関わった関係者の皆様に感謝します。

(※GPL宣言のあるソースが本当に著作権者のものであるかどうかって言う点の確認が足りなかったところなど、今後に活かしたいと思います。)

 

honeylab.hatenablog.jp

honeylab.hatenablog.jp