Nascom Newsletter |
Volume 3 · Number 4 · December 1983 |
Page 10 of 37 |
---|
write-enable when memory locations 0800H to 0BFFH are addressed. Thus there is an offset of 0800H to consider when evaluating the pen location from the VIDEO RAM hardware address lines A0 to A9.
To obtain the address lines, a small amount of soldering is required. It is possible to tap off the address lines directly from the board, though I prefer to keep all soldering and additions to the component side of the board, and it was for this reason that I decided to adopt a “piggy-back” approach to the address line location.
There are a number of ways to find the pen location by using the address lines, the approach that I took was to identify 1 sub pixel in a column of 48 sub-pixels. As long as I knew which column I was addressing I could find the pen location on that column. It would be possible to find the pen position on the left right axis as well as the up-down axis, as long as I looked at all the address lines, but this would mean looking at more than 1 input port, and I was already using that for something else.
Address lines A6 to A9 can be used to identify which of the 16 character lines is being addressed. This brings the pen location resolution to 1 in 16. To increase the resolution we can look at either all 14 raster lines, or, as the minimum sub-pixel is only 4 raster lines, we can look at the address lines that relate to the selection of each group of 4 raster lines. The RS lines, RS0 ta RS3, are used to select the appropriate raster lines for each pixel, and so by looking at RS2 and RS3 it becomes possible to identify on which of the sub-pixels the pen is resting.
A6 to A9 can, therefore, be treated as the Most Significant Bits, and RS2 and RS3 as the Least Significant Bits, of a six-bit address that can identify a location in a column of 48 locations.
To tap off these address lines, I soldered 16-pin header plugs directly on to IC68 and IC53. This method allowed me to solder wires to the plug with ease, and gave test-points to see if I had blown the chip by soldering too close to it! The six address lines were taken along the board and put on to the bus at pins 59 to 64. On the Gemini 80-BUS these pins are now allocated as interrupt request lines, powerfail warning, and backup power, so it might be advisable not to put the video address lines on to the bus if you can help it. The Video Blanking signal, VBLANK, was also taken to the bus so that the screen data would be updated only in the screen blanking period. This prevents screen flicker when drawing images on to the screen.
For certain routines, I wanted tu know if the pen was in the same place, or whether it had moved from an area of white to an area of black. Unfortunately, you can not merely test the pen status. This is because the sub-pixel consists of 4 raster lines, each being 64us in
Page 10 of 37 |
---|