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

What's inside the SEGA MEGA KEY?. 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

Readers often have to deal with the fact that the equipment they are interested in (or requiring repair), especially foreign-made, does not include any technical descriptions, concepts or even structural diagrams. This creates almost insurmountable difficulties in the repair, and even more so in the repetition and improvement of such devices. However, a way out can be found. How to do this is described in the proposed article using the example of the "Mega Key-2" expander for the popular 16-bit video game consoles "Sega Mega Drive" and "Sega Mega Drive-2". The author managed not only to understand the principles of its operation, but also to make a similar device from available parts.

Fans of playing on 16-bit "Sega" video consoles know that some cartridges work only when connected through a special device - an expander. These include, for example, the licensed TV series "Super Sonic", "Earth Worm Jim" and others. in several modifications. Expanders "Mega Key" ensure their compatibility.

Anyone who thinks "Mega Key" means "very large key" is probably wrong. A more plausible translation is "a key for" Mega ". Externally, the expander is very similar to a regular game cartridge, but it has two small-sized slide switches and two 64-pin connectors: a plug (it is inserted into the "CARTRIDGE" socket of the set-top box) and a socket for the cartridge.

Switches can be used to select one of several television standards that differ in the number of image decomposition lines, frame rate values, and color information encoding methods. Usually, there is a table on the expander body or in the instructions for it, similar to Table. 1, which lists countries or television standards and indicates the corresponding switch positions. For example, "USA & BRAZIL" refers to the US and Brazil standard (525 lines, 60 Hz). "JAPAN" corresponds to our Asian "Sega" models (625 lines, 50 Hz). Sometimes there are cartridges that work when the switches are set to "PAL & FRENCH SECAM".

Table 1

Standard Switch position SA1 Switch position SA2
USA&Brazil OFF ON
Japan OFF OFF
PAL&French SECAM ON ON

Currently, the most popular expander is "Mega Key-2", which works both with the prefix "Sega Mega Drive" and with its improved version "Sega Mega Drive-2". It is not easy to understand its device, since most of the nodes are located inside a specialized frameless microcircuit. Manufacturers, for obvious reasons, are in no hurry to reveal secrets. We have to consider the expander as a "black box".

Recall that in cybernetics this is the name of a system in which only input and output signals are available to an external observer, and the internal structure is unknown for one reason or another [1]. Let's try to understand the structure and principle of the expander using the physical, logical and temporal levels of analysis. The technique described below can be useful in the study of a wide variety of electronic devices.

PHYSICAL LEVEL

First of all, it was necessary to analyze the topology (drawing) of the expander printed circuit board, draw up its circuit diagram, measure voltages and currents in various circuits. It turned out that each of the 64 pins of the expander plug is connected directly to the corresponding pin of its socket. The cartridge inserted here turns out to be connected with the prefix in the same way as without an expander. In parallel, 29 of the 64 pins are connected to a logic block. Its schematic diagram, compiled as a result of studying the printed circuit board, is shown in fig. 1. The names of the input (A0-A22, WE2) and output (D0, D6, D7) signals, as well as the power supply circuits (+5 V, GND) correspond to those adopted in the set-top boxes "Sega" [2].

What's inside the SEGA MEGA KEY?

The basis is a 28-pin frameless chip DD1, filled with a compound. The numbering of its conclusions on the diagram is conditional. A low level at the output of Q1 enables the operation of the bus driver DD2. In this case, the state of the outputs connected to bits D6 and D7 of the data bus of the main processor of the video set-top box depends on the position of the switches SA1 and SA2. A high level at the output Q2 of the DD1 microcircuit opens the transistor VT1, the collector of which is connected to the D0 bit of the data bus. If necessary, the DD2 chip can be replaced with K555AP5, and the VT1 transistor with KT3102B.

The current consumed by the expander in the +5 V circuit at rest is 25...35 mA. Of these, DD1 accounts for no more than 0,3 mA. This suggests that it is most likely made using CMOS technology.

LOGIC LEVEL

The next step is to understand the logic of the expander and create a model of the internal structure of the frameless chip DD1.

Oscillograms of the signals observed while working with real game cartridges show that at the output Q1 of the DD1 chip, at the moment the power is turned on and when the "RESET" button is pressed, single pulses of negative polarity usually appear. At the output of Q2 during the game, non-periodic sequences of pulses of positive polarity and a large duty cycle are visible.

It can be assumed that DD1 is a decoder with two outputs, the signal on each of which indicates that the processor is accessing some memory cells. But in order to determine the addresses of these cells, it is necessary to enumerate all possible combinations of input (address) signals, while analyzing the states of the outputs.

24=224 combinations of signals are possible at 16777216 inputs of the decoder. It is clear that it is impossible to sort through them manually in an acceptable time - this operation must be automated. The analysis time of each combination should not be too short (you can miss the response), but not too long (you will have to wait a long time for the result). On fig. 2 shows a diagram of a fairly simple device that made it possible to carry out the entire measurement cycle in a minute. It can also be useful for studying other multi-input digital nodes.

What's inside the SEGA MEGA KEY?
(click to enlarge)

The master oscillator (DD1) operates at a frequency of approximately 500 kHz. Through the logic elements of the DD2 chip, a 24-bit binary counter (DD3-DD8) is connected to it, the outputs of which must be connected to the corresponding inputs of the expander. When low-level signals appear at the outputs D0 or D6 of the last element DD2.1 blocks the account. At the same time, one of the LEDs (HL1 or HL2) lights up, indicating in which particular circuit the response is detected.

In this state, you should measure the logic levels in the circuits A0-A22. This code will be the address of the cell in the memory space or I / O of the processor, when accessed, the decoder "works". A low level of the WE2 signal at this moment indicates that data is probably being written, a high level indicates that it is being read. After pressing the SB1 button, the search continues. The trigger from the elements DD2.2 and DD2.3 eliminates the "bounce" of the button contacts.

The experiments performed showed that the expander responds to input signals in two cases: when reading or writing data at address 508000H and when reading them at address 600002H. In the first one, it changes, in accordance with the position of the switches SA1 and SA2, the state of the bits D6 and D7 of the "real" cell located in one of the microcircuits of the video set-top box or cartridge. In the second - transfers to the state of logical 0 bit D0. It must be said that this is done in an "illegal" way: the signals of the relatively low-power data bus buffers of the set-top box are suppressed by the powerful signals of the expander, in which four elements of the bus driver are connected in parallel.

Obviously, the choice of a driver of one or another television standard depends on the code at 508000H. If the expander switches are not in the correct position, the program stops with a screen like "Developed for use with NTSC Mega Drive systems only".

The equivalent circuit of the DD1 packageless microcircuit, obtained as a result of the analysis of the expander at the logical level, is shown in fig. 3. It consists of two multi-input elements: DD1.1 ("NAND", address 508000H) and DD1.2 ("AND", address 600002H).

What's inside the SEGA MEGA KEY?

TIME LEVEL

It remains to determine the allowable signal delay in the expander, artificially increasing it until failures appear. This can be done, for example, by including several series-connected inverters in a wire break connecting the output Q1 of the decoder DD1 (Fig. 1) with the input E2 of the bus driver DD2. To keep the signal polarity, the number of inverters must be even.

The experiment showed that the expander works stably even with 12 elements of the K561LN2 chip connected in series, which corresponds to a signal delay of 0,5 ... 0,7 μs. It can be considered non-critical to the speed of the applied active elements.

HOMEMADE EXTENDER

So, having understood the device and the principle of operation of "Mega Key-2", it is possible to develop its analog on chips of wide application. One of the possible schemes for a homemade expander is shown in Fig. 4. The functions of the decoder of the "proprietary" expander in it are performed by a logical node on microcircuits DD1-DD5. If necessary, it can also be used to replace a failed frameless microcircuit. In this case, the inputs 8 and 5 of a free element of the DD10 chip should be connected to pin 11 DD4, and the Q1 signal should be removed from its output 8.

What's inside the SEGA MEGA KEY?

Connecting to the line D0 four elements connected in parallel of one of the halves of the bus driver DD6 allows you to "save" the transistor. For lines D6 and D7, it turned out to be sufficient to connect two elements of the other half.

Switches SA1 and SA2 still set the television standard. But in the described device, they are connected differently than in the "branded" one, and the "ON" state (Table 1) now corresponds to an open switch, and "OFF" to a closed switch. When the contacts of the switch SA3 are closed, the outputs of the bus driver go into a high-impedance state and the expander does not affect the operation of the video set-top box.

All parts of the device are mounted on a printed circuit board made of foil fiberglass with dimensions of 75x55 mm (Fig. 5). It is designed for the installation of MLT-0,125 resistors, a KM-5b capacitor, small-sized slide switches PD9-2 or PD53-1.

What's inside the SEGA MEGA KEY?

To replace the DD1-DD6 microcircuits, their functional analogues from the K155, K555, KR1531, KR1533 series and other TTL structures are suitable. As DD6, you can use microcircuits not only AP5, but also AP3 of various series. Since the latter invert the transmitted signals, their conclusions 11, 13, 15 and 17 must be connected not to a common wire, but to the positive pole of the power source. The closed contacts of the SA1 and SA2 switches after such a replacement will correspond to the "ON" state, and the open ones - "OFF".

Since the expander is connected in parallel with the circuits of the set-top box, and in the off state it does not affect its operation, there is no need to make a complex transitional device, like "Mega Key-2". It is recommended to place the printed circuit board inside the video set-top box (for example, near the "SYSTEM" socket), fixing it in such a way that the SA1-SA3 switches can be controlled through the open side cover. The contact pads of the input and output circuits of the expander must be connected according to the table. 2 with the pins of any of the "SYSTEM" or "CARTRIDGE" connectors, or directly with the pins of the MC68000 microprocessor.

Table 2

Chain System connector pin Cartridge connector pin MC68000 pin
A0 A3 (6) A17 (34) 29
A1 A4 (8) A15 (30) 30
A2 A5 (10) A13 (26) 31
A3 A6 (12) A11 (22) 32
A4 A7 (14) A9 (18) 33
A5 A8 (16) A7 (14) 34
A6 A9 (18) A5 (10) 35
A7 A10 (20) A3 (6) 36
A8 A11 (22) B4 (7) 37
A9 A13 (26) B5 (9) 38
A10 A14 (28) A4 (8) 39
A11 A15 (30) A6 (12) 40
A12 A16 (32) A8 (16) 41
A13 A17 (34) A10 (20) 42
A14 A18 (36) A12 (24) 43
A15 A19 (38) A14 (28) 44
A16 A20 (40) A16 (32) 45
A17 - B6 (11) 46
A18 - B7 (13) 47
A19 - B8 (15) 48
A20 - B9 (17) 50
A21 - B10 (19) 51
A22 - B11 (21) 52
WE A22 (44) B29 (57) -
D0 B4 (7) A20 (40) 5
D6 B10 (19) A22 (44) 63
D7 B11 (21) A19 (38) 62
+ 5 V A26 (52) A31 (62) 53
GND A12 (24) A32 (64) 49

Before switching on for the first time, carefully inspect the installation, make sure that there are no short circuits or breaks. No adjustment is required, it is enough to select the position of the switches SA1, SA2 so that the cartridge starts working, refusing to do this without an expander. Recall that for Asian models of "Sega" both of them, as a rule, should be set to the "OFF" position. The built-in expander has no effect on the operation of "standard" cartridges.

Literature

  1. Dictionary of Cybernetics / Ed. V. S. Mikhalevich. - K.: Ch. ed. USE them. M. P. Bazhan, 1989. - 751 p.
  2. Ryumik S. Features of circuitry of 16-bit video set-top boxes. - Radio, 1998.

Author: S.Ryumik, Chernihiv, Ukraine

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

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Energy from space for Starship 08.05.2024

Producing solar energy in space is becoming more feasible with the advent of new technologies and the development of space programs. The head of the startup Virtus Solis shared his vision of using SpaceX's Starship to create orbital power plants capable of powering the Earth. Startup Virtus Solis has unveiled an ambitious project to create orbital power plants using SpaceX's Starship. This idea could significantly change the field of solar energy production, making it more accessible and cheaper. The core of the startup's plan is to reduce the cost of launching satellites into space using Starship. This technological breakthrough is expected to make solar energy production in space more competitive with traditional energy sources. Virtual Solis plans to build large photovoltaic panels in orbit, using Starship to deliver the necessary equipment. However, one of the key challenges ... >>

New method for creating powerful batteries 08.05.2024

With the development of technology and the expanding use of electronics, the issue of creating efficient and safe energy sources is becoming increasingly urgent. Researchers at the University of Queensland have unveiled a new approach to creating high-power zinc-based batteries that could change the landscape of the energy industry. One of the main problems with traditional water-based rechargeable batteries was their low voltage, which limited their use in modern devices. But thanks to a new method developed by scientists, this drawback has been successfully overcome. As part of their research, scientists turned to a special organic compound - catechol. It turned out to be an important component that can improve battery stability and increase its efficiency. This approach has led to a significant increase in the voltage of zinc-ion batteries, making them more competitive. According to scientists, such batteries have several advantages. They have b ... >>

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, ... >>

Random news from the Archive

The growth of the smart toy market 10.11.2020

ResearchAndMarkets.com has prepared a report related to the smart toys market. According to analysts, this market is expected to grow steadily in the coming years.

Although the pandemic has affected production and the consumer component, the market is gradually recovering.

This year, the volume of this market in monetary terms is estimated at $4,1 billion, and by 2027 it will reach $5,6 billion. These values ​​correspond to an average annual growth rate of 4,5% during the period from 2020 to 2027 covered by the forecast.

However, app-enabled mechanical toys are expected to grow above the industry average. It will average 5,5% per year. For comparison: the segment of toys without screens will show an average annual growth rate of 4,1%, and the segment of toys with voice or image recognition functions - 5,1%.

Geographically, the US market is the largest. This year its volume is estimated at $1,2 billion.

Other interesting news:

▪ Taste of soda and champagne

▪ DNA turned into logic gates

▪ Cooler Thermaltake ToughAir 510

▪ Star explodes supernovae

▪ Protein found to prevent preterm birth

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Biographies of great scientists. Article selection

▪ article Simple shelving. Tips for the home master

▪ article Who is the main god in the Slavic pagan pantheon? Detailed answer

▪ article Packet Node. Tourist tips

▪ article ADC operation with COM port, a simple data acquisition system. Encyclopedia of radio electronics and electrical engineering

▪ article Bass in the car: non-standard solutions. Encyclopedia of radio electronics and electrical engineering

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