Blu-ray region changing / region free BDP (?)

Samsung's BluRay player related hacks.
Post Reply

sbav1
Official SamyGO Developer
Posts: 374
Joined: Fri Jan 15, 2010 10:20 am

Blu-ray region changing / region free BDP (?)

Post by sbav1 »

I still don't know where BD region settings are stored in B-FIR* devices (I guess they should be - most likely - in main EEPROM, or perhaps in sub-micom EEPROM - but finding the exact location proven to be not all that easy). Instead, here is an untested (***) idea for different approach.

In (e.g.) B-FIRHTBEUC firmware, we have some possibly relevant functions:

Code: Select all

Mopt_IsDVDRegionCodeFreeEnabled()
Mopt_GetDefaultDvdRegionCode()
Mopt_GetDefaultBDRegionCode()
I believe they are calling TDaSystem::GetSuppportOptionBD() to get the actual settings (e.g., option 0x30 is being used to get BD region code), but never mind..

Tracing the xrefs for Mopt_GetDefaultBDRegionCode(), I think current player region setting gets determined in CBDPlayerApp::ApplySetupValue() - after Mopt_GetDefaultBDRegionCode() call, it subsequently executes the following function (given in C/perl pseudocode):

Code: Select all

BdPce_ConfigRegionCode(arg1) {
   char cbuf[0x84]; char *res;

   R4=arg1;
   res=getenv("EMULATOR_PSR20");
   res == NULL && goto setPSR;

   res=getenv("EMULATOR_PSR20")
   snprintf(cbuf,0x80,res);

   int rcv=(cbuf[0] eq '0' && cbuf[1] eq 'x')? strtol(cbuf,0,16): strtol(cbuf,0,10);
   (rcv == 1 || rcv == 2 || rcv == 4) && (R4=rcv);

setPSR:
   BdPce_SetPSR(20,R4);
}
Looks like we may have here an interesting mechanism for temporary BD region code changing, via environment variable named "EMULATOR_PSR20" - courtesy of Samsung developers :). Something as simple as:

Code: Select all

export EMULATOR_PSR20=1
in startup script (before exeDSP execution) should (?), at least in theory, efectively change the player BD region to A (2 == region B, 4 == region C).
EMULATOR_PSR20 string seems to be present in all exeDSP binaries for B-FIR* models (same thing for E-series B-ECB* models), so this method - assuming it will actually work - may be somehow universal.

Btw, I wonder what will happen if we set PSR (player settings register) #20 to value 0x7: perhaps that will result in "ABC" region (region-free) player? But that will require a little patching of exeDSP function (BdPce_ConfigRegionCode, or CBDPlayerApp::ApplySetupValue seems to be a good candidate), because the only values accepted for EMULATOR_PSR20 environment variable are: 1, 2 & 4.

***) I can't test this idea myself any further; I have region B player, but I don't have any BD discs with A or C region (nor any region B discs, for that matter - all BD discs I own are region-code-free). In case someone decides to take some risk and actually test it: I'm not responsible for any possible damages ;).

Post Reply

Return to “BluRay Players”