Introduction
------------

VCRplus is a generator of codes generally found in the TV
newspapers to simplify the video cassette recorder programming.
These 1 to 9 digit codes are named VCR+ Codes' in the 
US. VCR+ is the US version of the system called 
ShowView in Europe or VideoPlus in UK.

The goal of the system is to make the programming of a video
cassette recorder as easy as the use of a phone number:
just type the number. The code is a cryptographic 
combination of the day of the month, the channel number,
the start time and the duration of a TV program.

Small codes correspond to common timeslots and channel 
combinations. Longer codes are used for more unusual ones. 
Currently this program is only able to generate 1 to 6 digit codes
and if the given TV programme requires a longer code, 
an approximation algorithm tries to do the best to satisfy
the request.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ShowView, VCR+ and VideoPlus are trademarks of Gemstar Inc. 
and the code generation is copyrighted by Gemstar Inc too.
This program has been developed for Pilot programming research
only and must in no case be used with a commercial
intention.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Usage
-----

To generate the code corresponding to a TV program, just
enter the start time, the duration, the channel and the
day of this program, then tap the Encode button.
Valid entries are:

Start: HHMM where 0 <= HH < 24 and 0 <= MM < 60
Duration: D where 0 <= D <= 300
Channel: C where 1 <= C < 64
Day: d where 1 <= d <= 31

If the specified day is smaller than the current day, the
code is meant for the next month.

If VCRplus does not find an exact mapping for your entry,
it will try to find a code that still fulfills your
requirement. In this case, the best approximation of the 
time and the duration are displayed with the code.

Problems
--------

It is rare but possible that VCRplus finds a mapping but
is not able to encode it. In this situation you will be
informed with an error message.

Conclusion
----------

Have fun with VCRplus.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Credits
-------

For obvious commercial reasons, the details of the
encoding algorithm have never been revealed by the authors.
However in 1991, the US version of the system (VCR+) was 
partly broken by Ken Shirriff, Curt Welch and Andrew Kinsman.
They publish a technical paper and the corresponding source
code about their work on the Internet. In 1994 Steve Hosgood
extends this research to cover the UK version: VideoPlus.
Finally I decide to attack the European version: ShowView,
but after having discovered the bit shuffling algorithm,
i.e. one of the two differences between the US, UK and the
European versions, I realized that Daniel Minder had already
completed the work and with his permission I just recycle
his research on the start-duration lookup table, i.e. the
second difference between the different versions.

Today nobody has discovered the coding method for the 7 to 9
digits codes, but this challenging task is under 
investigation ;-) .

Originally my first objective was not cryptographic 
researches but just to write my own Pilot application. It
would not have been possible to achieve it without the 
big work of the Alternative Pilot SDK (Win32-gcc, pilrc, 
copilot, bmp2res) authors. Thanks to all of them.


//=============================================================================
// Copyright (C) 1997, Laurent Chardonnens
// All rights reserved
// 
// This software may be freely copied, modified and redistributed
// provided that this copyright notice is preserved on all copies.
//
// You may not distribute this software, in whole or in part, as part
// of any commercial product without the express consent of the author.
//
// There is no warranty or other garantee of fitness of this software
// for any purpose. It is provided "as is".
//-----------------------------------------------------------------------------
