Policy changes depending on the company really. Square Enix has a big "No" policy, (Circa the Great Chrono Trigger 3D Remake). Capcom on the other hand has been known to even market fan made content, (e.g, The Megas, The Protomen, Street Fighter X Megaman). In general most will turn a blind eye unless you are making money, and thus a threat. As long as no money is involved, the majority of companies will at most C&D you (Cease and Desist). As for the SNES Zelda game, you should be fairly safe. (e.g. http://www.graalonline.com/ which has been around for ages.) There are some notable exceptions Tetris and Pac-man clones have known to get people sued.
The biggest advice? DO NOT SELL IT. Musicians manage to get away with it due to the non-competitive nature of their work. However, a fan GAME is direct competiton.