[comp.sys.apple2] Increasing Graphics Resolution

HDK@psuvm.psu.edu (H. D. Knoble) (05/22/91)

We are running an Apple IIe, 128K, 80-Column Card, enhanced, either DOS 3.3
with AppleSoft or ProDos. We are looking for specific concrete answers
with examples that run if this is practical.


1) Is there any way (even with PEEK/POKE) to get more resolution from a
   280 by 170 high resolution screen? Is there any mechanism to get more
   colors?

2) How can one copy a graphics screen to a printer capable of doing graphics?

                                                    Many thanks.

parkern@jacobs.CS.ORST.EDU (Neil Parker) (05/22/91)

In article <91141.165437HDK@psuvm.psu.edu> HDK@psuvm.psu.edu (H. D. Knoble) writes:
>We are running an Apple IIe, 128K, 80-Column Card, enhanced, either DOS 3.3
>with AppleSoft or ProDos. We are looking for specific concrete answers
>with examples that run if this is practical.
>1) Is there any way (even with PEEK/POKE) to get more resolution from a
>   280 by 170 high resolution screen? Is there any mechanism to get more
>   colors?

Actually, the hi-res screen is 280x160 in mixed (graphics + 4 lines of
text) mode, and 280x192 in full screen mode.  You can go from mixed mode to
full-screen mode with POKE 49234,0.

There is also double-hires graphics, which is (in full-screen mode) 560x192
in black-and-white and 140x192 in color (16 colors--same as low-res).  You
can display it like this:

     PRINT  CHR$(4)"PR#3": POKE 49232,0: POKE 49239,0: POKE 49246,0

Unfortunately, that's about all you can do with it from BASIC--there are no
built-in double-hires commands.  If you can get back-issues of NIBBLE, you
might be able to find packages to add double-hires commands to BASIC (via
the "&" command).  I have a copy of such a package that I typed in from an
ancient issue of SOFTALK [does anybody else here remember SOFTALK?], but I
don't know if it's OK to distribute it.

(I suppose if you really wanted to, you could draw double-hires graphics
with POKE from BASIC, but this is an exercise which only the exceedingly
masochistic should attempt...)

>2) How can one copy a graphics screen to a printer capable of doing graphics?

That depends.  Some printer interfaces (the Grappler, for example) have
built-in graphics printing commands.  If you're not lucky enough to own one
of those, you'll need special software to do it.

               - Neil Parker
--
Neil Parker                 No cute ASCII art...no cute quote...no cute
parkern@jacobs.cs.orst.edu  disclaimer...no deposit, no return...
parker@corona.uoregon.edu   (This space intentionally left blank:           )

throoph@jacobs.CS.ORST.EDU (Henry Throop) (05/23/91)

In article <91141.165437HDK@psuvm.psu.edu> HDK@psuvm.psu.edu (H. D. Knoble) writes:
>We are running an Apple IIe, 128K, 80-Column Card, enhanced, either DOS 3.3
>with AppleSoft or ProDos. We are looking for specific concrete answers
>with examples that run if this is practical.
>1) Is there any way (even with PEEK/POKE) to get more resolution from a
>   280 by 170 high resolution screen? Is there any mechanism to get more
>   colors?

If all you need is monochrome, you can get 560x192 on a standard hires
screen.  This is because in an 8-bit byte on teh hires screen, seven
bits are pixel on/off flags, and the high bit indicates which of two
color sets to use for that byte.  One color set (white1, green, purple)
is shifted half a pixel to the left compared to the other set (white2, red,
blue).  

If you have an x-position vaue between 0 and 559, divide the vaue by two,
then choose the appropriate color based on x mod 4.  This short routine wil
do that -

10 x2 = int(x/4):x3 = x-4*x2
20 if x3 = 0 then hcolor= 2 
30 if x3 = 1 then hcolor= 6
40 if x3 = 2 then hcolor= 1
50 if x3 = 3 then hcolor= 5 
60 hplot int(x/2),y

Note that this doesn't allow you unlimited placement of pixels - the 7 pixels
in a byte must be either shifted right or left.  Also, of course it's only
monochrome and you have to view it on a mono monitor; otherwise, it will 
just look like a big mess.  

Henry
--
--
Henry Throop
throoph@jacobs.cs.orst.edu
THROOP@GRIN1.BITNET

sb@pnet91.cts.com (Stephen Brown) (05/23/91)

HDK@psuvm.psu.edu (H. D. Knoble) writes:
>We are running an Apple IIe, 128K, 80-Column Card, enhanced, either DOS 3.3
>with AppleSoft or ProDos. We are looking for specific concrete answers
>with examples that run if this is practical.
>
>
>1) Is there any way (even with PEEK/POKE) to get more resolution from a
>   280 by 170 high resolution screen? Is there any mechanism to get more
>   colors?

If you used Double-High-Resolution, you would have more colours automatically.
Peek/Poke won't get you any more colours on the screen. More colours can be
accomplished by mixing colours, but this is more complex than a few
peeks/pokes.

>
>2) How can one copy a graphics screen to a printer capable of doing graphics?

If you have a Grappler parallel printer interface, then the card has graphic
screen dump software, in ROM, eg.
PR#1
control-I G <return>
will dump page 1 to the printer, unrotated,
control-I G D
will dump page 1 to the printer, unrotated, double size.
Other modifiers include I for Inverse, R for Rotate, E for Emphasized, 2 for
Page 2. If this is indeed the card you have, you should read the manual.
>
>                                                    Many thanks.

Hope this helps.


+---------------------------------------------------------+
| Stephen Brown                           Toronto, Canada |
| Internet: sb@pnet91.cts.com      UUCP: utzoo!pnet91!sb  |
+---------------------------------------------------------+
| Apple II Forever !!!                                    |
+---------------------------------------------------------+
| Like my new .signature. ?    Too bad.                   |
+---------------------------------------------------------+

johnt@meaddata.com (John Townsend) (05/29/91)

In article <91141.165437HDK@psuvm.psu.edu>, HDK@psuvm.psu.edu (H. D. Knoble) writes:
|> We are running an Apple IIe, 128K, 80-Column Card, enhanced, either DOS 3.3
|> with AppleSoft or ProDos. We are looking for specific concrete answers
|> with examples that run if this is practical.
|> 
|> 
|> 1) Is there any way (even with PEEK/POKE) to get more resolution from a
|>    280 by 170 high resolution screen? Is there any mechanism to get more
|>    colors?
|> 
|> 2) How can one copy a graphics screen to a printer capable of doing graphics?
|> 

About five years ago, Apple discovered that they could, with a very slight
hardware change to the Apple //e (which brought about the revision B
motherboard), cause the extended 80-column card and firmware to not only double
the number of text columns (from 40 to 80), but also to double the horizontal
resolution of hi-res and lo-res graphics.  These have become known as "double
hi-res" and "double lo-res", with resolutions of 560x192 and 80x48, respec-
tively.  As a consequence of the way the Apple II's generate color by the posi-
tion of the pixel on the screen, the number of colors was also increased in
double lo-res from 8 (although there are two whites and two blacks) to 16 (the
same 16 colors in lo-res, with two greys).  Since then, quite a few commercial
programs have become available which take advantage of this feature.  One of
the first, I believe, was Broderbund's "Dazzle Draw" graphics program, although
I think there was one even before it.  If you're interested in using double
hi-res from Applesoft, Beagle Brothers had/has a program (I think it's called
"Beagle Graphics") which installs some "&" commands that let you do it much the
same way that you would do normal hi-res graphics.

However, the far-and-away best program ever written for the double-res
programmer is an obscure program called "DoubleVision", by yours truly :-).
It was (and might still be) sold by Dynacomp for about $40 a copy, but I
haven't gotten any royalties for awhile, so I don't know what the status of it
is now.  It allows an Applesoft programmer to do both double lo-res and double
hi-res with "&" commands which are similar to, but an extension of, the normal
lo-res and hi-res graphics commands.  It also has a well-defined assembly
language interface with routines similar to those in the Applesoft ROM.  It
supports both the Broderbund and Beagle Brothers file formats for storing
graphics to disk, and includes double hi-res font and shape table editors and
a neat demo program.  The program is ProDOS based, and has an excellent laser-
printed user manual.  All it requires is an enhanced 128K Apple //e, //c, or
IIgs (actually, I've never run it on a IIgs, and I'm not sure why anyone would
bother!).  I'm now willing to give out copies to anyone who would like one, for
little more than what it would cost me to make and send them out -- say, $10 --
though I'd like to retain the copyright at least for now.  Maybe I'll make it
shareware or something someday.  Anyway, if you're interested, just let me
know.

P.S. See Neil Parker's reply for more info about doing double hi-res with POKEs
     and printing graphics.  Good luck!

--
     John Townsend                 Internet:   johnt@meaddata.com
 c/o Mead Data Central             UUCP:       ...!uunet!meaddata!skibum!johnt
     P.O. Box 933                  Telephone:  (513) 865-7250 
  Dayton, Ohio, 45401