The Microsoft Windows family of operating systems have built-in support for initial selection and subsequent changing of the DVD drive region. DVD region selection under Windows is a result of the region setting in the DVD-ROM drive and the decoder.
Decoder manufacturers, PC system manufacturers, and application developers have raised questions about the DVD region selection method: how it works, and why it exists. These questions are addressed here by stating how region selection is supported in Windows. This article also illustrates how to use the region change features from within DVD playback applications. The information in this article does not apply to Windows 95.
| Sources of DVD Region Information | |
| What DVD Navigator Does | |
| How the Region is Set | |
| Subsequent DVD Region Change | |
| How to Use Windows Region Change Support |
Various sources of DVD region information work together to determine the region for DVD-Video playback on a Windows-based PC.
DVD Discs. Most DVD-Video titles are marked for a specific region. Some titles can be played in multiple regions while some others can be played in all regions. A byte on the disc is reserved for region codes, with each bit representing a region. If a bit is set to 1, the disc is not allowed to be played in the corresponding region. A disc with all bits cleared to 0 will play in all regions. Note that drive, decoder, and system region settings use an integer value, not a flag bit.
Regions 1 through 6 were defined in the original DVD-Video specification. Region 7 is currently undefined. Region 8 was added in 1999 for special venues, such as airplanes. DVD-ROM discs (those with no video zone) should not contain any region coding.
DVD-ROM Drive. Every CSS-licensed DVD-Video playback device must be set to a single region. There are two types of DVD-ROM drives:
| • | RPC Phase 1 (hereafter referred to as RPC1). RPC1 drives do not have built-in hardware support for region management. For these drives, Windows maintains the region change count information, and the region can be set only once. |
| • | RPC Phase 2 (RPC2). RPC2 drives maintain the region change count information in hardware, and in general the region of such drives can be changed up to five times by the end user. |
DVD Decoder. Some DVD decoders (hardware or software) are preset for a specific region. Generally speaking, the user cannot change the decoder's region. The decoder is not involved in the initial region selection, or in subsequent changes, but the decoder region is checked during playback and must match the disc and the drive.
The Microsoft DirectShow DVD Navigator (DVDNav) uses the following method to check regions when playing a DVD-Video disc on a PC:
DVDNav gets the disc's region bits (disc_regions), drive's region (drv_region), and decoder's region (dec_region)
If disc_regions is all regions then Play the disc Else [the disc is not for all regions] If the decoder has a preset region then If dec_region matches a bit in disc_regions then Error: Can't play the disc on the current DVD configuration // Otherwise dec_region matches disc_region => proceed If drv_region does not match a bit in disc_region then DVDNav detects a need to change the drive region and invokes the code to do so If the allowed number of region changes has been exhausted then The region change attempt fails and the title can't be played on that system. Else [region change succeeds] Play title Else [drv_region matches disc_region] Play title
Initial DVD Region Selection
Some PC manufacturers have expressed interest in setting a default DVD region before shipping the PC to customers. Microsoft created registry key mechanisms to enable this. The OEM can set a registry key containing the default DVD region for the system. On first boot, the drive region will be set to this value. For RPC1 drives, the region is managed by the operating system. For RPC2 drives, the region is set in the firmware of the drive.
It is the responsibility of system manufacturers to select a default DVD region for the DVD drive in PCs they ship. If the manufacturer does not set the default region, Windows will pick a region during first boot or first disc playback based on settings such as locale, language, and time zone. There is no interaction with the user during initial region setting. If there is no disc in the drive, or if the disc has multiple regions (including an all-region disc), the resulting region setting might not be appropriate for the user.
Initial Region Selection in Windows 98
In Windows 98, the following registry key should be created and set to the desired default DVD region for the system:
HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion \DefaultDVDRegion (binary)
OEMs using OEM Preinstallation Kit (OPK) builds can add this value to the registry during an "audit mode boot," so the end user never sets the initial region. The alternative to setting the default region using a registry key is to play a single-region disc after initial boot.
For an RPC1 drive, when the first disc is played back, Windows 98 sets the region for the drive. If there is no default region, Windows selects a region. If the disc allows the initial region, then the drive region is set. If the disc does not allow the initial region, the lowest numbered region on the disc is used to set the drive.
For an RPC2 drive, when the first disc is played back, Windows 98 sets the region for the drive if it is not already set. If there is no default region, Windows selects a region. If the disc allows the initial region, then the drive region is set. Otherwise, the lowest numbered region on the disc is used to set the drive. This will use one of the allowed region changes in firmware. Once the initial region is set for an RPC2 drive, it is not changed by a reinstallation or clean installation of the operating system.
If the user installs a new drive later, the same procedure will take effect.
Initial Region Selection in Windows 2000/Windows XP
In Windows 2000/Windows XP, the following registry key should be created and set to the desired default DVD region for each DVD-ROM drive:
HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ Control\ Class\ <CDROM GUID>\ <instance number>\ DefaultDVDRegion (binary)
Because there may be multiple DVD-ROM drives, the proper way to set the keys is to enumerate all devices of class CDROM (using the GUID), then iterate through each one, setting the appropriate default region (see the sample code available for download at the beginning of this article). This is the preferred method, because region settings created on an RPC1 system by inserting a single-region disc will be reset by the OPK.
For RPC1 drives, the first time a DVD title is played or the DVD-ROM drive is accessed in any manner, Windows 2000 selects a region for the drive. The default region key is used if it matches one of the regions of the disc or if there is no disc in the drive. Otherwise, the lowest numbered region on the disc is used.
For RPC2 drives, the first time a DVD title is played or the DVD-ROM drive is accessed and it contains a disc, Windows 2000 sets a region if none is set. That is, region setting only occurs if a disc is in the drive. The default region key is used if it matches one of the regions of the disc. Otherwise, the lowest numbered region on the disc is used. This will use one of the allowed region changes in firmware. Once a region is set for an RPC2 drive, it is not changed by a reinstallation or clean installation of the operating system.
If the user installs a new drive later, the same procedure will take effect.
Microsoft DirectShow DVD Navigator detects a subsequent region change requirement when a disc is inserted that forbids playback in the current region. The appropriate application (Windows 98) or property page (Windows 2000) is used to ask the user to change the region on the drive. The user can only select a region that matches the disc.
For RPC1 drives, Windows components manage the region change. This happens only once. If the user attempts to play a disc that does not match the initial region, the user is allowed to select the permanent region for the drive.
RPC2 drives maintain region changes in hardware. If the number of allowed changes are exhausted on a RPC2 drive, the drive will fail the call to change the region and the region change component will indicate this to the user.
DVD player application developers and decoder developers should use the DVD region change support built into Windows to change the region. There are different ways of doing this for the Windows 98 and Windows 2000 platforms. Developers writing decoders for Windows 95 must implement their own support for changing the region.
Region Change under Windows 98
The Windows 98 component that provides support for DVD region change is Dvdrgn.exe, which is regionalized along with other components of the operating system. This application is installed only when a hardware decoder with a WDM Stream Class minidriver is installed using the standard INF file.
For other cases, such as software decoders and upgrade kits, the following steps can be put into an INF file that is used by an installation program to add Dvdrgn.exe to the target system.
[Version] Signature=$CHICAGO$ LayoutFile=layout.inf [DestinationDirs] DvdRgnCopy=25 ; Windows DefaultDestDir=25 ; Windows [DefaultInstall] CopyFiles=DvdRgnCopy [DvdRgnCopy] dvdrgn.exe
Region Change under Windows 2000
The Windows 2000 component that provides DVD region change support is in the Storprop.dll in %windir%\system32. This component is installed by default, and no additional steps are required to make it available. The user interface of this property page is very similar to that of Dvdrgn.exe application, and it is regionalized in the operating system.
Integrating Region Change into Playback Applications
Windows DVD region change support can be used by a DVD playback application to make a more seamless region change inside the application. The code examples available for download at the beginning of this article may help you integrate DVD region change in your player application.
Call to action for DVD decoder development:
| • | For documentation on DVD decoder development, see the Windows DDK. |
| • | Information about DirectShow support for DVD playback can be found on the DirectX web site at: http://msdn.microsoft.com/directx/ |