mirror of
https://github.com/a2-4am/passport.git
synced 2024-12-22 04:29:59 +00:00
commit
8e694a09b9
39
bin/po2do.js
Normal file
39
bin/po2do.js
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
kMap = [0x00,
|
||||||
|
0x0E,
|
||||||
|
0x0D,
|
||||||
|
0x0C,
|
||||||
|
0x0B,
|
||||||
|
0x0A,
|
||||||
|
0x09,
|
||||||
|
0x08,
|
||||||
|
0x07,
|
||||||
|
0x06,
|
||||||
|
0x05,
|
||||||
|
0x04,
|
||||||
|
0x03,
|
||||||
|
0x02,
|
||||||
|
0x01,
|
||||||
|
0x0F
|
||||||
|
]
|
||||||
|
|
||||||
|
a = new ActiveXObject("scripting.filesystemobject")
|
||||||
|
for (b = new Enumerator(a.GetFolder(WScript.Arguments(0)).files); !b.atEnd(); b.moveNext())
|
||||||
|
{
|
||||||
|
if (a.GetExtensionName(b.item()).toLowerCase() == "po")
|
||||||
|
{
|
||||||
|
fi = a.opentextfile(b.item())
|
||||||
|
fo = a.createtextfile(WScript.Arguments(1)+"\\"+a.GetBaseName(b.item())+".dsk", 1)
|
||||||
|
for (track = 0; track < 0x23; ++track)
|
||||||
|
{
|
||||||
|
sectors = new Array(0x10)
|
||||||
|
for (dos_sector = 0; dos_sector < 0x10; ++dos_sector)
|
||||||
|
{
|
||||||
|
sectors[kMap[dos_sector]] = fi.read(256)
|
||||||
|
}
|
||||||
|
for (dos_sector = 0; dos_sector < 0x10; ++dos_sector)
|
||||||
|
{
|
||||||
|
fo.write(sectors[dos_sector])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,9 @@ if "%1" equ "clean" (
|
|||||||
echo y|1>nul rd build /s
|
echo y|1>nul rd build /s
|
||||||
goto :EOF
|
goto :EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set BUILDDISK=build\passport
|
||||||
|
|
||||||
set ACME=acme
|
set ACME=acme
|
||||||
set EXOMIZER=exomize
|
set EXOMIZER=exomize
|
||||||
set CADIUS=cadius
|
set CADIUS=cadius
|
||||||
@ -28,6 +31,8 @@ cd ..
|
|||||||
1>nul copy res\work.po build\passport.po
|
1>nul copy res\work.po build\passport.po
|
||||||
1>nul copy res\_FileInformation.txt build\
|
1>nul copy res\_FileInformation.txt build\
|
||||||
%CADIUS% ADDFILE "build\passport.po" "/PASSPORT/" "build\PASSPORT.SYSTEM"
|
%CADIUS% ADDFILE "build\passport.po" "/PASSPORT/" "build\PASSPORT.SYSTEM"
|
||||||
|
cscript /nologo bin/po2do.js build\ build\
|
||||||
|
2>nul del "%BUILDDISK%.po"
|
||||||
goto :EOF
|
goto :EOF
|
||||||
*/
|
*/
|
||||||
new ActiveXObject("scripting.filesystemobject").createtextfile("tmp").write(String.fromCharCode(parseInt(WScript.arguments(0),16),String.fromCharCode(parseInt(WScript.arguments(1),16))))
|
new ActiveXObject("scripting.filesystemobject").createtextfile("tmp").write(String.fromCharCode(parseInt(WScript.arguments(0),16),String.fromCharCode(parseInt(WScript.arguments(1),16))))
|
||||||
|
Loading…
Reference in New Issue
Block a user