comparison vm.c @ 112:50ee8763a312 src

implement LinkNoLink (in this whole lot of DVDs I watched with libdvdnav, Disney's "Beauty an the Beast" deluxe is the first one to use LinkNoLink...)
author mroi
date Mon, 06 Jan 2003 19:59:28 +0000
parents 0c1f0c7eec1d
children ec2df154be56
comparison
equal deleted inserted replaced
111:0c1f0c7eec1d 112:50ee8763a312
454 assert(link_values.command == PlayThis); 454 assert(link_values.command == PlayThis);
455 (vm->state).blockN = link_values.data1; 455 (vm->state).blockN = link_values.data1;
456 #ifdef TRACE 456 #ifdef TRACE
457 fprintf(MSG_OUT, "libdvdnav: vm_eval_cmd: blockN set to 0x%x\n", (vm->state).blockN); 457 fprintf(MSG_OUT, "libdvdnav: vm_eval_cmd: blockN set to 0x%x\n", (vm->state).blockN);
458 #endif 458 #endif
459 assert( (vm->state).blockN == 0 ); 459 return link_values.data2; /* return if there acutally was a jump */
460 return 1; /* Something changed, Jump */
461 } else { 460 } else {
462 return 0; /* It updated some state thats all... */ 461 return 0; /* It updated some state thats all... */
463 } 462 }
464 } 463 }
465 464
1372 fprintf(MSG_OUT, "libdvdnav: Before printout ends.\n"); 1371 fprintf(MSG_OUT, "libdvdnav: Before printout ends.\n");
1373 #endif 1372 #endif
1374 1373
1375 switch(link_values.command) { 1374 switch(link_values.command) {
1376 case LinkNoLink: 1375 case LinkNoLink:
1377 /* No Link */ 1376 /* No Link => PlayThis */
1378 /* BUTTON number:data1 */ 1377 /* BUTTON number:data1 */
1379 if(link_values.data1 != 0) 1378 if(link_values.data1 != 0)
1380 (vm->state).HL_BTNN_REG = link_values.data1 << 10; 1379 (vm->state).HL_BTNN_REG = link_values.data1 << 10;
1381 fprintf(MSG_OUT, "libdvdnav: FIXME: in trouble...LinkNoLink - CRASHING!!!\n"); 1380 link_values.command = PlayThis;
1382 assert(0); 1381 link_values.data1 = (vm->state).blockN;
1382 link_values.data2 = 0; /* no actual jump */
1383 return link_values;
1383 1384
1384 case LinkTopC: 1385 case LinkTopC:
1385 /* Restart playing from the beginning of the current Cell. */ 1386 /* Restart playing from the beginning of the current Cell. */
1386 /* BUTTON number:data1 */ 1387 /* BUTTON number:data1 */
1387 fprintf(MSG_OUT, "libdvdnav: FIXME: LinkTopC. Replay current Cell\n"); 1388 fprintf(MSG_OUT, "libdvdnav: FIXME: LinkTopC. Replay current Cell\n");
1705 vm_print_current_domain_state(vm); 1706 vm_print_current_domain_state(vm);
1706 fprintf(MSG_OUT, "libdvdnav: After printout ends.\n"); 1707 fprintf(MSG_OUT, "libdvdnav: After printout ends.\n");
1707 #endif 1708 #endif
1708 1709
1709 } 1710 }
1711 link_values.data2 = 1; /* there was actually a jump */
1710 vm->badness_counter--; 1712 vm->badness_counter--;
1711 return link_values; 1713 return link_values;
1712 } 1714 }
1713 1715
1714 /* Searches the TT tables, to find the current TT. 1716 /* Searches the TT tables, to find the current TT.
2027 return pgcit; 2029 return pgcit;
2028 } 2030 }
2029 2031
2030 /* 2032 /*
2031 * $Log$ 2033 * $Log$
2034 * Revision 1.41 2003/01/06 19:59:28 mroi
2035 * implement LinkNoLink
2036 * (in this whole lot of DVDs I watched with libdvdnav, Disney's
2037 * "Beauty an the Beast" deluxe is the first one to use LinkNoLink...)
2038 *
2032 * Revision 1.40 2002/11/24 15:09:18 mroi 2039 * Revision 1.40 2002/11/24 15:09:18 mroi
2033 * loosening this test a bit makes "Spy Game" German RC2 work 2040 * loosening this test a bit makes "Spy Game" German RC2 work
2034 * 2041 *
2035 * Revision 1.39 2002/11/23 11:05:45 mroi 2042 * Revision 1.39 2002/11/23 11:05:45 mroi
2036 * patch from Marco Zühlke for reporting correct title number 2043 * patch from Marco Zühlke for reporting correct title number