[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

208.0. "Basic Screen Dump Subroutine" by GENRAL::WISHART () Mon Dec 08 1986 13:11

The following is a GWBASIC subroutine for the DEC Rainbow 100 that does a
screen dump to a DEC LA50/100 printer. Would it be possible to adapt this to the
Amiga? I am not familiar enough with the graphics working of the Amiga to do it.
Also I didn't write the subroutine either, so I'm not too sure how it works
either!

5000 '=================================================================
5900 'AUTHOR: POWELL HAZZARD - DEC
5901 'SUBROUTINE TO DO A SCREEN DUMP IN GWBASIC FOR THE RAINBOW 100
5902 'FOR MEDIUM GRAPHICS SCREEN ONLY
5903 'FOR LA50 OR LA100 PRINTERS
5904 '
5921 DIM A$(7)
5922 A$(0)="!3"+CHR$(63):       'GRAPHIC BLANK
5923 A$(1)="!3"+CHR$(66):       'GRAPHIC TOP SCAN LINES
5924 A$(2)="!3"+CHR$(75):       'GRAPHIC MIDDLE SCAN LINES
5925 A$(4)="!3"+CHR$(119):      'GRAPHIC BOTTOM SCAN LINES
5926 A$(3)="!3"+CHR$(78):       'GRAPHIC TOP AND MIDDLE SCAN LINES
5927 A$(6)="!3"+CHR$(123):      'GRAPHIC MIDDLE AND BOTTOM SCAN LINES
5928 A$(7)="!3"+CHR$(126):      'GRAPHIC ALL SCAN LINES
5929 A$(5)="!3"+CHR$(114):      'GRAPHIC TOP AND BOTTOM SCAN LINES
5960 OPEN "O",#1,"LPT1:"        'OPEN FILE FOR PRINTOUT
5965 OPEN "R",#2,"GRAPHIC.TMP",255      'OPEN TEMP FILE FOR CHARACTER BUFFER
5966 FIELD #2,255 AS A$:        'SET UP BUFFER
5967 A$=SPACE$(255):            'FILL BUFFER WITH SPACES
5999 PRINT #1,CHR$(27);"Pq":    'PUT PRINTER IN GRAPHIC MODE
6000 '
6001 'I% = ROW NUMBER FOR PIXELS ON THE SCREEN
6002 'I1% = COLUMN NUMBER FOR PIXELS ON THE SCREEN
6003 'IF THE PIXELS IS A COLOR IS NOT ZERO THE SCN FUNCTION RETURNS A ONE
6004 '
6009 FOR I% = 0 TO 239 STEP 3
6010 FOR I1% = 0 TO 379 STEP 6
6020 X%=SGN(POINT(I1%,I%))+SGN(POINT(I1%,I%+1))*2+SGN(POINT(I1%,I%+2))*4
6023 Y%=SGN(POINT(I1%+1,I%))+SGN(POINT(I1%+1,I%+1))*2+SGN(POINT(I1%+1,I%+2))*4
6027 Z%=SGN(POINT(I1%+2,I%))+SGN(POINT(I1%+2,I%+1))*2+SGN(POINT(I1%+2,I%+2))*4
6030 X1%=SGN(POINT(I1%+3,I%))+SGN(POINT(I1%+3,I%+1))*2+SGN(POINT(I1%+3,I%+2))*4
6033 Y1%=SGN(POINT(I1%+4,I%))+SGN(POINT(I1%+4,I%+1))*2+SGN(POINT(I1%+4,I%+2))*4
6037 Z1%=SGN(POINT(I1%+5,I%))+SGN(POINT(I1%+5,I%+1))*2+SGN(POINT(I1%+5,I%+2))*4
6090 MID$(A$,C*18+1,18)=A$(X%)+A$(Y%)+A$(Z%)+A$(X1%)+A$(Y1%)+A$(Z1%)
6091 C = C + 1
6092 IF C = 14 THEN PRINT #1,LEFT$(A$,C*18);: C = 0
6100 NEXT I1%
6105 PRINT #1,LEFT$(A$,C*18);"-": C = 0
6110 NEXT I%
6115 PRINT #1,CHR$(27);"\":     'PUTS PRINTER BACK INTO TEXT MODE
6120 CLOSE #1
6125 CLOSE #2
6130 RETURN                             'END PRINT SCREEN SUBROUTINE
6200 '=======================================================================

T.RTitleUserPersonal
Name
DateLines
208.1Why botherAUTHOR::MACDONALDCUP/MLMon Dec 08 1986 13:144
    There is an AmigaBasic screen dump utility supplied in the Basicdemos
    directory of the EXTRAS diskette supplied with V1.2 Workbench.
    
    Paul
208.2Try GRABBITPOMPEO::ZABOTMarco Zabot-Adv.Tech.mgr-Turin ACTTue Dec 09 1986 11:4612
      There is a commercial product called 'GRABBIT' which works
    fantasticly! Not only you are allowed to PRINT any screen on the
    printer at any time , but also creates an IFF files that you can
    later manipulate with Dpaint or whatever. The programm is fairly
    small and fits in almost every environment. Once started it's sleeping
    someplace and waits for a couple of keystrokes ( something like
    A-CRTL-P or A-CRTL-S ) to do what you want. Don't have any idea
    of the prices in the states.
    BTW. Your foreground program ( producing the screen to dump ) won't
    be interrupted too long. 
  
    marco