Archive for the ‘Spectrum’ Category

FreshBEEP

Sunday, January 4th, 2009

Kicking off 2009 in style with a website-in-a-day, FreshBEEP is my answer to a pressing problem on the Spectrum scene: people are releasing new games all the time, but they’re being overlooked due to a lack of a prominent central place to announce them. However, it turns out that on the World of Spectrum What’s New page, nestled amongst the hive of other site activity that gets mentioned there, Martijn has been dutifully labelling new releases under a “New software for 2008″ banner. One swift bit of mashup work later (does it count as a mashup if it’s only coming from one site?) and these are now being pulled out into a friendly blog-like format, with an all-important RSS feed. It’s not particularly clever, but it scratches an itch…

JSSpeccy: A ZX Spectrum emulator in Javascript

Sunday, October 19th, 2008

I’m really typecasting myself here. If there were an international “Person most likely to write a Spectrum emulator in Javascript” award, I’d have taken it for the last five years running. So here it is – probably the most stereotypical project I’ll ever come up with.

Writing this wasn’t actually such a big deal – the Z80 core was ported from the one in Fuse, with the Perl-and-C-preprocessor-munging trickery still intact, and Javascript is syntactically close enough to C that that wasn’t a mammoth task. (I got 90% of it done on the train journey back from International Vodka Party alongside recording silly songs about tube stations.) The one fiddly bit was working around the places where the Fuse code used low-level C constructs to its advantage: using unions to chop and change between individual registers and 16-bit register pairs, and relying on limited-size C data types (often in pretty subtle ways) to truncate 8-bit and 16-bit values at the right time, whereas Javascript only has integers. (Actually, the really time-consuming bit was debugging it all… luckily, Fuse has a rather excellent test suite too.)

The rest is just creative abuse of the <canvas> element, as usual… it’ll take advantage of the putImageData interface to do the pixel pushing if available (on my machine Firefox has it, Safari doesn’t) and fall back on drawing 1×1 pixel rectangles otherwise. This time I’ve thrown in Google’s ExplorerCanvas as a nod to those poor unfortunates still stuck with Internet Explorer. Incidentally, I’d be curious to know how it rates on Google Chrome (I don’t have an XP/Vista box to test on) – if the hype is true (and it implements the putImageData interface like all good up-to-date browsers should) then I’d expect it to comfortably reach 100% Spectrum speed on modest hardware.

The Ninja Milkman Conspiracy (and Maze)

Sunday, October 5th, 2008

I’m a bit behind in my blogging, so I’ve got a bit of a “what I did this summer” catchup to do. First up is The Ninja Milkman Conspiracy, a cheap and cheerful oldskool scrolly Speccy demo made for this August’s International Vodka Party, featuring the classic circle interference effect, some creative use of dithering, and a dancing robot. What more could you ask for? The title, incidentally, was just something random and irrelevant to save it from being called ‘IVP 2008 demo’ (which is just as well, because there were already 2 other demos in the competition called that) but is actually a reference to the milkman at one of our offices who is able to deliver the milk and disappear without making a sound.

…All of which is ordinary enough, but the exciting thing (if you’re the sort of person to get excited about build scripts) is, um, the build script. I’ve been happily using makefiles for ages, but this time I finally flipped at the amount of redundant boilerplate you need to shove in there for a typical Spectrum project, even a small one like this – having to remember command line syntax, having to explicitly set up dependencies even though they’re all clearly marked as ‘include’ lines in the assembler file – so I came up with Maze, a Spectrum-oriented replacement for Make written in Ruby. Inevitably, being a scratch-my-own-itch sort of program, it’s a bit more hard-coded (and tuned towards my own way of working) than I’d like, but I reckon it’s enough of an improvement over bog-standard makefiles that it could conceivably be useful to other people. And if it is, maybe I’ll be encouraged to rewrite it in a more open-ended way some time…

Spacecake

Sunday, August 3rd, 2008

When I’m writing Speccy music, I’m always very conscious of stereotyping myself. At the Forever party, they gave up on anonymising music competition entries after realising that everyone in the room recognised the Gasman entry (and the Yerzmyey entry, the Factor6 entry…) within two seconds of it starting up – even if I’d gone to great lengths to reinvent myself.

This time, with two or three days left before Assembly and nothing to show, I decided to make it easy on myself, and stick with what I know – the primal boop-durr-tish-durr bassline, the crowd-pleasing echoing cascades – and not be too bothered about basking in my signature style. As a result, it’s not the most original piece of music I’ve ever written, but it did its job – it made first place in the Extreme Music competition where it was up against PC soft-synths in addition to the now familiar Commodores and Nintendos.

The title isn’t a bid to stir up controversy with drug references, by the way. I just liked the combination of words.

Download gasman_-_spacecake.mp3

Comet Chaos

Monday, July 7th, 2008

Thanks to Oleg for reminding me at OpenTech that I still hadn’t written this up yet…

This started out as an experiment in Comet techniques (which allow you to actively push data out from web servers without the client having to initiate the request) which quickly ballooned in ambitiousness – I didn’t set out to write Just Another Chat Application after all. The end result is a realtime multiplayer Javascript conversion of the Spectrum wargame Chaos… or a reasonable chunk of it, at least.

Play Comet Chaos now

If you’re interested in the workings behind it, check out this video from my Oxford Geek Nights presentation to hear about how Comet is like a small child on a car journey, find out how close web developers can get to world domination, and watch a live demonstration going pear-shaped.

(more…)

AY Club: Breath Of Air

Saturday, May 10th, 2008

As a postscript to the release of tracker2ay, here’s the reason I wanted to transfer tracker files back to the Spectrum in the first place: to play X-Agon’s 6-channel Breath Of Air (as featured on the AY Riders Satellite single) the way that God intended, on two Spectrums playing 3 channels each…

tracker2ay

Saturday, May 10th, 2008

Here’s a utility prompted by zxbruno and Eq both asking, in the space of two days, how to convert STC, SQT and PT3 music files to something you can actually play on a Spectrum. For those not in the know, STC and friends are Spectrum tracker file formats originally introduced by Sergey Bulba‘s AY Emulator and which are now the de-facto standard for archiving Spectrum demoscene music (most prominently on ZXDemo, ZXTunes and Sergey’s epic Tr_songs archive). Which means it’s a bit unfortunate that there’s not been an obvious way to transfer them back to the Spectrum.

In principle it should just be a case of locating the appropriate Z80 player routine and bundling that together with the music data. In practice it involves a lot of faffing about (such as repointing pointers to make up for slight rubbishness in the SQT data format, and writing a 5-line Basic loader/player). Now, thanks to this utility, you just need to type tracker2ay mysong.stc mysong.tap instead. (Oh, and it can convert to TAP, TZX or AY.)

If at this point you’re screaming “But why does it have separate source code if it’s written in Ruby, which is an interpreted language?” then award yourself 20 geek points. Ah, you see, this time I’ve been playing with rubyscript2exe (and tar2rubyscript) to create all-in-one executables that everyone can enjoy without worrying about library dependencies and things. (But obfuscates the code in the process. But in a good way.) Please do check out the source code if you’re curious about that sort of thing, because I reckon it’s one of the best bits of code I’ve written in a long time, in a ‘nicely-written code’ sort of way rather than ‘evil complicated hacks that go together to do something superficially elegant’.

Triptik

Sunday, February 17th, 2008

My very fast (written in something like 2 hours) music entry for raww.orgy, which ended up in 4th place. In a cunning kill-two-birds-with-one-stone move, it’s also one of my FAWM songs.

Download gasman_-_triptik.mp3

Triptik on FAWM

Pimp My Chips

Wednesday, February 6th, 2008

[Screenshot: Pimp My Chips]

This week saw the release of the long awaited Ate Bit musicdisk, Pimp My Chips – featuring a selection of Spectrum covers of classic pop songs. Musical contributions came from Mofobaru, Simon, Nik-O and myself, and the full pack is well worth a download if you’re suitably Windows-executable-equipped. If you don’t, or you’re more of an instant-gratification-click-and-listen type (or a stick-it-on-your-mp3-player type), here are my tracks as friendly bandwidth-hogging MP3s.

Dancing Queen (Abba)

Download gasman_-_dancing_queen.mp3

Disco 2000 (Pulp)

Download gasman_-_disco_2000.mp3

Video Killed The Radio Star (The Buggles)

Download gasman_-_video_killed_the_radio_star.mp3

Paranoid Android (Radiohead)

Download gasman_-_paranoid_android.mp3

OpenZXRom 2008-01-07 (the PRINTworks)

Monday, January 7th, 2008

[Skool Daze: "700 lines ERIC - Don't do it again..."]It seems like only last week that… hmm, yes, well. After the last release in the closing hours of 2007, I was all set to put OpenZXRom aside for a while. But then Philip Kendall and a merry band of anonymous people did phenomenal work on the OpenZXRom wiki page, documenting a mountain of games that did and didn’t work – and the list of bug reports was a carrot dangling in front of me and whispering “fix me. fiiiiix meeeee.” And I don’t even like carrots.

So, this is the result. Biggest news this time is the arrival of the PRINT statement – yes, it’s been long overdue, but now OpenZXRom can run that legendary masterwork: 10 PRINT “the c64 was crap” / 20 GO TO 10. (Actually, it briefly works and then dies in a burst of attribute clash, because I haven’t bothered to test for running off the bottom of the screen yet. Still, eh?) We’ve also got FLASH, BRIGHT, PAUSE, and beefed-up keyboard scanning for the benefit of games that piggyback on the interrupt routines. Despite the “let’s make a bunch of games work” focus of this release, it’s actually only made modest progress – for all too many of them, fixing the simple bugs just replaces them with progressively more obscure ones. But it’s still fair to bask in the successes of the 15% or so that do work now, including Skool Daze.

Download OpenZXRom 2008-01-07