Now Reading
gaming – How precisely does Sonic & Knuckles’ ‘Lock-On Expertise’ work?

gaming – How precisely does Sonic & Knuckles’ ‘Lock-On Expertise’ work?

2023-07-15 20:02:25

How does the Sonic & Knuckles cart detect one other cartridge?

It checks the serial numbers of video games; they are often discovered within the ROM’s header. It most likely detects all previous Sonic the Hedgehog video games since all of them lead to particular results when locked-on.

Are the sport ROMs merged ultimately when related?

It appears each video games are merely mapped onto reminiscence. This fashion, the executing sport code will get entry to the contents of each video games.

To raised perceive what this implies, think about a Sonic & Knuckles ROM with the whole contents of the Sonic the Hedgehog 3 ROM concatenated onto it.

Sonic & Knuckles and Sonic the Hedgehog 3

The tackle house represents reminiscence the sport code can entry. The contents of the read-only memory chips get mapped onto the Mega Drive’s 68k processor’s 24-bit tackle house. The Mega Drive simply sees two video games, one after one other. By the way, that is what dump of Sonic 3 & Knuckles appears to be like like. This explains why the sport works even in emulators that do not assist any of the customized {hardware} contained in the Sonic & Knuckles cartridge.

Any sport locked onto Sonic & Knuckles will most likely have its ROM mapped onto the sport’s tackle house the identical approach. This implies sport’s knowledge is made out there to be used by the Sonic & Knuckles sport code; it does not essentially imply the info shall be used. Since Sonic & Knuckles was programmed to work with Sonic the Hedgehog 3, it makes intensive use of the info within the locked-on cartridge. Its dealing with of different video games is much much less subtle; apparently, it simply makes use of the metadata discovered within the ROM’s header to generate a novel Blue Spheres stage. If it detects that it is the first Sonic the Hedgehog sport, it merely unlocks the total model of the bonus sport.

The connection to Sonic the Hedgehog 2 works equally:

Sonic & Knuckles and Sonic the Hedgehog 3

There are two ROM chips within the Sonic & Knuckles cartridge: one has the primary sport and the opposite has a patch for Sonic the Hedgehog 2. The patch ROM incorporates the whole Knuckles the Echidna in Sonic the Hedgehog 2 sport code; that is the total code for the unique sport however modified with the required sport mechanics for Knuckles: decrease velocity, decrease soar top, flight, wall climbing, and so on. The ROM additionally incorporates new graphics knowledge for Knuckles in addition to new map knowledge with locations and objects for Knuckles to achieve along with his skills.

When Sonic & Knuckles detects that Sonic the Hedgehog 2 is locked on, it passes management of the processor to the code contained in the patch ROM, thereby launching Knuckles the Echidna in Sonic the Hedgehog 2. The brand new sport can reuse a lot of the info from the unique sport: stage graphics, enemy knowledge, bosses, and so on. The one code from the locked-on cartridge that executes is the sound driver.

My query is, how precisely does the Lock-On Expertise work?

Let’s delve into the small print.

In accordance with Lock-on Technology Hacking Guide, there are some chips on the Sonic & Knuckles cartridge:

Together with the 2 ROM chips and the cartridge slot, they implement the Lock-On performance.

Rizzo’s images present what the cartridge’s printed circuit board appears to be like like:

Sonic & Knuckles cartridge printed circuit board, front
Sonic & Knuckles cartridge printed circuit board, front

The Mega Drive’s cartridge I/O is supposed for just one cartridge. Nonetheless, a cartridge locked onto Sonic & Knuckles kinds a system that incorporates three ROM chips:

  • Sonic & Knuckles cartridge
    • Sonic & Knuckles ROM 2 MB
    • Sonic the Hedgehog 2 patch ROM 512 kB
  • Locked-on cartridge

Apparently, the important thing performance behind Lock-On Expertise is selecting a kind of ROM chips and connecting it to the suitable addressing traces of the Mega Drive which is none the wiser.

This reminiscence financial institution switching is outwardly achieved through the chip allow traces. They’re energetic when logically 0 and if inactive will trigger all reminiscence addressing operations to be ignored and nothing to be returned on the info bus, successfully “disabling” the chip. If one of many ROMs is disabled, the opposite shall be mapped as a replacement. The Mega Drive simply sees a giant cartridge with a giant tackle house.

Rizzo additionally made a schematic of the electronics:

Sonic & Knuckles Lock-On schematics, full

See Also

Although I am not an electronics knowledgeable, I used to be capable of determine some issues out by learning the schematics and studying the notes on the web site. Here is what I discovered.

The aim of this chip is to carry a single bit of data: is Sonic the Hedgehog 2 locked on? A lot of the circuit’s operation relies on this single bit. It’s denoted by the crimson node on the schematic, comparable to the 74HC74’s Q output.

When Sonic & Knuckles boots, it checks its cartridge slot. If there’s a sport locked on, it exams if its serial quantity matches that of earlier Sonic video games. If it detects Sonic the Hedgehog 2, a sign is generated on the ROM’s D0 line, setting the Q little bit of the 74HC74.

There are two unbiased decoders M and N, every with three inputs , SA and SB in addition to 4 outputs Y0, Y1, Y2 and Y3. If is 1, all outputs are additionally pressured to 1.

The Y outputs obey the next reality desk:

E̅ SA SB Y0 Y1 Y2 Y3
1 -- --  1  1  1  1
0  0  0  0  1  1  1
0  1  0  1  0  1  1
0  0  1  1  1  0  1
0  1  1  1  1  1  0

The I/O association of every decoder

M is related to to deal with line 20 and the output of the 74HC74 by SA and SB respectively; is related to the Y3 output of N. The chip allow line of the Sonic the Hedgehog 2 patch ROM is related to Y3, whereas Y0, Y1 and Y2 are all inputs to the 74AC08.

N is related to deal with line 21 by each SA and SB. The chip allow sign from Mega Drive is related to . The chip allow line of the Sonic & Knuckles ROM is related to Y0 however Y1 and Y2 will not be related to something in any respect. Y3 is related to M‘s enter.

Placing all of it collectively

Decoder M controls the activation of each the Sonic the Hedgehog 2 patch ROM and the locked-on cartridge’s ROM. Decoder N controls the activation of the Sonic & Knuckles ROM.

The A21 line addresses reminiscence that’s past the bounds of the sport’s 2 megabytes ROM. If this reminiscence is accessed, the result’s that the Sonic & Knuckles ROM is disabled. In any other case, it’s enabled and M‘s is about.

The A20 line addresses reminiscence that’s inside bounds; if that reminiscence is accessed and the 74HC74 can also be set, the Sonic the Hedgehog 2 patch ROM is enabled and the outputs to the 74AC08 are all 1. If M‘s is about, the 74AC08 additionally receives all 1s, however the patch ROM will not be enabled.

The 74AC08 has three inputs Y0, Y1 and Y2 in addition to a single output that equals Y0 ∧ Y1 ∧ Y2 and is related to the locked-on cartridge’s chip allow line. Subsequently, the second cartridge’s ROM will solely be mapped when all its inputs are 1:

  • Locked-on cartridge is Sonic the Hedgehog 2
  • Sonic & Knuckles ROM is enabled

Source Link

What's Your Reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top