mirror of
https://github.com/rvtr/TwlToolsRED.git
synced 2025-10-31 06:41:18 -04:00
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@591 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
parent
3d7f3cfeab
commit
c09eacf35a
Binary file not shown.
Binary file not shown.
@ -184,10 +184,10 @@ begin
|
|||||||
s := 'game_code = ';
|
s := 'game_code = ';
|
||||||
for i:=1 to 4 do s[12+i] := romh.game_code[i];
|
for i:=1 to 4 do s[12+i] := romh.game_code[i];
|
||||||
//ListBox_log.Items.Add(s); //game code
|
//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(' ');
|
//ListBox_log.Items.Add(' ');
|
||||||
Writeln(flog,s);
|
Writeln(flog,s);
|
||||||
Writeln(flog,'version = '+inttostr(romh.rom_version));
|
Writeln(flog,'rom_version = '+inttostr(romh.rom_version));
|
||||||
Writeln(flog);//改行
|
Writeln(flog);//改行
|
||||||
|
|
||||||
//オーバレイチェック
|
//オーバレイチェック
|
||||||
|
|||||||
@ -24,6 +24,7 @@ type
|
|||||||
private
|
private
|
||||||
{ Private 宣言 }
|
{ Private 宣言 }
|
||||||
function CheckSrlHeader:integer;
|
function CheckSrlHeader:integer;
|
||||||
|
function fstring(s:string):string;
|
||||||
public
|
public
|
||||||
{ Public 宣言 }
|
{ Public 宣言 }
|
||||||
end;
|
end;
|
||||||
@ -99,11 +100,32 @@ var
|
|||||||
|
|
||||||
implementation
|
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;
|
function TForm1.CheckSrlHeader: integer;
|
||||||
var
|
var
|
||||||
Rec: TSearchRec;
|
Rec: TSearchRec;
|
||||||
sf,s,ss: String;
|
sf,s,ss: String;
|
||||||
i,n,Count,err_files,ng_entry: integer;
|
i,j,n,Count,err_files,ng_entry: integer;
|
||||||
fsrl: file;
|
fsrl: file;
|
||||||
flog:TextFile;
|
flog:TextFile;
|
||||||
romh: TRomh;
|
romh: TRomh;
|
||||||
@ -162,10 +184,10 @@ begin
|
|||||||
s := 'game_code = ';
|
s := 'game_code = ';
|
||||||
for i:=1 to 4 do s[12+i] := romh.game_code[i];
|
for i:=1 to 4 do s[12+i] := romh.game_code[i];
|
||||||
//ListBox_log.Items.Add(s); //game code
|
//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(' ');
|
//ListBox_log.Items.Add(' ');
|
||||||
Writeln(flog,s);
|
Writeln(flog,s);
|
||||||
Writeln(flog,'version = '+inttostr(romh.rom_version));
|
Writeln(flog,'rom version = '+inttostr(romh.rom_version));
|
||||||
Writeln(flog);//改行
|
Writeln(flog);//改行
|
||||||
|
|
||||||
//オーバレイチェック
|
//オーバレイチェック
|
||||||
@ -177,6 +199,7 @@ begin
|
|||||||
nums := romh.main_ovt_size div 32;//Ovl count
|
nums := romh.main_ovt_size div 32;//Ovl count
|
||||||
noc_size :=0;//範囲外トータルsize
|
noc_size :=0;//範囲外トータルsize
|
||||||
noc_sectors := 0;// 同セクタ
|
noc_sectors := 0;// 同セクタ
|
||||||
|
j := 0;//通し番号
|
||||||
for i := 0 to nums-1 do begin
|
for i := 0 to nums-1 do begin
|
||||||
if CB_add_ovt.Checked then begin
|
if CB_add_ovt.Checked then begin
|
||||||
//OVT
|
//OVT
|
||||||
@ -199,10 +222,10 @@ begin
|
|||||||
ss := '(A9 Overlay'+inttostr(i);
|
ss := '(A9 Overlay'+inttostr(i);
|
||||||
//max_sectors = (DHT_OVERLAY_MAX/512 - total_sectors) / (nums-i);
|
//max_sectors = (DHT_OVERLAY_MAX/512 - total_sectors) / (nums-i);
|
||||||
if (total_sectors < 1024)then max_sectors := (1024 - total_sectors) div (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単位
|
btm := fat.bottom and $fffffe00; //512単位
|
||||||
if (fat.bottom and $1ff)<>0 then inc(btm,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;
|
top := fat.top;
|
||||||
sectors := (btm-top) shr 9;//div 512
|
sectors := (btm-top) shr 9;//div 512
|
||||||
if (top and $1ff)<>0 then inc(sectors);
|
if (top and $1ff)<>0 then inc(sectors);
|
||||||
@ -215,18 +238,21 @@ begin
|
|||||||
if size<>0 then begin
|
if size<>0 then begin
|
||||||
inc(top,512);////上方向に丸める
|
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(fat.top,8)
|
||||||
+'-0x' + inttohex(top-1,8)+ss;
|
+'-0x' + inttohex(top-1,8)+ss;
|
||||||
//ListBox_log.Items.Add(s);
|
//ListBox_log.Items.Add(s);
|
||||||
|
s := fstring(s);//整形
|
||||||
Writeln(flog,s);
|
Writeln(flog,s);
|
||||||
s := 'length'+ inttostr(i) + ' = 0x' + inttohex(size,4)
|
s := 'length'+ inttostr(j) + ' = 0x' + inttohex(size,4)
|
||||||
+ ' ; '+ inttostr(size)+' bytes';
|
+ ' ; '+ inttostr(size)+' bytes';
|
||||||
//ListBox_log.Items.Add(s);
|
//ListBox_log.Items.Add(s);
|
||||||
|
s := fstring(s);//整形
|
||||||
Writeln(flog,s);
|
Writeln(flog,s);
|
||||||
inc(noc_size,512);
|
inc(noc_size,512);
|
||||||
inc(noc_sectors);
|
inc(noc_sectors);
|
||||||
inc(all_sectors);
|
inc(all_sectors);
|
||||||
|
inc(j);
|
||||||
ng_flg:=true;
|
ng_flg:=true;
|
||||||
end;
|
end;
|
||||||
size := btm - top;
|
size := btm - top;
|
||||||
@ -244,17 +270,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
if sectors > 0 then begin//残りあり
|
if sectors > 0 then begin//残りあり
|
||||||
size := sectors shl 9;
|
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(top,8)
|
||||||
+'-0x' + inttohex(btm-1,8)+ss;
|
+'-0x' + inttohex(btm-1,8)+ss;
|
||||||
//ListBox_log.Items.Add(s);
|
//ListBox_log.Items.Add(s);
|
||||||
|
s :=fstring(s);//整形
|
||||||
Writeln(flog,s);
|
Writeln(flog,s);
|
||||||
s := 'length'+ inttostr(i) + ' = 0x' + inttohex(size,4)
|
s := 'length'+ inttostr(j) + ' = 0x' + inttohex(size,4)
|
||||||
+ ' ; '+ inttostr(size)+' bytes';
|
+ ' ; '+ inttostr(size)+' bytes';
|
||||||
//ListBox_log.Items.Add(s);
|
//ListBox_log.Items.Add(s);
|
||||||
|
s := fstring(s);//整形
|
||||||
Writeln(flog,s);
|
Writeln(flog,s);
|
||||||
inc(noc_size,size);
|
inc(noc_size,size);
|
||||||
inc(noc_sectors,sectors);
|
inc(noc_sectors,sectors);
|
||||||
|
inc(j);
|
||||||
end;
|
end;
|
||||||
if ng_flg then inc(ng_entry);
|
if ng_flg then inc(ng_entry);
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user