File: proto.txt

package info (click to toggle)
linux-minidisc 0.9.13-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,096 kB
  • ctags: 1,530
  • sloc: ansic: 6,345; cpp: 2,569; python: 2,451; perl: 866; sh: 22; makefile: 8
file content (265 lines) | stat: -rw-r--r-- 7,501 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
Request Formats
---------------

This is a list of the request formats I have seen so far and my attempt
to decode the structure of them, but not the actual content (ie to say
what kind of data each byte is, not what it means to a NetMD device).
My next step will be to tie this back to the actual commands we have decoded
and decode the content.

Oh yeah, my request and reply blocks are currently in seperate sections ---
it made it easier to spot patterns :)

Key
---
Angle brackets <> are used to group blocks of bytes together (eg the ID
and Opcode fields)

Square brackets [] indicate a number of data bytes whose meaning is specific
to the actual command, eg [6] means 6 bytes (or 3 16 bit words :)

Something like 00 LL means a 16 bit length followed by that many bytes
of data, eg 00 04 01 02 03 04 ... this is how strings and other things 
seem to be encoded.



-----------------------------------------------------------------------------
Group 6 (Get info about disks or tracks)
----------------------------------------
(Unchecked)
<- <00 18 06> <02 10 10 01> [4] ff 00 [4]
<- <09 18 06> <01 20 10 01> [2*] 10 00 [4*] [1]



*** Get Disk Flags:-
-> <00 18 06> <01 10 10 00> ff 00 [4]
P1: 00 01 00 0b
<- <09 18 06> <01 10 10 00> 10 00 [4] ff
           ff = Flags: 10 = Normal (80 minute?) 50 = Write Protected



*** Get Disk Capacity:-
-> <00 18 06> <02 10 10 00> [2][2] ff 00 [4]
P1: 30 80
P2: 03 00
P3: 00 00 00 00
<- <09 18 06> <02 10 10 00> [2][2] 10 00 00 LL 00 00 <data>
           <data1> = 00 LL <data2>
           <data2> = 80 03 00 17 80 00       (???)
                     00 05 00 TT TT TT TT    (Time used ("LP2 seconds"))
                     00 05 00 TT TT TT TT    (Total disk size)
                     00 05 00 TT TT TT TT    (Time available to record)

NB Times are encoded differently here: leading TT is not hundreds of
minutes BCD, but seems to be *hours* BCD... Maybe this is why these are
encoded as 5 bytes and track time etc is encoded as 6?


*** Get Track Count
-> <00 18 06> <02 10 10 01> [2][2] ff 00 [4]
P1: 30 00
P2: 10 00
P3: 00 00 00 00
<- <09 18 06> <02 10 10 01> [2][2] 10 00 00 LL 00 00 <data>
           <data1> = 00 LL <data2>
           <data2> = 00 10 00 02 00 nn
                nn = Number of tracks


*** Get Track Checkout Status:-
-> <00 18 06> <01 20 10 01> [2] ff 00 [4]
P1: 00 tt (tt = Track number)
P2: 00 01 00 08
<- <09 18 06> <01 10 10 00> 10 00 [4] <cc>
           <cc>: 00 = not checked out, 03 = locked?



*** Request Track Length, Bitrate etc:-
-> <00 18 06> <02 20 10 01> [2][2][2] ff 00 [4]
P1: 00 tt (tt = Track number)
P2: 30 80 or 30 00
P3: 07 00 or 01 00
P4: 00 00 00 00
<- <09 18 06> <02 10 10 01> [2][2][2] 10 00 00 LL 00 00 <data>
           <data1> = 00 LL <data2>
If P2 = 3080 and P3 = 0700
           <data2> = 80 07 00 04 01 10 xx yy
           xx = bitrate: 90 = SP, 92 = LP2, 93 = LP4
           yy: 00 = Stereo 01 = Mono
If P2 = 3000 and P3 = 0100
           <data2> = 00 01 00 06 00 00 TT TT TT TT

*** Request Disk Title:-
-> <00 18 06> <02 20 18 01> [2][2][2] ff 00 [4]
P1: 00 00  or 00 01
P2: 30 00
P3: 08 00 or 0a 00
P4: 00 00 00 00
<- <09 18 06> <02 20 18 01> [2][2][2] 10 00 00 LL 00 00 <data>
           <data1> = 00 LL <data2>
If P1 = 0000 and P3 = 0800
           <data2> = 00 08 00 02 80 01
If P1 = 0001 and P3 = 0800
           <data2> = 00 08 00 02 80 ff
If P1 = 0000 and P3 = 0a00
           <data2> = 00 0a 00 LL <string>
           <string> = the actual title string

*** Request Track Title:-
-> <00 18 06> <02 20 18 02> [2][2][2] ff 00 [4]
P1: 00 tt (tt = Track number)
P2: 30 00
P3: 00 0a
P4: 00 00 00 00
<- <09 18 06> <02 20 18 02> [2][2][2] 10 00 00 LL 00 00 <data1>
            <data1> = 00 LL <data2>
            <data2> = 00 0a 00 LL <string>
            <string> = the actual title string


-----------------------------------------------------------------------------
Group 7 (Modify disk/track info)
--------------------------------
<00 18 07> <02 20 18 01> [6] 50 00 00 XX 00 00 00 LL <data>
<00 18 07> <02 20 18 02> [6] 50 00 00 XX 00 00 00 LL <data>
(XX is old header length in one, same as LL in the other)

-----------------------------------------------------------------------------


Group 8 (Handshaking and flow control, maybe?)
----------------------------------------------
-> <00 18 08> <10 10 00 00> 00
<- <09 18 08> <10 10 00 00> 00

-> <00 18 08> <10 10 00 01> 00
<- <09 18 08> <10 10 00 01> 00

-> <00 18 08> <10 10 01 00> 00
<- <09 18 08> <10 10 01 00> 00

-> <00 18 08> <10 10 00 01> 00
<- <09 18 08> <10 10 00 01> 00

-> <00 18 08> <80 00 00 00>
<- <09 18 08> <80 00 00 00>

-> <00 18 08> <80 00 01 00>
<- <09 18 08> <80 00 01 00>

-----------------------------------------------------------------------------


Group 9 (Get status?)
---------------------
* Get Player Status?:-
-> <00 18 09> <80 01 02 30> [2][2][2][1] ff 00 [4]
P1: 88 00
P2: 00 30
P3: 88 04
P4: 00
P5: 00 00 00 00
<- <09 18 09> <80 01 02 30> [2][2][2][1] 10 00 00 LL 00 00 <data1>
            data1 = 00 LL <data2>
            data2 = 88 04 00 03 40 ff 40  ("Normal")
            data2 = 88 04 00 03 80 ff 40  ("No disk")

* Get Disk Status?:-
-> <00 18 09> <80 01 03 30> [2][2][2][2][2][1] ff 00 [4]
P1: 88 01 or 88 02
P2: 00 30
P3: 88 05
P4: 00 30
P5: 88 07 or 88 06
P6: 00 
P7: 00 00 00 00
<- <00 18 09> <80 01 03 30> [2][2][2][2][2][1] 10 00 00 LL 00 00 <data1>
            data1 = 00 LL <data2>
          At startup, P1=8801, P5=8807
            data2 = 88 05 00 88 80 e0 01 10 90 00 40 00
          During playback P1=8802, P5=8806
            data2 = 88 06 00 02 c3 75



*** Get Playback Status?:-
-> <00 18 09> <80 01 04 30> [2][2][2][2][2][2][2][1] ff 00 [4]
P1: 88 02
P2: 00 30
P3: 88 05
P4: 00 30
P5: 00 03
P6: 00 30
P7: 00 02
P8: 00 
P9: 00 00 00 00
<- <00 18 09> <80 01 04 30> [2][2][2][2][2][2][2][1] 10 00 00 LL 00 00 <data1>
            data1 = 00 LL <data2>
	    data2 = 00 02 00 07 00 00 tt TT TT TT TT
                    tt = Current track number   
                    TTTTTTTT = Playback position


-----------------------------------------------------------------------------
Group 40: Zap things

*** Initialise Disc
-> <00 18 40> <ff 00 00>
<- <09 18 40> <00 00 00>
NB1: Only 6 bytes!
NB2: Long pause between send and reply... Open MG seems to poll during
this period

*** Delete track
-> <00 18 40> <ff 01 00 20> [2] [2]
<- <00 18 40> <00 01 00 20> [2] [2]
P1: 10 01  (Maybe some flag to do with checkin/out?)
P2: 00 tt

-----------------------------------------------------------------------------
Group 50: Set playback position?

*** Set Position
-> <00 18 50> <ff 00 00 00> [2] [2] [4]
P1: 00 00         (const?)
P2: 00 tt         (track number)
P3: TT TT TT TT   (playback position in BCD)
<- <09 18 50> <00 00 00 00> [2] [2] [4]


*** Set Track
-> <00 18 50> <ff 01 00 00> [2] [2]
P1: 00 00         (const?)
P2: 00 tt         (track number)
<- <09 18 50> <00 01 00 00> [2] [2]

-----------------------------------------------------------------------------
Group c3: Playback control

*** Fast Forward Mode
-> <00 18 c3> <ff 39 00 00> 00
<- <00 18 c3> <00 39 00 00> 00

*** Rewind Mode
-> <00 18 c3> <ff 49 00 00> 00
<- <00 18 c3> <00 49 00 00> 00

*** Start playback
-> <00 18 c3> <ff 75 00 00> 00
<- <00 18 c3> <00 75 00 00> 00

*** Pause
-> <00 18 c3> <ff 74 00 00> 00
<- <00 18 c3> <00 7d 00 00> 00

-----------------------------------------------------------------------------
Group c5:

*** Stop
-> <00 18 c5> <ff 00 00 00> 00
<- <09 18 c5> <00 00 00 00> 00