CHAPTER 5 - Miscellaneous Details About The GRAFIX Package
GRAFIX revision history
1.0 | Initial release of GRAFIX. |
1.1 | Added additional functions that allowed specifying the drawing color when the function was called instead of setting the current drawing color first and then calling the function.
Optimized the following functions: |
2.0 | Added support for the Tandy 1000's 160x200x16 color graphics mode.
Added support for Tandy 1000 SL/TL/RL 640x200x16 color graphics mode with the aid of the TANDY11 driver now supplied with the package. The package now includes the ADJMEM program for dynamically adjusting the Tandy 1000's memory up or down from the command line or a batch file. This can be used to protect the video memory only when necessary and freeing it up again. GRAFIX now verifies the computer is a Tandy 1000 series before installing itself into memory. Fixed a nasty bug in the Put procedure. Images transferred using the PSET option on an even pixel address were not transferred properly. Replaced Circle function. The old function would cause unexpected divide by zero errors and crash the computer. Added Ellipse function for more flexibility than the Circle function could provide in drawing circular shapes. Added a host of XOR functions for point plotting, line drawing, circle drawing, box drawing, and box filling. Added definable viewport. All graphics functions except PrintString will clip on the viewport boundaries. Added 'GetScreen' and 'PutScreen' functions for ultra fast save and restore of the video buffer. Speeded up the majority of graphic functions by 2-3 times than in version 1.1. |
2.5 | Added video paging functions: 'SetActivePage', 'GetActivePage', 'SetDisplayPage', 'GetDisplayPage', and 'PageCopy'.
Rewrote sound and noise systems for better quality sound and performance. Added 8253 timer functions: 'FastTimer', 'ResetTimer', and 'GetTimer'. The 'FastTimer' function increases the precesion of the amount of time sounds, noises, and delays will last. Included new command line parameter /M which can be used to indicate how much video memory should be protected on start-up. GRAFIX will now protect up to 128K of video memory. Memory protection is skipped automatically if the Tandy 1000 has a 128K memory expansion option. Changed 'ADJMEM' program to protect up 128K of video memory. Memory protection is skipped automatically if the Tandy 1000 has a 128K memory expansion option. ADJMEM now verifies the computer is a Tandy 1000 before it will attempt to protect any memory. |
2.55 | Decrease memory useage of GRAFIX.COM by over 5,000 bytes.
Made minor updates to a few demo programs. |
2.60 | Fixes all know bugs in prior releases. TANDY11 is now at version 1.1. It corrects a problem after 640x200x16 color mode is used which causes screen corruption in the other graphics modes. |
2.70 | Support has now been added for the IBM PCjr for both graphics and sound. Made small changes to Tandy11 to include wording the Tandy 1000 RL in the source code and TANDY11.COM driver. Including JRAUD3V.COM and JRAUDRST.COM for routing PCjr audio. |
Default values
The following are the default values for GRAFIX program:
Current X, Y position: | X = 0 Y = 0 |
Current text position: | Row = 1 Column = 1 |
Viewport size for 160x200x16 mode: | Minimum X = 0 Minimum Y = 0 Maximum X = 159 Maximum Y = 199 |
Viewport size for 320x200x16 mode: | Minimum X = 0 Minimum Y = 0 Maximum X = 319 Maximum Y = 199 |
Viewport size for 640x200x16 mode: | Minimum X = 0 Minimum Y = 0 Maximum X = 639 Maximum Y = 199 |
Aspect ratio for 160x200x16 mode: | Horizontal = 3 Vertical = 5 |
Aspect ratio for 320x200x16 mode: | Horizontal = 6 Vertical = 5 |
Aspect ratio for 640x200x16 mode: | Horizontal = 12 Vertical = 5 |
Active page: | 0 |
Display page: | 0 |
Drawing color: | 1 (Blue) |
Text color: | 15 (Light White) |
Background color: | 0 (Black) |
Graphics cursor: | Off |
Graphics cursor size: | Full |
Sound buffering: | Off |
Noise buffering: | Off |
Allowable values
The following list are the allowable values for all graphics functions for each graphics mode:
X | 0 - 159 |
Y | 0 - 199 |
Text Column | 1 - 20 |
Text Row | 1 - 25 |
Color | 0 - 15 |
Page number | 0 - 7 |
X | 0 - 319 |
Y | 0 - 199 |
Text Column | 1 - 40 |
Text Row | 1 - 25 |
Color | 0 - 15 |
Page number | 0 - 3 |
X | 0 - 639 |
Y | 0 - 199 |
Text Column | 1 - 80 |
Text Row | 1 - 25 |
Color | 0 - 15 |
Page number | 0 - 1 |
Some final items
GRAFIX by default will protect the top 32K of DOS memory when it is installed. The default is 64K on a Tandy 1000 SL/TL/RL. The 'ADJMEM' section in chapter 4 explains why this is necessary. Memory is not protected if the Tandy 1000 is a TX, TL, or RL with a 128K memory expansion option. Memory protection can be skipped by installing GRAFIX with the /N option like this:
GRAFIX /N
You can specify the amount of video memory you want to protect by using the /M option. This is useful if you want to protect more than 32K or 64K to do video paging safely. The /M option will accept any value from 16K to 128K. If you wanted GRAFIX to protect 128K of video memory, just install GRAFIX like this:
GRAFIX /M128
A few notes on the PCjr. You can use two included programs for routing audio on the PCjr. JRAUD3V.COM routes the 3 voice sound to through the monitor and RCA audio jack. JRAUDRST.COM resets the audio back it's default values. You never need to do this on Tandy 1000 as all audio is routed differently. GRAFIX may work on a 128K PCjr, but I recommend a 256K PCjr or better using a memory management driver like jrconfig.sys.
I have spent well over 2 years writing the GRAFIX package and have enjoyed it very much. I previously asked for a $15.00 register fee for using the package. I found the shareware market to be less than profitable. There are many reasons for this. Tandy 1000 16 color graphics are pretty much a thing of the past with Super VGA adapters as cheap as they are. Only a small number of people who own a Tandy 1000 are going to do any kind of serious programming on it. I myself have bought a 386 20Mhz computer with Super VGA. All things considered then, I am making GRAFIX public domain including all the source code. The only thing I ask is that my name and copyright must be included no matter what changes are made.