-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbehaving-badly.html
364 lines (310 loc) · 16.1 KB
/
behaving-badly.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>fritzm.github.io - PDP-11/45 Behaving Badly</title>
<meta name="description" content="">
<meta name="author" content="Fritz Mueller">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="https://fritzm.github.io/theme/html5.js"></script>
<![endif]-->
<!-- Le styles -->
<link href="https://fritzm.github.io/theme/bootstrap.min.css" rel="stylesheet">
<link href="https://fritzm.github.io/theme/bootstrap.min.responsive.css" rel="stylesheet">
<link href="https://fritzm.github.io/theme/local.css" rel="stylesheet">
<link href="https://fritzm.github.io/theme/pygments.css" rel="stylesheet">
<!-- Photoswipe -->
<link rel="stylesheet" href="https://fritzm.github.io/theme/photoswipe.css">
<link rel="stylesheet" href="https://fritzm.github.io/theme/default-skin/default-skin.css">
<script src="https://fritzm.github.io/theme/photoswipe.min.js"></script>
<script src="https://fritzm.github.io/theme/photoswipe-ui-default.min.js"></script>
<script src="https://fritzm.github.io/galleries.js"></script>
<script type="text/javascript">
var pswipe = function(gname, index) {
var pswpElement = document.querySelectorAll('.pswp')[0];
var items = galleries[gname];
var options = { index: index };
var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
gallery.init();
};
</script>
<!-- So Firefox can bookmark->"abo this site" -->
<link href="https://fritzm.github.io/feeds/all.rss.xml" rel="alternate" title="fritzm.github.io" type="application/rss+xml">
</head>
<body>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="https://fritzm.github.io">fritzm.github.io</a>
<div class="nav-collapse">
<ul class="nav">
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="content">
<div class="row">
<div class="span9">
<div class='article'>
<div class="content-title">
<h1>PDP-11/45 Behaving Badly</h1>
Sun 09 December 2018
by <a class="url fn" href="https://fritzm.github.io/author/fritz-mueller.html">Fritz Mueller</a>
</div>
<div><p>Wow, a year to the day since the previous post here! Not a lot of PDP-11 work this past year, with lots of
other stuff like home improvements going on, but a few things worth catching up on here.</p>
<p>Mainly, I got brave this past year and decided to actually rent a van and take the 11/45 out of the basement
to the VCF West show at the Computer History Museum in Mountain View. This was a <em>lot</em> more physical work
than I had anticipated. Working on this thing a piece at a time, sitting in one place in the basement, you
get kind of used to it and forget how much iron it actually is... But breaking it down, loading it into a
van, unloading into the show, reassembling, then reversing the whole process at the end of the show is a stark
reminder, both of the size of the machine and of my advancing age, ha! A <em>huge</em> thank-you to my workmate
Brian, who selflessly gave up a weekend, a vacation day, and some mileage on his back to give me
a hand. He has already informed me that "the answer for next year is 'no'." :-)</p>
<p><img src='/images/pdp11/VCFW3_thumbnail_tall.jpg' title='Reassembly on the VCF West show floor' onclick='pswipe("pdp11",76);'/>
<img src='/images/pdp11/VCFW1_thumbnail_tall.jpg' title='Running diagnostics and consulting the RK11-C prints...' onclick='pswipe("pdp11",77);'/>
<img src='/images/pdp11/VCFW2_thumbnail_tall.jpg' title='Pavl stops by with an RX02 and controller to help out with debug. Replacement KM11 debug board visible in the upper diagnostic port of the RK11-C.' onclick='pswipe("pdp11",78);'/>
<img src='/images/pdp11/VCFW4_thumbnail_tall.jpg' title='With Pete Richert, an old friend from Digidesign days!' onclick='pswipe("pdp11",79);'/></p>
<p>I suppose I should have expected it, but in the course of transportation to the show something shook loose resulting in a machine that wouldn't boot RT-11 when reassembled on the show floor (stupid bumpy rental
van!) So my show became a two day live-troubleshooting exhibit. This was fine, and I think a lot of
folks had fun jumping in and helping with troubleshooting (thanks, all!) There was a lot of interest and
reminiscence about the machine and I met a lot of nice people. Still, a little disappointing, because I
really had wanted people to be able to sit down and use the machine, and also because my head ended up in the
machine the whole time I really didn't get to see the rest of the show or talk to other people about their
exhibits! Ah well. In the end I did cajole a successful boot out of it, 15 mins. before the show closed, so
at least a couple people got to sit down and play Adventure. Placed 3rd in the restoration category :-)</p>
<p>So, what went wrong? At the show I managed to isolate the problem to something intermittent related to
interrupts from the RK11-C controller. I was still able to boot the RKDP diagnostic pack, since its
bootstrap and monitor make very conservative use of processor and device interface features. Running through
the diagnostics, managed to narrow down the problem to RK11-C completion polling after overlapped seeks. I
guess RT-11 makes use of this feature.</p>
<p>I got the machine home and reassembled, and verified that the problem was still manifesting. Then many months
passed, until I found some time to dig deeper into the problem just last night. The relevant failing
diagnostic is ZRKK test 37, and the output is:</p>
<div class="highlight"><pre><span></span>DRIVE 0
RK11 DIDN'T INTRUPT AFTER SK COMPLETED
PC RKCS RKER RKDS
014476 000310 000000 004713
SCP DIDN'T SET AFTER SEEK WAS DONE
PC RKCS
014526 000310
RK11 DIDN'T INTRUPT AFTER SK COMPLETED
PC RKCS RKER RKDS
014476 000310 000000 004712
SCP DIDN'T SET AFTER SEEK WAS DONE
PC RKCS
014526 000310
TIMOUT,PC=004536
</pre></div>
<p>And the relevant bit of the diagnostic listing:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 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</pre></div></td><td class="code"><div class="highlight"><pre><span></span>014362 2$: MOV RKVEC,R1
014366 MOV #3$,(R1)+ ;SET UP VECTOR ADRES FOR RK11 INTERUPT
014372 MOV #340,(R1) ;SET UP PSW ON INTERRUPT
014376 BIS #40,@RKDA ;ADRES CYLINDER #1
014404 MOV #111,@R0 ;SEEK, GO WITH IDE SET
014410 WAT.INT ,300 ;WAIT FOR THE DRIVE TO
;INTERRUPT AFTER ADRES WAS RECVD
;WAITING TIME= 1.4 MS FOR 11/20
;280 US FOR 11/45
;ERROR, IF INTERUPT DID NOT OCCUR
;BY NOW
014414 MOV #BADINT,@RKVEC ;RESTORE UNEXPECTED RK11 INTERRUPT
014422 MOV @R0,$REG0 ;GET RKCS
014426 ERROR 75 ;INTERRUPT DID NOT OCCUR AFTER
;SEEK WAS INITIATED WITH IDE SET
014430 BR 3$+4
014432 3$: CMP (SP)+,(SP)+ ;OK, IF RK11 INTERRUPTED TO THIS
;RESTORE STACK POINTER (FROM RK11 INTERRUPT)
014434 CMP (SP)+,(SP)+ ;RESTORE STACK POINTER (FROM
;WAT.INT)
014436 MOV #5$,@RKVEC ;SET UP NEW VECTOR ADRES FOR RK11
014444 BIT #20000,@R0 ;IS SCP CLEAR
014450 BEQ 4$ ;YES, BRANCH
014452 MOV @R0,$REG0 ;GET RKCS
014456 ERROR 76 ;SCP SET BEFORE SEEK TO LAST
;CYLINDER WAS DONE
014460 4$: WAT.INT ,56700 ;WAIT FOR DRIVE TO INTERRUPT
;AFTER SEEK WAS COMPLETED
;WAITING TIME=180 MS FOR 11/20
;36 MS FOR 11/45
014464 MOV #BADINT,@RKVEC :IT'S AN ERROR IF BY THIS TIME
;INTERRUPT HAS NOT OCCURERED
014472 JSR PC,GT3RG ;GO GET RKCS, ER, DS
014476 ERROR 77 ;RK11 DID NOT INTERRUPT AFTER SEEK (TO
;LAST CYLINDER) WAS DONE WITH IDE SET
014500 BR 5$+2
014502 5$: CMP (SP)+,(SP)+ ;OK, IF RK11 INTERUPTED TO THIS AFTER
;SEEK WAS COMPLETED. RESTORE
;STACK POINTER (FROM RK11 INTERRUPT)
014504 CMP (SP)+,(SP)+ ;RESTORE STACK POINTER (FROM
;WAT.INT)
014506 MOV #BADINT,@RKVEC ;RESTORE RK11 INTERRUPT VECTOR ADRES
;FOR UNEXPECTED INTERUTS
014514 BIT #20000,@R0 ;DID SCP BIT SET?
014520 BNE 6$ ;YES, BRANCH
014522 MOV @R0,$REG0 ;GET RKCS
014526 ERROR 53 ;SCP DID NOT SET AFTER RK11 INTERRUPTED
;INDICATING SEEK WAS
</pre></div>
</td></tr></table>
<p>So, based on the fact that we don't hit error 75 from 14426 (and the fact that the previous test, #36, in
this diagnostic is passing) unlike some previous issues the RK11 here <em>is</em> able to generate interrupts and the
11/45 CPU is fielding them. The issue seems related to the seek completion polling circuitry on the RK11.</p>
<p>This circuitry is described in section 3.3.2 of the RK11-C manual, and is detailed in engineering drawings
D-BS-RK11-C-12, sheets 1 and 2. When a seek or reset is in progress for any drive and the IDE bit in the
controller is set, the controller will poll all drives for completion when it is otherwise idle. When
polling is active, a pulse train which drives a count through the polled drives should be visible at B27F2:</p>
<p><img style="display:block; margin-left:auto; margin-right:auto" src="/images/pdp11/poll-counter.png" title="RK11-C polling clock"/></p>
<p>A quick look with the 'scope shows no joy here. This clock is initiated by signal POLL; which doesn't seem to
be being asserted. Checking the origin of that signal takes us to B26 and A26:</p>
<p><img style="display:block; margin-left:auto; margin-right:auto" src="/images/pdp11/poll-enable.png" title="RK11-C polling clock enable"/></p>
<p>Hmmm, one of these gates (the inverter at A26) is one that had failed and that I had repaired sometime last
year... Reseated the socketed replacement on A26, reloaded the diagnostic, but still no go. Well at least
it wasn't my repair job! Went ahead and pulled A26 and B26 and bench tested the gates. The 8-input nand
that outputs to B26J2 does look fishy. Pulled and socketed the piece, and put a replacement and some spares
on order at Jameco where I can pick them up on my way in to work tomorrow. All for now!</p></div>
<hr>
</div>
</div>
<div class="span3">
<div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
<ul class="nav nav-list">
<li class="nav-header">
Site
</li>
<li><a href="https://fritzm.github.io/archives.html">Archives</a>
<li><a href="https://fritzm.github.io/tags.html">Tags</a>
<li><a href="https://fritzm.github.io/feeds/all.rss.xml" rel="alternate">RSS feed</a></li>
</ul>
</div>
<div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
<ul class="nav nav-list">
<li class="nav-header">
Categories
</li>
<li><a href="https://fritzm.github.io/category/arcade-games.html">Arcade Games</a></li>
<li><a href="https://fritzm.github.io/category/math.html">Math</a></li>
<li><a href="https://fritzm.github.io/category/micros.html">Micros</a></li>
<li><a href="https://fritzm.github.io/category/pdp-11.html">PDP-11</a></li>
<li><a href="https://fritzm.github.io/category/programming.html">Programming</a></li>
<li><a href="https://fritzm.github.io/category/radios.html">Radios</a></li>
</ul>
</div>
<div class="social">
<div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
<ul class="nav nav-list">
<li class="nav-header">
Social
</li>
<li><a href="http://facebook.com/fritzmueller">facebook</a></li>
<li><a href="http://instagram.com/infrafritz">Instagram</a></li>
<li><a href="http://www.linkedin.com/pub/fritz-mueller/a/679/62/">LinkedIn</a></li>
<li><a href="http://jsfiddle.net/user/fritzm/fiddles/">JSFiddle</a></li>
<li><a href="https://github.com/fritzm">GitHub</a></li>
</ul>
</div>
</div>
</div>
</div> </div>
<footer>
<br />
<p><a href="https://fritzm.github.io">fritzm.github.io</a> © Fritz Mueller 2023</p>
</footer>
</div> <!-- /container -->
<!-- Photoswipe -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<div class="pswp__bg"></div>
<div class="pswp__scroll-wrap">
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
<button class="pswp__button pswp__button--share" title="Share"></button>
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
</div>
</div>
</div>
</div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
</button>
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
</button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
</div>
</div>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://fritzm.github.io/theme/bootstrap-collapse.js"></script>
</body>
</html>