80-Bus News


May–June 1983, Volume 2, Issue 3

Page 6 of 59

This method, crude though it may be, does also need synchronising with the BLANKING signal so that the “pen search” can commence as the screen scan starts. Otherwise, pixels may be tested after the raster scan has passed, and prevent the pixel under the pen from being tested at the same time as the raster is being displayed under the pen. This method of scanning without waiting for the blanking signal, gives rise to a screen full of random dots which, interesting though it may be for the first 10 secs., does not really solve the problem in hand. Also, if the scan program has to wait for the beginning of a new picture scan before it can load the screen with one of the six sub-pixels, it can he seen that each pixel will take at least 6 x 20ms to scan. So to scan all of the 768 locations will take

6 x 768 x 20ms = 92.16 seconds

With no stretch of the imagination can I say that this is satisfactory. A faster method would be to fill the screen with white and to scan the input ports for a HIGH from the pen. When the raster strikes the light-activated switch the other port could latch in the memory address of the VIDEQ RAM that was being accessed at the time of the raster strike. As there are 1024 VIDEO RAM locations, it would be necessary to load in 8 bits to one port, and another 2 bits into the other port. This method would give the pen location on any of the 768 screen pixels. If the screen were successively filled with the six sub-pixel bytes, the resolution could be increased to the full 4608 locations.

As the VIDEQ RAM is scanned under hardware control it is possible to tap off the required address lines and to feed them directly to the input ports. The program that I was using at the time of the pen’s design, required the identification of the pen location as it traversed the screen in a left-right direction. This would enable me to draw a wave-shape directly on to the screen and then store it for later use. Also routines had to be identified from a selection of menus, and so the pen location was required for selection identification.

Refering to figure 4 it can be seen that the VIDEO RAM is addressed by A0 to A9, the address lines A0 to A5 sequentially address 64 screen memory locations, 48 of which are displayed, in a left-right manner. A6 to A9 select the 16 rows of 64 locations in a top-bottom manner, though it must be noted that the screen top row is in fact the last memory row to be addressed, ie. 0BCAH to 0BF9H. Even though the Video ram-scanning hardware is scanning from 0000H to 03FFH on the address lines, IC47, which is the N2MD PROM, selects the VIDEO RAM 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

Page 6 of 59