-
Notifications
You must be signed in to change notification settings - Fork 9
/
pdp11.html
executable file
·2350 lines (2012 loc) · 86 KB
/
pdp11.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Javascript PDP 11/70 Emulator v1.8</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8">
<meta name="description" content="Javascript PDP 11/70 Emulator v1.8">
<meta name="keywords" content="PDP,11,11/70,11/45,Console Panel,RSTS/E Idle Loop,Emulator,Emulation,JavaScript">
<meta name="author" content="Paul Nankervis">
<!--Send feedback, fixes and suggestions to Paul Nankervis at [email protected]>
<!--I'm particularly interested in hearing from anyone with real experience on a PDP 11/70 front panel-->
<style type="text/css">
.panel {
height: 304;
width: 720;
position: relative;
color: white;
font-family: palatino, verdana;
font-size: 5px;
vertical-align: middle;
background-color: #202020;
}
.base {
top: 0;
left: 0;
height: 10px;
width: 66px;
font-size: 6px;
background-color: #EA2020;
text-align: right;
position: absolute;
float: left;
}
.ledpad {
top: 10;
height: 34px;
width: 21px;
background-color: black;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
align: centre;
text-align: center;
vertical-align: middle;
position: absolute;
float: left;
}
.led {
top: 14;
left: 6;
height: 9px;
width: 9px;
border-radius: 3px;
background-color: red;
position: absolute;
float: left;
}
.switch_background_top {
height: 90px;
width: 154px;
border-radius: 5px;
position: absolute;
background-color: #000000;
line-height: 7px;
float: left;
}
.switch_background_bottom {
height: 44px;
width: 154px;
border-radius: 5px;
position: absolute;
background-color: #000000;
line-height: 7px;
float: left;
}
.switch_pad {
height: 28px;
width: 21px;
border-radius: 6px;
position: absolute;
background-color: #D01010;
line-height: 28px;
float: left;
}
.switchRed {
top: 0;
height: 2;
width: 9;
background: #E03030;
position: absolute;
border-top: 22px solid #D02020;
border-bottom: 22px solid #701010;
border-left: 6px solid #303030;
border-right: 6px solid #202020;
transition: .4s;
}
.switchPurple {
top: 0;
height: 2;
width: 9;
background: #A010A0;
position: absolute;
border-top: 22px solid #801080;
border-bottom: 22px solid #500050;
border-left: 6px solid #303030;
border-right: 6px solid #202020;
transition: .4s;
}
.leddiv {
height: 9px;
width: 9px;
border-radius: 3px;
background-color: red;
visibility: hidden;
float: left;
}
.rotary-switch {
position: absolute;
border: solid 1px #202020;
border-radius: 50%;
background: linear-gradient(0deg, #b0b0c0, #020212 25%, #404050 35%, #303040 65%, #020212 75%, #b0b0c0);
transform: rotate(-45deg);
transition: .4s;
}
.rotary-switch:before {
position: absolute;
display: block;
content: "";
width: 50%;
height: 6%;
top: 47%;
background: #FAF8F9;
margin: 0% auto;
}
.rotary-centre {
position: absolute;
background: #FAF8F9;
left: 44%;
top: 44%;
width: 12%;
height: 12%;
border-radius: 50%;
}
.lock {
position: absolute;
border: solid 2px #11100e;
border-radius: 50%;
background: linear-gradient(0deg, #8d8280, #d0d0d0);
transform: rotate(315deg);
}
.lock:before {
position: absolute;
display: block;
content: "";
width: 70%;
height: 10%;
top: 45%;
left: 16%;
background: #0a0a0a;
margin: 0% auto;
}
.lock-notch {
position: absolute;
display: block;
content: "";
width: 12%;
height: 25%;
top: 15%;
left: 44%;
background: #0a0a0a;
margin: 0% auto;
}
.lock-centre {
position: absolute;
background: linear-gradient(0deg, #c0c0c0, #202224);
left: 23%;
top: 23%;
width: 44%;
height: 44%;
border-radius: 50%;
border: solid 1px #0a0a0a;
}
.lock-centre:before {
position: absolute;
display: block;
content: "";
width: 22%;
height: 25%;
top: 38%;
left: 83%;
background: #0a0a0a;
margin: 0% auto;
}
</style>
</head>
<body>
<div class="panel">
<img src="pdp11-70.svg" alt="pdp11-70" style="position:absolute;top:44;left:32;" width="137" height="42">
<div class="lock" style="position:absolute;top:164;left:46;height:18px;width:18px">
<div class="lock-notch"> </div>
<div class="lock-centre"> </div>
</div>
<div class="switch_background_top" style="position:absolute;top:50;left:538;">
<div style="position:absolute;left:2;top:6;display:table;height:72px;width:112px;text-align:left;font-size:5px;border-spacing:4px;">
<div style="display:table-row">
<div class=leddiv id=s10 style="display:table-cell;"></div>
<div style="display:table-cell;">USER D</div>
<div class=leddiv id=s11 style="display:table-cell;"></div>
<div style="display:table-cell">USER I</div>
</div>
<div style="display:table-row;">
<div class=leddiv id=s8 style="display:table-cell;"></div>
<div style="display:table-cell">SUPER D</div>
<div class=leddiv id=s9 style="display:table-cell;"></div>
<div style="display:table-cell">SUPER I</div>
</div>
<div style="display:table-row;">
<div class=leddiv id=s6 style="display:table-cell;"></div>
<div style="display:table-cell">KERNEL D</div>
<div class=leddiv id=s7 style="display:table-cell;"></div>
<div style="display:table-cell">KERNEL I</div>
</div>
<div style="display:table-row;">
<div class=leddiv id=s4 style="display:table-cell;"></div>
<div style="display:table-cell">CONS PHY</div>
<div class=leddiv id=s5 style="display:table-cell;"></div>
<div style="display:table-cell">PROG PHY</div>
</div>
</div>
<div id=rotary2 class="rotary-switch" style="position:absolute;top:30;right:7;height:30px;width:30px" onclick="if (++panel.rotary2>7) panel.rotary2=0;rotary2.style.transform='rotate('+(panel.rotary2*45-45)+'deg)';panel.select=updatePanel('s',panel.select,(panel.select&0x300f)|(0x10<<panel.rotary2)); panel.address = updatePanel('a', panel.address, (panel.rotary2 == 1 ? CPU.displayPhysical : (panel.rotary2 == 0 ? CPU.displayAddress : CPU.displayAddress & 0xffff))); panel.autoIncr = 0;">
<div class="rotary-centre"> </div>
</div>
</div>
<div class="switch_background_bottom" style="position:absolute;top:160;left:538;">
<div style="position:absolute;left:2;top:0;display:table;;width:112px;text-align:left;font-size:5px;border-spacing:4px;">
<div style="display:table-row">
<div class=leddiv id=s0 style="display:table-cell;"></div>
<div style="display:table-cell;">DATA PATHS</div>
<div class=leddiv id=s1 style="display:table-cell;"></div>
<div style="display:table-cell;">U ADDRS</div>
</div>
<div style="display:table-row;">
<div class=leddiv id=s2 style="display:table-cell;"></div>
<div style="display:table-cell;">BUS REG</div>
<div class=leddiv id=s3 style="display:table-cell;"></div>
<div style="display:table-cell;">DISPLAY REGISTER</div>
</div>
</div>
<div id=rotary1 class="rotary-switch" style="position:absolute;top:6;right:7;height:30px;width:30px" onclick="if (++panel.rotary1>3) panel.rotary1=0;rotary1.style.transform='rotate('+(panel.rotary1*45-45)+'deg)';panel.select=updatePanel('s',panel.select,(panel.select&0x3ff0)|(0x1<<panel.rotary1)); if (panel.rotary1) panel.display = updatePanel('d', panel.display, (panel.rotary1 == 2 ? CPU.switchRegister :CPU.displayRegister));">
<div class="rotary-centre"> </div>
</div>
</div>
<div style="position:absolute;top:42;left:32;">
<div style="position:absolute;left:220;">
<div class="ledpad" style="left:0;width:22;">PAR<br>ERR
<div id=m11 class=led></div>
</div>
<div class="ledpad" style="left:22;">ADRS<br>ERR
<div id=m10 class=led></div>
</div>
</div>
<div style="position:absolute;left:264;">
<div class="ledpad" style="left:0;width:22;">RUN
<div id=m9 class=led></div>
</div>
<div class="ledpad" style="left:22;width:22;">PAUSE
<div id=m8 class=led></div>
</div>
<div class="ledpad" style="left:44;">MASTER
<div id=m7 class=led></div>
</div>
</div>
<div style="position:absolute;left:330;">
<div class="ledpad" style="left:0;width:22;">USER
<div id=m6 class=led></div>
</div>
<div class="ledpad" style="left:22;width:22;">SUPER
<div id=m5 class=led></div>
</div>
<div class="ledpad" style="left:44;">KERNEL
<div id=m4 class=led></div>
</div>
</div>
<div style="position:absolute;left:396;">
<div class="ledpad" style="left:0;">DATA
<div id=m3 class=led></div>
</div>
<div class="ledpad" style="left:22;">16
<div id=m2 class=led></div>
</div>
<div class="ledpad" style="left:44;">18
<div id=m1 class=led></div>
</div>
<div class="ledpad" style="left:66;">22
<div id=m0 class=led></div>
</div>
</div>
</div>
<div style="position:absolute;top:96;left:32;">
<div style="position:absolute;left:0;">
<div class="base" style="width:22;"></div>
<div class="ledpad" style="left:0;">
<div id=a21 class=led></div>
</div>
</div>
<div style="position:absolute;left:22;">
<div class="base" style="background-color:#701070;"></div>
<div class="ledpad" style="left:0;">
<div id=a20 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=a19 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=a18 class=led></div>
</div>
</div>
<div style="position:absolute;left:88;">
<div class="base"></div>
<div class="ledpad" style="left:0;">
<div id=a17 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=a16 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=a15 class=led></div>
</div>
</div>
<div style="position:absolute;left:154;">
<div class="base" style="background-color:#701070;"></div>
<div class="ledpad" style="left:0;">
<div id=a14 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=a13 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=a12 class=led></div>
</div>
</div>
<div style="position:absolute;left:220;">
<div class="base"></div>
<div class="ledpad" style="left:0;">
<div id=a11 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=a10 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=a9 class=led></div>
</div>
</div>
<div style="position:absolute;left:286;">
<div class="base" style="background-color:#701070;"></div>
<div class="ledpad" style="left:0;">
<div id=a8 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=a7 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=a6 class=led></div>
</div>
</div>
<div style="position:absolute;left:352;">
<div class="base"></div>
<div class="ledpad" style="left:0;">
<div id=a5 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=a4 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=a3 class=led></div>
</div>
</div>
<div style="position:absolute;left:418;">
<div class="base" style="background-color:#701070;">ADDRESS </div>
<div class="ledpad" style="left:0;">
<div id=a2 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=a1 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=a0 class=led></div>
</div>
</div>
</div>
<div style="position:absolute;top:160;left:32;">
<div style="position:absolute;left:66;">
<div class="base" style="width:44;text-align:center;background-color:#000000;">PARITY</div>
<div class="ledpad" style="left:0;">HIGH
<div id=s13 class=led></div>
</div>
<div class="ledpad" style="left:22;">LOW
<div id=s12 class=led></div>
</div>
</div>
<div style="position:absolute;left:132;">
<div class="base" style="width:28;"></div>
<div class="ledpad" style="left:0;">
<div id=d15 class=led></div>
</div>
</div>
<div style="position:absolute;left:154;">
<div class="base" style="background-color:#701070;"></div>
<div class="ledpad" style="left:0;">
<div id=d14 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=d13 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=d12 class=led></div>
</div>
</div>
<div style="position:absolute;left:220;">
<div class="base"></div>
<div class="ledpad" style="left:0;">
<div id=d11 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=d10 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=d9 class=led></div>
</div>
</div>
<div style="position:absolute;left:286;">
<div class="base" style="background-color:#701070;"></div>
<div class="ledpad" style="left:0;">
<div id=d8 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=d7 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=d6 class=led></div>
</div>
</div>
<div style="position:absolute;left:352;">
<div class="base"></div>
<div class="ledpad" style="left:0;">
<div id=d5 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=d4 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=d3 class=led></div>
</div>
</div>
<div style="position:absolute;left:418;">
<div class="base" style="background-color:#701070;">DATA </div>
<div class="ledpad" style="left:0;">
<div id=d2 class=led></div>
</div>
<div class="ledpad" style="left:22;">
<div id=d1 class=led></div>
</div>
<div class="ledpad" style="left:44;">
<div id=d0 class=led></div>
</div>
</div>
</div>
<div align="center" style="position:absolute;top:220;left:32;">
<div style="position:absolute;left:0;">
<div class="switch_pad" style="left:0;">21</div>
</div>
<div style="position:absolute;left:22;">
<div class="switch_pad" style="left:0;background-color:#701070;">20</div>
<div class="switch_pad" style="left:22;background-color:#701070;">19</div>
<div class="switch_pad" style="left:44;background-color:#701070;">18</div>
</div>
<div style="position:absolute;left:88;">
<div class="switch_pad" style="left:0;">17</div>
<div class="switch_pad" style="left:22;">16</div>
<div class="switch_pad" style="left:44;">15</div>
</div>
<div style="position:absolute;left:154;">
<div class="switch_pad" style="left:0;background-color:#701070;">14</div>
<div class="switch_pad" style="left:22;background-color:#701070;">13</div>
<div class="switch_pad" style="left:44;background-color:#701070;">12</div>
</div>
<div style="position:absolute;left:220;">
<div class="switch_pad" style="left:0;">11</div>
<div class="switch_pad" style="left:22;">10</div>
<div class="switch_pad" style="left:44;">9</div>
</div>
<div style="position:absolute;left:286;">
<div class="switch_pad" style="left:0;background-color:#701070;">8</div>
<div class="switch_pad" style="left:22;background-color:#701070;">7</div>
<div class="switch_pad" style="left:44;background-color:#701070;">6</div>
</div>
<div style="position:absolute;left:352;">
<div class="switch_pad" style="left:0;">5</div>
<div class="switch_pad" style="left:22;">4</div>
<div class="switch_pad" style="left:44;">3</div>
</div>
<div style="position:absolute;left:418;">
<div class="switch_pad" style="left:0;background-color:#701070;">2</div>
<div class="switch_pad" style="left:22;background-color:#701070;">1</div>
<div class="switch_pad" style="left:44;background-color:#701070;">0</div>
</div>
<div style="position:absolute;left:506;">
<div class="switch_pad" style="left:0;line-height:9px;"><br>LOAD<br>ADRS</div>
<div class="switch_pad" style="left:22;background-color:#701070;">EXAM</div>
<div class="switch_pad" style="left:44;">DEP</div>
<div class="switch_pad" style="left:66;background-color:#701070;">CONT</div>
<div class="switch_pad" style="left:88;line-height:9px;"><br>ENABLE<br>HALT</div>
<div class="switch_pad" style="left:110;background-color:#701070;line-height:9px;"><br>S INST<br>S BUS</div>
<div class="switch_pad" style="left:132;">START</div>
</div>
</div>
<div style="position:absolute;top:252;left:32;width:720;">
<div style="position:absolute;left:0;">
<div id=sw21 class="switchRed" style="left:0;" onclick="setSwitch('sw21',2097152);"></div>
</div>
<div style="position:absolute;left:22;">
<div id=sw20 class="switchPurple" style="left:0;" onclick="setSwitch('sw20',1048576);"></div>
<div id=sw19 class="switchPurple" style="left:22;" onclick="setSwitch('sw19',524288);"></div>
<div id=sw18 class="switchPurple" style="left:44;" onclick="setSwitch('sw18',262144);"></div>
</div>
<div style="position:absolute;left:88;">
<div id=sw17 class="switchRed" style="left:0;" onclick="setSwitch('sw17',131072);"></div>
<div id=sw16 class="switchRed" style="left:22;" onclick="setSwitch('sw16',65536);"></div>
<div id=sw15 class="switchRed" style="left:44;" onclick="setSwitch('sw15',32768);"></div>
</div>
<div style="position:absolute;left:154;">
<div id=sw14 class="switchPurple" style="left:0;" onclick="setSwitch('sw14',16384);"></div>
<div id=sw13 class="switchPurple" style="left:22;" onclick="setSwitch('sw13',8192);"></div>
<div id=sw12 class="switchPurple" style="left:44;" onclick="setSwitch('sw12',4096);"></div>
</div>
<div style="position:absolute;left:220;">
<div id=sw11 class="switchRed" style="left:0;" onclick="setSwitch('sw11',2048);"></div>
<div id=sw10 class="switchRed" style="left:22;" onclick="setSwitch('sw10',1024);"></div>
<div id=sw9 class="switchRed" style="left:44;" onclick="setSwitch('sw9',512);"></div>
</div>
<div style="position:absolute;left:286;">
<div id=sw8 class="switchPurple" style="left:0;" onclick="setSwitch('sw8',256);"></div>
<div id=sw7 class="switchPurple" style="left:22;" onclick="setSwitch('sw7',128);"></div>
<div id=sw6 class="switchPurple" style="left:44;" onclick="setSwitch('sw6',64);"></div>
</div>
<div style="position:absolute;left:352;">
<div id=sw5 class="switchRed" style="left:0;" onclick="setSwitch('sw5',32);"></div>
<div id=sw4 class="switchRed" style="left:22;" onclick="setSwitch('sw4',16);"></div>
<div id=sw3 class="switchRed" style="left:44;" onclick="setSwitch('sw3',8);"></div>
</div>
<div style="position:absolute;left:418;">
<div id=sw2 class="switchPurple" style="left:0;" onclick="setSwitch('sw2',4);"></div>
<div id=sw1 class="switchPurple" style="left:22;" onclick="setSwitch('sw1',2);"></div>
<div id=sw0 class="switchPurple" style="left:44;border-top-color:" onclick="setSwitch('sw0',1);"></div>
<div id=lt class="switchRed" style="left:66;background-color: #D0D0D0;border-top-color:#C0C0C0;border-bottom-color:#606060;" onclick="panel.lamp--; moveSwitch('lt', (panel.lamp ? 36 : 22)); updatePanel('a',panel.lamp?0:0x3fffff,panel.lamp?0x3fffff:panel.address); updatePanel('d',panel.lamp?0:0xffff,panel.lamp?0xffff:panel.display); updatePanel('m',panel.lamp?0:0xfff,panel.lamp?0xfff:panel.status); updatePanel('s',panel.lamp?0:0xffff,panel.lamp?0x3fff:panel.select); if (panel.lamp) panel.lamp = 1;"></div>
</div>
<div style="position:absolute;left:506;">
<div id=load class="switchRed" style="left:0;" onclick="moveSwitch('load', 36); CPU.displayAddress = CPU.switchRegister; if (panel.rotary2 > 1) CPU.displayAddress &= 0xffff; panel.address = updatePanel('a', panel.address, CPU.displayAddress); panel.autoIncr = 0; setTimeout(function() {moveSwitch('load', 22);},300);"></div>
<div id=examine class="switchPurple" style="left:22;" onclick="moveSwitch('examine', 36); if (CPU.runState == STATE.HALT) examineDeposit(-1); setTimeout(function() {moveSwitch('examine', 22);},300);"></div>
<div id=deposit class="switchRed" style="left:44;" onclick="moveSwitch('deposit', 8); if (CPU.runState == STATE.HALT) examineDeposit(CPU.switchRegister); setTimeout(function() {moveSwitch('deposit', 22);},300);"></div>
<div id=continue class="switchPurple" style="left:66;" onclick="moveSwitch('continue', 36); if (CPU.runState == STATE.HALT) if (panel.halt) { step(0); CPU.runState = STATE.HALT; } else {CPU.runState = STATE.RUN; setTimeout(emulate, 1);}; setTimeout(function() {moveSwitch('continue', 22);},300);"></div>
<div id=halt class="switchRed" style="left:88;" onclick="panel.halt = 1 - panel.halt; moveSwitch('halt', (panel.halt ? 36 : 22)); if (panel.halt && CPU.runState != STATE.HALT) { CPU.runState = STATE.HALT; updateDisplayLights(0); updateStatusLights(0); }"></div>
<div id=step class="switchPurple" style="left:110;" onclick="panel.step = 1 - panel.step; moveSwitch('step', (panel.step ? 36 : 22));"></div>
<div id=start class="switchRed" style="left:132;" onclick="moveSwitch('start', 36); if (CPU.runState == STATE.HALT) {reset_iopage(); if (CPU.displayAddress < IOBASE_UNIBUS && ((CPU.displayAddress & 1) || CPU.displayAddress >= MAX_MEMORY)) updateStatusLights(0x400); else { CPU.registerVal[7] = CPU.displayAddress & 0xffff; updateStatusLights(0); if (!panel.halt) {CPU.runState = STATE.RUN; setTimeout(emulate, 1);}}}; setTimeout(function() {moveSwitch('start', 22);},300);"></div>
</div>
</div>
</div>
<form name=console action="foo.bar">
<textarea name=line cols=80 rows=24 style="font-family:Liberation Mono,Monaco,Courier New,Lucida Console,Consolas,DejaVu Sans Mono,Bitstream Vera Sans Mono,monospace"></textarea>
</form>
<button onclick="console_input(3)">Ctrl/C</button>
<button onclick="console_input(4)">Ctrl/D</button>
<button onclick="console_input(8)">Ctrl/H</button>
<button onclick="console_input(10)">LF</button>
<button onclick="console_input(17)">Ctrl/Q</button>
<button onclick="console_input(19)">Ctrl/S</button>
<button onclick="console_input(20)">Ctrl/T</button>
<button onclick="console_input(26)">Ctrl/Z</button>
<button onclick="console_input(27)">ESC</button>
<button onclick="console_input(9)">TAB</button>
<button onclick="console_input(0)">Break</button>
<input type=checkbox onclick="tty.delCode = (tty.delCode == 127 ? 8 : 127)">DEL to Ctrl/H
<button onclick="putchar(10);boot();">REBOOT</button>
<br />
<div id="vt11"> </div>
<br />
<h3>PDP 11/70 Emulator v1.8 October 2017</h3>
<p>
This emulator came about because years ago I was a programmer for RSTS/E on a PDP 11/45 and had admired the console idle loop light pattern - but I couldn't quite remember how it looked. Given the unavailability of real systems it became time to write an emulator!</p>
<p>
I was going to start with a PDP 11/45 emulator but the extra memory of a PDP 11/70 became far too attractive (a whole 4MB!). It took some time before I finally produced a <a href="http://skn.noip.me/pdp11/pdp11-45.html">PDP 11/45</a> version.</p>
<p>
I have met my core objective - I can now see the RSTS/E console light pattern that I was looking for, and found that newer versions (eg v9.6) have a different light pattern. Also I have now seen some of the light patterns for other OSes. RSX and BSD 2.11 have their own different patterns and Unix V5 and Ultrix operate with absolute minimum light movement (I'm assuming they operates mostly in WAIT mode).</p>
<p>
Getting all of the operating systems used here presents its own set of challenges - one of which is finding the software in the first place. But one of the most interesting was RSTS/E V06C which has its own <a href='RSTSv06c.html'>story</a>.</p>
<p>
Note: The boot code in this emulator is a custom PDP 11 program running with it's own set of light patterns. It is initially loaded at address 140000 and the LIGHTS command operates by mapping a WAIT instruction to different addresses within Supervisor mode. The source for this program can be found in the RT11 operating environment as <b>BOOT.MAC</b> You can use this code to boot one of the guest OSes or use the LIGHTS command and DIAG command to experiment with idle light patterns and load test the CPU.</p>
<p>
If you wish to toggle in a simple light chaser to the front panel then here are some switch commands which can be used:</p>
<pre>
<b>
Address Data Code Switch commands</b>
HALT, 001000, LOAD ADDRESS
001000 012700 mov #1,r0 012700, DEPOSIT
001002 000001 000001, DEPOSIT
001004 006100 rol r0 006100, DEPOSIT
001006 000005 reset 000005, DEPOSIT
001010 000775 br .-4 000775, DEPOSIT
001000, LOAD ADDRESS, ENABLE, START
</pre>
To restart the initial boot code (if it has not been overwritten) use the switch commands:
<pre>
HALT, 140000, LOAD ADDRESS, ENABLE, START
</pre>
<p>
If you plan to run the emulator repeatedly or for a project, consider downloading the emulator to your own machine or server. This will <b>significantly</b> speed any of the emulator disk accesses and response times. All files and emulator OS disks can be found in the top level folder of <b><a href='http://skn.noip.me/pdp11/'>http://skn.noip.me/pdp11/</a></b> or in the single zip file <b><a href='http://skn.noip.me/pdp11/pdp11.zip'>http://skn.noip.me/pdp11/pdp11.zip</a></b></p>
<p>
This emulator matches approximately the following SIMH configuration:</p>
<pre>
set cpu 11/70 1912K nofpp !1912K is not actually SIMH legal - use 2M instead
set clk 50hz
attach rk0 rk0.dsk !RK05 image of Unix V5
attach rk1 rk1.dsk !RK05 image of RT11 v4.0
attach rk2 rk2.dsk !RK05 image of RSTS V06C-03
attach rk3 rk3.dsk !RK05 image of XXDP
attach rk4 rk4.dsk !RK05 image of RT-11 3B
attach rk5 rk5.dsk !RK05 image of RT-11 V5.4F
set rl0 RL02
attach rl0 rl0.dsk !RL02 image of BSD 2.9
set rl1 RL02
attach rl1 rl1.dsk !RL02 image of RSX 11M v3.2
set rl2 RL01
attach rl2 rl2.dsk !RL01 image of RSTS/E v7.0
set rl3 RL02
attach rl3 rl3.dsk !RL02 image of XXDP+
set rp0 RP06
attach rp0 rp0.dsk !RP06 image of ULTRIX-11 V3.1
set rp1 RP06
attach rp1 rp1.dsk !RP06 image of BSD 2.11
set rp2 RP04
attach rp2 rp2.dsk !RP04 image of RSTS/E v9.6
set rp3 RP04
attach rp3 rp3.dsk !RP04 image of RSX 11M v4.6
attach tm0 tm0.tap !Backup of RSTS 4B-17
attach tm1 tm1.tap !Distribution for RSTS V06C-03
attach tm2 tm2.tap !Distribution for RSTS V7.0
</pre>
<br />
This emulator then loads in the BOOT.MAC code to location 140000 and begins execution there.
<p>
There are many PDP emulators out there and I have never seen what I consider to be a complete list. Some of the really interesting ones can be found by googling terms such as "vhdl pdp 11". However the gold standard seems to be SIMH at <a href='http://simh.trailing-edge.com'>Trailing Edge</a>. A different approach to Javascript PDP 11 emulation can be found at <a href="http://www.pcjs.org/devices/pdp11/">www.pcjs.org</a>.</p>
<p>
I believe that the first PDP 11 emulator would be SIM-11 written in FORTRAN before the first PDP 11/20 hardware was even built - see <a href="http://www.hampage.hu/pdp-11/birth.html"> How the PDP-11 Was Born</a>. There is more PDP 11 history at <a href="http://www.hampage.hu/pdp-11/main.html">www.hampage.hu</a>.</p>
<p>
Of course if you want your own PDP 11/70 front panel you might consider <a href="https://hackaday.io/project/8069-pidp-11">one of these</a>.</p>
<p>
Happy emulating!</p>
<p>
Paul Nankervis</p>
<h3>List of guest OS's:</h3>
<table style="margin-left:25px" cellpadding=3>
<tr><td><b>Disk</b></td><td><b>OS</b></td><td><b>Comment</b></td></tr>
<tr><td><b>RK0</b></td><td>Unix V5 </td><td>Boot using: <b>unix</b> then login as <b>root</b></td></tr>
<tr><td><b>RK1</b></td><td>RT11 v4.0 </td><td>The lightest/fastest OS here</td></tr>
<tr><td><b>RK2</b></td><td>RSTS V06C-03 </td><td>Boot and login as <b>1,2</b> with password <b>SYSTEM</b> or as <b>11,70</b> using <b>PDP</b></td></tr>
<tr><td><b>RK3</b></td><td>XXDP </td><td>Diagnostic OS and utilities</td></tr>
<tr><td><b>RK4</b></td><td>RT-11 3B </td><td>Distribution for RT-11 Version 3B</td></tr>
<tr><td><b>RK5</b></td><td>RT-11 V5.4F </td><td>Distribution for RT-11 Version 5.4F</td></tr>
<tr><td><b>TM0</b></td><td>RSTS 4B-17 </td><td>Boot ROLLIN from TM0 and restore DK0 with "DK:<MT:VIXEN/REW". Reboot from DK0 with "/BO:DK" and login as <b>1,2</b> with password <b>SYSTEM</b>or <b>11,70</b> using <b>PDP</b> Commands are case sensitive.</td></tr>
<tr><td><b>RL0</b></td><td>BSD 2.9 </td><td>Boot using: <b>rl(0,0)rlunix</b> CTRL/D to get to multiuser</td></tr>
<tr><td><b>RL1</b></td><td>RSX 11M v3.2 </td><td>Login as <b>1,2</b> with password <b>SYSTEM</b></td></tr>
<tr><td><b>RL2</b></td><td>RSTS/E v7.0 </td><td>Option: <LF> Suboption: <LF> ... Login as <b>1,2</b> using <b>SYSTEM</b> or <b>11,70</b> using <b>PDP</b></td></tr>
<tr><td><b>RL3</b></td><td>XXDP </td><td>Larger version of diagnostics - including PDP 11/70 utilities</td></tr>
<tr><td><b>RP0</b></td><td>ULTRIX-11 V3.1 </td><td>CTRL/D to enter multiuser mode. Login as <b>root</b> with no password</td></tr>
<tr><td><b>RP1</b></td><td>BSD 2.11 </td><td>Will autoboot and enter multiuser mode. Login as <b>root</b> with no password</td></tr>
<tr><td><b>RP2</b></td><td>RSTS/E v9.6 </td><td>Answer boot questions and login as <b>1,2</b> (password <b>SYSTEM</b>) or <b>11,70</b> (no password)</td></tr>
<tr><td><b>RP3</b></td><td>RSX 11M v4.6 </td><td>Starts logged in as <b>1,2</b> (password <b>SYSTEM</b>) - user accounts <b>200,1</b> (no password) or <b>11,70</b> (password <b>PDP</b>)</td></tr>
</table>
<p>
<b>Note:</b> Disks are shown in approximately order size. The <a href="https://en.wikipedia.org/wiki/RK05">RK05</a> disks at the top are small and not too bad to use across a network.
The <a href="http://www.columbia.edu/cu/computinghistory/rp06.html">RP06</a> disks at the bottom can be rather slow.
<p><a href='https://www.youtube.com/watch?v=3Nr1E96tXRU'>Youtube video 1</a>
<p><a href='https://www.youtube.com/watch?v=F-kJo1DTtw4'>Youtube video 2</a>
<h3>Example boot of Unix V5</h3>
<pre>
BOOT> <b>boot rk0</b>
@<b>unix</b>
login: <b>root</b>
# <b>date</b>
Fri Mar 21 12:09:02 EST 1975
# <b>chdir /etc</b>
# <b>pwd</b>
../etc
# <b>ls -al</b>
total 40
drwxr-xr-x 2 bin 240 Mar 21 12:07 .
drwxr-xr-x 9 bin 160 Jan 29 16:14 ..
-rwxr--r-- 1 bin 474 Nov 26 18:13 getty
-rwxr-xr-x 1 bin 1446 Nov 26 18:13 glob
-rwxr--r-- 1 bin 1972 Nov 26 18:13 init
-rwxr-xr-x 1 bin 814 Nov 26 18:13 lpd
-rwxr--r-- 1 bin 4136 Nov 26 18:13 mkfs
-rwxr--r-- 1 bin 1800 Nov 26 18:13 mknod
-rwsr-xr-x 1 root 2078 Nov 26 18:13 mount
-rw-r--r-- 1 bin 49 Nov 26 18:13 passwd
-rw-r--r-- 1 bin 70 Nov 26 18:13 rc
-rw-r--r-- 1 bin 56 Nov 26 18:13 ttys
-rwsr-xr-x 1 root 1990 Nov 26 18:13 umount
-rwxr-xr-x 1 bin 32 Nov 26 18:13 update
-rw-r--r-- 1 root 144 Mar 21 12:09 utmp
# <b>cat /etc/passwd</b>
root::0:1::/:
daemon::1:1::/bin:
bin::3:1::/bin:
# <b>cal 10 1981</b>
Oct 1981
S M Tu W Th F S
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
# <b>ls -al /bin</b>
total 339
drwxr-xr-x 2 bin 944 Nov 26 18:13 .
drwxr-xr-x 9 bin 160 Jan 29 16:14 ..
-rwxr-xr-x 1 bin 1514 Nov 26 18:13 ar
-rwxr-xr-x 1 bin 7308 Nov 26 18:13 as
-rwxr-xr-x 1 bin 6042 Nov 26 18:13 bas
-rwxr-xr-x 1 bin 152 Nov 26 18:13 cat
-rwxr-xr-x 1 bin 5668 Nov 26 18:13 cc
...
</pre>
<h3>Example boot of RT11 v4.0</h3>
<pre>
BOOT> <b>boot rk1</b>
RT-11SJ V04.00C
.D 56=5015
.TYPE V4USER.TXT
Welcome to RT-11 Version 4. RT-11 V04 provides new hardware support
and some major enhancements over Version 3B
...
.D 56=0
.<b>MAC BOOT</b>
ERRORS DETECTED: 0
.<b>LINK BOOT</b>
.<b>DIR BOOT</b>
BOOT .MAC 16 BOOT .OBJ 4
BOOT .SAV 4
3 Files, 24 Blocks
2851 Free blocks
.<b>DIR</b>
SWAP .SYS 25 01-Feb-82 RT11BL.SYS 65 01-Feb-82
RT11SJ.SYS 67 01-Feb-82 RT11FB.SYS 80 01-Feb-82
TT .SYS 2 01-Feb-82 DT .SYS 3 01-Feb-82
DP .SYS 3 01-Feb-82 DX .SYS 3 01-Feb-82
...
.<b>R ADVENT</b>
WELCOME TO ADVENTURE!! WOULD YOU LIKE INSTRUCTIONS?
<b>YES</b>
SOMEWHERE NEARBY IS COLOSSAL CAVE, WHERE OTHERS HAVE FOUND FORTUNES IN
TREASURE AND GOLD, THOUGH IT IS RUMORED THAT SOME WHO ENTER ARE NEVER
SEEN AGAIN. MAGIC IS SAID TO WORK IN THE CAVE. I WILL BE YOUR EYES
AND HANDS. DIRECT ME WITH COMMANDS OF 1 OR 2 WORDS. I SHOULD WARN
YOU THAT I LOOK AT ONLY THE FIRST FOUR LETTERS OF EACH WORD, SO YOU'LL
HAVE TO ENTER "NORTHEAST" AS "NE" TO DISTINGUISH IT FROM "NORTH".
(SHOULD YOU GET STUCK, TYPE "HELP" FOR SOME GENERAL HINTS. FOR INFOR-
MATION ON HOW TO END YOUR ADVENTURE, ETC., TYPE "INFO".)
- - -
THIS PROGRAM WAS ORIGINALLY DEVELOPED BY WILLIE CROWTHER. MOST OF THE
FEATURES OF THE CURRENT PROGRAM WERE ADDED BY DON WOODS (DON @ SU-AI).
THE CURRENT VERSION WAS DONE BY MIKE WESTON.
YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK BUILDING.
AROUND YOU IS A FOREST. A SMALL STREAM FLOWS OUT OF THE BUILDING AND
DOWN A GULLY.
<b>EAST</b>
YOU ARE INSIDE A BUILDING, A WELL HOUSE FOR A LARGE SPRING.
THERE ARE SOME KEYS ON THE GROUND HERE.
THERE IS A SHINY BRASS LAMP NEARBY.
THERE IS FOOD HERE.
THERE IS A BOTTLE OF WATER HERE.
<b>TAKE FOOD</b>
OK
...
</pre>
<h3>Example boot of RSTS V06C-03</h3>
<pre>
BOOT> <b>boot rk2</b>
RSTS V06C-03 vixen (DK2)
Option: <b><LF></b>
You currently have: JOB MAX = 32, SWAP MAX = 28K.
You currently have crash dump disabled.
DD-MMM-YY? <b>31-OCT-76</b>
12:00 PM? <b>9:03</b>
INIT V06C-03 RSTS V06C-03 vixen
Command File Name? <b><CR></b>
DETACHING...
...
I11/70
Password: <b>PDP</b>
Ready
<b>DIR</b>
Name .Ext Size Prot Date SY:[11,70]
ACEY .BAS 5 < 60> 31-Oct-76
TREK .BAS 16 < 60> 31-Oct-76
TREK .DOC 9 < 60> 31-Oct-76
ANIMAL.BAS 5 < 60> 31-Oct-76
STRTRK.BAS 27 < 60> 31-Mar-81
STRTR1.BAS 9 < 60> 31-Mar-81
ADVENT.DOC 4 < 60> 20-Jul-85
ADVENT.SAV 93 <124> 20-Jul-85
ADVENT.VAR 22 < 60> 20-Jul-85
ADVTXT.TXT 125 < 60> 20-Jul-85
SYSMAC.SML 42 < 60> 13-Mar-77
HELLO .MAC 1 < 60> 13-Mar-77
BOOT .MAC 24 < 60> 13-Mar-77
Total of 35 blocks in 4 files in SY:[11,70]
Ready
<b>SYSTAT</b>
RSTS V06C-03 vixen status at 31-Oct-76, 09:03 AM Up: 18
Job Who Where What Size State Run-Time RTS
1 [OPR] Det ERRCPY 5K SR 3.4 BASIC
2 [SELF] KB0 SYSTAT 8K RN Lck 0.3 BASIC
Busy Devices: None
Disk Structure:
Disk Open Free Cluster Errors Name Comments
DK2 3 239 1 0 VIXEN Pub, DLW
Small Large Jobs Hung TTY's Errors
345 0 2/2 0 0
Run-Time Systems:
Name Ext Size Users Comments
BASIC BAC 16(16)K 2 Perm, Addr:25, KBM, CSZ
RSX TSK 2(28)K 0 Non-Res, KBM
RT11 SAV 4(28)K 0 Non-Res, KBM, CSZ, EMT:255
RMS11 TSK 4(28)K 0 Non-Res
Message Receivers:
Name Job Msgs Max Senders
ERRLOG 1 0 40 Priv
Ready
<b>RUN ACEY</b>
ACEY DUCEY CARD GAME
CREATIVE COMPUTING MORRISTOWN, NEW JERSEY
ACEY-DUCEY IS PLAYED IN THE FOLLOWING MANNER
THE DEALER (COMPUTER) DEALS TWO CARDS FACE UP
YOU HAVE AN OPTION TO BET OR NOT BET DEPENDING
ON WHETHER OR NOT YOU FEEL THE CARD WILL HAVE
A VALUE BETWEEN THE FIRST TWO.
IF YOU DO NOT WANT TO BET, INPUT A 0
YOU NOW HAVE 100 DOLLARS.
....
HERE ARE YOUR NEXT TWO CARDS:
8
KING
WHAT IS YOUR BET? <b>95</b>
JACK
YOU WIN!!!
YOU NOW HAVE 190 DOLLARS.
HERE ARE YOUR NEXT TWO CARDS:
2
10
WHAT IS YOUR BET? <b>^C</b>
Ready
<b>BYE</b>
Confirm: <b>Y</b>
Saved all disk files; 35 blocks in use, 65 free
Job 2 User 11,70 logged off KB0 at 31-Oct-76 09:04 AM
System RSTS V06C-03 vixen
Run time was 1.5 seconds
Elapsed time was 1 minute
Good morning
</pre>
<h3>Example boot of XXDP</h3>
<pre>
BOOT> <b>boot rk3</b>
CHMDKB1 XXDP+ DK MONITOR
BOOTED VIA UNIT 3
28K UNIBUS SYSTEM
ENTER DATE (DD-MMM-YY): <b><CR></b>
RESTART ADDR: 152010
THIS IS XXDP+. TYPE "H" OR "H/L" FOR HELP.
.<b>D</b>
ENTRY# FILNAM.EXT DATE LENGTH START
1 HDDKB0.SYS 2-JAN-70 2 000112
2 HMDKB1.SYS 2-JAN-70 17 000113
3 HDDKB1.SYS 2-JAN-70 2 000114
4 HSAAC4.SYS 8-DEC-82 24 000115
....
</pre>
<h3>Example boot of RSTS 4B-17</h3>
<pre>
BOOT> <b>boot tm0</b>
ROLLIN V07
#<b>DK:<MT:VIXEN/REW</b>
END-OF-FILE DURING READ, TYPE
M TO MOUNT ANOTHER REEL, OR K TO KILL REQUEST:
#<b>/BO:DK</b>
RSTS V04B-17 VIXEN
OPTION? <b>ST</b>
DD-MON-YY? <b>31-OCT-71</b>
HH:MM? <b>6:42</b>
VIXEN - SYSTEM PACK MOUNTED
ENABLE CRASH DUMP? <b>N</b>
CHAIN "INIT"
CATASTROPHIC ERROR
PROGRAM LOST-SORRY
I/O CHANNEL NOT OPEN