Defeat Lavos after giving the Masamune to Frog, but before facing Magus.
Double back upon entering the Magic Cave and head for the End of Time.
Download Kit: ROM (English and Portuguese), Emulator, Ending's DST - tinyurl . com / anbryap (delete four space).