diff --git a/build/tools/A9Ovl_Chk/a9ovlchk.exe b/build/tools/A9Ovl_Chk/a9ovlchk.exe index 2e481af..4d17ced 100755 Binary files a/build/tools/A9Ovl_Chk/a9ovlchk.exe and b/build/tools/A9Ovl_Chk/a9ovlchk.exe differ diff --git a/build/tools/A9Ovl_Chk/main.dcu b/build/tools/A9Ovl_Chk/main.dcu index 169b680..030910e 100644 Binary files a/build/tools/A9Ovl_Chk/main.dcu and b/build/tools/A9Ovl_Chk/main.dcu differ diff --git a/build/tools/A9Ovl_Chk/main.pas b/build/tools/A9Ovl_Chk/main.pas index 7a5b359..9fbe9f7 100644 --- a/build/tools/A9Ovl_Chk/main.pas +++ b/build/tools/A9Ovl_Chk/main.pas @@ -184,10 +184,10 @@ begin s := 'game_code = '; for i:=1 to 4 do s[12+i] := romh.game_code[i]; //ListBox_log.Items.Add(s); //game code - //ListBox_log.Items.Add('version = '+inttostr(romh.rom_version)); + //ListBox_log.Items.Add('rom version = '+inttostr(romh.rom_version)); //ListBox_log.Items.Add(' '); Writeln(flog,s); - Writeln(flog,'version = '+inttostr(romh.rom_version)); + Writeln(flog,'rom_version = '+inttostr(romh.rom_version)); Writeln(flog);//改行 //オーバレイチェック diff --git a/build/tools/A9Ovl_Chk/main.~pas b/build/tools/A9Ovl_Chk/main.~pas index acf0f10..acc612c 100644 --- a/build/tools/A9Ovl_Chk/main.~pas +++ b/build/tools/A9Ovl_Chk/main.~pas @@ -24,6 +24,7 @@ type private { Private 宣言 } function CheckSrlHeader:integer; + function fstring(s:string):string; public { Public 宣言 } end; @@ -99,11 +100,32 @@ var implementation +function TForm1.fstring(s:string):string; +var + s1,s2,s3:string; + n,nn:integer; +begin + //'='まで切り出す + n := pos('=',s); + s1 := copy(s,0,n-1); + while length(s1) < 16 do s1 := s1+' '; + //';'まで切り出す + nn := pos(';',s); + s2 := copy(s,n,nn-n); + while length(s2) < 16 do s2 := s2+' '; + //残り + s3 := copy(s,nn,length(s)); + + Result := s1+s2+s3; + +end; + + function TForm1.CheckSrlHeader: integer; var Rec: TSearchRec; sf,s,ss: String; - i,n,Count,err_files,ng_entry: integer; + i,j,n,Count,err_files,ng_entry: integer; fsrl: file; flog:TextFile; romh: TRomh; @@ -162,10 +184,10 @@ begin s := 'game_code = '; for i:=1 to 4 do s[12+i] := romh.game_code[i]; //ListBox_log.Items.Add(s); //game code - //ListBox_log.Items.Add('version = '+inttostr(romh.rom_version)); + //ListBox_log.Items.Add('rom version = '+inttostr(romh.rom_version)); //ListBox_log.Items.Add(' '); Writeln(flog,s); - Writeln(flog,'version = '+inttostr(romh.rom_version)); + Writeln(flog,'rom version = '+inttostr(romh.rom_version)); Writeln(flog);//改行 //オーバレイチェック @@ -177,6 +199,7 @@ begin nums := romh.main_ovt_size div 32;//Ovl count noc_size :=0;//範囲外トータルsize noc_sectors := 0;// 同セクタ + j := 0;//通し番号 for i := 0 to nums-1 do begin if CB_add_ovt.Checked then begin //OVT @@ -199,10 +222,10 @@ begin ss := '(A9 Overlay'+inttostr(i); //max_sectors = (DHT_OVERLAY_MAX/512 - total_sectors) / (nums-i); if (total_sectors < 1024)then max_sectors := (1024 - total_sectors) div (nums-i) - else max_sectors := 0; + else max_sectors := 0; //CARDブート時、マイナスはエラー(FAT Broken)になる btm := fat.bottom and $fffffe00; //512単位 if (fat.bottom and $1ff)<>0 then inc(btm,512);//上方向に丸める - if max_sectors = 0 then begin//最大達したら丸ごと検証外 + if max_sectors = 0 then begin//丸ごと検証外 top := fat.top; sectors := (btm-top) shr 9;//div 512 if (top and $1ff)<>0 then inc(sectors); @@ -215,18 +238,21 @@ begin if size<>0 then begin inc(top,512);////上方向に丸める //先頭の未検証部分 .. 不要? - s := 'offset'+inttostr(i)+' = 0x'+ inttohex(fat.top,8) + s := 'offset'+inttostr(j)+' = 0x'+ inttohex(fat.top,8) +' ; 0x'+ inttohex(fat.top,8) +'-0x' + inttohex(top-1,8)+ss; //ListBox_log.Items.Add(s); + s := fstring(s);//整形 Writeln(flog,s); - s := 'length'+ inttostr(i) + ' = 0x' + inttohex(size,4) + s := 'length'+ inttostr(j) + ' = 0x' + inttohex(size,4) + ' ; '+ inttostr(size)+' bytes'; //ListBox_log.Items.Add(s); + s := fstring(s);//整形 Writeln(flog,s); inc(noc_size,512); inc(noc_sectors); inc(all_sectors); + inc(j); ng_flg:=true; end; size := btm - top; @@ -244,17 +270,20 @@ begin end; if sectors > 0 then begin//残りあり size := sectors shl 9; - s := 'offset'+inttostr(i)+' = 0x'+ inttohex(top,8) + s := 'offset'+inttostr(j)+' = 0x'+ inttohex(top,8) +' ; 0x'+ inttohex(top,8) +'-0x' + inttohex(btm-1,8)+ss; //ListBox_log.Items.Add(s); + s :=fstring(s);//整形 Writeln(flog,s); - s := 'length'+ inttostr(i) + ' = 0x' + inttohex(size,4) + s := 'length'+ inttostr(j) + ' = 0x' + inttohex(size,4) + ' ; '+ inttostr(size)+' bytes'; //ListBox_log.Items.Add(s); + s := fstring(s);//整形 Writeln(flog,s); inc(noc_size,size); inc(noc_sectors,sectors); + inc(j); end; if ng_flg then inc(ng_entry); end;