Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

How to expand the capabilities of the joystick. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Телевидение

Comments on the article Comments on the article

Many computer games require control not only with a joystick, but also with the introduction of commands from the keyboard. However, keeping both of these devices with you during the game is very inconvenient. Using a programmable logic array (PLM) 556PT1, the author solved the problem by replacing the "keyboard" commands with combinations of joystick button presses.

Game programs for the ZX-Spectrum computer are built, as a rule, in such a way that after starting they do not automatically enter the joystick control mode; to do this, you have to press a few keys. The need to use the keyboard sometimes arises during the game. For example, to start a new session, replace the game, you need to press the initial installation button. And this means that the player cannot move away from the computer for a long time with a joystick in his hands, sit in a chair or lie down on a sofa. In order to press one or two keys, you need to approach the computer quite often.

Some games are not designed to be controlled with a joystick at all. You have to use the keyboard intensively, which quickly breaks down from this. In addition, the keys that control the direction of movement of figures and shooting are chosen poorly (for example, they are located on the keyboard in a row), which often affects the result. It would be tempting, without changing programs, to transfer control of such games to the joystick.

Today, the most common "button" joysticks have five conveniently placed buttons to indicate the four directions of movement and shooting. To perform other operations (enter game control symbols), you can use all sorts of combinations of button presses. But solving this problem in the traditional way with the help of microcircuits of a small and medium degree of integration leads to the creation of an overly expensive and complex device.

In industrial equipment, so far little known to radio amateurs, PLA microcircuits are widely used, which are specially designed to implement complex combinational logic. One of them - 556PT1 - can simultaneously calculate 8 logical functions from 16 input variables, and the latter can be included in logical expressions in 48 different combinations. In its design, it is similar to the PROM of the same 556 series. To implement the desired functions, the fusible jumpers on the microcircuit chip are burned using the programmer. The programming methodology, functional diagrams of programmers and schematic diagrams of their blocks can be found in [1-8].

The scheme for finalizing the ZX-Spectrum computer is shown in the figure.

How to expand the capabilities of the joystick

The joystick (via the inverters of the DD3 chip) and the keyboard remain connected to the computer in the usual way and continue to perform their functions. The contacts of the joystick buttons SB 1-SB5 are additionally connected to the inputs A1-A5. and lines A8-A15 of the processor address bus - with inputs A7-A14 PLM 556RT1 (002). Entrance A6 is left free. The outputs of the 0D2 chip (open collector) are connected to the keyboard port (KL0-KL4) in parallel with the latter and to the initial installation line.

It should be borne in mind that in many variants of the ZX-Spectrum computer, the processor address bus is overloaded. Therefore, it is recommended to connect the keyboard and additional load (PLM inputs) to it through the bus driver KR580VA86 (DD1). Sometimes it is already on the computer, for example, if a disk drive is connected to it.

Such a buffer will increase the reliability of the keyboard. The fact is that in order to reduce the load on the address bus, the computer developers connected the inputs of the keyboard port to the power source through high-value resistors (15 kOhm). As a result, after the key is released, parasitic capacitances are recharged too slowly, resulting in false readings of the keyboard state. In some games, this defect manifests itself in the form of chaotic cursor movement on the screen and spontaneous switching of modes. After installing a bus driver and reducing the load resistors to 1 kOhm, such phenomena are completely eliminated.

When the SA1 switch is open, the outputs of the PLA are in a high impedance state and it does not affect the operation of the computer. By closing SA1, combinations of the pressed buttons of the joystick can duplicate the actions of some keys. This is due to the fact that the logical function "wired" in the PLA repeats the state of one of the address bits at the corresponding input of the keyboard port, thus simulating the connection of these circuits with the contacts of the pressed key.

The PLM firmware program is given in Table. one.

How to expand the capabilities of the joystick

Of the 48 elements 16I available in the matrix, 30 were used. An example of preparing programming codes for an element that simulates pressing the "C" key is shown in Table. 2.

How to expand the capabilities of the joystick

It is required to send a signal from line A8 of the data bus (input A14 PLM) to line KL3 of the keyboard port (output B4 PLM), if the buttons are "Right". "Left" and "Shoot" are pressed together.

In an unprogrammed PLA, each of the inputs A1-A16 is connected to the corresponding input of the element 16I through two fusible jumpers, and in the circuit of one of them there is an inverter. If you burn the "inverse" jumper, the argument will go to the input of the AND element directly, and if the "direct" - inverted. Burning both jumpers generally excludes this argument from the implemented function. In binary digits of programming codes, jumpers to be removed are designated as logical 1.

In our case, the pressed buttons of the joystick correspond to logical 0 on the PLA inputs connected to them. To implement the AND function, they must be inverted. by removing the "straight" jumpers. And in the bits associated with the buttons that are not pressed in this combination, the "inverse" ones are removed. Next, the address bus line to be used is specified. Since the active logic level on it is low, the "direct" jumper is also removed in the corresponding bit of the code, leaving the "inverse" jumper. It remains to disable unused inputs by removing both jumpers in their bits.

The OR matrix consists of eight (one for each output) 48OR elements, the inputs of which are connected through jumpers to the outputs of the AND matrix. Thus, at the output of each of the 16I elements there are eight jumpers, burning through which disconnect it from the corresponding 48OR element, which means that and from the output of the PLM. Output B1 corresponds to the least significant, and B8 - the most significant digit of the programming code. To leave the connection we need with the output B4, set the code 0F7H. If a mistake was made during programming or it became necessary to replace one function with another, all jumpers are burned out (code 0FFH). completely disconnecting the unnecessary element AND from the outputs. Instead, one of the remaining unused programs is programmed. As long as there are such elements, the operation can be repeated repeatedly, improving and supplementing the joystick operation algorithm.

Note that the Left button simulates pressing the 5 key, regardless of the state of the Up button. Similarly, the "Up" button simulates pressing the "7" key, regardless of the state of the "Left" button. Therefore, the simultaneous pressing of these buttons for the computer is equivalent to the same pressing of the mentioned keys. This also applies to the "Down" and "Right" buttons, which mimic the "6" and "8" keys. The key combination "0" and "5" required two AND and OR elements. This is necessary so that the A0 signal does not enter the KL11 circuit, and the A4 signal does not enter the KL12 circuit.

It is easy to see that when the specified keys are pressed, the unspecified ones are free, and the selected address bus line has a logical 0. At the PLA output, instead of the required logical 0, 1 will appear. However, it is possible to invert the output signals by burning the jumpers of the NOT matrix. In our case, this must be done by deleting them all.

Similarly, you can program the PLA to work with a joystick that has normally closed contacts. If necessary, it can be used to connect a keyboard to the computer, the internal connections between the keys of which do not correspond to the "standard" ZX-Spectrum (for example, the keyboard "Electronics MS 7007").

Using the advanced features of the joystick, you should keep in mind that sometimes, together with the desired key, it simulates pressing several others. This is due to the fact that it is impossible to press all the necessary buttons at the same time, and all intermediate states that briefly occur in the process of typing a combination can be perceived as pressing the corresponding keys. Fortunately, many game programs do not respond to this. If you cannot enter the required character in any way, try pressing the buttons in the desired combination with the SA1 switch open. Then, while holding them, close the switch.

Literature

  1. Shchelkunov N. N. Dianov A. P. Procedures for programming logical matrices. - Microprocessor facilities and systems, 1986. No. 2. p. 71 - 76.
  2. Dianov A.P., Shchelkunov N.N. Technical means of programming logic circuits. - Microprocessor means and systems. 1986. No. 2, p. 77 - 80.
  3. Lukyanov D. A. Circuitry of universal ROM programmers. -Microprocessor means and systems. 1985. No. Z.s. 84 - 88.
  4. Solonin V. Yu. Self-control of universal programmers. - Microprocessor means and systems. 1990, No. 1. c. 51, 52.
  5. Solonin V. Yu. A device for controlling random access memory. Description of the invention to the author's certificate No. 1292040. - Bulletin "Discoveries, inventions ...". 1987. No. 7.
  6. Solonin V. Yu. Programmer. Description of the invention to the author's certificate No. 1372356. - Bulletin "Discoveries, inventions, 1988, No. 5.
  7. Solonin V. Yu. Programmer. Description of the invention to the author's certificate No. 1654869. - Bulletin "Discoveries, inventions, ...", 1991, No. 21.
  8. Solonin V. Yu., Buryan S. V. Timing diagram shaper. Description of the invention to the author's certificate No. 1817133. - Bulletin "Discoveries, inventions ...", 1993, No. 19.

Author: V.Solonin, Konotop, Ukraine

See other articles Section Телевидение.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Alcohol content of warm beer 07.05.2024

Beer, as one of the most common alcoholic drinks, has its own unique taste, which can change depending on the temperature of consumption. A new study by an international team of scientists has found that beer temperature has a significant impact on the perception of alcoholic taste. The study, led by materials scientist Lei Jiang, found that at different temperatures, ethanol and water molecules form different types of clusters, which affects the perception of alcoholic taste. At low temperatures, more pyramid-like clusters form, which reduces the pungency of the "ethanol" taste and makes the drink taste less alcoholic. On the contrary, as the temperature increases, the clusters become more chain-like, resulting in a more pronounced alcoholic taste. This explains why the taste of some alcoholic drinks, such as baijiu, can change depending on temperature. The data obtained opens up new prospects for beverage manufacturers, ... >>

Major risk factor for gambling addiction 07.05.2024

Computer games are becoming an increasingly popular form of entertainment among teenagers, but the associated risk of gaming addiction remains a significant problem. American scientists conducted a study to determine the main factors contributing to this addiction and offer recommendations for its prevention. Over the course of six years, 385 teenagers were followed to find out what factors may predispose them to gambling addiction. The results showed that 90% of study participants were not at risk of addiction, while 10% became gambling addicts. It turned out that the key factor in the onset of gambling addiction is a low level of prosocial behavior. Teenagers with a low level of prosocial behavior do not show interest in the help and support of others, which can lead to a loss of contact with the real world and a deepening dependence on virtual reality offered by computer games. Based on these results, scientists ... >>

Traffic noise delays the growth of chicks 06.05.2024

The sounds that surround us in modern cities are becoming increasingly piercing. However, few people think about how this noise affects the animal world, especially such delicate creatures as chicks that have not yet hatched from their eggs. Recent research is shedding light on this issue, indicating serious consequences for their development and survival. Scientists have found that exposure of zebra diamondback chicks to traffic noise can cause serious disruption to their development. Experiments have shown that noise pollution can significantly delay their hatching, and those chicks that do emerge face a number of health-promoting problems. The researchers also found that the negative effects of noise pollution extend into the adult birds. Reduced chances of reproduction and decreased fertility indicate the long-term effects that traffic noise has on wildlife. The study results highlight the need ... >>

Random news from the Archive

Electromagnetic invisibility half-cloak 05.12.2013

Chinese scientists at Nanjing Southeast University have developed a schematic diagram for an invisibility cloak that will hide only part of a hidden object, and have already made a prototype of such a cloak that hides internal direct current.

Physicists have given the name of invisibility cloaks to devices that are able to make radiation (acoustic or electromagnetic) go around a certain object and create the same field on the other side, as if this object does not exist at all. In such a device, the fundamental point is that the radiation does not get inside the object, because of which, being inside, it is impossible to see everything that happens outside.

The authors of the study developed a schematic diagram of a device that can solve this problem. It does not hide the object completely, but only most of it, as a result, it is possible to obtain information from the outside - the authors cite as an example Harry Potter's invisibility cloak, which did not hide the head of a fairy-tale character. Such a device solves not only the problem of information isolation. It is capable of creating optical illusions for an external observer, showing him something other than what he should see. Thus, it is possible, for example, to hide one car under the guise of another.

The prototype, which was created to demonstrate the principled approach, is able to hide from external observation the direct current that flows inside. Structurally, the device is a disk, which consists of many resistors connected by conductors.

Designers of invisibility cloaks often turn to microwave radiation, radio emission and direct current due to technical difficulties: the average size of parts should be smaller, the smaller the wavelength. Operation in the visible light range requires the creation of metamaterials with a characteristic nanometer size of details. To date, the most studied are invisibility cloaks designed to operate in the microwave range. Scientists have learned to make them microscopic and soft.

Other interesting news:

▪ Mental health of magicians

▪ water bike

▪ A battery that generates electricity from human sweat

▪ Found a link between fear and alcohol addiction

▪ Notebook HP Chromebook 15

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ site section Electrician's tool. Article selection

▪ article There are women in Russian villages. Popular expression

▪ How long does it take for a person's nails and hair to grow after death? Detailed answer

▪ article Mariannik oak. Legends, cultivation, methods of application

▪ article Device for the selection of containers. Encyclopedia of radio electronics and electrical engineering

▪ article Fountain from a vase and a hand. Focus secret

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024