This contains two level routines to wrap Mario/sprites when they cross certain edges of the screen.
One of the routines handles horizontal level wrapping (which links the top and bottom of the screen), while the other handles vertical level wrapping (which links the left and right edges). The latter requires a small additional patch in order to work correctly.
Tester's note: do not use the horizontal wrap with the vertical scroll enabled.
There are 12 sprite slots in vanilla SMW, but for SA-1, there is 22 sprite slots. Change LDX #$0B to LDX.b #!sprite_slots-1 so it is truly a hybrid. The define !sprite_slots is located inside other/macro_library.asm
Best combined with the Level Constrain patch to prevent potential clipping into blocks depending on the Y position of the bottom that teleports the player to the top in horizontal levels if you need the warp at such position. This happened on the original horizontal level wrap sprite generator, where you position yourself so close to the bottom warp as small mario or big crouching mario and can go under the blocks before teleporting. Another thing I recommend is using BMI/BPL instead of BCC/BCS should the user want the teleport barrier be past the top/left of the area.