-
Notifications
You must be signed in to change notification settings - Fork 1
/
hidden-magic.ps
701 lines (664 loc) · 18.2 KB
/
hidden-magic.ps
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
%!PS-Adobe-3.0
%%Creator: gEDA gschem 1.6.0-20091004-56-g11921dc
%%CreationDate: Tue Aug 17 16:24:16 2010
%%Title: /home/fosse/Documents/work/tmp/mic amp/mic amp manual/hidden-magic.sch
%%Author: fosse
%%BoundingBox: 0 0 612 792
%%Orientation: Landscape
%%Pages: 1
%%Endcomments
%%BeginProlog
% Prolog for gEDA, define all the functions needed for rendering
% schematics on Postscript devices
% Draw a line from the second coordinate to the first
% x2 y2 x1 y1 width line -
/line {
setlinewidth
% pop off first element and moveto
moveto
% pop off remaining elements and draw a line segment
lineto
% draw it
stroke
} bind def
% Draw a dot
% x y r dot -
/dot {
0 360 arc fill
} bind def
% Draw a dot-dashed line, a bunch of lined segments,
% if the array element only has length two, draw a dot.
% [ [x2 y2 x1 y1] [x4 y4 x3 y3] [x5 y5] ... ] width dashed -
/width 0 def
/dashed {
dup 2.0 div /width exch def
setlinewidth
% pop off each line segment and draw it as a dot or as a line
{
aload length 2 gt
{ moveto lineto stroke}
{ width dot } ifelse
} forall
} bind def
% Draw an arc segment
% x y r ang1 ang2 width darc -
/darc {
setlinewidth
arc stroke
} bind def
% Draw a series of arc segment bits, if the array element only has a single
% element in it, draw a dot.
% [ [sa1 ea1] [sa2 ea2] ... ] x y r width dashedarc -
/x 0 def
/y 0 def
/dashedarc {
dup /width exch def
setlinewidth
/r exch def
/y exch def
/x exch def
{ aload length 1 gt
{
% this element had two angles in it
% extract start and stop angles
x y r % drop x y and r onto stack
% at this point we have: sa ea x y r
% we need x y r sa ea
% so..
5 -2 roll
% and add it to the current path, and draw it
arc stroke
} {
% this element only had one angle in it, place a
% filled dot at the appropriate place
% compute center point of the arc using the angle
% that is on the top of the stack
dup % angle angle
cos r mul x add % angle x
exch % x angle
sin r mul y add % x y
width % x y width/2
dot % draw the dot
} ifelse
} forall
% Now draw it
stroke
} bind def
% Draw a box
% width height x y linethickness box -
/box {
setlinewidth
moveto
exch dup 0 rlineto % w h, h w w 0 -- Draw bottom line
exch 0 exch rlineto % h w, w h 0, w 0 h -- Draw right line
neg 0 rlineto % w, -w 0 -- Draw Top line
closepath % finish and draw it
stroke
} bind def
% Draw a filled box
% width height x y fbox -
/fbox {
moveto
exch dup 0 rlineto
exch 0 exch rlineto
neg 0 rlineto
closepath
fill
} bind def
% Font reincoding utilities
% ISOLatin1Encoding, extended with remaining uncoded glyphs
/ISOLatin1Extended [
/.notdef /Lslash /lslash /OE /oe /Scaron /scaron /Zcaron /zcaron
/Ydieresis /trademark /bullet /dagger /daggerdbl /ellipsis /emdash
/endash /fi /fl /florin /fraction /guilsinglleft /guilsinglright
/perthousand /quotedblbase /quotedblleft /quotedblright
/quotesinglbase /quotesingle /.notdef /.notdef /.notdef /space
/exclam /quotedbl /numbersign /dollar /percent /ampersand
/quoteright /parenleft /parenright /asterisk /plus /comma /minus
/period /slash /zero /one /two /three /four /five /six /seven /eight
/nine /colon /semicolon /less /equal /greater /question /at /A /B /C
/D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z
/bracketleft /backslash /bracketright /asciicircum /underscore
/quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s
/t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /dotlessi /grave /acute /circumflex
/tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla
/.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent
/sterling /currency /yen /brokenbar /section /dieresis /copyright
/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron
/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph
/periodcentered /cedilla /onesuperior /ordmasculine /guillemotright
/onequarter /onehalf /threequarters /questiondown /Agrave /Aacute
/Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute
/Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth
/Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply
/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn
/germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring
/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave
/iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute
/ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute
/ucircumflex /udieresis /yacute /thorn /ydieresis
] def
% `new-font-name' `encoding-vector' `old-font-name' RE -
/RE {
findfont
dup maxlength dict begin {
1 index /FID ne { def } { pop pop } ifelse
} forall
/Encoding exch def
dup /FontName exch def
currentdict end definefont pop
} bind def
% Text handling functions, select the font and scale it, then we need
% only to apply the appropriate transformations to get the text
% justified into the right spots. The bad thing here is that we don't
% do any kerning, so the output may look a bit strange.
% compute the height of one character and return lly and ury
% (char) charheight lly ury
/charheight {
gsave % push graphics state
newpath % clear current path
0 0 moveto % Set current point
false charpath % get path
flattenpath % flatten path
pathbbox % stack = llx lly urx ury
exch pop % stack = llx lly ury
3 -1 roll pop % stack = lly ury
grestore % pop graphics state
} bind def
% compute the height of a string, one character at a time
% (string) stringheight lly ury
/lly 0.0 def
/ury 0.0 def
/stringheight {
/lly 0.0 def % initial value of heightmin
/ury 0.0 def % initial value of heightmax
{ % work through string
( ) dup 0 4 -1 roll put % create one character string
charheight % measure it's height
dup ury gt { % if ury gt heightmax
/ury exch def % update with new value
} {
pop % else discard ury
} ifelse
dup lly lt { % if lly lt heightmin
/lly exch def % update with new value
} {
pop % else discard lly
} ifelse
} forall
lly ury % Return the results
} bind def
% calculate the string width taking into account the escapes.
/mystrx 0.0 def
/mystry 0.0 def
/mystresc false def
/mystringwidth {
/mystrx 0.0 def
/mystry 0.0 def
/mystresc false def
{ % work through string
% did we process the escape character last?
mystresc {
% last character was escape
% handle the escape
% is it an _ = 95?
dup 95 eq {
pop % we don't need the character anymore
% toggle drawing overbars
0.0 0.0 % make it like it never happened...
} {
% otherwise measure the character
(\\ ) dup 1 4 -1 roll put % count a \ and the character
stringwidth
} ifelse
% and reset the flag
/mystresc false def
} {
% last character was not escape
% is this escape
dup 92 eq {
% yes, escape character, set flag
/mystresc true def
pop % drop character
0.0 0.0 % make like this character has no width and height
} {
( ) dup 0 4 -1 roll put % create one character string
stringwidth % measure it's height/width
} ifelse
} ifelse
% accumulate x and y movements
mystry add /mystry exch def
mystrx add /mystrx exch def
} forall
mystrx mystry % drop results on stack
} bind def
% Render a string with overbars
%
/escaped false def
/drawoverbar false def
/fontsize 0.0 def
%string1 string2 append -
/append {
2 copy length exch length add % find new length
string dup % string1 string2 string string
4 2 roll % string string string1 string2
2 index 0 3 index
% string string string1 string2 string 0 string1
putinterval % string string string1 string2
exch length exch putinterval
} bind def
% If drawoverbar is set, draw a line of the same length as the given string
% string overbarshowline -
/overbarshowline {
% print overbar if necessary
stringwidth pop 0
drawoverbar {
rlineto
gsave stroke grestore
} {
rmoveto
} ifelse
} bind def
% Draws overbars for the given string, then shows the string itself
% string overbarshow
/overbarshow {
/overbarshowacc () def
/overbarshowtxt () def
gsave
fontsize 10.0 div setlinewidth
0 fontsize rmoveto % move to (0,overbarheight)
{ % work through string
escaped {
% the last character was the escape
% handle the escape
% is it an _ = 95?
dup 95 eq {
pop % we don't need the character anymore
overbarshowacc overbarshowline
% toggle drawing overbars
/drawoverbar drawoverbar not def
% Append the contents off the accumulator to the text
% string we're eventually going to show
/overbarshowtxt overbarshowtxt overbarshowacc append def
% clear accumulator
/overbarshowacc () def
} {
% add to accumulator
(\\ ) dup 1 4 -1 roll put
overbarshowacc exch append
/overbarshowacc exch def
} ifelse
% and reset the flag
/escaped false def
} {
% check for escape character \ = 92
dup 92 eq {
% yes, escape character, set flag
/escaped true def
pop % drop character
} {
% add to accumulator
( ) dup 0 4 -1 roll put
overbarshowacc exch append
/overbarshowacc exch def
} ifelse
} ifelse
} forall
% Catch any leftovers
overbarshowacc overbarshowline
overbarshowtxt overbarshowacc append
grestore
show
} bind def
%
% hcenter rjustify vcenter vjustify spacing [(line1) (line2) ... ] rot x y size text -
/stringw 0.0 def
/stringh 0.0 def
/spacing 0.0 def
/strings [ ] def
/stringtxt ( ) def
/stringcount 0 def
/rot 0.0 def
/text {
gsave % save state for later
/drawoverbar false def % start by not drawing overbars
dup /fontsize exch def % save font size for corrections later
% do font selection
/gEDAFont findfont
exch scalefont
setfont
% set up coordinates
translate % move origin to given point
rotate % rotate so that text is drawn
0 0 moveto
dup length /stringcount exch def % Get number of strings
/strings exch def % save strings
/spacing exch def
% do we have more than 1 string to render?
stringcount 1 eq {
/stringtxt strings aload pop def % get the string
/stringw stringtxt mystringwidth pop neg def % get the -width
/stringh stringtxt stringheight exch pop neg def% get the -height
% First do vertical calculations
% hcenter rjustify vcenter vjustify
% vertical justification
{ 0 stringh rmoveto } if
% vertical center
{ 0 stringh 0.3571425 mul rmoveto } if % not 0.5, so that
% it looks nicer
% Then do horizontal calculations
% right justify
{ stringw 0 rmoveto } if
% center
{ stringw 2.0 div 0 rmoveto } if
% Draw the text
stringtxt overbarshow
} {
% More than one line, compute bounding box for the text
% vertical height, don't use the actual hieght of the characters
% assume that the user wants to make the baselines line up with two
% text boxes placed side by side
/stringh stringcount spacing mul neg def
% Now figure out horizontal size, this amounts to keeping track
% of the longest string
/stringw 0.0 def
strings {
mystringwidth pop
dup stringw gt {
/stringw exch def
} {
pop
} ifelse
} forall
/stringw stringw neg def % get the -width
% First do vertical calculations
% hcenter rjustify vcenter vjustify
% vertical justification
{ 0 stringh fontsize add rmoveto } if
% vertical center
{ 0 stringh 0.5 mul rmoveto } if
% Then do horizontal calculations
% right justify
{ stringw 0 rmoveto } if
% center
{ stringw 2.0 div 0 rmoveto } if
% now move up to the first line and begin rendering
0 stringcount 1 sub spacing mul rmoveto
strings {
gsave % Save starting point
overbarshow % render the text
grestore
0 spacing neg rmoveto
} forall
} ifelse
grestore % Restore old state
} bind def
%%EndProlog
%%Page: 1 1
/gEDAFont ISOLatin1Extended /Helvetica RE
2 setlinecap
0.072000 0.072000 scale
8113 500 translate 90 rotate
0.454545 0.454545 scale
-40000 -40000 translate
gsave
40000 40000 62000 40000 10 line
62000 40000 62000 57000 10 line
62000 57000 40000 57000 10 line
40000 57000 40000 40000 10 line
57900 40600 57900 40000 10 line
gsave
false false false false 208.000000 [(FILE:) ] 0 54500 40400 144.444443 text
grestore
gsave
false false false false 208.000000 [(REVISION:) ] 0 58000 40400 144.444443 text
grestore
gsave
false false false false 208.000000 [(DRAWN BY: ) ] 0 58000 40100 144.444443 text
grestore
gsave
false false false false 208.000000 [(PAGE) ] 0 54500 40100 144.444443 text
grestore
gsave
false false false false 208.000000 [(OF) ] 0 56200 40100 144.444443 text
grestore
gsave
false false false false 208.000000 [(TITLE) ] 0 54500 40700 144.444443 text
grestore
54400 40000 62000 40000 10 line
62000 40000 62000 41400 10 line
62000 41400 54400 41400 10 line
54400 41400 54400 40000 10 line
54400 40600 62000 40600 10 line
grestore
gsave
false false false false 650.000000 [(This is where I deal with some issues in the ) (netlisting of things that are not explainable ) (graphically.) ] 0 40500 40600 451.388885 text
grestore
gsave
47300 48500 47500 48500 10 line
46700 48600 46700 48400 10 line
46700 48600 47200 48600 10 line
47200 48600 47300 48500 10 line
47300 48500 47200 48400 10 line
47200 48400 46700 48400 10 line
grestore
gsave
false true true false 260.000000 [(Chassis_GND:1) ] 0 46600 48500 180.555557 text
grestore
52500 48800 53000 48800 10 line
53000 48500 53000 49200 10 line
52500 49200 54500 49200 10 line
50500 49000 51500 49000 10 line
51000 49000 51000 48500 10 line
gsave
51800 49000 51500 49000 10 line
gsave
false true false false 260.000000 [(6) ] 0 51800 49100 180.555557 text
grestore
52200 48800 52500 48800 10 line
gsave
false false false false 260.000000 [(7) ] 0 52210 48900 180.555557 text
grestore
51800 48700 52200 48700 10 line
52200 48700 52200 49300 10 line
52200 49300 51800 49300 10 line
51800 49300 51800 48700 10 line
52200 49200 52500 49200 10 line
gsave
false false false false 260.000000 [(8) ] 0 52210 49300 180.555557 text
grestore
grestore
gsave
true false false false 260.000000 [(MiniDIN5) ] 0 52000 49894 180.555557 text
grestore
gsave
true false false false 260.000000 [(CONN2) ] 0 52010 50100 180.555557 text
grestore
gsave
true false false false 260.000000 [(CUI_MD-505M) ] 0 52000 49500 180.555557 text
grestore
gsave
true false false false 260.000000 [(MD-505M) ] 0 52000 49700 180.555557 text
grestore
49500 49000 49000 49000 10 line
49000 49000 49000 48500 10 line
gsave
49800 49000 49500 49000 10 line
gsave
false true false false 260.000000 [(7) ] 0 49800 49100 180.555557 text
grestore
50200 49000 50500 49000 10 line
gsave
false false false false 260.000000 [(8) ] 0 50210 49100 180.555557 text
grestore
49800 48900 50200 48900 10 line
50200 48900 50200 49100 10 line
50200 49100 49800 49100 10 line
49800 49100 49800 48900 10 line
grestore
gsave
true false false false 260.000000 [(S1) ] 0 50000 49744 180.555557 text
grestore
gsave
true false false false 260.000000 [(7201SYAQE) ] 0 49995 49550 180.555557 text
grestore
gsave
true false false false 260.000000 [(CK_7201SYAQE.fp) ] 0 49995 49350 180.555557 text
grestore
gsave
54800 49200 54500 49200 10 line
gsave
false true false false 260.000000 [(3) ] 0 54800 49300 180.555557 text
grestore
55200 49200 55500 49200 10 line
gsave
false false false false 260.000000 [(4) ] 0 55210 49300 180.555557 text
grestore
54800 49100 55200 49100 10 line
55200 49100 55200 49300 10 line
55200 49300 54800 49300 10 line
54800 49300 54800 49100 10 line
grestore
gsave
true false false false 260.000000 [(BNC Connector) ] 0 55010 49950 180.555557 text
grestore
gsave
true false false false 260.000000 [(CONN3) ] 0 55000 50150 180.555557 text
grestore
gsave
true false false false 260.000000 [(31-5431) ] 0 54995 49750 180.555557 text
grestore
gsave
true false false false 260.000000 [(AMPHENOL_BNC_31-5431-short) ] 0 54995 49550 180.555557 text
grestore
47500 48500 56000 48500 10 line
gsave
false false false false 260.000000 [(Chassis) ] 0 47600 48500 180.555557 text
grestore
56000 48500 56000 49200 10 line
56000 49200 55500 49200 10 line
gsave
false false false false 260.000000 [(Microphone Amplifier Hidden Magic) ] 0 55000 40700 180.555557 text
grestore
gsave
false false false false 260.000000 [(hidden-magic.sch) ] 0 54900 40400 180.555557 text
grestore
gsave
false false false false 260.000000 [(2) ] 0 55000 40100 180.555557 text
grestore
gsave
false false false false 260.000000 [(2) ] 0 56500 40100 180.555557 text
grestore
gsave
false false false false 260.000000 [(1.0) ] 0 58800 40400 180.555557 text
grestore
gsave
false false false false 260.000000 [(EEF) ] 0 58900 40100 180.555557 text
grestore
gsave
false true false false 208.000000 [(DESIGN:) ] 0 60700 40400 144.444443 text
grestore
gsave
false false false false 260.000000 [(EEF) ] 0 60800 40400 180.555557 text
grestore
gsave
false false false false 260.000000 [(2010.06.06) ] 0 60800 40100 180.555557 text
grestore
gsave
false true false false 208.000000 [(DATE:) ] 0 60700 40100 144.444443 text
grestore
newpath
53000 48800
25
0 360 arc
fill
newpath
53000 48800
25
0 360 arc
fill
newpath
53000 48500
25
0 360 arc
fill
newpath
53000 49200
25
0 360 arc
fill
newpath
53000 48800
25
0 360 arc
fill
newpath
53000 49200
25
0 360 arc
fill
newpath
53000 48500
25
0 360 arc
fill
newpath
53000 49200
25
0 360 arc
fill
newpath
51000 49000
25
0 360 arc
fill
newpath
51000 49000
25
0 360 arc
fill
newpath
51000 48500
25
0 360 arc
fill
newpath
51000 49000
25
0 360 arc
fill
newpath
51000 48500
25
0 360 arc
fill
newpath
49000 48500
25
0 360 arc
fill
newpath
49000 48500
25
0 360 arc
fill
newpath
53000 48500
25
0 360 arc
fill
newpath
51000 48500
25
0 360 arc
fill
newpath
49000 48500
25
0 360 arc
fill
showpage
%%End