diff decoder.c @ 18:e6ac0a8d9c14 src

Display DVD disk region setting. Display possible RCE region protection message.
author jcdutton
date Fri, 12 Apr 2002 12:43:36 +0000
parents 74aee0b81da0
children 7e8628911b4f
line wrap: on
line diff
--- a/decoder.c	Wed Apr 10 16:45:57 2002 +0000
+++ b/decoder.c	Fri Apr 12 12:43:36 2002 +0000
@@ -62,6 +62,9 @@
    SXXX_XXXX, where S is 1 if it is system register. */
 static uint16_t eval_reg(command_t* command, uint8_t reg) {
   if(reg & 0x80) {
+    if ((reg & 0x1f) == 20) {
+      fprintf(stderr, "Suspected RCE Region Protection!!!");
+      }
     return command->registers->SPRM[reg & 0x1f]; /*  FIXME max 24 not 32 */
   } else {
     return command->registers->GPRM[reg & 0x0f];
@@ -339,10 +342,10 @@
       data2 = vm_getbits(command, 44, 4);
       if(vm_getbits(command, 40, 1)) {
 	fprintf(stderr, "Detected SetGPRMMD Counter!! This is unsupported.\n");
-	command->registers->GPRM_mode[data2] = 1;
+	command->registers->GPRM_mode[data2] |= 1; /* Set bit 0 */
       } else {
 	fprintf(stderr, "Detected ResetGPRMMD Counter!! This is unsupported.\n");
-	command->registers->GPRM_mode[data2] = 0;
+	command->registers->GPRM_mode[data2] &= ~ 0x01; /* Reset bit 0 */
       }
       if(cond) {
 	command->registers->GPRM[data2] = data;