Just for the hell of it - QR code on a ZX81!

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
PrimitivePerson
Posts: 17
Joined: Fri Oct 22, 2010 6:55 pm

Just for the hell of it - QR code on a ZX81!

Post by PrimitivePerson »

QR codes seem to be getting everywhere these days - having just downloaded a QR code reader for my phone, I was keen to find out about how they work. Turns out they're quite simple, and looking at them, it struck me that several of the smaller sizes could be reproduced on the low-resolution display of a ZX81. Perhaps Uncle Clive was more visionary than we realised and thought about what people might try with his tiny computer in the twenty-first century.

Having found an online QR code generator, I fed the URL for my blog into it, and it produced a QR code small enough to fit onto a ZX81 screen. Next step was printing it - I then drew a grid over the top, splitting it up into 17x17 ZX81 characters. It was then easy enough (although very time consuming) to map it all to ZX81 graphics symbols, printing the whole lot on screen using 17 lines of BASIC. It all took longer due to some problems with RAMpack wobble about halfway through, which was annoying, but after that I saved it after doing each line. Eventually I finished it...and was pleased to find it worked! Well, sorta.

Image

That's it screen-grabbed running on the EightyOne emulator on my PC. It works instantly with no errors, and I got it right on my first attempt. However, running it on my real ZX81 is more problematic, probably because of the crappy, tiny telly I use as a "monitor". However, a printout from my Alphacom 32 printer worked just fine, despite the dubious print quality. A reasonable quality TV display should make it simple enough to read one of these without too much trouble.

There's no real point to this, of course, but it kept me busy for a while, and it was satisfying to get it right first time, and do something the thirty-year-old ZX81 was NEVER designed for. I suspect the coding process for QR codes is simple enough to make a ZX81-based coding program possible. I might give it a go...

Lee
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Just for the hell of it - QR code on a ZX81!

Post by sirmorris »

Voted #1 in 'Things that I didn't expect to see on a ZX81 this week' :lol:
PrimitivePerson
Posts: 17
Joined: Fri Oct 22, 2010 6:55 pm

Re: Just for the hell of it - QR code on a ZX81!

Post by PrimitivePerson »

sirmorris wrote:Voted #1 in 'Things that I didn't expect to see on a ZX81 this week' :lol:
Heh! I like to keep things fresh!

I was just looking at a QR code the other day, and it made me think that the ZX81's built-in graphics symbols would be perfect for making them...and they are.

Lee
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Just for the hell of it - QR code on a ZX81!

Post by Andy Rea »

Thats weirdly cool in a really wierdly cool way :mrgreen:
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
Paul
Posts: 1517
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Just for the hell of it - QR code on a ZX81!

Post by Paul »

Great thing! I really like it.
A Program coding these automatically would really be cool!
Next we need a tool to read them back into the ZX81, so decoding them.
In theory, there is no difference between theory and practice. But, in practice, there is.
Post Reply