Prior to the implementation of hard drives, some disc-based games would load entirely into the system's RAM. The game disc could then be removed and replaced with a music CD. Technically, this could be done in many disc-based games, but only temporarily. Once the system tried to read the game disc to load something, the game would crash. Very few games officially supported this feature.
In Ridge Racer for PlayStation, the game can even recognize the track names on certain music CD's and would display this information at the bottom of the screen during the race.