[comp.sys.tandy] TANDY GRAPHIC DRIVER

zhou@brazil.psych.purdue.edu (Albert Zhou) (11/21/90)

	I posted an article about Tandy Graphic Driver. Now I know it is
a very special kind of driver, neither CGA, EGA, nor VGA. If anybody ever
has programmed it, I would like to know two pieces of information:

	(1) What is the interrupt to initiate its graphic mode (not its
emulated CGA mode)?

	(2) After it is initiated, what is the address of its video buffer?
Or if it is on its own RAM, how can I access it?

Any information will be fully appreciated.

bobb@vice.ICO.TEK.COM (Bob Beauchaine) (11/22/90)

In article <11531@j.cc.purdue.edu> zhou@brazil.psych.purdue.edu (Albert Zhou) writes:
>
>	I posted an article about Tandy Graphic Driver. Now I know it is
>a very special kind of driver, neither CGA, EGA, nor VGA. If anybody ever
>has programmed it, I would like to know two pieces of information:
>
>	(1) What is the interrupt to initiate its graphic mode (not its
>emulated CGA mode)?
>
  The interrupt is the same set video mode interrupt that all of the other
  modes use : BIOS interrupt 16 (decimal), service 0 (AH = 0), with the 
  required video mode in the AL register (the Tandy (PCJr) modes are 9 for 
  320 x 200 x 16 color, and 10 for 640 x 200 x 4 color).

>	(2) After it is initiated, what is the address of its video buffer?
>Or if it is on its own RAM, how can I access it?
>
  The video ram starts at the same location as CGA (it really is just an 
  enhanced CGA mode that never caught on), B800:0000 hex.

  In mode 9, individual pixels are addressed as follows for each byte in
  memory: 

	  bit                pixel
	  7 6 5 4 3 2 1 0
	  x x x x . . . .      1        4 bits per pixel = 16 colors
	  . . . . x x x x      2

  Mode 10 is not quite so nice.  Each pixel is spread out between two 
  adjacent bytes in memory, like this :

	  1st byte		2nd byte            pixel
	  bit			bit
	  7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0
	  x . . . . . . .       x . . . . . . .       1  2 bits = 4 colors.
	  . x . . . . . .       . x . . . . . .       2
	  . . x . . . . .       . . x . . . . .       3
	  . . . x . . . .       . . . x . . . .       4
	  . . . . x . . .       . . . . x . . .       5
	  . . . . . x . .       . . . . . x . .       6
	  . . . . . . x .       . . . . . . x .       7
	  . . . . . . . x       . . . . . . . x       8


  All of the standard BIOS routines are available, such as setting pages,
  etc.  There are really no surpises when programming the Tandy adapter.

  There are languages out there that handle graphics output in modes 9 
  and 10.  GW-Basic and Microsoft QuickBasic come to mind.

  Bob Beauchaine
  bobb@vice.ICO.TEK.COM

zhou@brazil.psych.purdue.edu (Albert Zhou) (11/22/90)

In article 2924, Bob Beauchaine writes:

> The interrupt is the same set video mode interrupt that all of the other
> modes use : BIOS interrupt 16 (decimal), service 0 (AH = 0), with the
> required video mode in the AL register (the Tandy (PCJr) modes are 9 for
> 320 x 200 x 16 color, and 10 for 640 x 200 x 4 color).

    These two modes are not really Tandy mode in which DESKMATE was written.
 In the third mode, you can get 640 x 200 x 16.

> The video ram starts at the same location as CGA (it really is just an
> enhanced CGA mode that never caught on), B800:0000 hex.

     I suppose in the third mode there is a separate RAM board since the
  memory requirement is so big.

bobb@vice.ICO.TEK.COM (Bob Beauchaine) (11/22/90)

In article <11535@j.cc.purdue.edu> zhou@brazil.psych.purdue.edu (Albert Zhou) writes:
>
>In article 2924, Bob Beauchaine writes:
>
>> The interrupt is the same set video mode interrupt that all of the other
>> modes use : BIOS interrupt 16 (decimal), service 0 (AH = 0), with the
>> required video mode in the AL register (the Tandy (PCJr) modes are 9 for
>> 320 x 200 x 16 color, and 10 for 640 x 200 x 4 color).
>
>    These two modes are not really Tandy mode in which DESKMATE was written.
> In the third mode, you can get 640 x 200 x 16.
>


  I don't think so.  I have never in all my wanderings through Tandy 
  documentation, including the Tandy 1000 TX reference, found mention of
  a 640x200x16 color mode.  This would require some 64k of video memory,
  and I'm fairly sure that 32k is the max used by a 1000.

  Feel free to prove me wrong, but if such a mode exists, it is totally
  undocumented.

  Bob Beauchaine
  bobb@vice.ICO.TEK.COM	

jal@acc.flint.umich.edu (John Lauro) (11/22/90)

In article <6351@vice.ICO.TEK.COM> bobb@vice.ICO.TEK.COM (Bob Beauchaine) writes:
>In article <11535@j.cc.purdue.edu> zhou@brazil.psych.purdue.edu (Albert Zhou) writes:
>>
>>    These two modes are not really Tandy mode in which DESKMATE was written.
>> In the third mode, you can get 640 x 200 x 16.
>>
>
>
>  I don't think so.  I have never in all my wanderings through Tandy 
>  documentation, including the Tandy 1000 TX reference, found mention of
>  a 640x200x16 color mode.  This would require some 64k of video memory,
>  and I'm fairly sure that 32k is the max used by a 1000.
>
>  Feel free to prove me wrong, but if such a mode exists, it is totally
>  undocumented.

640x200x16 isn't on all Tandy 1000s.  I think it's on the 1000 TL, but
really not sure what models.  Maybe all new machines?

ekalenda@cup.portal.com (Edward John Kalenda) (11/22/90)

>>> The interrupt is the same set video mode interrupt that all of the other
>>> modes use : BIOS interrupt 16 (decimal), service 0 (AH = 0), with the
>>> required video mode in the AL register (the Tandy (PCJr) modes are 9 for
>>> 320 x 200 x 16 color, and 10 for 640 x 200 x 4 color).
>>
>>    These two modes are not really Tandy mode in which DESKMATE was written.
>> In the third mode, you can get 640 x 200 x 16.
>>
>  I don't think so.  I have never in all my wanderings through Tandy 
>  documentation, including the Tandy 1000 TX reference, found mention of
>  a 640x200x16 color mode.  This would require some 64k of video memory,
>  and I'm fairly sure that 32k is the max used by a 1000.
>
>  Feel free to prove me wrong, but if such a mode exists, it is totally
>  undocumented.
>
>  Bob Beauchaine
>  bobb@vice.ICO.TEK.COM	

In a game I ported from the Apple II/GS to the Tandy, I used mode E, the
640x200 16-color mode. There is no BIOS support for this mode, but the Tandy
1000 Technical Reference documents it fairly well. It starts at A000:0000,
uses one nibble per pixel, and is non-interlaced.

As a matter of fact, I used two nibbles for each pixel since the graphics
were all 320x200 and found that the same code for drawing into the VGA
mode 0x13 worked for Tandy mode E. Keep in mind that the CM-5 monitor does
not do 640x200, you need the CM-11 unless you do the pixel replication thing
that I did. There is a very disturbing waver on the CM-5 in the 640x200
mode.

If you have a truely pressing need to use this mode, I suppose I can excerpt
the code used to initialize the hardware and draw into it. Send e-mail to
the address below.

Ed
ekalenda@cup.portal.com

zhou@brazil.psych.purdue.edu (Albert Zhou) (11/23/90)

In article <6351@vice.ICO.TEK.COM> bobb@vice.ICO.TEK.COM (Bob Beauchaine) writes:
>  I don't think so.  I have never in all my wanderings through Tandy 
>  documentation, including the Tandy 1000 TX reference, found mention of
>  a 640x200x16 color mode.  This would require some 64k of video memory,
>  and I'm fairly sure that 32k is the max used by a 1000.
>
>  Feel free to prove me wrong, but if such a mode exists, it is totally
>  undocumented.

	I don't know about TX. But Both 1000 SL and 1000 TL have 640x200x16. If
you ever try DeskMate on these two machine, you will find it has 16 colors. I  
don't know it is documented, but a lot games (for example all games published bySierra) have setup for Tandy. Interestingly enough, after I run a TSR which set
the driver to PCjr, the screen became four-colored (which looked really dull
compared with its original).