Versions for !Teletext

Parts were previously contained within !RunImage code.


1.00 26-02-96 Created basic shell.

1.01 26-02-96 Viewer sprite plotting/updating routines added.

1.02 26-02-96 Basic teletext searching added.

1.03 27-02-96 Configuration (tuning) added.
1.04 27-02-96 Teletext channel changing & frame keying added.
1.05 27-02-96 Updated configuration to 'gel' better. :-)
1.06 27-02-96 Added menus and vertical/horizontal control option.
1.07 27-02-96 Added save options. Supports !Scrap drags-to-!Edit...
              Filename build up like:  {channel}_{frame}-{subframe}

1.08 27-02-96 Freeze, hold, reveal, local index, 100 and 199 added.

1.09 28-02-96 Added the ability to click inside the window to select frames.
              Also added 'FastText' support. This works by dividing the
              FastText line into four bits of equal size. Bear this in mind
              when using the FastText option. :-)

1.10 28-02-96 Added statistics. Click in viewer while holding ALT.
              Also added notes facility (and a quick way to wipe 'em all off
              :-) ).

1.11 28-02-96 Will now reload and display saved frames. Added palette
              facility.
              Will reset palette used on initialisation when quit.

1.12 28-02-96 Help system added.

1.14 29-02-96 Palette tweaked, bits tidied. Auto-search tuning added.
              No previous version. :-)

1.15 04-03-96 Removed special bits for !Scrap drags-to-!Edit as these work on
              the uncompressed code, but fail (Out Of Memory) on the
              compressed code (with 1Mb per task too!?).
              Added 'defaults' menu and configurations.

1.16 12-03-96 Clicking 'LAST PAGE' will now restore the search pointer to the
              last frame (ie: You read p107. You click LAST. p100 appears.
              Program now scans for updates on p100 and not p107.) <grin>
              'Wimp$Scrap' saves are now 'Filer_Run'. This means drags to
              iconbar will work, with Sprite being loaded into !Paint and
              ASCII into !Edit.
              Also now will load its own file (type 112) if clicked on in a
              filer or run in some other way. This uses the DataLoadAck
              message so you only get a new !Teletext loaded if it wasn't
              already loaded.

1.17 27-03-96 Solid-type sprite drags allowed if '3D' configuration in use.
              Automatic loading of saved files disabled if it's a teletext
              format file. It'd load in the same page...Pointless really. :-)
              ASCII save now filters out [7f] codes and replaces with spaces.
              Undocumented features, Alyson and Claire known.
              Tidied again.
              AU has said they may well stick this on the May disc. :-) :-)
              So amended a few bits to this effect.

1.18 28-03-96 Messages support added. Uses 'Default'.

1.19 17-06-96 Wasn't AU supposed to use this on the coverdisc around April?
              Hmmm!
              Corrected problem where 'Freeze' menu option was incorrectly
              ticked after an "is it switched on" message. Local error
              handler added to cater for DragASprite not available, fallback
              to Wimp_DragBox.

1.19b 20-06-96 Continued work on v1.19 - added RTC checking option with
              'strict' option and lots of checks so you shouldn't get a naff
              time from a bad signal.
              Strict will ALWAYS say your time is incorrect due to a
              one-second latency error during processing. This means your
              time will be set between zero and one second behind 'Teletext'
              time.
              Now when you change channel, page 100 is autoselected. Before
              it was supposed to do that, but didn't!
              Drag-to-task partially implemented. Edit and Draw seem to
              accept input, but !Paint won't...?
              Selecting a CHANNEL will unfreeze (if frozen), and update menu
              as necessary.

1.19c 22-06-96 Added to configure window, the right-hand side. Added start-up
              options for clock checking, open viewer window and default
              channel. Cache and Econet provided for but not yet coded.
              Beginning Interactive Help code.
              Configuration auto-saved on exit ONLY if "Locked Out" is *NOT*
              set. Now you can use !Teletext from ReadOnly media like a
              network.
              Now only redraws part of the configuration window when changing
              channel tunings. Much quicker for you. :-)

1.19d 26-11-96 Seems AU don't want it. <sob!>
              Changed the loading startup widget to display a nice little
              picture for a few seconds first time in. The girl is not
              myself. The girl is not my sister or <drool> my girlfriend...
              It is Claire Danes, known for the superb My so-called Life
              (Angela Chase) as well as other things.

1.20 06-10-98 I had not used Teletext for a very long time, but came back to
              it when I was without a TV listings guide. So I re-evaluated
              this program and set about fixing a few things...
              Added rudimentary cache, has no time-out. Changed 'load info'
              window to appear if you hold down ALT. Added 'AutoScan'
              facility.

     07-10-98 Added printout facilities (text, sprite, converted sprite), and
              a menu option to open the 'Pages' directory (default place to
              put saved pages).
              The "Check clock" can now handle satellite time (HHMM:SS) in
              addition to the time used on BBC/ITV (HH:MM:SS).
              Cache fixed, now looks for sub-frame matches, so the "LAST
              FRAME" toggle should now work correctly on roll-over pages.
              Cache entries also have a time-out of 12 hours. Menu option to
              list cache, or to clear it.
              Hold now disengages if you select a new page.
              Tidied up the Templates.

     08-10-98 Didn't do much today, except test the system. Added options to
              view/print the cache (of immensely little worth to the average
              end-user!).
              Today was spent mainly getting the documentation up to date.

     12-10-98 Should I add another 'easter egg'? What the hell - why not, eh?

     03-05-99 Corrected a few small bugettes.

     30-07-99 Fixed 'Print->Converted' option.


From this point onwards, version information will be given in my regular
style.



1.21  24/06/2000  [Summer Solstice]

      Cache fundamentally broken, searched from beginning to end. Errrrr!
      Bzzzt! Wrong answer, three strikes, you're history... no good to me...
      you're history... nah, nah, nah-nah...

      Cache is now autoexpired when !Teletext is initialised. It sorted out
      my 800 entries in a matter of seconds, so it isn't as slow as you might
      expect from BASIC.
      This helps keep the file size down.

      Fixed bug where clicking "Last" with an empty cache would cause an
      error.

      Changed "Angela" piccy to be a piccy of Alyson. The Angela piccy is
      almost five years old, and said "BudgieSoft" across it in big letters.
      (in case you didn't notice, stuff is nowadays being released as having
      been coded by me rather than "BudgieSoft")

      Fixed smalltiny redraw glitch, which left rightmost column undrawn.



1.22  02/07/2000

      Pressing Return in the save window now works.

      When !Teletext is 'frozen', it says so.

      Keyboard control in viewer window:
        ^C   Select channel mode
        ^P   Select page mode

        ^S   Save frame

        ^F   Toggle freeze
        ^H   Toggle hold
        ^L   Last frame
        ^R   Toggle reveal
        ^U   Toggle palette
        ^T   Print frame (as plain text)
        ^I   Entry index (p100)

        ?    Help

        0-9  Select frame (or channel)
        +    Select next frame
        -    Select previous frame

        Esc  Cancel

      Default frames are now blanked correctly, text area is a series of
      spaces and data area is null bytes. Previously, it was all null.

      UUcode output modified. Following the UUcode is:
        RiscOS filetype : 112
      which is understood by many RISC OS email clients. The "RiscOS" is
      capitalised the 'old' (incorrect) way because Posty appears to be case
      sensitive when checking this.
      Then follows my own extension:
        catalogue: <filename> <filetype> <attributes> <size>

      Initial page marker set to page 100. The reason for this is that if you
      loaded !Teletext, and immediately clicked "Hold" before anything had
      been fetched, then the help page would be displayed and the teletext
      decoder would be 'frozen'. This seems like a pretty bizarre bug, but it
      is in fact correct behaviour.
      Upon a page fetch, the page is reloaded and redrawn, even if it is
      flagged as held. The default page was originally marked as null bytes,
      so page "000" would be reloaded. As page 000 is a help frame, the
      program automatically freezes. Thus, !Teletext was doing everything
      correctly. However, it appeared strange, so the initial frame set its
      page number to 100, to prevent this occurance from...occuring. :-)



1.23  03/07/2000

      StrongBS failed to compress the help frame loader, so it has been
      slightly rewritten so that StrongBS works correctly.

      Removed all EVAL() calls, replaced with a custom routine that does
      exactly the same thing without all the icky side effects.



1.24  04/07/2000 [American Independence Day]

      Reveal flag is now switched off when loading a 'help' frame.

      Hold is unset when !Teletext is 'unfrozen'. Additionally, the default
      frame ID is set to page 100.

      Cache expiry is now user definable. In the configuration window, you
      can adjust the expiry time from 1 hour to 98 hours (8 days). Or, if you
      wish, set the expiry time to 0 hours to disable cache tidying.



1.25* 05/07/2000

      The "Tour de France" 2000 passes through Vitré, and I have the video to
      prove it. ;^)

      Fixed bug in help routine - if help data file isn't found, it will
      force the page ID to be 100 so it doesn't keep trying to load a
      non-existant thing.

      Pages in the 800 magazine, for some reason, appear as 0xx rather than
      8xx. Thus, any received page that is less than page 100 will be
      adjusted so that it has an 8xx number. This does not affect the help
      system as help pages are not received.

A year passes, nobody really notices...

-.--  01/07/2001

      Today I've lost Sky News (!), MovieMax, Disney, and a couple of sports
      channels I didn't subscribe to anyway. Oh, and QVC and TCM have gone.
      So, for my now-25 pounds a month I get: Sky One, and Premier (with odd
      sound).
      The freebies are CNN, EuroSport, Bloomberg, CNBC, and Channel 5.
      Not to mention five billion german channels!

      Oddly, the disappeared channels (ie, Disney) have their "We've buggered
      off to digital" pages hard-scrambled. Weird, huh?
      [note added 03/07/2001 - now it is "No signal", completely gone]

      You know, if it wasn't for watching Buffy, I'd ring them up and cancel.
      I know they are using every devious and dirty trick to get you to make
      the jump to the wonderful world of MPEG artefacts known as "digital",
      but expecting those left behind to pay the going rate for only TWO
      channels really pisses me off. I'll stop now, as my language will only
      get worse, the more I think about it.

      By the way, I am not permitted to fit a dish where I live in the UK, so
      please don't ask the blatantly obvious question!
      Soon(ish?) I plan to consider buying an ex-term digibox and setting it
      up like my analogue dish (propped up with a few paving slabs, in the
      back garden).
      For all of Sky's wonderful (!) advertising about not wanting to put
      people into predefined 'categories', they sure put me in one. "So we
      can't come and fit your system? No? Sod off then.". The tone wasn't
      quite that bad, but I was willing to sign disclaimers and all sorts if
      only they'd hand me the damned equipment and not insist on sticking it
      to the wall. But no. No way. So I'll have to buy a new box for, well,
      a lot. Or an ex-term digibox for a hundred quid. You know, if it wasn't
      for Buffy and the occaisional good movie, I'd simply not bother. It's
      a whole waste of time and money and if I had any willpower I'd send a
      few months of Sky subs to BlackStar (.co.uk) and purchase Buffy on DVD
      or something (only, they're up to season two - how crud, even the VHS
      videos are keeping up with things).
      Consider this the end of the rant.

      Oh, not quite. Apparently there are plans to get rid of teletext on the
      digital channels. It seems that the interactive text service is to be
      preferred, even if you can't store the pages in your computer and/or
      otherwise collate or record them (except on video?), and despite the
      fact that I have not seen one single person advocating SkyText.
      Everybody (usenet) seems to think it is slow (even compared to
      teletext!) and dumb, and it doesn't even have a rolling page counter so
      you can see how much longer you have to wait. So usenet might not be a
      representation of the status of public thought, but do be aware that
      recently the news reported Granada begging the government not to
      overturn it's obviously-failing attempts to make everybody go digital
      Real Soon Now, else Granada will be in serious financial trouble.
      It's their own fault really. Either we have land and satellite based
      digital television that is one with itself, or we have three totally
      incompatible systems showing different channels from different sources.
      The latter is what we got. People were forced to choose.

      Me? I choose satellite. Because I can rip the LNB off of my dish, and
      walk the dish and decoder over to France. I then get my usual selection
      of channels to watch, I don't have to bother with French TV. This is,
      technically, not allowed. Sky do not have a licence to broadcast to
      non-UK. However, as I see it I am paying (myself) a UK television
      licence, I am paying Sky a subscription; and, frankly, who gives a
      damn where I happen to be living? There is utterly NO difference
      between my living in Brittany, and my living in Britain, except nicer
      weather and better food (over here!). It's just like a different
      version of that stupid DVD region coding. Everybody wants to make more
      money. And guess who pays? Uh-hu, you and me.
      Morally, they see fit to charge me circa twenty five pounds for TWO
      channels. Um, excuse me...where do morals even enter this equation?

      On DBS, It'll be a sorry day if teletext does go.

      What I never understood. Why are there no video recorders that store
      the teletext subtitles? We don't need to store the entire vbi, just the
      bits for page 888. Shouldn't take much room. There was one VCR that did
      it by the icky method of 'burning' the subtitles into the recorded
      picture.
      On playback, the subtitles are pulled back out, the vbi for page 888 is
      reconstructed, and inserted into the video frame so you can, if you
      choose, switch on subtitles on your TV set with the programme.

      But, when all is said and done (oh, what a cliché), there seem to be a
      healthy supply of people actually willing to pay money for the Tivo.
      Maybe I've seriously underestimated the gullibility of the British
      public.
      But on Sky One, we have:
        1700 Star Trek: The Next Generation
        1800 Buffy the Vampire Slayer
        1900 The Simpsons
        1930 The Simpsons
        2000 Roswell
        2100 TV Years: 1985
        2200 Star Trek: Voyager
        2300 Time Gentlemen Please
        2330 Ibiza Uncovered
      The schedule for tomorrow only goes as far as 5pm, which is ST:TNG.
      What's the guessing Buffy follows, then two Simpsons?
      Tomorrow on Sky Premier, "Teenage Mutant Ninja Turtles II" is on twice
      (0925 and 1630) and "587 The Great Train Robbery" is on twice (0800 and
      1325). Given that there are four or five 'Premier' channels on digital
      and only ONE on analogue, I have no problem with them showing a movie
      twice in a day, but why are they showing them on the ONLY bloody movie
      channel we can receive? Bastards!

      Okay, now the rant is over. Honest.



1.26  04/07/2001

      Today, thousands of Americans will be celebrating the fact that England
      decided it no longer wished to be associated with those crazy
      trigger-happy weirdos.
      [if you think that's a slur on history, go watch "Saving Private Ryan"
       and/or most of the other 'historical' US films (Titanic, anyone?) and
       see how they totally rewrite history to suit their overinflated egos.]

      IRCS stuff greyed out, to stop confusion.

      Help submenu removed from iconbar menu. Clicking help now will call up
      page 000.

      Using '+' (or '-') in the browser window no longer does the sequence
      107, 108, 109, 10A, 10B, 10C, 10D, 10E, 10F, 110, 111.... Now it will
      jump from 109 to 110 as you would have expected it to.
      All the hex below page A00 will be skipped. If you intentionally select
      a hex page, then the skipping will stop until you select a 'normal'
      page again. Above (and including) A00, hex will be selectable.

      Now traps "Directory full" and reports the problem, rather than just
      dying upon saving a frame.

      Auto UUcode option fixed, so the UUcode is no longer 'broken'. Good
      software will read it okay, but it could be better. Also, the header
      and the table have been removed as these served no useful purpose.

      Slight redraw glitch (extreme right hand not redrawn) fixed.

      Cache lister now reflects the Current/Outdated status of the choices
      (was previously set to 12hrs). Also, it will report "Current (old)" if
      there is a current page > 12 hours old.

      Printing options changed, now it is:
        Print > Text
                Colour -> Enhanced
                          --------
                          Normal
                          Inverted
      Enhanced prints in the correct colours, only white is mid grey, yellow
      is slightly darker, and the black is now white. This means it should
      look more-or-less correct on colour printers without using loads of
      black ink.
      Normal is just a straight printout. Warning: uses a lot of black!
      Inverted was the old way to get around the black problem, with the
      colours inverted in monochrome.
      Undocumented feature: For any of the 'picture' prints, if you hold down
      either ALT key when clicking the print menu choice; instead of doing a
      print it will redraw the viewer window in the chosen colours. This is
      so I could 'see' how the colours would look without printing (even to
      PostScript -> RiScript!!!). It won't un-redraw. Drag over the window,
      or close/reopen...or something.

      Colour palette and ANSI tables are now provided on disc, rather than
      being held in memory. This way, they can be altered more easily.
      In short, the palettes are 16 PRINT# format words, each corresponding
      with the 16 desktop colours.
      The ANSI tables are two 256 byte blocks, one following another. Once
      the 'normal' characters and the control characters are dealt with, the
      rest is passed to the table. In non-graphics mode, it is read with:
        byte% = ansitable%?offset%
      In graphics mode, it is read with:
        byte% = ansitable%?(offset% + 256)

      Palette altering routine now only works in modes with 16 colours. It is
      ineffective in <16, and not required in >16.
      Oddly, with all the options now available in the 'Display manager',
      there is no facility to alter the palette. Even changing to greyscale
      and back, restores the old (as it should, but, that's not the point I'm
      trying to make!).

      Browser keypress ^G to print in enhanced graphic mode.

      On-line guide updated and expanded.

      Small thing - the date/version of the program is now hardwired into
      the program rather than being read from the messages file. That said,
      it's always been in the initial REMs in the code - just a little
      harder to get to!

      In the frame number alterations, all the checks are now unsigned. This
      is mainly to assist with...

      ...all of the invalid numbers clicked on in the browser window will
      report an error message. One thing to note, however, is a number with
      a zero as the fourth-to-end digit followed by three plausible digits
      (ie, "1840356") will select the page following the zero (ie, 356).
      That said, you shouldn't really go clicking on phone numbers and
      VideoPlus codes. :-)

      It is not not possible to click-select the help pages, unless you are
      already viewing a help page. There were times when, if !Teletext was
      unable to figure out your page, it'd fall back to 000, thus popping up
      the help and freezing the decoding. Not what we wanted!

      ALT!
      Those the know me will know I like the ALT key. It does a lot. So I
      took a quick wander through the source and here's what it can do.
      With ALT held:
        Click ADJUST on the iconbar icon for memory usage statistics
        Click the viewer to load page information into the notes window
        Select page 000 for an 'easter egg'
        When loading a frame from disc, a small info window will pop up
        When printing graphics, will render the display in print colours (and
        not print anything)

      Now correctly updates the cache, when updating an existing frame.

      Better reporting of cache state (list cache) when there is no expiry.

      Updated the user guide (!Help).

      Updated the Ground Control configuration convertor.



1.27  06/07/2001

      Fixed cache lookup. Was hardwired to time out after 12 hours. Now uses
      your defined expiry.

      Implemented <Teletext$Pages>, <Teletext$Cache>, and <Teletext$Config>;
      and the "netsetup" program to set them up.

      Updated the utility programs to use these variables. Couldn't remember
      where I put the C source (d'oh!) so had to do it at binary level...in
      !Edit. Damn, I'm good! Damn, I'm weird! :-)

      Wrote a small program in BASIC to disassemble the "Teletext" module and
      spit the results out to a file. Then spent a good three hours wading
      through it trying to tie up one bit to another. I plan to try to figure
      out how it works, so that I can create my own simpler module that may
      be supplied with the program.
      I have been giving the IIC module to people that email and ask very
      nicely (because Ground Control no longer exist, and the module is
      totally useless without the hardware), but the module isn't mine so
      that was never a karmically satisfactory solution.



1.28  07/07/2001

      Wanted to print the teletext frame telling me when the Tour de France
      would be on EuroSport. It took time, and the printer kept parking it's
      head after every line. That, erm, wasn't right.
      So I froze !Teletext and it whizzed along.
      Moral: More PowerTM isn't necessarily a Good ThingTM.
      You see, the RiscPC was polling so damn often, Teletext spend a rather
      considerable amount of time looking for a page that wasn't going to be
      found in a billionth of a second.
      So now it polls as often as it feels like, but it will only look for a
      new page every 20 centiseconds. In essence, this may mean that
      !Teletext may appear slower on services that cycle all the pages thus
      update very often. Don't worry, !Teletext will not skip your page. It
      simply takes the system loading from seventy-some percent down to a
      much more acceptable twenty-some percent.

      Began early work on the script interpreter. Removed all references to
      the Econet Server (and the hooks for it) and recycled the bits as the
      script interpreter permission.
      The script interpreter doesn't do an awful lot, but the framework is
      pretty much there.



1.29  08/07/2001

      Script interpreter day...

      Variable parser completed.

      Fixed stupid bug in variable parser - corrupted original string. Duh!

      Maths routines fixed and tested.
      Use "NumTest" script to test.

      Now disables menu entries when running a script. Weird stuff happened
      if you ran a script, then selected HELP from the menu, then used the
      keypresses to select a channel and page...or try to. :-)

      Branching implemented.
      Use "BranchTest" script to test.

      Made better (nicer?) error messages. Now keeps a line count to aid you.

      PROCscript_nullpollhandler (the parser, basically!) made somewhat
      re-entrant so it can deal with being recursively called to handle if()
      statements.
      Also, hooks put into the parser so it'll do nothing if poll-waiting for
      something, ie, a page fetch.

      Main number parser updated. Now as well as denary numbers, it will
      accept variables (returning contents of), or numbers in hex (prefixed
      by '&') or binary (prefixed by '%').
      God bless OS_ReadUnsigned.
      God bless mother nature.
      Or something...



1.30  12/07/2001

      Didn't work on !Teletext for the last few days. Instead, some odd
      god-forsaken idea entered my head.
      I have a 486SXL-40 co-processor in this machine, clocked at 33MHz. So
      why not get Windows 95 running on it?
      So I have the Acorn release of !PCx86 (not Aleph 1's !PC), and, well,
      a working Windows 3.11 installation.
      So off I go. It took half a day to work beyond the "Windows is
      checking your hardware, will reach 100%, then crash with a failed BIOS
      call". Hint: Disable checking for CD-ROM drives. And everything else!
      I think, in the end, I got it to be a system with no keyboard, mouse,
      CD-ROM, or anything.
      Windows installed LPT1 and COM1, both of which gave device errors in
      Settings->System. So I nuked them. Windows re-detected them and got it
      right.
      Set up the ARMDRV driver for Windows 3.11 because the one I have for
      W95 needs !PC version 2, or later, I don't have. Says device isn't
      working properly, but it appears to be.
      And there is no sound. Patched the SBE16 stuff into SYSTEM.INI, but
      Windows95 ignored it. No vendor install routine supplied. Merde!
      Still, it was running enough to install QuickTime and show me the
      "Thank You" video from Dido's CD...at about a frame every six seconds.
      :-) :-)
      It's a damn shame MovieFS isn't keeping up with these newer formats.

      Anyway... I'm going to knock up a little program to fit between my
      icon, and !PCx86, that will allow me to choose which 'system' I want
      to use. It's, um, annoying to keep renaming Config files, to then
      discover that you're booting the wrong thing 'cos you forgot to change
      it back.
      I still prefer Win3.11. W95 takes an awful long time to do anything.
      Okay, it looks nicer, but it burns so many cycles looking nice that it
      doesn't get stuff done in a hurry. :-)


      I had, the other day, put together some assembler that is capable of
      changing channels. I guess having a proper datasheet for the CITAC
      would be quite a boon, but alas it wasn't to be. Oh well.

      So... script interpreter day...

      Wrote exporter. ASCII export doesn't work correctly, as I switched off
      to watch La Tour de France.



1.31  14/07/2001 [Bastille Day]

      My (good) video camera tape transport gave up the ghost yesterday. I
      had a fiddle with it, but got as far as loading the tape. When I try to
      play the tape, or anything really, it doesn't move, the counter moves
      a place or two, and the thing then says "Oh bugger" (well, it flashes
      the eject logo, but it means the same thing).
      Pity I didn't bring the HandyCam...
      Being philosophical, I'm glad I taped the harvest, and the camera's
      service life is about half what I finally got out of it.
      Shame is, the CCD has only a few damaged pixels, but this isn't visible
      in normal use (only really shows up in low-low-low-low light mode).
      Damn.

      But, on the plus side, "Popular" returns to Sky One (replacing
      Roswell). Yippee!

      Fixed annoying bugette which showed up mostly when leaving a blank
      entry in the configuration defaults. This was due to a blank string
      passed to the OS evaluator. So now, if it is "", it is set to "0".

      Recoded ASCII export. It was stripping spaces in a copy of the line to
      see if the line was blank. What a stupid dimwit thing to do!
      So now it strips RIGHT HAND spaces from the line that will be exported.
      If the line is blank, then it's blank.
      A side effect is the output is tidier, and the lines aren't all 40
      characters wide.
      [nb: This is export in the script, not the SaveAs->ASCII dialogue, oh well]

      Command "omitline()" implemented.

      "selectframe()" implemented, before was relying on current frame being
      the...current frame. D'oh!
      Current frame now blanked when script started, so there is no left-over
      data.

      The "set <var> to <what>" command has been implemented, but not yet
      fully tested.



1.32  15/07/2001

      Laurent Jalabert won the stage of the Tour de France coming into
      Colmar. Being Bastille Day, something of an event for the French, made
      it doubly important. (this was, obviously, yesterday!)
      Sadly, some asshole decided to crash his car through two sets of
      barriers, knocking two police officers sideways, and one poor woman
      right up and over the car - somebody taped it, the world saw it. They
      say she had both her legs broken. Watching it, she's damn lucky if that
      is all that happened.
      [this is HTML, so...
       Click to see an animated GIF (50K).]

      Still, with that many cameras and things around, it'll be impossible to
      deny anything other than being drunk or high or whatever...

      The set() command is working, and tested. The "SetTest" script,
      amazingly enough, shows it in action.

      So, I need to code the if() and the frame fetcher and we'll be more or
      less complete. Yippee!

      The "Allow script" configuration now does something, and the scripts
      will not run if you have no caching.

      Defaults menu code altered so it undoes 'Hold' when selecting a frame.

      Just by pure chance I discovered on Sky One teletext, page 362, a
      'world clock' that updates every few seconds.
      [ Mmmm, now (28/07/2001) it is Sporting City Index... oh well... ]



1.33  16/07/2001

      Well! Eric Dekker (who mom fancies!) won the Tour de France stage
      yesterday. Nice one Eric!

      Okay, got the if() going. Only needed minor twiddles to the main parser
      to support the re-entrancy.
      The script "IfTest" shows the if() command in action. It also includes
      an example of severely nested if() statements - checking greater than
      25 by if not 1, if not 2, if not 3, et cetera.



1.33  17/07/2001

      Getframe[s]() still not implemented (oh dear, oh well!). However enough
      of the rest of the script is working to allow the "movietest" script
      to work. About bloody time, too! :-)

      Added 'lvar()' command.

      If ramdisc exists, then log messages.

      Single-tasking script mode. Oh, and it traps Esc too! :-)

      Tracked down and Raid'd [*] the annoying bug where appendframes() was
      getting all the frame counts screwed up. T'was a big crunchy bug.

      [*] To all the geeks out there, while "RAID" might be a form of
          ever-so-slightly-superior storage, that isn't what I meant.
          "Raid" is (also?) a brand of bug-spray. ;^)



1.34  20/07/2001

      Changed the easter egg lyrics. Apologies if the timings are not the
      same as your CD. For a change, I took and timed this from the 'video'
      on the german MTV:2 broadcast.

      Fiddled with the script parser, and fleshed out the documentation a
      bit.

      In the background, I'm reinstalling Windows95. It screwed up the
      registry. Well, actually I blame Aleph1. It was doing some installation
      of a software package which involved lots of thinking. And in the
      middle of it, it decided "PC card not responding - probably crashed".
      I feel, really, that should have a question like "Keep trying or give
      it the finger?" so you can decide to flog a dead horse if you choose...
      Give 'doze credit. It noticed that I had a copy of Windows already
      installed.
      For all people say Windows is advanced, they screwed up with the
      monolithic registry. All sorts of settings and options stored in one
      easy-to-corrupt file. Um. Yeah. Nice one.



1.35  28/07/2001

      Slight hiatus, hot weather, Buffy on Sky One, and the /willow part of my
      website to update.
      Okay, so my coding is a bit lackadaisical right now. I blame the
      humidity.
      Or something.

      Anyway, nothing really to report. Just did some internal code tidying
      and fixed a few bugs.



1.36  30/07/2001

      Star Trek on Sky One (I'm waiting for Buffy) has bizarre blocks up the
      top of the screen. Only a few pixels tall, and appear to be split
      (ie, the 5 x 4 block is 2 x 4, 1 x 4 blank, 2 x 4). They are moving in
      a fairly rapid sequence, but it isn't down enough to digitise it.

      Anyway, getframe() and getframes() coded and a script written to test
      this.



1.37  31/07/2001

      Amended if() handler to correctly handle aborts in the middle of if()
      like:
        if (A ! 1) error("Oh no! They killed Kenny!!!")

      Added 60 second timeout handler to DEFPROCscript_getframe code.

      Added character sets to on-line help (English, French, Swedish,
      German, Spanish, and Italian).

      Better resetting of system when iconbar icon clicked.

      Altered control panels to start in a default state more sensible.



1.38* 08/08/2001

      Script menu builder now filers out directories. :-)

      Script pre-init now reads the first 32 bytes of the file to assure it
      contains no control codes (except newlines).

      Viewer window keypress handler now passes on unrecognised keypresses.

      Script exit handler now disables page fetching. It didn't before (but
      it should have done!).

      Undated number parser to cope with negative numbers in scripts, for hex
      and binary values.


-.--  10/08/2001

      Teletext decoder dead (well, not dead, just the SAA5240P dead, which
      happens to be the Teletext processor, kinda important, huh?).

      Thus, sadly, this project has now been suspended. No new features can
      be added (unless really simple), and only non-interactive bugs
      can really be fixed.

      When I return to England, I'll advertise to see if anybody can sell me
      an old unit cheaply. Otherwise.....



1.39* 28/11/2001

      A simple fix, this...

      I have managed to get myself another Ground Control teletext receiver
      (thanks Steve!), but the hardware is slightly different to my previous
      receiver...
      There is no CITAC. The main teletext IC is a later version, and this
      takes on the facilities of the CITAC by doing the tuning for us. This,
      however, means the IIC module that I had would no longer work.
      Oddly enough, I had that same day discovered an IICttxmod within
      David J Ruck's GraphTask application. So I tried it.
      It worked! Sorta...

      Tuning was okay, page header fetches were okay, but for some reason it
      crashed (BASIC's corrupt R13 error) upon transferring the page.

      So I look at the module and think "No chance". A bit of lateral
      thought (who, me!?) later and instead the page transfer code is
      'wrapped' in a simple piece of assembler code which stores R13 prior to
      the SWI, and restores it afterwards. Problem solved. :-)


      Can YOU help?
      The SWI "TTX_TransferTSDP" tranfers the channel ID as seen on modern
      televisions when you change channel... This is at +20. What are the
      previous values? It /seems/ as if +0, +8 and +16 are fixed; while +4
      and +12 change as the program changes...?



1.40* 07/01/2002

      Following a disc crash, I've had to redo the code to work around the
      BASIC corrupt R13 error - easy enough.
      Not so easy is trying to track down the exact cause of the error!
      Why? 'cos the damn error has vanished! Oh well... :-)

      Cursor up/down will increase/decrease page numbers (in addition to
      +/-).

      New high resolution sprites, designed by Roger King.
      <rmking@gtonline.net>



1.41* 07/01/2002

      Two versions on one day. V1.40 was done ~4am in the morning, this being
      done in the evening... It's two different days to me!

      Fixed bug where main viewer window would load cached frames which may
      have been processed in some way.

      New time-setting procedure, so Teletext can set your clock more
      accurately - including the correct date.
      The 'error' margin is five seconds, either way.

      New commands for script interpreter, where you can (if the user has
      allowed it) control when your program polls.
        poll_disable()
          Disable polling - effectively switch to single-tasking mode.
        poll_enable()
          Enable polling - effectively switch to multi-tasking mode.
        poll_now()
          Cause a poll to occur, so you can control when and how your script
          polls. This is ignored if currently in full multitasking mode.
        poll_nomessages()
          Disable the output of messages to that little status window.
        poll_message("<message text>")
          Outputs a message to the little status window; optionally reopening
          and reactivating the status window, if previously disabled.



As of this point, I have left the UK and now live in France. I do not have
access to a phone line, so updates will be less frequent. I have also decided
that this is as good a point as any to change the dates to ISO 8601 form,
which is namely 'ccyy/mm/dd', in preference to the previous UK style dates.



1.42* 2002/09/10

      If receiver does not respond when you explicitly do something (ie, not
      the usual start-up 'not responding' message), then !Teletext will
      report this and enter off-line mode. This is primarily so I can do
      stuff with it while my teletext receiver is in England (in storage),
      but I figured it might be a useful thing.



1.43* 2003/01/08

      *STUPID* error fixed. Previously, setchar() would only set the first
      byte (ie, location 1,1).

      Calling setchar() 130 times (lines 5-18, rows 1-10) took 10 seconds on
      an ARM710, so the function smartclear() was added. It does more, and
      does it in a tenth of the time. :-)

      Added script function filewritestring().

      Added main menu option "HardwareTest". When called, this will try to
      read from the three primary parts of the teletext decoder - the EuroTTX
      chip, the video chip, and the tuner controller. What we read is ignored
      as we are looking for a yay/nay response.
      This was added so I could 'test' which parts of my dead decoder were
      up, and which parts weren't.



1.44  2003/04/18

      Hardware test now says "Your teletext decoder is responding correctly."
      if it is. Previous it didn't say "correctly", so it was 'ambiguous'.

      Palette adjustment only works in the 16-colour modes; so it isn't
      needed if you're in a mode with more colours. It now says this,
      rather than imply that you'd need to change to a 16 colour mode!

      Teletext now claims input focus when opened.

      When saving frames, if you save by pressing Return, then input focus
      will be returned to the viewer window. This means it /should/ be
      possible to work Teletext from the keyboard.

      New keypress ^Q to close the viewer window.

      If checking time, either manually or automatically, it will tune to the
      default channel first... It didn't for "check time at start". Duh!

      Some satellite channels don't send a TSDP. In this case you'd receive
      the old one. So time confirmations now take a little longer as Teletext
      fetches the TSDP twice and checks that it is valid (ie, that the time
      has changed).

      Now (un)sets DST when adjusting time. This works by comparing the
      received 'time offset' against the offset specified in your chosen
      Territory. So DO NOT use this if viewing European stations from the UK.
      If you live in Europe (not UK) and set your time off a station running
      to CET (ie, not a UK station), such as CNN on the analogue ASTRA, then
      ensure your time zone is set to +1:0 offset.
      This requires a valid TSDP time offset. Annoyingly, CNN simply said it
      was an hour ahead. Amusingly, the German MTV sent a properly formatted
      offset byte.
      If your DST setting is altered, then you'll be informed of this.
      Also... The offset broadcast must match one of your DST values (set
      by *Configure TimeZone ...).
      IMPORTANT: Provided that your Territory time offset is correctly set,
                 and you are setting your time from a station using the same
                 time system (ie, CET (+1) and CET (+1)) and that the station
                 sends a PROPER offset descriptor, then this should correctly
                 set your time and DST wherever you are in the world. :-)

      When asking if you'd like to update your clock, it shows you the time
      according to your computer, and according to teletext. Thus you can
      decide if it is worth updating the time, if it is a few seconds out or
      minutes...
      Just so you know, !Teletext does not consider your time to be 'wrong'
      if it is within +/- 5 seconds.

      Presets are now in a seperate window, kinda like an "address book" in
      an email program. They are now called 'Preferred'.
      You can add and edit by selecting entries, and you can use ^K in the
      viewer to store the page you're currently looking at.

      More sophisticated memory management for the preferred pages loader,
      so it can cope with practically any number of entries... It was tested
      with a generated file containing 65,536 entries. Yikes! The memory slot
      was pretty large, the file almost as large.

      Not a bug fix but a comment... Don't bother with the teletext CRC. Many
      broadcasters (esp. on satellite) just provide a dummy CRC. Ah well, so
      much for standards, eh?



1.45  2003/04/20

      Bug fix - now unsets configuration mode flag when saving the
      configuration... (this was introduced in v1.44 when the configuration
      stuff was rewritten because of the 'preferred pages' system).

      ^Select on the iconbar icon will open the viewer in the normal way,
      with the preferred pages list on top. This can also be used as a quick
      way to pop open the preferred pages list...

      The page header no longer says "P100" or whatever. It now says "100.4"
      where the page number is on the left, and the subframe number is on the
      right.

      Selecting a non-help-frame page will automatically 'unfreeze' Teletext
      after viewing a saved frame or the online help. Additionally, the
      display will clear to say "Searching for page xxx. Please wait..." so
      you know what is happening.

      Cursor left/right will step through the available subframes (as and when
      they are available). It will beep if a subframe could not be loaded.
      Note that the subframes but be sequential, like 1,3,4,5,6,9 and you're
      on subframe 5...you can only move from 3-6. To move the full range
      shown, you will need to wait for subframes 2, 7, and 8...

      When in autoscan mode, you can click Adjust on the iconbar icon to get
      a report of how far along the scanning is.



1.46  2003/04/30

      Cache list is now written into a window if you Shift-Select on the
      iconbar icon. The "list cache" menu entry lists the cache and loads it
      into !Edit, like always.

      You can double-click on any page (even expired pages) to view that
      page. As long as it is in the cache, you can view it.

      Altered the cache auto-deletion (for outdated pages) so that it flags
      deletion by setting the time bytes to zero. Previously it set ALL bytes
      to zero, which meant it'd no longer be possible to access that frame.

      The iconbar icon now changes to reflect what !Teletext is doing, a
      normal icon for normal use and an hourglass icon for when the script
      interpreter is being used. There's also a 'scan' version for auto-scan
      operation.



1.46  2003/05/02

      Bugfix: Now unsets 'hourglass' version of iconbar icon on script exit.

      Numerous updates to the script interpreter. The script language is now
      version 1.04 ( version() = 104 ).

      Floating point variables added to the script language. There are ten of
      these, Q to Z. Floating point results may be given up to eight decimal
      places (ie, '1.23456789') but you can use the new keyword "flatten" to
      make these numbers more managable.

      New script commands:

        abs( <var> )
          Converts the specified variable to absolute (+ve) form.

         appendline( <line>, <type> )
           Appends a line to the currently open output file. PLEASE NOTE
           that this is different to the appendframe commands in that it
           will take the specified line from the CURRENTLY LOADED frame.
           You do not need to specify a frame/subframe.

         channelid( <var> )
           Sets <var> to the current channel ID. For example, CNN is &804F.

         fileupdate( "<filename>" )
           Opens a file for UPDATE. The file pointer is set to the end of
           the file.

        filewritevar( <var>, <dp> )
          Writes the specified variable to the file. If a float variable,
          then <dp> controls how many decimal places it is output to. For
          integer variables, <dp> is an alignment value, the result will be
          padded with spaces on the LEFT to be <dp> characters. Thus,
          filewritevar(12, 5) would output "   12".

        find( <offset>, "<string>", <line> )
          Will look for the given string in the specified line, and return
          an offset to it if it is found, else 0.

        findend( <offset>, "<string>", <line> )
          Exactly as 'find()', except the offset is the byte AFTER the
          found string. This can often be more useful...

        flatten( <var> , <dp> )
          Will 'flatten' a floating point value to <dp> decimal places.
          ie:  r = 2.3333333
               flatten(r, 2)
               report_var(r)     <-- will report "2.33"
          This is done by truncating the tail. No rounding up is performed.

        mod( <dest>, <var1>, <var2> )
          Sets <dest> to the modulus (remainder, after division).
          <dest> = MOD <var1> / <var2>
          There is no corresponding "DIV" function (our div() is a full
          division). To mimic "DIV", direct the result to an integer
          variable.

         quit()
           Quits !Teletext. Use with care!

        readvalue( <variable>, <xpos>, <ypos> )
          Will read a value (integer or floating) at x,y and put it's value
          into the specified variable.

         showcachelist()
           Opens the cache list.

         showcontrols()
           Opens the control panel.

         showpreferred()
           Opens the preferred pages list.

         showviewer()
           Opens the viewer.

        sign( <dest>, <var> )
          Sets <dest> to:
            -1 if <var> is negative
             0 if <var> is zero
            +1 if <var> is positive

        sqr( <dest>, <var> )
          Sets <dest> to the square root of <var>.

        version( <var> )
          Sets the given variable to the script interpreter version, *100.
          For example, version 1.07 would be 107.

      You do not need to 'cast' float to integer, or integer to float. This
      is done for you. For example, the following is valid:
        set A to 123.456       <-- A = 123 as it is integer
        if (A = 123.456) [...] <-- equates true, the '123.456' is converted
                                   to an integer (123) as A is an integer.

      A way to finish a script nicely could be:
        [...script...]
        showviewer()
        showcontrols()
        showpreferred()
        terminate()
      This will end the script, re-opening the various windows.



1.47  2003/05/05

      More updates to the script interpreter. It is still version 1.04 as
      these were planned to be added, I simply didn't have time. :-)

      .labels are now 'prescanned', so you can branch from anywhere to
      anywhere. This was added because I encountered the following in one of
      my test scripts:
          .lineloop
            find(B,"NANTES",L)
            ; this is hienous.
            if (B ! 0) appendline(L,2)
            if (B ! 0) filewritebyte(10)
            if (B ! 0) add(B,15)
            if (B ! 0) readvalue(M,B,L)
            if (B ! 0) filewritestring("Temperature for Nantes : ")
            if (B ! 0) filewritevar(M, 3)
            if (B ! 0) filewritestring(", in Farenheit: ")
            if (B ! 0) set Z to M           ; make it floating point
            if (B ! 0) add(Z, 40)           ; 
            if (B ! 0) mul(Z, Z, 9)         ; the calculation is:
            if (B ! 0) div(Z, Z, 5)         ;
            if (B ! 0) sub(Z, 40)           ; ((((degC + 40) * 9) / 5) - 40)
            if (B ! 0) filewritevar(Z, 1)   ;
            if (B ! 0) filewritebyte(10)
      This can now be written as:
          .lineloop
            find(B,"NANTES",L)
            if (B = 0) go("nonantes")
              appendline(L,2)
              filewritebyte(10)
              add(B,15)
              readvalue(M,B,L)
              filewritestring("Temperature for Nantes : ")
              filewritevar(M, 3)
              filewritestring(", in Farenheit: ")
              set Z to M           ; make it floating point
              add(Z, 40)           ; 
              mul(Z, Z, 9)         ; the calculation is:
              div(Z, Z, 5)         ;
              sub(Z, 40)           ; ((((degC + 40) * 9) / 5) - 40)
              filewritevar(Z, 1)   ;
              filewritebyte(10)
            .nonantes
      Using this method, you can sort-of make multi-line IF statements,
      along the same vague idea as the always-loved "GOTO" command. See? It
      isn't so evil after all!
      [mmm, how many of my readers /got/ that?]

      The above is an example of the various new functions in a Teletext
      script. Yes, I am aware that CNN displays temperatures in both celcius
      and farenheit; it is more fun to work it out...though sadly I had to
      look in a Visual Basic (ick! ick! ick!) guide at the code used in an
      example program (ick! ick! ick!) as I didn't know how to convert C-F.
      However I have memorised this little calculation so I can save my soul
      and my sanity and not look at Visual Basic (ick! ick! ick!) in the
      too-near future. Thank Hecate and Diana for small mercies.

      There's another example script that finds out the value of:
        The (UK) pound
        The (US) dollar
        The Euro
      & The (Australian) dollar
      and outputs an equivalence chart for each, from 5eur to 100eur in 5eur
      steps. Yes, the base currency is euro. That's because my currency is
      Euro. If you prefer pounds, fiddle with the script.

      Script command:
         roundcast( <intvar>, <floatvar> )
           This casts <floatvar> to <intvar>, rounding to the nearest whole
           number, ie 5.8 would become 6.
           If you do not care about rounding, then:
             set <intvar> to <floatvar>
           does the same thing, rounding down. So 5.8 would become 5.

         userchoice( <var>, "<prompt>" )
           Gives the user an option in an 'errorbox' with OK and Cancel
           buttons. Sets <var> 1 if OK clicked, or 0 otherwise.

      One of my friends commented that, unusually, the target of the
      instruction is the first thing given. Well, this is because I am an
      ARM programmer. You specify the destination register first! <grin>

      Updated Script StrongHelp file. Also fixed the incorrect command
      "cache_insertdirectory()" - it's actually "cache_loaddirectory()"!

      When you type in a new frame number, it is displayed in the header.
      Additionally, 'Backspace' clears anything currently entered in case
      you enter an incorrect frame number. Previously it toggled 'Hold',
      this being a side effect of ^H and Delete/Backspace both being
      keypress code 8. Please note that ^Delete will be 'seen' as ^H.

      Polling reduced to twice a second (from five times a second) in
      normal operation. You'll notice this in headers that update very
      quickly, they'll seem to 'skip' a few numbers. This does NOT mean
      that your pages will be missed - only that we show you less changes
      to make the whole system more responsive.

      Now supports FLASHING text. Cool!
      The header is not 'checked' for flashing characters. The page body is.
      This works on saved frames reloaded, as well as live frames.



1.48  2003/05/09

      More additions to the script. It'll call itself v1.05 now.

         cache_loadnextentry( <var> )
           This will load the 'next' script cache entry. Set <var> to zero if
           this is the first call.
           On all subsequent calls, pass BACK <var> unaltered. You should
           check to see if <var> is -1 on return, which means no entry
           loaded and no more entries available. Do not assume anything about
           the value of <var>. It will somehow identify the 'next' cache
           entry, and it may change in a future release of the script,
           however the functionality will not be altered.
           The following shows how to whizz through all the cached frames:
             set F to 0
             .cacheloop
               cache_loadnextentry(F)
               if (F ! -1) go("cacheloop")
           The frames are loaded in the order in which they appear in the
           cache. If you prefer to specify known frames, then you should use
           selectframe() or selectframes().

         frame_number( <var> )
           This sets <var> to the frame number of the currently loaded frame.
           Normally <var> is set to denary, ie page 123 is 123. However if
           <var> is 16 on entry, then the output is in hex, page 123 = &123.

         frame_subnumber( <var> )
           This sets <var> to the subframe number of the currently loaded
           frame. Again, <var> may be 16 to select hex.

         There is no 'frame_' command to return a complete frame number. You
         may instead use the following:
           set A to 16
           frame_number(A)
           set B to 16
           frame_subnumber(B)
           lsl(A, A, 16)           ; frame = frame << 16
           add(A, B)               ; A = A + B
         Then, A is the complete &FFFxxSS frame number.
         Alternatively, you could do:
           set A to status(pagenum)
         which would have the same effect.
         frame_language( <var> )
           This sets <var> to the frame language, as follows:
             0 English
             1 French
             2 Swedish
             4 German
             5 Spanish
             6 Italian
           Anything unknown or invalid is assumed to be 0 English.

         frame_linkedto( <var> )
           This sets the variables to the 'linked' frames used for the
           FastText system.
           On entry, <var> should specify which link to read:
             1 - RED link
             2 - GREEN link
             3 - YELLOW link
             4 - CYAN link
             5 - Magazine index (undocumented)
             6 - Local index (undocumented)
           Normally output is denary. Add 16 to the above numbers if you'd
           like hex output.

         pushkey(<var>)
           Undocumented command to 'push' a keypress to the Wimp. This is
           useful for lists that are built up, as you can:
             ...write to the file...
             fileclose(A)
             ; assumes file is set to TEXT type
             oscall("Filer_Run <Teletext$Temp>.myfile")
             poll_now()
             pushkey(&1AE)
           What is happening is "myfile" is being built up. Then it is
           Filer_Run, which should load it into some sort of editor, this
           will probably be !Edit. The poll_now() ensures that enough
           polling time passes that we may be certain the file has been
           loaded into our editor, and that the editor has the input focus,
           at which point we'll send key code &1AE (Ctrl+CursorDown) which
           will make the cursor jump to the end of the file, and, hence, to
           the line we wish to read.

      Bugfix: The flashing page copier function now copies the tail data. Odd
              things were displayed when one frame thought it was in German
              and the other in English... :-)

      Bugfix: "set A to status(framenum)" was (incorrectly) returning the
              subframe number only. Fixed.

      Removed all unnecessary DIM statements, and amended the pointers to use
      currently unused bits of WIMP workspace (which is pretty much all of
      the WIMP scratch memory, when not actually doing WIMPy things). This
      should (hopefully!) cure any "Not enough room for function/procedure
      call" or "Too many nested structures" errors (which were due to running
      out of memory). I do so wish BASIC had a calloc()/free() style of
      memory allocation!

      1stWord+ output is now OvationDDL. It's output is a bit minimalist, it
      assumes the OvationPro defaults for a lot of things, and it inserts the
      teletext frame into those defaults. The body font is Corpus.Bold so all
      the things line up. With use of leading and fore/back colours, a fairly
      assurate representation of the teletext frame is created, except:
             The SAA5050 mosiac characters are not handled... at all.

      Character sets are supported in ASCII and OvProDDL output, and the
      character differences are mapped, as much as possible. For example, the
      left and right arrows are '[' and ']' and the up arrow is '^' (in
      English) as the arrow characters are not available. In, say, Swedish,
      they're converted to the appropriate 'local' character.
      This assumes OvationPro and ASCII are using the ISO 8859/1 character
      set. If you're processing the saved frames in a RISC OS application,
      either multitasking or singletasking, you'll not need to worry about
      this. If you plan to save the frames to a floppy disc and process them
      in a DOS application, then you'll need to consider that the standard
      DOS character set is different.

      No such conversions are performed for ANSI output. It'll try to render
      the mosaic characters, but it completely ignores the frame language.
      You might be better off using ANSI output for DOS?
      If you have loaded ANSI.SYS in your boot sequence, you MAY be able to
      view teletext frames saved in ANSI, under DOS, by simply TYPEing them.
      Your milage may vary...

      No longer defines the "file_af8" sprite... We don't output 1stWord+
      any more.



1.49  2003/05/13

      The script interpreter remains at version 1.05, because I don't fancy
      altering the StrongHelp documentation...again.

      Script commands "appendframe", "appendframes", and "appendgivenframe"
      can now accept a third output type, "3" for OvationPro DDL output.

      However, they do not create a 'valid' OvationPro DDL file. To do that,
      you need the following new commands:
        filewriteovnhead()
      & filewriteovntail()

      Thus, to output an OvationPro DDL file, you would:
        filewrite("<path>")
        filewriteovnhead()          ; must be the FIRST thing you output
        ; output the frames, ie:
        ;  appendframe()
        ; in a loop, or whatever
        filewriteovntail()          ; must be the LAST thing you output
        fileclose()
        filetype("<path>", &B25)
      In the commented middle section, you can output strings and bytes if
      you know the OvationPro DDL script.
      The header output is a minimal header. It basically says "this is a
      DDL script, and these are our colours". Everything else: page size,
      styles, etc is left to OvationPro. If you would prefer a better format
      (like a page that fits the frames) then you'll need to NOT use the
      "filewriteovnhead()" command, and instead output your own header. It
      won't be a 'trivial' thing to do, in !Teletext script, but it will be
      possible. :-)

      New command:
         filewritefloat( <var>, <left>, <right> )
           This outputs a formatted floating point value to the current file.
           The <left> value specifies how many digits are on the LEFT of the
           decimal place. If there are fewer present, the number is padded
           with spaces on the left. If there are more, the leftmost numbers
           are truncated and replaced with a '…' character.
           The <right> value specifies how many digits are on the RIGHT of
           the decimal place. If there are fewer, the number is padded with
           additional zeros. If there are more, the number is truncated.
           If you pass an integer variable, it is displayed in the same way.
           Example:
             If Z is 1234.5678, then:
               filewritefloat(Z,4,2)  outputs "1234.56"
               filewritefloat(Z,2,2)  outputs "…4.56"
               filewritefloat(Z,3,3)  outputs "…34.567"

      New redraw system! Whee!
      Now the teletext frame will auto-resize itself when you alter the
      horizontal size of the viewer window. It will shrink down to a third of
      it's original size (and still remain readable). Thus, you can make the
      teletext viewer small and push it to a corner of your screen.
      Nice, huh?

      New command:
         call( "<label>" )
           Calls a label, like go(), remembering the return location.

         return()
           Returns from a 'call()'.



1.50  2003/05/24

      Now writes "* !Teletext is frozen *" into the start of ALL frames, if
      Teletext is frozen. This is a reminder, in case you're looking at
      previously-cached frames...

      Now you can't do 'cache operations' if your cache is not configured.
      This takes immediate effect (ie, if you have a cache and then configure
      no cache, you can't access the cache you previously had...however you
      can re-enable your cache to get the previous cache back again (well, it
      makes sense to me!)).

      Most things are now loaded from the Messages file. The exceptions are
      'undocumented' things, the preferred/cache lists, and the script
      interpreter messages.

      Minor modifications to the timing system to allow flash and update
      delays to be both fully configurable and, in active use, fully
      independent. It is possible, for example, to set the normal check-and-
      -update loop to work every 50cs, but have the flashing text blink with
      a 20cs period (ie, 10cs on, 10cs off).
      Note that when 'frozen' (ie, when viewing saved pages 'offline'), the
      minimum flash rate is limited by the flash poll rate. When not frozen,
      the minimum flash rate is limited only by the rate your computer polls
      Teletext.

      Fixed bug where sometimes a quote character would be missed in script
      parsing, so strings would have spaces stripped, or you'd would get
      occaisional "missing ," errors...
      You ought to be able to put any sorts of spaces in scripts now, like:
        find(A,  "quelque-chose"  , 12)
      :-)

      Now when you abort a script, it aborts quickly (like, then and there
      and not when it felt like it!).



1.51  2003/06/22

      I had a bug report that the preferred pages system did not change the
      channel. Erm... It does... The only thing that MAY have been the cause
      of the problem is that it didn't update the global channel value, so
      any subsequent operation may have reverted to the previous channel...

      Still, on the plus side, I got that bug report direct by SMS (thanks to
      John Williams for that!). If I could be sure that I'd not be woken up
      at strange times by my phone's loud beeping, I'd say that would be a
      cool way to pass on reports and comments. Anybody who has an older
      Motorola phone (like the C520) will know what I mean; SMS ain't subtle!

      New 'status' macro, "day". This will ATTEMPT to return the current day
      of the week as a number from 1 to 7. Please note that I have put in
      some basic code to return the results as 1 for Monday, through to 7 for
      Sunday (it seems the OS likes 1-Sun to 7-Sat). However it will ONLY do
      this conversion if the start-of-working-week is '2' (which would be
      Monday in the OS style week). If your territory has something else,
      like your working week is Tuesday to Saturday, it will not try to make
      any conversions. Yes, it would be easier to use OS_Word and simply
      fudge the BCD values returned, but that is using a 'deprecated' call...
      Anyway, scripts can now do certain actions on a weekend, and other
      actions on weekdays, or whatever. Refer to the !startup script for an
      example.

      Because the previous script interpreter had been released, this version
      is 1.06. <-- NOTE

      The script interpreter NO LONGER flags previous script pages as
      'deleted'. Now the 'script' flag is removed, so they appear as normal
      pages (and hence will be ignored by the script interpreter).

      The script interpreter's "getframes()" should now cope correctly with
      broadcasters that output subframes twice each time around - like some
      pages on MTV. For example:
        303.1 303.1 303.2 303.2 303.3 303.3 (etc)
      As a side effect of this, the status window now displays "Fetching
      frame(s) xxx", the "(s)" meaning it is waiting on several. Additionally
      you will see a number following, in brackets. This is the subframe of
      the last fetch, so you can see how far it has fetched.

      Bugfix: appendgivenframes() now correctly exports OvationPro format.

      If a script called "!startup" exists, !Teletext will ask you if you
      want to run it when it initialises. It may APPEAR that the "OK" icon is
      highlighted, but pressing Return takes the "Cancel" action (and, thus,
      pressing Escape takes the "OK" action). This is exactly what happens on
      my system (RISC OS 3.70 / Wimp 3.98) and I'd just like to point out
      that my first three ReportError flags are set: namely, "OK box, Cancel
      box, Highlight the Cancel box". It is obeying the "Cancel" highlight
      option, but it is not displaying the correct icon. I know not why...
      [...probably some stupid patchette or other is screwing it up...]

      Due to a user-suggestion by SMS (!), I have added basic email and web
      links. If the Acorn URI module is not found, a Fresco-style message
      will be broadcast. Please note that NO further processing will take
      place - you should have your browser loaded.
      *Lightly* tested with:
        Fresco 2.26/3.20
        Browse 2.07
        Oregano 1.10 JS
      Only the HTTP URIs worked with the browsers. It is expected that good
      mail clients will pick up on mailto: URIs. I know that my QuickVoy
      should, as should my Emily; also Argo's Posty. However I don't have any
      email software to hand right now (it's all on the other harddisc which
      is not connected!).
      Several assumptions have been made:
        1. If a line contains an '@', then the text either side is read. If
           it is unbroken and contains a '.' then it is assumed to be an
           email link:   this is some text rick@here.net etc
           Clicking on 'rick@here.net' will construct a mailto link for
           'rick@here.net'.
           Also supported is the construct of using "(at)" or "<at>" instead
           of an '@' symbol - this is mainly used by the German broadcasters
           as they don't have an '@' in their character set (it's an s-shaped
           thing instead).
        2. A line, when clicked, is read. If it contains "www" or a
           recognised suffix, then it is assumed to be some sort of HTTP link
           and is reassembled as best it can be.
           Valid suffixes are:
             .com  .co.uk  .uk.com  .org  .fr  .de  .tv
           The following URIs would be understood:
             http://www.heyrick.co.uk/      -> http://www.heyrick.co.uk/
             www.heyrick.co.uk              -> http://www.heyrick.co.uk
             heyrick.co.uk                  -> http://heyrick.co.uk
           It is important to note that THE FINAL EXAMPLE WILL PROBABLY FAIL
           because my website is WWW.heyrick.co.uk; however without doing our
           own DNS lookups, it is not viable to determine if a "www." should
           be prefixed or not. Consider "uk.imdb.com". There's no "www", but
           it is valid...
      This is because of the line length restrictions in Teletext, such links
      are often rather terse. Alternative transports are NOT supported, so
      "telnet:" and "ftp:" links will probably fail. Still, I've yet to see
      one in a teletext frame...
      If you regularly need to access a link with a different protocol, like
      "ftp://" or a different suffix, like ".arp", get in touch. It isn't
      difficult to add support for this/these.

      Brought back Alyson. A tiny 'fix' in the clock-checking (if the decoder
      was 'off' (as in 'not in use', not switched off!), it'd be reactivated)
      which caused the screen to be blanked. Oh dear!

      The text that pops up when you re-open a closed viewer window (the
      "Searching for page xxx.", "Please wait..." now occurs when you
      unfreeze.

      New WIMP message, &51C46. This is part of the message block allocated
      to me for "BudgieMgr"; however by using an extra marker word, I can
      make the block &51C40-&51C7F support 64 different applications!
      Here's the message allocation:
        block%!16 = &51C46
        block%!20 = ...

        Messages TO Teletext:

        0  - Teletext_Enquiry
             If Teletext is present, it'll reply with message 20.

        1  - Teletext_RunScript
             $(block%+24) is the null terminated name of the script to run.
             The script MUST be present in the Teletext scripts directory.
             Begins running the script if it is found and is not already
             running a script.
             Teletext replies with message 21.

        2  - Teletext_Channel
             block%!24 = New channel (1-9)
             block%!28 = 0
             This selects a channel. If you want to retune the channel, set
             block%!28 to a value from 21 to 69 (the UHF channel). The fine
             tuning value is set to zero.

        3  - Teletext_FindPage
             block%!24 = Page number in &xxx form (ie, p100 is &100 not 100).
             This sets Teletext searching for a page.
             Teletext replies with message 23 when page found.

        4  - Teletext_TransferPage
             block%!24 = Pointer to 1080 byte block to transfer page into.
             This transfers the current page into your memory block.

        5  - Teletext_CacheOp
             block%!24 = Cache tidy operation:
                           0 - Tidy the cache (remove expired pages).
                           1 - Flush the cache (remove EVERYTHING).
             This performs operations on the Teletext cache.

        Messages FROM Teletext:

        20 - Teletext_Status
             block%!24 = &58545452 ("RTTX"), check word.
             block%!28 = Teletext version * 100
             block%!32 = Script version * 100
             block%!36 = Current channel (1-9)
             block%!40 = Current page simple (&xxxyyyy form)
             block%!44 = Flags:
                           bit 0 - Set if running a script
                           bit 1 - Set if in configuration mode
                           bit 2 - Set if browser is open [not implemented]
                           bit 3 - Set if cache is in use
             This is sent in response to a Teletext_Enquiry request.

        21 - Teletext_RunningScript
             $(block%+24) = Name of script being executed (in TtxScripts).
             This is broadcast when Teletext runs a script.

        22 - Is not used.

        23 - Teletext_PageFound
             block%!24 = Page number, in &xxxyyyy form.
             This is broadcast whenever a page is downloaded.

        24 - Is not used.

        25 - Is not used.

        The message system is primarily to allow you to write simple programs
        to fire off scripts at certain times, like fetch the news hourly, and
        the channel/page stuff was added for good measure. Channel changes
        and page requests behave as if you typed them into the viewer, or
        clicked the control panel - they are NOT transparent activities.
        The replies are broadcasts. No reply, except Teletext_Status is sent
        back specifically to the callee.

        The messages TO !Teletext have been tested, those back FROM !Teletext
        have not been tested yet.

        Please note that !Teletext will NOT include a 'cron' or 'alarm'
        system. There is plenty of software that can run a task at a defined,
        possibly repetetive, time...and it isn't difficult to cobble together
        an application to fire off the appropriate Wimp messages. See the
        "WIMPmsgEX" program within the Utilities directory for an example.

        I had some more suggestions, so I'll answer them here...
          Q. The position of the windows should be saved.
          A. The Wimp core was devised in the days before I got my head
             around the WIMP window positioning (some might say that whether
             or not I can get my head around it these days depends entirely
             on how much Rosé D'Anjou I've had in the hour(s) prior...!).
             Anyway - most of the windows are opened as-is. If you'd like
             them to open in a specified place, use a template editor (I
             suggest TemplEd) to position the windows, then save the template
             with the new window positions...
          Q. "The keypad or control pane is really too large, I would suggest
             scaling it down so that all icons are available without having
             to scroll the pane."
          A. I think the only item that, really, should be visible but isn't
             is "Save frame". Again, a moment with a Template editor should
             fix that. :-) The A-F are rarely used, as is local index and the
             like. Did you know that you can control Teletext from the
             keyboard? Everything is available by keypresses - it is SO much
             easier than mouse-clicking!
             As for the size of the keys... Again, a template editor will
             allow you to fix that. I, however, come from the Argonet school
             of thought - icons should be big and bold and obvious, not like
             those sculpted-stone effect things that all look alike! I've had
             enough grief with tiny keys to do me a life time... like the
             keypad on the "Bush box" and, well, pretty much every remote
             controller made in Japan. :-)
          Q. "Clicking on a page number in double-height text doesn't always
             work on the first click, sometimes two or more clicks are
             needed."
          A. Actually, this happens because !Teletext 'reads' the frame to
             determine the page number desired, BUT, a number of services
             only write the top of the number, like:
               <141> Some double height text 123
               [...this line should be blank...]
             This is slightly different to the RISC OS implementation of
             MODE 7, as shown by:
               10 MODE 7
               20 PRINT CHR$(141)+"Some double height text 123"
               30 PRINT
               40 END
             The only way to make it work is to copy line 20 in line 30; you
             can make some interesting results by making the two lines say
             different things!
             [thought...what does the original SAA5050 do?]
             Anyway, the answer - always click on the UPPER half of any
             double-height numbers. This, however, has been added to the Wish
             List, and should be implemented in due course...



1.52  2003/06/29

      New script commands, script interpreter 1.07...

        "set <var> to status( <blah> )" can now accept:
          shiftkey
          ctrlkey
          altkey
        And will set <var> to '1' if the given key is down, else '0'. You can
        see an example of this in the "!startup" script provided, where it
        will only do certain things on certain days UNLESS you hold down the
        ALT key when the script begins (using 'Z' as the flag).

        Status can now be assigned to floating point variables.



1.53  2003/08/09

      The Teletext driver module does not appear to support "black text",
      and RTL II's teletext service uses it a lot; additionally RTL II sets
      the background to black using:
        {select colour 'black'}
        {set background to selected colour}
      instead of:
        {set background to black}
      Obviously, again, the RTL method doesn't work.
      Therefore there is a new configuration item "Patch out black text",
      which does the following:
        * If the received frame tries to set BLACK text upon a WHITE
          background, Teletext will make the text BLUE.
          This works for the mosiac characters too.
        * If the received frame tries to set a BLACK background using the
          {set colour}{set background}, Teletext will replace this with
          the {set black background} code.
      This is provided as an option because:
        * There is an 'issue' with incorrect flashing the first time this
          frame is encountered. As I'm working around a "potentially broken"
          teletext service - there IS no "Alpha Black" and "Mosiac Black" in
          the official Level 1 teletext specification. It was introduced
          with Level 2; and it seems bizarre (if not foolish) to utilise a
          feature that does not degrade 'safely', this I consider the
          service to be 'broken'. Additionally, because of this, I do not
          intend to spend much time on this problem, the other channels that
          I read to not show this behaviour.
        * All of this alteration logic needs to be performed for every single
          character in the teletext frame. This might be fine on a StrongARM,
          but those with slower computers might prefer to leave it disabled
          until it is required.
          [how to tell: large areas of the screen appear blank white; and
                        when you "save as text" there's stuff there!]

      Better detection of when teletext receiver isn't turned on... Also now
      aborts if teletext receiver is off, so doesn't ask dumb questions like
      "Want to run the startup script?". :-)

      Teletext will now pick up on pages that are double-clicked upon; which
      includes the self-launch method.



1.54  2003/09/10

      Now no longer chokes if you click on "Script" in the viewer menu,
      instead of clicking on a script name.

      Preferences can now be sorted by:
        Channel, Page
        Page
        Name
      Sorting, once done, is not reversable; a sort is a sort is a sort...
      ...sort of.
      :-)

      The print-palette preview now works. It was disabled after the changes
      in how the frame was redrawn...
      Now, click on one of the Print->Image options with ALT held down and
      the frame will be redrawn with the selected palette. Hold down ALT to
      view it (everything else will freeze) and release ALT when you're done;
      the frame colours will return to normal.
      This 'hidden' feature may be useful to judge the most effective way to
      print a frame, typically:
        Enhanced - Colour printer, where you don't want to waste a lot of
                   black ink
        Normal   - Colour printer, for people with money
        Inverted - Suitable for monochrome printers, looks quite good on an
                   inkjet, and also via ArcFax. :-)
      Read "!Teletext.Resources.TechNotes" if you'd like to tweak the colour
      mappings used.

      Rewrote the "unlock" utility in pure-hand-crafted assembler. :-)
      The original C executable was 7648 bytes long, my new one is just 1132
      bytes - and it gives more helpful error messages. :-)



1.55  2003/11/13

      Now supplied with later version of Teletext module. This one is,
      properly, a version of the Teletext+ module - however it has been given
      the old name and SWI chunk for compatibility with my software.

      The hardware test will now check to see if there's any response from
      my parallel IIC driver during a hardware test - so you may use either
      the normal IIC or my PtrIIC driver.

      Please note - in order to not crap up Colin's module with support for
      "Yet More Hardware", you'll need to patch it manually if you plan on
      using the parallel IIC gubbins. The patch is REALLY simple - a little
      program (supplied with the PtrIIC module) will load the Teletext module
      and convert all:
        SWI [X]IIC_Control
      to:
        SWI [X]PtrIIC_Control
      and then pop the module into memory. It works just fine...

      One of the "unable to load requested frame" errors terminated the script
      instead of ignoring the request - it now ignores, like it should.

      If you hold down ALT while starting a script, the cache contents will
      not be made "non-script". Normally you should NOT do this, however if
      you've waited ten minutes for page fetches and then something goes wrong
      you can patch a 'goto' into the start of the script, to resume where it
      left off, and then run the script with ALT held; et voila!


      I've been promised an "old" teletext receiver. I believe it's the old
      Acorn one. I mentioned this to Colin, and (from memory, from an email I
      read two weeks ago (!)), he seems to recall it having a rather direct
      (possibly interrupt driven?) interface to the BBC micro. I guess this
      may have been the Tube or the 1MHz bus. I'm not losing ambition yet, as
      I can imagine it is either:
        1. The EuroCCT
      or:
        2. The older "first-generation" receiver with the VIP SAA5030, and
           the SAA5040 TAC. Whether or not the SAA5020 TIC is present depends
           on how much they figured was possible using the BBC micro - given
           the necessary preciseness of the timing elements of the VIP2 and
           the EuroCCT - I'd guess they'd include a TIC for their TAC (okay,
           that sucked as a joke...).
      I am not aware of any non-IIC teletext hardware, and - between you and
      me - if I wanted to implement IIC on a BBC micro, bit-bashing the 1MHz
      bus will surely allow greater flexibility than using, say, the User
      Port.



1.56  2004/01/25

      Now allows you to access the cache while the receiver itself is not
      switched on. It'll complain (a lot) that the receiver is not on, but if
      you click on the !Teletext iconbar icon while holding shift, the cache
      window will appear...

      Using cursor Up/Down for next/prev. page now switches off 'hold'.

      If the cache is empty when a script started, it would abort with the
      error "File is too big" (!). This problem has been fixed.


1.57  2004/02/10

      Flash detection now uses TTXHelper.

      Removed "patch out blacks" as driver module now supports black itself.
      Thanks Colin! :-)

      Text export now uses TTXHelper. This is the saveas dialogue, NOT the
      script. Script support, ANSI, and maybe OvationPro stuff will be added
      in the future.

      Fixed strange double-height-in-header 'bug' when selecting frame.

      Fixed "unknown or missing variable" bug in hardware test.

Return to !Teletext index
Copyright © 2004 Richard Murray