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

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

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

[総合第159回]



●LOGディレクトリの修復(4)

前回の続きです。
前回はSCTRD.BINを使ってLOGディレクトリに割り当てられたセクタを前から順に読んでいった結果、セクタbR0Fが破損していることがわかりました。
今回はその修復作業です。
破損している部分をクリアにする(32バイト単位で00を書き込む)ことでもよいのですが、手っ取り早く1セクタを丸ごとクリアしてしまうことにしました。
その準備として、まずはバッファとして使っている8200〜83FFを00で置き換えました。

>/ld filld.bin,8400
loading FILLD.BIN ...0013(19)bytes loaded,from 8400 to 8412
>jp 8400
>dm 8200,83ff
8200  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8210  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8220  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8230  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8240  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8250  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8260  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8270  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
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  ................

ここで使ったFILLD.BINはそのための簡単なプログラムです。
下にリストを示します。

2017/10/27  18:48  filld.txt
END=8412
              ;;; fill data to $8200-$83ff
              ; 17/10/27
              ;
                ORG $8400
              ;
                REENT=$1033
              ;
8400 1600       LD D,00
8402 210082     LD HL,$8200
8405 010002     LD BC,$0200
8408 72       LOOP:LD (HL),D
8409 23         INC HL
840A 0B         DEC BC
840B 78         LD A,B
840C B1         OR C
840D C20884     JP NZ,LOOP
8410 C33310     JP REENT
              ;
LOOP         =8408  REENT        =1033  

これで準備ができましたので、SCTWR.BINを使ってセクタbR0Fを書き換えます。
ついでなのでちょっと怪しかったセクタbR10も書き換えます。

>/ld sctwr.bin,8100
loading SCTWR.BIN ...0017(23)bytes loaded,from 8100 to 8116
>cm 8103
8103 00-
8104 00-03
8105 00-0f
8106 2A-
>jp 8100
>cm 8103
8103 00-
8104 03-
8105 0F-10
8106 2A-
>jp 8100

正しく書き換えられたかどうか、SCTRD.BINを使って読み出して確認してみます。

>>cm 8003
8003 00-
8004 03-
8005 10-0F
8006 2A-
>jp 8000
>dm 8200,83ff
8200  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8210  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8220  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8230  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8240  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8250  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8260  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8270  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
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  ................
>cm 8003
8003 00-
8004 03-
8005 0F-10
8006 2A-
>jp 8000
>dm 8200,83ff
8200  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8210  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8220  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8230  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8240  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8250  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8260  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
8270  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  ................
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  ................

どちらのセクタもちゃんとゼロクリアできました。
最後の仕上げです。
DIRLが正しく実行されるかどうか確認してみました。

>dirl
12141506.LOG    12141515.LOG    12141518.LOG    12141522.LOG    12141526.LOG    
12141809.LOG    12141829.LOG    12141847.LOG    12151819.LOG    12151826.LOG    
12152131.LOG    12152137.LOG    12152138.LOG    12152141.LOG    1215214A.LOG    
12181554.LOG    1218155D.LOG    12181611.LOG    12181613.LOG    12181616.LOG    
12181619.LOG    TEST1   .TXT    12181818.LOG    12191026.LOG    12191027.LOG    
12191043.LOG    12191050.LOG    12192205.LOG    12192207.LOG    12192221.LOG    
12192225.LOG    12192227.LOG    1219222G.LOG    12192236.LOG    12192238.LOG    
12192250.LOG    12192252.LOG    12192256.LOG    12192258.LOG    12200748.LOG    
12200810.LOG    12200815.LOG    12200821.LOG    12200902.LOG    12200908.LOG    
12201954.LOG    12201956.LOG    12202007.LOG    12202050.LOG    12202056.LOG    
12210809.LOG    12210810.LOG    12210823.LOG    1221082C.LOG    12210852.LOG    
12210853.LOG    12210937.LOG    12210940.LOG    12211420.LOG    12211510.LOG    
12211600.LOG    12211605.LOG    12211608.LOG    12211612.LOG    12211648.LOG    
12211652.LOG    12211654.LOG    1221165D.LOG    12220930.LOG    12220941.LOG    
12220942.LOG    12220946.LOG    12220951.LOG    12221019.LOG    12221023.LOG    
12221026.LOG    1222102F.LOG    12221035.LOG    12221045.LOG    12221047.LOG    
12221054.LOG    12221126.LOG    12221128.LOG    12221208.LOG    12222155.LOG    
12222156.LOG    12222157.LOG    12222159.LOG    12222200.LOG    12222202.LOG    
12222204.LOG    12222206.LOG    12222220.LOG    12222222.LOG    12222233.LOG    
12222235.LOG    12230912.LOG    12230942.LOG    12230948.LOG    12230950.LOG    
12231105.LOG    12231106.LOG    12231118.LOG    12231120.LOG    12231130.LOG    
12231132.LOG    12231138.LOG    12231140.LOG    12231152.LOG    12231154.LOG    
12231317.LOG    12231322.LOG    12231942.LOG    12231344.LOG    12231348.LOG    
12231350.LOG    12231357.LOG    12231359.LOG    12231405.LOG    12231408.LOG    
12231409.LOG    12261142.LOG    12261144.LOG    12261201.LOG    12301101.LOG    
12301116.LOG    12261700.LOG    12301829.LOG    12301832.LOG    12302110.LOG    
12302155.LOG    12311134.LOG    12311135.LOG    12311137.LOG    12311139.LOG    
12311143.LOG    12311531.LOG    12311532.LOG    12311535.LOG    12311536.LOG    
12311537.LOG    01081450.LOG    02250934.LOG    02250936.LOG    02250942.LOG    
03031500.LOG    03031505.LOG    03031509.LOG    03031537.LOG    03031542.LOG    
03031543.LOG    03071401.LOG    03071405.LOG    03071412.LOG    03071413.LOG    
03071414.LOG    03071438.LOG    03071450.LOG    01110813.LOG    01110924.LOG    
01150827.LOG    01150828.LOG    01150830.LOG    01150832.LOG    01221800.LOG    
01221827.LOG    01221829.LOG    01231130.LOG    01231133.LOG    01290923.LOG    
01290934.LOG    01290935.LOG    01010000.LOG    0101000J.LOG    02151756.LOG    
02151805.LOG    0101000Z.LOG    02151900.LOG    02151901.LOG    02170804.LOG    
02170805.LOG    010100JZ.LOG    010100ZZ.LOG    01010JZZ.LOG    02170822.LOG    
02241559.LOG    02241749.LOG    02241750.LOG    0224175J.LOG    02241751.LOG    
>

ゴミが消えてLOGディレクトリが正常に表示されるようになりました。

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

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