home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 24 / q24.d81 / t.magniprint < prev    next >
Text File  |  2022-08-28  |  6KB  |  148 lines

  1.  
  2.  
  3.                            M A G N I P R I N T
  4.  
  5.                               by e. g. bell
  6.                                      
  7.     Leave it to ed bell to come up with a new wrinkle on an old idea --
  8. the screen dump.  His small (5-block) routine allows a program to print
  9. out anything that's displayed by the VDC chip, which can even be a 40-
  10. column picture.  The routine has several parameters so the printout can be
  11. reversed, heightened, lengthened, and printed at different densities.
  12.  
  13.     There are two versions of this 5-block ML routine on the disk.  They
  14. are called:
  15.  
  16.  "magniprint.0b00"  and
  17.  
  18.  "magniprint.1300"
  19.  
  20. The only difference is the location at which they're assembled.
  21. Generally, $1300 is a good place for 128 ML routines if you've opened up
  22. the graphic area with a GRAPHIC1,1:GRAPHIC0:GRAPHIC5 sequence.
  23.  
  24.     If the picture you want to print is a 40-column pic (like a DOODLE)
  25. MAGNIPRINT looks at the graphic area (which is 40-columns), transfers the
  26. data to the VDC chip, doubling each pixel horizontally so that the 80-
  27. column screen now shows what would be on the 40-column screen if your
  28. monitor was set for 40-columns.  Then it prints the screen.
  29.  
  30.     If you have an 80-column hi-res picture showing then MAGNIPRINT simply
  31. prints out what is on your screen.
  32.  
  33.     Here are the lines you need to have in your program in order to use
  34. MAGNIPRINT.  These are taken straight from the BASIC code for "library
  35. print", which doubles as a demo for MAGNIPRINT and is found on Side Two of
  36. LOADSTAR 128 #24.
  37.  
  38.  20 dv=peek(186):ifdv<8thendv=8
  39.  30 scnclr:graphic1,1:graphic0:graphic5:fast
  40.  40 tem=dec("0b00")
  41.  50 bload"magniprint.0b00",u(dv),b0,p2816
  42.  
  43. These are needed near the beginning of your program to get MAGNIPRINT in
  44. place.
  45.  
  46.     Now it's time to get what you're going to print into the graphics area
  47. ($2000-$3fff).  It could be drawn there by BASIC 7.0 commands like LINE,
  48. CIRCLE, etc.  Or it could be a hi-res picture like a Doodle picture, or
  49. even one that has only a bitmap and no color.  I personally would always
  50. use a Doodle pic because I like Doodle and can draw with it.  The BASIC
  51. 7.0 graphics commands are too slow for most uses, and anyway, in an 80-
  52. column program the picture would have to be drawn blindly on the 40-column
  53. screen.  Of course, that may suit your purposes even better.  Here's how
  54. to load a 40-column hi-res pic.
  55.  
  56.  400 bank15:bload"ddpic",u(dv),p7168:system
  57.  
  58. Doodle stores its pics with the color first ($1c00-1fff) followed by the
  59. bitmap ($2000-3fff).  7168 is the decimal equivalent of $1c00 so the
  60. Doodle pic will load at 7168 and the bitmap will be at the right place for
  61. MAGNIPRINT.  OCP ART STUDIO pics start with the bitmap and have the color
  62. data after, so after you have chopped off the color and saved just the
  63. bitmap with a machine language monitor:
  64.  
  65.  s "ocp hi-res bitmap",08,2000,3fff
  66.  
  67. you can load load the pic with this command:
  68.  
  69.  400 bank15:bload"ocp hi-res bitmap",u(dv),p8192:system
  70.  
  71. A pic without color data (like an FGM picture) would load the same way as
  72. the OCP pic.  [I'm afraid I know so little about the 80-column graphic
  73. mode that I hesitate to say how to handle it, although ed assures me that
  74. MAGNIPRINT will print what's on the 80-column graphic screen -- if you can
  75. get something to show there.  In my experience, David Darus' BASIC 8 is
  76. the way to display 80-column graphics and it has its own super print
  77. routines.]
  78.  
  79.     Then, before you can display and print what's in the graphic area, you
  80. need to set up the printer and some parameters.  Like this:
  81.  
  82.  430 close3:open3,4,7    :rem open channel to printer
  83.  
  84.  440 poke250,0           :rem density  0=standard, 1=double,
  85.                                        2=double speed-double density,
  86.                                        3=quadruple density
  87.  450 poke251,0           :rem width    0=single, 128=double,
  88.                                        192=quadruple
  89.  460 poke252,0           :rem height   0=single, 128=double,
  90.                                        192=quadruple
  91.  470 poke253,0           :rem reverse  0=normal, 128=reverse
  92.  
  93.  480 poke254,41          :rem columns  41=epson mode, 42=1525 mode,
  94.                                        80=80 column mode
  95.  490 poke166,0           :rem mode     0=epson, 1=1525
  96.  
  97.  500 poke167,32          :rem bitmap   only change this if your bitmap
  98.                                        is not at $2000 (8192)
  99.  510 ifmo=0thenprint#3,chr$(27)"a";    :rem epson tab
  100.  
  101.  520 print#3,chr$(8)                   :rem graphic mode
  102.  
  103. To save room you can put all the POKEs on the same line.  Now you are
  104. ready to display and print.
  105.  
  106.  530 system+3
  107.  
  108.     The picture will be displayed and printed in a correctly proportioned,
  109. small size.  The printer will need to be reset, however.
  110.  
  111.  540 ifmo=0thenprint#3,chr$(27)chr$(64):elseprint#3,chr$(15)
  112.  
  113.  550 print#3:close3
  114.  
  115. These lines reset your printer for either mode.
  116.  
  117.     But now you need to clear up your screen, which is showing the 40-
  118. column picture on the 80-column screen.  This next line does it, at the
  119. expense of reinitializing just about everything.  If you've moved BASIC up
  120. to $4000 with a GRAPHIC1,1:GRAPHIC0:GRAPHIC5 sequence you need to redo it.
  121. If you've set up a custom font, or are using a BASIC extension like
  122. CONTROL80, you will need to re-install CONTROL80 (with a sys4864) and
  123. reload and re-install the font.  In LIBRARY PRINT I have the program go
  124. back to line 70, which does the re-initialization of CONTROL80.  Your
  125. program will have to take care of what happens after you use these lines:
  126.  
  127.  580 bank15:sys52684,71,25:sys65378:sys49152
  128.  
  129.  590 graphic1,1:graphic0:graphic5
  130.  
  131.     I recommend using the parameters listed above for testing your
  132. program.  Once you've got it printing correctly, you can try changing the
  133. parameters.
  134.  
  135.  
  136.  MAGNIPRINT AND CONTROL80 TOGETHER
  137.  ---------------------------------
  138.  
  139.     Since CONTROL80 is only assembled at $1300, you must use the $0b00
  140. version of MAGNIPRINT.  Other than the fact that you have to re-install
  141. CONTROL80 after printing with MAGNIPRINT, they work together quite well.
  142. Check out the well-remarked code in LIBRARY PRINT to see how it's done.
  143.  
  144. FT
  145.  
  146.                            \\\\\ RETURN - Menu \\\\\
  147.  
  148.