Web Design IES
Web Design in Easy Steps, now in its 7th Edition, shows you how to make effective websites that work on any device.
For a long time, I've wanted to be able to embed an Amstrad CPC 464 emulator in my website, so that people can more easily play my Amstrad games.
Thanks to Andre Weissflog, that is now possible! He has created the tiny8bit emulator, which emulates the Amstrad CPC 6128 as well as the Commodore 64, Vic 20, and ZX Spectrum.
(If you're just looking for an emulator to download, see these instructions).
Now, if you'd like to step this way, you can try the Amstrad emulator I've embedded in my site here:
![]() |
You can download my Amstrad CPC games and utilities disc to use these programs in your favourite emulator. |
If you want to embed an emulator in your site, follow these steps. I've used the Amstrad emulator but similar steps will apply for other platforms too.
cpc.html?file=games/fred.sna&joystick=true
cpc.html?file=games/sean.dsk&input=run%22menu%0A
With the .dsk format you can have many different programs in one file. The .dsk file for my games was already created, so it was a no-brainer to use that one file rather than creating lots of separate .sna files. I would hope that the .dsk file would be cached if someone loads additional programs from it from different web pages, but I haven't been able to validate this.
window.addEventListener('load', function () {
window.focus();
document.body.addEventListener('click',function(e) {
window.focus();
},false);
});
That code makes the emulator the active window when the window loads and when it is clicked. It was created by Quinten Clause as documented here. Thank you, Quinten!
The emulator only worked when I uploaded it to the web and viewed it in a browser: it didn't work when I opened the web page from my computer's local storage. To test your emulator, make sure you upload the files to a web server.
You're all set! Remember to remind your users to click the emulator to activate the keyboard in it.
Thanks to Andre, Quinten, and to Amstrad who have allowed the Amstrad CPC ROMs to be used in emulators.
© Sean McManus. All rights reserved.
Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!
Web Design in Easy Steps, now in its 7th Edition, shows you how to make effective websites that work on any device.
Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.
This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.
Code a space adventure game in this Python programming book published by No Starch Press.
Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!
In this entertaining techno-thriller for adults, Sean McManus takes a slice through the music industry: from the boardroom to the stage; from the studio to the record fair.