Log in

View Full Version : Region Codes and Other Playing Protections


A Pal
10th October 2008, 19:26
Hello,

YES, I know, Region codes are very unpopular and because of tools such as AnyDVD-HD not 100% sure to work, but for technical interest, I would like to know how to add Region codes to self-burned DVDs and BDs and how to verify them. Are there any free programs available to do that?

What other possibilities are there to make a CD/DVD/BD playable

- only on a stand-alone player, but not on a computer
- only on a computer, but not on a stand-alone player
- only on certain computers, not on all computers?

Thank you and many greetings, :)

A Pal

Video Dude
10th October 2008, 22:22
Are there any free programs available to do that?
For DVD use PgcEdit.
Menu: DVD --> Region Code


- only on a stand-alone player, but not on a computer
- only on a computer, but not on a stand-alone player
- only on certain computers, not on all computers?

If it can be played by one, it can be played by all.

r0lZ
11th October 2008, 10:00
If it can be played by one, it can be played by all.
Not sure! There are some new protections based on intentional errors in the filesystems. Since a standalone player should use only the UDF filesystem and the software players (including some DivX compatible standalone players) use only the ISO filesystem, butchering one of those filesystems could make the DVD unplayable by some players only. This method has already been used to protect some rare DVDs and make them impossible to rip with the standard rippers, and, incidently, unplayable on a PC. As far as I know, those methods have been abandoned, due to incompatibilities problems with standalone players running Linux Embedded.

A Pal
11th October 2008, 14:16
Hello,

1. There are also some Audio-CDs that don't play on a computer, but they don't run on a standalone player either if the built-in drive is a computer CD drive. Here is the protection too good! :(

2. Games can have a Region code, too. From my AMIGA time (my first PC was an AMIGA 500), I remember reading an article about a game that checked whether it was running on an NTSC or a PAL computer. On a PAL computer, it did not work.

How can you program in Windows a verification of the TV system and/or the Region code of the DVD drive and add it to a program?

In the style of a BASIC program, a program to verify the DVD Region would have to look similar to this:

DRIVEREGION:

A = DriveRegion
IF A = 2 GOTO PROGRAM
IF A <> 2 GOTO WRONGREGION

WRONGREGION:

PRINT "This program runs in DVD Region 2, but your drive has Region " A "."
END

PROGRAM:
PRINT "Welcome to the program!"
END

3. What is the structure of the Blu-ray Region code? Where is it located, and how can you add it to self-burned BDs? (Is there also a free program to do so?) Since BD-Regions are 100% software-based (the BD drives and Windows have no BD-Region lock; in standalone players, the code is part of the firmware), how can you verify the BD code in programs, like for example in games?

Thank you and many greetings, :)

A Pal

r0lZ
11th October 2008, 17:06
When you insert a DVD in a drive, the drive must check the region code first. Of course, this step can be bypassed by modifying the firmware of the drive.

Then, the software player should verify it too. For the Windows Media Player, the region code of the PC is stored in an hidden key in the registry (probably different in each version of Windows). Here again, it is possible to bypass the protection by patching the software, using a program that does not check the protection, or installing an alt driver that changes the region code of the IFO when it reads it (such as DVD43 or AnyDVD.)

Finally, it is also possible to check the region code in the DVD itself. The region code of the PC is stored in SPRM 20. It is easy to verify if it matches the region code of the DVD with something like this (assuming the DVD is region 1):

[61 00 00 00 00 94 00 00] 1 Set gprm(0) =(mov) sprm(20:Player region code)
[00 A1 00 00 00 01 00 04] 2 if ( gprm(0) == 1 ) then { Goto line 4 }
[30 01 00 00 00 00 00 00] 3 Exit # Wrong region code: refuse to play
[00 00 00 00 00 00 00 00] 4 NOP # Good region code: continues normally

It is easy to modify the code to remove the protection, but you have to copy the DVD, of course.

I'm not a specialist of the DVD firmwares or the software players, and I don't know exactly how they check the protection.

blutach
11th October 2008, 23:34
There are 2 region code issues on a standard DVD.

The fist is a simple bitmask in VIDEO_TS.IFO at byte 0x23 in VMGM_MAT - this is called RC (see here (http://forum.digital-digest.com/showthread.php?t=45996) for more info). The second is as r0lZ has just described with VM commands, which is known as RCE. Typically, both are applied to a DVD.

Regards