Decoding JBK 6628 DVD Karaoke Disc

classic Classic list List threaded Threaded
41 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Decoding JBK 6628 DVD Karaoke Disc

jim75
Hello all, I am super impressed with the progress that bigboss97 and woid made with the California DVD player.  However, I have a JBK 6628 instead.  So I am trying to see if I could decode the same like the California player.

Here is a manual for making the disc, provided that we have the software
JBK_Manual%5B1%5D.doc  I'd searched in vain and find no such software on the net.  Nor the format they mention (.COB).

I am rather surprised that the JBK layout is very close to the California disc.  The files are:
DTSMUS00.DKD
DTSMUS01.DKD
DTSMUS02.DKD
DTSMUS03.DKD
DTSMUS04.DKD
DTSMUS05.DKD
DTSMUS10.DKD
DTSMUS20.DKD

The tables of tables start at 0x200 in DTSMUS00.DKD just like HOTDOG file, however the offset need to be multiple by 0x800 to get to the table offset.  

The first table start at 0x800 just like the HOTDOG file, however the song offset need to add the offset of the table to get to the song entries.

The song entries are not the same as the HOTDOG file (.COB format?)  This is where I am stuck.  Here is part of the first song entry:
00001000   00 00 0C 41 00 00 0D F8  00 00 00 05 04 80 00 10   ...A...ø.....€..
00001010   20 30 10 20 00 10 41 03  10 50 32 10 50 0D 00 A1    0. ..A..P2.P..¡
00001020   02 04 01 05 10 F1 08 11  20 00 11 10 00 03 11 09   .....ñ.. .......
00001030   10 B1 0D 11 41 05 03 51  05 11 71 02 11 D1 13 10   .±..A..Q..q..Ñ..
00001040   C1 0E 11 91 24 12 60 00  04 51 05 06 41 05 07 71   Á..‘$.`..Q..A..q
00001050   05 06 11 05 07 21 2A 10  50 20 10 50 56 12 E1 05   .....!*.P .PV.á.

The first 4 bytes doesn't look like the length, not sure what it's.

Any suggestion on how to decode the song entry block?
Reply | Threaded
Open this post in threaded view
|

Re: Decoding JBK 6628 DVD Karaoke Disc

bigboss97
Administrator
Where did you get that document?

The first 4 (8) bytes look like a length to me, which could indicate the start of next section, e.g. MIDI data.

From the 3rd line of your data, I can't see any regularity, i.e. it could be the mask information or in worst case the information is compressed (what I don't believe).

Can you find the first  2 letters of the song title in each lyric block? see the hotdog discussion for details.

What you have to do now is...
Find the start of a regular data block. You can try to interpret the first few bytes as offset to next block, e.g. MIDI data in case of HOTDOG.

HTH
Phuoc Can HUA


jim75 wrote
Here is a manual for making the disc, provided that we have the software
JBK_Manual%5B1%5D.doc  I'd searched in vain and find no such software on the net.  Nor the format they mention (.COB).

...

The song entries are not the same as the HOTDOG file (.COB format?)  This is where I am stuck.  Here is part of the first song entry:
00001000   00 00 0C 41 00 00 0D F8  00 00 00 05 04 80 00 10   ...A...ø.....€..
00001010   20 30 10 20 00 10 41 03  10 50 32 10 50 0D 00 A1    0. ..A..P2.P..¡
00001020   02 04 01 05 10 F1 08 11  20 00 11 10 00 03 11 09   .....ñ.. .......
00001030   10 B1 0D 11 41 05 03 51  05 11 71 02 11 D1 13 10   .±..A..Q..q..Ñ..
00001040   C1 0E 11 91 24 12 60 00  04 51 05 06 41 05 07 71   Á..‘$.`..Q..A..q
00001050   05 06 11 05 07 21 2A 10  50 20 10 50 56 12 E1 05   .....!*.P .PV.á.

The first 4 bytes doesn't look like the length, not sure what it's.

Any suggestion on how to decode the song entry block?
Reply | Threaded
Open this post in threaded view
|

Re: Decoding JBK 6628 DVD Karaoke Disc

jim75
I found the document here http://www.ubestkaraoke.com/ebay/pdf/JBK_Manual.doc, but no luck with the executables.

The first 8 bytes seem like some sort of length/offset, but they don't add up to anything; too small for the block length, and offset to no where.

The data does look scrambled, I cannot recognize any pattern so far, no 2 letters song title, no 00 FF C.

Here is the entire block for song 1 and song 3538
song+00001.dat
Title: 5150
Author: Edward Van Halen
Lyric: THE LOVE LIFE IS N...
song+3538.dat
Title: 1985
Author: Bowling for soup
Lyric: Woohoohoo Woohooho...

I am not 100% sure the block actually is the song # indicated.  I'll do some patching to find out.
Reply | Threaded
Open this post in threaded view
|

Re: Decoding JBK 6628 DVD Karaoke Disc

jim75
Patching findings:

Song 1:
1074: 54 -> 53 ->> changes all T in the song to S
1c70: 06 -> 05 ->> the music is messed up (wrong instruments?)

Song 3538:
3f5b5ba: 77 -> 78 ->> no noticable effects
3f5b5e1: 53 -> 52 ->> no noticable effects
toward end of block ->> stop the music early

The first part of the block look like some sort of lookup table for the lyric.  If I could patch to change one letter of the lyric, that would give a very big clue.
Reply | Threaded
Open this post in threaded view
|

Re: Decoding JBK 6628 DVD Karaoke Disc

bigboss97
Administrator
That's very good! You already located the lyric and MIDI parts.

1074: 54 -> 53 ->> changes all T in the song to S
All T's by changing one byte? i.e. the encoding is based on mapping table.
Next patch:
1) Patch ONE byte next to 0x54.
2) Choose a song with repeating lyrics, e.g. lalalala (see other posts, that was the original "idea" for the hotdog files). If it's using mapping table you should be able to see pattern.

jim75 wrote
Patching findings:

Song 1:
1074: 54 -> 53 ->> changes all T in the song to S
1c70: 06 -> 05 ->> the music is messed up (wrong instruments?)

toward end of block ->> stop the music early
Reply | Threaded
Open this post in threaded view
|

Re: Decoding JBK 6628 DVD Karaoke Disc

jim75
Some more patch findings:

Lyrics:
THE LOVE LINE IS NEVER STRAIGHT AND NARROW UNLESS YOUR LOVE IS
TRIED AND TRUE...

1100: 10 -> 9 ->> messup second screen lyrics
1101: b1 -> b0 ->> no effect
1102: 00 -> 01 ->> stuck on the second screen
1077: 26 -> 25 ->> no effect
107b: 02 -> 01 ->> no effect
1089: 2a -> 29 ->> no effect
10fb: af -> a9 ->> no effect
1184: 20 -> 21 ->> TRIE    D TRUE
1184: 20 -> 1f ->> TRI(ED slow) A -> random Chinese chars
1185: 05 -> 04 ->> no effect
1185: 05 -> 15 ->> TR(I very slow)
1185: 05 -> 09 ->> TR(I slow)
1186: 1a -> 19 ->> TRIE(@) AN    TRUE
118b: 05 -> 08 ->> TRIE(D slow) A   T
118b: 05 -> 06 ->> TRIE(D slow) random letters
118c: 19 -> 18 ->> TRIED  ND TRUE
118d: 10 -> 11 ->> TRIED messed up
118e: 1d -> 1c ->> no effect
118e: 1d -> 1e ->> no effect
118e: 1d -> 2e ->> no effect
118e: 1d -> fe ->> TRIE(D slow)
118f: 00 -> 01 ->> TRIE(D very slow)
1190: 51 -> 52 ->> TRIED A (new line) D TRUE
1191: 78 -> 79 ->> TRIED AbD TRUE   ->>>>>>>> this is interesting 1 byte change N -> b
1192: 02 -> 03 ->> no effect
1192: 02 -> f2 ->> TRIED messesed up
1193: 01 -> 11 ->> no effect
1193: 01 -> f1 ->> no effect
1194: fc -> 01 ->> TRIED AN (new line) TRUE
1195: 00 -> 01 ->> TRIED AN  TRUE
1196: 00 -> 0f ->> TRIED AN messesup
1197: 24 -> 34 ->> TRIED AND \n messesup
1198: 1F -> 2F ->> TRIED AND end
1199: F1 -> 21 ->> TRIED A(N slow)D (19B messedup

There's definitely timing code embedded, and seem like some sort of running sum/encoding because 1 byte change by 1 messedup the rest of the lyrics.

bigboss97, I'll try to do the patching on repeating lyrics song, maybe I'll find some pattern.  Cannot find any pattern in the songs with repeating lyrics by looking at the data alone (like "Tu Tu Tu Tu Tu Tu...")
Reply | Threaded
Open this post in threaded view
|

Re: Decoding JBK 6628 DVD Karaoke Disc

jim75
Interesting finding regarding the song title and block data:

0x36 - start of title
0x4a - the 8th letter of the title
0x50 - the 11th letter of the title

91 05 02 01 05 04 C1 05 06 F1 05 07 61 05 06 51 1E 10 50
"I Love "

91 05 02 01 05 04 C1 05 06 F1 05 07 61 05 06 51 1E 10 50 59 12 21 05 07 51
"I Love You"

91 05 02 01 05 04 C1 05 06 F1 05 07 61 05 06 51 1E 10 50 54 10 50 68 12 61
"I Love The"

41 05 06 91 05 07 81 1E 10 50 65 10 50 20 10 50 43 10 50 68 12 21 02 06 31
"Dixie Chic"

51 05 07 61 05 06 51 05 07 21 05 07 91 05 07 41 05 06 81 05 06 91 05 06 E1
"Everything"

61 05 06 11 05 06 91 05 07 41 05 06 81 05 06 61 05 07 51 05 06 C1 2A 10 50
"Faithfully"
Reply | Threaded
Open this post in threaded view
|

Re: JBK 6628 DVD Karaoke Disc (masks used?)

bigboss97
Administrator
In reply to this post by jim75
Wondering how did you do so many patches a day. Don't you have to patch the  DVD image and burn a new one each time?

If a single byte (bit) can mess up the whole song we could be dealing with a mask, just like hotdog. But previously, you were saying all 'T' become 'S'. Then I thought that could be 1to1 encoding (which should show pattern in repeating lyric).

btw, there are 2 masks used in hotdog files. One is stored in the beginnig of each song (song specific). One is static which we haven't found the location. Since it's static we reversed the operation and created the 2nd mask.

So, if you try a single mask and it didn't work try one more mask.

HTH
Phuoc Can HUA



jim75 wrote
There's definitely timing code embedded, and seem like some sort of running sum/encoding because 1 byte change by 1 messedup the rest of the lyrics.
Reply | Threaded
Open this post in threaded view
|

Re: Decoding JBK 6628 DVD Karaoke Disc

jim75
In reply to this post by jim75
Title decoding:

Keys:
02:
01 = Space

03:
51 = 5?

04:
11 = A
21 = B
31 = C
41 = D
51 = E
61 = F
71 = G
81 = H
91 = I
A1 = J
B1 = K
C1 = L
D1 = M
E1 = N
F1 = O

05:
01 = P
11 = Q
21 = R
31 = S
41 = T
51 = U
61 = V
71 = W
81 = X
91 = Y
A1 = Z

06:
11 = a
21 = b
31 = c
41 = d
51 = e
61 = f
71 = g
81 = h
91 = i
A1 = j
B1 = k
C1 = l
D1 = m
E1 = n
F1 = o

07:
01 = p
11 = q
21 = r
31 = s
41 = t
51 = u
61 = v
71 = w
81 = x
91 = y
A1 = z

0x35 - start of title

05 04 91 05 02 01 05 04 C1 05 06 F1 05 07 61 05 06 51 ->>> 1E 10 50
   I        ' '      L        o        v        e
"I Love "

05 04 91 05 02 01 05 04 C1 05 06 F1 05 07 61 05 06 51 (1E 10 50 59 12 21) 05 07 51 28 10 20 53 12 B1
   I        ' '      L        o        v        e      ' 'Yo                 u
"I Love You"

05 04 91 05 02 01 05 04 C1 05 06 F1 05 07 61 05 06 51 ->>> 1E 10 50 54 10 50 68 12 61
   I        ' '      L        o        v        e    
"I Love The"

05 04 41 05 06 91 05 07 81 ->>> 1E 10 50 65 10 50 20 10 50 43 10 50 68 12 21 02 06 31
   D        i        x              
"Dixie Chic"

05 04 51 05 07 61 05 06 51 05 07 21 05 07 91 05 07 41 05 06 81 05 06 91 05 06 E1
   E        v        e        r        y        t        h        i        n
"Everything"

05 04 61 05 06 11 05 06 91 05 07 41 05 06 81 05 06 61 05 07 51 05 06 C1 ->>> 2A 10 50
   F        a        i        t        h        f        u        l    
"Faithfully"

05 05 91 05 06 F1 05 07 51 05 02 01 05 04 11 05 06 E1 05 06 41 ->>> 22 10 50 49 11 91
   Y        o        u                 A        n        d                    
"You And I"

05 05 91 05 06 F1 05 07 51 05 02 01 05 04 11 05 07 21 05 06 51 ->>> 22 10 50 4D 10 50
   Y        o        u                 A        r        e
"You Are My"

05 04 F1 05 06 81 05 02 01 05 05 31 05 07 51 05 07 31 05 06 11 05 06 E1 ->>> 28 11 91
   O        h                 S        u        s        a        n
"Oh Susana"

                          (05 06 71 05 06 91)
05 05 01 05 06 91 05 06 71 (20 11 E1) 05 06 51 05 07 31 ->>> 19 10 E1 1C 10 50 61 10 50
   P        i        g      gi           e        s
"Piggies"

There are some weird encoding/compression going on, that I cannot figure out yet.
Reply | Threaded
Open this post in threaded view
|

Re: JBK 6628 DVD Karaoke Disc (masks used?)

jim75
In reply to this post by bigboss97
Yes, I have to burn the DVD everytime, but I chop the background video to like 4 min, and the DTSMUS00.DKD file is chopped to contain only 1 song, so the whole image is less than 200 MB, which take like 2 min to burn.

I made some progress with the title decoding, if I could figure out the encoded/compressed part, I might be able to decode the lyrics also.
Reply | Threaded
Open this post in threaded view
|

Re: JBK 6628 DVD Karaoke Disc (modify video)

bigboss97
Administrator
You cut the video with a video editor? Did you compose the DVD yourself with the modified files?
So, you managed to burn a mixed-mode disk, i.e. video and data? How did you do that? Do you use PgcEdit?
See also:
http://www.nabble.com/How-to-put-your-own-Video-on-the-DVD--(California-electronics)-tf4065160.html

jim75 wrote
Yes, I have to burn the DVD everytime, but I chop the background video to like 4 min, and the DTSMUS00.DKD file is chopped to contain only 1 song, so the whole image is less than 200 MB, which take like 2 min to burn.
Reply | Threaded
Open this post in threaded view
|

Re: JBK 6628 DVD Karaoke Disc (modify video)

jim75
I used a video editor.  The JBK format just use BACK01.MPG.  The DVD is just a data DVD with the label "MDVD_6628" just like the manual described, and all files are in the root directory.  I composed the files together, so I just have to modify DTSMUS00.DKD everytime I patch.  I don't have to patch the image.
Reply | Threaded
Open this post in threaded view
|

Help with encoding/compression algorithm

jim75
In reply to this post by jim75
Here's a simple sample:

05 05 01 05 06 91 05 06 71 20 11 E1 05 06 51 05 07 31

where (see keys in the previous message)
05 05 01 = P
05 06 91 = i
05 06 71 = g
20 11 E1 = gi (using the previous two letter some how)
05 06 51 = e
05 07 31 = s

Now how does that 20 11 E1 become "gi"?  I tried to change i and g to A and B then the result is "PABBAes".  I am stump.
Reply | Threaded
Open this post in threaded view
|

Lyric break-through

jim75
The lyric part is LZW compressed (standard 12-bit lookup table).  Compress data start at offset 0xA of the data block.  The second 2 bytes of the data block is the length of the compress lyric block, the 7th and 8th bytes is the size of the uncompressed data.

Now on to the rest of the block, it doesn't decompress correctly, not sure if it's even compressed like the lyric part.
Reply | Threaded
Open this post in threaded view
|

Midi signature

jim75
I need help identify the MIDI signature.  The midi part uncompressed size doesn't match the size in the block, so I am not sure how to approach this.

Song 1 data block: 00001.dat
Decompressed lyric of song 1: 00001.out
Decompressed midi of song 1 (size doesn't match): 00001_2.out

First part of MIDI part:
00000000   00 01 C0 49 FF 00 01 B0  07 73 00 01 B0 0A 40 00   ..ÀIÿ..°.s..°.@.
00000010   01 B0 79 00 00 01 B0 5B  3C 00 01 B0 5D 00 00 01   .°y...°[<..°]...
00000020   C1 21 FF 00 01 B1 07 7B  00 01 B1 0A 40 00 01 B1   Á!ÿ..±.{..±.@..±
00000030   79 00 00 01 B1 5B 0A 00  01 B1 5D 0A 00 01 C2 03   y...±[...±]...Â.
00000040   FF 00 01 B2 07 6C 00 01  B2 0A 64 00 01 B2 79 0A   ÿ..².l..².d..²y.
Reply | Threaded
Open this post in threaded view
|

MIDI Decoding Break-through

jim75
I am able to decode the MIDI part now.  Man they compressed it so there's no explicit note OFF command, just a ON duration.  The note OFF have to be computed, it's a pain in the butt.

My next step is to merge the lyric part with the midi part to create a .kar file.  I'll post the code later, unless someone want it now.
Reply | Threaded
Open this post in threaded view
|

First version of COB2MIDI

jim75
In reply to this post by jim75
Here's the first version of the converter to convert the JBK COB format to MIDI.   Doesn't work for all songs yet, and the lyric is only ASCII compatible.

COB2MIDI.zip
Reply | Threaded
Open this post in threaded view
|

Re: MIDI Decoding Break-through

bigboss97
Administrator
In reply to this post by jim75
Is it using a notation similar to:
http://board.midibuddy.net/showpost.php?p=533722&postcount=31

If that's the case, you can check what you can re-use from:
http://www.nabble.com/forum/ViewPost.jtp?post=11982527&framed=y

jim75 wrote
The note OFF have to be computed, it's a pain in the butt.
Reply | Threaded
Open this post in threaded view
|

First version of SongDump

jim75
In reply to this post by jim75
Here's the first version of the song dump utility.  The executable needd to be in the same place as the DTSMUS0*.DKD files.  Just run it with the song number as the argument, it will produce a songnumber.dat file.  You could then run that through the COB2MIDI.exe to convert to MIDI file.

SongDump.zip
Reply | Threaded
Open this post in threaded view
|

First Version of DiscImage Tool

jim75
In reply to this post by jim75
Here's the first version of the JBK Disc Image tool.  It will create the DTSMUS00.DKD file given the MIDI files.  It works okay, except the performance is horrible.  Still need to make it faster, and be able to generate the contents files (DTSMUS10/20.DKD).
DiscImage.zip
123