First off – you need to make absolute sure that your chord changes/progression per measure count don’t line up exactly with the previous piece. That’s a surefire way for someone to tag you for simply changing the melody (think popular guitar tabs where only the strumming pattern might vary in a cover song – bad). The next thing you need to do is change the tempo and make sure none of the notable hooks sound anything alike. Using similar instruments and textures is essentially where you have the most freedom because as far as I know it’s impossible to copyright an orchestration of particular instruments without any notes attached to them (viz. “I copyright the combination of tuba, french horn, and an oberheim factory patch 23 bank 2 in the style of a jazz waltz!” – doesn’t work real well).
Another thing you can do to make yourself less vulnerable in such a situation is just to modulate the entire chord structure down 7 semi-tones or so to make it even more unrecognizable as being similar, and then work on changing elements and construction. Another good way would be to introduce a set of unexpected chords, change the meter or tempo along the way (very unpopular with most videogame songs), or throw in some crazy harmonies. Another thing you may want to check is whether or not the video game company that manufactured the original game your referencing (which I’m familiar with, I remember playing that game) is defunct or not. If the company is dead – likely they will have either sold off the rights to the song to another company or will not have enough money to fight you in court over it.
Just be very aware of what and who you are dealing with in those situations and I would heartily recommend picking up a music/songwriting legal book to assist you on such a thing as it can prove to be invalvuable should the unexpected arise (a letter from the law offices of Wells and Smith or whoever…)
On a side note:
Just to give you an idea of how tricky this can really be: take into account that a Dutch trademark agency actually managed to copyright the first 9 notes of Beethoven’s Fur Elise…preventing any other European company from currently using them: http://www.furelise.com/
So be careful.