Emulating a system IS perfectly legal as long as you didnt steal propprietary documentation from the company who made the system your emulating.
Compaq legally cloned the IBM PC bios and so was allowed to make their own line of PC's
Some company legaly cloned the Apple II and made knockoffs of that too.
DOSBOX on the linux platform legally clones dos
Dont confuse having illegal "romz" as making emulating illegal
Dont confuse your moral beliefs with what is legal, and morals are different in every country on the planet.