Mr Speaker

SEARCHING FOR $ – a C64 Ajax loader


|

Golly gosh Ajax spinners ("throbbers" if you must use the correct term) are boring. They just spin. Not my Ajax throbber. It rocks.

No longer do you have to bore your users to tears waiting for your Ajax requests to complete - you can keep them thoroughly entertained with this historically accurate representation of the loading screen of the Commodore 64. Ah, how your users will smile with memories of waiting for America's Cup Challenge to load from cassette, but always stopping after 30 minutes, and even if it did ever load, being a really crappy game.

If that's the kind of emotional User Experience you want your apps to evoke, read on!

The code is based on my entry for the fantastically inspiring js1k competition. I expanded it to make it slightly more readable, and add a futuristic API.

To start the "spinner": LOAD("*",8,1)
To stop: RUNSTOP()
To change the message displayed: PRINT("YOUR MESSAGE")
To load in a particular containing element: LOAD("#myDiv",8,1) (the final parameter is the z-index to set the container)

There are a bunch of settings which can be accessed by PEEKing and POKEing in the RAM and ROM banks. For example, to change the containing element (ROM location 0): POKE(0,"#myDiv") and to read it back and print to screen: PRINT(PEEK(0))

The RAM bank is stored from memory location 49152 (decimal):

V=49152
PRINT(PEEK(V+4))
POKE(V+4,1)

The banks are not fully documented of course. Check out the source if you want to modify things. I'm not giving you any more information than that - it would go against the spirit of the C64.

5 Comments

  1. lolz, this makes me want to build something just so I can use this ajax loader

    Wednesday, October 20, 2010 at 10:09 pm | Permalink
  2. Ha, pretty cool :D I’m just afraid that a lot of todays users have absolutely no clue what this weird blinky bordered blue screen is :/

    Thursday, October 21, 2010 at 3:47 am | Permalink
  3. DEPACKING… DONE!
    BROUGHT TO YOU BY THE POMPEY PIRATES
    GREETZ GO TO AUTOMATION, MEDWAY BOYS AND FLAME OF FINLAND
    (press ‘t’ for trainer)

    Thursday, October 21, 2010 at 3:24 pm | Permalink
  4. t

    Thursday, October 21, 2010 at 7:21 pm | Permalink
  5. Simply brilliant! I like the API as well!

    Tuesday, January 18, 2011 at 1:36 am | Permalink
Captcha! Please type 'radical' here: *
How did you find this thingo? *