Alright, here's the skinny on Overworld <--> Underworld travel...
In order to determine whether to initiate interworld travel, the game runs the subroutine at 9C28 (SNES, that's 1E28 in ROM).
It checks to see if you are in the Enterprise at 9C40 (1E40) - 04 by default.
It checks to see if you are in the Falcon at 9C44 (1E44) - 05 by default.
I say "by default," because it is possible to change which vehicles are able to travel between worlds... however, there are a few problems with doing so.
- If you change one airship to the Whale (06), then instead of decreasing/increasing height in the animation sequence, it simply disappears. It will reappear when it arrives in the new location. Also, the Overworld ocean flashes purple for a split second during the animation.
- If you change one airship to one of the chocobos (01 or 02) (in addition to the fact that you would necessarily have to change which terrains these vehicles can travel over), they are still invisible in the Underworld (I haven't figured out how, if at all possible, to change this).
- There shouldn't be much of an issue making the hovercraft (03) able to interworld travel, although you would of course have to change its travelable terrains.
After the vehicle check, the game checks for x,y coordinates.
First, a check to see if you are in the Overworld at 9C47 (you can't change this). If you are, then it checks your x location. The x min (first valid x value for interworld travel) is at 9C50 (1E50), 69 by default. The x max (first invalid value) is at 9C54 (1E54), 6C by default. If you are within this range, then it checks your y value. The y min is at 9C5B (1E5B), D3 by default. The y max is at 9C5F (1E5F), D6 by default. If you are within this range, then the game initiates the "travel down" routine. More on this later.
If you are not in the Overworld, then the game checks to see if you are in the Underworld at 9C69 (1E69). The 01 here represents the Underworld. You can change this to 02 for the Moon, in theory, but I haven't been able to successfully initiate travel to the Moon by altering this routine, so it's kind of pointless to do so. If you are in the Underworld, then your x,y is checked. x min is at 9C70 (1E70), 70 by default. x max is at 9C74 (1E74), 73 by default. y min is at 9C7B (1E7B), 0F by default. y max is at 9C7F (1E7F), 12 by default. If you are within this range, then the game initiates the "travel up" routine (read on).
The "travel down" routine is at 9315 (1515) Most of this (and it's a long routine), I believe, is graphical instruction that I don't really understand. The important part here is the instruction on the x,y location upon arrival. The arrival x value is at 9381 (1581), 71 by default. The arrival y value is at 9386 (1586), 10 by default. You probably want to set your Underworld x,y arrival values within the range of your x,y travel up values, but hey, it's your hack.
The routine also contains instructions to set 1700 and 1701 to "01." These are identifiers for the Underworld map, but they seem to not be the only ones, because changing these to 00 00 for the Overworld or 02 02 for the Moon results in a glitch world. I'm not sure I'm properly motivated to delve into this any deeper.
The "travel up" routine is at 9472 (1672). Again, we're really only concerned with arrival x,y values here. Arrival x is at 9473 (1673), 6A by default. Arrival y is at 9478 (1678), D4 by default.
In Summation:
(only ROM addresses will be used here)
Overworld -> Underworld
x min: 1E50
x max: 1E54
y min: 1E5B
y max: 1E5F
Come down at x: 1581
Come down at y: 1586
Underworld -> Overworld
x min: 1E70
x max: 1E74
y min: 1E7B
y max: 1E7F
Come up at x: 1673
Come up at y: 1678
To change which vehicles can travel:
1E40 (04)
1E44 (05)
change one of these values to 01 (Yellow Choc), 02 (Black Choc), 03 (Hovercraft) or 06 (Lunar Whale)