I haven't slept for a very long time, and usually when I find myself at this state I give Google and Wikipedia a hell of a lot of strange words to entertain myself.

Today I Googled for "emulator written in perl", hit "I'm feeling lucky", and was then redirected to nothing less than a Sinclair ZX Spectrum emulator written in Perl... And it works.

I'm sitting with the biggest "WTF?!" expression on my face, 'cause A. I didn't think it was possible and B. I've NEVER heard of the program here at PerlMonks.

What's going on here? Am I very slow or something? Am I asleep and dreaming this?

(here is the link: )

P.S. Sorry if I posted this the wrong place. Didn't know where else.

Replies are listed 'Best First'.
Re: Perl Spectrum Emulator
by grinder (Bishop) on Dec 22, 2005 at 07:34 UTC
    I've NEVER heard of the program here at PerlMonks

    Not everything that happens in the Perl world gets mentioned at PerlMonks. Lots of details get thrashed out in various mailing lists. All sorts of informal discussions occur in use.perl user journals. If you rely soley on PerlMonks, you won't be getting the full picture.

    For me, I heard about this brilliant hack at YAPC::Europe in Belfast, with a talk given by one of the authors. The talk met with riotous applause. Not only for the niftiness factor. The talk was quite interesting in terms of what they had to jump through in terms of getting a reason refresh rate.

    • another intruder with the mooring in the heart of the Perl

      (This is kind of off-topic... But I still haven't slept yet)

              Not everything that happens in the Perl world gets mentioned at PerlMonks.

      I know that, but I'm not as much into the Perl-scene as I used to (or rather should) be. These days I only use Perl for ultra simple tasks that sane people would use shell-scripts for. is the only Perl-related site I visit on a monthly basis, simply because most of the stuff that's written here is super cool :)

Re: Perl Spectrum Emulator
by spurperl (Priest) on Dec 22, 2005 at 06:40 UTC
    It doesn't sound so surprising to me.

    I've written a MIX (Knuth's imaginary computer) emulator in pure Perl, including a compiler for the MIXAL language, and it works pretty well. Of course, MIX has no graphics whatsoever (only a text terminal).

      A MIX emulator in perl? That sounds great, Wow!

      Update: I once wrote an emulator (but no assembler) for a much simpler processor than either of these in Ruby, and my obfu Re: Pattern matching can be said to simulate an even simpler processor (well, I've compiled it with a simple assembler program I've written in ruby).

Re: Perl ZX Spectrum Emulator
by hardburn (Abbot) on Dec 22, 2005 at 19:53 UTC

    I used to think that emulators were deep voodoo. Then I tried making one (Game Boy, which is a modified z80 processor). Turns out the hardest part is getting sound to work. If you just want to get the instruction set to work, you just need a big array to represent the memory, map the data into the right spots (cartidge data gets put into a given location in memory, etc.), then start doing each opcode, which basically ammounts to doing some simple operation (add two numbers together and store the result in register ax, etc.).

    All the data you need for this is available to the public with a few moments of quality time with Google. The Game Boy is a simple platform, so it's a good place to start. It'll give you an idea of how CPUs work, and it's probably not as hard as you think.

    "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Re: Perl Spectrum Emulator
by spiritway (Vicar) on Dec 22, 2005 at 05:46 UTC

    I don't see why it wouldn't be possible. I might wonder why it was done, but surely this is not beyond the abilities of Perl.

Re: Perl Spectrum Emulator
by dna (Beadle) on Dec 22, 2005 at 06:52 UTC

    I never imagined it would have potential for emulating computers. Maybe I AM a bit slow.

Re: Perl ZX Spectrum Emulator
by muro123 (Initiate) on Nov 16, 2019 at 16:59 UTC
    I don't know that much about the Perl Emulator but my question is can it be found somewhere to try it maybe will be a better emulator then the regular ones like zx32 or the Fuse. I want to play the ZX Spectrum games with ZX Spectrum Emulators where I download it from here And I can't find this specific emulator mention, in the beginning, the Perl EMulator.