Updated BIOS and BASIC information

This commit is contained in:
Jeff Parsons 2016-04-17 08:49:37 -07:00
commit 217c0c0f49
7 changed files with 4153 additions and 27 deletions

View file

@ -47,12 +47,8 @@ for example, models 5150 through 5170 refer to IBM PC models.
---
The IBM BASIC ROMs require a bit more research. I'm a little unclear on the precise history of the BASIC ROMs and
exactly which version shipped with each IBM PC machine revision.
The project currently includes only two BASIC ROM versions, 1.00 and 1.10, which were initially released with the
first model 5150 and 5160 machines, respectively. However, I've also read reports that later revisions of the model
5150 included BASIC ROM 1.10 as well.
The project currently includes only two BASIC ROM versions, C1.00 and C1.10, which were initially released with the
first model 5150 and 5160 machines, respectively. For more details, see [IBM PC ROMs](/devices/pc/rom/).
I believe there was also a BASIC ROM version 1.20 released for IBM PCjr, but since PCjs does not yet emulate the PCjr,
it has not been added to the project.

View file

@ -6,18 +6,21 @@ redirect_from:
- /devices/pc/basic/
---
BASIC ROMs
IBM PC BASIC ROMs
---
The project contains the following BASIC ROMs:
The project contains the following IBM PC BASIC ROMs:
* [BASIC 1.00](BASIC100.json)
* [BASIC 1.10](../../5160/basic/BASIC110.json)
* [IBM BASIC C1.00](BASIC100.json)
* [IBM BASIC C1.10](../../5160/basic/BASIC110.json)
These built-in versions of BASIC were also referred to as *Cassette BASIC*, because no disk drive was required.
These built-in versions of BASIC were also referred to as Cassette BASIC, because no disk drive was required.
Only the original IBM PC (Model 5150) actually provided a cassette interface, but IBM continued to use that
name to describe the built-in BASIC at least up through the IBM PC AT (Model 5170).
name to describe the built-in BASIC, at least up through the IBM PC AT (Model 5170).
Both versions of Cassette BASIC where 32Kb and spanned physical addresses 0xF6000-0xFDFFF. They were produced by
Microsoft, and unlike the IBM PC BIOS ROMs, no source code listings of these BASIC ROMs were ever published.
Here's an [IBM PC Machine](/devices/pc/machine/) XML excerpt that shows how to include a BASIC ROM:
<rom id="romBASIC" addr="0xf6000" size="0x8000" file="/devices/pc/rom/5160/basic/BASIC110.json"/>
<rom id="romBASIC" addr="0xf6000" size="0x8000" file="/devices/pc/rom/5150/basic/BASIC100.json"/>

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -16,20 +16,49 @@ for each ROM in the machine; eg:
### BASIC ROMs
The project contains the following IBM PC BASIC ROMs:
The project contains the following [IBM PC BASIC ROMs](/devices/pc/rom/5150/basic/):
* [IBM BASIC 1.00](5150/basic/BASIC100.json)
* [IBM BASIC 1.10](5160/basic/BASIC110.json)
* [IBM BASIC C1.00](5150/basic/BASIC100.json)
* [IBM BASIC C1.10](5160/basic/BASIC110.json)
We informally refer to version C1.00 as the Model 5150 version, and C1.10 as the Model 5160 (and later) version of
Cassette BASIC. It's true that the last few Model 5150 machines produced were upgraded with version C1.10, but we
are simply referring to the respective model with which each version of Cassette BASIC was *introduced*.
### BIOS ROMs
The project contains the following IBM PC BIOS ROMs:
* [Model 5150: Apr 24, 1981](5150/1981-04-24/PCBIOS-REV1.json)
* [Model 5150: Oct 19, 1981](5150/1981-10-19/PCBIOS-REV2.json)
* [Model 5150: Oct 27, 1982](5150/1982-10-27/PCBIOS-REV3.json)
* [Model 5160: Nov 08, 1982](5160/1982-11-08/XTBIOS-REV1.json)
* [Model 5160: May 09, 1986](5160/1986-05-09/XTBIOS-REV3.json)
* [Model 5150: Apr 24, 1981](5150/1981-04-24/PCBIOS-REV1.json) (included with [IBM BASIC C1.00](5150/basic/BASIC100.json))
* [Model 5150: Oct 19, 1981](5150/1981-10-19/PCBIOS-REV2.json) (included with [IBM BASIC C1.00](5150/basic/BASIC100.json))
* [Model 5150: Oct 27, 1982](5150/1982-10-27/PCBIOS-REV3.json) (included with [IBM BASIC C1.00](5150/basic/BASIC100.json) *or* [IBM BASIC C1.10](5160/basic/BASIC110.json))
* [Model 5160: Nov 08, 1982](5160/1982-11-08/XTBIOS-REV1.json) (included with [IBM BASIC C1.10](5160/basic/BASIC110.json))
* [Model 5160: Jan 10, 1986](5160/1986-01-10/XTBIOS-REV2.json) (includes [IBM BASIC C1.10](5160/basic/BASIC110.json))
* [Model 5160: May 09, 1986](5160/1986-05-09/XTBIOS-REV3.json) (includes [IBM BASIC C1.10](5160/basic/BASIC110.json))
As hinted above, some newer Model 5150 machines with the **Oct 27, 1982** BIOS included IBM BASIC C1.10. And
some even *newer* 5150 machines had a BIOS with a "1982" copyright year instead of "1981", which also changed the checksum
byte from 0x78 to 0x77. However, the project includes only the original "1981" version, since the difference was trivial.
In general, IBM BASIC ROM images are 32Kb and IBM BIOS ROM images are 8Kb, and together they provided 40Kb of contiguous
read-only memory, with the BASIC ROM spanning physical addresses 0xF6000-0xFDFFF and the BIOS ROM spanning addresses
0xFE000-0xFFFFF.
However, starting with Model 5160 ROM images dated **Jan 10, 1986**, our ROM images are actually 64Kb images that
span addresses 0xF0000-0xFFFFF and include IBM BASIC C1.10 at offset 0x6000 (physical address 0xF6000), so there's no
need to load the BASIC ROM separately. That trend continued with the IBM PC AT Model 5170, whose ROM images are also
64Kb and all contain IBM BASIC C1.10.
Apparently, even the first Model 5160 was socketed for two 32Kb ROMs, but it came with an 8Kb ROM in the first socket,
so that ROM (containing the first 8Kb of IBM BASIC C1.10) appeared at multiple addresses: 0xF0000, 0xF2000, 0xF4000,
and 0xF6000. None of our Model 5160 machine configurations emulate that layout, but it could easily be done,
by extracting the first 8Kb of IBM BASIC C1.10 into a separate image and explicitly mapping it at each of those four
addresses.
See this [diagram](http://www.minuszerodegrees.net/5160/misc/5160_memory_layout_of_bios_and_basic.jpg) for a more
visual description of the Model 5160's ROM layout.
---
The project also contains BIOS ROMs, along with more detailed information, for the following machines:

View file

@ -594,9 +594,9 @@ b+" changes applied)";b=-1;break}if(this.ef){c="unable to modify write-protected
m.toJSON=function(){var a;a=0;for(var b;b=Yo(this,a++);)qp(b);a=JSON.stringify(this.A,function(a,b){return"file"==a?void 0:b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
function qp(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function rp(a){Ua.call(this,"FDC",a,rp,524288);this.dmaRead=this.wk;this.dmaWrite=this.xk;this.dmaFormat=this.Lk;this.U=a.autoMount||null;this.ga=a.sortBy||"name";"none"==this.ga&&(this.ga=null);this.B=[];this.ja=!Ga("Mobi")&&window&&"FileReader"in window}db(rp);aa={};
var sp={3:{Vd:3,ie:0,name:aa.Zn},4:{Vd:2,ie:1,name:aa.Xn},5:{Vd:9,ie:7,name:aa.io},6:{Vd:9,ie:7,name:aa.Sn},7:{Vd:2,ie:0,name:aa.Un},8:{Vd:1,ie:2,name:aa.Yn},10:{Vd:2,ie:7,name:aa.Tn},13:{Vd:6,ie:7,name:aa.En},15:{Vd:3,ie:0,name:aa.Wn}};m=rp.prototype;
m.Qb=function(a,b,c){var d=this;switch(b){case "listDisks":this.qa[b]=c;if(this.ga){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.ga?a.text>b.text?1:a.text<b.text?-1:0:a.value>b.value?1:a.value<b.value?-1:0});for(a=0;a<b.length;a++)c.options[a]=b[a]}c.onchange=function(){var a=d.qa.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("FDC option error: "+h.message)}b=g.desc;void 0===
b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ca(c.value,10);null!=a&&tp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&up(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ja){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&(a=ca(a.value,
10),(a=d.A[a])?(a=a.za)?(a=Ia(pp(a),"octet-stream",!0,a.Ng.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(!this.ja){c.parentNode.removeChild(c);break}this.qa[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;up(d,fa(b,!0),b,a)}return!1};return!0}return!1};
m.Qb=function(a,b,c){var d=this;switch(b){case "listDisks":this.qa[b]=c;if(this.ga){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.ga?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)c.options[a]=b[a]}c.onchange=function(){var a=d.qa.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){w("FDC option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=
g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.qa[b]=c,c.onchange=function(){var a=ca(c.value,10);null!=a&&tp(d,a)},!0;case "loadDrive":return this.qa[b]=c,c.onclick=function(){var a=d.qa.listDisks;a&&up(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.ja){c.parentNode.removeChild(c);break}this.qa[b]=c;c.onclick=function(){var a=d.qa.listDrives;a&&a.options&&d.A&&(a=ca(a.value,10),(a=
d.A[a])?(a=a.za)?(a=Ia(pp(a),"octet-stream",!0,a.Ng.replace(".json",".img")),w(a)):d.Na("No diskette loaded in drive."):d.Na("No diskette drive selected."))};return!0;case "mountDrive":if(!this.ja){c.parentNode.removeChild(c);break}this.qa[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;up(d,fa(b,!0),b,a)}return!1};return!0}return!1};
m.Ic=function(a,b,c,d){this.ea=b;this.F=c;this.ha=d;this.V=a;this.N=Eb(a,"ChipSet");if((this.U=Nc(this.V,"autoMount")||this.U)&&"string"==typeof this.U)try{this.U=eval("("+this.U+")")}catch(e){w("FDC auto-mount error: "+e.message+" ("+this.U+")"),this.U=null}vp(this);hc(b,this,wp);lc(b,this,xp);yp(this,"None","",!0);this.ja&&yp(this,"Local Disk","?");yp(this,"Remote Disk","??");zp(this)||rb(this)};
m.ic=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.V.dh){this.B=[];for(var c=0;c<this.A.length;c++)Ap(this,c,!0);zp(this,!0)}}else if(!this.restore(a))return!1;if(c=this.qa.listDrives){for(;c.firstChild;)c.removeChild(c.firstChild);c.value="";for(var d=0;d<this.ka;d++){var e=document.createElement("option");e.value=d;e.text=String.fromCharCode(65+d)+":";c.appendChild(e)}0<this.ka&&(c.value="0",tp(this,0))}}return!0};m.hc=function(a){return a?this.save():!0};m.reset=function(){vp(this)};
m.save=function(){var a=new hf(this),b=0,c=[];c[b++]=this.hb;c[b++]=0;c[b++]=this.ma;c[b++]=this.W;c[b++]=this.L;c[b++]=this.C;c[b++]=this.aa;for(var d=b++,e=0,f=[],g=0;g<this.A.length;g++){var h=e++,k=this.A[g],l=0,n=[];n[l++]=k.Cb;n[l++]=[k.name,k.Bb,k.ub,k.lb,k.Va,k.bf,k.zg,k.Nf,k.Of];n[l++]=k.kb;n[l++]=k.ge+100;n[l++]=k.Rb;n[l++]=k.xb;n[l++]=k.he;n[l++]=k.Hb;n[l++]=k.eb;n[l++]=k.$e;n[l++]=k.kk;n[l]=k.Le;f[h]=n}c[d]=f;d=b++;for(e=0;e<this.A.length;e++)f=this.A[e],f.za&&Bp(this,f.Le,f.za);c[d]=

View file

@ -543,9 +543,9 @@ b+" changes applied)";b=-1;break}if(this.re){c="unable to modify write-protected
l.toJSON=function(){var a;a=0;for(var b;b=im(this,a++);)qm(b);a=JSON.stringify(this.A,function(a,b){return"file"==a?void 0:b});a=a.replace(/,"length":512/gm,"").replace(/,"pattern":0/gm,"");a=a.replace(/"(sector|length|data|pattern)":/gm,"$1:");a=a.replace(/,"[^"]*":([0-9]+|true|false)/gm,"");a=a.replace(/(sector|length|data|pattern):/gm,'"$1":');return a=a.replace(/([\]}]),/gm,"$1,\n")};
function qm(a){var b=a.data,c=b.length;if(c<<2==a.length){for(var d=c-1,e=b[d],f=0;d--&&b[d]===e;)f++;f++&&(b.length=c-f,a.pattern=e)}}function rm(a){Ia.call(this,"FDC",a,rm);this.dmaRead=this.qj;this.dmaWrite=this.rj;this.dmaFormat=this.Cj;this.K=a.autoMount||null;this.W=a.sortBy||"name";"none"==this.W&&(this.W=null);this.C=[];this.Y=!ya("Mobi")&&window&&"FileReader"in window}Qa(rm);aa={};
var sm={3:{jd:3,yd:0,name:aa.Fm},4:{jd:2,yd:1,name:aa.Dm},5:{jd:9,yd:7,name:aa.Nm},6:{jd:9,yd:7,name:aa.ym},7:{jd:2,yd:0,name:aa.Am},8:{jd:1,yd:2,name:aa.Em},10:{jd:2,yd:7,name:aa.zm},13:{jd:6,yd:7,name:aa.km},15:{jd:3,yd:0,name:aa.Cm}};l=rm.prototype;
l.zb=function(a,b,c){var d=this;switch(b){case "listDisks":this.ka[b]=c;if(this.W){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.W?a.text>b.text?1:a.text<b.text?-1:0:a.value>b.value?1:a.value<b.value?-1:0});for(a=0;a<b.length;a++)c.options[a]=b[a]}c.onchange=function(){var a=d.ka.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){n("FDC option error: "+h.message)}b=g.desc;void 0===
b&&(b="");g=g.href;void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.ka[b]=c,c.onchange=function(){var a=ca(c.value,10);null!=a&&tm(d,a)},!0;case "loadDrive":return this.ka[b]=c,c.onclick=function(){var a=d.ka.listDisks;a&&um(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.ka[b]=c;c.onclick=function(){var a=d.ka.listDrives;a&&a.options&&d.B&&(a=ca(a.value,
10),(a=d.B[a])?(a=a.ta)?(a=za(pm(a),"octet-stream",!0,a.nh.replace(".json",".img")),n(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.ka[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;um(d,fa(b,!0),b,a)}return!1};return!0}return!1};
l.zb=function(a,b,c){var d=this;switch(b){case "listDisks":this.ka[b]=c;if(this.W){b=[];for(a=0;a<c.options.length;a++)b.push(c.options[a]);b.sort(function(a,b){return"path"!=d.W?a.text.localeCompare(b.text):a.value.localeCompare(b.value)});for(a=0;a<b.length;a++)c.options[a]=b[a]}c.onchange=function(){var a=d.ka.descDisk,b=c.options[c.selectedIndex];if(a&&b){var g={};if(b=b.getAttribute("data-value"))try{g=eval("("+b+")")}catch(h){n("FDC option error: "+h.message)}b=g.desc;void 0===b&&(b="");g=g.href;
void 0!==g&&(b='<a href="'+g+'" target="_blank">'+b+"</a>");a.innerHTML=b}};return!0;case "descDisk":case "listDrives":return this.ka[b]=c,c.onchange=function(){var a=ca(c.value,10);null!=a&&tm(d,a)},!0;case "loadDrive":return this.ka[b]=c,c.onclick=function(){var a=d.ka.listDisks;a&&um(d,a.options[a.selectedIndex].text,a.value)},!0;case "saveDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.ka[b]=c;c.onclick=function(){var a=d.ka.listDrives;a&&a.options&&d.B&&(a=ca(a.value,10),(a=d.B[a])?
(a=a.ta)?(a=za(pm(a),"octet-stream",!0,a.nh.replace(".json",".img")),n(a)):d.Ba("No diskette loaded in drive."):d.Ba("No diskette drive selected."))};return!0;case "mountDrive":if(!this.Y){c.parentNode.removeChild(c);break}this.ka[b]=c;c.addEventListener("change",function(){var a=c.children[0];a.children[1].disabled=!a.children[0].files.length});c.onsubmit=function(a){if(a=a.currentTarget[1].files[0]){var b=a.name;um(d,fa(b,!0),b,a)}return!1};return!0}return!1};
l.pc=function(a,b,c,d){this.ha=b;this.A=c;this.Ia=d;this.ba=a;this.P=kb(a,"ChipSet");if((this.K=jc(this.ba,"autoMount")||this.K)&&"string"==typeof this.K)try{this.K=eval("("+this.K+")")}catch(e){n("FDC auto-mount error: "+e.message+" ("+this.K+")"),this.K=null}vm(this);Nb(b,this,wm);Pb(b,this,xm);ym(this,"None","",!0);this.Y&&ym(this,"Local Disk","?");ym(this,"Remote Disk","??");zm(this)||ab(this)};
l.Vb=function(a,b){if(!b){if(!a||!this.restore){if(this.reset(),this.ba.jg){this.C=[];for(var c=0;c<this.B.length;c++)Am(this,c,!0);zm(this,!0)}}else if(!this.restore(a))return!1;if(c=this.ka.listDrives){for(;c.firstChild;)c.removeChild(c.firstChild);c.value="";for(var d=0;d<this.Z;d++){var e=document.createElement("option");e.value=d;e.text=String.fromCharCode(65+d)+":";c.appendChild(e)}0<this.Z&&(c.value="0",tm(this,0))}}return!0};l.Ub=function(a){return a?this.save():!0};l.reset=function(){vm(this)};
l.save=function(){var a=new ce(this),b=0,c=[];c[b++]=this.Qa;c[b++]=0;c[b++]=this.aa;c[b++]=this.I;c[b++]=this.G;c[b++]=this.D;c[b++]=this.S;for(var d=b++,e=0,f=[],g=0;g<this.B.length;g++){var h=e++,k=this.B[g],m=0,p=[];p[m++]=k.kb;p[m++]=[k.name,k.ib,k.jb,k.eb,k.nb,k.oe,k.Hf,k.Ue,k.Ve];p[m++]=k.Ya;p[m++]=k.wd+100;p[m++]=k.xb;p[m++]=k.mb;p[m++]=k.xd;p[m++]=k.wb;p[m++]=k.Ua;p[m++]=k.me;p[m++]=k.ij;p[m]=k.Vd;f[h]=p}c[d]=f;d=b++;for(e=0;e<this.B.length;e++)f=this.B[e],f.ta&&Bm(this,f.Vd,f.ta);c[d]=this.C;