Virtual Worlds #01
31 декабря 1999 |
|
Iron - Bugs keyboard: why in the game for two players, when playing together, the computer does not listen to your management, and information on how to avoid it.
Keyboard error. (C) Time Keeper / MHCG Hello, dear users of the greatest computer of all time - SINCLAIR ZX Spectrum. (I do not think that a very loud voice) ... Today we talk with you, we'll start with one of the most important devices in any computer of any brand. We talk about the keyboard ... After all, on any computer can not work without a keyboard since the keyboard is the primary unit of data transmission by the computer. It turns out that not all of the Spectrum so perfect as it might seem at first glance ... At the Spectrum keyboard is one very serious drawback. I call it the "overlap keyboard. " Probably many of you began your career on Spectrum from the fact that for half a day, and even the whole day, from morning till late at night playing with toys. Even then, there have been many entertaining games that cater for two players. I always liked to sit for an hour the other together with a friend on the computer and play Double Dragon, Golden Axe, etc. But all these games There is one major flaw: you probably noticed that sometimes when playing together, your player just does not listen. For example, you pressed to the left, and he for no reason, rhyme or reason suddenly began to jump. Moreover, such incidents have occurred most often when the game was played two players. This is the "overlap of the keyboard." In the past, like any other inexperienced user, I thought This Trouble arises from the fact that programmers improperly interrogate the keyboard, but I was disappointed when learn how to program assembly language and wrote his first simple program, I discovered it is still the same damn glitch ... At that time I was pretty well versed in circuitry Spectrum, and finding another scheme Zonovskogo "Leningrad-1, I began to chase down the cause of this strange phenomenon. It turned out everything is very simple. Clive Sinclair in the development of the scheme is stressing the cheapness the future of the computer and tried to make it as simple as possible and affordable. It because of this we are now suffering and this concerns not only keyboards, but also much more: inaccurate decoding of internal ports, because of what is now there are many problems with connecting additional peripherals You can not boot your own operating system, impossibility of direct programming controller ports Floppy disk, a closed architecture ... But is the theme of individual conversations and about it, we still raise the question on the pages of our magazine. To understand the origins of such strange behavior of the keyboard, need to take a closer look at the diagram on your computer. As known keyboard Spectrum is a rectangular matrix size 5 * 8, ie, it goes five wire data and eight wires Address: Q / W / A10 <- - - - (K) A / S / A9 <- - - - (K) Z / X / A8 <- - - - (K) V V D0 (a) D1 (k) The figure shows only part of the keyboard scheme. The remaining buttons are similar. Assume that the user by simultaneously pressing "Q", "W" and "A". Let's see what happened in reality: How seen from the keyboard scheme, with Pressing "Q", closed Wire A10 (k) and D0 (k) when you press "W", closed A10 (k) and D1 (k), and finally, when Pressing "A", closed A9 (k) and D0 (k) ... Well, what have guessed? When you click the above Clavey joined: A10 (k) to D0 (a), A9 (k) to D0 (k) but this means that virtually united A10 (k) and A9 (k), but A10 (k) is connected in turn with D1 (k), then connect the wires D1 (k) and A9 (k), where you can conclude that automatically together with the "Q", "W" and "A", pressed another key and "S"!!! That's it Behold! And there was no reason to blame all for programmers to think that They poll the keyboard correctly. As far as I know the scheme our domestic computers they all have a similar defect. The exception, perhaps, are computers equipped with IBMklaviaturoy, but I can not exactly vouch for this since I have not had a chance to check it. Of course, this defect is not so dangerous when operating system software and when you play alone, but still unpleasant. Ways to solve this problem There are several, but we consider only one of them: In my opinion, the easiest way to set the buffer elements in the each key (at least I have not found a reasonable solution). You can set the example five registers K555IR23/K555AP5 on the address bus or on the keyboard data bus. Or, what seems to me preferable - purchase IBMklaviatury controller. Connection technology and the scheme, I will not lead, as it depends on the particular example, and consider all the examples, I think, hardly be since a lot of them. I can not imagine was to establish buffer elements for each key, I just just put the two buffers at the ports Sinclair joysticks, since he I play very little, and the younger brothers prefer to mostly joystick ...
Other articles:
Similar articles:
В этот день... 21 November