8bitworkshop is a fantastic website that lets you write and test code for a wide range of retro 8-bit computer systems within your browser. It has a great IDE with memory browser, disassembly etc. The ZX Spectrum, Commodore 64, MSX, Atari 2600, NES and Sega Master System are among the supported systems.
The functionality is amazing, a lot of hard work has obviously gone into this project.
The owner of the website has also released a range of books. These cover writing games for retro hardware, and even a book on designing video games hardware. These are definitely worth a look too!