leo_tbl.c
20 KB
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
/*
* F i l e N a m e : l e o _ t b l . c
*
****************************************************************************
* (C) Copyright ALPS Electric Co., Ltd. 1995-1996
****************************************************************************
* Version
*
* ver Date
* ---- --------
* 1.28 '98-04-22 Update device_driver revision(27->28).
* Add LEOWRITER_END_LBA[].
* 1.27 '98-02-17 Make B114.Update revision(26->27).
* 1.26 '97-11-18 Updata device_driver revision(25->26).
* 1.25 '97-06-23 Updata device_driver revision(24->25).
* 1.24 '97-06-18 Updata device_driver revision(23->24).
* 1.23 '97-02-19 Updata device_driver revision(22->23).
* 1.22 '97-01-10 Updata device_driver revision(21->22).
* Change B014B for "_ERRCHK",B014C for "_LONGCMD".
* 1.21 '96-12-24 Updata device_driver revision(A20->A21,X20->X21).
* Delete gap-table.
* 1.20 '96-12-03 Change "#ifdef _ERRCHK" for revision B014X20.
* '96-12-03 Updata device_driver revision(A19 -> A20).
* 1.19 '96-11-27 Add "#ifdef _ERRCHK" for revision B064A19.
* 1.18 '96-11-14 Updata device_driver revision(A18 -> A19).
* 1.17a '96-11-08 Updata device_driver revision(A18 -> A18X).
* 1.17 '96-11-01 Delete LEOcmd_post_offset table.
* Updata device_driver revision(A17 -> A18).
* 1.16 '96-10-01 Updata device_driver revision(A16 -> A17).
* 1.15 '96-09-20 Updata device_driver revision(A15 -> A16).
* Change LEOZONE_SCYL_TBL[] is new format_type only support.
* 1.14 '96-09-18 Updata device_driver revision(A14 -> A15).
* 1.13 '96-09-17 Updata device_driver revision(A13 -> A14).
* 1.12 '96-09-11 Updata device_driver revision(A12 -> A13).
* Add LEOZONE_OUTERCYL_TBL[] .
* Change LEOZONE_SCYL_TBL[] to 2 format_type .
* 1.11 '96-08-27 Updata device_driver revision(A11 -> A12).
* Remove KAIHATU definition.
* 1.10 '96-08-22 Updata device_driver revision(A10 -> A11).
* Add LEOcmd_post_offset for leoReadDiskId command.
* 1.10 '96-08-09 Updata device_driver revision(A09 -> A10).
* 1.09 '96-08-02 Updata device_driver revision(A08 -> A09).
* 1.08 '96-07-16 Updata device_driver revision(A07 -> A08).
* 1.07 '96-06-24 Update device_driver revision(A06 -> A07).
* 1.06 '96-06-12 Update device_driver revision(A05 -> A06).
* 1.05 '96-05-22 Update device_driver revision(A04 -> A05).
* 1.04 '96-05-08 Update device_driver revision(A03 -> A04).
* 1.03 '96-04-05 Change DISK TYPE TBL .
* 1.02 '96-03-13 Update device_driver revision(A02 -> A03).
* 1.01 '96-02-13 Modefy.
* 1.00 '95-12-17 Initial revision .
****************************************************************************
*/
#define _WRITER
#include <ultra64.h>
#include "leodefine.h"
#include "leodrive.h"
#define BLK_PER_LZONE0_T0 ( (TK_PER_ZONE0_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE1_T0 (BLK_PER_LZONE0_T0 + (TK_PER_ZONE1_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE2_T0 (BLK_PER_LZONE1_T0 + (TK_PER_ZONE2_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE3_T0 (BLK_PER_LZONE2_T0 + (TK_PER_ZONE2_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE4_T0 (BLK_PER_LZONE3_T0 + (TK_PER_ZONE1_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE5_T0 (BLK_PER_LZONE4_T0 + (TK_PER_ZONE3_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE6_T0 (BLK_PER_LZONE5_T0 + (TK_PER_ZONE4_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE7_T0 (BLK_PER_LZONE6_T0 + (TK_PER_ZONE5_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE8_T0 (BLK_PER_LZONE7_T0 + (TK_PER_ZONE6_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE9_T0 (BLK_PER_LZONE8_T0 + (TK_PER_ZONE7_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE10_T0 (BLK_PER_LZONE9_T0 + (TK_PER_ZONE8_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE11_T0 (BLK_PER_LZONE10_T0 + (TK_PER_ZONE7_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE12_T0 (BLK_PER_LZONE11_T0 + (TK_PER_ZONE6_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE13_T0 (BLK_PER_LZONE12_T0 + (TK_PER_ZONE5_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE14_T0 (BLK_PER_LZONE13_T0 + (TK_PER_ZONE4_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE15_T0 (BLK_PER_LZONE14_T0 + (TK_PER_ZONE3_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE0_T1 ( (TK_PER_ZONE0_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE1_T1 (BLK_PER_LZONE0_T1 + (TK_PER_ZONE1_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE2_T1 (BLK_PER_LZONE1_T1 + (TK_PER_ZONE2_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE3_T1 (BLK_PER_LZONE2_T1 + (TK_PER_ZONE3_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE4_T1 (BLK_PER_LZONE3_T1 + (TK_PER_ZONE3_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE5_T1 (BLK_PER_LZONE4_T1 + (TK_PER_ZONE2_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE6_T1 (BLK_PER_LZONE5_T1 + (TK_PER_ZONE1_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE7_T1 (BLK_PER_LZONE6_T1 + (TK_PER_ZONE4_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE8_T1 (BLK_PER_LZONE7_T1 + (TK_PER_ZONE5_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE9_T1 (BLK_PER_LZONE8_T1 + (TK_PER_ZONE6_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE10_T1 (BLK_PER_LZONE9_T1 + (TK_PER_ZONE7_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE11_T1 (BLK_PER_LZONE10_T1 + (TK_PER_ZONE8_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE12_T1 (BLK_PER_LZONE11_T1 + (TK_PER_ZONE7_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE13_T1 (BLK_PER_LZONE12_T1 + (TK_PER_ZONE6_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE14_T1 (BLK_PER_LZONE13_T1 + (TK_PER_ZONE5_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE15_T1 (BLK_PER_LZONE14_T1 + (TK_PER_ZONE4_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE0_T2 ( (TK_PER_ZONE0_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE1_T2 (BLK_PER_LZONE0_T2 + (TK_PER_ZONE1_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE2_T2 (BLK_PER_LZONE1_T2 + (TK_PER_ZONE2_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE3_T2 (BLK_PER_LZONE2_T2 + (TK_PER_ZONE3_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE4_T2 (BLK_PER_LZONE3_T2 + (TK_PER_ZONE4_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE5_T2 (BLK_PER_LZONE4_T2 + (TK_PER_ZONE4_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE6_T2 (BLK_PER_LZONE5_T2 + (TK_PER_ZONE3_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE7_T2 (BLK_PER_LZONE6_T2 + (TK_PER_ZONE2_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE8_T2 (BLK_PER_LZONE7_T2 + (TK_PER_ZONE1_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE9_T2 (BLK_PER_LZONE8_T2 + (TK_PER_ZONE5_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE10_T2 (BLK_PER_LZONE9_T2 + (TK_PER_ZONE6_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE11_T2 (BLK_PER_LZONE10_T2 + (TK_PER_ZONE7_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE12_T2 (BLK_PER_LZONE11_T2 + (TK_PER_ZONE8_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE13_T2 (BLK_PER_LZONE12_T2 + (TK_PER_ZONE7_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE14_T2 (BLK_PER_LZONE13_T2 + (TK_PER_ZONE6_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE15_T2 (BLK_PER_LZONE14_T2 + (TK_PER_ZONE5_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE0_T3 ( (TK_PER_ZONE0_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE1_T3 (BLK_PER_LZONE0_T3 + (TK_PER_ZONE1_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE2_T3 (BLK_PER_LZONE1_T3 + (TK_PER_ZONE2_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE3_T3 (BLK_PER_LZONE2_T3 + (TK_PER_ZONE3_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE4_T3 (BLK_PER_LZONE3_T3 + (TK_PER_ZONE4_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE5_T3 (BLK_PER_LZONE4_T3 + (TK_PER_ZONE5_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE6_T3 (BLK_PER_LZONE5_T3 + (TK_PER_ZONE5_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE7_T3 (BLK_PER_LZONE6_T3 + (TK_PER_ZONE4_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE8_T3 (BLK_PER_LZONE7_T3 + (TK_PER_ZONE3_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE9_T3 (BLK_PER_LZONE8_T3 + (TK_PER_ZONE2_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE10_T3 (BLK_PER_LZONE9_T3 + (TK_PER_ZONE1_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE11_T3 (BLK_PER_LZONE10_T3 + (TK_PER_ZONE6_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE12_T3 (BLK_PER_LZONE11_T3 + (TK_PER_ZONE7_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE13_T3 (BLK_PER_LZONE12_T3 + (TK_PER_ZONE8_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE14_T3 (BLK_PER_LZONE13_T3 + (TK_PER_ZONE7_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE15_T3 (BLK_PER_LZONE14_T3 + (TK_PER_ZONE6_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE0_T4 ( (TK_PER_ZONE0_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE1_T4 (BLK_PER_LZONE0_T4 + (TK_PER_ZONE1_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE2_T4 (BLK_PER_LZONE1_T4 + (TK_PER_ZONE2_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE3_T4 (BLK_PER_LZONE2_T4 + (TK_PER_ZONE3_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE4_T4 (BLK_PER_LZONE3_T4 + (TK_PER_ZONE4_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE5_T4 (BLK_PER_LZONE4_T4 + (TK_PER_ZONE5_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE6_T4 (BLK_PER_LZONE5_T4 + (TK_PER_ZONE6_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE7_T4 (BLK_PER_LZONE6_T4 + (TK_PER_ZONE6_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE8_T4 (BLK_PER_LZONE7_T4 + (TK_PER_ZONE5_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE9_T4 (BLK_PER_LZONE8_T4 + (TK_PER_ZONE4_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE10_T4 (BLK_PER_LZONE9_T4 + (TK_PER_ZONE3_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE11_T4 (BLK_PER_LZONE10_T4 + (TK_PER_ZONE2_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE12_T4 (BLK_PER_LZONE11_T4 + (TK_PER_ZONE1_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE13_T4 (BLK_PER_LZONE12_T4 + (TK_PER_ZONE7_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE14_T4 (BLK_PER_LZONE13_T4 + (TK_PER_ZONE8_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE15_T4 (BLK_PER_LZONE14_T4 + (TK_PER_ZONE7_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE0_T5 ( (TK_PER_ZONE0_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE1_T5 (BLK_PER_LZONE0_T5 + (TK_PER_ZONE1_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE2_T5 (BLK_PER_LZONE1_T5 + (TK_PER_ZONE2_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE3_T5 (BLK_PER_LZONE2_T5 + (TK_PER_ZONE3_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE4_T5 (BLK_PER_LZONE3_T5 + (TK_PER_ZONE4_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE5_T5 (BLK_PER_LZONE4_T5 + (TK_PER_ZONE5_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE6_T5 (BLK_PER_LZONE5_T5 + (TK_PER_ZONE6_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE7_T5 (BLK_PER_LZONE6_T5 + (TK_PER_ZONE7_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE8_T5 (BLK_PER_LZONE7_T5 + (TK_PER_ZONE7_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE9_T5 (BLK_PER_LZONE8_T5 + (TK_PER_ZONE6_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE10_T5 (BLK_PER_LZONE9_T5 + (TK_PER_ZONE5_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE11_T5 (BLK_PER_LZONE10_T5 + (TK_PER_ZONE4_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE12_T5 (BLK_PER_LZONE11_T5 + (TK_PER_ZONE3_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE13_T5 (BLK_PER_LZONE12_T5 + (TK_PER_ZONE2_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE14_T5 (BLK_PER_LZONE13_T5 + (TK_PER_ZONE1_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE15_T5 (BLK_PER_LZONE14_T5 + (TK_PER_ZONE8_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE0_T6 ( (TK_PER_ZONE0_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE1_T6 (BLK_PER_LZONE0_T6 + (TK_PER_ZONE1_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE2_T6 (BLK_PER_LZONE1_T6 + (TK_PER_ZONE2_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE3_T6 (BLK_PER_LZONE2_T6 + (TK_PER_ZONE3_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE4_T6 (BLK_PER_LZONE3_T6 + (TK_PER_ZONE4_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE5_T6 (BLK_PER_LZONE4_T6 + (TK_PER_ZONE5_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE6_T6 (BLK_PER_LZONE5_T6 + (TK_PER_ZONE6_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE7_T6 (BLK_PER_LZONE6_T6 + (TK_PER_ZONE7_HD0-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE8_T6 (BLK_PER_LZONE7_T6 + (TK_PER_ZONE8_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE9_T6 (BLK_PER_LZONE8_T6 + (TK_PER_ZONE7_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE10_T6 (BLK_PER_LZONE9_T6 + (TK_PER_ZONE6_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE11_T6 (BLK_PER_LZONE10_T6 + (TK_PER_ZONE5_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE12_T6 (BLK_PER_LZONE11_T6 + (TK_PER_ZONE4_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE13_T6 (BLK_PER_LZONE12_T6 + (TK_PER_ZONE3_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE14_T6 (BLK_PER_LZONE13_T6 + (TK_PER_ZONE2_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define BLK_PER_LZONE15_T6 (BLK_PER_LZONE14_T6 + (TK_PER_ZONE1_HD1-ALT_TK_PER_ZONE)*BLK_P_TRK)
#define START_TK_ZONE0_HD0 0
#define START_TK_ZONE1_HD0 (TK_PER_ZONE0_HD0 + START_TK_ZONE0_HD0)
#define START_TK_ZONE2_HD0 (TK_PER_ZONE1_HD0 + START_TK_ZONE1_HD0)
#define START_TK_ZONE3_HD0 (TK_PER_ZONE2_HD0 + START_TK_ZONE2_HD0)
#define START_TK_ZONE4_HD0 (TK_PER_ZONE3_HD0 + START_TK_ZONE3_HD0)
#define START_TK_ZONE5_HD0 (TK_PER_ZONE4_HD0 + START_TK_ZONE4_HD0)
#define START_TK_ZONE6_HD0 (TK_PER_ZONE5_HD0 + START_TK_ZONE5_HD0)
#define START_TK_ZONE7_HD0 (TK_PER_ZONE6_HD0 + START_TK_ZONE6_HD0)
#define START_TK_ZONE1_HD1 0
#define START_TK_ZONE2_HD1 (TK_PER_ZONE1_HD1 + START_TK_ZONE1_HD1)
#define START_TK_ZONE3_HD1 (TK_PER_ZONE2_HD1 + START_TK_ZONE2_HD1)
#define START_TK_ZONE4_HD1 (TK_PER_ZONE3_HD1 + START_TK_ZONE3_HD1)
#define START_TK_ZONE5_HD1 (TK_PER_ZONE4_HD1 + START_TK_ZONE4_HD1)
#define START_TK_ZONE6_HD1 (TK_PER_ZONE5_HD1 + START_TK_ZONE5_HD1)
#define START_TK_ZONE7_HD1 (TK_PER_ZONE6_HD1 + START_TK_ZONE6_HD1)
#define START_TK_ZONE8_HD1 (TK_PER_ZONE7_HD1 + START_TK_ZONE7_HD1)
#define END_TK_ZONE1_HD1 (TK_PER_ZONE1_HD1 - ALT_TK_PER_ZONE - 1)
#define END_TK_ZONE2_HD1 (TK_PER_ZONE2_HD1 + END_TK_ZONE1_HD1)
#define END_TK_ZONE3_HD1 (TK_PER_ZONE3_HD1 + END_TK_ZONE2_HD1)
#define END_TK_ZONE4_HD1 (TK_PER_ZONE4_HD1 + END_TK_ZONE3_HD1)
#define END_TK_ZONE5_HD1 (TK_PER_ZONE5_HD1 + END_TK_ZONE4_HD1)
#define END_TK_ZONE6_HD1 (TK_PER_ZONE6_HD1 + END_TK_ZONE5_HD1)
#define END_TK_ZONE7_HD1 (TK_PER_ZONE7_HD1 + END_TK_ZONE6_HD1)
#define END_TK_ZONE8_HD1 (TK_PER_ZONE8_HD1 + END_TK_ZONE7_HD1)
/* Firmware Revision */
#ifdef _LONGCMD
const s8 LEOfirmware_rev[] = {"B114C28"};
#else
#ifdef _ERRCHK
const s8 LEOfirmware_rev[] = {"B114B28"};
#else
const s8 LEOfirmware_rev[] = {"B114A28"};
#endif
#endif
/* Sector bytes for zone */
const u8 LEOBYTE_TBL1[ZONES_PER_DRV] = {
SEC_SIZE_ZONE0,
SEC_SIZE_ZONE1,
SEC_SIZE_ZONE2,
SEC_SIZE_ZONE3,
SEC_SIZE_ZONE4,
SEC_SIZE_ZONE5,
SEC_SIZE_ZONE6,
SEC_SIZE_ZONE7,
SEC_SIZE_ZONE8 };
/* Block bytes for zone */
const u16 LEOBYTE_TBL2[ZONES_PER_DRV] = {
SEC_SIZE_ZONE0*USR_SECS_PER_BLK,
SEC_SIZE_ZONE1*USR_SECS_PER_BLK,
SEC_SIZE_ZONE2*USR_SECS_PER_BLK,
SEC_SIZE_ZONE3*USR_SECS_PER_BLK,
SEC_SIZE_ZONE4*USR_SECS_PER_BLK,
SEC_SIZE_ZONE5*USR_SECS_PER_BLK,
SEC_SIZE_ZONE6*USR_SECS_PER_BLK,
SEC_SIZE_ZONE7*USR_SECS_PER_BLK,
SEC_SIZE_ZONE8*USR_SECS_PER_BLK };
/* Sum of block number for zone and drive-type */
const u16 LEOVZONE_TBL[DISK_TYPES][VZONES_PER_DRV] = {
{ BLK_PER_LZONE0_T0 , BLK_PER_LZONE1_T0 , BLK_PER_LZONE2_T0 , BLK_PER_LZONE3_T0 ,
BLK_PER_LZONE4_T0 , BLK_PER_LZONE5_T0 , BLK_PER_LZONE6_T0 , BLK_PER_LZONE7_T0 ,
BLK_PER_LZONE8_T0 , BLK_PER_LZONE9_T0 , BLK_PER_LZONE10_T0, BLK_PER_LZONE11_T0,
BLK_PER_LZONE12_T0, BLK_PER_LZONE13_T0, BLK_PER_LZONE14_T0, BLK_PER_LZONE15_T0 },
{ BLK_PER_LZONE0_T1 , BLK_PER_LZONE1_T1 , BLK_PER_LZONE2_T1 , BLK_PER_LZONE3_T1 ,
BLK_PER_LZONE4_T1 , BLK_PER_LZONE5_T1 , BLK_PER_LZONE6_T1 , BLK_PER_LZONE7_T1 ,
BLK_PER_LZONE8_T1 , BLK_PER_LZONE9_T1 , BLK_PER_LZONE10_T1, BLK_PER_LZONE11_T1,
BLK_PER_LZONE12_T1, BLK_PER_LZONE13_T1, BLK_PER_LZONE14_T1, BLK_PER_LZONE15_T1 },
{ BLK_PER_LZONE0_T2 , BLK_PER_LZONE1_T2 , BLK_PER_LZONE2_T2 , BLK_PER_LZONE3_T2 ,
BLK_PER_LZONE4_T2 , BLK_PER_LZONE5_T2 , BLK_PER_LZONE6_T2 , BLK_PER_LZONE7_T2 ,
BLK_PER_LZONE8_T2 , BLK_PER_LZONE9_T2 , BLK_PER_LZONE10_T2, BLK_PER_LZONE11_T2,
BLK_PER_LZONE12_T2, BLK_PER_LZONE13_T2, BLK_PER_LZONE14_T2, BLK_PER_LZONE15_T2 },
{ BLK_PER_LZONE0_T3 , BLK_PER_LZONE1_T3 , BLK_PER_LZONE2_T3 , BLK_PER_LZONE3_T3 ,
BLK_PER_LZONE4_T3 , BLK_PER_LZONE5_T3 , BLK_PER_LZONE6_T3 , BLK_PER_LZONE7_T3 ,
BLK_PER_LZONE8_T3 , BLK_PER_LZONE9_T3 , BLK_PER_LZONE10_T3, BLK_PER_LZONE11_T3,
BLK_PER_LZONE12_T3, BLK_PER_LZONE13_T3, BLK_PER_LZONE14_T3, BLK_PER_LZONE15_T3 },
{ BLK_PER_LZONE0_T4 , BLK_PER_LZONE1_T4 , BLK_PER_LZONE2_T4 , BLK_PER_LZONE3_T4 ,
BLK_PER_LZONE4_T4 , BLK_PER_LZONE5_T4 , BLK_PER_LZONE6_T4 , BLK_PER_LZONE7_T4 ,
BLK_PER_LZONE8_T4 , BLK_PER_LZONE9_T4 , BLK_PER_LZONE10_T4, BLK_PER_LZONE11_T4,
BLK_PER_LZONE12_T4, BLK_PER_LZONE13_T4, BLK_PER_LZONE14_T4, BLK_PER_LZONE15_T4 },
{ BLK_PER_LZONE0_T5 , BLK_PER_LZONE1_T5 , BLK_PER_LZONE2_T5 , BLK_PER_LZONE3_T5 ,
BLK_PER_LZONE4_T5 , BLK_PER_LZONE5_T5 , BLK_PER_LZONE6_T5 , BLK_PER_LZONE7_T5 ,
BLK_PER_LZONE8_T5 , BLK_PER_LZONE9_T5 , BLK_PER_LZONE10_T5, BLK_PER_LZONE11_T5,
BLK_PER_LZONE12_T5, BLK_PER_LZONE13_T5, BLK_PER_LZONE14_T5, BLK_PER_LZONE15_T5 },
{ BLK_PER_LZONE0_T6 , BLK_PER_LZONE1_T6 , BLK_PER_LZONE2_T6 , BLK_PER_LZONE3_T6 ,
BLK_PER_LZONE4_T6 , BLK_PER_LZONE5_T6 , BLK_PER_LZONE6_T6 , BLK_PER_LZONE7_T6 ,
BLK_PER_LZONE8_T6 , BLK_PER_LZONE9_T6 , BLK_PER_LZONE10_T6, BLK_PER_LZONE11_T6,
BLK_PER_LZONE12_T6, BLK_PER_LZONE13_T6, BLK_PER_LZONE14_T6, BLK_PER_LZONE15_T6 } };
/* Logical zone start cylinder */
const u16 LEOZONE_SCYL_TBL[VZONES_PER_DRV] = {
START_TK_ZONE0_HD0, START_TK_ZONE1_HD0, START_TK_ZONE2_HD0, START_TK_ZONE3_HD0,
START_TK_ZONE4_HD0, START_TK_ZONE5_HD0, START_TK_ZONE6_HD0, START_TK_ZONE7_HD0,
END_TK_ZONE1_HD1 , END_TK_ZONE2_HD1 , END_TK_ZONE3_HD1 , END_TK_ZONE4_HD1 ,
END_TK_ZONE5_HD1 , END_TK_ZONE6_HD1 , END_TK_ZONE7_HD1 , END_TK_ZONE8_HD1 };
/* Logical zone and Physical zone translate table */
const u8 LEOVZONE_PZONEHD_TBL[DISK_TYPES][VZONES_PER_DRV] = {
{0, 1, 2, 2+7, 1+7, 3 , 4 , 5 , 6 , 7 , 8+7, 7+7, 6+7, 5+7, 4+7, 3+7 },
{0, 1, 2, 3 , 3+7, 2+7, 1+7, 4 , 5 , 6 , 7 , 8+7, 7+7, 6+7, 5+7, 4+7 },
{0, 1, 2, 3 , 4 , 4+7, 3+7, 2+7, 1+7, 5 , 6 , 7 , 8+7, 7+7, 6+7, 5+7 },
{0, 1, 2, 3 , 4 , 5 , 5+7, 4+7, 3+7, 2+7, 1+7, 6 , 7 , 8+7, 7+7, 6+7 },
{0, 1, 2, 3 , 4 , 5 , 6 , 6+7, 5+7, 4+7, 3+7, 2+7, 1+7, 7 , 8+7, 7+7 },
{0, 1, 2, 3 , 4 , 5 , 6 , 7 , 7+7, 6+7, 5+7, 4+7, 3+7, 2+7, 1+7, 8+7 },
{0, 1, 2, 3 , 4 , 5 , 6 , 7 , 8+7, 7+7, 6+7, 5+7, 4+7, 3+7, 2+7, 1+7 }};
const u16 LEOZONE_OUTERCYL_TBL[(ZONES_PER_DRV-1)] =
{ START_TK_ZONE1_HD1, START_TK_ZONE2_HD1, START_TK_ZONE3_HD1, START_TK_ZONE4_HD1,
START_TK_ZONE5_HD1, START_TK_ZONE6_HD1, START_TK_ZONE7_HD1, START_TK_ZONE8_HD1
};
const u16 LEORAM_START_LBA[DISK_TYPES] = {
0x05a2, 0x07c6 , 0x09ea , 0x0c0e , 0x0e32 , 0x1010 , 0x10dc };
/* ROM/RAM bytes table for Read Capacity commnad */
const u32 LEORAM_BYTE[DISK_TYPES] = {
0x024a9dc0, 0x01c226c0, 0x01450f00, 0x00d35680, 0x006cfd40, 0x001da240, 0x00000000 };
#ifdef _WRITER
/* Write end LBA table on ROM_AREA */
const u16 LEOWRITER_END_LBA[DISK_TYPES] = {
0x0359, 0x057d , 0x07a1 , 0x09c5 , 0x0be9 , 0x0dc7 , 0x0e93 };
#endif