regionset -- reads/sets the region code of DVD drives
-----------------------------------------------------

regionset allows you to check and set the region code of DVD drives.

What the hell are region codes?
===============================
Video DVDs contain most often a region code flag indicating the geographical
region where the DVD was published (enabling the film industry to control
the distribution). There are eight region codes possible, currently six
are used:
  1  North America (USA and Canada)
  2  Europe, Middle East, South Africa and Japan
  3  Southeast Asia, Taiwan, Korea
  4  Latin America, Australia, New Zealand
  5  Former Soviet Union (Russia, Ukraine, etc.), rest of Africa, India
  6  China

On delivery, the Region Playback Control (RPC) of most DVD drives is
unconfigured (bitmask=0xFF). The drive firmware allows you to change the
region setting, but on all drives with hardware RPC (Phase II drives) you
are limited to five (5) changes. After the fifth change, the region setting
is permanent -- on some drives you can upgrade the drive firmware and have
then additional five changes, on other drives you won't be able to change
the region setting any more.

There are a couple of region code free DVDs on the market, but some drives
will deny playing them without configuring the RPC to a region first.
After setting the region, the drive will refuse playing any Video DVD (maybe
also Audio DVDs, I never had one to try out) with a different region
code than the one configured in the RPC.

So if you set a DVD drive to region code 2 (RC2), you'll only be able to play
region-code-2-DVDs from Europe, Middle East, South Africa and Japan -- the
drive will definitively not play any US or Canadian DVD, nor Austrailian or
Chinese. So if you cannot play a DVD because of the wrong region code, there
is nothing the DVD player software can do about but changing the region code
of the drive if you have any changes left.

So always be very very careful changing the region code, it could be your
last try before you're forced to buy a new drive (or play foreign DVDs
forever).

Installation
============
Just unpack the package (you probably already did if you can read this file),
then call "make". After compiling, you'll find the binary "regionset" in the
directory which you should copy to /usr/sbin (as root, of course)

How to use the programm
=======================
You need write access to the DVD drive, either by group or by being root.
The more, there absolutely definitively and in any case *must* be a readable
Data CD or Data/Video DVD in the drive -- it does not matter if it's your
favourite Windows CD, a video or a DVD with your last backup.

By default, regionset will use /dev/dvd to find your DVD drive. You can
adjust this by entering the path to the DVD device as first command line
parameter (please absolute path!).

If everything goes well, regionset will show you the current region code of
the drive, how often it has been changed and how many changes are left.
If there are any changes left, it asks for the new region code (see table
above). After confirmation, the new region code will be set -- if you enter
the same region code as the current one of the drive or just break the
programm, regionset will just exit without setting the new code.
On successful change of the region code, you'll get a confirmation.

The Credits
===========
regioncode.c was written by Christian Wolff <scarabaeus@convergence.de> of
Convergence and published as part of the package dvd_disc_20000215.tar.gz on
the Convergence homepage. Due to changes of the german copyright law, the
package was removed because it had some relations to CSS and copying DVDs.

There were no mirrors (at least none I could find), so I decided to pack
regionset.c and a CSS free version of the UDF functions together and
redistribute it. Oh, I reworked the user interface, fixed some bugs and
did some changes to avoid compiler warnings.

Hope you find the tool useful,
Sincerely,
  Mirko Doelle <cooper@linvdr.org>
