Nascom Newsletter |
Volume 3 · Number 4 · December 1983 |
Page 9 of 37 |
---|
small block of white at the top left-hand corner of the pixel, then at the middle left-hand side, and then at the bottom left-hand corner of the pixel. The last three bytes of data put the small block at the top right, mid right, and bottom left-hand corners of the pixel. Therefore, by successively leading each contiguous pixel with the six bytes of data, it becomes possible to identity the pen location on a screen with a resolution of
(48 x 2) x (16 x 3) = 4608 locations
If the output from the pen were connected to bit 7 of port 4, a program for identifying the pen position might look something like figure 3.
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 or 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 be 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 VIDEO RAM that was being accessed at the time of the raster strike. Aa there are 1024 VIDEO RAM locations, it mould 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 VIDEO RAM is scanned under hardware control it is possible to tap off the required address lines and to feed them directly to the ????? ????. The program that I was using at the time of the pen’s design, required the identification of the pen location as it traversed ??? ???? in a left-right direction. This would enable me to draw a ???? ???? ?????? on the screen and then store it for later use. ???? ?????? 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 ????? A0 to A9, the address lines A0 to A5 sequentially address 64 screen ????? locations, 48 of which are displayed, in a left-right ????? A6 to A9 select the 16 rows of 64 locations in a top-bottom ????? though it must be noted that the screen top row is in fact the ????? ???? row to be addressed, ie. 0BCAH to 0BF9H. Even though the ?????? ????? ???? hardware scanning from 0000H to 03FFh on the ????? ????, IC47, which is the ???? ?PROM, selects the VIDEO RAM
Page 9 of 37 |
---|