| Author |
Message |
Mirx Respected Member

Joined: 17 Apr 2004 Posts: 696
|
Posted: Tue Jul 20, 2004 4:32 pm Post subject: Understanding menu pre-/post-commands??? |
|
|
| I can't seem to grasp the concept of &= commands in the dvd structure. I thought this meant a bitwise and, and this repesented the following: first value: 1 --> 0001 second value: 3 --> 0011 Result value: 1 --> 0001 The result value only consist of where the 2 values where binary a "1" But I'm looking at a menu where almost every value is compared with values like: 15, 63, 127, 255, 1023 which are all binary "1" So if I understand the bitwise and correctly, why would anyone want to compare with these numbers, since the end result will always be the same as the other value. I've got a button highlighting sequence that goes: R[3] = sub-picture_stream# R[3] &= 127 if (R[3] ==66) link Program 1 (highlight button 3) if (R[3] ==67) link Program 1 (highlight button 4) I must be wrong in my understanding of the bitwise and, since there are max 32 sub-picture streams available, these conditions could never be true. If anyone could clear this up, I would greatly appreciate it. I'm trying to fix a mangled menu, but can't get the sub-picture highlights to work correctly. p.s. do the sub-picture streams start with 0 as well (like audio), or is 0 reserved for subtitle off. |
|
| Back to top |
|
 |
DimadSoft DvdReMake Official support

Joined: 19 Mar 2004 Posts: 2193
|
Posted: Tue Jul 20, 2004 6:34 pm Post subject: |
|
|
| It is not compare. It is a binary AND: A = 1010 (in binary) B = 1100 (in binary) then A&=B will be 1000 if (XX &= YY) ... - means: if binary AND of XX and YY is not zero then do ... Here is some more info on the subj: http://cdr-zone.com/forum/viewtopic.php?t=835 |
|
| Back to top |
|
 |
Mirx Respected Member

Joined: 17 Apr 2004 Posts: 696
|
Posted: Tue Jul 20, 2004 8:08 pm Post subject: |
|
|
I already found the reference sheet with all the commands, I just couldn't interpered them. Did a google search on binary and and found some coding example on a Microsoft site, I must have misread them. So, if I understand you correctly, in this case the binary value of my sub-picture stream an the binary value of 127 would be added together, with max digits of 7 (because the binary lenght of 127 is 7 digits), and that value would be written to R[3]. So for R[3] to become 66 --> xxxxxxx Current value of R[3] 1111111 + &= value -------------- (1) 1000010 value used for highlight reference xxxxxxx would have to be 11000010 - 1111111 = 10000011 --> 67 For the end value of 67 the sub-picture stream would have to be 68. How can my subtitle stream have a value of 67 or 68. I must still be misunderstanding something. Unless, because the max sub-picture stream is 32, which is 5 digits binary, it only looks at the last 5 digits, which would make 3 and 4. Thanks to the player Mackem recommendend I was able to fix it the long way round. You can check real-time what the register values are, so I just checked the value of R[3] on different subtitle scenario's, and altered the value used for highlighting accordingly. The value of R[3] was set at 64, and I was playing the default stream. But any additional help would be really appreciated, since I want to be able to read these command structures, without having to use reference tools for them. I still don't understand why this menu uses all the bitwise and's. If I follow the structure, the next time R[3] is used again, it's by a reset to set it back to the sub-picture stream again, so why change it into something different, and compare it with that, while you could just leave it at the value of the sub-picture stream. Little rand (nothing about the question): Ah, I guess this is what you get if you download custom subbed disc. I've tried explaining the major release groups how important it is for dvd structure to keep the audio and subtitle stream in the same place when re-compiling the disc, which takes about 5 minutes to figure out. But unfortunately they are happy enough when you can select everything by remote Subtitles normally go pretty good, since they replace the main subtitle track 99% of the time, but they always screw up with director's commentory etc. |
|
| Back to top |
|
 |
CDR-Zone.COM Advertisement Bot
 
|
Posted: Post subject: Advertisement: |
|
|
|
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|