First things first; you have to understand how Middle Rings work.
Once you choose a Translevel from the World Map, that value is stored in memory.
1-1 => 0x00; 1-2 => 0x01; ... 1-8 => 0x07; 1-E => 0x08; ... 2-1 => 0x0C; ... 3-1 => 0x18; ... 6-1 => 0x3C; ... 6-8 => 0x43; ... 6-Controls => 0x47
Each TRANSLEVEL has many Levels/Rooms, with 1 being the minimum number of Levels/Rooms per TRANSLEVEL.
Each Level/Room has exactly ONE ITEM MEMORY INDEX, which is specified in the header, in the range from 0x0 to 0x3.
Each Level/Room MAY OR MAY NOT contain ONE MIDDLE RING SPRITE (do never put more than ONE Middle Ring per Level/Room).
Now, at the time you pass through a Middle Ring, the game copies your current score and item memory flags to memory along with the ITEM MEMORY INDEX specified in the header of the level.
When you die, the game notices, that there is a copy of your SCORE and ITEM MEMORY FLAGS in memory, in short, it notices that you have passed a Middle Ring before you died.
What it does now is that it calculates where to start from in case you choose to re-start the level from the Middle Ring.
In order to do that, it takes the TRANSLEVEL INDEX it has, multiplies that with 2 and adds it to the relative pointer for Middle Ring Pointers (which normally points to 0xBF751),
so for example if you died in 1-6, which is TRANSLEVEL 0x05, it looks up the pointer at 0x05 * 2 + 0xBF571 = 0xBF75B.
There are two bytes there; normally [20 00].
Now it swaps them and adds the value to where the relative pointers for Middle Ring Data points to (normally 0xBF7DB), in this case 0xBF7DB + 0x20 = 0xBF7FB.
That is where the 4 possible Middle Rings for the TRANSLEVEL 0x05 are stored. Each Middle Ring is 4 Bytes. They are sorted per ITEM MEMORY INDEX, the game calculates the exact location like this:
ITEM MEMORY INDEX * 4 + MIDDLE RING DATA LOCATION, so in case you have PLACED the MIDDLE RING SPRITE in a Level/Room with ITEM MEMORY INDEX 0x2 the calculation is 0x2 * 4 + 0xBF7FB = 0xBF803
Editing the data is easy now:
1st Byte: Room/Level
2nd Byte: X-Coordinate
3rd Byte: Y-Coordinate
4th Byte: Entrance Type
Respawning from a Middle Ring is executed exactly like using a Screen Exit.
And to answer your questions directly: No, you cannot place more than exactly ONE MIDDLE RING in each Level/Room. And yes, you have to edit the Middle Rings in case you swap the Levels/Rooms in Golden Egg. And no, my patch has nothing to do with how the game handles Middle Rings, it just repoints them, so that you can use 4 Middle Rings per Translevel.
NEW! SMW2 Yoshi's Island is done!
Last update: 2012-12-31