1 /* @(#)diskid.c 1.44 10/12/19 Copyright 1998-2010 J. Schilling */
2 #include <schily/mconfig.h>
3 #ifndef lint
4 static UConst char sccsid[] =
5 "@(#)diskid.c 1.44 10/12/19 Copyright 1998-2010 J. Schilling";
6 #endif
7 /*
8 * Disk Idientification Method
9 *
10 * Copyright (c) 1998-2010 J. Schilling
11 */
12 /*
13 * The contents of this file are subject to the terms of the
14 * Common Development and Distribution License, Version 1.0 only
15 * (the "License"). You may not use this file except in compliance
16 * with the License.
17 *
18 * See the file CDDL.Schily.txt in this distribution for details.
19 * A copy of the CDDL is also available via the Internet at
20 * http://www.opensource.org/licenses/cddl1.txt
21 *
22 * When distributing Covered Code, include this CDDL HEADER in each
23 * file and include the License file CDDL.Schily.txt from this distribution.
24 */
25
26 #include <schily/mconfig.h>
27
28 #include <schily/stdio.h>
29 #include <schily/standard.h>
30 #include <schily/utypes.h>
31 #include <schily/schily.h>
32 #include <schily/nlsdefs.h>
33
34 #include "cdrecord.h"
35
36 EXPORT void pr_manufacturer __PR((msf_t *mp, BOOL rw, BOOL audio));
37 LOCAL struct disk_man * man_ptr __PR((msf_t *mp));
38 EXPORT int manufacturer_id __PR((msf_t *mp));
39 EXPORT long disk_rcap __PR((msf_t *mp, long maxblock, BOOL rw, BOOL audio));
40
41 struct disk_man {
42 msf_t mi_msf;
43 char mi_num;
44 char *mi_name;
45 };
46
47 /*
48 * Illegal (old) Manufacturer.
49 */
50 LOCAL char m_ill[] = "Unknown old Manufacturer code";
51 LOCAL char m_illrw[] = "Illegal Manufacturer code";
52
53 /*
54 * Permanent codes.
55 */
56 LOCAL char m_kingpro[] = "King Pro Mediatek Inc.";
57 LOCAL char m_custpo[] = "Customer Pressing Oosterhout";
58 LOCAL char m_taeil[] = "Taeil Media Co.,Ltd.";
59 LOCAL char m_doremi[] = "Doremi Media Co., Ltd.";
60 LOCAL char m_xcitec[] = "Xcitec Inc.";
61 LOCAL char m_leaddata[] = "Lead Data Inc.";
62 LOCAL char m_fuji[] = "FUJI Photo Film Co., Ltd.";
63 LOCAL char m_hitachi[] = "Hitachi Maxell, Ltd.";
64 LOCAL char m_kodakjp[] = "Kodak Japan Limited";
65 LOCAL char m_mitsui[] = "Mitsui Chemicals, Inc.";
66 LOCAL char m_pioneer[] = "Pioneer Video Corporation";
67 LOCAL char m_plasmon[] = "Plasmon Data systems Ltd.";
68 LOCAL char m_princo[] = "Princo Corporation";
69 LOCAL char m_ricoh[] = "Ricoh Company Limited";
70 LOCAL char m_skc[] = "SKC Co., Ltd.";
71 LOCAL char m_tyuden[] = "Taiyo Yuden Company Limited";
72 LOCAL char m_tdk[] = "TDK Corporation";
73 LOCAL char m_mitsubishi[] = "Mitsubishi Chemical Corporation";
74 LOCAL char m_auvistar[] = "Auvistar Industry Co.,Ltd.";
75 LOCAL char m_gigastore[] = "GIGASTORAGE CORPORATION";
76 LOCAL char m_fornet[] = "FORNET INTERNATIONAL PTE LTD.";
77 LOCAL char m_cmc[] = "CMC Magnetics Corporation";
78 LOCAL char m_odm[] = "Optical Disc Manufacturing Equipment";
79 LOCAL char m_ritek[] = "Ritek Co.";
80
81 /*
82 * Tentative codes.
83 */
84 LOCAL char m_bestdisk[] = "Bestdisc Technology Corporation";
85 LOCAL char m_wealth_fair[] = "WEALTH FAIR INVESTMENT LIMITED";
86 LOCAL char m_general_mag[] = "General Magnetics Ld";
87 LOCAL char m_mpo[] = "MPO";
88 LOCAL char m_jvc[] = "VICTOR COMPANY OF JAPAN, LIMITED";
89 LOCAL char m_vivistar[] = "VIVASTAR AG";
90 LOCAL char m_taroko[] = "TAROKO INTERNATIONAL CO.,LTD.";
91 LOCAL char m_unidisc[] = "UNIDISC TECHNOLOGY CO.,LTD";
92 LOCAL char m_hokodig[] = "Hong Kong Digital Technology Co., Ltd.";
93 LOCAL char m_viva[] = "VIVA MAGNETICS LIMITED";
94 LOCAL char m_hile[] = "Hile Optical Disc Technology Corp.";
95 LOCAL char m_friendly[] = "Friendly CD-Tek Co.";
96 LOCAL char m_soundsound[] = "Sound Sound Multi-Media Development Limited";
97 LOCAL char m_kdg[] = "kdg mediatech AG";
98 LOCAL char m_seantram[] = "Seantram Technology Inc.";
99 LOCAL char m_eximpo[] = "EXIMPO";
100 LOCAL char m_delphi[] = "DELPHI TECHNOLOGY INC.";
101 LOCAL char m_harmonic[] = "Harmonic Hall Optical Disc Ltd.";
102 LOCAL char m_guannyinn[] = "Guann Yinn Co.,Ltd.";
103 LOCAL char m_optime[] = "Opti.Me.S. S.p.A.";
104 LOCAL char m_nacar[] = "Nacar Media srl";
105 LOCAL char m_optrom[] = "OPTROM.INC.";
106 LOCAL char m_audiodis[] = "AUDIO DISTRIBUTORS CO., LTD.";
107 LOCAL char m_acer[] = "Acer Media Technology, Inc.";
108 LOCAL char m_woongjin[] = "Woongjin Media corp";
109 LOCAL char m_infodisk[] = "INFODISC Technology Co., Ltd.";
110 LOCAL char m_unitech[] = "UNITECH JAPAN INC.";
111 LOCAL char m_ams[] = "AMS Technology Inc.";
112 LOCAL char m_vanguard[] = "Vanguard Disc Inc.";
113 LOCAL char m_grandadv[] = "Grand Advance Technology Ltd.";
114 LOCAL char m_digitalstor[] = "DIGITAL STORAGE TECHNOLOGY CO.,LTD";
115 LOCAL char m_matsushita[] = "Matsushita Electric Industrial Co.,Ltd.";
116 LOCAL char m_albrechts[] = "CDA Datentr�ger Albrechts GmbH.";
117 LOCAL char m_xalbrechts[] = "??? CDA Datentr�ger Albrechts GmbH.";
118
119 LOCAL char m_prodisc[] = "Prodisc Technology Inc.";
120 LOCAL char m_postech[] = "POSTECH Corporation";
121 #ifdef used
122 LOCAL char m_ncolumbia[] = "NIPPON COLUMBIA CO.,LTD.";
123 #endif
124 LOCAL char m_odc[] = "OPTICAL DISC CORPRATION";
125 LOCAL char m_sony[] = "SONY Corporation";
126 LOCAL char m_cis[] = "CIS Technology Inc.";
127 LOCAL char m_csitaly[] = "Computer Support Italy s.r.l.";
128 LOCAL char m_mmmm[] = "Multi Media Masters & Machinary SA";
129
130 /*
131 * Guessed codes.
132 */
133 /*LOCAL char m_seantram[] = "Seantram Technology Inc.";*/
134 LOCAL char m_advanced[] = "Advanced Digital Media";
135 LOCAL char m_moser[] = "Moser Baer India Limited";
136 LOCAL char m_nanya[] = "NAN-YA Plastics Corporation";
137 LOCAL char m_shenzen[] = "SHENZEN SG&GAST DIGITAL OPTICAL DISCS";
138
139 LOCAL struct disk_man notable =
140 {{00, 00, 00}, -1, "unknown (not in table)" };
141
142 /*
143 * Old (illegal) code table. It lists single specific codes (97:xx:yy).
144 */
145 LOCAL struct disk_man odman[] = {
146 /*
147 * Illegal (old) codes.
148 */
149 {{97, 25, 00}, 80, "ILLEGAL OLD CODE: TDK ???" },
150 {{97, 25, 15}, 0, m_ill },
151 {{97, 27, 00}, 81, "ILLEGAL OLD CODE: Old Ritek Co.???" },
152 {{97, 27, 25}, 0, m_ill },
153 {{97, 30, 00}, 0, m_ill },
154 {{97, 33, 00}, 82, "ILLEGAL OLD CODE: Old CDA Datentr�ger Albrechts GmbH." },
155 {{97, 35, 44}, 0, m_ill },
156 {{97, 39, 00}, 0, m_ill },
157 {{97, 45, 36}, 83, "ILLEGAL OLD CODE: Old Kodak Photo CD" },
158 {{97, 47, 00}, 0, m_ill },
159 {{97, 47, 30}, 0, m_ill },
160 {{97, 48, 14}, 0, m_ill },
161 {{97, 48, 33}, 0, m_ill },
162 {{97, 49, 00}, 0, m_ill },
163 {{97, 54, 00}, 0, m_ill },
164 {{97, 55, 06}, 0, m_ill },
165 {{97, 57, 00}, 0, m_ill },
166 /*
167 * List end marker
168 */
169 {{00, 00, 00}, 0, NULL },
170 };
171
172 #define noman (sizeof (oman)/sizeof (oman[0]))
173
174 /*
175 * Actual code table. It lists code ranges (97:xx:y0 - 97:xx:y9).
176 *
177 * Note that dp->mi_msf.msf_frame needs to be always rounded down
178 * to 0 even for media that has e.g. 97:27/01 in the official table.
179 */
180 LOCAL struct disk_man dman[] = {
181 /*
182 * Permanent codes.
183 */
184
185 {{97, 22, 10}, 53, m_seantram },
186 {{97, 15, 00}, 26, m_tdk },
187 {{97, 49, 30}, 47, m_optime },
188 {{97, 28, 00}, 47, m_optime },
189 {{97, 28, 40}, 36, m_kingpro },
190 {{97, 23, 60}, 49, m_custpo },
191 {{97, 29, 00}, 37, m_taeil },
192 {{97, 26, 10}, 19, m_postech },
193 {{97, 47, 40}, 19, m_postech },
194 {{97, 24, 10}, 24, m_sony },
195 /* {{97, 46, 10}, 24, m_sony },*/
196 {{97, 23, 10}, 33, m_doremi },
197 {{97, 25, 60}, 30, m_xcitec },
198 {{97, 45, 60}, 30, m_xcitec },
199 {{97, 26, 50}, 10, m_leaddata },
200 {{97, 48, 60}, 10, m_leaddata },
201 {{97, 26, 40}, 6, m_fuji },
202 {{97, 46, 40}, 6, m_fuji },
203 {{97, 25, 20}, 8, m_hitachi },
204 {{97, 47, 10}, 8, m_hitachi },
205 {{97, 27, 40}, 9, m_kodakjp },
206 {{97, 48, 10}, 9, m_kodakjp },
207 {{97, 27, 50}, 12, m_mitsui },
208 {{97, 48, 50}, 12, m_mitsui },
209 {{97, 27, 30}, 17, m_pioneer },
210 {{97, 48, 30}, 17, m_pioneer },
211 {{97, 27, 10}, 18, m_plasmon },
212 {{97, 48, 20}, 18, m_plasmon },
213 {{97, 27, 20}, 20, m_princo },
214 {{97, 47, 20}, 20, m_princo },
215 {{97, 27, 60}, 21, m_ricoh },
216 {{97, 48, 00}, 21, m_ricoh },
217 {{97, 26, 20}, 23, m_skc },
218 {{97, 24, 00}, 25, m_tyuden },
219 {{97, 46, 00}, 25, m_tyuden },
220 {{97, 32, 00}, 26, m_tdk },
221 {{97, 49, 00}, 26, m_tdk },
222 {{97, 34, 20}, 11, m_mitsubishi },
223 {{97, 50, 20}, 11, m_mitsubishi },
224 {{97, 28, 30}, 1, m_auvistar },
225 {{97, 46, 50}, 1, m_auvistar },
226 {{97, 28, 10}, 7, m_gigastore },
227 {{97, 49, 10}, 7, m_gigastore },
228 {{97, 26, 00}, 5, m_fornet },
229 {{97, 45, 00}, 5, m_fornet },
230 {{97, 26, 60}, 3, m_cmc },
231 {{97, 46, 60}, 3, m_cmc },
232 {{97, 21, 40}, 16, m_odm },
233 {{97, 31, 00}, 22, m_ritek },
234 {{97, 47, 50}, 22, m_ritek },
235 {{97, 28, 20}, 13, m_mmmm },
236 {{97, 46, 20}, 13, m_mmmm },
237 {{97, 32, 10}, 27, m_prodisc },
238
239 /*
240 * Tentative codes.
241 */
242 {{97, 21, 30}, 67, m_bestdisk },
243 {{97, 18, 10}, 66, m_wealth_fair },
244 {{97, 29, 50}, 65, m_general_mag },
245 {{97, 25, 00}, 64, m_mpo }, /* in reality 25/01 */
246 {{97, 49, 40}, 63, m_jvc },
247 {{97, 23, 40}, 63, m_jvc },
248 {{97, 25, 40}, 62, m_vivistar },
249 {{97, 18, 60}, 61, m_taroko },
250 {{97, 29, 20}, 60, m_unidisc },
251 {{97, 46, 10}, 59, m_hokodig }, /* XXX was m_sony */
252 {{97, 22, 50}, 59, m_hokodig },
253 {{97, 29, 40}, 58, m_viva },
254 {{97, 29, 30}, 57, m_hile },
255 {{97, 51, 50}, 57, m_hile },
256 {{97, 28, 60}, 56, m_friendly },
257 {{97, 21, 50}, 55, m_soundsound },
258 {{97, 24, 40}, 54, m_kdg },
259 {{97, 22, 30}, 52, m_eximpo },
260 {{97, 28, 50}, 51, m_delphi },
261 {{97, 29, 00}, 50, m_harmonic },
262 {{97, 15, 10}, 22, m_ritek },
263 {{97, 45, 50}, 48, m_guannyinn },
264 {{97, 24, 50}, 48, m_guannyinn },
265 {{97, 23, 20}, 46, m_nacar },
266 {{97, 23, 50}, 45, m_optrom },
267 {{97, 23, 30}, 44, m_audiodis },
268 {{97, 22, 60}, 43, m_acer },
269 {{97, 45, 20}, 43, m_acer },
270 {{97, 15, 20}, 11, m_mitsubishi },
271 {{97, 22, 00}, 39, m_woongjin },
272 {{97, 25, 30}, 40, m_infodisk },
273 {{97, 51, 20}, 40, m_infodisk },
274 {{97, 24, 30}, 41, m_unitech },
275 {{97, 25, 50}, 42, m_ams },
276 {{97, 29, 10}, 38, m_vanguard },
277 {{97, 50, 10}, 38, m_vanguard },
278 {{97, 16, 30}, 35, m_grandadv },
279 {{97, 31, 30}, 35, m_grandadv },
280 {{97, 51, 10}, 35, m_grandadv },
281 {{97, 49, 20}, 36, m_kingpro },
282 {{97, 27, 00}, 34, m_digitalstor }, /* in reality 27/01 */
283 {{97, 48, 40}, 34, m_digitalstor }, /* XXX was m_ncolumbia */
284 {{97, 23, 00}, 31, m_matsushita },
285 {{97, 49, 60}, 31, m_matsushita },
286 {{97, 30, 10}, 32, m_albrechts }, /* XXX was m_ncolumbia */
287 {{97, 50, 30}, 32, m_albrechts },
288 {{97, 47, 60}, 27, m_prodisc },
289 /* {{97, 30, 10}, 14, m_ncolumbia },*/
290 /* {{97, 48, 40}, 14, m_ncolumbia },*/
291 {{97, 26, 30}, 15, m_odc },
292 {{97, 22, 40}, 2, m_cis },
293 {{97, 45, 40}, 2, m_cis },
294 {{97, 24, 20}, 4, m_csitaly },
295 {{97, 46, 30}, 4, m_csitaly },
296
297 /*
298 * Guessed codes.
299 */
300 {{97, 20, 10}, 32, m_xalbrechts }, /* XXX guess */
301 /* {{97, 23, 40}, 32, m_xalbrechts },*/ /* Really is JVC */
302
303 /*
304 * New guessed codes (2002 ff.).
305 * Id code >= 68 referres to a new manufacturer.
306 */
307 #define I_GUESS 105
308 {{97, 22, 20}, 68, m_advanced },
309 {{97, 42, 20}, 68, m_advanced },
310 {{97, 24, 60}, 50, m_harmonic },
311 {{97, 17, 00}, 69, m_moser },
312 {{97, 15, 30}, 70, m_nanya },
313 {{97, 16, 20}, 71, m_shenzen },
314 {{97, 45, 10}, 41, m_unitech },
315
316 /*
317 * List end marker
318 */
319 {{00, 00, 00}, 0, NULL },
320 };
321
322 #define ndman (sizeof (dman)/sizeof (dman[0]))
323
324 LOCAL struct disk_man *
man_ptr(mp)325 man_ptr(mp)
326 msf_t *mp;
327 {
328 struct disk_man * dp;
329 int frame;
330 int type;
331
332 type = mp->msf_frame % 10;
333 frame = mp->msf_frame - type;
334
335 dp = odman;
336 while (dp->mi_msf.msf_min != 0) {
337 if (mp->msf_min == dp->mi_msf.msf_min &&
338 mp->msf_sec == dp->mi_msf.msf_sec &&
339 mp->msf_frame == dp->mi_msf.msf_frame) {
340 return (dp);
341 }
342 dp++;
343 }
344 dp = dman;
345 while (dp->mi_msf.msf_min != 0) {
346 if (mp->msf_min == dp->mi_msf.msf_min &&
347 mp->msf_sec == dp->mi_msf.msf_sec &&
348 frame == dp->mi_msf.msf_frame) {
349 /*
350 * Note that dp->mi_msf.msf_frame is always rounded
351 * down to 0 even for media that has 97:27/01 in the
352 * official table.
353 */
354 return (dp);
355 }
356 dp++;
357 }
358 return (NULL);
359 }
360
361 EXPORT void
pr_manufacturer(mp,rw,audio)362 pr_manufacturer(mp, rw, audio)
363 msf_t *mp;
364 BOOL rw;
365 BOOL audio;
366 {
367 struct disk_man * dp;
368 struct disk_man xdman;
369 int type;
370 char *tname;
371
372 /* printf("pr_manufacturer rw: %d audio: %d\n", rw, audio);*/
373
374 type = mp->msf_frame % 10;
375 if (type < 5) {
376 tname = _("Long strategy type (Cyanine, AZO or similar)");
377 } else {
378 tname = _("Short strategy type (Phthalocyanine or similar)");
379 }
380 if (rw) {
381 tname = _("Phase change");
382 }
383
384 dp = man_ptr(mp);
385 if (dp != NULL) {
386 if (dp->mi_num == 0 || dp->mi_num >= 80) {
387 if (!rw) {
388 tname = _("unknown dye (old id code)");
389 } else {
390 xdman = *dp;
391 dp = &xdman;
392 dp->mi_num = 0;
393 dp->mi_name = m_illrw;
394 }
395 }
396 } else {
397 tname = _("unknown dye (reserved id code)");
398 dp = ¬able;
399 }
400 printf(_("Disk type: %s\n"), tname);
401 printf(_("Manuf. index: %d\n"), dp->mi_num);
402 printf(_("Manufacturer: %s\n"), dp->mi_name);
403
404 if (mp->msf_min != 97) /* This may be garbage ATIP from a DVD */
405 return;
406
407 if (dp >= &dman[I_GUESS] && dp < &dman[ndman]) {
408 printf(_("Manufacturer is guessed because of the orange forum embargo.\n"));
409 printf(_("The orange forum likes to get money for recent information.\n"));
410 printf(_("The information for this media may not be correct.\n"));
411 }
412 if (dp == ¬able) {
413 printf(_("Manufacturer is unknown because of the orange forum embargo.\n"));
414 printf(_("As the orange forum likes to get money for recent information,\n"));
415 printf(_("it may be that this media does not use illegal manufacturer coding.\n"));
416 }
417 }
418
419 EXPORT int
manufacturer_id(mp)420 manufacturer_id(mp)
421 msf_t *mp;
422 {
423 struct disk_man * dp;
424
425 dp = man_ptr(mp);
426 if (dp != NULL)
427 return (dp->mi_num);
428 return (-1);
429 }
430
431 struct disk_rcap {
432 msf_t ci_msf; /* Lead in start time */
433 long ci_cap; /* Lead out start time */
434 long ci_rcap; /* Abs max lead out start */
435 };
436
437 LOCAL struct disk_rcap rcap[] = {
438
439 #ifdef __redbook_only__
440 {{97, 35, 44}, 359849, 404700 }, /*! Unknown 99 min (89:58/00)*/
441 #endif
442 {{97, 35, 44}, 359849, 449700 }, /*! Unknown 99 min (99:58/00) */
443 {{97, 31, 00}, 359849, 368923 }, /*! Arita CD-R 80 */
444 {{97, 26, 50}, 359849, 369096 }, /*! Lead Data CD-R 80 */
445 {{97, 26, 12}, 359849, 368000 }, /*X POSTECH 80 Min */
446 {{97, 25, 00}, 359849, 374002 }, /* TDK 80 Minuten */
447 {{97, 20, 14}, 359700, 376386 }, /*! Albrechts DataFile Plus */
448 {{97, 35, 44}, 359100, 368791 }, /*! NoName BC-1 700 Mb/80 Min */
449
450 {{97, 26, 60}, 337350, 349030 }, /* Koch gr�n CD-R74PRO */
451 {{97, 26, 50}, 337050, 351205 }, /* Saba */
452 {{97, 26, 00}, 337050, 351411 }, /*!DGN (FORNET) */
453 {{97, 22, 40}, 336631, 349971 }, /* Targa gr�n CD-R74 */
454 {{97, 26, 50}, 336631, 351727 }, /*! Sunstar (Lead Data) */
455 {{97, 26, 55}, 336631, 350474 }, /*! NoName ZAP (Lead Data) */
456
457 {{97, 27, 28}, 336601, 346489 }, /*! BTC CD-R (Princo) */
458 {{97, 27, 30}, 336601, 351646 }, /*! Pioneer blau CDM-W74S */
459 {{97, 27, 31}, 336601, 351379 }, /* Pioneer blau CDM-W74S */
460 {{97, 27, 33}, 336601, 347029 }, /*! Pioneer braun CDM-V74S */
461 {{97, 26, 40}, 336225, 346210 }, /* Fuji Silver Disk */
462 {{97, 28, 10}, 336225, 348757 }, /*!GigaStorage Cursor CD-R */
463 {{97, 31, 00}, 336225, 345460 }, /* Arita gr�n */
464 {{97, 25, 28}, 336075, 352879 }, /* Maxell gold CD-R74G */
465 {{97, 24, 01}, 336075, 346856 }, /*!Philips Premium Silver */
466 {{97, 24, 00}, 336075, 346741 }, /* Philips gr�n CD-R74 */
467
468 {{97, 22, 41}, 335206, 349385 }, /* Octek gr�n */
469 {{97, 34, 20}, 335100, 342460 }, /* Verbatim DataLifePlus */
470 {{97, 33, 00}, 335100, 344634 }, /*!ITS Singapore (braun/gr�n) */
471 {{97, 32, 19}, 335100, 343921 }, /*!Prodisc silber/silber */
472 {{97, 25, 21}, 335100, 346013 }, /* Maxell gr�n CD-R74XL */
473 {{97, 27, 00}, 335100, 353448 }, /* TDK gr�n CD-RXG74 */
474 {{97, 27, 31}, 335100, 351862 }, /*!Maxell CD-R74MU (Musik) */
475 {{97, 27, 33}, 335100, 351336 }, /* Pioneer RDD-74A */
476
477 {{97, 26, 60}, 334259, 349036 }, /* BASF gr�n */
478 {{97, 28, 21}, 333976, 348217 }, /*! Noname-B (MMMM) */
479 {{97, 28, 20}, 333976, 346485 }, /* Koch gr�n CD-R74 PRO */
480 {{97, 32, 00}, 333975, 345736 }, /* Imation 3M */
481 {{97, 32, 00}, 333975, 348835 }, /* TDK Reflex X CD-R74 */
482 {{97, 30, 18}, 333899, 344857 }, /* HiSpace gr�n */
483 {{97, 27, 66}, 333750, 352726 }, /*!Philips Megalife (Musik) */
484 {{97, 28, 43}, 333750, 345344 }, /*!MMore CD-R */
485 {{97, 27, 65}, 333750, 348343 }, /* Ricoh gold */
486
487 {{97, 27, 00}, 333750, 336246 }, /* BestMedia gr�n CD-R74 */
488 {{97, 27, 28}, 333491, 347473 }, /* Fuji gr�n (alt) */
489 {{97, 24, 48}, 333491, 343519 }, /* BASF (alt) */
490 {{97, 27, 55}, 333235, 343270 }, /* Teac gold CD-R74 */
491 {{97, 27, 45}, 333226, 343358 }, /* Kodak gold */
492 {{97, 28, 20}, 333226, 346483 }, /* SAST gr�n */
493 {{97, 27, 45}, 333226, 343357 }, /* Mitsumi gold */
494 {{97, 28, 25}, 333226, 346481 }, /* Cedar Gr�n */
495 {{97, 23, 00}, 333226, 346206 }, /* Fuji gr�n (alt) */
496 {{97, 33, 00}, 333225, 349623 }, /* DataFile Albrechts */
497 {{97, 24, 24}, 333198, 342536 }, /*!SUN CD Recordable */
498
499 {{97, 27, 19}, 332850, 348442 }, /* Plasmon gold PCD-R74 */
500 {{97, 32, 00}, 96600, 106502 }, /* TDK 80mm (for music only) */
501
502 /*
503 * List end marker
504 */
505 {{00, 00, 00}, 0L, 0L },
506 };
507
508 EXPORT long
disk_rcap(mp,maxblock,rw,audio)509 disk_rcap(mp, maxblock, rw, audio)
510 msf_t *mp;
511 long maxblock;
512 BOOL rw;
513 BOOL audio;
514 {
515 struct disk_rcap * dp;
516
517 dp = rcap;
518 while (dp->ci_msf.msf_min != 0) {
519 if (mp->msf_min == dp->ci_msf.msf_min &&
520 mp->msf_sec == dp->ci_msf.msf_sec &&
521 mp->msf_frame == dp->ci_msf.msf_frame &&
522 maxblock == dp->ci_cap)
523 return (dp->ci_rcap);
524 dp++;
525 }
526 return (0L);
527 }
528