| 1 |
C @(#)gd8d1.for 19.1 (ES0-DMD) 02/25/03 13:55:08 |
| 2 |
C=========================================================================== |
| 3 |
C Copyright (C) 1995 European Southern Observatory (ESO) |
| 4 |
C |
| 5 |
C This program is free software; you can redistribute it and/or |
| 6 |
C modify it under the terms of the GNU General Public License as |
| 7 |
C published by the Free Software Foundation; either version 2 of |
| 8 |
C the License, or (at your option) any later version. |
| 9 |
C |
| 10 |
C This program is distributed in the hope that it will be useful, |
| 11 |
C but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
C GNU General Public License for more details. |
| 14 |
C |
| 15 |
C You should have received a copy of the GNU General Public |
| 16 |
C License along with this program; if not, write to the Free |
| 17 |
C Software Foundation, Inc., 675 Massachusetss Ave, Cambridge, |
| 18 |
C MA 02139, USA. |
| 19 |
C |
| 20 |
C Corresponding concerning ESO-MIDAS should be addressed as follows: |
| 21 |
C Internet e-mail: [email protected] |
| 22 |
C Postal address: European Southern Observatory |
| 23 |
C Data Management Division |
| 24 |
C Karl-Schwarzschild-Strasse 2 |
| 25 |
C D 85748 Garching bei Muenchen |
| 26 |
C GERMANY |
| 27 |
C=========================================================================== |
| 28 |
C |
| 29 |
SUBROUTINE GD8001(DEVICE,DISPLAY,IDST) |
| 30 |
C |
| 31 |
C++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 32 |
C |
| 33 |
C.IDENTIFICATION |
| 34 |
C subroutine IIDOPN version 1.00 880517 |
| 35 |
C K. Banse ESO - Garching |
| 36 |
C |
| 37 |
C.KEYWORDS |
| 38 |
C DeAnza unit, logical assignment |
| 39 |
C |
| 40 |
C.PURPOSE |
| 41 |
C fulfill the stuff as prescribed in the IDI document... |
| 42 |
C |
| 43 |
C.ALGORITHM |
| 44 |
C straight forward |
| 45 |
C |
| 46 |
C.INPUT/OUTPUT |
| 47 |
C call as IIDOPN(DEVICE,DISPLAY,IDST) |
| 48 |
C |
| 49 |
C input par: |
| 50 |
C DEVICE: char.exp. device type: we expect "DEANZ" ... |
| 51 |
C |
| 52 |
C output par: |
| 53 |
C DISPLAY: I*4 display identifier, used for the DeAnza unit no. |
| 54 |
C IDST: I*4 return status, 0 = success |
| 55 |
C |
| 56 |
C.VERSIONS |
| 57 |
C 1.00 creation (from IDI_OPEN as of 880118) |
| 58 |
C |
| 59 |
C-------------------------------------------------- |
| 60 |
C |
| 61 |
IMPLICIT NONE |
| 62 |
C |
| 63 |
INTEGER*4 CHANL,DISPLAY,IDST |
| 64 |
INTEGER*4 IAV,N |
| 65 |
INTEGER*4 KUNIT(1),NULLO |
| 66 |
C |
| 67 |
INTEGER*2 UNIT |
| 68 |
C |
| 69 |
CHARACTER*(*) DEVICE |
| 70 |
C |
| 71 |
INCLUDE 'MID_INCLUDE:DEANZAH.INC' |
| 72 |
INCLUDE 'MID_INCLUDE:DEANZAS.INC' |
| 73 |
INCLUDE 'MID_INCLUDE:IDIDEV.INC' |
| 74 |
C |
| 75 |
C |
| 76 |
UNIT = QDSPNO |
| 77 |
CALL IP8DAT(UNIT) !attach unit |
| 78 |
C |
| 79 |
C see, if joystick or trackball |
| 80 |
IF (QJOYFL.EQ.1) CALL TRKBAL(UNIT) |
| 81 |
C |
| 82 |
C all o.k. - get the memory stuff in |
| 83 |
N = (QLSTCH + 1) * 2 !QLSTCH = last channel no. |
| 84 |
CALL STKRDI('DAZDEVR',1,N,IAV,MEMREG,KUNIT,NULLO,IDST) |
| 85 |
C |
| 86 |
CALL GD8039(DISPLAY,IDST) !use IIISTI to clear interactive flags |
| 87 |
C |
| 88 |
IDST = 0 |
| 89 |
RETURN |
| 90 |
C |
| 91 |
END |
| 92 |
|
| 93 |
SUBROUTINE GD8002(DISPLAY,IDST) |
| 94 |
C |
| 95 |
C++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 96 |
C |
| 97 |
C.IDENTIFICATION |
| 98 |
C subroutine IIDCLO version 1.00 880118 |
| 99 |
C K. Banse ESO - Garching |
| 100 |
C |
| 101 |
C.KEYWORDS |
| 102 |
C DeAnza unit, logical assignment |
| 103 |
C |
| 104 |
C.PURPOSE |
| 105 |
C fulfill the stuff as prescribed in the IDI document... |
| 106 |
C |
| 107 |
C.ALGORITHM |
| 108 |
C straight forward |
| 109 |
C |
| 110 |
C.INPUT/OUTPUT |
| 111 |
C call as IIDCLO(DISPLAY,IDST) |
| 112 |
C |
| 113 |
C input par: |
| 114 |
C DISPLAY: I*4 display identifier |
| 115 |
C |
| 116 |
C output par: |
| 117 |
C IDST: I*4 return status, 0 = success |
| 118 |
C |
| 119 |
C.VERSIONS |
| 120 |
C 1.00 creation (from IDI_CLOSE as of 880118) |
| 121 |
C |
| 122 |
C-------------------------------------------------- |
| 123 |
C |
| 124 |
IMPLICIT NONE |
| 125 |
C |
| 126 |
INTEGER*4 DISPLAY,IDST |
| 127 |
INTEGER*4 N,KUNIT(1) |
| 128 |
C |
| 129 |
INCLUDE 'MID_INCLUDE:DEANZAH.INC' |
| 130 |
INCLUDE 'MID_INCLUDE:DEANZAS.INC' |
| 131 |
INCLUDE 'MID_INCLUDE:IDIDEV.INC/NOLIST' |
| 132 |
C |
| 133 |
C save memory control register stuff |
| 134 |
N = (QLSTCH + 1) * 2 |
| 135 |
CALL STKWRI('DAZDEVR',MEMREG,1,N,KUNIT,IDST) |
| 136 |
IDST = 0 |
| 137 |
C |
| 138 |
RETURN |
| 139 |
END |
| 140 |
|
| 141 |
SUBROUTINE GD8003(DISPLAY,IDST) |
| 142 |
C |
| 143 |
INTEGER*4 DISPLAY,IDST |
| 144 |
C |
| 145 |
IDST = 0 |
| 146 |
RETURN |
| 147 |
C |
| 148 |
END |
| 149 |
|
| 150 |
SUBROUTINE GD8004(DISPLAY,IDST) |
| 151 |
C |
| 152 |
INTEGER*4 DISPLAY,IDST |
| 153 |
C |
| 154 |
IDST = 0 |
| 155 |
RETURN |
| 156 |
C |
| 157 |
END |
| 158 |
|
| 159 |
SUBROUTINE GD8010(DISPLAY,CONFNO,IDST) |
| 160 |
C |
| 161 |
C++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 162 |
C |
| 163 |
C.IDENTIFICATION |
| 164 |
C subroutine IIDSEL version 1.00 880202 |
| 165 |
C K. Banse ESO - Garching |
| 166 |
C |
| 167 |
C.KEYWORDS |
| 168 |
C DeAnza, initialisation |
| 169 |
C |
| 170 |
C.PURPOSE |
| 171 |
C fulfill the requirements as described in the IDI document |
| 172 |
C |
| 173 |
C.ALGORITHM |
| 174 |
C use DeAnza level 0 software |
| 175 |
C |
| 176 |
C.INPUT/OUTPUT |
| 177 |
C call as IIDSEL(DISPLAY,CONFNO,IDST) |
| 178 |
C |
| 179 |
C input par: |
| 180 |
C DISPLAY: I*4 display id. |
| 181 |
C CONFNO: I*4 configuration number, currently only |
| 182 |
C CONFNO = 2 for RGB mode |
| 183 |
C = 1 for pseudo-colour mode |
| 184 |
C output par: |
| 185 |
C IDST: I*4 return status |
| 186 |
C |
| 187 |
C.VERSIONS |
| 188 |
C |
| 189 |
C-------------------------------------------------- |
| 190 |
C |
| 191 |
IMPLICIT NONE |
| 192 |
C |
| 193 |
INTEGER*4 DISPLAY,CONFNO,IDST |
| 194 |
INTEGER*4 MEMSIZ,STAT |
| 195 |
INTEGER*4 M,N,NN |
| 196 |
C |
| 197 |
INTEGER*2 UNIT |
| 198 |
INTEGER*2 NULL(2) |
| 199 |
INTEGER*2 FCREG,PSR,ITT(256) |
| 200 |
INTEGER*2 LMC,LMR,LR,LVR,WR,LCR,LPR,BPA |
| 201 |
C |
| 202 |
INCLUDE 'MID_INCLUDE:DEANZAH.INC' |
| 203 |
INCLUDE 'MID_INCLUDE:DEANZAS.INC' |
| 204 |
INCLUDE 'MID_INCLUDE:IDIDEV.INC/NOLIST' |
| 205 |
C |
| 206 |
EXTERNAL LMC,LMR,LR,LVR,WR,LCR,LPR,BPA |
| 207 |
C |
| 208 |
DATA PSR /"162344/ |
| 209 |
DATA NULL /0,0/ |
| 210 |
DATA NN /0/ |
| 211 |
C |
| 212 |
C get unit + last channel |
| 213 |
UNIT = DISPLAY |
| 214 |
C |
| 215 |
C |
| 216 |
C-------------------------------------------------- |
| 217 |
C initialize master sync register + zero the DVP control register (misc. reg. 2 |
| 218 |
C-------------------------------------------------- |
| 219 |
C |
| 220 |
CALL IP8QW(LMR,UNIT,DZIOSB,,,NULL,4,2,2) !fill 4 bytes => reg. 2 + 3 |
| 221 |
CCC CALL IP8QW(LMR,UNIT,DZIOSB,,,NULL,2,1,2) |
| 222 |
C |
| 223 |
C-------------------------------------------------- |
| 224 |
C handle the system registers (0 - 31) |
| 225 |
C-------------------------------------------------- |
| 226 |
C |
| 227 |
C |
| 228 |
C set RESOLUTION register (reg 11) to: low byte xfer, |
| 229 |
C yes/no extended memory, |
| 230 |
C low res VOC, |
| 231 |
C xres = 1024/512, yres = 1024/512 |
| 232 |
IF (QMSZX.LT.1024) THEN !just test the x-dim of memory |
| 233 |
SYSREG(12) = "100 |
| 234 |
ELSE |
| 235 |
SYSREG(12) = "140 !extended memory ... |
| 236 |
ENDIF |
| 237 |
C |
| 238 |
C set FOREGROUND register (reg 12) to: value = 0 |
| 239 |
SYSREG(13) = 0 |
| 240 |
C |
| 241 |
C set BACKGROUND register (reg 13) to: value = 0 |
| 242 |
SYSREG(14) = 0 |
| 243 |
C |
| 244 |
C and write it out |
| 245 |
CALL IP8QW(LR,UNIT,DZIOSB,,,SYSREG(12),6,1,11) |
| 246 |
C |
| 247 |
C set the X registers |
| 248 |
SYSREG(17) = 0 !X = 0 (16) |
| 249 |
SYSREG(18) = 0 !XT = 0 (17) |
| 250 |
SYSREG(19) = SYSREG(17) !XMIN = X (18) |
| 251 |
SYSREG(20) = QMSZX - 1 !XMAX = 511,1023,... (19) |
| 252 |
SYSREG(21) = 0 !XAMIN = 0 (20) |
| 253 |
SYSREG(22) = SYSREG(20) !XAMAX = XMAX (21) |
| 254 |
SYSREG(23) = SYSREG(20) !DX = XMAX (22) |
| 255 |
SYSREG(24) = 0 !XTEMP = 0 (23) |
| 256 |
C |
| 257 |
C and write it out |
| 258 |
CALL IP8QW(LR,UNIT,DZIOSB,,,SYSREG(17),16,1,16) |
| 259 |
C |
| 260 |
C set the X registers |
| 261 |
SYSREG(25) = 0 !Y = 0 (24) |
| 262 |
SYSREG(26) = 0 !YT = 0 (25) |
| 263 |
SYSREG(27) = SYSREG(25) !YMIN = 0 (26) |
| 264 |
SYSREG(28) = QMSZY - 1 !YMAX = 511, 1023, ... (27) |
| 265 |
SYSREG(29) = 0 !YAMIN = 0 (28) |
| 266 |
SYSREG(30) = SYSREG(28) !YAMAX = YMAX (29) |
| 267 |
SYSREG(31) = SYSREG(28) !DY = YMAX (30) |
| 268 |
SYSREG(32) = 0 !YTEMP = 0 (31) |
| 269 |
C |
| 270 |
C and write it out |
| 271 |
CALL IP8QW(LR,UNIT,DZIOSB,,,SYSREG(25),16,1,24) |
| 272 |
C |
| 273 |
C-------------------------------------------------- |
| 274 |
C clear all CMRs |
| 275 |
C-------------------------------------------------- |
| 276 |
C |
| 277 |
C clear all following SYREGS = CMR0 - CMR15 |
| 278 |
DO N=33,64 |
| 279 |
SYSREG(N) = 0 |
| 280 |
ENDDO |
| 281 |
CALL IP8QW(LR,UNIT,DZIOSB,,,SYSREG(33),64,1,32) |
| 282 |
C |
| 283 |
C-------------------------------------------------- |
| 284 |
C initialize Peripheral Select reg. |
| 285 |
C-------------------------------------------------- |
| 286 |
C |
| 287 |
C cursor board i -> VOC i |
| 288 |
C A/N generator i -> VOC i |
| 289 |
C |
| 290 |
CALL IP8QW(LMR,UNIT,DZIOSB,,,PSR,2,0,0) |
| 291 |
C |
| 292 |
C-------------------------------------------------- |
| 293 |
C init + clear all DeAnza memories |
| 294 |
C-------------------------------------------------- |
| 295 |
C |
| 296 |
C set CONTROL register (reg 10) to: matrix mode, |
| 297 |
C x-dir primary, y-dir seconday, |
| 298 |
C increment secondary axis by +1 |
| 299 |
C increment primary axis by +1 |
| 300 |
SYSREG(11) = "10 |
| 301 |
CALL IP8QW(LR,UNIT,DZIOSB,,,SYSREG(11),2,0,10) |
| 302 |
C |
| 303 |
DO M=0,QLSTCH |
| 304 |
N = M + 1 |
| 305 |
MEMREG(1,N) = 0 !default for register 0 |
| 306 |
MEMREG(2,N) = QDSZY - 1 !default for reg. 1 is top line of screen |
| 307 |
MEMREG(3,N) = -1 !default for register 2 |
| 308 |
IF (M.EQ.QLSTCH) THEN |
| 309 |
MEMREG(4,N) = "12000 !declare channel as graphics |
| 310 |
ELSE |
| 311 |
MEMREG(4,N) = "10000 !default for register 3 |
| 312 |
ENDIF |
| 313 |
MEM7RG(N) = 0 !default for register 7 |
| 314 |
C |
| 315 |
CALL IP8QW(LMC,UNIT,DZIOSB,,,MEMREG(1,N),8,M,0) |
| 316 |
C |
| 317 |
SYSREG(33) = 2**M !fill also low part of CMR0 |
| 318 |
CALL IP8QW(LR,UNIT,DZIOSB,,,SYSREG(33),2,1,32) |
| 319 |
CALL IP8QW(WR,UNIT,DZIOSB,,,NN,2,0,1) !NN is dummy |
| 320 |
ENDDO |
| 321 |
C |
| 322 |
C set CONTROL register (reg 10) to: non-matrix mode, |
| 323 |
C x-dir primary, y-dir seconday, |
| 324 |
C increment secondary axis by +1 |
| 325 |
C increment primary axis by +1 |
| 326 |
SYSREG(11) = 0 |
| 327 |
C |
| 328 |
C broadcast ramp ITT to all memory channels |
| 329 |
M = QLSTCH + 1 !total no. of memories |
| 330 |
SYSREG(33) = (2**M) - 1 |
| 331 |
CALL IP8QW(LR,UNIT,DZIOSB,,,SYSREG(33),2,0,32) |
| 332 |
DO N=1,256 |
| 333 |
ITT(N) = N - 1 |
| 334 |
ENDDO |
| 335 |
CALL IP8QW(BPA,UNIT,DZIOSB,,,ITT,512,0,0) |
| 336 |
C |
| 337 |
C reset also DX, DY registers and CMR0 |
| 338 |
SYSREG(23) = 0 |
| 339 |
SYSREG(31) = 0 |
| 340 |
SYSREG(33) = 0 |
| 341 |
CALL IP8QW(LR,UNIT,DZIOSB,,,SYSREG(11),46,1,10) |
| 342 |
C |
| 343 |
C-------------------------------------------------- |
| 344 |
C clear A/N memory |
| 345 |
C-------------------------------------------------- |
| 346 |
C |
| 347 |
IF (QALPNO.NE.0) CALL GD8018(DISPLAY,QALPNO,1,0,IDST) |
| 348 |
C |
| 349 |
C-------------------------------------------------- |
| 350 |
C initialize cursor registers |
| 351 |
C-------------------------------------------------- |
| 352 |
C |
| 353 |
CURREG(1) = 224 !set cursor coord. to center of screen |
| 354 |
CURREG(2) = 224 |
| 355 |
CURREG(3) = 274 |
| 356 |
CURREG(4) = 274 |
| 357 |
C |
| 358 |
C set up Cursor Control register (reg. 4): |
| 359 |
C disable display of programmable cursors |
| 360 |
C both cursors use VOC LUT section 0 (black area -> LUT section 2) |
| 361 |
C disable priority blinking |
| 362 |
C disable intensity inversion, disable X-, Y- components for cursor 1 + 2 |
| 363 |
C use fixed cursor form 0 |
| 364 |
CURREG(5) = 0 |
| 365 |
CURREG(6) = 0 |
| 366 |
CURREG(7) = 0 |
| 367 |
CALL IP8QW(LCR,UNIT,DZIOSB,,,CURREG(1),14,0,0) |
| 368 |
C |
| 369 |
C-------------------------------------------------- |
| 370 |
C initialize VOC registers: |
| 371 |
C-------------------------------------------------- |
| 372 |
C |
| 373 |
C enable split screen, disable cursors |
| 374 |
C enable alpha numerics |
| 375 |
C all FCRs use channel 0 + bypass LUT |
| 376 |
C |
| 377 |
VOCREG(1) = 0 !X split (0) |
| 378 |
VOCREG(2) = QDSZY - 1 !Y split (1) |
| 379 |
C |
| 380 |
C set VOC control reg.: |
| 381 |
C cursor enable, alphanumeric enable, |
| 382 |
C graphics enable, hardsplit enable |
| 383 |
C |
| 384 |
VOCREG(3) = "042403 !CONTROL (2) |
| 385 |
C |
| 386 |
C use LUT section 0 |
| 387 |
VOCREG(4) = 0 !LUT address (3) |
| 388 |
C |
| 389 |
C send the stuff out |
| 390 |
CALL IP8QW(LVR,UNIT,DZIOSB,,,VOCREG,8,0,0) |
| 391 |
C |
| 392 |
C set up FCR's for colour + graphics |
| 393 |
C-------------------------------------------------- |
| 394 |
C |
| 395 |
C |
| 396 |
IF (CONFNO.EQ.1) THEN |
| 397 |
C |
| 398 |
C in pseudo colour mode: |
| 399 |
C channel 0 -> all screen segments + R, G, B channel |
| 400 |
C bypass LUT |
| 401 |
C QLSTCH -> all screen segments + overlay channel |
| 402 |
C |
| 403 |
FCREG = ISHFT(QLSTCH,8) |
| 404 |
DO N=1,4 |
| 405 |
FCR(N) = 0 |
| 406 |
FCR(N+4) = FCREG |
| 407 |
ENDDO |
| 408 |
C |
| 409 |
ELSE |
| 410 |
C |
| 411 |
C in RGB mode: |
| 412 |
C channel 0 -> all screen segments + R channel |
| 413 |
C channel 1 -> all screen segments + G channel |
| 414 |
C channel 2 -> all screen segments + B channel |
| 415 |
C bypass LUT |
| 416 |
C QLSTCH -> all screen segments + overlay channel |
| 417 |
C |
| 418 |
IF (QLSTCH.LT.3) THEN |
| 419 |
DO N=1,8 !send chan 0 to everything |
| 420 |
FCR(N) = "010020 |
| 421 |
ENDDO |
| 422 |
IF (QLSTCH.GE.1) THEN |
| 423 |
DO N=1,4 !send chan 0,1 comme il faut |
| 424 |
FCR(N) = "010420 |
| 425 |
ENDDO |
| 426 |
ENDIF |
| 427 |
IF (QLSTCH.GE.2) THEN |
| 428 |
DO N=5,8 !send chan 0,1,2 comme il faut |
| 429 |
FCR(N) = "22 |
| 430 |
ENDDO |
| 431 |
ENDIF |
| 432 |
ELSE |
| 433 |
DO N=1,4 !send chan 0,1,2,3 comme il faut |
| 434 |
FCR(N) = "010420 |
| 435 |
FCR(N+4) = "001422 |
| 436 |
ENDDO |
| 437 |
ENDIF |
| 438 |
ENDIF |
| 439 |
C |
| 440 |
C send the stuff out |
| 441 |
CALL IP8QW(LVR,UNIT,DZIOSB,,,FCR,16,0,8) |
| 442 |
C |
| 443 |
C alright then... |
| 444 |
RETURN |
| 445 |
END |
| 446 |
|
| 447 |
SUBROUTINE GD8016(DISPLAY,CHANS,NOCHAN,LUTF,ITTF,IDST) |
| 448 |
C |
| 449 |
C++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 450 |
C |
| 451 |
C.IDENTIFICATION |
| 452 |
C subroutine IIDSDP version 1.00 880201 |
| 453 |
C K. Banse ESO - Garching |
| 454 |
C |
| 455 |
C.KEYWORDS |
| 456 |
C DeAnza, memory channel, ITT, LUT |
| 457 |
C |
| 458 |
C.PURPOSE |
| 459 |
C fulfill the requirements as described in the IDI document |
| 460 |
C |
| 461 |
C.ALGORITHM |
| 462 |
C use DeAnza level 0 software |
| 463 |
C |
| 464 |
C.INPUT/OUTPUT |
| 465 |
C call as IIDSDP(DISPLAY,CHANS,NOCHAN,LUTF,ITTF,IDST) |
| 466 |
C |
| 467 |
C input par: |
| 468 |
C DISPLAY: I*4 display id. |
| 469 |
C CHANS: I*4 array memory id's |
| 470 |
C NOCHAN: I*4 no. of memories |
| 471 |
C LUTF: I*4 array LUT flags : -1 = leave it as it is |
| 472 |
C 7 = R + G + B |
| 473 |
C 1 = R |
| 474 |
C 2 = G |
| 475 |
C 4 = B |
| 476 |
C ITTF: I*4 array ITT flags : -1 = leave it as it is |
| 477 |
C 0 = bypass ITT |
| 478 |
C 1 = use ITT |
| 479 |
C |
| 480 |
C output par: |
| 481 |
C IDST: I*4 return status |
| 482 |
C |
| 483 |
C-------------------------------------------------- |
| 484 |
C |
| 485 |
IMPLICIT NONE |
| 486 |
C |
| 487 |
INTEGER*4 DISPLAY,CHANS(1),NOCHAN,LUTF(1),ITTF(1) |
| 488 |
INTEGER*4 IDST,N,LOOP,SPLITMODE |
| 489 |
C |
| 490 |
INTEGER*2 UNIT,FCLEFT,FCRIGHT,BY |
| 491 |
INTEGER*2 WORK,CLEAR |
| 492 |
INTEGER*2 LMC,RVR,LVR |
| 493 |
C |
| 494 |
INCLUDE 'MID_INCLUDE:DEANZAH.INC' |
| 495 |
INCLUDE 'MID_INCLUDE:DEANZAS.INC' |
| 496 |
INCLUDE 'MID_INCLUDE:IDIDEV.INC' |
| 497 |
C |
| 498 |
EXTERNAL LMC,LVR,RVR |
| 499 |
C |
| 500 |
UNIT = DISPLAY |
| 501 |
CALL STKRDI('DAZHOLD',3,1,N,SPLITMODE,N,N,N) |
| 502 |
C |
| 503 |
C loop over channels |
| 504 |
DO 1000 LOOP=1,NOCHAN |
| 505 |
C |
| 506 |
C test, if we have to modify ITT visibility |
| 507 |
IF (ITTF(LOOP).GE.0) THEN |
| 508 |
C |
| 509 |
C clear + set ITT bit (12) of memory register 3 of channel CHAN |
| 510 |
N = CHANS(LOOP) + 1 |
| 511 |
MEMREG(4,N) = IAND(MEMREG(4,N),"167777) |
| 512 |
IF (ITTF(LOOP).NE.0) |
| 513 |
+ MEMREG(4,N) = IOR(MEMREG(4,N),"10000) |
| 514 |
C |
| 515 |
C and send it out |
| 516 |
CALL IP8QW(LMC,UNIT,DZIOSB,,,MEMREG(4,N),2,CHANS(LOOP),3) |
| 517 |
ENDIF |
| 518 |
C |
| 519 |
IF (CHANS(LOOP).EQ.QOVCH) GOTO 1000 |
| 520 |
C |
| 521 |
C now handle the LUT part |
| 522 |
C |
| 523 |
IF (LUTF(LOOP).LT.0) THEN !leave bypass flag as it is |
| 524 |
WORK = CHANS(LOOP) |
| 525 |
CLEAR = "160 !clear only channel |
| 526 |
ELSE |
| 527 |
CLEAR = "140 !clear bypass bit + channel |
| 528 |
IF (LUTF(LOOP).NE.0) THEN |
| 529 |
BY = 0 |
| 530 |
ELSE |
| 531 |
BY = "20 |
| 532 |
ENDIF |
| 533 |
WORK = IOR(BY,CHANS(LOOP)) !update bypass flag |
| 534 |
ENDIF |
| 535 |
C |
| 536 |
C for image channels we only have to work in non-split, non-RGB mode ... |
| 537 |
CALL IP8QW(RVR,UNIT,DZIOSB,,,FCR,16,0,8) !get current FCRs |
| 538 |
C |
| 539 |
IF (QRGBFL.EQ.1) GOTO 1000 |
| 540 |
IF (SPLITMODE.EQ.0) THEN |
| 541 |
C |
| 542 |
C update FCR for screen segment 3 only (that's the one we see) |
| 543 |
FCRIGHT = IAND(FCR(4),CLEAR) !get right byte + keep only LUT section |
| 544 |
FCRIGHT = IOR(FCRIGHT,WORK) !include new bypass bit + channel |
| 545 |
FCLEFT = ISHFT(FCR(4),-8) !get left byte of FCR3 |
| 546 |
FCLEFT = IAND(FCLEFT,CLEAR) !only keep LUT section |
| 547 |
FCLEFT = IOR(FCLEFT,WORK) !include new bypass bit + channel |
| 548 |
C |
| 549 |
FCR(4) = ISHFT(FCLEFT,8) !put the pieces back together |
| 550 |
FCR(4) = IOR(FCR(4),FCRIGHT) |
| 551 |
C |
| 552 |
FCRIGHT = IAND(FCR(8),CLEAR) !get right byte + keep only LUT section |
| 553 |
FCRIGHT = IOR(FCRIGHT,WORK) !include new bypass bit + channel |
| 554 |
FCR(8) = IAND(FCR(8),"177400) !clear right byte completely |
| 555 |
FCR(8) = IOR(FCR(8),FCRIGHT) !and add in new right side |
| 556 |
ELSE |
| 557 |
C |
| 558 |
C in split mode we only update the bypass flag |
| 559 |
DO N=1,8 |
| 560 |
FCLEFT = ISHFT(FCR(N),-8) !get left byte |
| 561 |
FCRIGHT = IAND(FCR(N),"377) !get right byte |
| 562 |
IF (IAND(FCLEFT,"17).EQ.CHANS(LOOP)) THEN |
| 563 |
FCLEFT = IAND(FCLEFT,"357) !get rid of old BY bit |
| 564 |
FCLEFT = IOR(FCLEFT,BY) !insert new one |
| 565 |
ENDIF |
| 566 |
IF (IAND(FCRIGHT,"17).EQ.CHANS(LOOP)) THEN |
| 567 |
FCRIGHT = IAND(FCRIGHT,"357) !get rid of old BY bit |
| 568 |
FCRIGHT = IOR(FCRIGHT,BY) !insert new one |
| 569 |
ENDIF |
| 570 |
C |
| 571 |
FCR(N) = ISHFT(FCLEFT,8) !put the bytes together |
| 572 |
FCR(N) = IOR(FCR(N),FCRIGHT) |
| 573 |
ENDDO |
| 574 |
ENDIF |
| 575 |
C |
| 576 |
C send the FCRs back to the DeAnza |
| 577 |
CALL IP8QW(LVR,UNIT,DZIOSB,,,FCR,16,0,8) |
| 578 |
C |
| 579 |
1000 CONTINUE |
| 580 |
C |
| 581 |
IDST = 0 |
| 582 |
RETURN |
| 583 |
END |
| 584 |
|
| 585 |
SUBROUTINE GD8050(DISPLAY,LUNO,IDST) |
| 586 |
C |
| 587 |
C++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 588 |
C |
| 589 |
C.IDENTIFICATION |
| 590 |
C subroutine IIDIAG version 1.00 880202 |
| 591 |
C K. Banse ESO - Garching |
| 592 |
C |
| 593 |
C.KEYWORDS |
| 594 |
C DeAnza, system status |
| 595 |
C |
| 596 |
C.PURPOSE |
| 597 |
C display the different DeAnza registers |
| 598 |
C |
| 599 |
C.ALGORITHM |
| 600 |
C use IP8LIB routines to read the registers |
| 601 |
C |
| 602 |
C.INPUT/OUTPUT |
| 603 |
C |
| 604 |
C-------------------------------------------------- |
| 605 |
C |
| 606 |
IMPLICIT NONE |
| 607 |
C |
| 608 |
INTEGER*4 DISPLAY,LUNO,IDST |
| 609 |
INTEGER*4 CURSOR,HI,LO |
| 610 |
INTEGER*4 I,IAV,M,N,N1 |
| 611 |
C |
| 612 |
INTEGER*2 REG(14),XREG(8),YREG(8) |
| 613 |
INTEGER*2 PSR |
| 614 |
INTEGER*2 JOYREG(3) |
| 615 |
INTEGER*2 BITTS(16) |
| 616 |
INTEGER*2 XREAL,YREAL |
| 617 |
INTEGER*2 UNIT |
| 618 |
INTEGER*2 RR,RMR,RVR,RCR,RPR |
| 619 |
C |
| 620 |
CHARACTER DAZREG(14)*5 |
| 621 |
CHARACTER*2 SS(8) |
| 622 |
C |
| 623 |
INCLUDE 'MID_INCLUDE:DEANZAH.INC' |
| 624 |
INCLUDE 'MID_INCLUDE:DEANZAS.INC' |
| 625 |
C |
| 626 |
EXTERNAL RR,RMR,RVR,RCR,RPR |
| 627 |
C |
| 628 |
DATA DAZREG /'CMD','ISR',' ','PSR','RSR','DW',' ', |
| 629 |
+ 'DATA','IR','COUNT','CNTRL','RES','FG','BG'/ |
| 630 |
DATA SS /'00','01','10','11','00','01','10','11'/ |
| 631 |
C |
| 632 |
UNIT = DISPLAY |
| 633 |
C |
| 634 |
C read interesting system registers |
| 635 |
CALL IP8QW(RR,UNIT,DZIOSB,,,REG,2,0,0) !crashes the VAX... |
| 636 |
CALL IP8QW(RR,UNIT,DZIOSB,,,REG(2),2,0,1) !crashes the VAX... |
| 637 |
CALL IP8QW(RR,UNIT,DZIOSB,,,REG(4),2,0,3) !PSR |
| 638 |
CALL IP8QW(RR,UNIT,DZIOSB,,,REG(5),2,0,4) !RSR |
| 639 |
CALL IP8QW(RR,UNIT,DZIOSB,,,REG(6),2,0,5) !DW |
| 640 |
CC CALL IP8QW(RR,UNIT,DZIOSB,,,REG(8),2,0,7) !gives driver fault |
| 641 |
CC CALL IP8QW(RR,UNIT,DZIOSB,,,REG(9),2,0,8) !gives driver fault |
| 642 |
CALL IP8QW(RR,UNIT,DZIOSB,,,REG(10),2,0,9) !COUNT |
| 643 |
CALL IP8QW(RR,UNIT,DZIOSB,,,REG(11),8,1,10) !CONTRL - BG |
| 644 |
C |
| 645 |
C read X, Y registers |
| 646 |
CALL IP8QW(RR,UNIT,DZIOSB,,,XREG,16,1,16) |
| 647 |
CALL IP8QW(RR,UNIT,DZIOSB,,,YREG,16,1,24) |
| 648 |
XREG(5) = IAND("3777,XREG(5)) |
| 649 |
XREG(6) = IAND("3777,XREG(6)) |
| 650 |
YREG(5) = IAND("3777,YREG(5)) |
| 651 |
YREG(6) = IAND("3777,YREG(6)) |
| 652 |
C |
| 653 |
C read Peripheral Select reg. |
| 654 |
CALL IP8QW(RMR,UNIT,DZIOSB,,,PSR,2,0,0) |
| 655 |
CURSOR = IAND("3,ISHFT(PSR,-8)) |
| 656 |
C |
| 657 |
C read VOC registers |
| 658 |
CALL IP8QW(RVR,UNIT,DZIOSB,,,VOCREG,8,0,0) |
| 659 |
CALL IP8QW(RVR,UNIT,DZIOSB,,,FCR,16,0,8) |
| 660 |
C |
| 661 |
C read cursor registers |
| 662 |
CALL IP8QW(RCR,UNIT,DZIOSB,,,CURREG,14,CURSOR,0) |
| 663 |
C |
| 664 |
C read joystick registers |
| 665 |
CALL IP8QW(RPR,UNIT,DZIOSB,,,JOYREG,6,CURSOR,1) |
| 666 |
C |
| 667 |
C now let's massage the info we got... |
| 668 |
C |
| 669 |
C display system interface registers 9 - 13 |
| 670 |
WRITE(LUNO,10001) |
| 671 |
C |
| 672 |
C display all interesting system registers |
| 673 |
N = 0 !CMD |
| 674 |
N1 = 1 |
| 675 |
CALL BITS(REG(N1),BITTS) |
| 676 |
WRITE(LUNO,10100) N,DAZREG(N1),REG(N1) |
| 677 |
WRITE(LUNO,10020) (BITTS(I),I=16,1,-1) |
| 678 |
C |
| 679 |
N = 1 !ISR |
| 680 |
N1 = 2 |
| 681 |
CALL BITS(REG(N1),BITTS) |
| 682 |
WRITE(LUNO,10101) N,DAZREG(N1),REG(N1) |
| 683 |
WRITE(LUNO,10020) (BITTS(I),I=16,1,-1) |
| 684 |
C |
| 685 |
N = 3 !PSR |
| 686 |
N1 = 4 |
| 687 |
CALL BITS(REG(N1),BITTS) |
| 688 |
WRITE(LUNO,10103) N,DAZREG(N1),REG(N1) |
| 689 |
WRITE(LUNO,10020) (BITTS(I),I=16,1,-1) |
| 690 |
C |
| 691 |
N = 4 !RSR |
| 692 |
N1 = 5 |
| 693 |
CALL BITS(REG(N1),BITTS) |
| 694 |
WRITE(LUNO,10104) N,DAZREG(N1),REG(N1) |
| 695 |
WRITE(LUNO,10020) (BITTS(I),I=16,1,-1) |
| 696 |
C |
| 697 |
N = 5 !DW |
| 698 |
N1 = 6 |
| 699 |
WRITE(LUNO,10105) N,DAZREG(N1),REG(N1) |
| 700 |
LO = IAND(REG(N1),"377) |
| 701 |
HI = ISHFT(IAND(REG(N1),"177400),-8) |
| 702 |
WRITE(LUNO,10200) HI,LO |
| 703 |
C |
| 704 |
N = 9 !COUNT |
| 705 |
N1 = 10 |
| 706 |
WRITE(LUNO,10109) N,DAZREG(N1),REG(N1) |
| 707 |
WRITE(LUNO,10201) REG(N1) |
| 708 |
C |
| 709 |
N = 10 !CONTRL |
| 710 |
N1 = 11 |
| 711 |
CALL BITS(REG(N1),BITTS) |
| 712 |
WRITE(LUNO,10110) N,DAZREG(N1),REG(N1) |
| 713 |
WRITE(LUNO,10020) (BITTS(I),I=16,1,-1) |
| 714 |
C |
| 715 |
N = 11 !RES |
| 716 |
N1 = 12 |
| 717 |
CALL BITS(REG(N1),BITTS) |
| 718 |
WRITE(LUNO,10111) N,DAZREG(N1),REG(N1) |
| 719 |
WRITE(LUNO,10020) (BITTS(I),I=16,1,-1) |
| 720 |
C |
| 721 |
N = 12 !FG |
| 722 |
N1 = 13 |
| 723 |
WRITE(LUNO,10112) N,DAZREG(N1),REG(N1) |
| 724 |
WRITE(LUNO,10201) REG(N1) |
| 725 |
C |
| 726 |
N = 13 !BG |
| 727 |
N1 = 14 |
| 728 |
WRITE(LUNO,10113) N,DAZREG(N1),REG(N1) |
| 729 |
WRITE(LUNO,10201) REG(N1) |
| 730 |
C |
| 731 |
C display X, Y reg. |
| 732 |
XREAL = XREG(1) + XREG(2) |
| 733 |
YREAL = YREG(1) + YREG(2) |
| 734 |
WRITE(LUNO,10002) XREG(1),YREG(1),XREG(2),YREG(2), |
| 735 |
+ XREAL,YREAL,(XREG(I),YREG(I),I=3,8) |
| 736 |
C |
| 737 |
C display PSR |
| 738 |
CALL BITS(PSR,BITTS) |
| 739 |
WRITE(LUNO,10003) PSR,(BITTS(I),I=16,1,-1) |
| 740 |
C |
| 741 |
C display cursor reg. |
| 742 |
CALL BITS(CURREG(5),BITTS) |
| 743 |
WRITE(LUNO,10004) (CURREG(I),I=1,5),(BITTS(N),N=16,1,-1), |
| 744 |
+ (CURREG(I),I=6,7) |
| 745 |
C |
| 746 |
C display joystick reg. |
| 747 |
CALL BITS(JOYREG(1),BITTS) |
| 748 |
XREAL = IAND("377,ISHFT(JOYREG(3),-8)) |
| 749 |
YREAL = IAND(JOYREG(3),"377) |
| 750 |
WRITE(LUNO,10005) JOYREG(1),(BITTS(N),N=16,1,-1), |
| 751 |
+ JOYREG(2),JOYREG(3),XREAL,YREAL |
| 752 |
C |
| 753 |
C display VOC registers |
| 754 |
VOCREG(1) = IAND("777,VOCREG(1)) |
| 755 |
VOCREG(2) = IAND("777,VOCREG(2)) |
| 756 |
CALL BITS(VOCREG(3),BITTS) |
| 757 |
WRITE(LUNO,10006) (VOCREG(I),I=1,3),(BITTS(I),I=16,1,-1), |
| 758 |
+ VOCREG(4) |
| 759 |
WRITE(LUNO,10007) |
| 760 |
DO N=8,1,-1 |
| 761 |
CALL BITS(FCR(N),BITTS) |
| 762 |
M = N - 1 |
| 763 |
WRITE(LUNO,10008) M,(BITTS(I),I=16,1,-1),SS(N) |
| 764 |
ENDDO |
| 765 |
C |
| 766 |
C job done |
| 767 |
IDST = 0 |
| 768 |
RETURN |
| 769 |
C |
| 770 |
C FORMATS |
| 771 |
10001 FORMAT('0system interface registers:') |
| 772 |
10002 FORMAT('0X, Y registers (dec.):'/ |
| 773 |
+ ' X = ',I6,T40,'Y = ',I6/ |
| 774 |
+ ' XT = ',I6,T40,'YT = ',I6/ |
| 775 |
+ ' XREAL = ',I6,'*'T40,'YREAL = ',I6,'*'/ |
| 776 |
+ ' XMIN = ',I6,T40,'YMIN = ',I6/ |
| 777 |
+ ' XMAX = ',I6,T40,'YMAX = ',I6/ |
| 778 |
+ ' XAMIN = ',I6,T40,'YAMIN = ',I6/ |
| 779 |
+ ' XAMAX = ',I6,T40,'YAMAX = ',I6/ |
| 780 |
+ ' DX = ',I6,T40,'DY = ',I6/ |
| 781 |
+ ' XTEMP = ',I6,T40,'YTEMP = ',I6) |
| 782 |
10003 FORMAT('0Peripheral Select : ',O6,' (oct) or',T40,'C3 C2 C1 ', |
| 783 |
+ 'C0 A3 A2 A1 A0'/ |
| 784 |
+ T40,2I1,1X,2I1,1X,2I1,1X,2I1,2X,2I1,1X,2I1,1X,2I1,1X,2I1) |
| 785 |
10004 FORMAT('0Cursor registers :'/ |
| 786 |
+ ' X, Y - coord. of cursor 1 = ',2I4,' (dec)'/ |
| 787 |
+ ' X, Y - coord. of cursor 2 = ',2I4,' (dec)'/ |
| 788 |
+ ' cursor control reg. = ',O6,' or', |
| 789 |
+ T40,'P2 P1 PE PB I2 B2 Y2 X2 I1 B1 Y1 X1 F3-F0'/ |
| 790 |
+ T40,I2,11I3,2X,4I1/ |
| 791 |
+ ' LUT address reg. = ',O6,' (oct)'/ |
| 792 |
+ ' cursor rate reg. = ',O6,' (oct)') |
| 793 |
10005 FORMAT('0joystick registers 1 - 3:'/ |
| 794 |
+ ' control reg. = ',O6,' (oct) or', |
| 795 |
+ T40,'RES. T E M C2 C1 J7 - J2 IE CL'/ |
| 796 |
+ T40,3I1,1X,3I2,2I3,2X,6I1,2I3/ |
| 797 |
+ ' A/B optional input = ',O6,' (oct)'/ |
| 798 |
+ ' X/Y displacement = ',O6,' (oct) or', |
| 799 |
+ T40,' Y X'/ |
| 800 |
+ T40,I6,2X,I6) |
| 801 |
10006 FORMAT(' VOC registers:'/ |
| 802 |
+ ' X split reg. = ',O6,' (oct)'/ |
| 803 |
+ ' Y split reg. = ',O6,' (oct)'/ |
| 804 |
+ ' control reg. = ',O6,' (oct) or', |
| 805 |
+ T40,'* CE AR M1 M0 AE GB GE *** P1 P0 SS SY SX'/ |
| 806 |
+ T40,I1,7I3,1X,3I1,5I3/ |
| 807 |
+ ' LUT address reg. = ',O6,' (oct)') |
| 808 |
10007 FORMAT('0FCR registers:'// |
| 809 |
+ ' * S6+5 BY B3-B0 * S6+5 BY B3-B0 segment') |
| 810 |
10008 FORMAT(' FCR',I2,2X,I1,3X,2I1,I3,2X,4I1,I3,3X,2I1, |
| 811 |
+ I3,2X,4I1,' -> ',A) |
| 812 |
10020 FORMAT(T32,I2,15I3) |
| 813 |
10100 FORMAT(' reg.',I2,1X,A,' = ',O6,' (oct)' |
| 814 |
+ ,T32,'SR CR DW CW SC IE S2 MF CD VB AD P1 P0 D I MS') |
| 815 |
10101 FORMAT('0reg.',I2,1X,A,' = ',O6,' (oct)' |
| 816 |
+ ,t32,'I1 IQ IC IA IS S2 S2 MF CD VB AD P1 P0 D I MS') |
| 817 |
10103 FORMAT('0reg.',I2,1X,A,' = ',O6,' (oct)' |
| 818 |
+ ,T32,'A2 A1 A0 * * * * * U7 U6 U5 U4 U3 U2 U1 U0') |
| 819 |
10104 FORMAT('0reg.',I2,1X,A,' = ',O6,' (oct)' |
| 820 |
+ ,T32,' * * * * * * * HS CD VB AP RR WR ID EF MS') |
| 821 |
10105 FORMAT('0reg.',I2,1X,A,' = ',O6,' (oct)' |
| 822 |
+ ,T32,'UPPER BOUND LOWER BOUND') |
| 823 |
10109 FORMAT('0reg.',I2,1X,A,' = ',O6,' (oct)' |
| 824 |
+ ,T32,'UNSIGNED 16 BIT INTEGER') |
| 825 |
10110 FORMAT('0reg.',I2,1X,A,' = ',O6,' (oct)' |
| 826 |
+ ,T32,' * * * * CSC PB AG MG SW ME PS SI PI') |
| 827 |
10111 FORMAT('0reg.',I2,1X,A,' = ',O6,' (oct)' |
| 828 |
+ ,T32,' * * * * * * * * MR SG 1K MS Y1 Y0 X1 X0') |
| 829 |
10112 FORMAT('0reg.',I2,1X,A,' = ',O6,' (oct)' |
| 830 |
+ ,T32,' * * * * * * * * FOREGROUND DATA VALUE') |
| 831 |
10113 FORMAT('0reg.',I2,1X,A,' = ',O6,' (oct)' |
| 832 |
+ ,T32,' * * * * * * * * BACKGROUND DATA VALUE') |
| 833 |
10200 FORMAT(T32,I5,I6) |
| 834 |
10201 FORMAT(T32,I8) |
| 835 |
END |