Dan Griffin has written an Open Source CPC emulator in Ruby that uses code translation tools to generate JavaScript and Java code from the Ruby source. Therefore this emulator can run in modern web browsers like Firefox.
Currently sound is not implemented in this emulator.