福野泰介の一日一創 - create every day

IchigoJamへの要望ランキングNo.1だった、キーボード配置JP/US切り替えに1KBプログラムで対応!

接続するキーボードが日本語キーボードか、かなキーや英数キーがないUSキーボードかによって違うIchigoJamのファームウェアを使います。 日本語キーボード対応IchigoJamにUSキーボードを挿すと、記号などがキーに書いてある通りに打てません。 今回、1.3.2β12で対応した拡張API(BIOS的なもの)を使って切り替えできるようになりました。

IchigoJam 1.3.2β13以降でのみ動作します。
ichigojam-1.3b13.zip
内部変更:ROM内のデータ並び位置を変更、修正:画面右端に白い線が入る不具合を修正


こちらのプログラムをUSBシリアルで流すか、打ち込むかして、実行すると画面が一瞬点滅して、USキーボードへの書き換えが完了します! 本体やEEPROMに保存しておけば読み込んで実行するだけ、簡単です!

1 'US KEYBOARD POKE#F00,0,0,96,32,32,32,32,32,32,32,32,32,32,32,32,32,96,32,32,32,32,32,32,113,49,32,32,32,122,115,97,119 POKE#F20,50,32,32,99,120,100,101,52,51,32,32,32,118,102,116,114,53,32,32,110,98,104,103,121,54,32,32,32,109,106,117,55 POKE#F40,56,32,32,44,107,105,111,48,57,32,32,46,47,108,59,112,45,32,32,92,39,32,91,61,32,32,32,32,10,93,32,92 POKE#F60,32,32,32,32,32,32,32,32,8,32,32,49,32,52,55,32,32,32,48,46,50,53,54,56,32,32,32,43,51,45,42,57 POKE#F80,0,126,32,32,32,32,32,32,32,32,32,32,32,32,32,126,32,32,32,32,32,32,81,33,32,32,32,90,83,65,87,64 POKE#FA0,32,32,67,88,68,69,36,35,32,32,32,86,70,84,82,37,32,32,78,66,72,71,89,94,32,32,32,77,74,85,38,42 POKE#FC0,32,32,60,75,73,79,41,40,32,32,62,63,76,58,80,95,32,32,95,34,32,123,43,32,32,32,32,10,125,32,124,32 POKE#FE0,32,32,32,32,32,32,32,8,32,32,49,32,52,55,32,32,32,48,46,50,53,54,56,32,32,32,43,51,45,42,57,0 POKE#D00,240,181,195,176,1,145,114,182,6,34,232,35,17,0,27,136,53,32,152,71,4,0,96,30,132,65,128,39,0,37,6,52 POKE#D20,35,1,0,147,127,0,230,35,27,136,7,45,85,209,240,32,58,0,1,153,0,1,9,24,2,168,152,71,232,35,34,0 POKE#D40,27,136,33,0,50,32,152,71,0,155,2,169,234,24,234,35,27,136,18,2,30,0,51,32,59,0,1,53,176,71,16,45 POKE#D60,225,209,5,34,216,53,43,136,17,0,50,32,152,71,5,34,43,136,160,37,17,0,52,32,152,71,0,155,237,1,27,2 POKE#D80,0,147,0,155,23,74,2,168,153,24,230,35,128,34,73,25,27,136,82,0,152,71,232,38,5,34,51,136,17,0,50,32 POKE#DA0,152,71,234,35,27,136,42,0,31,0,128,35,2,169,91,0,51,32,184,71,192,35,1,53,255,53,219,1,157,66,224,209 POKE#DC0,51,136,34,0,33,0,50,32,152,71,51,136,34,0,33,0,52,32,152,71,98,182,67,176,240,189,41,0,80,49,9,2 POKE#DE0,58,0,169,231,0,176,255,255 10 ?USR(#D00,0) SAVE 2 RUN

日本語キーボードに戻すときはこちら。

1 'JP KEYBOARD POKE#F00,1,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,113,49,32,32,32,122,115,97,119 POKE#F20,50,32,32,99,120,100,101,52,51,32,32,32,118,102,116,114,53,32,32,110,98,104,103,121,54,32,32,32,109,106,117,55 POKE#F40,56,32,32,44,107,105,111,48,57,32,32,46,47,108,59,112,45,32,32,92,58,32,64,94,32,32,32,32,10,91,32,93 POKE#F60,32,32,32,32,32,32,32,32,8,32,32,49,92,52,55,32,32,32,48,46,50,53,54,56,27,32,32,43,51,45,42,57 POKE#F80,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,81,33,32,32,32,90,83,65,87,34 POKE#FA0,32,32,67,88,68,69,36,35,32,32,32,86,70,84,82,37,32,32,78,66,72,71,89,38,32,32,32,77,74,85,39,40 POKE#FC0,32,32,60,75,73,79,48,41,32,32,62,63,76,43,80,61,32,32,95,42,32,96,126,32,32,32,32,10,123,32,125,32 POKE#FE0,32,32,32,32,32,32,32,8,32,32,49,124,52,55,32,32,32,48,46,50,53,54,56,27,32,32,43,51,45,42,57,0 POKE#D00,240,181,195,176,1,145,114,182,6,34,232,35,17,0,27,136,53,32,152,71,4,0,96,30,132,65,128,39,0,37,6,52 POKE#D20,35,1,0,147,127,0,230,35,27,136,7,45,85,209,240,32,58,0,1,153,0,1,9,24,2,168,152,71,232,35,34,0 POKE#D40,27,136,33,0,50,32,152,71,0,155,2,169,234,24,234,35,27,136,18,2,30,0,51,32,59,0,1,53,176,71,16,45 POKE#D60,225,209,5,34,216,53,43,136,17,0,50,32,152,71,5,34,43,136,160,37,17,0,52,32,152,71,0,155,237,1,27,2 POKE#D80,0,147,0,155,23,74,2,168,153,24,230,35,128,34,73,25,27,136,82,0,152,71,232,38,5,34,51,136,17,0,50,32 POKE#DA0,152,71,234,35,27,136,42,0,31,0,128,35,2,169,91,0,51,32,184,71,192,35,1,53,255,53,219,1,157,66,224,209 POKE#DC0,51,136,34,0,33,0,50,32,152,71,51,136,34,0,33,0,52,32,152,71,98,182,67,176,240,189,41,0,80,49,9,2 POKE#DE0,58,0,169,231,0,176,255,255 10 ?USR(#D00,0) SAVE 1 RUN

実現方法はこちら main-exkbd.c をご覧ください。
IchigoJam/c4ij: C language for IchigoJam」 - src on GitHub
強力なAPIがアンロック!

Tweet
クリエイティブ・コモンズ・ライセンス
この作品は「Creative Commons — CC BY 4.0」の下に提供されています。
CC BY 福野泰介 - Taisuke Fukuno / @taisukef / アイコン画像 / プロフィール画像