Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Razvan Surdulescu, posted on September 02, 2001

Image Description, by Razvan Surdulescu

This is a screen shot of a Sinclair ZX Spectrum emulator written in Java. You can see it in action here:

The Spectrum was built in the early 80's by Sir Clive Sinclair, in the UK, and was one of the first truly personal computers (affordable and reasonably powerful.) You can read more about the Spectrum here and here.

I wrote the emulator in part because of my own personal nostalgia for these machines (I got "into computers" because of them) and in part because I was curious to see if it was possible to make one run fast enough in Java. If you're a Java programmer, you may want to read a small article I wrote up about this emulator:

I only tested the emulator on my machine (Windows 2000, Duron 700Mhz, GeForce2 MX), using Netscape 4.78 and IE 5.01, with MS Jview 5.00.3802 and Sun JDK 1.3.1. On both JVMs, the emulator has to be slowed down considerably in order to run at the speed of the original machine (Java was surprisingly fast.) The code for the emulator was also remarkably concise and very clean (I had previously worked on two Sinclair emulators, written in C, and the code was rather messy and bloated.) I never though I'd come to saying this, but this project has convinced me further that Java is a solid platform and a great programming language.

I welcome your thoughts, comments and flames. :-)

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

September 02, 2001, 04:19 PM

I like this kind of stuff!
Great job! ;)

Pierre Mengal

September 02, 2001, 04:21 PM

Wonderfull !
Great !
Impressive !


September 02, 2001, 04:25 PM

I hope this is not automated message - surely suitable in all cases ! :)

zed zeek

September 02, 2001, 05:21 PM

whats the game? it looks sort of similar to the sequal to jetpac 'lunar jetman'. coincidencly i was playing jetpac the day before yesterday
god i luv that machine a true mans machine, i wasted many a lost hour playing aticatac/sabrewulf/tir-na-nog/knightlore/avalon (my alltime favorite game but now i need some password to play it on the pc emulator a word from the manual so if someone can help out mail me please, pretti please)
btw vive java!!


September 02, 2001, 05:38 PM

English: good for U, Java rocks, Spectrum sucks bla bla....

Romanian: bravo mai nene, esti cred ca al 5-elea tip roman pe care il vad pe la


September 02, 2001, 05:53 PM

The game shown in the screenshot is "Exolon", one of my favorite Spectrum
games, published by Hewson consultants. I never played "Lunar Jetman",
but I remember "Jetpac" very well--an excellent game as well.


September 02, 2001, 06:10 PM

Predator: There are more... :-)


September 02, 2001, 06:36 PM

Argh, how do I beat that thing!?!

I MUST now how to do that, I won't sleep before I knocked that thing down!!

Ah, old memories are coming back.. :)

btw. Yep, I'm addicted to platform games :) great work! ;)


September 02, 2001, 07:11 PM

It's remainds me that I started with a Sony MSX 1.0. The main problem was that all my friends bought the ZX spectrum. That's why I hate them in a very particular way :) ; besides this, we used to spend a lot of time with bouth computers.
Very good job.


September 02, 2001, 08:01 PM

Java sucks and spectrum rocks. =)

zed zeek

September 02, 2001, 09:15 PM

downloaded it and had a go. didnt get far though.


September 02, 2001, 10:06 PM

Great stuff. This not only brings back some good memories, but it does it really, really well. It even seems to emulate timing issues well enough.

Stefan Karlsson

September 03, 2001, 03:54 AM

first cool iotd on a long time!!

cool work!:)


September 03, 2001, 04:47 AM

V Nice :)

If I remember correctly you beat that thing by holding down + fire to launch a rocket from your backpack. Exolon rocked :) Written by Rafaelle Cecco I think who went on to write First Samurai on the amiga. Dunno what he's upto now though...


September 03, 2001, 05:36 AM

Very cool emulator. I am impressed. I have been writing z80/spectrum emulators too, but I never made a really solid one. Its pretty hard to get all the flags effects and everything right. But this one seems to be working great.


Are you planning to put more snapshots online?

Manuel Astudillo

September 03, 2001, 05:37 AM

Raffael Cecco:
Still writing games: his latest project is B Movie, for his own company, King of the Jungle.

I found it here:

interesting he?

btw, Hewson was the best game company by that time. IMHO.



September 03, 2001, 06:12 AM

Spectrum rocks :)
My fav. game was AticAtac :)
Nice emulator !


September 03, 2001, 08:44 AM


The ZX Spectrum rules !!!
And it still whops the C64's ass !!!


September 03, 2001, 11:11 AM

You only say the spectrum kicks the c64 because you're jealous of the superior sound.

Admit it, commodore ruled back then, and they still would today if they had decent management.

Oh yer, great work - but java is still too slow for me.

I've heard that GCC now has a Java->native compiler - is this true and has anyone tried it?

The Wolf

September 03, 2001, 11:40 AM

Thanks to guys like you I can also satisfy my own nostaligia for the good old days! Keep up the good work.

Rui Martins

September 03, 2001, 12:41 PM

No to cut back on your nice work, but at least two other Spectrum Emulators exist about 2 years ago. One of Them I believe also supported the Spectrum 128 versions.

About your Emulator, do you support the non-documented instructions, which some games used.
And do you have all the Flags and Registers Correctly, some were a bit wird.

I really loved the Spectrum, because it was my first computer, which pushed me into computers as a profession.

I haven't tried your Program iet, but I will, also, I would like to known which file formats you support (.Z80 .SNA .TAP etc..)?

I have an huge collection of Spectrum Games, and I also have made a device to transfer/read them directly to the PC, from the tape recorder.

See ya, Play & GamePlay


September 03, 2001, 01:21 PM

NICE!!! Really needs a save game feature, or some password thing... it would be hard to implement though wouldn't it? :/


September 03, 2001, 01:58 PM

JZX supports both 48k and 128k Spectrum models. You can't hear any sound
(for the 128 games) when running as an applet in IE, since I use the Java
Sound API (which is JDK1.3.1 only.) I'll add support for the Java PlugIn soon
enough and then you can see the whole enchilada.

To the best of my knowledge, all unsupported instructions and registers are
correctly emulated.

JZX supports only Z80 as the snapshot format. I will add more formats as
time permits.


September 03, 2001, 05:12 PM

You all realize that, say in 2012, a coder (maybe Razvan) will post a website(?) saying "I've made a PC emulator, here a screen shot of a good old game everybody played in the early years: Quake 3 Arena" !!!!!!!!!

Rui Martins

September 04, 2001, 05:50 AM

Then I would recommend you to support next the .TAP format.
Which is a copy of the data in the Tape, and this format also enables you to load those games, which had levels, because you can go forward or back with the "TAPe", R-TYPE commes to mind.

I also heard about a .TZX format, which supports those formats where the games had special loaders, remember those that you could play MasterMind while loading the actual game. Those were the golden days of the Spectrum.

Good Luck to your Project.

See ya

This thread contains 25 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.