Thursday, 16 December 2010

Merry Crimbo!

With Christmas day only nine days away, I've been getting in the spirit of things with a rather polished Christmas-themed game for the Sinclair ZX Spectrum from the Little Shop of Pixels called Crimbo - a Gloop Troops Tale. Although the difficulty curve isn't quite as balanced as it could have been, and also that the collision detection may occasionally catch you out, there's enough playability in this binary wonderland to keep you entertained over this festive period.

In this game, poor old Santa sees his helpers strike, presumabely over pay, conditions and redundency terms, with all of the presents been hidden throughout his vast complex. Mr Claus must be guided to collect the pressies whilst also avoiding the roaming (striking) Christmas trees, Robins et al. The graphics are cute, though to limit colour-clash, no masking is used (which seems odd when two roamers of the same colour pass each other). There's a time limit, and each screen is designed so that the fastest route isn't always obvious.

On AY-equipped machines, there's some very cute music to accompany play, though you may be reaching for the volume after a while. Go get it from the Little Shop of Pixel's blog at little-shop-of-pixels.blogspot.com. My overall rating: 8 out of 10.

Tuesday, 7 December 2010

Explaining machine code.

The other night, whilst watching the second Ashes test whilst also trying to do some College work, one of my fellow students appeared on line with a desperate message which read that he didn't understand machine code and wanted an explanation. Diligently, I started to explain machine code, giving examples in Z80 and so on. Needless to say he was getting confused, and just before his brain exploded, it was getting late and time to call it a night (though I did watch a few more overs of the Cricket match as England were doing so well!)

The next day, I realised my mistake, or at least there was a problem in translation. What he meant to ask was about ASCII code *and not* machine code. So, all of my explanations were wasted when he could have simply looked up the ASCII table online in seconds. Well, a short and pointless story, but at least a younger generation now know the difference between machine code and ASCII code.

Tuesday, 6 July 2010

Update.

Well, at least the weather has been good, and I've passed the first year of my course (phew!) - it was a close call on at least one unit anyway.

So, what's been going on? Well, I've been looking a little more into the wonderful world of assembly code on the Sinclair ZX Spectrum. Making things happen inside a television screen has never been so much fun - or so quirky. Interesting the way the screen is built up anyway. On the gaming front, I had the sad news of the passing of a true legend from the 'bedroom coding' generation, Jonathan 'Joffa' Smith who was just 43. I wrote a tribute to the modest and extremely talented guy for Micro Mart, coming up in the next couple of weeks. Since, I've been trying out some of his games again, especially those that I missed. I'd recommend to you all a Sinclair User cover tape game Hyper Active, which is a neat defender clone with great graphics and scrolly-type things.

Aside from games, things are slowly moving along and hopefully getting a little easier on a personal level. I *think* I can continue my studies into next year on a full-time basis. I had considered taking a year out or part-time studying - fingers crossed that this won't have to happen.

This weekend, I'll be going to Northampton to catch up with an old mate of mine who's a big TI99/4a. So, it should be a good weekend all round.

Saturday, 12 June 2010

Welcome to my gaming blog.

Well, I did have a blog on MySpace, but no one reads it and I've neglected it, so I posted some items on FaceBook using the 'notes' thingy which was okay but only people on my friends list could read it or something, so I thought I'd start a blog here. All the best writers have them apparently, so why not me? Well, maybe because my writing is generally the best aspects of mediocrity, and probably because I'll again neglect this, but never mind.

Anyway, a bit about myself: I'm a part-time freelance writer for the magazine Micro Mart (http://www.micromart.co.uk/) published weekly in the United Kingdom and available every Thursday for a partly £2 from your local news agents. I've just finished the first year of my Foundation Degree in Computer Enterprise and work part-time in social care. I have a young daughter, called Ruby Mae, who is fast approaching her second birthday. It's good now she's growing up a bit because it means that we can have a laugh.

But the important thing to know, as this is a gaming blog, is what games I'm playing at the moment... and to be honest, I've not had chance to indulge myself in any binary worlds lately, so here is some Z80 machine code which will happily work on the Sinclair ZX Spectrum for you to look at:


SCR EQU 16384 ; Screen Ram location
ORG $6000 ; This is where we want our program to start in RAM (6*4096)
LD BC,STRING ; Right, let's get the location of where the text is that'll be written
; the screen
LD DE,SCR ; and let's get the locator for the screen and put it into a register
; DE (or in otherwords LET DE=SCR)
LOOP ; Here is our first label, called LOOP
LD A,(BC) ; Let's put the first byte at BC into A, or in otherwords
; LET A=PEEK (BC)
CP 0 ; Compare this to zero, which is the marker for the end of
; the data which we're writing to the screen
JR Z,EXIT ; If A does equal zero then let's go to the label EXIT
RST $10 ; Print A to the screen
INC BC ; Let's increase BC by one so to get the next byte from our
; DATA string
INC DE ; We'll increase DE as well to put the next char one step to the
; right of the previous outputted character
JR LOOP ; This simply jumps back to the label LOOP to repeat the process
EXIT ; Here's our EXIT label
LD BC,0 ; Let's clear the register BC to zero
RET ; RET simply returns to BASIC
STRING ; Here's our STRING label (or in other words, where out text is)
DEFB "Hello World!"
DEFB 13,0 ; 13 is a new line or carriage return, and zero says "end of data"


Good, innit? When assembled, load it into your favourite Speccy emulator and PRINT USR 24576 - amazing eh? But why do you get the zero displayed on the next line after Hello World! is drawn to the screen? Well, you could also try RANDOMIZE USR 24576, but you won't see anything. So, try INK 0: RANDOMIZE USR 24576 - there, it works without the zero being printed... so if you're going to execute the code using the latter method then you need to tell the Speccy to set a colour for what it's going to output first, whic of course you can do in the code itself. But how do you do that? Answers on a post-card.