DiskDump updates
This commit is contained in:
parent
86cadeec0b
commit
b2d6e254ac
7 changed files with 61 additions and 45 deletions
File diff suppressed because one or more lines are too long
|
|
@ -18,33 +18,36 @@ RatBas (1982)
|
|||
|
||||
The RatBas Translator was a preprocessing utility created in 1982 by William F. Sharpe and Brent D. Weaver that
|
||||
could translate a structured dialect of BASIC into code compatible with IBM BASIC. It was described extensively
|
||||
in a [PC Magazine (October 1982)](#article-from-pc-magazine-october-1982) article.
|
||||
in a [PC Magazine (October 1982)](#article-from-pc-magazine-october-1982) article. NOTE: The article refers to
|
||||
the program as "RatBAS", but we use the distribution name "RatBas".
|
||||
|
||||
The only copy of RatBas we've been able to locate is version 2.13 from a
|
||||
shareware CD-ROM titled "[PC-SIG Library Eighth Edition From PC-SIG (April 1990)](http://cd.textfiles.com/pcsig08/)"
|
||||
on [DISK0003](http://cd.textfiles.com/pcsig08/001_100/DISK0003/).
|
||||
|
||||
We have archived it as [RatBas 2.13](#directory-listing-of-ratbas-213). It has been loaded into drive B: in
|
||||
the machine below.
|
||||
the machine below, which is running [PC-DOS 1.10](/disks/pcx86/dos/ibm/1.10/), the most recent version of PC-DOS
|
||||
at the time of this RatBas release.
|
||||
|
||||
{% include machine.html id="ibm5150" %}
|
||||
|
||||
Directory Listing of RatBas 2.13
|
||||
--------------------------------
|
||||
|
||||
Volume in drive A is RATBAS21
|
||||
Directory of A:\
|
||||
Volume in drive B is RATBAS 213
|
||||
Directory of B:\
|
||||
|
||||
CRC TXT 980 11-08-84 11:29p
|
||||
CRCK4 COM 1536 10-21-82 12:54p
|
||||
RATBAS TXT 30080 8-13-82 5:00p
|
||||
RATBAS UM 9856 8-09-82 5:00p
|
||||
RT EXE 35456 11-05-82 1:48a
|
||||
RT UM 3328 10-29-82 4:32a
|
||||
SORT INC 896 10-29-82 4:42a
|
||||
TEST BAS 5632 11-04-82 4:21p
|
||||
TEST RAT 2304 11-01-82 1:30a
|
||||
9 File(s) 68608 bytes free
|
||||
CRC TXT 980 11-08-84 11:29p
|
||||
CRCK4 COM 1536 10-21-82 12:54p
|
||||
RATBAS TXT 30080 08-13-82 5:00p
|
||||
RATBAS UM 9856 08-09-82 5:00p
|
||||
RT EXE 35456 11-05-82 1:48a
|
||||
RT UM 3328 10-29-82 4:32a
|
||||
SORT INC 896 10-29-82 4:42a
|
||||
TEST BAS 5632 11-04-82 4:21p
|
||||
TEST RAT 2304 11-01-82 1:30a
|
||||
9 file(s) 90068 bytes
|
||||
68608 bytes free
|
||||
|
||||
Here's the output of CRCK4:
|
||||
|
||||
|
|
@ -292,8 +295,8 @@ To solve this problem RatBAS includes an alternative IF structure. The syntax i
|
|||
.
|
||||
IFEND]
|
||||
|
||||
The <condition> may be any expression that will evaluate to true or false; <statement> may be any legal BASIC
|
||||
(or RatBAS) statement.
|
||||
The <condition> may be any expression that will evaluate to true or false; <statement> may be any legal
|
||||
BASIC (or RatBAS) statement.
|
||||
|
||||
Although not required, program readability is greatly enhanced if levels of logic are portrayed by indentation.
|
||||
|
||||
|
|
@ -329,9 +332,9 @@ RatBAS provides an additional structure not present in BASIC. Its syntax is:
|
|||
.
|
||||
CEND]
|
||||
|
||||
<lhs> may be anything that can be placed on the left side of the equality in an IF statement; <rhs> may be anything
|
||||
that can be placed on the right side of the equality. Optionally, <rhs> may be composed of two or more such
|
||||
expressions, separated by commas. If OTHERWISE) is omitted, an implicit OTHERWISE) with no statements is assumed.
|
||||
<lhs> may be anything that can be placed on the left side of the equality in an IF statement; <rhs> may be
|
||||
anything that can be placed on the right side of the equality. Optionally, <rhs> may be composed of two or more
|
||||
such expressions, separated by commas. If OTHERWISE) is omitted, an implicit OTHERWISE) with no statements is assumed.
|
||||
|
||||
CASE name$ OF]
|
||||
"Bill","BILL" :]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<publisher>Wells Fargo Investment Advisors</publisher>
|
||||
<releaseDate>1982</releaseDate>
|
||||
<machine href="/devices/pcx86/machine/5150/cga/256kb/machine.xml" state=""/>
|
||||
<disk id="disk01" chs="40:1:8" dir="archive/ratbas213" href="/apps/pcx86/1982/ratbas/RATBAS213.json" md5="6652781f426964186ddb580dcd97a99a" md5json="e5106a311963fb7eefa8eefd401ce28c">
|
||||
<disk id="disk01" chs="40:1:8" dir="archive/ratbas.213" href="/apps/pcx86/1982/ratbas/RATBAS213.json" md5="e7d98dd3d0de9121fbb56fb2af72d1c7" md5json="7bcaa7519192850f3186335860b41e81">
|
||||
<name>RatBas 2.13</name>
|
||||
<file size="980" time="1984-11-08 23:29:03" attr="0x20" md5="3b52aae896f7f61d6d13634783009a6f">CRC.TXT</file>
|
||||
<file size="1536" time="1982-10-21 12:54:21" attr="0x20" md5="2860a82e8371c406bf3e17020f5baa8e">CRCK4.COM</file>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -151,18 +151,19 @@ those files:
|
|||
|
||||
Here's a directory listing of the resulting 160Kb disk image:
|
||||
|
||||
Volume in drive A is PCJS ORG
|
||||
Volume in drive A is ADVEMATH100
|
||||
Directory of A:\
|
||||
|
||||
ADVENTUR BAS 18688 8-11-83 12:00p
|
||||
CASTLE BAS 11904 8-11-83 12:00p
|
||||
EXIT BAS 6400 8-11-83 12:00p
|
||||
HELP BAS 4992 8-11-83 12:00p
|
||||
MAZE1 1418 8-11-83 12:00p
|
||||
MAZE2 2179 8-11-83 12:00p
|
||||
MAZE3 3892 8-11-83 12:00p
|
||||
SN 13 8-11-83 12:00p
|
||||
8 File(s) 108544 bytes free
|
||||
ADVENTUR BAS 18688 08-11-83 12:00p
|
||||
CASTLE BAS 11904 08-11-83 12:00p
|
||||
EXIT BAS 6400 08-11-83 12:00p
|
||||
HELP BAS 4992 08-11-83 12:00p
|
||||
MAZE1 1418 08-11-83 12:00p
|
||||
MAZE2 2179 08-11-83 12:00p
|
||||
MAZE3 3892 08-11-83 12:00p
|
||||
SN 13 08-11-83 12:00p
|
||||
8 file(s) 49486 bytes
|
||||
108544 bytes free
|
||||
|
||||
This disk has now been added to the PCjs [IBM PC Disk Library](/disks/pcx86/) as "Adventures in Math (1983)".
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<publisher>IBM</publisher>
|
||||
<releaseDate>1983</releaseDate>
|
||||
<machine href="/devices/pcx86/machine/5150/cga/64kb/machine.xml" state=""/>
|
||||
<disk id="disk01" chs="40:1:8" dir="archive/adventmath" href="/apps/pcx86/1983/adventmath/ADVENTMATH100.json" md5="896676add6fedf5220f30084f40aebb1" md5json="3d69f485fcbfe0ac7f0af070c43f944f">
|
||||
<disk id="disk01" chs="40:1:8" dir="archive/advemath.100" href="/apps/pcx86/1983/adventmath/ADVENTMATH100.json" md5="fb1c4d22b2488a971118d656423036d5" md5json="587fbf3d04963b12c11d5cd53dc9e483">
|
||||
<name>Adventures in Math 1.00</name>
|
||||
<file size="18688" time="1983-08-11 12:00:12" attr="0x20" md5="79d17f58ca8232b7173b80dd05b13b70">ADVENTUR.BAS</file>
|
||||
<file size="11904" time="1983-08-11 12:00:14" attr="0x20" md5="fb1ec8042448618b7bdf3ce996b1daa8">CASTLE.BAS</file>
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ DiskDump.sUsage = "Usage: " + DiskDump.sAPIURL + "?" + DumpAPI.QUERY.PATH + "={u
|
|||
* PCJS_LABEL is our default label, used whenever a more suitable label (eg, the disk image's folder name)
|
||||
* is not available or not supplied, and PCJS_OEM is inserted into any DiskDump-generated diskette images.
|
||||
*/
|
||||
DiskDump.PCJS_LABEL = "PCJS.ORG";
|
||||
DiskDump.PCJS_LABEL = "PCJS";
|
||||
DiskDump.PCJS_OEM = "PCJS.ORG";
|
||||
|
||||
/**
|
||||
|
|
@ -1688,10 +1688,10 @@ DiskDump.prototype.readDir = function(sDir, fRoot, done)
|
|||
if (obj.isTextFile(fileInfo.FILE_NAME)) {
|
||||
fs.readFile(fileInfo.FILE_PATH, {encoding: "utf8"}, function doneReadDirEntry(err, sData) {
|
||||
if (!err) {
|
||||
sData = sData.replace(/\n/g, "\r\n").replace(/\r+/g, "\r");
|
||||
console.log("warning: replaced line endings in " + fileInfo.FILE_NAME + " (size changed from " + fileInfo.FILE_SIZE + " to " + sData.length + " bytes)");
|
||||
fileInfo.FILE_DATA = sData;
|
||||
fileInfo.FILE_SIZE = sData.length;
|
||||
var sNew = sData.replace(/\n/g, "\r\n").replace(/\r+/g, "\r");
|
||||
if (sNew != sData) console.log("warning: replaced line endings in " + fileInfo.FILE_NAME + " (size changed from " + fileInfo.FILE_SIZE + " to " + sNew.length + " bytes)");
|
||||
fileInfo.FILE_DATA = sNew;
|
||||
fileInfo.FILE_SIZE = sNew.length;
|
||||
} else {
|
||||
if (!errSave) errSave = err;
|
||||
}
|
||||
|
|
@ -1819,10 +1819,10 @@ DiskDump.prototype.readPath = function(sPath, done)
|
|||
if (obj.isTextFile(fileInfo.FILE_NAME)) {
|
||||
DiskDump.readFile(sFilePath, "utf8", function doneReadPathEntry(err, sData) {
|
||||
if (!err) {
|
||||
sData = sData.replace(/\n/g, "\r\n").replace(/\r+/g, "\r");
|
||||
console.log("warning: replaced line endings in " + fileInfo.FILE_NAME + " (size changed from " + fileInfo.FILE_SIZE + " to " + sData.length + " bytes)");
|
||||
fileInfo.FILE_DATA = sData;
|
||||
fileInfo.FILE_SIZE = sData.length;
|
||||
var sNew = sData.replace(/\n/g, "\r\n").replace(/\r+/g, "\r");
|
||||
if (sNew != sData) console.log("warning: replaced line endings in " + fileInfo.FILE_NAME + " (size changed from " + fileInfo.FILE_SIZE + " to " + sNew.length + " bytes)");
|
||||
fileInfo.FILE_DATA = sNew;
|
||||
fileInfo.FILE_SIZE = sNew.length;
|
||||
// obj.addManifestInfo(fileInfo);
|
||||
} else {
|
||||
if (!errSave) errSave = err;
|
||||
|
|
@ -1892,6 +1892,10 @@ DiskDump.prototype.buildVolLabel = function(sDir)
|
|||
var fileInfo = null;
|
||||
if (sDir) {
|
||||
sVolume = path.basename(sDir);
|
||||
/*
|
||||
* UPDATE: This all seems overly restrictive. I don't even remember what I was thinking
|
||||
* here anymore. Let's just build a frickin' label.
|
||||
*
|
||||
if (sVolume == sVolume.toUpperCase()) {
|
||||
var i = sVolume.indexOf('-');
|
||||
if (i > 0) {
|
||||
|
|
@ -1902,11 +1906,17 @@ DiskDump.prototype.buildVolLabel = function(sDir)
|
|||
sVolume = sVolume.substr(i+1);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
if (!sVolume || sVolume.toLowerCase() == "archive" || sVolume.toLowerCase() == "disk") {
|
||||
/*
|
||||
* UPDATE: If I was lazy and just dumped all the files for this disk image into a folder
|
||||
* generically named either "archive" or "disk", then let's give it more meaningful name for
|
||||
* the outside world (ie, the name of this project).
|
||||
*/
|
||||
sVolume = DiskDump.PCJS_LABEL;
|
||||
}
|
||||
if (sVolume && sVolume.length <= 11) {
|
||||
if (sVolume) {
|
||||
fileInfo = {};
|
||||
fileInfo.FILE_NAME = this.buildName(sVolume);
|
||||
fileInfo.FILE_ATTR = DiskDump.ATTR_VOLUME;
|
||||
|
|
@ -1914,8 +1924,10 @@ DiskDump.prototype.buildVolLabel = function(sDir)
|
|||
* I used to initialize the volume label's date with a simple "new Date()", but because that results
|
||||
* in a different disk image every time we run DiskDump, I've opted for a hard-coded date/time (ie, the
|
||||
* day the IBM PC was introduced, August 12, 1981, with an arbitrary time of 12pm).
|
||||
*
|
||||
* UPDATE: I'm not sure I care about that anymore. Time-stamping the created disk image seems more useful.
|
||||
*/
|
||||
fileInfo.FILE_TIME = fNormalize? new Date(1981, 7, 12, 12) : new Date();
|
||||
fileInfo.FILE_TIME = /* fNormalize? new Date(1981, 7, 12, 12) : */ new Date();
|
||||
this.validateTime(fileInfo.FILE_TIME);
|
||||
fileInfo.FILE_SIZE = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue