フォント変更

カナ・モンゴル版・ベトナム版フォントへ変更

IchigoJam BASIC 1.3.2b13 では新たに

キーボード配列の変更を

マシン語からの API で実現できるようになりました。

 

BIOSを使ってUSキーボードとJPキーボードの切り替えに対応 IchigoJam 1.3.2β13 | 福野泰介の一日一創

 

それに合わせて実現されていたのが
キャラクターフォントの変更(PCG)です。

 

KDDI x 岩手県 x 鯖江市 x 福井高専 x Hana道場! 創ろう学生活躍のまち | 福野泰介の一日一創

 

しかもただの PCG ではないんです。256 文字すべてが変更でき
CLP をしたり、電源を切って入れ直しても残ってしまうのです。

 

従来のバージョンではモンゴル版・ベトナム版での動作確認を

別の IchigoJam にファームウェアを入れて、

こちらで実行して確認を行っていました。

しかし、今回の新機能でプログラムからフォントを変更して

すぐに確認ができるようになりました。これは便利!

という事でプログラム状態にして公開しました。EEPROM に保存しておくと良いでしょう。

 

マシン語本体(実際には C 言語)・変更キャラクター部をダイレクトに POKE で入れていますが、
入れている先はプログラム領域なので、そのまま SAVE でき、LOAD→RUN や LRUN が可能になっています。

画像の表示は実行してフォントを変更した後に キャラクターコード一覧 16 進数 の座標を変更した状態で実行したものです。

 



モンゴル版フォントに変更

POKE#D00,240,181,195,176,1,145,114,182,6,34,232,35,17,0,27,136
POKE#D10,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,13,45,85,209,58,0
POKE#D30,224,32,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
POKE#D50,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
POKE#D70,43,136,160,37,17,0,52,32,152,71,0,155,237,1,27,2
POKE#D80,0,147,0,155,26,74,2,168,153,24,230,35,128,34,73,25
POKE#D90,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
POKE#DB0,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
POKE#DD0,52,32,152,71,98,182,67,176,240,189,14,45,3,209,58,0
POKE#DE0,1,153,240,32,166,231,41,0,80,49,9,2,58,0,163,231
POKE#DF0,0,176,255,255,0,0,0,0,0,0,0,0,0,0,0,0
POKE#E00,124,80,56,84,56,20,16,0,124,64,64,120,68,68,120,0
POKE#E10,120,36,36,56,36,36,120,0,124,64,64,64,64,64,64,0
POKE#E20,60,36,36,36,36,36,60,68,40,0,124,64,124,64,124,0
POKE#E30,84,84,56,16,56,84,84,0,120,4,4,120,4,4,120,0
POKE#E40,68,76,76,84,100,100,68,0,40,16,68,76,84,100,68,0
POKE#E50,68,72,80,96,80,72,68,0,60,36,36,36,36,68,68,0
POKE#E60,68,108,108,84,84,84,68,0,68,68,68,124,68,68,68,0
POKE#E70,56,68,68,124,68,68,56,0,124,68,68,68,68,68,68,0
POKE#E80,124,16,16,16,16,16,16,0,68,68,40,40,16,16,96,0
POKE#E90,68,68,40,16,16,16,16,0,16,56,84,84,84,56,16,0
POKE#EA0,72,72,72,72,72,72,124,4,68,68,68,76,52,4,4,0
POKE#EB0,84,84,84,84,84,84,124,0,84,84,84,84,84,84,126,2
POKE#EC0,96,32,32,56,36,36,56,0,68,68,68,100,84,84,100,0
POKE#ED0,32,32,32,56,36,36,56,0,60,66,2,30,2,66,60,0
POKE#EE0,76,82,82,114,82,82,76,0,60,68,68,68,60,36,68,0
POKE#EF0,0,144,214,218,182,176,150,0,0,0,60,126,255,239,239,0
POKE#F00,68,40,124,16,124,16,16,0,0,28,32,56,36,36,24,0
POKE#F10,0,0,56,36,56,36,60,0,0,0,124,64,64,64,64,0
POKE#F20,0,0,60,36,36,36,124,68,40,0,56,68,124,64,56,0
POKE#F30,0,0,84,56,16,56,84,0,0,0,56,4,24,4,56,0
POKE#F40,0,0,68,76,84,100,68,0,0,40,16,0,76,84,100,0
POKE#F50,0,0,36,40,48,40,36,0,0,0,60,36,36,36,68,0
POKE#F60,0,0,68,108,84,84,84,0,0,0,68,68,124,68,68,0
POKE#F70,0,0,56,68,124,68,56,0,0,0,124,68,68,68,68,0
POKE#F80,0,0,124,16,16,16,16,0,0,0,68,68,68,40,16,96
POKE#F90,0,0,68,68,68,40,16,16,0,0,16,56,84,84,56,16
POKE#FA0,0,0,72,72,72,72,124,4,0,0,68,68,68,76,52,4
POKE#FB0,0,0,84,84,84,84,124,0,0,0,84,84,84,84,126,2
POKE#FC0,0,0,96,32,48,40,56,0,0,0,68,68,100,84,116,0
POKE#FD0,0,0,32,32,48,40,56,0,0,0,56,4,60,4,56,0
POKE#FE0,0,0,92,84,116,84,92,0,0,0,28,36,60,20,36,0
POKE#FF0,32,224,241,62,60,36,66,66,4,7,15,124,188,36,66,66

1 'Change IchigoJam mn font
2 ?USR(#D00,0)

MixJuice ダウンロード ?"MJ GET kidspod.club/mj/852

MicJack ダウンロード ?"MJ GKP 852


ベトナム版フォントに変更

POKE#D00,240,181,195,176,1,145,114,182,6,34,232,35,17,0,27,136
POKE#D10,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,13,45,85,209,58,0
POKE#D30,224,32,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
POKE#D50,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
POKE#D70,43,136,160,37,17,0,52,32,152,71,0,155,237,1,27,2
POKE#D80,0,147,0,155,26,74,2,168,153,24,230,35,128,34,73,25
POKE#D90,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
POKE#DB0,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
POKE#DD0,52,32,152,71,98,182,67,176,240,189,14,45,3,209,58,0
POKE#DE0,1,153,240,32,166,231,41,0,80,49,9,2,58,0,163,231
POKE#DF0,0,176,255,255,0,0,0,0,0,0,0,0,0,0,0,0
POKE#E00,4,30,4,52,76,58,0,124,40,16,56,68,68,124,68,0
POKE#E10,16,40,56,68,68,124,68,0,16,40,124,64,124,64,124,0
POKE#E20,16,40,56,68,68,68,56,0,0,120,36,36,116,36,120,0
POKE#E30,2,70,68,68,68,68,56,0,2,58,68,68,68,68,56,0
POKE#E40,0,0,0,0,32,16,8,0,0,0,0,24,36,4,8,0
POKE#E50,0,0,0,0,0,20,40,0,0,0,0,0,8,16,32,0
POKE#E60,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#E70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#E80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#E90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#EA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#EB0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#EC0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#ED0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#EE0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#EF0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#F00,68,40,124,16,124,16,16,0,40,16,56,4,60,68,58,0
POKE#F10,16,40,56,4,60,68,58,0,16,40,56,68,124,64,56,0
POKE#F20,16,40,0,56,68,68,56,0,4,14,4,52,76,68,60,0
POKE#F30,0,4,4,72,72,72,52,0,0,0,2,58,68,68,56,0
POKE#F40,128,64,32,0,0,0,0,0,96,144,16,32,0,0,0,0
POKE#F50,80,160,0,0,0,0,0,0,32,64,128,0,0,0,0,0
POKE#F60,0,0,0,0,0,0,64,0,32,16,8,0,48,16,16,0
POKE#F70,48,72,16,0,48,16,16,0,0,40,80,0,48,16,16,0
POKE#F80,8,16,32,0,48,16,16,0,0,0,0,0,0,0,0,0
POKE#F90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#FA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#FB0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#FC0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#FD0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#FE0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
POKE#FF0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

1 'Change IchigoJam vi font
2 ?USR(#D00,0)

MixJuice ダウンロード ?"MJ GET kidspod.club/mj/853

MicJack ダウンロード ?"MJ GKP 853


カナ フォント v1.2~1.3 に変更

通常はフォントを戻すために必要です。BASIC 1.4.0b8 までのカナフォントになります。

POKE#D00,240,181,195,176,1,145,114,182,6,34,232,35,17,0,27,136
POKE#D10,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,13,45,85,209,58,0
POKE#D30,224,32,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
POKE#D50,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
POKE#D70,43,136,160,37,17,0,52,32,152,71,0,155,237,1,27,2
POKE#D80,0,147,0,155,26,74,2,168,153,24,230,35,128,34,73,25
POKE#D90,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
POKE#DB0,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
POKE#DD0,52,32,152,71,98,182,67,176,240,189,14,45,3,209,58,0
POKE#DE0,1,153,240,32,166,231,41,0,80,49,9,2,58,0,163,231
POKE#DF0,0,176,255,255,0,0,0,0,0,0,0,0,0,0,0,0
POKE#E00,68,40,124,16,124,16,16,0,0,0,0,0,112,80,112,0
POKE#E10,14,8,8,0,0,0,0,0,0,0,0,0,16,16,112,0
POKE#E20,0,0,0,0,64,32,16,0,0,0,0,24,24,0,0,0
POKE#E30,0,126,2,126,2,4,24,0,0,0,0,124,20,16,32,0
POKE#E40,0,0,0,12,112,16,16,0,0,0,16,124,68,4,24,0
POKE#E50,0,0,0,124,16,16,124,0,0,0,8,124,24,40,72,0
POKE#E60,0,0,32,124,36,32,32,0,0,0,0,56,8,8,124,0
POKE#E70,0,0,60,4,60,4,60,0,0,0,0,84,84,4,8,0
POKE#E80,0,0,0,0,126,0,0,0,0,254,2,20,16,16,96,0
POKE#E90,0,6,24,104,8,8,8,0,16,126,66,66,2,4,24,0
POKE#EA0,0,124,16,16,16,16,254,0,4,4,126,12,20,36,68,0
POKE#EB0,16,16,126,18,18,34,70,0,16,16,126,16,126,16,16,0
POKE#EC0,0,62,34,66,2,4,56,0,32,32,62,68,4,4,56,0
POKE#ED0,0,0,126,2,2,2,126,0,0,68,254,68,68,4,56,0
POKE#EE0,0,112,2,114,2,4,120,0,0,126,2,4,8,20,98,0
POKE#EF0,0,64,254,68,72,64,62,0,0,66,66,36,4,8,16,0
POKE#F00,0,62,34,82,10,4,56,0,4,56,8,254,8,8,48,0
POKE#F10,0,82,82,82,2,4,24,0,0,124,0,254,8,8,112,0
POKE#F20,64,64,64,112,76,64,64,0,0,8,254,8,8,8,112,0
POKE#F30,0,0,124,0,0,0,254,0,0,126,2,52,8,20,98,0
POKE#F40,16,126,2,4,24,118,16,0,0,2,2,2,2,4,120,0
POKE#F50,0,40,40,68,68,130,130,0,0,64,78,112,64,64,62,0
POKE#F60,0,126,2,2,2,4,56,0,0,0,32,80,136,4,2,0
POKE#F70,0,16,254,16,84,84,146,0,0,254,2,68,40,16,8,0
POKE#F80,0,112,14,112,14,112,14,0,0,16,16,32,36,66,254,0
POKE#F90,0,2,34,20,8,20,98,0,0,124,32,254,32,32,30,0
POKE#FA0,32,32,254,34,36,32,32,0,0,0,60,4,4,4,126,0
POKE#FB0,0,124,4,124,4,4,124,0,0,126,0,126,2,4,56,0
POKE#FC0,0,68,68,68,4,8,48,0,0,80,80,80,82,148,152,0
POKE#FD0,0,32,32,34,36,40,48,0,0,126,66,66,66,66,126,0
POKE#FE0,0,126,66,66,2,4,56,0,0,64,34,2,2,4,120,0
POKE#FF0,16,72,32,0,0,0,0,0,112,80,112,0,0,0,0,0

1 'Change IchigoJam ja(kana) font
2 ?USR(#D00,0)

MixJuice ダウンロード ?"MJ GET kidspod.club/mj/851

MicJack ダウンロード ?"MJ GKP 851


カナ フォント v1.4 に変更

通常はフォントを戻すために必要です。BASIC 1.4.0b9 より ハ の形が変わりました。

POKE#D00,240,181,195,176,1,145,114,182,6,34,232,35,17,0,27,136
POKE#D10,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,13,45,85,209,58,0
POKE#D30,224,32,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
POKE#D50,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
POKE#D70,43,136,160,37,17,0,52,32,152,71,0,155,237,1,27,2
POKE#D80,0,147,0,155,26,74,2,168,153,24,230,35,128,34,73,25
POKE#D90,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
POKE#DB0,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
POKE#DD0,52,32,152,71,98,182,67,176,240,189,14,45,3,209,58,0
POKE#DE0,1,153,240,32,166,231,41,0,80,49,9,2,58,0,163,231
POKE#DF0,0,176,255,255,0,0,0,0,0,0,0,0,0,0,0,0
POKE#E00,68,40,124,16,124,16,16,0,0,0,0,0,112,80,112,0
POKE#E10,14,8,8,0,0,0,0,0,0,0,0,0,16,16,112,0
POKE#E20,0,0,0,0,64,32,16,0,0,0,0,24,24,0,0,0
POKE#E30,0,126,2,126,2,4,24,0,0,0,0,124,20,16,32,0
POKE#E40,0,0,0,12,112,16,16,0,0,0,16,124,68,4,24,0
POKE#E50,0,0,0,124,16,16,124,0,0,0,8,124,24,40,72,0
POKE#E60,0,0,32,124,36,32,32,0,0,0,0,56,8,8,124,0
POKE#E70,0,0,60,4,60,4,60,0,0,0,0,84,84,4,8,0
POKE#E80,0,0,0,0,126,0,0,0,0,254,2,20,16,16,96,0
POKE#E90,0,6,24,104,8,8,8,0,16,126,66,66,2,4,24,0
POKE#EA0,0,124,16,16,16,16,254,0,4,4,126,12,20,36,68,0
POKE#EB0,16,16,126,18,18,34,70,0,16,16,126,16,126,16,16,0
POKE#EC0,0,62,34,66,2,4,56,0,32,32,62,68,4,4,56,0
POKE#ED0,0,0,126,2,2,2,126,0,0,68,254,68,68,4,56,0
POKE#EE0,0,112,2,114,2,4,120,0,0,126,2,4,8,20,98,0
POKE#EF0,0,64,254,68,72,64,62,0,0,66,66,36,4,8,16,0
POKE#F00,0,62,34,82,10,4,56,0,4,56,8,254,8,8,48,0
POKE#F10,0,82,82,82,2,4,24,0,0,124,0,254,8,8,112,0
POKE#F20,64,64,64,112,76,64,64,0,0,8,254,8,8,8,112,0
POKE#F30,0,0,124,0,0,0,254,0,0,126,2,52,8,20,98,0
POKE#F40,16,126,2,4,24,118,16,0,0,2,2,2,2,4,120,0
POKE#F50,0,68,68,68,68,130,130,0,0,64,78,112,64,64,62,0
POKE#F60,0,126,2,2,2,4,56,0,0,0,32,80,136,4,2,0
POKE#F70,0,16,254,16,84,84,146,0,0,254,2,68,40,16,8,0
POKE#F80,0,112,14,112,14,112,14,0,0,16,16,32,36,66,254,0
POKE#F90,0,2,34,20,8,20,98,0,0,124,32,254,32,32,30,0
POKE#FA0,32,32,254,34,36,32,32,0,0,0,60,4,4,4,126,0
POKE#FB0,0,124,4,124,4,4,124,0,0,126,0,126,2,4,56,0
POKE#FC0,0,68,68,68,4,8,48,0,0,80,80,80,82,148,152,0
POKE#FD0,0,32,32,34,36,40,48,0,0,126,66,66,66,66,126,0
POKE#FE0,0,126,66,66,2,4,56,0,0,64,34,2,2,4,120,0
POKE#FF0,16,72,32,0,0,0,0,0,112,80,112,0,0,0,0,0

1 'Change IchigoJam ja(kana) font
2 ?USR(#D00,0)

MixJuice ダウンロード ?"MJ GET kidspod.club/mj/891

MicJack ダウンロード ?"MJ GKP 891


C 言語プログラムソース

仮想メモリ #D00~#DFF のマシン語部分はC 言語で作ってあります。そのプログラムソースです。

コンパイルには C language for IchigoJam および GNU Embedded Toolchain for Arm が必要です。