Path: utzoo!attcan!uunet!ogicse!zephyr.ens.tek.com!vice!bobb From: bobb@vice.ICO.TEK.COM (Bob Beauchaine) Newsgroups: comp.sys.tandy Subject: Re: TANDY GRAPHIC DRIVER Message-ID: <6347@vice.ICO.TEK.COM> Date: 21 Nov 90 17:18:59 GMT References: <11531@j.cc.purdue.edu> Organization: Tektronix Inc., Beaverton, Or. Lines: 52 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