To quote Pauly Shore: "Illegal! Illegal!"
Common sense should tell you that it's not legal to have copies of games on your computer. Even if you have the actual cartridge of the game, it is still illegal to have a copy on your computer. The 24-hour trial, along with the legality of ROMs, is a myth made up to justify being able to play games on your computer. Nintendo has come out a few times in the past few years to state that, though, somewhat understandably, the only control they have is the legal ability to shut ROM sites down (or at least rid them of Nintendo ROMs).