The game is Mickey's Haunted House, released for the NES in 1989 (also known as Mickey Mouse in some regions).
Mickey explores a sprawling, multi-floor haunted mansion to collect keys that unlock new wings and ultimately confront the villain Phantom Blot. The game blends:
Colorful 8-bit graphics, a catchy soundtrack, and the novel key-collecting progression made it a nostalgic cult classic among Disney gaming fans. It predates the more famous Castle of Illusion (1990) and shows early ambition in licensed platformers.