2017.4.13
前へ
次へ
ホームページトップへ戻る

マイコン独立大作戦
CRT/VGAIF+KEYIF+SDCARDIFボードの製作

〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜
WindowsパソコンにUSB接続して使う現行方式はそれなりに便利ではありますが、ときとしてWindows
のしがらみから開放されて、小さいながらも独立した一個のパソコンとして機能したいと思うこともあります。
昔はそれが普通のことだったのですが、安価なCRTディスプレイが生産中止となって久しい今日ではそれ
は叶わぬことと諦めていたのですが…。
〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜

[総合第47回]


●SDカードを再フォーマット(2)

前回からの続きです。
バグのためSDカードの中がかなり壊れてしまっていることに気が付きましたので、もう一度やり直しということで再フォーマットすることにしました。
今回はフォーマットとファイルコピーをしたあと、正しく作業が行なわれているかカードの中身を確認することにしました。

結果から先に書きますと、そのあたりの作業はうまくいきました。
以下はその事後報告ということになります。
それはよかったのですが、本日はさらにその先に進んで、いよいよZB3DOS(CP/M互換DOS)のチェックに入ったところ、コンソール入力でつまづいてしまいました。
詳しくは次回以降で説明をすることになると思いますが、とにかく本日はつい先ほどまで、どうしたものか悩んでおりました。
やっとクリアできたように思いますが、そういう次第で本日も時間が余りありません。
ざっと走り書きで、また途中で終ってしまうかもしれません。

まずはFORMATです。

>format
......................
>dir
Z       .       
>dirz

>

FORMATのあと、DIRコマンドとDIRZコマンドで中身を確認しました。
初期化されましたからファイルはありません。

ルートディレクトリに独立型ZB3DOS(CP/M互換DOS)ファイルをコピーしました。

>dir
Z       .       
>/ld szccp1e.bin,cc00
loading SZCCP1E.BIN ...07ff(2047)bytes loaded,from CC00 to D3FE
>sv szccp1e.bin,cc00,d3fe
>/ld szbdos1l.bin,d406
loading SZBDOS1L.BIN ...0dc7(3527)bytes loaded,from D406 to E1CC
>sv szbdos1l.bin,d406,e1cc
>/ld szbds1u.bin,cc00
loading SZBDS1U.BIN ...19a8(6568)bytes loaded,from CC00 to E5A7
>sv szbds1u.bin,cc00,e5a7
>/ld szinit1c.bin,e000
loading SZINIT1C.BIN ...0095(149)bytes loaded,from E000 to E094
>sv szinit1c.bin,e000,e094
>dir
Z       .       SZCCP1E .BIN    SZBDOS1L.BIN    SZBDS1U .BIN    SZINIT1C.BIN    
>

Windowsのコピー機能を使ってもよいのですが、ここは慎重を期してZB3BASIC上で行ないました。
ハードディスクから一旦ND80ZVのRAMにロードしてから、あらためてSDカードにセーブしました。

次はZディレクトリにMBASIC.COMとSTARTREK.BASをコピーしました。

>dirz

>/ld mbasic.com,0000
loading MBASIC.COM ...5f00(24320)bytes loaded,from 0000 to 5EFF
>sv mbasic.com,0000,5eff
>/ld startrek.bas,0000
loading STARTREK.BAS ...4f15(20245)bytes loaded,from 0000 to 4F14
>sv startrek.bas,0000,4f14
>dirz
MBASIC  .COM    STARTREK.BAS    
>dir
Z       .       SZCCP1E .BIN    SZBDOS1L.BIN    SZBDS1U .BIN    SZINIT1C.BIN    
>/ld sctrd.bin,8000
loading SCTRD.BIN ...0017(23)bytes loaded,from 8000 to 8016
>sv sctrd.bin,8000,8016
>dir
Z       .       SZCCP1E .BIN    SZBDOS1L.BIN    SZBDS1U .BIN    SZINIT1C.BIN    SCTRD   .BIN    

RAMは一時的にバッファとして利用するだけですから、このように0000からロードしても問題はありません。
セクタリードプログラム(SCTRD.BIN)もルートディレクトリにコピーしました。

念のためコピー後にルートディレクトリを確認してみました。

>cm 8003
8003 00-
8004 00-02
8005 00-e7
8006 2A-
>jp 8000
>dm 8200,83ff
8200  5A 20 20 20 20 20 20 20-20 20 20 10 00 00 00 00  Z          .....
8210  00 00 00 00 00 00 00 00-00 00 02 00 00 00 00 00  ................
8220  53 5A 43 43 50 31 45 20-42 49 4E 20 00 00 00 00  SZCCP1E BIN ....
8230  00 00 00 00 00 00 00 00-00 00 40 01 FF 07 00 00  ..........@.....
8240  53 5A 42 44 4F 53 31 4C-42 49 4E 20 00 00 00 00  SZBDOS1LBIN ....
8250  00 00 00 00 00 00 00 00-00 00 41 01 C7 0D 00 00  ..........A.ヌ...
8260  53 5A 42 44 53 31 55 20-42 49 4E 20 00 00 00 00  SZBDS1U BIN ....
8270  00 00 00 00 00 00 00 00-00 00 42 01 A8 19 00 00  ..........B.ィ...
8280  53 5A 49 4E 49 54 31 43-42 49 4E 20 00 00 00 00  SZINIT1CBIN ....
8290  00 00 00 00 00 00 00 00-00 00 43 01 95 00 00 00  ..........C.....
82A0  53 43 54 52 44 20 20 20-42 49 4E 20 00 00 00 00  SCTRD   BIN ....
82B0  00 00 00 00 00 00 00 00-00 00 46 01 17 00 00 00  ..........F.....
82C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8300  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8310  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8320  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8330  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8340  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8350  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8360  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8370  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8380  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8390  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................

正しく書き込まれているようです。

Zディレクトリも確認してみました。

>cm 8003
8003 00-
8004 02-03
8005 E7-07
8006 2A-
>jp 8000
>dm 8200,83ff
8200  2E 20 20 20 20 20 20 20-20 20 20 10 00 00 00 00  .          .....
8210  00 00 00 00 00 00 00 00-00 00 02 00 00 00 00 00  ................
8220  2E 2E 20 20 20 20 20 20-20 20 20 10 00 00 00 00  ..         .....
8230  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8240  4D 42 41 53 49 43 20 20-43 4F 4D 20 00 00 00 00  MBASIC  COM ....
8250  00 00 00 00 00 00 00 00-00 00 44 01 00 5F 00 00  ..........D.._..
8260  53 54 41 52 54 52 45 4B-42 41 53 20 00 00 00 00  STARTREKBAS ....
8270  00 00 00 00 00 00 00 00-00 00 45 01 15 4F 00 00  ..........E..O..
8280  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8290  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8300  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8310  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8320  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8330  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8340  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8350  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8360  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8370  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8380  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8390  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................

こちらも正しく書き込まれているようです。

FATセクタも確認してみました。

>cm 8003
8003 00-
8004 03-01
8005 07-
>jp 8000
>dm 8200,83ff
8200  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8210  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8220  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8230  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8240  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8250  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8260  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8270  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8280  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8290  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82A0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82B0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82C0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82D0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82E0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82F0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8300  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8310  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8320  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8330  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8340  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8350  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8360  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8370  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8380  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8390  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83A0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83B0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83C0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83D0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83E0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83F0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
>cm 8003
8003 00-
8004 01-
8005 07-08
8006 2A-
>jp 8000
>dm 8200,83ff
8200  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8210  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8220  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8230  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8240  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8250  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8260  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8270  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8280  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF 00 00  ................
8290  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8300  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8310  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8320  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8330  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8340  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8350  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8360  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8370  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8380  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8390  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
>cm 8003
8003 00-
8004 01-
8005 08-f7
8006 2A-
>jp 8000
>dm 8200,83ff
8200  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8210  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8220  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8230  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8240  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8250  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8260  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8270  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8280  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8290  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82A0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82B0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82C0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82D0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82E0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
82F0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8300  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8310  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8320  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8330  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8340  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8350  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8360  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8370  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8380  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8390  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83A0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83B0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83C0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83D0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83E0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
83F0  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
>cm 8003
8003 00-
8004 01-01
8005 F7-f8
8006 2A-
>jp 8000
>dm 8200,83ff
8200  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8210  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8220  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8230  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8240  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8250  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8260  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8270  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF FF FF  ................
8280  FF FF FF FF FF FF FF FF-FF FF FF FF FF FF 00 00  ................
8290  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
82F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8300  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8310  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8320  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8330  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8340  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8350  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8360  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8370  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8380  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8390  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
83F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................   


クラスタ#013Fまではシステム用にリザーブしてあります。
FATセクタでは1クラスタあたり2バイトを割り当てています。
クラスタ#0000〜#013FはFATセクタの2番目のセクタの先頭から007Fまでに相当します。
その後ろがデータエリアです。
最後にコピーしたSCTRD.BINがクラスタ#0146ですから、FAT第2セクタの008C、8Dになります。
そこまでがFFFFになっていますから、ここまでは正しく処理されているようです。

途中ですが本日は時間がなくなってしまいました。
続きは次回にいたします。

CRT/VGAIF+KEYIF+SDCARDIFボードの製作[総合第47回]
2017.4.13upload

前へ
次へ
ホームページトップへ戻る