Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 24, 2020. It is now read-only.
/pcjs.v1Public archive

Commit1f723ec

Browse files
committed
Simplify PC11 device a bit
1 parent45e70ea commit1f723ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3638
-2685
lines changed

‎apps/pdp11/tapes/basic/DEC-11-AJPB-PB.json‎

Lines changed: 647 additions & 638 deletions
Large diffs are not rendered by default.

‎devices/pdp11/machine/1120/basic/debugger/new/pdp1120.json‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,20 @@
2929
"ram": {
3030
"class":"RAM",
3131
"addr":0,
32-
"size":16384,
33-
"values":"/apps/pdp11/tapes/basic/DEC-11-AJPB-PB.json"
32+
"size":16384
3433
},
3534
"iopage": {
3635
"class":"IOPage"
3736
},
37+
"dl11": {
38+
"class":"DL11"
39+
},
40+
"pc11": {
41+
"class":"PC11",
42+
"name":"PTR",
43+
"library":"/media/pdp11/tapes.json",
44+
"autoLoad":"BASIC (Single User)"
45+
},
3846
"cpu": {
3947
"class":"PDP11",
4048
"model":"KA11"

‎media/pdp11/tapes.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"media": [
3+
{
4+
"name":"BASIC (Single User)",
5+
"path":"/apps/pdp11/tapes/basic/DEC-11-AJPB-PB.json"
6+
}
7+
]
8+
}

‎modules/devices/bus/bus.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,18 @@ class Bus extends Device {
7171
* to the device's display requirements, but at the moment, all TI-57 config files have LED
7272
* ROM array support enabled, whether it's actually used or not.
7373
*/
74-
this.type=config['type']=="static"?Bus.TYPE.STATIC :Bus.TYPE.DYNAMIC;
75-
this.addrWidth=config['addrWidth']||16;
74+
this.type=this.config['type']=="static"?Bus.TYPE.STATIC :Bus.TYPE.DYNAMIC;
75+
this.addrWidth=this.config['addrWidth']||16;
7676
this.addrTotal=Math.pow(2,this.addrWidth);
7777
this.addrLimit=(this.addrTotal-1)|0;
78-
this.blockSize=config['blockSize']||(this.addrWidth>16?4096 :1024);
78+
this.blockSize=this.config['blockSize']||(this.addrWidth>16?4096 :1024);
7979
if(this.blockSize>this.addrTotal)this.blockSize=this.addrTotal;
8080
this.blockTotal=(this.addrTotal/this.blockSize)|0;
8181
this.blockShift=Math.log2(this.blockSize)|0;
8282
this.blockLimit=(1<<this.blockShift)-1;
83-
this.dataWidth=config['dataWidth']||8;
83+
this.dataWidth=this.config['dataWidth']||8;
8484
this.dataLimit=Math.pow(2,this.dataWidth)-1;
85-
this.littleEndian=config['littleEndian']!==false;
85+
this.littleEndian=this.config['littleEndian']!==false;
8686
this.blocks=newArray(this.blockTotal);
8787
this.nTraps=0;
8888
this.nDisableFaults=0;

‎modules/devices/bus/memory.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ class Memory extends Device {
5757
{
5858
super(idMachine,idDevice,config);
5959

60-
this.addr=config['addr'];
61-
this.size=config['size'];
62-
this.type=config['type']||Memory.TYPE.NONE;
60+
this.addr=this.config['addr'];
61+
this.size=this.config['size'];
62+
this.type=this.config['type']||Memory.TYPE.NONE;
6363

6464
/*
6565
* If no Bus ID was provided, then we fallback to the default Bus.
@@ -124,7 +124,7 @@ class Memory extends Device {
124124
this.readDataOrig=this.writeDataOrig=null;
125125
this.readPairOrig=this.writePairOrig=null;
126126

127-
this.getValues(config['values']);
127+
this.getValues(this.config['values']);
128128
this.initValues();
129129
}
130130

‎modules/devices/bus/ports.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class Ports extends Memory {
4848
* it's also possible that a device may dynamically allocate a Ports device and add it to the Bus itself
4949
* (eg, the PDP11 IOPage).
5050
*/
51-
if(config['addr']!=undefined){
52-
this.bus.addBlocks(config['addr'],config['size'],Memory.TYPE.NONE,this);
51+
if(this.config['addr']!=undefined){
52+
this.bus.addBlocks(this.config['addr'],this.config['size'],Memory.TYPE.NONE,this);
5353
}
5454
}
5555

‎modules/devices/bus/ram.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class RAM extends Memory {
4747
{
4848
config['type']=Memory.TYPE.NONE;
4949
super(idMachine,idDevice,config);
50-
this.bus.addBlocks(config['addr'],config['size'],Memory.TYPE.READWRITE);
50+
this.bus.addBlocks(this.config['addr'],this.config['size'],Memory.TYPE.READWRITE);
5151
this.whenReady(this.onReset.bind(this));
5252
}
5353
}

‎modules/devices/bus/rom.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class ROM extends Memory {
6262
{
6363
config['type']=Memory.TYPE.READONLY;
6464
super(idMachine,idDevice,config);
65-
this.bus.addBlocks(config['addr'],config['size'],config['type'],this);
65+
this.bus.addBlocks(this.config['addr'],this.config['size'],this.config['type'],this);
6666
this.whenReady(this.onReset.bind(this));
6767

6868
/*

‎modules/devices/cpu/debugger.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Debugger extends Device {
7878
* however, you can always coerce values to any base in any of those functions with
7979
* a prefix (eg, "0x" for hex) or suffix (eg, "." for decimal).
8080
*/
81-
this.nDefaultRadix=config['defaultRadix']||16;
81+
this.nDefaultRadix=this.config['defaultRadix']||16;
8282

8383
/*
8484
* Default endian (0 = little, 1 = big).
@@ -193,10 +193,10 @@ class Debugger extends Device {
193193
* Get access to the Bus devices, so we have access to the I/O and memory address spaces.
194194
* To minimize configuration redundancy, we rely on the CPU's configuration to get the Bus device IDs.
195195
*/
196-
letidBus=this.cpu.config['busMemory']||config['busMemory'];
196+
letidBus=this.cpu.config['busMemory']||this.config['busMemory'];
197197
if(idBus){
198198
this.busMemory=/**@type {Bus} */(this.findDevice(idBus));
199-
idBus=this.cpu.config['busIO']||config['busIO'];
199+
idBus=this.cpu.config['busIO']||this.config['busIO'];
200200
if(idBus){
201201
this.busIO=/**@type {Bus} */(this.findDevice(idBus,false));
202202
}

‎modules/devices/invaders/ports.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class InvadersPorts extends Ports {
4040
for(leti=0;i<buttonIDs.length;i++){
4141
this.input.addListener(Input.TYPE.IDMAP,buttonIDs[i],onButton);
4242
}
43-
this.switchConfig=config['switches']||{};
43+
this.switchConfig=this.config['switches']||{};
4444
this.defaultSwitches=this.parseSwitches(this.switchConfig['default'],0xff);
4545
this.setSwitches(this.defaultSwitches);
4646
this.onReset();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp