File Coverage

blib/lib/Image/ExifTool/NikonCustom.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             #------------------------------------------------------------------------------
2             # File: NikonCustom.pm
3             #
4             # Description: Read and write Nikon Custom settings
5             #
6             # Revisions: 2009/11/25 - P. Harvey Created
7             #
8             # References: 1) Warren Hatch private communication (D3 and Z9 with SB-800 and SB-900)
9             # 2) Anonymous contribution 2011/05/25 (D700, D7000)
10             # JD) Jens Duttke private communication
11             #------------------------------------------------------------------------------
12              
13             package Image::ExifTool::NikonCustom;
14              
15 29     29   247 use strict;
  29         80  
  29         1472  
16 29     29   1356 use vars qw($VERSION @ISA @EXPORT_OK %buttonsZ8 %buttonsZ9);
  29         79  
  29         751598  
17              
18             $VERSION = '1.29';
19              
20             @ISA = qw(Exporter);
21             @EXPORT_OK = qw(%buttonsZ8 %buttonsZ9);
22              
23             my %buttonsCommonZ8Z9 = ( #button roles shared by the Z8 & Z9. Assigments began to diverge with Z8 fw 2.00 and became significant with z8 fw 3.0
24             0 => 'None',
25             1 => 'Preview',
26             3 => 'FV Lock',
27             4 => 'AE/AF Lock',
28             5 => 'AE Lock Only',
29             6 => 'AE Lock (reset on release)',
30             7 => 'AE Lock (hold)',
31             8 => 'AF Lock Only',
32             9 => 'AF-On',
33             10 => 'Flash Disable/Enable',
34             11 => 'Bracketing Burst',
35             12 => '+NEF(RAW)',
36             18 => 'Virtual Horizon',
37             19 => 'Synchronized Release',
38             20 => 'My Menu',
39             21 => 'My Menu Top Item',
40             22 => 'Playback',
41             23 => 'Rating',
42             24 => 'Protect',
43             25 => 'Zoom',
44             26 => 'Focus Peaking',
45             27 => 'Flash Mode/Compensation',
46             28 => 'Image Area',
47             30 => 'Non-CPU Lens',
48             31 => 'Active-D Lighting',
49             32 => 'Exposure Delay Mode',
50             33 => '1 Stop Speed/Aperture',
51             34 => 'White Balance',
52             35 => 'Metering',
53             36 => 'Auto Bracketing',
54             37 => 'Multiple Exposure',
55             38 => 'HDR Overlay',
56             39 => 'Picture Control',
57             40 => 'Quality',
58             41 => 'Focus Mode/AF AreaMode',
59             42 => 'Select Center Focus Point',
60             44 => 'Record Movie',
61             45 => 'Thumbnail On/Off',
62             46 => 'View Histograms',
63             47 => 'Choose Folder',
64             48 => 'Power Aperture (Open)',
65             49 => 'Power Aperture (Close)',
66             52 => 'Microphone Sensitivity',
67             53 => 'Release Mode',
68             57 => 'Preset Focus Point',
69             58 => 'AE/AWB Lock (hold)',
70             59 => 'AF-AreaMode',
71             60 => 'AF-AreaMode + AF-On',
72             61 => 'Recall Shooting Functions',
73             64 => 'Filtered Playback',
74             65 => 'Same as AF-On',
75             66 => 'Voice Memo',
76             70 => 'Photo Shooting Bank',
77             71 => 'ISO',
78             72 => 'Shooting Mode',
79             73 => 'Exposure Compensation',
80             76 => 'Silent Mode',
81             78 => 'LiveView Information',
82             79 => 'AWB Lock (hold)',
83             80 => 'Grid Display',
84             81 => 'Starlight View',
85             82 => 'Select To Send (PC)',
86             83 => 'Select To Send (FTP)',
87             84 => 'Pattern Tone Range',
88             85 => 'Control Lock',
89             86 => 'Save Focus Position',
90             87 => 'Recall Focus Position',
91             88 => 'Recall Shooting Functions (Hold)',
92             89 => 'Set Picture Control (HLG)',
93             90 => 'Skin Softening',
94             91 => 'Portrait Impression Balance',
95             92 => 'Fast AF-On',
96             97 => 'High Frequency Flicker Reduction',
97             98 => 'Switch FX/DX',
98             99 => 'View Mode (Photo LV)',
99             100 => 'Photo Flicker Reduction',
100             101 => 'Filtered Playback (Select Criteria)',
101             103 => 'Start Series Playback',
102             104 => 'View Assist',
103             105 => 'Hi-Res Zoom+',
104             106 => 'Hi-Res Zoom-',
105             108 => 'Override Other Cameras',
106             109 => 'DISP - Cycle Information Display (shooting)', # Shooting Mode
107             110 => 'DISP - Cycle Information Display (playback)', # Playback mode
108             111 => 'Resume Shooting',
109             112 => 'Switch Eyes',
110             113 => 'Power Zoom +',
111             114 => 'Power Zoom -',
112             115 => 'Delete',
113             );
114             %buttonsZ8 = (
115             SeparateTable => 'ButtonsZ8',
116             PrintConv => {
117             %buttonsCommonZ8Z9,
118             116 => 'Pixel Shift Shooting',
119             117 => 'Cycle AF-area Mode',
120             119 => 'Focus Limiter',
121             120 => 'Jump to Source Image',
122             121 => 'Raw Processing (Current)',
123             122 => 'Raw Processing (Multiple)',
124             123 => 'Trim',
125             124 => 'Resize (Current)',
126             125 => 'Resize (Multiple)',
127             126 => 'D-Lighting',
128             127 => 'Straighten',
129             128 => 'Distortion Control',
130             129 => 'Perspective Control',
131             130 => 'Monochrome',
132             131 => 'Overlay (Add)',
133             132 => 'Lighten',
134             133 => 'Darken',
135             134 => 'Motion Blend',
136             135 => 'Cycle Monitor Mode',
137             },
138             );
139             %buttonsZ9= (
140             SeparateTable => 'ButtonsZ9',
141             PrintConv => {
142             %buttonsCommonZ8Z9,
143             116 => 'Save and Load Power Zoom Position',
144             117 => 'Cycle AF-area Mode',
145             118 => 'Raw Processing (Current)', #118-131 and 135 are Playback Retouch options
146             119 => 'Raw Processing (Multiple)',
147             120 => 'Trim',
148             121 => 'Resize (Current)',
149             122 => 'Resize (Multiple)',
150             123 => 'D-Lighting',
151             124 => 'Straighten',
152             125 => 'Distortion Control',
153             126 => 'Perspective Control',
154             127 => 'Monochrome',
155             128 => 'Overlay (Add)',
156             129 => 'Lighten',
157             130 => 'Darken',
158             131 => 'Motion Blend',
159             133 => 'Focus Limiter',
160             134 => 'Cycle Subject Detection Options',
161             135 => 'Jump To Source Image',
162             },
163             );
164             my %buttonsZ6III= (
165             SeparateTable => 'ButtonsZ6III',
166             PrintConv => {
167             0 => 'None',
168             1 => 'Preview',
169             3 => 'FV Lock',
170             4 => 'AE/AF Lock',
171             5 => 'AE Lock Only',
172             6 => 'AE Lock (reset on release)',
173             7 => 'AE Lock (hold)',
174             8 => 'AF Lock Only',
175             9 => 'AF-On',
176             10 => 'Flash Disable/Enable',
177             11 => 'Bracketing Burst',
178             12 => '+NEF(RAW)',
179             18 => 'Virtual Horizon',
180             19 => 'Synchronized Release',
181             20 => 'My Menu',
182             21 => 'My Menu Top Item',
183             22 => 'Playback',
184             23 => 'Rating',
185             24 => 'Protect',
186             25 => 'Zoom',
187             26 => 'Focus Peaking',
188             27 => 'Flash Mode/Compensation',
189             28 => 'Image Area',
190             30 => 'Non-CPU Lens',
191             31 => 'Active-D Lighting',
192             32 => 'Exposure Delay Mode',
193             33 => '1 Stop Speed/Aperture',
194             34 => 'White Balance',
195             35 => 'Metering',
196             36 => 'Auto Bracketing',
197             37 => 'Multiple Exposure',
198             38 => 'HDR Overlay',
199             39 => 'Picture Control',
200             40 => 'Quality',
201             41 => 'Focus Mode/AF AreaMode',
202             42 => 'Select Center Focus Point',
203             44 => 'Record Movie',
204             45 => 'Thumbnail On/Off',
205             46 => 'View Histograms',
206             47 => 'Choose Folder',
207             48 => 'Power Aperture (Open)',
208             49 => 'Power Aperture (Close)',
209             52 => 'Microphone Sensitivity',
210             53 => 'Release Mode',
211             57 => 'Preset Focus Point',
212             58 => 'AE/AWB Lock (hold)',
213             59 => 'AF-AreaMode',
214             60 => 'AF-AreaMode + AF-On',
215             61 => 'Recall Shooting Functions',
216             64 => 'Filtered Playback',
217             65 => 'Same as AF-On',
218             66 => 'Voice Memo',
219             70 => 'Photo Shooting Bank',
220             71 => 'ISO',
221             72 => 'Shooting Mode',
222             73 => 'Exposure Compensation',
223             76 => 'Silent Mode',
224             78 => 'LiveView Information',
225             79 => 'AWB Lock (hold)',
226             80 => 'Grid Display',
227             81 => 'Starlight View',
228             82 => 'Select To Send (PC)',
229             83 => 'Select To Send (FTP)',
230             84 => 'Pattern Tone Range',
231             85 => 'Control Lock',
232             86 => 'Save Focus Position',
233             87 => 'Recall Focus Position',
234             88 => 'Recall Shooting Functions (Hold)',
235             89 => 'Set Picture Control (HLG)',
236             90 => 'Skin Softening',
237             91 => 'Portrait Impression Balance',
238             97 => 'High Frequency Flicker Reduction',
239             98 => 'Switch FX/DX',
240             99 => 'View Mode (Photo LV)',
241             100 => 'Photo Flicker Reduction',
242             101 => 'Filtered Playback (Select Criteria)',
243             103 => 'Start Series Playback',
244             104 => 'View Assist',
245             105 => 'Hi-Res Zoom+',
246             106 => 'Hi-Res Zoom-',
247             108 => 'Override Other Cameras',
248             109 => 'DISP - Cycle Information Display (shooting)', # Shooting Mode
249             110 => 'DISP - Cycle Information Display (playback)', # Playback mode
250             111 => 'Resume Shooting',
251             112 => 'Switch Eyes',
252             113 => 'Power Zoom +',
253             114 => 'Power Zoom -',
254             115 => 'Delete',
255             116 => 'Pixel Shift Shooting',
256             117 => 'Cycle AF-area Mode',
257             118 => 'Pixel Shift Shooting',
258             119 => 'Move Focus Point',
259             },
260             );
261             my %dialsZ9 = (
262             0 => '1 Frame',
263             1 => '10 Frames',
264             2 => '50 Frames',
265             3 => 'Folder',
266             4 => 'Protect',
267             5 => 'Photos Only',
268             6 => 'Videos Only',
269             7 => 'Rating',
270             8 => 'Page',
271             9 => 'Skip To First Shot In Series',
272             10 => 'Uploaded to FTP',
273             11 => 'Uploaded to Computer',
274             );
275             my %dialsVideoZ9 = (
276             0 => '2 s',
277             1 => '5 s',
278             2 => '10 s',
279             3 => '1 Frame',
280             4 => '5 Frames',
281             5 => '10 Frames',
282             6 => 'First/Last Frame',
283             7 => 'Playback Speed',
284             );
285             my %evfGridsZ9 = (
286             0 => '3x3',
287             1 => '4x4',
288             2 => '2.35:1',
289             3 => '1.85:1',
290             4 => '5:4',
291             5 => '4:3',
292             6 => '1:1',
293             7 => '16:9',
294             8 => '90%',
295             );
296             my %flicksZ9 = (
297             0 => 'Rating',
298             1 => 'Select To Send (PC)',
299             2 => 'Select To Send (FTP)',
300             3 => 'Protect',
301             4 => 'Voice Memo',
302             5 => 'None',
303             );
304             my %focusModeRestrictionsZ9 = (
305             0 => 'AF-S',
306             1 => 'AF-C',
307             2 => 'Full-time AF',
308             3 => 'Manual',
309             4 => 'No Restrictions',
310             );
311             my %powerOffDelayTimesZ9 = (
312             SeparateTable => 'DelaysZ9',
313             PrintConv => {
314             0 => '2 s',
315             1 => '4 s',
316             3 => '10 s',
317             4 => '20 s',
318             5 => '30 s',
319             6 => '1 min',
320             7 => '5 min',
321             8 => '10 min',
322             11 => '30 min',
323             12 => 'No Limit',
324             },
325             );
326             my %thirdHalfFull = (
327             0 => '1/3 EV',
328             1 => '1/2 EV',
329             2 => '1 EV',
330             );
331             my %touchFnAreaZ6III = (
332             0 => 'Entire Frame',
333             1 => 'Right Half',
334             2 => 'Top Right Quadrant',
335             3 => 'Bottom Right Quadrant',
336             4 => 'Left Half',
337             5 => 'Top Left Quadrant',
338             6 => 'Bottom Left Quadrant',
339             7 => 'Top Half',
340             8 => 'Bottom Half',
341             );
342              
343             my %limitNolimit = ( 0 => 'Limit', 1 => 'No Limit' );
344             my %offOn = ( 0 => 'Off', 1 => 'On' );
345             my %onOff = ( 0 => 'On', 1 => 'Off' );
346             my %noYes = ( 0 => 'No', 1 => 'Yes' );
347              
348             # custom settings for the D80 (encrypted) - ref JD
349             %Image::ExifTool::NikonCustom::SettingsD80 = (
350             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
351             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
352             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
353             WRITABLE => 1,
354             FIRST_ENTRY => 0,
355             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
356             NOTES => 'Custom settings for the Nikon D80.',
357             0.1 => { # CS1
358             Name => 'Beep',
359             Mask => 0x80,
360             PrintConv => \%onOff,
361             },
362             0.2 => { # CS4
363             Name => 'AFAssist',
364             Mask => 0x40,
365             PrintConv => \%onOff,
366             },
367             0.3 => { # CS5
368             Name => 'NoMemoryCard',
369             Mask => 0x20,
370             PrintConv => {
371             0 => 'Release Locked',
372             1 => 'Enable Release',
373             },
374             },
375             0.4 => { # CS6
376             Name => 'ImageReview',
377             Mask => 0x10,
378             PrintConv => \%onOff,
379             },
380             0.5 => { # CS17
381             Name => 'Illumination',
382             Mask => 0x08,
383             PrintConv => \%offOn,
384             },
385             0.6 => { # CS11
386             Name => 'MainDialExposureComp',
387             Mask => 0x04,
388             PrintConv => \%offOn,
389             },
390             0.7 => { # CS10
391             Name => 'EVStepSize',
392             Mask => 0x01,
393             PrintConv => {
394             0 => '1/3 EV',
395             1 => '1/2 EV',
396             },
397             },
398             1.1 => { # CS7
399             Name => 'AutoISO',
400             Mask => 0x40,
401             PrintConv => \%offOn,
402             },
403             1.2 => { # CS7-a
404             Name => 'AutoISOMax',
405             Mask => 0x30,
406             PrintConv => {
407             0 => 200,
408             1 => 400,
409             2 => 800,
410             3 => 1600,
411             },
412             },
413             1.3 => { # CS7-b
414             Name => 'AutoISOMinShutterSpeed',
415             Mask => 0x0f,
416             PrintConvColumns => 2,
417             PrintConv => {
418             0 => '1/125 s',
419             1 => '1/100 s',
420             2 => '1/80 s',
421             3 => '1/60 s',
422             4 => '1/40 s',
423             5 => '1/30 s',
424             6 => '1/15 s',
425             7 => '1/8 s',
426             8 => '1/4 s',
427             9 => '1/2 s',
428             10 => '1 s',
429             },
430             },
431             2.1 => { # CS13
432             Name => 'AutoBracketSet',
433             Mask => 0xc0,
434             PrintConv => {
435             0 => 'AE & Flash',
436             1 => 'AE Only',
437             2 => 'Flash Only',
438             3 => 'WB Bracketing',
439             },
440             },
441             2.2 => { # CS14
442             Name => 'AutoBracketOrder',
443             Mask => 0x20,
444             PrintConv => {
445             0 => '0,-,+',
446             1 => '-,0,+',
447             },
448             },
449             3.1 => { # CS27
450             Name => 'MonitorOffTime',
451             Mask => 0xe0,
452             PrintConv => {
453             0 => '5 s',
454             1 => '10 s',
455             2 => '20 s',
456             3 => '1 min',
457             4 => '5 min',
458             5 => '10 min',
459             },
460             },
461             3.2 => { # CS28
462             Name => 'MeteringTime',
463             Mask => 0x1c,
464             PrintConv => {
465             0 => '4 s',
466             1 => '6 s',
467             2 => '8 s',
468             3 => '16 s',
469             4 => '30 s',
470             5 => '30 min',
471             },
472             },
473             3.3 => { # CS29
474             Name => 'SelfTimerTime',
475             Mask => 0x03,
476             PrintConv => {
477             0 => '2 s',
478             1 => '5 s',
479             2 => '10 s',
480             3 => '20 s',
481             },
482             },
483             4.1 => { # CS18
484             Name => 'AELockButton',
485             Mask => 0x1e,
486             PrintConv => {
487             0 => 'AE/AF Lock',
488             1 => 'AE Lock Only',
489             2 => 'AF Lock Only',
490             3 => 'AE Lock (hold)',
491             4 => 'AF-ON',
492             5 => 'FV Lock',
493             6 => 'Focus Area Selection',
494             7 => 'AE-L/AF-L/AF Area',
495             8 => 'AE-L/AF Area',
496             9 => 'AF-L/AF Area',
497             10 => 'AF-ON/AF Area',
498             },
499             },
500             4.2 => { # CS19
501             Name => 'AELock',
502             Mask => 0x01,
503             PrintConv => \%offOn,
504             },
505             4.3 => { # CS30
506             Name => 'RemoteOnDuration',
507             Mask => 0xc0,
508             PrintConv => {
509             0 => '1 min',
510             1 => '5 min',
511             2 => '10 min',
512             3 => '15 min',
513             },
514             },
515             5.1 => { # CS15
516             Name => 'CommandDials',
517             Mask => 0x80,
518             PrintConv => {
519             0 => 'Standard (Main Shutter, Sub Aperture)',
520             1 => 'Reversed (Main Aperture, Sub Shutter)',
521             },
522             },
523             5.2 => { # CS16
524             Name => 'FunctionButton',
525             Mask => 0x78,
526             PrintConv => {
527             0 => 'ISO Display',
528             1 => 'Framing Grid',
529             2 => 'AF-area Mode',
530             3 => 'Center AF Area',
531             4 => 'FV Lock',
532             5 => 'Flash Off',
533             6 => 'Matrix Metering',
534             7 => 'Center-weighted',
535             8 => 'Spot Metering',
536             },
537             },
538             6.1 => { # CS8
539             Name => 'GridDisplay',
540             Mask => 0x80,
541             PrintConv => \%offOn,
542             },
543             6.2 => { # CS9
544             Name => 'ViewfinderWarning',
545             Mask => 0x40,
546             PrintConv => \%onOff,
547             },
548             6.3 => { # CS12
549             Name => 'CenterWeightedAreaSize',
550             Mask => 0x0c,
551             PrintConv => {
552             0 => '6 mm',
553             1 => '8 mm',
554             2 => '10 mm',
555             },
556             },
557             6.4 => { # CS31
558             Name => 'ExposureDelayMode',
559             Mask => 0x20,
560             PrintConv => \%offOn,
561             },
562             6.5 => { # CS32
563             Name => 'MB-D80Batteries',
564             Mask => 0x03,
565             PrintConv => {
566             0 => 'LR6 (AA Alkaline)',
567             1 => 'HR6 (AA Ni-MH)',
568             2 => 'FR6 (AA Lithium)',
569             3 => 'ZR6 (AA Ni-Mg)',
570             },
571             },
572             7.1 => { # CS23
573             Name => 'FlashWarning',
574             Mask => 0x80,
575             PrintConv => \%onOff,
576             },
577             7.2 => { # CS24
578             Name => 'FlashShutterSpeed',
579             Mask => 0x78,
580             ValueConv => '2 ** ($val - 6)',
581             ValueConvInv => '$val>0 ? int(log($val)/log(2)+6+0.5) : 0',
582             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
583             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
584             },
585             7.3 => { # CS25
586             Name => 'AutoFP',
587             Mask => 0x04,
588             PrintConv => \%offOn,
589             },
590             7.4 => { # CS26
591             Name => 'ModelingFlash',
592             Mask => 0x02,
593             PrintConv => \%offOn,
594             },
595             8.1 => { # CS22
596             Name => 'InternalFlash',
597             Mask => 0xc0,
598             PrintConv => {
599             0 => 'TTL',
600             1 => 'Manual',
601             2 => 'Repeating Flash',
602             3 => 'Commander Mode',
603             },
604             },
605             8.2 => { # CS22-a
606             Name => 'ManualFlashOutput',
607             Mask => 0x07,
608             ValueConv => '2 ** (-$val)',
609             ValueConvInv => '$val > 0 ? -log($val)/log(2) : 0',
610             PrintConv => q{
611             return 'Full' if $val > 0.99;
612             Image::ExifTool::Exif::PrintExposureTime($val);
613             },
614             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
615             },
616             9.1 => { # CS22-b
617             Name => 'RepeatingFlashOutput',
618             Mask => 0x70,
619             ValueConv => '2 ** (-$val-2)',
620             ValueConvInv => '$val > 0 ? int(-log($val)/log(2)-2+0.5) : 0',
621             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
622             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
623             },
624             9.2 => { # CS22-c
625             Name => 'RepeatingFlashCount',
626             Mask => 0x0f,
627             ValueConv => '$val < 10 ? $val + 1 : 5 * ($val - 7)',
628             ValueConvInv => '$val <= 10 ? $val - 1 : $val / 5 + 7',
629             },
630             10.1 => { # CS22-d
631             Name => 'RepeatingFlashRate',
632             Mask => 0xf0,
633             ValueConv => '$val < 10 ? $val + 1 : 10 * ($val - 8)',
634             ValueConvInv => 'int(($val <= 10 ? $val - 1 : $val / 10 + 8) + 0.5)',
635             PrintConv => '"$val Hz"',
636             PrintConvInv => '$val=~/(\d+)/; $1 || 0',
637             },
638             10.2 => { # CS22-n
639             Name => 'CommanderChannel',
640             Mask => 0x03,
641             ValueConv => '$val + 1',
642             ValueConvInv => '$val - 1',
643             },
644             11.1 => { # CS22-e
645             Name => 'CommanderInternalFlash',
646             Mask => 0xc0,
647             PrintConv => {
648             0 => 'TTL',
649             1 => 'Manual',
650             2 => 'Off',
651             },
652             },
653             11.2 => { # CS22-h
654             Name => 'CommanderGroupAMode',
655             Mask => 0x30,
656             PrintConv => {
657             0 => 'TTL',
658             1 => 'Auto Aperture',
659             2 => 'Manual',
660             3 => 'Off',
661             },
662             },
663             11.3 => { # CS22-k
664             Name => 'CommanderGroupBMode',
665             Mask => 0x0c,
666             PrintConv => {
667             0 => 'TTL',
668             1 => 'Auto Aperture',
669             2 => 'Manual',
670             3 => 'Off',
671             },
672             },
673             12.1 => { # CS22-f
674             Name => 'CommanderInternalTTLComp',
675             Mask => 0x1f,
676             ValueConv => '($val - 9) / 3',
677             ValueConvInv => '$val * 3 + 9',
678             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
679             PrintConvInv => '$val',
680             },
681             12.2 => { # CS22-g
682             Name => 'CommanderInternalManualOutput',
683             Mask => 0xe0,
684             ValueConv => '2 ** (-$val)',
685             ValueConvInv => '$val > 0 ? int(-log($val)/log(2)+0.5) : 0',
686             PrintConv => q{
687             return 'Full' if $val > 0.99;
688             Image::ExifTool::Exif::PrintExposureTime($val);
689             },
690             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
691             },
692             13.1 => { # CS22-i
693             Name => 'CommanderGroupA_TTL-AAComp',
694             Mask => 0x1f,
695             ValueConv => '($val - 9) / 3',
696             ValueConvInv => '$val * 3 + 9',
697             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
698             PrintConvInv => '$val',
699             },
700             13.2 => { # CS22-j
701             Name => 'CommanderGroupAManualOutput',
702             Mask => 0xe0,
703             ValueConv => '2 ** (-$val)',
704             ValueConvInv => '$val > 0 ? int(-log($val)/log(2)+0.5) : 0',
705             PrintConv => q{
706             return 'Full' if $val > 0.99;
707             Image::ExifTool::Exif::PrintExposureTime($val);
708             },
709             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
710             },
711             14.1 => { # CS22-l
712             Name => 'CommanderGroupB_TTL-AAComp',
713             Mask => 0x1f,
714             ValueConv => '($val - 9) / 3',
715             ValueConvInv => '$val * 3 + 9',
716             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
717             PrintConvInv => '$val',
718             },
719             14.2 => { # CS22-m
720             Name => 'CommanderGroupBManualOutput',
721             Mask => 0xe0,
722             ValueConv => '2 ** (-$val)',
723             ValueConvInv => '$val > 0 ? int(-log($val)/log(2)+0.5) : 0',
724             PrintConv => q{
725             return 'Full' if $val > 0.99;
726             Image::ExifTool::Exif::PrintExposureTime($val);
727             },
728             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
729             },
730             15.1 => { # CS3
731             Name => 'CenterAFArea',
732             Mask => 0x80,
733             PrintConv => {
734             0 => 'Normal Zone',
735             1 => 'Wide Zone',
736             },
737             },
738             15.2 => { # CS20
739             Name => 'FocusAreaSelection',
740             Mask => 0x04,
741             PrintConv => {
742             0 => 'No Wrap',
743             1 => 'Wrap',
744             },
745             },
746             15.3 => { # CS21
747             Name => 'AFAreaIllumination',
748             Mask => 0x03,
749             PrintConv => {
750             0 => 'Auto',
751             1 => 'Off',
752             2 => 'On',
753             },
754             },
755             16.1 => { # CS2
756             Name => 'AFAreaModeSetting',
757             Mask => 0xc0,
758             PrintConv => {
759             0 => 'Single Area',
760             1 => 'Dynamic Area',
761             2 => 'Auto-area',
762             },
763             },
764             );
765              
766             # custom settings for the D40 (encrypted) - ref JD
767             %Image::ExifTool::NikonCustom::SettingsD40 = (
768             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
769             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
770             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
771             WRITABLE => 1,
772             FIRST_ENTRY => 0,
773             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
774             NOTES => 'Custom settings for the Nikon D40.',
775             0.1 => { # CS1
776             Name => 'Beep',
777             Mask => 0x80,
778             PrintConv => \%onOff,
779             },
780             0.2 => { # CS9
781             Name => 'AFAssist',
782             Mask => 0x40,
783             PrintConv => \%onOff,
784             },
785             0.3 => { # CS6
786             Name => 'NoMemoryCard',
787             Mask => 0x20,
788             PrintConv => {
789             0 => 'Release Locked',
790             1 => 'Enable Release',
791             },
792             },
793             0.4 => { # CS7
794             Name => 'ImageReview',
795             Mask => 0x10,
796             PrintConv => \%onOff,
797             },
798             1.1 => { # CS10-a
799             Name => 'AutoISO',
800             Mask => 0x80,
801             PrintConv => \%offOn,
802             },
803             1.2 => { # CS10-b
804             Name => 'AutoISOMax',
805             Mask => 0x30,
806             PrintConv => {
807             1 => 400,
808             2 => 800,
809             3 => 1600,
810             },
811             },
812             1.3 => { # CS10-c
813             Name => 'AutoISOMinShutterSpeed',
814             Mask => 0x07,
815             PrintConvColumns => 2,
816             PrintConv => {
817             0 => '1/125 s',
818             1 => '1/60 s',
819             2 => '1/30 s',
820             3 => '1/15 s',
821             4 => '1/8 s',
822             5 => '1/4 s',
823             6 => '1/2 s',
824             7 => '1 s',
825             },
826             },
827             2.1 => { # CS15-b
828             Name => 'ImageReviewTime',
829             Mask => 0x07,
830             PrintConv => {
831             0 => '4 s',
832             1 => '8 s',
833             2 => '20 s',
834             3 => '1 min',
835             4 => '10 min',
836             },
837             },
838             3.1 => { # CS15-a
839             Name => 'MonitorOffTime',
840             Mask => 0xe0,
841             PrintConv => {
842             0 => '4 s',
843             1 => '8 s',
844             2 => '20 s',
845             3 => '1 min',
846             4 => '10 min',
847             },
848             },
849             3.2 => { # CS15-c
850             Name => 'MeteringTime',
851             Mask => 0x1c,
852             PrintConv => {
853             0 => '4 s',
854             1 => '8 s',
855             2 => '20 s',
856             3 => '1 min',
857             4 => '30 min',
858             },
859             },
860             3.3 => { # CS16
861             Name => 'SelfTimerTime',
862             Mask => 0x03,
863             PrintConv => {
864             0 => '2 s',
865             1 => '5 s',
866             2 => '10 s',
867             3 => '20 s',
868             },
869             },
870             3.4 => { # CS17
871             Name => 'RemoteOnDuration',
872             Mask => 0xc0,
873             PrintConv => {
874             0 => '1 min',
875             1 => '5 min',
876             2 => '10 min',
877             3 => '15 min',
878             },
879             },
880             4.1 => { # CS12
881             Name => 'AELockButton',
882             Mask => 0x0e,
883             PrintConv => {
884             0 => 'AE/AF Lock',
885             1 => 'AE Lock Only',
886             2 => 'AF Lock Only',
887             3 => 'AE Lock (hold)',
888             4 => 'AF-ON',
889             },
890             },
891             4.2 => { # CS13
892             Name => 'AELock',
893             Mask => 0x01,
894             PrintConv => \%offOn,
895             },
896             5.1 => { # CS4
897             Name => 'ShootingModeSetting',
898             Mask => 0x70,
899             PrintConv => {
900             0 => 'Single Frame',
901             1 => 'Continuous',
902             2 => 'Self-timer',
903             3 => 'Delayed Remote',
904             4 => 'Quick-response Remote',
905             },
906             },
907             5.2 => { # CS11
908             Name => 'TimerFunctionButton',
909             Mask => 0x07,
910             PrintConv => {
911             0 => 'Shooting Mode',
912             1 => 'Image Quality/Size',
913             2 => 'ISO',
914             3 => 'White Balance',
915             4 => 'Self-timer',
916             },
917             },
918             6.1 => { # CS5
919             Name => 'Metering',
920             Mask => 0x03,
921             PrintConv => {
922             0 => 'Matrix',
923             1 => 'Center-weighted',
924             2 => 'Spot',
925             },
926             },
927             8.1 => { # CS14-a
928             Name => 'InternalFlash',
929             Mask => 0x10,
930             PrintConv => {
931             0 => 'TTL',
932             1 => 'Manual',
933             },
934             },
935             8.2 => { # CS14-b
936             Name => 'ManualFlashOutput',
937             Mask => 0x07,
938             ValueConv => '2 ** (-$val)',
939             ValueConvInv => '$val > 0 ? -log($val)/log(2) : 0',
940             PrintConv => q{
941             return 'Full' if $val > 0.99;
942             Image::ExifTool::Exif::PrintExposureTime($val);
943             },
944             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
945             },
946             9 => { # CS8
947             Name => 'FlashLevel',
948             Format => 'int8s',
949             ValueConv => '$val / 6',
950             ValueConvInv => '$val * 6',
951             PrintConv => 'sprintf("%+.1f",$val)',
952             PrintConvInv => '$val',
953             },
954             10.1 => { # CS2
955             Name => 'FocusModeSetting',
956             # (may differ from FocusMode if lens switch is set to Manual)
957             Mask => 0xc0,
958             PrintConv => {
959             0 => 'Manual',
960             1 => 'AF-S',
961             2 => 'AF-C',
962             3 => 'AF-A',
963             },
964             },
965             11.1 => { # CS3
966             Name => 'AFAreaModeSetting',
967             # (may differ from AFAreaMode for Manual focus)
968             Mask => 0x30,
969             PrintConv => {
970             0 => 'Single Area',
971             1 => 'Dynamic Area',
972             2 => 'Closest Subject',
973             },
974             }
975             );
976              
977             # D90 custom settings (ref PH)
978             %Image::ExifTool::NikonCustom::SettingsD90 = (
979             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
980             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
981             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
982             WRITABLE => 1,
983             FIRST_ENTRY => 0,
984             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
985             NOTES => 'Custom settings for the D90.',
986             # Missing:
987             # CSe2 RepeatingFlashRate (needs verification)
988             # CommanderInternalFlash, CommanderGroupAMode, CommanderGroupBMode,
989             # CommanderChannel, CommanderInternalManualOutput,
990             # CommanderGroupAManualOutput, CommanderGroupBManualOutput
991             # CommanderGroupA_TTL-AAComp, CommanderGroupB_TTL-AAComp,
992             # CSe4 AutoBracketSet (some values need verification)
993             # CSf2 OKButton ("Not Used" value needs verification)
994             # CSf5-b CommandDialsChangeMainSub
995             # CSf5-c CommandDialsMenuAndPlayback
996             0.1 => { # CSf1
997             Name => 'LightSwitch',
998             Mask => 0x08,
999             PrintConv => {
1000             0 => 'LCD Backlight',
1001             1 => 'LCD Backlight and Shooting Information',
1002             },
1003             },
1004             2.1 => { # CSa1
1005             Name => 'AFAreaModeSetting',
1006             Mask => 0x60,
1007             PrintConv => {
1008             0 => 'Single Area',
1009             1 => 'Dynamic Area',
1010             2 => 'Auto-area',
1011             3 => '3D-tracking (11 points)',
1012             },
1013             },
1014             2.2 => { # CSa2
1015             Name => 'CenterFocusPoint',
1016             Mask => 0x10,
1017             PrintConv => {
1018             0 => 'Normal Zone',
1019             1 => 'Wide Zone',
1020             },
1021             },
1022             2.3 => { # CSa3
1023             Name => 'AFAssist',
1024             Mask => 0x01,
1025             PrintConv => \%onOff,
1026             },
1027             2.4 => { # CSa4
1028             Name => 'AFPointIllumination',
1029             Mask => 0x06,
1030             PrintConv => {
1031             0 => 'Auto',
1032             1 => 'On',
1033             2 => 'Off',
1034             },
1035             },
1036             2.5 => { # CSa5
1037             Name => 'FocusPointWrap',
1038             Mask => 0x08,
1039             PrintConv => {
1040             0 => 'No Wrap',
1041             1 => 'Wrap',
1042             },
1043             },
1044             3.1 => { # CSa6
1045             Name => 'AELockForMB-D80',
1046             Mask => 0x1c,
1047             PrintConv => {
1048             0 => 'AE Lock Only',
1049             1 => 'AF Lock Only',
1050             2 => 'AE Lock (hold)',
1051             3 => 'AF-On',
1052             4 => 'FV Lock',
1053             5 => 'Focus Point Selection',
1054             7 => 'AE/AF Lock',
1055             },
1056             },
1057             3.2 => { # CSd12
1058             Name => 'MB-D80BatteryType',
1059             Mask => 0x03,
1060             PrintConv => {
1061             0 => 'LR6 (AA alkaline)',
1062             1 => 'HR6 (AA Ni-MH)',
1063             2 => 'FR6 (AA lithium)',
1064             3 => 'ZR6 (AA Ni-Mn)',
1065             },
1066             },
1067             4.1 => { # CSd1
1068             Name => 'Beep',
1069             Mask => 0x40,
1070             PrintConv => \%offOn,
1071             },
1072             4.2 => { # CSd2
1073             Name => 'GridDisplay',
1074             Mask => 0x02,
1075             PrintConv => \%offOn,
1076             },
1077             4.3 => { # CSd3
1078             Name => 'ISODisplay',
1079             Mask => 0x0c,
1080             PrintConv => {
1081             0 => 'Show ISO/Easy ISO',
1082             1 => 'Show ISO Sensitivity',
1083             3 => 'Show Frame Count',
1084             },
1085             },
1086             4.4 => { # CSd4
1087             Name => 'ViewfinderWarning',
1088             Mask => 0x01,
1089             PrintConv => \%onOff,
1090             },
1091             4.5 => { # CSf6
1092             Name => 'NoMemoryCard',
1093             Mask => 0x20,
1094             PrintConv => {
1095             0 => 'Release Locked',
1096             1 => 'Enable Release',
1097             },
1098             },
1099             5.1 => { # CSd5
1100             Name => 'ScreenTips',
1101             Mask => 0x04,
1102             PrintConv => \%offOn,
1103             },
1104             5.2 => { # CSd7
1105             Name => 'FileNumberSequence',
1106             Mask => 0x08,
1107             PrintConv => \%onOff,
1108             },
1109             5.3 => { # CSd8
1110             Name => 'ShootingInfoDisplay',
1111             Mask => 0xc0,
1112             PrintConv => {
1113             0 => 'Auto',
1114             2 => 'Manual (dark on light)',
1115             3 => 'Manual (light on dark)',
1116             },
1117             },
1118             5.4 => { # CSd9
1119             Name => 'LCDIllumination',
1120             Mask => 0x20,
1121             PrintConv => \%offOn,
1122             },
1123             6.1 => { # CSb2
1124             Name => 'EasyExposureComp',
1125             Mask => 0x01,
1126             PrintConv => \%offOn,
1127             },
1128             6.2 => { # CSf7
1129             Name => 'ReverseIndicators',
1130             Mask => 0x80,
1131             PrintConv => {
1132             0 => '+ 0 -',
1133             1 => '- 0 +',
1134             },
1135             },
1136             7.1 => { # CSb1
1137             Name => 'ExposureControlStepSize',
1138             Mask => 0x40,
1139             PrintConv => {
1140             0 => '1/3 EV',
1141             1 => '1/2 EV',
1142             },
1143             },
1144             8.1 => { # CSb3
1145             Name => 'CenterWeightedAreaSize',
1146             Mask => 0x60,
1147             PrintConv => {
1148             0 => '6 mm',
1149             1 => '8 mm',
1150             2 => '10 mm',
1151             },
1152             },
1153             8.2 => { # CSb4-a
1154             Name => 'FineTuneOptMatrixMetering',
1155             Mask => 0x0f,
1156             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
1157             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
1158             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
1159             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1160             },
1161             9.1 => { # CSb4-b
1162             Name => 'FineTuneOptCenterWeighted',
1163             Mask => 0xf0,
1164             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
1165             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
1166             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
1167             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1168             },
1169             9.2 => { # CSb4-c
1170             Name => 'FineTuneOptSpotMetering',
1171             Mask => 0x0f,
1172             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
1173             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
1174             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
1175             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1176             },
1177             11.1 => { # CSd6
1178             Name => 'CLModeShootingSpeed',
1179             Mask => 0x07,
1180             PrintConv => '"$val fps"',
1181             PrintConvInv => '$val=~s/\s*fps//i; $val',
1182             },
1183             11.2 => { # CSd10
1184             Name => 'ExposureDelayMode',
1185             Mask => 0x40,
1186             PrintConv => \%offOn,
1187             },
1188             13.1 => { # CSe4
1189             Name => 'AutoBracketSet',
1190             Mask => 0xe0, #(NC)
1191             PrintConv => {
1192             0 => 'AE & Flash', # default
1193             1 => 'AE Only',
1194             2 => 'Flash Only', #(NC)
1195             3 => 'WB Bracketing', #(NC)
1196             4 => 'Active D-Lighting', #(NC)
1197             },
1198             },
1199             13.2 => { # CSe6
1200             Name => 'AutoBracketOrder',
1201             Mask => 0x10,
1202             PrintConv => {
1203             0 => '0,-,+',
1204             1 => '-,0,+',
1205             },
1206             },
1207             14.1 => { # CSf3
1208             Name => 'FuncButton',
1209             Mask => 0x78,
1210             PrintConv => {
1211             1 => 'Framing Grid',
1212             2 => 'AF-area Mode',
1213             3 => 'Center Focus Point',
1214             4 => 'FV Lock', # default
1215             5 => 'Flash Off',
1216             6 => 'Matrix Metering',
1217             7 => 'Center-weighted Metering',
1218             8 => 'Spot Metering',
1219             9 => 'My Menu Top',
1220             10 => '+ NEF (RAW)',
1221             },
1222             },
1223             16.1 => { # CSf2
1224             Name => 'OKButton',
1225             Mask => 0x18,
1226             PrintConv => {
1227             1 => 'Select Center Focus Point',
1228             2 => 'Highlight Active Focus Point',
1229             3 => 'Not Used', #(NC)
1230             0 => 'Not Used', #(NC)
1231             },
1232             },
1233             17.1 => { # CSf4
1234             Name => 'AELockButton',
1235             Mask => 0x38,
1236             PrintConv => {
1237             0 => 'AE/AF Lock',
1238             1 => 'AE Lock Only',
1239             2 => 'AF Lock Only', #(NC)
1240             3 => 'AE Lock (hold)', #(NC)
1241             4 => 'AF-ON', #(NC)
1242             5 => 'FV Lock', #(NC)
1243             },
1244             },
1245             18.1 => { # CSf5-a
1246             Name => 'CommandDialsReverseRotation',
1247             Mask => 0x80,
1248             PrintConv => \%noYes,
1249             },
1250             18.2 => { # CSc1
1251             Name => 'ShutterReleaseButtonAE-L',
1252             Mask => 0x02,
1253             PrintConv => \%offOn,
1254             },
1255             19.1 => { # CSc2
1256             Name => 'MeteringTime',
1257             Mask => 0xf0,
1258             PrintConvColumns => 2,
1259             PrintConv => {
1260             0 => '4 s',
1261             1 => '6 s', # default
1262             2 => '8 s',
1263             3 => '16 s',
1264             4 => '30 s',
1265             5 => '1 min',
1266             6 => '5 min',
1267             7 => '10 min',
1268             8 => '30 min',
1269             },
1270             },
1271             19.2 => { # CSc5
1272             Name => 'RemoteOnDuration',
1273             Mask => 0x03,
1274             PrintConv => {
1275             0 => '1 min',
1276             1 => '5 min',
1277             2 => '10 min',
1278             3 => '15 min',
1279             },
1280             },
1281             20.1 => { # CSc3-a
1282             Name => 'SelfTimerTime',
1283             Mask => 0xc0,
1284             PrintConv => {
1285             0 => '2 s',
1286             1 => '5 s',
1287             2 => '10 s', # default
1288             3 => '20 s',
1289             },
1290             },
1291             20.2 => { # CSc3-b
1292             Name => 'SelfTimerShotCount',
1293             Mask => 0x1e,
1294             },
1295             21.1 => { # CSc4-a
1296             Name => 'PlaybackMonitorOffTime',
1297             Mask => 0x1c,
1298             PrintConv => {
1299             0 => '4 s',
1300             1 => '10 s', # default
1301             2 => '20 s',
1302             3 => '1 min',
1303             4 => '5 min',
1304             5 => '10 min',
1305             },
1306             },
1307             21.2 => { # CSc4-d
1308             Name => 'ImageReviewTime',
1309             Mask => 0xe0,
1310             PrintConv => {
1311             0 => '4 s', # default
1312             1 => '10 s',
1313             2 => '20 s',
1314             3 => '1 min',
1315             4 => '5 min',
1316             5 => '10 min',
1317             },
1318             },
1319             22.1 => { # CSc4-b
1320             Name => 'MenuMonitorOffTime',
1321             Mask => 0xe0,
1322             PrintConv => {
1323             0 => '4 s',
1324             1 => '10 s',
1325             2 => '20 s', # default
1326             3 => '1 min',
1327             4 => '5 min',
1328             5 => '10 min',
1329             },
1330             },
1331             22.2 => { # CSc4-c
1332             Name => 'ShootingInfoMonitorOffTime',
1333             Mask => 0x1c,
1334             PrintConv => {
1335             0 => '4 s',
1336             1 => '10 s', # default
1337             2 => '20 s',
1338             3 => '1 min',
1339             4 => '5 min',
1340             5 => '10 min',
1341             },
1342             },
1343             23.1 => { # CSe1
1344             Name => 'FlashShutterSpeed',
1345             Mask => 0x0f,
1346             PrintConvColumns => 2,
1347             PrintConv => {
1348             0 => '1/60 s', # default
1349             1 => '1/30 s',
1350             2 => '1/15 s',
1351             3 => '1/8 s',
1352             4 => '1/4 s',
1353             5 => '1/2 s',
1354             6 => '1 s',
1355             7 => '2 s',
1356             8 => '4 s',
1357             9 => '8 s',
1358             10 => '15 s',
1359             11 => '30 s',
1360             },
1361             },
1362             24.1 => { # CSe2-a
1363             Name => 'InternalFlash',
1364             Mask => 0xc0,
1365             PrintConv => {
1366             0 => 'TTL',
1367             1 => 'Manual',
1368             2 => 'Repeating Flash',
1369             3 => 'Commander Mode',
1370             },
1371             },
1372             24.2 => { # CSe2-b
1373             Name => 'ManualFlashOutput',
1374             Mask => 0x1f,
1375             ValueConv => '2 ** (-$val/3)',
1376             ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
1377             PrintConv => q{
1378             return 'Full' if $val > 0.99;
1379             Image::ExifTool::Exif::PrintExposureTime($val);
1380             },
1381             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
1382             },
1383             25.1 => { # CSe2-ca
1384             Name => 'RepeatingFlashOutput',
1385             Mask => 0x70,
1386             ValueConv => '2 ** (-$val-2)',
1387             ValueConvInv => '$val > 0 ? int(-log($val)/log(2)-2+0.5) : 0',
1388             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1389             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1390             },
1391             25.2 => { # CSe2-cb
1392             Name => 'RepeatingFlashCount',
1393             Mask => 0x0f,
1394             ValueConv => '$val < 10 ? $val + 1 : 5 * ($val - 7)',
1395             ValueConvInv => '$val <= 10 ? $val - 1 : $val / 5 + 7',
1396             },
1397             26.1 => { # CSe2-cc (NC)
1398             Name => 'RepeatingFlashRate',
1399             Mask => 0xf0,
1400             ValueConv => '$val < 10 ? $val + 1 : 10 * ($val - 8)',
1401             ValueConvInv => 'int(($val <= 10 ? $val - 1 : $val / 10 + 8) + 0.5)',
1402             PrintConv => '"$val Hz"',
1403             PrintConvInv => '$val=~/(\d+)/; $1 || 0',
1404             },
1405             31.1 => { # CSd11
1406             Name => 'FlashWarning',
1407             Mask => 0x80,
1408             PrintConv => \%onOff,
1409             },
1410             31.2 => { # CSe2-ea
1411             Name => 'CommanderInternalTTLComp',
1412             Mask => 0x1f,
1413             ValueConv => '($val - 9) / 3',
1414             ValueConvInv => '$val * 3 + 9',
1415             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
1416             PrintConvInv => '$val',
1417             },
1418             31.3 => { # CSe3
1419             Name => 'ModelingFlash',
1420             Mask => 0x20,
1421             PrintConv => \%onOff,
1422             },
1423             31.4 => { # CSe5
1424             Name => 'AutoFP',
1425             Mask => 0x40,
1426             PrintConv => \%offOn,
1427             },
1428             32.1 => { # CSe2-eb
1429             Name => 'CommanderGroupA_TTLComp',
1430             Mask => 0x1f,
1431             ValueConv => '($val - 9) / 3',
1432             ValueConvInv => '$val * 3 + 9',
1433             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
1434             PrintConvInv => '$val',
1435             },
1436             33.1 => { # CSe2-ec
1437             Name => 'CommanderGroupB_TTLComp',
1438             Mask => 0x1f,
1439             ValueConv => '($val - 9) / 3',
1440             ValueConvInv => '$val * 3 + 9',
1441             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
1442             PrintConvInv => '$val',
1443             },
1444             34.1 => { # CSa7
1445             Name => 'LiveViewAF',
1446             Mask => 0xc0,
1447             PrintConv => {
1448             0 => 'Face Priority', #(NC)
1449             1 => 'Wide Area',
1450             2 => 'Normal Area',
1451             },
1452             },
1453             );
1454              
1455             # D300 (ref JD) and D3 (ref 1/PH) custom settings
1456             %Image::ExifTool::NikonCustom::SettingsD3 = (
1457             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1458             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1459             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1460             WRITABLE => 1,
1461             FIRST_ENTRY => 0,
1462             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1463             NOTES => 'Custom settings for the D3, D3S, D3X, D300 and D300S.',
1464             # these settings have been decoded using the D3 and D300, and
1465             # extrapolated to the other models, but these haven't yet been
1466             # verified, and the following custom settings are missing:
1467             # CSf1-d (D3X,D3S) MultiSelectorLiveView
1468             # CSf1 (D300S) LightSwitch
1469             0.1 => { #1
1470             Name => 'CustomSettingsBank',
1471             Mask => 0x03,
1472             PrintConv => {
1473             0 => 'A',
1474             1 => 'B',
1475             2 => 'C',
1476             3 => 'D',
1477             },
1478             },
1479             0.2 => { #1
1480             Name => 'CustomSettingsAllDefault',
1481             Notes => '"No" if any custom setting for this bank was changed from the default',
1482             Mask => 0x80,
1483             PrintConv => { 0 => 'Yes', 1 => 'No' },
1484             },
1485             1.1 => { # CSa1
1486             Name => 'AF-CPrioritySelection',
1487             Mask => 0xc0,
1488             PrintConv => {
1489             0 => 'Release',
1490             1 => 'Release + Focus',
1491             2 => 'Focus',
1492             },
1493             },
1494             1.2 => { # CSa2
1495             Name => 'AF-SPrioritySelection',
1496             Mask => 0x20,
1497             PrintConv => {
1498             0 => 'Focus',
1499             1 => 'Release',
1500             },
1501             },
1502             1.3 => { # CSa8
1503             Name => 'AFPointSelection',
1504             Mask => 0x10,
1505             PrintConv => {
1506             0 => '51 Points',
1507             1 => '11 Points',
1508             },
1509             },
1510             1.4 => { # CSa3
1511             Name => 'DynamicAFArea',
1512             Mask => 0x0c,
1513             PrintConv => {
1514             0 => '9 Points',
1515             1 => '21 Points',
1516             2 => '51 Points',
1517             3 => '51 Points (3D-tracking)',
1518             },
1519             },
1520             1.5 => { # CSa4
1521             Name => 'FocusTrackingLockOn',
1522             Condition => '$$self{Model} !~ /D3S\b/',
1523             Notes => 'not D3S',
1524             Mask => 0x03,
1525             PrintConv => {
1526             0 => 'Long',
1527             1 => 'Normal',
1528             2 => 'Short',
1529             3 => 'Off',
1530             },
1531             },
1532             2.1 => { # CSa5
1533             Name => 'AFActivation',
1534             Mask => 0x80,
1535             PrintConv => {
1536             0 => 'Shutter/AF-On',
1537             1 => 'AF-On Only',
1538             },
1539             },
1540             2.2 => { # CSa7
1541             Name => 'FocusPointWrap',
1542             Mask => 0x08,
1543             PrintConv => {
1544             0 => 'No Wrap',
1545             1 => 'Wrap',
1546             },
1547             },
1548             2.3 => [ # CSa6
1549             {
1550             Name => 'AFPointIllumination',
1551             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1552             Notes => 'D3',
1553             Mask => 0x60,
1554             PrintConv => {
1555             0 => 'On in Continuous Shooting and Manual Focusing',
1556             1 => 'On During Manual Focusing',
1557             2 => 'On in Continuous Shooting Modes',
1558             3 => 'Off',
1559             },
1560             },
1561             {
1562             Name => 'AFPointIllumination',
1563             Notes => 'D300',
1564             Mask => 0x06,
1565             PrintConv => {
1566             0 => 'Auto',
1567             1 => 'Off',
1568             2 => 'On',
1569             },
1570             },
1571             ],
1572             2.4 => { # CSa6-b (D3, added by firmware update)
1573             Name => 'AFPointBrightness',
1574             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1575             Notes => 'D3 only',
1576             Mask => 0x06,
1577             PrintConv => {
1578             0 => 'Low',
1579             1 => 'Normal',
1580             2 => 'High',
1581             3 => 'Extra High',
1582             },
1583             },
1584             2.5 => { # CSa9 (D300)
1585             Name => 'AFAssist',
1586             Condition => '$$self{Model} =~ /D300S?\b/',
1587             Notes => 'D300 only',
1588             Mask => 0x01,
1589             PrintConv => \%onOff,
1590             },
1591             3.1 => { # CSa9 (D3)
1592             Name => 'AFOnButton',
1593             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1594             Notes => 'D3 only',
1595             Mask => 0x07,
1596             PrintConv => {
1597             0 => 'AF On',
1598             1 => 'AE/AF Lock',
1599             2 => 'AE Lock Only',
1600             3 => 'AE Lock (reset on release)',
1601             4 => 'AE Lock (hold)',
1602             5 => 'AF Lock Only',
1603             },
1604             },
1605             3.2 => { # CSa10 (D3)
1606             Name => 'VerticalAFOnButton',
1607             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1608             Notes => 'D3 only',
1609             Mask => 0x70,
1610             PrintConv => {
1611             0 => 'AF On',
1612             1 => 'AE/AF Lock',
1613             2 => 'AE Lock Only',
1614             3 => 'AE Lock (reset on release)',
1615             4 => 'AE Lock (hold)',
1616             5 => 'AF Lock Only',
1617             7 => 'Same as AF On',
1618             },
1619             },
1620             3.3 => { # CSa10 (D300)
1621             Name => 'AF-OnForMB-D10',
1622             Condition => '$$self{Model} =~ /D300S?\b/',
1623             Notes => 'D300 only',
1624             Mask => 0x70,
1625             PrintConv => {
1626             0 => 'AF-On',
1627             1 => 'AE/AF Lock',
1628             2 => 'AE Lock Only',
1629             3 => 'AE Lock (reset on release)',
1630             4 => 'AE Lock (hold)',
1631             5 => 'AF Lock Only',
1632             6 => 'Same as FUNC Button',
1633             },
1634             },
1635             4.1 => { # CSa4 (D3S)
1636             Name => 'FocusTrackingLockOn',
1637             Condition => '$$self{Model} =~ /D3S\b/',
1638             Notes => 'D3S only',
1639             Mask => 0x07,
1640             PrintConv => {
1641             0 => '5 (Long)',
1642             1 => '4',
1643             2 => '3 (Normal)',
1644             3 => '2',
1645             4 => '1 (Short)',
1646             5 => 'Off',
1647             },
1648             },
1649             4.2 => { # CSf7 (D3S)
1650             Name => 'AssignBktButton',
1651             Condition => '$$self{Model} =~ /D3S\b/',
1652             Notes => 'D3S only',
1653             Mask => 0x08,
1654             PrintConv => {
1655             0 => 'Auto Bracketing',
1656             1 => 'Multiple Exposure',
1657             },
1658             },
1659             4.3 => { # CSf1-c (D3S) (ref 1)
1660             Name => 'MultiSelectorLiveView',
1661             Condition => '$$self{Model} =~ /D3S\b/',
1662             Notes => 'D3S only',
1663             Mask => 0xc0,
1664             PrintConv => {
1665             0 => 'Reset',
1666             1 => 'Zoom On/Off',
1667             2 => 'Start Movie Recording',
1668             3 => 'Not Used',
1669             },
1670             },
1671             4.4 => { # CSf1-c2 (D3S) (ref 1)
1672             Name => 'InitialZoomLiveView',
1673             Condition => '$$self{Model} =~ /D3S\b/',
1674             Notes => 'D3S only',
1675             Mask => 0x30,
1676             PrintConv => {
1677             0 => 'Low Magnification',
1678             1 => 'Medium Magnification',
1679             2 => 'High Magnification',
1680             },
1681             },
1682             6.1 => { # CSb1
1683             Name => 'ISOStepSize',
1684             Mask => 0xc0,
1685             PrintConv => {
1686             0 => '1/3 EV',
1687             1 => '1/2 EV',
1688             2 => '1 EV',
1689             },
1690             },
1691             6.2 => { # CSb2
1692             Name => 'ExposureControlStepSize',
1693             Mask => 0x30,
1694             PrintConv => {
1695             0 => '1/3 EV',
1696             1 => '1/2 EV',
1697             2 => '1 EV',
1698             },
1699             },
1700             6.3 => { # CSb3
1701             Name => 'ExposureCompStepSize',
1702             Mask => 0x0c,
1703             PrintConv => {
1704             0 => '1/3 EV',
1705             1 => '1/2 EV',
1706             2 => '1 EV',
1707             },
1708             },
1709             6.4 => { # CSb4
1710             Name => 'EasyExposureCompensation',
1711             Mask => 0x03,
1712             PrintConv => {
1713             0 => 'Off',
1714             1 => 'On',
1715             2 => 'On (auto reset)',
1716             },
1717             },
1718             7.1 => [ # CSb5
1719             {
1720             Name => 'CenterWeightedAreaSize',
1721             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1722             Notes => 'D3',
1723             Mask => 0xe0,
1724             PrintConv => {
1725             0 => '8 mm',
1726             1 => '12 mm',
1727             2 => '15 mm',
1728             3 => '20 mm',
1729             4 => 'Average',
1730             },
1731             },
1732             {
1733             Name => 'CenterWeightedAreaSize',
1734             Notes => 'D300',
1735             Mask => 0xe0,
1736             PrintConv => {
1737             0 => '6 mm',
1738             1 => '8 mm',
1739             2 => '10 mm',
1740             3 => '13 mm',
1741             4 => 'Average',
1742             },
1743             },
1744             ],
1745             7.2 => { # CSb6-b
1746             Name => 'FineTuneOptCenterWeighted',
1747             Mask => 0x0f,
1748             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
1749             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
1750             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
1751             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1752             },
1753             8.1 => { # CSb6-a
1754             Name => 'FineTuneOptMatrixMetering',
1755             Mask => 0xf0,
1756             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
1757             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
1758             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
1759             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1760             },
1761             8.2 => { # CSb6-c
1762             Name => 'FineTuneOptSpotMetering',
1763             Mask => 0x0f,
1764             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
1765             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
1766             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
1767             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1768             },
1769             9.1 => { # CSf1-a, CSf2-a (D300S)
1770             Name => 'MultiSelectorShootMode',
1771             Mask => 0xc0,
1772             PrintConv => {
1773             0 => 'Select Center Focus Point',
1774             1 => 'Highlight Active Focus Point',
1775             2 => 'Not Used',
1776             },
1777             },
1778             9.2 => { # CSf1-b, CSf2-b (D300S)
1779             Name => 'MultiSelectorPlaybackMode',
1780             Condition => '$$self{Model} !~ /D3S\b/',
1781             Notes => 'all models except D3S', # (not confirmed for D3X)
1782             Mask => 0x30,
1783             PrintConv => {
1784             0 => 'Thumbnail On/Off',
1785             1 => 'View Histograms',
1786             2 => 'Zoom On/Off',
1787             3 => 'Choose Folder',
1788             },
1789             },
1790             9.3 => [ # CSf1-b2, CSf2-b2 (D300S)
1791             {
1792             Name => 'InitialZoomSetting',
1793             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1794             Notes => 'D3',
1795             Mask => 0x0c,
1796             PrintConv => { #1
1797             0 => 'High Magnification',
1798             1 => 'Medium Magnification',
1799             2 => 'Low Magnification',
1800             },
1801             },
1802             {
1803             Name => 'InitialZoomSetting',
1804             Notes => 'D300',
1805             Mask => 0x0c,
1806             PrintConv => { #JD
1807             0 => 'Low Magnification',
1808             1 => 'Medium Magnification',
1809             2 => 'High Magnification',
1810             },
1811             },
1812             ],
1813             9.4 => { # CSf2 (D300,D3), CSf3 (D300S)
1814             Name => 'MultiSelector',
1815             Mask => 0x01,
1816             PrintConv => {
1817             0 => 'Do Nothing',
1818             1 => 'Reset Meter-off Delay',
1819             },
1820             },
1821             10.1 => { # CSd9 (D300,D3S), CSd10 (D300S), CSd8 (D3)
1822             Name => 'ExposureDelayMode',
1823             Mask => 0x40,
1824             PrintConv => \%offOn,
1825             },
1826             10.2 => { # CSd4 (D300), CDs5 (D300S), CSd2-a (D3)
1827             Name => 'CLModeShootingSpeed',
1828             Mask => 0x07,
1829             PrintConv => '"$val fps"',
1830             PrintConvInv => '$val=~s/\s*fps//i; $val',
1831             },
1832             10.3 => { # (D3 CSd2-b)
1833             Name => 'CHModeShootingSpeed',
1834             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1835             Notes => 'D3 only',
1836             Mask => 0x30,
1837             PrintConv => {
1838             0 => '9 fps',
1839             1 => '10 fps',
1840             2 => '11 fps',
1841             },
1842             },
1843             11 => { # CSd5 (D300), CSd6 (D300S), CSd3 (D3)
1844             Name => 'MaxContinuousRelease',
1845             # values: 1-100 (D300), 1-130 (D3)
1846             },
1847             12.1 => { # CSf10, CSf11 (D3S,D300S)
1848             Name => 'ReverseIndicators',
1849             Mask => 0x20,
1850             PrintConv => {
1851             0 => '+ 0 -',
1852             1 => '- 0 +',
1853             },
1854             },
1855             12.2 => [ # CSd6 (D300), CSd7 (D300S), CSd4 (D3)
1856             {
1857             Name => 'FileNumberSequence',
1858             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1859             Notes => 'D3',
1860             Mask => 0x02,
1861             PrintConv => \%onOff,
1862             },
1863             {
1864             Name => 'FileNumberSequence',
1865             Notes => 'D300',
1866             Mask => 0x08,
1867             PrintConv => \%onOff,
1868             },
1869             ],
1870             12.3 => { # CSd5-a (D3)
1871             Name => 'RearDisplay',
1872             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1873             Notes => 'D3 only',
1874             Mask => 0x80,
1875             PrintConv => {
1876             0 => 'ISO',
1877             1 => 'Exposures Remaining',
1878             },
1879             },
1880             12.4 => { # CSd5-b (D3)
1881             Name => 'ViewfinderDisplay',
1882             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1883             Notes => 'D3 only',
1884             Mask => 0x40,
1885             PrintConv => {
1886             0 => 'Frame Count',
1887             1 => 'Exposures Remaining',
1888             },
1889             },
1890             12.5 => { # CSd11 (D300), CSd12 (D300S)
1891             Name => 'BatteryOrder',
1892             Condition => '$$self{Model} =~ /D300S?\b/',
1893             Notes => 'D300 only',
1894             Mask => 0x04,
1895             PrintConv => {
1896             0 => 'MB-D10 First',
1897             1 => 'Camera Battery First',
1898             },
1899             },
1900             12.6 => { # CSd10 (D300), CSd11 (D300S)
1901             Name => 'MB-D10Batteries',
1902             Condition => '$$self{Model} =~ /D300S?\b/',
1903             Notes => 'D300 only',
1904             Mask => 0x03,
1905             PrintConv => {
1906             0 => 'LR6 (AA alkaline)',
1907             1 => 'HR6 (AA Ni-MH)',
1908             2 => 'FR6 (AA lithium)',
1909             3 => 'ZR6 (AA Ni-Mn)',
1910             },
1911             },
1912             12.7 => { # CSd7 (D3S), CSd4, (D300S)
1913             Name => 'ScreenTips',
1914             Condition => '$$self{Model} =~ /(D3S|D300S)\b/',
1915             Mask => 0x10,
1916             PrintConv => \%onOff,
1917             },
1918             13.1 => { # CSd1
1919             Name => 'Beep',
1920             Mask => 0xc0,
1921             PrintConv => {
1922             0 => 'High',
1923             1 => 'Low',
1924             2 => 'Off',
1925             },
1926             },
1927             13.2 => { # CSd7 (D300), CSd8 (D300S), CSd6 (D3)
1928             Name => 'ShootingInfoDisplay',
1929             Mask => 0x30,
1930             PrintConv => {
1931             0 => 'Auto', #JD (D300)
1932             1 => 'Auto', #1 (D3)
1933             2 => 'Manual (dark on light)',
1934             3 => 'Manual (light on dark)',
1935             },
1936             },
1937             13.3 => { # CSd2 (D300)
1938             Name => 'GridDisplay',
1939             Condition => '$$self{Model} =~ /D300S?\b/',
1940             Notes => 'D300 only',
1941             Mask => 0x02,
1942             PrintConv => \%offOn,
1943             },
1944             13.4 => { # CSd3 (D300)
1945             Name => 'ViewfinderWarning',
1946             Condition => '$$self{Model} =~ /D300S?\b/',
1947             Notes => 'D300 only',
1948             Mask => 0x01,
1949             PrintConv => \%onOff,
1950             },
1951             13.5 => { # CSf1-b (D3S) (ref 1)
1952             Name => 'MultiSelectorPlaybackMode',
1953             Condition => '$$self{Model} =~ /D3S\b/',
1954             Notes => 'D3S only',
1955             Mask => 0x03,
1956             PrintConv => {
1957             0 => 'Thumbnail On/Off',
1958             1 => 'View Histograms',
1959             2 => 'Zoom On/Off',
1960             },
1961             },
1962             14.1 => [ # CSf5-a (ref 1), CSf6-a (D300S)
1963             {
1964             Name => 'PreviewButton',
1965             Condition => '$$self{Model} =~ /D3[SX]?\b/',
1966             Notes => 'D3',
1967             Mask => 0xf8,
1968             PrintConv => {
1969             0 => 'None',
1970             1 => 'Preview',
1971             2 => 'FV Lock',
1972             3 => 'AE/AF Lock',
1973             4 => 'AE Lock Only',
1974             5 => 'AE Lock (reset on release)',
1975             6 => 'AE Lock (hold)',
1976             7 => 'AF Lock Only',
1977             8 => 'Flash Off',
1978             9 => 'Bracketing Burst',
1979             10 => 'Matrix Metering',
1980             11 => 'Center-weighted Metering',
1981             12 => 'Spot Metering',
1982             13 => 'Virtual Horizon',
1983             # 14 not used
1984             15 => 'Playback',
1985             16 => 'My Menu Top',
1986             },
1987             },
1988             { #PH
1989             Name => 'FuncButton',
1990             Notes => 'D300',
1991             Mask => 0xf8,
1992             PrintConv => {
1993             0 => 'None',
1994             1 => 'Preview',
1995             2 => 'FV Lock',
1996             3 => 'AE/AF Lock',
1997             4 => 'AE Lock Only',
1998             5 => 'AE Lock (reset on release)',
1999             6 => 'AE Lock (hold)',
2000             7 => 'AF Lock Only',
2001             # 8 not used
2002             9 => 'Flash Off',
2003             10 => 'Bracketing Burst',
2004             11 => 'Matrix Metering',
2005             12 => 'Center-weighted Metering',
2006             13 => 'Spot Metering',
2007             14 => 'Playback', #PH (guess)
2008             15 => 'My Menu Top', #PH (guess)
2009             16 => '+ NEF (RAW)', #PH (guess)
2010             },
2011             },
2012             ],
2013             14.2 => [ # CSf5-b (PH,NC), CSf6-b (D300S)
2014             {
2015             Name => 'PreviewButtonPlusDials',
2016             Condition => '$$self{Model} =~ /D3[SX]?\b/',
2017             Notes => 'D3',
2018             Mask => 0x07,
2019             PrintConv => {
2020             0 => 'None',
2021             1 => 'Choose Image Area (FX/DX/5:4)',
2022             2 => 'One Step Speed/Aperture',
2023             3 => 'Choose Non-CPU Lens Number',
2024             # n/a 4 => 'Focus Point Selection',
2025             5 => 'Choose Image Area (FX/DX)',
2026             6 => 'Shooting Bank Menu',
2027             7 => 'Dynamic AF Area', #PH (D3S,D3X,NC)
2028             },
2029             },
2030             { #PH
2031             Name => 'FuncButtonPlusDials',
2032             Notes => 'D300',
2033             Mask => 0x07,
2034             PrintConv => {
2035             0 => 'None',
2036             2 => 'One Step Speed/Aperture',
2037             3 => 'Choose Non-CPU Lens Number',
2038             5 => 'Auto Bracketing',
2039             6 => 'Dynamic AF Area',
2040             },
2041             },
2042             ],
2043             15.1 => [ # CSf4-a (ref 1), CSf5-a (D300S)
2044             {
2045             Name => 'FuncButton',
2046             Condition => '$$self{Model} =~ /D3[SX]?\b/',
2047             Notes => 'D3',
2048             Mask => 0xf8,
2049             PrintConv => {
2050             0 => 'None',
2051             1 => 'Preview',
2052             2 => 'FV Lock',
2053             3 => 'AE/AF Lock',
2054             4 => 'AE Lock Only',
2055             5 => 'AE Lock (reset on release)',
2056             6 => 'AE Lock (hold)',
2057             7 => 'AF Lock Only',
2058             8 => 'Flash Off',
2059             9 => 'Bracketing Burst',
2060             10 => 'Matrix Metering',
2061             11 => 'Center-weighted Metering',
2062             12 => 'Spot Metering',
2063             13 => 'Virtual Horizon',
2064             # 14 not used
2065             15 => 'Playback',
2066             16 => 'My Menu Top',
2067             },
2068             },
2069             { #PH
2070             Name => 'PreviewButton',
2071             Notes => 'D300',
2072             Mask => 0xf8,
2073             PrintConv => {
2074             0 => 'None',
2075             1 => 'Preview',
2076             2 => 'FV Lock',
2077             3 => 'AE/AF Lock',
2078             4 => 'AE Lock Only',
2079             5 => 'AE Lock (reset on release)',
2080             6 => 'AE Lock (hold)',
2081             7 => 'AF Lock Only',
2082             # 8 not used
2083             9 => 'Flash Off',
2084             10 => 'Bracketing Burst',
2085             11 => 'Matrix Metering',
2086             12 => 'Center-weighted Metering',
2087             13 => 'Spot Metering',
2088             14 => 'Playback', #PH (guess)
2089             15 => 'My Menu Top', #PH (guess)
2090             16 => '+ NEF (RAW)', #PH (guess)
2091             },
2092             },
2093             ],
2094             15.2 => [ # CSf4-b (ref 1), CSf5-b (D300S)
2095             {
2096             Name => 'FuncButtonPlusDials',
2097             Condition => '$$self{Model} =~ /D3[SX]?\b/',
2098             Notes => 'D3',
2099             Mask => 0x07,
2100             PrintConv => {
2101             0 => 'None',
2102             1 => 'Choose Image Area (FX/DX/5:4)',
2103             2 => 'One Step Speed/Aperture',
2104             3 => 'Choose Non-CPU Lens Number',
2105             4 => 'Focus Point Selection', #(NC)
2106             5 => 'Choose Image Area (FX/DX)',
2107             6 => 'Shooting Bank Menu',
2108             7 => 'Dynamic AF Area', #PH (D3S,D3X,NC)
2109             },
2110             },
2111             { #PH
2112             Name => 'PreviewButtonPlusDials',
2113             Notes => 'D300',
2114             Mask => 0x07,
2115             PrintConv => {
2116             0 => 'None',
2117             2 => 'One Step Speed/Aperture',
2118             3 => 'Choose Non-CPU Lens Number',
2119             5 => 'Auto Bracketing',
2120             6 => 'Dynamic AF Area',
2121             },
2122             },
2123             ],
2124             16.1 => [ # CSf6-a (ref 1), CSf7-a (D300S)
2125             {
2126             Name => 'AELockButton',
2127             Condition => '$$self{Model} =~ /D3[SX]?\b/',
2128             Notes => 'D3',
2129             Mask => 0xf8,
2130             PrintConv => {
2131             0 => 'None',
2132             1 => 'Preview',
2133             2 => 'FV Lock',
2134             3 => 'AE/AF Lock',
2135             4 => 'AE Lock Only',
2136             5 => 'AE Lock (reset on release)',
2137             6 => 'AE Lock (hold)',
2138             7 => 'AF Lock Only',
2139             8 => 'Flash Off',
2140             9 => 'Bracketing Burst',
2141             10 => 'Matrix Metering',
2142             11 => 'Center-weighted Metering',
2143             12 => 'Spot Metering',
2144             13 => 'Virtual Horizon',
2145             14 => 'AF On', # (AE-L/AF-L button only)
2146             15 => 'Playback',
2147             16 => 'My Menu Top',
2148             },
2149             },
2150             { #PH
2151             Name => 'AELockButton',
2152             Notes => 'D300',
2153             Mask => 0xf8,
2154             PrintConv => {
2155             0 => 'None',
2156             1 => 'Preview',
2157             2 => 'FV Lock',
2158             3 => 'AE/AF Lock',
2159             4 => 'AE Lock Only',
2160             5 => 'AE Lock (reset on release)',
2161             6 => 'AE Lock (hold)',
2162             7 => 'AF Lock Only',
2163             8 => 'AF On', # (AE-L/AF-L button only)
2164             9 => 'Flash Off',
2165             10 => 'Bracketing Burst',
2166             11 => 'Matrix Metering',
2167             12 => 'Center-weighted Metering',
2168             13 => 'Spot Metering',
2169             14 => 'Playback', #PH (guess)
2170             15 => 'My Menu Top', #PH (guess)
2171             16 => '+ NEF (RAW)', #PH (guess)
2172             },
2173             },
2174             ],
2175             16.2 => [ # CSf6-b (ref 1), CSf7-b (D300S)
2176             {
2177             Name => 'AELockButtonPlusDials',
2178             Condition => '$$self{Model} =~ /D3[SX]?\b/',
2179             Notes => 'D3',
2180             Mask => 0x07,
2181             PrintConv => {
2182             0 => 'None',
2183             1 => 'Choose Image Area (FX/DX/5:4)',
2184             2 => 'One Step Speed/Aperture',
2185             3 => 'Choose Non-CPU Lens Number',
2186             # n/c 4 => 'Focus Point Selection', #(NC)
2187             5 => 'Choose Image Area (FX/DX)',
2188             6 => 'Shooting Bank Menu',
2189             7 => 'Dynamic AF Area', #PH (D3S,D3X,NC)
2190             },
2191             },
2192             { #PH
2193             Name => 'AELockButtonPlusDials',
2194             Notes => 'D300',
2195             Mask => 0x07,
2196             PrintConv => {
2197             0 => 'None',
2198             # n/a 2 => 'One Step Speed/Aperture',
2199             3 => 'Choose Non-CPU Lens Number',
2200             5 => 'Auto Bracketing', #(NC)
2201             6 => 'Dynamic AF Area',
2202             },
2203             },
2204             ],
2205             17.1 => { # CSf7-a, CSf8-a (D3S,D300S)
2206             Name => 'CommandDialsReverseRotation',
2207             Mask => 0x80,
2208             PrintConv => \%noYes,
2209             },
2210             17.2 => { # CSf7-b, CSf8-b (D3S,D300S)
2211             Name => 'CommandDialsChangeMainSub',
2212             Mask => 0x40,
2213             PrintConv => \%offOn,
2214             },
2215             17.3 => { # CSf7-c, CSf8-c (D3S,D300S)
2216             Name => 'CommandDialsApertureSetting',
2217             Mask => 0x20,
2218             PrintConv => {
2219             0 => 'Sub-command Dial',
2220             1 => 'Aperture Ring',
2221             },
2222             },
2223             17.4 => { # CSf7-d, CSf8-d (D3S,D300S)
2224             Name => 'CommandDialsMenuAndPlayback',
2225             Mask => 0x10,
2226             PrintConv => \%offOn,
2227             },
2228             17.5 => { # CSd8 (D300,D3S), CSd9 (D300S), CSd7 (D3)
2229             Name => 'LCDIllumination',
2230             Mask => 0x08,
2231             PrintConv => \%offOn,
2232             },
2233             17.6 => { # CSf3, CSf4 (D300S)
2234             Name => 'PhotoInfoPlayback',
2235             Mask => 0x04,
2236             PrintConv => {
2237             0 => 'Info Up-down, Playback Left-right',
2238             1 => 'Info Left-right, Playback Up-down',
2239             },
2240             },
2241             17.7 => { # CSc1
2242             Name => 'ShutterReleaseButtonAE-L',
2243             Mask => 0x02,
2244             PrintConv => \%offOn,
2245             },
2246             17.8 => { # CSf8, CSf9 (D3S,D300S)
2247             Name => 'ReleaseButtonToUseDial',
2248             Mask => 0x01,
2249             PrintConv => \%noYes,
2250             },
2251             18.1 => { # CSc3
2252             Name => 'SelfTimerTime',
2253             Mask => 0x18,
2254             PrintConv => {
2255             0 => '2 s',
2256             1 => '5 s',
2257             2 => '10 s',
2258             3 => '20 s',
2259             },
2260             },
2261             18.2 => { # CSc4
2262             Name => 'MonitorOffTime',
2263             # NOTE: The D3S and D300S have separate settings for Playback,
2264             # Image Review, Menus, and Information Display times
2265             Mask => 0x07,
2266             PrintConv => {
2267             0 => '10 s',
2268             1 => '20 s',
2269             2 => '1 min',
2270             3 => '5 min',
2271             4 => '10 min',
2272             },
2273             },
2274             20.1 => [ # CSe1
2275             {
2276             Name => 'FlashSyncSpeed',
2277             Condition => '$$self{Model} =~ /D3[SX]?\b/',
2278             Notes => 'D3',
2279             Mask => 0xe0,
2280             PrintConv => {
2281             0 => '1/250 s (auto FP)',
2282             1 => '1/250 s',
2283             2 => '1/200 s',
2284             3 => '1/160 s',
2285             4 => '1/125 s',
2286             5 => '1/100 s',
2287             6 => '1/80 s',
2288             7 => '1/60 s',
2289             },
2290             },
2291             {
2292             Name => 'FlashSyncSpeed',
2293             Notes => 'D300',
2294             Mask => 0xf0,
2295             PrintConv => {
2296             0 => '1/320 s (auto FP)',
2297             1 => '1/250 s (auto FP)',
2298             2 => '1/250 s',
2299             3 => '1/200 s',
2300             4 => '1/160 s',
2301             5 => '1/125 s',
2302             6 => '1/100 s',
2303             7 => '1/80 s',
2304             8 => '1/60 s',
2305             },
2306             },
2307             ],
2308             20.2 => { # CSe2
2309             Name => 'FlashShutterSpeed',
2310             Mask => 0x0f,
2311             PrintConvColumns => 2,
2312             PrintConv => {
2313             0 => '1/60 s',
2314             1 => '1/30 s',
2315             2 => '1/15 s',
2316             3 => '1/8 s',
2317             4 => '1/4 s',
2318             5 => '1/2 s',
2319             6 => '1 s',
2320             7 => '2 s',
2321             8 => '4 s',
2322             9 => '8 s',
2323             10 => '15 s',
2324             11 => '30 s',
2325             },
2326             },
2327             21.1 => [{ # CSe5 (D300), CSe4 (D3)
2328             Name => 'AutoBracketSet',
2329             Condition => '$$self{Model} !~ /(D3S|D300S)\b/',
2330             Notes => 'D3 and D300',
2331             Mask => 0xc0,
2332             PrintConv => {
2333             0 => 'AE & Flash',
2334             1 => 'AE Only',
2335             2 => 'Flash Only',
2336             3 => 'WB Bracketing',
2337             },
2338             },{ # CSe4 (D3S) (NC for D300S)
2339             Name => 'AutoBracketSet',
2340             Notes => 'D3S and D300S',
2341             Mask => 0xe0,
2342             PrintConv => {
2343             0 => 'AE & Flash',
2344             1 => 'AE Only',
2345             2 => 'Flash Only',
2346             3 => 'WB Bracketing',
2347             # D3S/D300S have an "ADL Bracketing" setting - PH
2348             4 => 'ADL Bracketing',
2349             },
2350             }],
2351             21.2 => [{ # CSe6 (D300), CSe5 (D3)
2352             Name => 'AutoBracketModeM',
2353             Condition => '$$self{Model} !~ /(D3S|D300S)\b/',
2354             Notes => 'D3 and D300',
2355             Mask => 0x30,
2356             PrintConv => {
2357             0 => 'Flash/Speed',
2358             1 => 'Flash/Speed/Aperture',
2359             2 => 'Flash/Aperture',
2360             3 => 'Flash Only',
2361             },
2362             },{ # CSe5 (D3S)
2363             Name => 'AutoBracketModeM',
2364             Notes => 'D3S and D300S',
2365             Mask => 0x18,
2366             PrintConv => {
2367             0 => 'Flash/Speed',
2368             1 => 'Flash/Speed/Aperture',
2369             2 => 'Flash/Aperture',
2370             3 => 'Flash Only',
2371             },
2372             }],
2373             21.3 => [{ # CSe7 (D300), CSe6 (D3)
2374             Name => 'AutoBracketOrder',
2375             Condition => '$$self{Model} !~ /(D3S|D300S)\b/',
2376             Notes => 'D3 and D300',
2377             Mask => 0x08,
2378             PrintConv => {
2379             0 => '0,-,+',
2380             1 => '-,0,+',
2381             },
2382             },{ # CSe6 (D3S)
2383             Name => 'AutoBracketOrder',
2384             Notes => 'D3S and D300S',
2385             Mask => 0x04,
2386             PrintConv => {
2387             0 => '0,-,+',
2388             1 => '-,0,+',
2389             },
2390             }],
2391             21.4 => { # CSe4 (D300), CSe3 (D3)
2392             Name => 'ModelingFlash',
2393             Mask => 0x01,
2394             PrintConv => \%onOff,
2395             },
2396             22.1 => { # CSf9, CSf10 (D3S,D300S)
2397             Name => 'NoMemoryCard',
2398             Mask => 0x80,
2399             PrintConv => {
2400             0 => 'Release Locked',
2401             1 => 'Enable Release',
2402             },
2403             },
2404             22.2 => { # CSc2
2405             Name => 'MeteringTime',
2406             Mask => 0x0f,
2407             PrintConvColumns => 2,
2408             PrintConv => {
2409             0 => '4 s',
2410             1 => '6 s',
2411             2 => '8 s',
2412             3 => '16 s',
2413             4 => '30 s',
2414             5 => '1 min',
2415             6 => '5 min',
2416             7 => '10 min',
2417             8 => '30 min',
2418             9 => 'No Limit',
2419             },
2420             },
2421             23.1 => { # CSe3
2422             Name => 'InternalFlash',
2423             Mask => 0xc0,
2424             PrintConv => {
2425             0 => 'TTL',
2426             1 => 'Manual',
2427             2 => 'Repeating Flash',
2428             3 => 'Commander Mode',
2429             },
2430             },
2431             25.1 => { #1 CSc4-d (D3S)
2432             Name => 'ImageReviewTime',
2433             Mask => 0xe0,
2434             PrintConv => {
2435             0 => '4 s',
2436             1 => '10 s',
2437             2 => '20 s',
2438             3 => '1 min',
2439             4 => '5 min',
2440             5 => '10 min',
2441             },
2442             },
2443             25.2 => { #1 CSc4-a (D3S)
2444             Name => 'PlaybackMonitorOffTime',
2445             Mask => 0x1c,
2446             PrintConv => {
2447             0 => '4 s',
2448             1 => '10 s',
2449             2 => '20 s',
2450             3 => '1 min',
2451             4 => '5 min',
2452             5 => '10 min',
2453             },
2454             },
2455             26.1 => { #1 CSc4-b (D3S)
2456             Name => 'MenuMonitorOffTime',
2457             Mask => 0xe0,
2458             PrintConv => {
2459             0 => '4 s',
2460             1 => '10 s',
2461             2 => '20 s',
2462             3 => '1 min',
2463             4 => '5 min',
2464             5 => '10 min',
2465             },
2466             },
2467             26.2 => { #1 CSc4-c (D3S)
2468             Name => 'ShootingInfoMonitorOffTime',
2469             Mask => 0x1c,
2470             PrintConv => {
2471             0 => '4 s',
2472             1 => '10 s',
2473             2 => '20 s',
2474             3 => '1 min',
2475             4 => '5 min',
2476             5 => '10 min',
2477             },
2478             },
2479             );
2480              
2481             # D700 custom settings (ref 2)
2482             %Image::ExifTool::NikonCustom::SettingsD700 = (
2483             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2484             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
2485             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
2486             WRITABLE => 1,
2487             FIRST_ENTRY => 0,
2488             DATAMEMBER => [ 16.1 ],
2489             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2490             NOTES => 'Custom settings for the D700.',
2491             0.1 => { #1
2492             Name => 'CustomSettingsBank',
2493             Mask => 0x03,
2494             PrintConv => {
2495             0 => 'A',
2496             1 => 'B',
2497             2 => 'C',
2498             3 => 'D',
2499             },
2500             },
2501             0.2 => { #1
2502             Name => 'CustomSettingsAllDefault',
2503             Notes => '"No" if any custom setting for this bank was changed from the default',
2504             Mask => 0x80,
2505             PrintConv => { 0 => 'Yes', 1 => 'No' },
2506             },
2507             1.1 => { # CSa1
2508             Name => 'AF-CPrioritySelection',
2509             Mask => 0xc0,
2510             PrintConv => {
2511             0 => 'Release',
2512             1 => 'Release + Focus',
2513             2 => 'Focus',
2514             },
2515             },
2516             1.2 => { # CSa2
2517             Name => 'AF-SPrioritySelection',
2518             Mask => 0x20,
2519             PrintConv => {
2520             0 => 'Focus',
2521             1 => 'Release',
2522             },
2523             },
2524             1.3 => { # CSa8
2525             Name => 'AFPointSelection',
2526             Mask => 0x10,
2527             PrintConv => {
2528             0 => '51 Points',
2529             1 => '11 Points',
2530             },
2531             },
2532             1.4 => { # CSa3
2533             Name => 'DynamicAFArea',
2534             Mask => 0x0c,
2535             PrintConv => {
2536             0 => '9 Points',
2537             1 => '21 Points',
2538             2 => '51 Points',
2539             3 => '51 Points (3D-tracking)',
2540             },
2541             },
2542             2.1 => { # CSa5
2543             Name => 'AFActivation',
2544             Mask => 0x80,
2545             PrintConv => {
2546             0 => 'Shutter/AF-On',
2547             1 => 'AF-On Only',
2548             },
2549             },
2550             2.2 => { # CSa7
2551             Name => 'FocusPointWrap',
2552             Mask => 0x08,
2553             PrintConv => {
2554             0 => 'No Wrap',
2555             1 => 'Wrap',
2556             },
2557             },
2558             2.3 => { # CSa6
2559             Name => 'AFPointIllumination',
2560             Mask => 0x06,
2561             PrintConv => {
2562             0 => 'Auto',
2563             1 => 'Off',
2564             2 => 'On',
2565             },
2566             },
2567             2.4 => { # CSa9
2568             Name => 'AFAssist',
2569             Mask => 0x01,
2570             PrintConv => \%onOff,
2571             },
2572             3.1 => { # CSa4
2573             Name => 'FocusTrackingLockOn',
2574             Mask => 0x07,
2575             PrintConv => {
2576             0 => '3 Normal',
2577             1 => '4',
2578             2 => '5 Long',
2579             3 => '2',
2580             4 => '1 Short',
2581             5 => 'Off',
2582             },
2583             },
2584             3.2 => { # CSa10
2585             Name => 'AF-OnForMB-D10',
2586             Mask => 0x70,
2587             PrintConv => {
2588             0 => 'AF-On',
2589             1 => 'AE/AF Lock',
2590             2 => 'AE Lock Only',
2591             3 => 'AE Lock (reset on release)',
2592             4 => 'AE Lock (hold)',
2593             5 => 'AF Lock Only',
2594             6 => 'Same as FUNC Button',
2595             },
2596             },
2597             4.1 => { # CSb1
2598             Name => 'ISOStepSize',
2599             Mask => 0xc0,
2600             PrintConv => {
2601             0 => '1/3 EV',
2602             1 => '1/2 EV',
2603             2 => '1 EV',
2604             },
2605             },
2606             4.2 => { # CSb2
2607             Name => 'ExposureControlStepSize',
2608             Mask => 0x30,
2609             PrintConv => {
2610             0 => '1/3 EV',
2611             1 => '1/2 EV',
2612             2 => '1 EV',
2613             },
2614             },
2615             4.3 => { # CSb3
2616             Name => 'ExposureCompStepSize',
2617             Mask => 0x0c,
2618             PrintConv => {
2619             0 => '1/3 EV',
2620             1 => '1/2 EV',
2621             2 => '1 EV',
2622             },
2623             },
2624             4.4 => { # CSb4
2625             Name => 'EasyExposureCompensation',
2626             Mask => 0x03,
2627             PrintConv => {
2628             0 => 'Off',
2629             1 => 'On',
2630             2 => 'On (auto reset)',
2631             },
2632             },
2633             5.1 => { # CSb5
2634             Name => 'CenterWeightedAreaSize',
2635             Mask => 0x70,
2636             PrintConv => {
2637             0 => '8 mm',
2638             1 => '12 mm',
2639             2 => '15 mm',
2640             3 => '20 mm',
2641             4 => 'Average',
2642             },
2643             },
2644             6.1 => { # CSb6-a
2645             Name => 'FineTuneOptMatrixMetering',
2646             Mask => 0xf0,
2647             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
2648             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
2649             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
2650             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2651             },
2652             6.2 => { # CSb6-c
2653             Name => 'FineTuneOptSpotMetering',
2654             Mask => 0x0f,
2655             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
2656             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
2657             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
2658             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2659             },
2660             7.1 => { # CSc1
2661             Name => 'ShutterReleaseButtonAE-L',
2662             Mask => 0x80,
2663             PrintConv => \%offOn,
2664             },
2665             7.2 => { # CSc3
2666             Name => 'SelfTimerTime',
2667             Mask => 0x30,
2668             PrintConv => {
2669             0 => '2 s',
2670             1 => '5 s',
2671             2 => '10 s',
2672             3 => '20 s',
2673             },
2674             },
2675             7.3 => { # CSc2
2676             Name => 'MeteringTime',
2677             Mask => 0x0f,
2678             PrintConvColumns => 2,
2679             PrintConv => {
2680             0 => '4 s',
2681             1 => '6 s',
2682             2 => '8 s',
2683             3 => '16 s',
2684             4 => '30 s',
2685             5 => '1 min',
2686             6 => '5 min',
2687             7 => '10 min',
2688             8 => '30 min',
2689             9 => 'No Limit',
2690             },
2691             },
2692             8.1 => { # CSc4-a
2693             Name => 'PlaybackMonitorOffTime',
2694             Mask => 0x38,
2695             PrintConv => {
2696             0 => '4 s',
2697             1 => '10 s',
2698             2 => '20 s',
2699             3 => '1 min',
2700             4 => '5 min',
2701             5 => '10 min',
2702             },
2703             },
2704             8.2 => { # CSc4-b
2705             Name => 'MenuMonitorOffTime',
2706             Mask => 0x07,
2707             PrintConv => {
2708             0 => '4 s',
2709             1 => '10 s',
2710             2 => '20 s',
2711             3 => '1 min',
2712             4 => '5 min',
2713             5 => '10 min',
2714             },
2715             },
2716             9.1 => { # CSc4-c
2717             Name => 'ShootingInfoMonitorOffTime',
2718             Mask => 0x38,
2719             PrintConv => {
2720             0 => '4 s',
2721             1 => '10 s',
2722             2 => '20 s',
2723             3 => '1 min',
2724             4 => '5 min',
2725             5 => '10 min',
2726             },
2727             },
2728             9.2 => { # CSc4-d
2729             Name => 'ImageReviewTime',
2730             Mask => 0x07,
2731             PrintConv => {
2732             0 => '4 s',
2733             1 => '10 s',
2734             2 => '20 s',
2735             3 => '1 min',
2736             4 => '5 min',
2737             5 => '10 min',
2738             },
2739             },
2740             10.1 => { # CSd1
2741             Name => 'Beep',
2742             Mask => 0xc0,
2743             PrintConv => {
2744             0 => 'High',
2745             1 => 'Low',
2746             2 => 'Off',
2747             },
2748             },
2749             10.2 => { # CSd7
2750             Name => 'ShootingInfoDisplay',
2751             Mask => 0x30,
2752             PrintConv => {
2753             0 => 'Auto', #JD (D300)
2754             1 => 'Auto', #1 (D3)
2755             2 => 'Manual (dark on light)',
2756             3 => 'Manual (light on dark)',
2757             },
2758             },
2759             10.3 => { # CSd8
2760             Name => 'LCDIllumination',
2761             Mask => 0x08,
2762             PrintConv => \%offOn,
2763             },
2764             10.4 => { # CSd9
2765             Name => 'ExposureDelayMode',
2766             Mask => 0x04,
2767             PrintConv => \%offOn,
2768             },
2769             10.5 => { # CSd2
2770             Name => 'GridDisplay',
2771             Mask => 0x02,
2772             PrintConv => \%offOn,
2773             },
2774             11.1 => { # CSd6
2775             Name => 'FileNumberSequence',
2776             Mask => 0x40,
2777             PrintConv => \%onOff,
2778             },
2779             11.2 => { # CSd4
2780             Name => 'CLModeShootingSpeed',
2781             Mask => 0x07,
2782             PrintConv => '"$val fps"',
2783             PrintConvInv => '$val=~s/\s*fps//i; $val',
2784             },
2785             12 => { # CSd5
2786             Name => 'MaxContinuousRelease',
2787             # values: 1-100
2788             },
2789             13.1 => { # CSd3
2790             Name => 'ScreenTips',
2791             Mask => 0x08,
2792             PrintConv => \%onOff,
2793             },
2794             13.2 => { # CSd11
2795             Name => 'BatteryOrder',
2796             Mask => 0x04,
2797             PrintConv => {
2798             0 => 'MB-D10 First',
2799             1 => 'Camera Battery First',
2800             },
2801             },
2802             13.3 => { # CSd10
2803             Name => 'MB-D10BatteryType',
2804             Mask => 0x03,
2805             PrintConv => {
2806             0 => 'LR6 (AA alkaline)',
2807             1 => 'HR6 (AA Ni-MH)',
2808             2 => 'FR6 (AA lithium)',
2809             3 => 'ZR6 (AA Ni-Mn)',
2810             },
2811             },
2812             15.1 => { # CSe1
2813             Name => 'FlashSyncSpeed',
2814             Mask => 0xf0,
2815             PrintConv => {
2816             0 => '1/320 s (auto FP)',
2817             1 => '1/250 s (auto FP)',
2818             2 => '1/250 s',
2819             3 => '1/200 s',
2820             4 => '1/160 s',
2821             5 => '1/125 s',
2822             6 => '1/100 s',
2823             7 => '1/80 s',
2824             8 => '1/60 s',
2825             },
2826             },
2827             15.2 => { # CSe2
2828             Name => 'FlashShutterSpeed',
2829             Mask => 0x0f,
2830             PrintConvColumns => 2,
2831             PrintConv => {
2832             0 => '1/60 s',
2833             1 => '1/30 s',
2834             2 => '1/15 s',
2835             3 => '1/8 s',
2836             4 => '1/4 s',
2837             5 => '1/2 s',
2838             6 => '1 s',
2839             7 => '2 s',
2840             8 => '4 s',
2841             9 => '8 s',
2842             10 => '15 s',
2843             11 => '30 s',
2844             },
2845             },
2846             16.1 => { # CSe3
2847             Name => 'FlashControlBuilt-in',
2848             # Note If set the Manual, Repeating Flash, Commander Mode
2849             # does not decode the detail settings.
2850             Mask => 0xc0,
2851             RawConv => '$$self{FlashControlBuiltin} = $val',
2852             PrintConv => {
2853             0 => 'TTL',
2854             1 => 'Manual',
2855             2 => 'Repeating Flash',
2856             3 => 'Commander Mode',
2857             },
2858             },
2859             16.2 => { # CSe3-b
2860             Name => 'ManualFlashOutput',
2861             Condition => '$$self{FlashControlBuiltin} == 1',
2862             Mask => 0x1f,
2863             ValueConv => '2 ** (-$val/3)',
2864             ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
2865             PrintConv => q{
2866             return 'Full' if $val > 0.99;
2867             Image::ExifTool::Exif::PrintExposureTime($val);
2868             },
2869             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
2870             },
2871             17.1 => { # CSe3-ca
2872             Name => 'RepeatingFlashOutput',
2873             Condition => '$$self{FlashControlBuiltin} == 2',
2874             Mask => 0x70,
2875             ValueConv => '2 ** (-$val-2)',
2876             ValueConvInv => '$val > 0 ? int(-log($val)/log(2)-2+0.5) : 0',
2877             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
2878             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2879             },
2880             17.2 => { # CSe3-cb
2881             Name => 'RepeatingFlashCount',
2882             Condition => '$$self{FlashControlBuiltin} == 2',
2883             Mask => 0x0f,
2884             ValueConv => '$val < 10 ? $val + 1 : 5 * ($val - 7)',
2885             ValueConvInv => '$val <= 10 ? $val - 1 : $val / 5 + 7',
2886             },
2887             18.1 => { # CSe3-cc (NC)
2888             Name => 'RepeatingFlashRate',
2889             Condition => '$$self{FlashControlBuiltin} == 2',
2890             Mask => 0xf0,
2891             ValueConv => '$val < 10 ? $val + 1 : 10 * ($val - 8)',
2892             ValueConvInv => 'int(($val <= 10 ? $val - 1 : $val / 10 + 8) + 0.5)',
2893             PrintConv => '"$val Hz"',
2894             PrintConvInv => '$val=~/(\d+)/; $1 || 0',
2895             },
2896             18.2 => { # CSe3-dd
2897             Name => 'CommanderInternalTTLChannel',
2898             Condition => '$$self{FlashControlBuiltin} == 3',
2899             Mask => 0x03,
2900             PrintConv => {
2901             0 => '1 ch',
2902             1 => '2 ch',
2903             2 => '3 ch',
2904             3 => '4 ch',
2905             },
2906             },
2907             20.1 => { # CSe3-da
2908             Name => 'CommanderInternalTTLCompBuiltin',
2909             Condition => '$$self{FlashControlBuiltin} == 3',
2910             Mask => 0x1f,
2911             ValueConv => '($val - 9) / 3',
2912             ValueConvInv => '$val * 3 + 9',
2913             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2914             PrintConvInv => '$val',
2915             },
2916             21.1 => { # CSe3-db
2917             Name => 'CommanderInternalTTLCompGroupA',
2918             Condition => '$$self{FlashControlBuiltin} == 3',
2919             Mask => 0x1f,
2920             ValueConv => '($val - 9) / 3',
2921             ValueConvInv => '$val * 3 + 9',
2922             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2923             PrintConvInv => '$val',
2924             },
2925             22.1 => { # CSe3-dc
2926             Name => 'CommanderInternalTTLCompGroupB',
2927             Condition => '$$self{FlashControlBuiltin} == 3',
2928             Mask => 0x1f,
2929             ValueConv => '($val - 9) / 3',
2930             ValueConvInv => '$val * 3 + 9',
2931             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2932             PrintConvInv => '$val',
2933             },
2934             26.1 => { # CSe5
2935             Name => 'AutoBracketSet',
2936             Mask => 0xc0,
2937             PrintConv => {
2938             0 => 'AE & Flash',
2939             1 => 'AE Only',
2940             2 => 'Flash Only',
2941             3 => 'WB Bracketing',
2942             },
2943             },
2944             26.2 => { # CSe6
2945             Name => 'AutoBracketModeM',
2946             Mask => 0x30,
2947             PrintConv => {
2948             0 => 'Flash/Speed',
2949             1 => 'Flash/Speed/Aperture',
2950             2 => 'Flash/Aperture',
2951             3 => 'Flash Only',
2952             },
2953             },
2954             26.3 => { # CSe7
2955             Name => 'AutoBracketOrder',
2956             Mask => 0x08,
2957             PrintConv => {
2958             0 => '0,-,+',
2959             1 => '-,0,+',
2960             },
2961             },
2962             26.4 => { # CSe4
2963             Name => 'ModelingFlash',
2964             Mask => 0x01,
2965             PrintConv => \%onOff,
2966             },
2967             27.1 => { # CSf2-a
2968             Name => 'MultiSelectorShootMode',
2969             Mask => 0xc0,
2970             PrintConv => {
2971             0 => 'Select Center Focus Point',
2972             1 => 'Highlight Active Focus Point',
2973             2 => 'Not Used',
2974             },
2975             },
2976             27.2 => { # CSf2-b
2977             Name => 'MultiSelectorPlaybackMode',
2978             Mask => 0x30,
2979             PrintConv => {
2980             0 => 'Thumbnail On/Off',
2981             1 => 'View Histograms',
2982             2 => 'Zoom On/Off',
2983             3 => 'Choose Folder',
2984             },
2985             },
2986             27.3 => { # CSf2-b2
2987             Name => 'InitialZoomSetting',
2988             Mask => 0x0c,
2989             PrintConv => { #1
2990             0 => 'Low Magnification',
2991             1 => 'Medium Magnification',
2992             2 => 'High Magnification',
2993             },
2994             },
2995             27.4 => { # CSf3
2996             Name => 'MultiSelector',
2997             Mask => 0x01,
2998             PrintConv => {
2999             0 => 'Do Nothing',
3000             1 => 'Reset Meter-off Delay',
3001             },
3002             },
3003             28.1 => { # CSf5-a
3004             Name => 'FuncButton',
3005             Mask => 0xf8,
3006             PrintConv => {
3007             0 => 'None',
3008             1 => 'Preview',
3009             2 => 'FV Lock',
3010             3 => 'AE/AF Lock',
3011             4 => 'AE Lock Only',
3012             5 => 'AE Lock (reset on release)',
3013             6 => 'AE Lock (hold)',
3014             7 => 'AF Lock Only',
3015             # 8 not used
3016             9 => 'Flash Off',
3017             10 => 'Bracketing Burst',
3018             11 => 'Matrix Metering',
3019             12 => 'Center-weighted Metering',
3020             13 => 'Spot Metering',
3021             14 => 'My Menu Top',
3022             15 => 'Live View',
3023             16 => '+ NEF (RAW)',
3024             17 => 'Virtual Horizon',
3025             },
3026             },
3027             29.1 => { # CSf6-a
3028             Name => 'PreviewButton',
3029             Mask => 0xf8,
3030             PrintConv => {
3031             0 => 'None',
3032             1 => 'Preview',
3033             2 => 'FV Lock',
3034             3 => 'AE/AF Lock',
3035             4 => 'AE Lock Only',
3036             5 => 'AE Lock (reset on release)',
3037             6 => 'AE Lock (hold)',
3038             7 => 'AF Lock Only',
3039             8 => 'AF-ON',
3040             9 => 'Flash Off',
3041             10 => 'Bracketing Burst',
3042             11 => 'Matrix Metering',
3043             12 => 'Center-weighted Metering',
3044             13 => 'Spot Metering',
3045             14 => 'My Menu Top',
3046             15 => 'Live View',
3047             16 => '+ NEF (RAW)',
3048             17 => 'Virtual Horizon',
3049             },
3050             },
3051             30.1 => { # CSf7-a
3052             Name => 'AELockButton',
3053             Notes => 'D300',
3054             Mask => 0xf8,
3055             PrintConv => {
3056             0 => 'None',
3057             1 => 'Preview',
3058             2 => 'FV Lock',
3059             3 => 'AE/AF Lock',
3060             4 => 'AE Lock Only',
3061             5 => 'AE Lock (reset on release)',
3062             6 => 'AE Lock (hold)',
3063             7 => 'AF Lock Only',
3064             8 => 'AF-ON',
3065             9 => 'Flash Off',
3066             10 => 'Bracketing Burst',
3067             11 => 'Matrix Metering',
3068             12 => 'Center-weighted Metering',
3069             13 => 'Spot Metering',
3070             14 => 'My Menu Top',
3071             15 => 'Live View',
3072             16 => '+ NEF (RAW)',
3073             17 => 'Virtual Horizon',
3074             },
3075             },
3076             31.1 => { # CSf5-b
3077             Name => 'FuncButtonPlusDials',
3078             Mask => 0x70,
3079             PrintConv => {
3080             0 => 'None',
3081             1 => 'Choose Image Area',
3082             2 => 'One Step Speed/Aperture',
3083             3 => 'Choose Non-CPU Lens Number',
3084             # n/a 4 => 'Focus Point Selection',
3085             5 => 'Auto bracketing',
3086             6 => 'Dynamic AF Area',
3087             7 => 'Shutter speed & Aperture lock',
3088             },
3089             },
3090             31.2 => { # CSf6-b
3091             Name => 'PreviewButtonPlusDials',
3092             Mask => 0x07,
3093             PrintConv => {
3094             0 => 'None',
3095             1 => 'Choose Image Area',
3096             2 => 'One Step Speed/Aperture',
3097             3 => 'Choose Non-CPU Lens Number',
3098             # n/a 4 => 'Focus Point Selection',
3099             5 => 'Auto bracketing',
3100             6 => 'Dynamic AF Area',
3101             7 => 'Shutter speed & Aperture lock',
3102             },
3103             },
3104             32.1 => { # CSf7-b
3105             Name => 'AELockButtonPlusDials',
3106             Mask => 0x70,
3107             Prinonv => {
3108             0 => 'None',
3109             1 => 'Choose Image Area',
3110             2 => 'One Step Speed/Aperture',
3111             3 => 'Choose Non-CPU Lens Number',
3112             # n/a 4 => 'Focus Point Selection',
3113             5 => 'Auto bracketing',
3114             6 => 'Dynamic AF Area',
3115             7 => 'Shutter speed & Aperture lock',
3116             },
3117             },
3118             33.1 => { # CSf9-a
3119             Name => 'CommandDialsReverseRotation',
3120             Mask => 0x80,
3121             PrintConv => \%noYes,
3122             },
3123             33.2 => { # CSf9-b
3124             Name => 'CommandDialsChangeMainSub',
3125             Mask => 0x40,
3126             PrintConv => \%offOn,
3127             },
3128             33.3 => { # CSf9-c
3129             Name => 'CommandDialsApertureSetting',
3130             Mask => 0x20,
3131             PrintConv => {
3132             0 => 'Sub-command Dial',
3133             1 => 'Aperture Ring',
3134             },
3135             },
3136             33.4 => { # CSf9-d
3137             Name => 'CommandDialsMenuAndPlayback',
3138             Mask => 0x10,
3139             PrintConv => \%offOn,
3140             },
3141             33.5 => { # CSf12
3142             Name => 'ReverseIndicators',
3143             Mask => 0x08,
3144             PrintConv => {
3145             0 => '+ 0 -',
3146             1 => '- 0 +',
3147             },
3148             },
3149             33.6 => { # CSf4
3150             Name => 'PhotoInfoPlayback',
3151             Mask => 0x04,
3152             PrintConv => \%offOn,
3153             },
3154             33.7 => { # CSf11
3155             Name => 'NoMemoryCard',
3156             Mask => 0x02,
3157             PrintConv => {
3158             0 => 'Release Locked',
3159             1 => 'Enable Release',
3160             },
3161             },
3162             33.8 => { # CSf10
3163             Name => 'ReleaseButtonToUseDial',
3164             Mask => 0x01,
3165             PrintConv => \%noYes,
3166             },
3167             );
3168              
3169             # D800 custom settings (ref PH)
3170             %Image::ExifTool::NikonCustom::SettingsD800 = (
3171             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3172             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
3173             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
3174             WRITABLE => 1,
3175             FIRST_ENTRY => 0,
3176             DATAMEMBER => [ 23.1 ],
3177             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3178             NOTES => 'Custom settings for the D800 and D800E.',
3179             12.1 => { # CSe5
3180             Name => 'AutoBracketingSet',
3181             Mask => 0xe0, #(NC)
3182             PrintConv => {
3183             0 => 'AE & Flash', # default
3184             1 => 'AE Only', #(NC)
3185             2 => 'Flash Only',
3186             3 => 'WB Bracketing', #(NC)
3187             4 => 'Active D-Lighting', #(NC)
3188             },
3189             },
3190             12.2 => { # CSe7
3191             Name => 'AutoBracketOrder',
3192             Mask => 0x10,
3193             PrintConv => {
3194             0 => '0,-,+',
3195             1 => '-,0,+',
3196             },
3197             },
3198             12.3 => { # CSe6
3199             Name => 'AutoBracketingMode',
3200             Mask => 0x0c,
3201             PrintConv => {
3202             0 => 'Flash/Speed',
3203             1 => 'Flash/Speed/Aperture',
3204             2 => 'Flash/Aperture',
3205             3 => 'Flash Only',
3206             },
3207             },
3208             # 21 - 100 (MaxContinuousRelease?)
3209             22.1 => { # CSe1
3210             Name => 'FlashSyncSpeed',
3211             Mask => 0xf0,
3212             PrintConv => {
3213             0 => '1/320 s (auto FP)',
3214             1 => '1/250 s (auto FP)',
3215             2 => '1/250 s',
3216             3 => '1/200 s',
3217             4 => '1/160 s',
3218             5 => '1/125 s',
3219             6 => '1/100 s',
3220             7 => '1/80 s',
3221             8 => '1/60 s',
3222             },
3223             },
3224             22.2 => { # CSe2
3225             Name => 'FlashShutterSpeed',
3226             Mask => 0x0f,
3227             PrintConvColumns => 2,
3228             PrintConv => {
3229             0 => '1/60 s',
3230             1 => '1/30 s',
3231             2 => '1/15 s',
3232             3 => '1/8 s',
3233             4 => '1/4 s',
3234             5 => '1/2 s',
3235             6 => '1 s',
3236             7 => '2 s',
3237             8 => '4 s',
3238             9 => '8 s',
3239             10 => '15 s',
3240             11 => '30 s',
3241             },
3242             },
3243             23.1 => { # CSe3
3244             Name => 'FlashControlBuilt-in',
3245             Mask => 0xc0,
3246             RawConv => '$$self{FlashControlBuiltin} = $val',
3247             PrintConv => {
3248             0 => 'TTL',
3249             1 => 'Manual',
3250             2 => 'Repeating Flash',
3251             3 => 'Commander Mode',
3252             },
3253             },
3254             23.2 => { # CSe3-b
3255             Name => 'ManualFlashOutput',
3256             Condition => '$$self{FlashControlBuiltin} == 1',
3257             Mask => 0x1f,
3258             ValueConv => '2 ** (-$val/3)',
3259             ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
3260             PrintConv => q{
3261             return 'Full' if $val > 0.99;
3262             Image::ExifTool::Exif::PrintExposureTime($val);
3263             },
3264             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
3265             },
3266             24.1 => { # CSe3-ca
3267             Name => 'RepeatingFlashOutput',
3268             Condition => '$$self{FlashControlBuiltin} == 2',
3269             Mask => 0x70,
3270             ValueConv => '2 ** (-$val-2)',
3271             ValueConvInv => '$val > 0 ? int(-log($val)/log(2)-2+0.5) : 0',
3272             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
3273             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
3274             },
3275             24.2 => { # CSe3-cb
3276             Name => 'RepeatingFlashCount',
3277             Condition => '$$self{FlashControlBuiltin} == 2',
3278             Mask => 0x0f,
3279             ValueConv => '$val < 10 ? $val + 1 : 5 * ($val - 7)',
3280             ValueConvInv => '$val <= 10 ? $val - 1 : $val / 5 + 7',
3281             },
3282             25.1 => { # CSe3-cc
3283             Name => 'RepeatingFlashRate',
3284             Condition => '$$self{FlashControlBuiltin} == 2',
3285             Mask => 0xf0,
3286             ValueConv => '$val < 10 ? $val + 1 : 10 * ($val - 8)',
3287             ValueConvInv => 'int(($val <= 10 ? $val - 1 : $val / 10 + 8) + 0.5)',
3288             PrintConv => '"$val Hz"',
3289             PrintConvInv => '$val=~/(\d+)/; $1 || 0',
3290             },
3291             25.2 => { # CSe3
3292             Name => 'CommanderChannel',
3293             Mask => 0x03,
3294             ValueConv => '$val + 1',
3295             ValueConvInv => '$val - 1',
3296             },
3297             27.1 => { # CSe3
3298             Name => 'CommanderInternalFlash',
3299             Mask => 0xc0,
3300             PrintConv => {
3301             0 => 'TTL',
3302             1 => 'Manual',
3303             2 => 'Off',
3304             },
3305             },
3306             27.2 => { # CSe3
3307             Name => 'CommanderInternalManualOutput',
3308             Mask => 0x1f,
3309             ValueConv => '2 ** (-$val/3)',
3310             ValueConvInv => '$val > 0 ? int(-log($val)/log(2) * 3 + 0.5): 0',
3311             PrintConv => q{
3312             return 'Full' if $val > 0.99;
3313             Image::ExifTool::Exif::PrintExposureTime($val);
3314             },
3315             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
3316             },
3317             28.1 => { # CSe3
3318             Name => 'CommanderGroupAMode',
3319             Mask => 0xc0,
3320             PrintConv => {
3321             0 => 'TTL',
3322             1 => 'Auto Aperture',
3323             2 => 'Manual',
3324             3 => 'Off',
3325             },
3326             },
3327             28.2 => { # CSe3
3328             Name => 'CommanderGroupAManualOutput',
3329             Mask => 0x1f,
3330             ValueConv => '2 ** (-$val/3)',
3331             ValueConvInv => '$val > 0 ? int(-log($val)/log(2) * 3 + 0.5): 0',
3332             PrintConv => q{
3333             return 'Full' if $val > 0.99;
3334             Image::ExifTool::Exif::PrintExposureTime($val);
3335             },
3336             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
3337             },
3338             29.1 => { # CSe3
3339             Name => 'CommanderGroupBMode',
3340             Mask => 0xc0,
3341             PrintConv => {
3342             0 => 'TTL',
3343             1 => 'Auto Aperture',
3344             2 => 'Manual',
3345             3 => 'Off',
3346             },
3347             },
3348             29.2 => { # CSe3
3349             Name => 'CommanderGroupBManualOutput',
3350             Mask => 0x1f,
3351             ValueConv => '2 ** (-$val/3)',
3352             ValueConvInv => '$val > 0 ? int(-log($val)/log(2) * 3 + 0.5): 0',
3353             PrintConv => q{
3354             return 'Full' if $val > 0.99;
3355             Image::ExifTool::Exif::PrintExposureTime($val);
3356             },
3357             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
3358             },
3359             30.1 => { # CSe4
3360             Name => 'ModelingFlash',
3361             Mask => 0x20,
3362             PrintConv => \%onOff,
3363             },
3364             30.2 => { # CSe3
3365             Name => 'CommanderInternalTTLComp',
3366             Mask => 0x1f,
3367             ValueConv => '($val - 9) / 3',
3368             ValueConvInv => '$val * 3 + 9',
3369             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
3370             PrintConvInv => '$val',
3371             },
3372             31.1 => { # CSe3
3373             Name => 'CommanderGroupA_TTL-AAComp',
3374             Mask => 0x1f,
3375             ValueConv => '($val - 9) / 3',
3376             ValueConvInv => '$val * 3 + 9',
3377             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
3378             PrintConvInv => '$val',
3379             },
3380             32.1 => { # CSe3
3381             Name => 'CommanderGroupB_TTL-AAComp',
3382             Mask => 0x1f,
3383             ValueConv => '($val - 9) / 3',
3384             ValueConvInv => '$val * 3 + 9',
3385             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
3386             PrintConvInv => '$val',
3387             },
3388             # 47 - related to flash
3389             );
3390              
3391             # D5 custom settings (ref 1)
3392             %Image::ExifTool::NikonCustom::SettingsD5 = (
3393             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3394             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
3395             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
3396             WRITABLE => 1,
3397             FIRST_ENTRY => 0,
3398             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3399             NOTES => 'Custom settings for the D5.',
3400             0.1 => {
3401             Name => 'CustomSettingsBank',
3402             Mask => 0x03,
3403             PrintConv => {
3404             0 => 'A',
3405             1 => 'B',
3406             2 => 'C',
3407             3 => 'D',
3408             },
3409             },
3410             1.1 => { # CSa1
3411             Name => 'AF-CPrioritySelection',
3412             Mask => 0xc0,
3413             PrintConv => {
3414             0 => 'Release',
3415             1 => 'Release + Focus',
3416             2 => 'Focus',
3417             3 => 'Focus + Release',
3418             },
3419             },
3420             1.2 => { # CSa2
3421             Name => 'AF-SPrioritySelection',
3422             Mask => 0x20,
3423             PrintConv => {
3424             0 => 'Focus',
3425             1 => 'Release',
3426             },
3427             },
3428             1.3 => { # CSa6
3429             Name => 'NumberOfFocusPoints',
3430             Mask => 0x10,
3431             PrintConv => {
3432             0 => '55 Points',
3433             1 => '15 Points',
3434             },
3435             },
3436             1.4 => { # CSa4
3437             Name => 'Three-DTrackingFaceDetection',
3438             Mask => 0x08,
3439             PrintConv => {
3440             0 => 'Off',
3441             1 => 'On',
3442             },
3443             },
3444             1.5 => { # CSa3-a
3445             Name => 'BlockShotAFResponse',
3446             Mask => 0x07,
3447             #values 1-5
3448             },
3449             2.1 => { # CSa11
3450             Name => 'FocusPointWrap',
3451             Mask => 0x08,
3452             PrintConv => {
3453             0 => 'No Wrap',
3454             1 => 'Wrap',
3455             },
3456             },
3457             2.2 => { # CSa12-d
3458             Name => 'AFPointBrightness',
3459             Mask => 0x06,
3460             PrintConv => {
3461             0 => 'Auto',
3462             1 => 'On',
3463             2 => 'Off',
3464             },
3465             },
3466             4.1 => { # CSd3
3467             Name => 'ISODisplay',
3468             Mask => 0x08,
3469             PrintConv => {
3470             0 => 'Show ISO Sensitivity',
3471             1 => 'Show Frame Count',
3472             },
3473             },
3474             4.2 => { # CSd8
3475             Name => 'GridDisplay',
3476             Mask => 0x02,
3477             PrintConv => \%onOff,
3478             },
3479             5.1 => { # CSd9
3480             Name => 'LCDIllumination',
3481             Mask => 0x20,
3482             PrintConv => \%offOn,
3483             },
3484             5.2 => { # CSd6
3485             Name => 'ElectronicFront-CurtainShutter',
3486             Mask => 0x08,
3487             PrintConv => \%offOn,
3488             },
3489             6.1 => { # CSf7
3490             Name => 'ReverseIndicators',
3491             Mask => 0x80,
3492             PrintConv => {
3493             0 => '+ 0 -',
3494             1 => '- 0 +',
3495             },
3496             },
3497             6.2 => { # CSf4-a
3498             Name => 'CommandDialsReverseRotation',
3499             Mask => 0x18,
3500             PrintConv => {
3501             0 => 'No',
3502             1 => 'Shutter Speed & Aperture',
3503             2 => 'Exposure Compensation',
3504             3 => 'Exposure Compensation, Shutter Speed & Aperture',
3505             },
3506             },
3507             6.3 => { # CSb4
3508             Name => 'EasyExposureCompensation',
3509             Mask => 0x03,
3510             PrintConv => {
3511             0 => 'Off',
3512             1 => 'On',
3513             2 => 'On (auto reset)',
3514             },
3515             },
3516             7.1 => { # CSb2
3517             Name => 'ExposureControlStepSize',
3518             Mask => 0xc0,
3519             PrintConv => {
3520             0 => '1/3 EV',
3521             1 => '1/2 EV',
3522             2 => '1 EV',
3523             },
3524             },
3525             7.2 => { # CSb1
3526             Name => 'ISOStepSize',
3527             Mask => 0x30,
3528             PrintConv => {
3529             0 => '1/3 EV',
3530             1 => '1/2 EV',
3531             2 => '1 EV',
3532             },
3533             },
3534             7.3 => { # CSb3
3535             Name => 'ExposureCompStepSize',
3536             Mask => 0x0c,
3537             PrintConv => {
3538             0 => '1/3 EV',
3539             1 => '1/2 EV',
3540             2 => '1 EV',
3541             },
3542             },
3543             8.1 => { # CSb6
3544             Name => 'CenterWeightedAreaSize',
3545             Mask => 0xe0,
3546             PrintConv => {
3547             0 => '8 mm',
3548             1 => '12 mm',
3549             2 => '15 mm',
3550             3 => '20 mm',
3551             4 => 'Average',
3552             },
3553             },
3554             8.2 => { # CSb7-a
3555             Name => 'FineTuneOptMatrixMetering',
3556             Mask => 0x0f,
3557             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
3558             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
3559             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
3560             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
3561             },
3562             9.1 => { # CSb7-b
3563             Name => 'FineTuneOptCenterWeighted',
3564             Mask => 0xf0,
3565             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
3566             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
3567             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
3568             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
3569             },
3570             9.2 => { # CSb7-c
3571             Name => 'FineTuneOptSpotMetering',
3572             Mask => 0x0f,
3573             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
3574             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
3575             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
3576             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
3577             },
3578             10.1 => { # CSf2-a
3579             Name => 'MultiSelectorShootMode',
3580             Mask => 0xe0,
3581             PrintConv => {
3582             0 => 'Select Center Focus Point (Reset)',
3583             1 => 'Zoom On/Off', # this is the documented (and actual) default value, but the choice does not appear on the camera menu
3584             2 => 'Preset Focus Point (Pre)',
3585             4 => 'Not Used (None)',
3586             },
3587             },
3588             # 10.2 => { # CSf2-b # moved from the D500 position to Nikon_ShotInfoD5_0x0ab1 with the Mask and PrintConv as specified below. Further research required.
3589             # Name => 'MultiSelectorPlaybackMode',
3590             # Mask => 0x70,
3591             # PrintConv => {
3592             # 0 => 'Zoom On/Off',
3593             # 1 => 'Choose Folder',
3594             # 6 => 'Thumbnail On/Off',
3595             # 7 => 'View Histograms',
3596             # },
3597             # },
3598             10.3 => { # CSf5
3599             Name => 'MultiSelector',
3600             Mask => 0x01,
3601             PrintConv => {
3602             0 => 'Do Nothing',
3603             1 => 'Reset Meter-off Delay',
3604             },
3605             },
3606             11.1 => { # CSd5
3607             Name => 'ExposureDelayMode',
3608             Mask => 0xc0,
3609             PrintConv => {
3610             0 => 'Off',
3611             1 => '1 s',
3612             2 => '2 s',
3613             3 => '3 s',
3614             },
3615             },
3616             11.2 => { # CSd1
3617             Name => 'CLModeShootingSpeed',
3618             Mask => 0x0f,
3619             PrintConv => '"$val fps"',
3620             PrintConvInv => '$val=~s/\s*fps//i; $val',
3621             },
3622             12.1 => { # CSd2
3623             Name => 'MaxContinuousRelease',
3624             # values: 1-100
3625             },
3626             13.1 => { # CSe7
3627             Name => 'AutoBracketOrder',
3628             Mask => 0x10,
3629             PrintConv => {
3630             0 => '0,-,+',
3631             1 => '-,0,+',
3632             },
3633             },
3634             13.2 => { # CSe6
3635             Name => 'AutoBracketModeM',
3636             Mask => 0x0c,
3637             PrintConv => {
3638             0 => 'Flash/Speed',
3639             1 => 'Flash/Speed/Aperture',
3640             2 => 'Flash/Aperture',
3641             3 => 'Flash Only',
3642             },
3643             },
3644             14.1 => { # CSf1-c
3645             Name => 'Func1Button',
3646             Mask => 0x3f,
3647             PrintConv => {
3648             0 => 'None',
3649             1 => 'Preview',
3650             2 => 'FV Lock',
3651             3 => 'AE/AF Lock',
3652             4 => 'AE Lock Only',
3653             5 => 'AE Lock (reset on release)',
3654             6 => 'AE Lock (hold)',
3655             7 => 'AF Lock Only',
3656             8 => 'AF-On',
3657             10 => 'Bracketing Burst',
3658             11 => 'Matrix Metering',
3659             12 => 'Center-weighted Metering',
3660             13 => 'Spot Metering',
3661             14 => 'Playback',
3662             15 => 'My Menu Top Item',
3663             16 => '+NEF(RAW)',
3664             17 => 'Virtual Horizon',
3665             19 => 'Grid Display',
3666             20 => 'My Menu',
3667             21 => 'Disable Synchronized Release',
3668             22 => 'Remote Release Only',
3669             26 => 'Flash Disable/Enable',
3670             27 => 'Highlight-weighted Metering',
3671             36 => 'AF-Area Mode (Single)',
3672             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
3673             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
3674             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
3675             40 => 'AF-Area Mode (Group Area AF)',
3676             41 => 'AF-Area Mode (Auto Area AF)',
3677             42 => 'AF-Area Mode + AF-On (Single)',
3678             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
3679             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
3680             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
3681             46 => 'AF-Area Mode + AF-On (Group Area AF)',
3682             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
3683             49 => 'Sync Release (Master Only)',
3684             50 => 'Sync Release (Remote Only)',
3685             58 => 'AF-Area Mode + AF-On (Group Area AF - HL)',
3686             59 => 'AF-Area Mode + AF-On (Group Area AF - VL)',
3687             },
3688             },
3689             15.1 => { # CSf1-a
3690             Name => 'PreviewButton',
3691             Mask => 0x3f,
3692             PrintConv => {
3693             0 => 'None',
3694             1 => 'Preview',
3695             2 => 'FV Lock',
3696             3 => 'AE/AF Lock',
3697             4 => 'AE Lock Only',
3698             5 => 'AE Lock (reset on release)',
3699             6 => 'AE Lock (hold)',
3700             7 => 'AF Lock Only',
3701             8 => 'AF-On',
3702             10 => 'Bracketing Burst',
3703             11 => 'Matrix Metering',
3704             12 => 'Center-weighted Metering',
3705             13 => 'Spot Metering',
3706             14 => 'Playback',
3707             15 => 'My Menu Top Item',
3708             16 => '+NEF(RAW)',
3709             17 => 'Virtual Horizon',
3710             19 => 'Grid Display',
3711             20 => 'My Menu',
3712             21 => 'Disable Synchronized Release',
3713             22 => 'Remote Release Only',
3714             26 => 'Flash Disable/Enable',
3715             27 => 'Highlight-weighted Metering',
3716             36 => 'AF-Area Mode (Single)',
3717             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
3718             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
3719             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
3720             40 => 'AF-Area Mode (Group Area AF)',
3721             41 => 'AF-Area Mode (Auto Area AF)',
3722             42 => 'AF-Area Mode + AF-On (Single)',
3723             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
3724             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
3725             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
3726             46 => 'AF-Area Mode + AF-On (Group Area AF)',
3727             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
3728             49 => 'Sync Release (Master Only)',
3729             50 => 'Sync Release (Remote Only)',
3730             58 => 'AF-Area Mode + AF-On (Group Area AF - HL)',
3731             59 => 'AF-Area Mode + AF-On (Group Area AF - VL)',
3732             },
3733             },
3734             16.1 => { # CSf1-p
3735             Name => 'AssignBktButton',
3736             Mask => 0x07,
3737             PrintConv => {
3738             0 => 'Auto Bracketing',
3739             1 => 'Multiple Exposure',
3740             2 => 'HDR (high dynamic range)',
3741             3 => 'None',
3742             },
3743             },
3744             18.1 => { # CSf4-b
3745             Name => 'CommandDialsChangeMainSub',
3746             Mask => 0xe0,
3747             PrintConv => {
3748             0 => 'Autofocus Off, Exposure Off',
3749             1 => 'Autofocus Off, Exposure On',
3750             2 => 'Autofocus Off, Exposure On (Mode A)',
3751             4 => 'Autofocus On, Exposure Off',
3752             5 => 'Autofocus On, Exposure On',
3753             6 => 'Autofocus On, Exposure On (Mode A)',
3754             },
3755             },
3756             18.2 => { # CSf4-d
3757             Name => 'CommandDialsMenuAndPlayback',
3758             Mask => 0x18,
3759             PrintConv => {
3760             0 => 'On',
3761             1 => 'Off',
3762             2 => 'On (Image Review Excluded)',
3763             },
3764             },
3765             18.3 => { # CSf4-c
3766             Name => 'CommandDialsApertureSetting',
3767             Mask => 0x04,
3768             PrintConv => {
3769             0 => 'Sub-command Dial',
3770             1 => 'Aperture Ring',
3771             },
3772             },
3773             18.4 => { # CSf6
3774             Name => 'ReleaseButtonToUseDial',
3775             Mask => 0x01,
3776             PrintConv => \%noYes,
3777             },
3778             19.1 => { # CSc2
3779             Name => 'StandbyTimer',
3780             Mask => 0xf0,
3781             PrintConv => {
3782             0 => '4 s',
3783             1 => '6 s',
3784             3 => '10 s',
3785             5 => '30 s',
3786             6 => '1 min',
3787             7 => '5 min',
3788             8 => '10 min',
3789             9 => '30 min',
3790             10 => 'No Limit',
3791             },
3792             },
3793             20.1 => { # CSc3-a
3794             Name => 'SelfTimerTime',
3795             Mask => 0xc0,
3796             PrintConv => {
3797             0 => '2 s',
3798             1 => '5 s',
3799             2 => '10 s',
3800             3 => '20 s',
3801             },
3802             },
3803             20.2 => { # CSc3-c
3804             Name => 'SelfTimerShotInterval',
3805             Mask => 0x30,
3806             PrintConv => {
3807             0 => '0.5 s',
3808             1 => '1 s',
3809             2 => '2 s',
3810             3 => '3 s',
3811             },
3812             },
3813             20.3 => { # CSc3-b
3814             Name => 'SelfTimerShotCount',
3815             Mask => 0x0f,
3816             },
3817             21.1 => { # CSc4-d
3818             Name => 'ImageReviewMonitorOffTime',
3819             Mask => 0xe0,
3820             PrintConv => {
3821             0 => '2 s',
3822             1 => '4 s',
3823             3 => '10 s',
3824             4 => '20 s',
3825             5 => '1 min',
3826             6 => '5 min',
3827             7 => '10 min',
3828             },
3829             },
3830             21.2 => { # CSc4-e
3831             Name => 'LiveViewMonitorOffTime',
3832             Mask => 0x1c,
3833             PrintConv => {
3834             1 => '5 min',
3835             2 => '10 min',
3836             3 => '15 min',
3837             4 => '20 min',
3838             5 => '30 min',
3839             6 => 'No Limit',
3840             },
3841             },
3842             22.1 => { # CSc4-b
3843             Name => 'MenuMonitorOffTime',
3844             Mask => 0xe0,
3845             PrintConv => {
3846             0 => '4 s',
3847             2 => '10 s',
3848             4 => '20 s',
3849             5 => '1 min',
3850             6 => '5 min',
3851             7 => '10 min',
3852             },
3853             },
3854             22.2 => { # CSc4-c
3855             Name => 'ShootingInfoMonitorOffTime',
3856             Mask => 0x1c,
3857             PrintConv => {
3858             0 => '4 s',
3859             2 => '10 s',
3860             4 => '20 s',
3861             5 => '1 min',
3862             6 => '5 min',
3863             7 => '10 min',
3864             },
3865             },
3866             23.1 => { # CSe1
3867             Name => 'FlashSyncSpeed',
3868             Mask => 0xf0,
3869             PrintConv => {
3870             2 => '1/250 s (auto FP)',
3871             3 => '1/250 s',
3872             5 => '1/200 s',
3873             6 => '1/160 s',
3874             7 => '1/125 s',
3875             8 => '1/100 s',
3876             9 => '1/80 s',
3877             10 => '1/60 s',
3878             },
3879             },
3880             23.2 => { # CSe2
3881             Name => 'FlashShutterSpeed',
3882             Mask => 0x0f,
3883             PrintConvColumns => 2,
3884             PrintConv => {
3885             0 => '1/60 s',
3886             1 => '1/30 s',
3887             2 => '1/15 s',
3888             3 => '1/8 s',
3889             4 => '1/4 s',
3890             5 => '1/2 s',
3891             6 => '1 s',
3892             7 => '2 s',
3893             8 => '4 s',
3894             9 => '8 s',
3895             10 => '15 s',
3896             11 => '30 s',
3897             },
3898             },
3899             31.1 => { # CSe5
3900             Name => 'ModelingFlash',
3901             Mask => 0x20,
3902             PrintConv => \%onOff,
3903             },
3904             36.1 => { # CSc4-a
3905             Name => 'PlaybackMonitorOffTime',
3906             Mask => 0xe0,
3907             PrintConv => {
3908             0 => '4 s',
3909             1 => '10 s',
3910             2 => '20 s',
3911             3 => '1 min',
3912             4 => '5 min',
3913             5 => '10 min',
3914             },
3915             },
3916             37.1 => { # CSf2-c
3917             Name => 'MultiSelectorLiveView',
3918             Mask => 0xc0,
3919             PrintConv => {
3920             0 => 'Reset',
3921             1 => 'Zoom',
3922             3 => 'Not Used',
3923             },
3924             },
3925             38.1 => { # CSf3-a
3926             Name => 'ShutterSpeedLock',
3927             Mask => 0x80,
3928             PrintConv => \%offOn,
3929             },
3930             38.2 => { # CSf3-b
3931             Name => 'ApertureLock',
3932             Mask => 0x40,
3933             PrintConv => \%offOn,
3934             },
3935             38.3 => { # CSg1-h
3936             Name => 'MovieShutterButton',
3937             Mask => 0x10,
3938             PrintConv => {
3939             0 => 'Take Photo',
3940             1 => 'Record Movies',
3941             },
3942             },
3943             38.4 => { # CSe3
3944             Name => 'FlashExposureCompArea',
3945             Mask => 0x04,
3946             PrintConv => {
3947             0 => 'Entire Frame',
3948             1 => 'Background Only',
3949             },
3950             },
3951             38.5 => { # CSe4
3952             Name => 'AutoFlashISOSensitivity',
3953             Mask => 0x02,
3954             PrintConv => {
3955             0 => 'Subject and Background',
3956             1 => 'Subject Only',
3957             },
3958             },
3959             41.1 => { # CSg1-c
3960             Name => 'MovieFunc1Button',
3961             Mask => 0xf0,
3962             PrintConv => {
3963             0 => 'None',
3964             2 => 'Power Aperture (close)',
3965             3 => 'Index Marking',
3966             4 => 'View Photo Shooting Info',
3967             11 => 'Exposure Compensation -',
3968             },
3969             },
3970             41.2 => { # CSg1-a
3971             Name => 'MoviePreviewButton',
3972             Mask => 0x0f,
3973             PrintConv => {
3974             0 => 'None',
3975             1 => 'Power Aperture (open)',
3976             3 => 'Index Marking',
3977             4 => 'View Photo Shooting Info',
3978             10 => 'Exposure Compensation +',
3979             },
3980             },
3981             42.1 => { # CSf1-d
3982             Name => 'Func1ButtonPlusDials',
3983             Mask => 0x0f,
3984             PrintConv => {
3985             0 => 'None',
3986             1 => 'Choose Image Area',
3987             2 => 'Shutter Speed & Aperture Lock',
3988             3 => 'One Step Speed / Aperture',
3989             4 => 'Choose Non-CPU Lens Number',
3990             5 => 'Active D-Lighting',
3991             7 => 'Photo Shooting Menu Bank',
3992             8 => 'Exposure Delay Mode',
3993             },
3994             },
3995             43.1 => { # CSf1-b
3996             Name => 'PreviewButtonPlusDials',
3997             Mask => 0x0f,
3998             PrintConv => {
3999             0 => 'None',
4000             1 => 'Choose Image Area',
4001             2 => 'Shutter Speed & Aperture Lock',
4002             3 => 'One Step Speed / Aperture',
4003             4 => 'Choose Non-CPU Lens Number',
4004             5 => 'Active D-Lighting',
4005             7 => 'Photo Shooting Menu Bank', # new with D500
4006             8 => 'Exposure Delay Mode',
4007             },
4008             },
4009             45.1 => { # CSf1-q
4010             Name => 'AssignMovieRecordButtonPlusDials',
4011             Mask => 0x0f,
4012             PrintConv => {
4013             0 => 'None',
4014             1 => 'Choose Image Area',
4015             2 => 'Shutter Speed & Aperture Lock',
4016             7 => 'Photo Shooting Menu Bank',
4017             11 => 'Exposure Mode',
4018             },
4019             },
4020             46.1 => { # CSb7-d
4021             Name => 'FineTuneOptHighlightWeighted',
4022             Mask => 0x0f,
4023             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
4024             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
4025             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
4026             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
4027             },
4028             47.1 => { # CSa12-b
4029             Name => 'DynamicAreaAFDisplay',
4030             Mask => 0x80,
4031             PrintConv => \%offOn,
4032             },
4033             47.2 => { # CSa12-a
4034             Name => 'AFPointIllumination',
4035             Mask => 0x40,
4036             PrintConv => {
4037             0 => 'Off',
4038             1 => 'On During Manual Focusing',
4039             },
4040             },
4041             47.3 => { # CSa7
4042             Name => 'StoreByOrientation',
4043             Mask => 0x18,
4044             PrintConv => {
4045             0 => 'Off',
4046             1 => 'Focus Point',
4047             2 => 'Focus Point and AF-area Mode',
4048             },
4049             },
4050             48.1 => { # CSb5
4051             Name => 'MatrixMetering',
4052             Mask => 0x80,
4053             PrintConv => {
4054             0 => 'Face Detection On',
4055             1 => 'Face Detection Off',
4056             },
4057             },
4058             48.2 => { # CSf8
4059             Name => 'LiveViewButtonOptions',
4060             Mask => 0x30,
4061             PrintConv => {
4062             0 => 'Enable',
4063             1 => 'Enable (Standby Timer Active)', # new with D500
4064             2 => 'Disable',
4065             },
4066             },
4067             48.3 => { # CSa10
4068             Name => 'AFModeRestrictions',
4069             Mask => 0x03,
4070             PrintConv => {
4071             0 => 'No Restrictions',
4072             1 => 'AF-C',
4073             2 => 'AF-S',
4074             },
4075             },
4076             49.1 => { # CSa9
4077             Name => 'LimitAFAreaModeSelection',
4078             Mask => 0x7e,
4079             PrintConv => {
4080             0 => 'No Restrictions',
4081             BITMASK => {
4082             0 => 'Auto-area',
4083             1 => 'Group-area',
4084             2 => '3D-tracking',
4085             3 => 'Dynamic area (153 points)',
4086             4 => 'Dynamic area (72 points)',
4087             5 => 'Dynamic area (25 points)',
4088             },
4089             },
4090             },
4091             52.1 => { # CSf1-r
4092             Name => 'LensFocusFunctionButtons',
4093             Mask => 0x3f,
4094             PrintConv => {
4095             3 => 'AE/AF Lock',
4096             4 => 'AE Lock Only',
4097             7 => 'AF Lock Only',
4098             8 => 'AF-On',
4099             24 => 'Preset Focus Point',
4100             26 => 'Flash Disable/Enable',
4101             36 => 'AF-Area Mode (Single)',
4102             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
4103             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
4104             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
4105             40 => 'AF-Area Mode (Group Area AF)',
4106             41 => 'AF-Area Mode (Auto Area AF)',
4107             42 => 'AF-Area Mode + AF-On (Single)',
4108             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
4109             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
4110             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
4111             46 => 'AF-Area Mode + AF-On (Group Area AF)',
4112             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
4113             49 => 'Sync Release (Master Only)',
4114             50 => 'Sync Release (Remote Only)',
4115             },
4116             },
4117             66.1 => { # CSf1-o
4118             Name => 'VerticalMultiSelector',
4119             Mask => 0xff,
4120             PrintHex => 1,
4121             PrintConv => {
4122             0x00 => 'Same as Multi-Selector with Info(U/D) & Playback(R/L)',
4123             0x08 => 'Same as Multi-Selector with Info(R/L) & Playback(U/D)',
4124             0x80 => 'Focus Point Selection',
4125             },
4126             },
4127             67.1 => { # CSf1-g
4128             Name => 'VerticalFuncButton',
4129             Mask => 0x3f,
4130             PrintConv => {
4131             0 => 'None',
4132             1 => 'Preview',
4133             2 => 'FV Lock',
4134             3 => 'AE/AF Lock',
4135             4 => 'AE Lock Only',
4136             5 => 'AE Lock (reset on release)',
4137             6 => 'AE Lock (hold)',
4138             7 => 'AF Lock Only',
4139             8 => 'AF-On',
4140             10 => 'Bracketing Burst',
4141             11 => 'Matrix Metering',
4142             12 => 'Center-weighted Metering',
4143             13 => 'Spot Metering',
4144             14 => 'Playback',
4145             15 => 'My Menu Top Item',
4146             16 => '+NEF(RAW)',
4147             17 => 'Virtual Horizon',
4148             18 => 'Reset Focus Point',
4149             19 => 'Grid Display',
4150             20 => 'My Menu',
4151             22 => 'Remote Release Only',
4152             23 => 'Preset Focus Point',
4153             26 => 'Flash Disable/Enable',
4154             27 => 'Highlight-weighted Metering',
4155             36 => 'AF-Area Mode (Single)',
4156             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
4157             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
4158             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
4159             40 => 'AF-Area Mode (Group Area AF)',
4160             41 => 'AF-Area Mode (Auto Area AF)',
4161             42 => 'AF-Area Mode + AF-On (Single)',
4162             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
4163             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
4164             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
4165             46 => 'AF-Area Mode + AF-On (Group Area AF)',
4166             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
4167             49 => 'Sync Release (Master Only)',
4168             50 => 'Sync Release (Remote Only)',
4169             54 => 'Highlight Active Focus Point',
4170             },
4171             },
4172             68.1 => { # CSf1-h
4173             Name => 'VerticalFuncPlusDials',
4174             Mask => 0x0f,
4175             PrintConv => {
4176             0 => 'None',
4177             1 => 'Choose Image Area',
4178             2 => 'Shutter Speed & Aperture Lock',
4179             3 => 'One Step Speed / Aperture',
4180             4 => 'Choose Non-CPU Lens Number',
4181             5 => 'Active D-Lighting',
4182             7 => 'Photo Shooting Menu Bank',
4183             8 => 'Exposure Delay Mode',
4184             10 => 'ISO Sensitivity',
4185             11 => 'Exposure Mode',
4186             12 => 'Exposure Compensation',
4187             13 => 'Metering',
4188             },
4189             },
4190             70.1 => { # CSf1-j
4191             Name => 'AF-OnButton',
4192             Mask => 0x3f,
4193             PrintConv => {
4194             0 => 'None',
4195             3 => 'AE/AF Lock',
4196             4 => 'AE Lock Only',
4197             5 => 'AE Lock (reset on release)',
4198             6 => 'AE Lock (hold)',
4199             7 => 'AF Lock Only',
4200             8 => 'AF-On',
4201             36 => 'AF-Area Mode (Single)',
4202             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
4203             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
4204             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
4205             40 => 'AF-Area Mode (Group Area AF)',
4206             41 => 'AF-Area Mode (Auto Area AF)',
4207             42 => 'AF-Area Mode + AF-On (Single)',
4208             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
4209             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
4210             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
4211             46 => 'AF-Area Mode + AF-On (Group Area AF)',
4212             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
4213             },
4214             },
4215             71.1 => { # CSf1-k
4216             Name => 'SubSelector',
4217             Mask => 0x80,
4218             PrintConv => {
4219             0 => 'Focus Point Selection',
4220             1 => 'Same as MultiSelector',
4221             },
4222             },
4223             72.1 => { # CSf1-l
4224             Name => 'SubSelectorCenter',
4225             Mask => 0x3f,
4226             PrintConv => {
4227             0 => 'None',
4228             1 => 'Preview',
4229             2 => 'FV Lock',
4230             3 => 'AE/AF Lock',
4231             4 => 'AE Lock Only',
4232             5 => 'AE Lock (reset on release)',
4233             6 => 'AE Lock (hold)',
4234             7 => 'AF Lock Only',
4235             8 => 'AF-On',
4236             10 => 'Bracketing Burst',
4237             11 => 'Matrix Metering',
4238             12 => 'Center-weighted Metering',
4239             13 => 'Spot Metering',
4240             14 => 'Playback',
4241             15 => 'My Menu Top Item',
4242             16 => '+NEF(RAW)',
4243             17 => 'Virtual Horizon',
4244             18 => 'Reset Focus Point',
4245             19 => 'Grid Display',
4246             20 => 'My Menu',
4247             22 => 'Remote Release Only',
4248             23 => 'Preset Focus Point',
4249             26 => 'Flash Disable/Enable',
4250             27 => 'Highlight-weighted Metering',
4251             36 => 'AF-Area Mode (Single)',
4252             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
4253             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
4254             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
4255             40 => 'AF-Area Mode (Group Area AF)',
4256             41 => 'AF-Area Mode (Auto Area AF)',
4257             42 => 'AF-Area Mode + AF-On (Single)',
4258             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
4259             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
4260             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
4261             46 => 'AF-Area Mode + AF-On (Group Area AF)',
4262             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
4263             49 => 'Sync Release (Master Only)',
4264             50 => 'Sync Release (Remote Only)',
4265             54 => 'Highlight Active Focus Point',
4266             },
4267             },
4268             73.1 => { # CSf1-m
4269             Name => 'SubSelectorPlusDials',
4270             Mask => 0x0f,
4271             PrintConv => {
4272             0 => 'None',
4273             1 => 'Choose Image Area',
4274             2 => 'Shutter Speed & Aperture Lock',
4275             4 => 'Choose Non-CPU Lens Number',
4276             7 => 'Photo Shooting Menu Bank',
4277             },
4278             },
4279             74.1 => { # CSg1-f
4280             Name => 'AssignMovieSubselector',
4281             Mask => 0xf0,
4282             PrintConv => {
4283             0 => 'None',
4284             3 => 'Index Marking',
4285             4 => 'View Photo Shooting Info',
4286             5 => 'AE/AF Lock',
4287             6 => 'AE Lock (Only)',
4288             7 => 'AE Lock (Hold)',
4289             8 => 'AF Lock (Only)',
4290             },
4291             },
4292             75.1 => { # CSg1-d
4293             Name => 'AssignMovieFunc1ButtonPlusDials',
4294             Mask => 0x10,
4295             PrintConv => {
4296             0 => 'None',
4297             1 => 'Choose Image Area',
4298             },
4299             },
4300             75.2 => { # CSg1-b
4301             Name => 'AssignMoviePreviewButtonPlusDials',
4302             Mask => 0x01,
4303             PrintConv => {
4304             0 => 'None',
4305             1 => 'Choose Image Area (DX/1.3x)',
4306             },
4307             },
4308             76.1 => { # CSg1-g
4309             Name => 'AssignMovieSubselectorPlusDials',
4310             Mask => 0x10,
4311             PrintConv => {
4312             0 => 'None',
4313             1 => 'Choose Image Area',
4314             },
4315             },
4316             77.1 => { # CSd4
4317             Name => 'SyncReleaseMode', # new with D500
4318             Mask => 0x80,
4319             PrintConv => {
4320             0 => 'No Sync',
4321             1 => 'Sync',
4322             },
4323             },
4324             78.1 => { # CSa5
4325             Name => 'Three-DTrackingWatchArea', # new with D500
4326             Mask => 0x80,
4327             PrintConv => {
4328             0 => 'Wide',
4329             1 => 'Normal',
4330             },
4331             },
4332             78.2 => { # CSa3-b
4333             Name => 'SubjectMotion',
4334             Mask => 0x60,
4335             PrintConv => {
4336             0 => 'Steady',
4337             1 => 'Middle',
4338             2 => 'Erratic',
4339             },
4340             },
4341             78.3 => { # CSa8
4342             Name => 'AFActivation',
4343             Mask => 0x08,
4344             PrintConv => {
4345             0 => 'Shutter/AF-On',
4346             1 => 'AF-On Only',
4347             },
4348             },
4349             78.4 => { # CSc1
4350             Name => 'ShutterReleaseButtonAE-L',
4351             Mask => 0x03,
4352             PrintConv => {
4353             0 => 'Off',
4354             1 => 'On (Half Press)',
4355             2 => 'On (Burst Mode)'
4356             },
4357             },
4358             79.1 => { # CSf1-n
4359             Name => 'VerticalAFOnButton',
4360             Mask => 0x7f,
4361             PrintConv => {
4362             0 => 'None',
4363             3 => 'AE/AF Lock',
4364             4 => 'AE Lock Only',
4365             5 => 'AE Lock (reset on release)',
4366             6 => 'AE Lock (hold)',
4367             7 => 'AF Lock Only',
4368             8 => 'AF-On',
4369             36 => 'AF-Area Mode (Single)',
4370             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
4371             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
4372             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
4373             40 => 'AF-Area Mode (Group Area AF)',
4374             41 => 'AF-Area Mode (Auto Area AF)',
4375             42 => 'AF-Area Mode + AF-On (Single)',
4376             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
4377             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
4378             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
4379             46 => 'AF-Area Mode + AF-On (Group Area AF)',
4380             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
4381             100 => 'Same as AF-On',
4382             },
4383             },
4384             80.1 => { # CSf1-e
4385             Name => 'Func2Button',
4386             Mask => 0x3f,
4387             PrintConv => {
4388             0 => 'None',
4389             1 => 'Preview',
4390             2 => 'FV Lock',
4391             3 => 'AE/AF Lock',
4392             4 => 'AE Lock Only',
4393             5 => 'AE Lock (reset on release)',
4394             6 => 'AE Lock (hold)',
4395             7 => 'AF Lock Only',
4396             8 => 'AF-On',
4397             10 => 'Bracketing Burst',
4398             11 => 'Matrix Metering',
4399             12 => 'Center-weighted Metering',
4400             13 => 'Spot Metering',
4401             14 => 'Playback',
4402             15 => 'My Menu Top Item',
4403             16 => '+NEF(RAW)',
4404             17 => 'Virtual Horizon',
4405             19 => 'Grid Display',
4406             20 => 'My Menu',
4407             21 => 'Disable Synchronized Release',
4408             22 => 'Remote Release Only',
4409             26 => 'Flash Disable/Enable',
4410             27 => 'Highlight-weighted Metering',
4411             36 => 'AF-Area Mode (Single)',
4412             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
4413             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
4414             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
4415             40 => 'AF-Area Mode (Group Area AF)',
4416             41 => 'AF-Area Mode (Auto Area AF)',
4417             42 => 'AF-Area Mode + AF-On (Single)',
4418             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
4419             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
4420             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
4421             46 => 'AF-Area Mode + AF-On (Group Area AF)',
4422             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
4423             49 => 'Sync Release (Master Only)',
4424             50 => 'Sync Release (Remote Only)',
4425             },
4426             },
4427             81.1 => { # CSf1-f
4428             Name => 'Func2ButtonPlusDials',
4429             Mask => 0x0f,
4430             PrintConv => {
4431             0 => 'None',
4432             1 => 'Choose Image Area',
4433             2 => 'Shutter Speed & Aperture Lock',
4434             3 => 'One Step Speed / Aperture',
4435             4 => 'Choose Non-CPU Lens Number',
4436             5 => 'Active D-Lighting',
4437             7 => 'Photo Shooting Menu Bank',
4438             8 => 'Exposure Delay Mode',
4439             },
4440             },
4441             82.1 => { # CSg1-e
4442             Name => 'AssignMovieFunc2Button',
4443             Mask => 0x70,
4444             PrintConv => {
4445             0 => 'None',
4446             3 => 'Index Marking',
4447             4 => 'View Photo Shooting Info',
4448             },
4449             },
4450             83.1 => { # CSf1-i
4451             Name => 'Func3Button',
4452             Mask => 0x03,
4453             PrintConv => {
4454             0 => 'None',
4455             1 => 'Voice Memo',
4456             2 => 'Rating',
4457             3 => 'Connect To Network',
4458             },
4459             },
4460             );
4461              
4462             # D500 custom settings (ref 1)
4463             %Image::ExifTool::NikonCustom::SettingsD500 = (
4464             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
4465             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
4466             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
4467             WRITABLE => 1,
4468             FIRST_ENTRY => 0,
4469             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
4470             NOTES => 'Custom settings for the D500.',
4471             0.1 => {
4472             Name => 'CustomSettingsBank',
4473             Mask => 0x03,
4474             PrintConv => {
4475             0 => 'A',
4476             1 => 'B',
4477             2 => 'C',
4478             3 => 'D',
4479             },
4480             },
4481             1.1 => { # CSa1
4482             Name => 'AF-CPrioritySelection',
4483             Mask => 0xc0,
4484             PrintConv => {
4485             0 => 'Release',
4486             1 => 'Release + Focus',
4487             2 => 'Focus',
4488             3 => 'Focus + Release',
4489             },
4490             },
4491             1.2 => { # CSa2
4492             Name => 'AF-SPrioritySelection',
4493             Mask => 0x20,
4494             PrintConv => {
4495             0 => 'Focus',
4496             1 => 'Release',
4497             },
4498             },
4499             1.3 => { # CSa6
4500             Name => 'NumberOfFocusPoints',
4501             Mask => 0x10,
4502             PrintConv => {
4503             0 => '55 Points',
4504             1 => '15 Points',
4505             },
4506             },
4507             1.4 => { # CSa4
4508             Name => 'Three-DTrackingFaceDetection',
4509             Mask => 0x08,
4510             PrintConv => \%offOn,
4511             },
4512             1.5 => { # CSa3-a
4513             Name => 'BlockShotAFResponse',
4514             Mask => 0x07,
4515             #values 1-5
4516             },
4517             2.1 => { # CSa11
4518             Name => 'FocusPointWrap',
4519             Mask => 0x08,
4520             PrintConv => {
4521             0 => 'No Wrap',
4522             1 => 'Wrap',
4523             },
4524             },
4525             2.2 => { # CSa12-c
4526             Name => 'AFPointBrightness',
4527             Mask => 0x06,
4528             PrintConv => {
4529             0 => 'Auto',
4530             1 => 'On',
4531             2 => 'Off',
4532             },
4533             },
4534             4.1 => { # CSd3
4535             Name => 'ISODisplay',
4536             Mask => 0x08,
4537             PrintConv => {
4538             0 => 'Show ISO Sensitivity',
4539             1 => 'Show Frame Count',
4540             },
4541             },
4542             4.2 => { # CSd8
4543             Name => 'GridDisplay',
4544             Mask => 0x02,
4545             PrintConv => \%onOff,
4546             },
4547             5.1 => { # CSd9
4548             Name => 'LCDIllumination',
4549             Mask => 0x20,
4550             PrintConv => \%offOn,
4551             },
4552             5.2 => { # CSd6
4553             Name => 'ElectronicFront-CurtainShutter',
4554             Mask => 0x08,
4555             PrintConv => \%offOn,
4556             },
4557             6.1 => { # CSf7
4558             Name => 'ReverseIndicators',
4559             Mask => 0x80,
4560             PrintConv => {
4561             0 => '+ 0 -',
4562             1 => '- 0 +',
4563             },
4564             },
4565             6.2 => { # CSf4-a
4566             Name => 'CommandDialsReverseRotation',
4567             Mask => 0x18,
4568             PrintConv => {
4569             0 => 'No',
4570             1 => 'Shutter Speed & Aperture',
4571             2 => 'Exposure Compensation',
4572             3 => 'Exposure Compensation, Shutter Speed & Aperture',
4573             },
4574             },
4575             6.3 => { # CSb4
4576             Name => 'EasyExposureCompensation',
4577             Mask => 0x03,
4578             PrintConv => {
4579             0 => 'Off',
4580             1 => 'On',
4581             2 => 'On (auto reset)',
4582             },
4583             },
4584             7.1 => { # CSb2
4585             Name => 'ExposureControlStepSize',
4586             Mask => 0xc0,
4587             PrintConv => {
4588             0 => '1/3 EV',
4589             1 => '1/2 EV',
4590             2 => '1 EV',
4591             },
4592             },
4593             7.2 => { # CSb1
4594             Name => 'ISOStepSize',
4595             Mask => 0x30,
4596             PrintConv => {
4597             0 => '1/3 EV',
4598             1 => '1/2 EV',
4599             2 => '1 EV',
4600             },
4601             },
4602             7.3 => { # CSb3
4603             Name => 'ExposureCompStepSize',
4604             Mask => 0x0c,
4605             PrintConv => {
4606             0 => '1/3 EV',
4607             1 => '1/2 EV',
4608             2 => '1 EV',
4609             },
4610             },
4611             8.1 => { # CSb6
4612             Name => 'CenterWeightedAreaSize',
4613             Mask => 0xe0,
4614             PrintConv => {
4615             0 => '6 mm',
4616             1 => '8 mm',
4617             2 => '10 mm',
4618             3 => '13 mm',
4619             4 => 'Average',
4620             },
4621             },
4622             8.2 => { # CSb7-a
4623             Name => 'FineTuneOptMatrixMetering',
4624             Mask => 0x0f,
4625             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
4626             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
4627             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
4628             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
4629             },
4630             9.1 => { # CSb7-b
4631             Name => 'FineTuneOptCenterWeighted',
4632             Mask => 0xf0,
4633             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
4634             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
4635             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
4636             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
4637             },
4638             9.2 => { # CSb7-c
4639             Name => 'FineTuneOptSpotMetering',
4640             Mask => 0x0f,
4641             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
4642             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
4643             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
4644             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
4645             },
4646             10.1 => { # CSf2-a
4647             Name => 'MultiSelectorShootMode',
4648             Mask => 0xe0, #same offset and settings as D810 but with a different decoding
4649             PrintConv => {
4650             0 => 'Select Center Focus Point (Reset)',
4651             2 => 'Preset Focus Point (Pre)',
4652             3 => 'Highlight Active Focus Point',
4653             4 => 'Not Used (None)',
4654             },
4655             },
4656             10.2 => { # CSf2-b #same offset and settings as D810 but with a different decoding
4657             Name => 'MultiSelectorPlaybackMode',
4658             Mask => 0x0c,
4659             PrintConv => {
4660             0 => 'Thumbnail On/Off',
4661             1 => 'View Histograms',
4662             2 => 'Zoom On/Off',
4663             3 => 'Choose Folder',
4664             },
4665             },
4666             10.3 => { # CSf5
4667             Name => 'MultiSelector',
4668             Mask => 0x01,
4669             PrintConv => {
4670             0 => 'Do Nothing',
4671             1 => 'Reset Meter-off Delay',
4672             },
4673             },
4674             11.1 => { # CSd5
4675             Name => 'ExposureDelayMode',
4676             Mask => 0xc0,
4677             PrintConv => {
4678             0 => 'Off',
4679             1 => '1 s',
4680             2 => '2 s',
4681             3 => '3 s',
4682             },
4683             },
4684             11.2 => { # CSd1
4685             Name => 'CLModeShootingSpeed',
4686             Mask => 0x0f,
4687             PrintConv => '"$val fps"',
4688             PrintConvInv => '$val=~s/\s*fps//i; $val',
4689             },
4690             12.1 => { # CSd2
4691             Name => 'MaxContinuousRelease',
4692             # values: 1-100
4693             },
4694             13.1 => { # CSe7
4695             Name => 'AutoBracketOrder',
4696             Mask => 0x10,
4697             PrintConv => {
4698             0 => '0,-,+',
4699             1 => '-,0,+',
4700             },
4701             },
4702             13.2 => { # CSe6
4703             Name => 'AutoBracketModeM',
4704             Mask => 0x0c,
4705             PrintConv => {
4706             0 => 'Flash/Speed',
4707             1 => 'Flash/Speed/Aperture',
4708             2 => 'Flash/Aperture',
4709             3 => 'Flash Only',
4710             },
4711             },
4712             14.1 => { # CSf1-c
4713             Name => 'Func1Button',
4714             Mask => 0x3f,
4715             PrintConv => {
4716             0 => 'None',
4717             1 => 'Preview',
4718             2 => 'FV Lock',
4719             3 => 'AE/AF Lock',
4720             4 => 'AE Lock Only',
4721             5 => 'AE Lock (reset on release)',
4722             6 => 'AE Lock (hold)',
4723             7 => 'AF Lock Only',
4724             8 => 'AF-On',
4725             10 => 'Bracketing Burst',
4726             11 => 'Matrix Metering',
4727             12 => 'Center-weighted Metering',
4728             13 => 'Spot Metering',
4729             14 => 'Playback',
4730             15 => 'My Menu Top Item',
4731             16 => '+NEF(RAW)',
4732             17 => 'Virtual Horizon',
4733             19 => 'Grid Display',
4734             20 => 'My Menu',
4735             22 => 'Remote Release Only',
4736             26 => 'Flash Disable/Enable',
4737             27 => 'Highlight-weighted Metering',
4738             36 => 'AF-Area Mode (Single)',
4739             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
4740             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
4741             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
4742             40 => 'AF-Area Mode (Group Area AF)',
4743             41 => 'AF-Area Mode (Auto Area AF)',
4744             42 => 'AF-Area Mode + AF-On (Single)',
4745             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
4746             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
4747             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
4748             46 => 'AF-Area Mode + AF-On (Group Area AF)',
4749             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
4750             49 => 'Sync Release (Master Only)',
4751             50 => 'Sync Release (Remote Only)',
4752             },
4753             },
4754             15.1 => { # CSf1-a
4755             Name => 'PreviewButton',
4756             Mask => 0x3f,
4757             PrintConv => {
4758             0 => 'None',
4759             1 => 'Preview',
4760             2 => 'FV Lock',
4761             3 => 'AE/AF Lock',
4762             4 => 'AE Lock Only',
4763             5 => 'AE Lock (reset on release)',
4764             6 => 'AE Lock (hold)',
4765             7 => 'AF Lock Only',
4766             8 => 'AF-On',
4767             10 => 'Bracketing Burst',
4768             11 => 'Matrix Metering',
4769             12 => 'Center-weighted Metering',
4770             13 => 'Spot Metering',
4771             14 => 'Playback',
4772             15 => 'My Menu Top Item',
4773             16 => '+NEF(RAW)',
4774             17 => 'Virtual Horizon',
4775             19 => 'Grid Display',
4776             20 => 'My Menu',
4777             # 21 => 'Disable Synchronized Release', # removed with D500
4778             22 => 'Remote Release Only',
4779             26 => 'Flash Disable/Enable',
4780             27 => 'Highlight-weighted Metering',
4781             36 => 'AF-Area Mode (Single)', # new with D500
4782             37 => 'AF-Area Mode (Dynamic Area 25 Points)', # new with D500
4783             38 => 'AF-Area Mode (Dynamic Area 72 Points)', # new with D500
4784             39 => 'AF-Area Mode (Dynamic Area 152 Points)', # new with D500
4785             40 => 'AF-Area Mode (Group Area AF)', # new with D500
4786             41 => 'AF-Area Mode (Auto Area AF)', # new with D500
4787             42 => 'AF-Area Mode + AF-On (Single)', # new with D500
4788             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)', # new with D500
4789             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)', # new with D500
4790             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',# new with D500
4791             46 => 'AF-Area Mode + AF-On (Group Area AF)', # new with D500
4792             47 => 'AF-Area Mode + AF-On (Auto Area AF)', # new with D500
4793             49 => 'Sync Release (Master Only)', # new with D500
4794             50 => 'Sync Release (Remote Only)', # new with D500
4795             },
4796             },
4797             16.1 => { # CSf1-j
4798             Name => 'AssignBktButton',
4799             Mask => 0x07,
4800             PrintConv => {
4801             0 => 'Auto Bracketing',
4802             1 => 'Multiple Exposure',
4803             2 => 'HDR (high dynamic range)',
4804             3 => 'None',
4805             },
4806             },
4807             18.1 => { # CSf4-b
4808             Name => 'CommandDialsChangeMainSub',
4809             Mask => 0xe0,
4810             PrintConv => {
4811             0 => 'Autofocus Off, Exposure Off',
4812             1 => 'Autofocus Off, Exposure On',
4813             2 => 'Autofocus Off, Exposure On (Mode A)',
4814             4 => 'Autofocus On, Exposure Off',
4815             5 => 'Autofocus On, Exposure On',
4816             6 => 'Autofocus On, Exposure On (Mode A)',
4817             },
4818             },
4819             18.2 => { # CSf4-d
4820             Name => 'CommandDialsMenuAndPlayback',
4821             Mask => 0x18,
4822             PrintConv => {
4823             0 => 'On',
4824             1 => 'Off',
4825             2 => 'On (Image Review Excluded)',
4826             },
4827             },
4828             18.3 => { # CSf4-c
4829             Name => 'CommandDialsApertureSetting',
4830             Mask => 0x04,
4831             PrintConv => {
4832             0 => 'Sub-command Dial',
4833             1 => 'Aperture Ring',
4834             },
4835             },
4836             18.4 => { # CSf6
4837             Name => 'ReleaseButtonToUseDial',
4838             Mask => 0x01,
4839             PrintConv => \%noYes,
4840             },
4841             19.1 => { # CSc2
4842             Name => 'StandbyTimer',
4843             Mask => 0xf0,
4844             PrintConv => {
4845             0 => '4 s',
4846             1 => '6 s',
4847             3 => '10 s',
4848             5 => '30 s',
4849             6 => '1 min',
4850             7 => '5 min',
4851             8 => '10 min',
4852             9 => '30 min',
4853             10 => 'No Limit',
4854             },
4855             },
4856             20.1 => { # CSc3-a
4857             Name => 'SelfTimerTime',
4858             Mask => 0xc0,
4859             PrintConv => {
4860             0 => '2 s',
4861             1 => '5 s',
4862             2 => '10 s',
4863             3 => '20 s',
4864             },
4865             },
4866             20.2 => { # CSc3-c
4867             Name => 'SelfTimerShotInterval',
4868             Mask => 0x30,
4869             PrintConv => {
4870             0 => '0.5 s',
4871             1 => '1 s',
4872             2 => '2 s',
4873             3 => '3 s',
4874             },
4875             },
4876             20.3 => { # CSc3-b
4877             Name => 'SelfTimerShotCount',
4878             Mask => 0x0f,
4879             },
4880             21.1 => { # CSc4-d
4881             Name => 'ImageReviewMonitorOffTime',
4882             Mask => 0xe0,
4883             PrintConv => {
4884             0 => '2 s',
4885             1 => '4 s',
4886             3 => '10 s',
4887             4 => '20 s',
4888             5 => '1 min',
4889             6 => '5 min',
4890             7 => '10 min',
4891             },
4892             },
4893             21.2 => { # CSc4-e
4894             Name => 'LiveViewMonitorOffTime',
4895             Mask => 0x1c,
4896             PrintConv => {
4897             1 => '5 min',
4898             2 => '10 min',
4899             3 => '15 min',
4900             4 => '20 min',
4901             5 => '30 min',
4902             6 => 'No Limit',
4903             },
4904             },
4905             22.1 => { # CSc4-b
4906             Name => 'MenuMonitorOffTime',
4907             Mask => 0xe0,
4908             PrintConv => {
4909             0 => '4 s',
4910             2 => '10 s',
4911             4 => '20 s',
4912             5 => '1 min',
4913             6 => '5 min',
4914             7 => '10 min',
4915             },
4916             },
4917             22.2 => { # CSc4-c
4918             Name => 'ShootingInfoMonitorOffTime',
4919             Mask => 0x1c,
4920             PrintConv => {
4921             0 => '4 s',
4922             2 => '10 s',
4923             4 => '20 s',
4924             5 => '1 min',
4925             6 => '5 min',
4926             7 => '10 min',
4927             },
4928             },
4929             23.1 => { # CSe1
4930             Name => 'FlashSyncSpeed',
4931             Mask => 0xf0,
4932             PrintConv => {
4933             2 => '1/250 s (auto FP)',
4934             3 => '1/250 s',
4935             5 => '1/200 s',
4936             6 => '1/160 s',
4937             7 => '1/125 s',
4938             8 => '1/100 s',
4939             9 => '1/80 s',
4940             10 => '1/60 s',
4941             },
4942             },
4943             23.2 => { # CSe2
4944             Name => 'FlashShutterSpeed',
4945             Mask => 0x0f,
4946             PrintConvColumns => 2,
4947             PrintConv => {
4948             0 => '1/60 s',
4949             1 => '1/30 s',
4950             2 => '1/15 s',
4951             3 => '1/8 s',
4952             4 => '1/4 s',
4953             5 => '1/2 s',
4954             6 => '1 s',
4955             7 => '2 s',
4956             8 => '4 s',
4957             9 => '8 s',
4958             10 => '15 s',
4959             11 => '30 s',
4960             },
4961             },
4962             31.1 => { # CSe5
4963             Name => 'ModelingFlash',
4964             Mask => 0x20,
4965             PrintConv => \%onOff,
4966             },
4967             36.1 => { # CSc4-a
4968             Name => 'PlaybackMonitorOffTime',
4969             Mask => 0xe0,
4970             PrintConv => {
4971             0 => '4 s',
4972             1 => '10 s',
4973             2 => '20 s',
4974             3 => '1 min',
4975             4 => '5 min',
4976             5 => '10 min',
4977             },
4978             },
4979             37.1 => { # CSf2-c
4980             Name => 'MultiSelectorLiveView',
4981             Mask => 0xc0,
4982             PrintConv => {
4983             0 => 'Reset',
4984             1 => 'Zoom',
4985             3 => 'Not Used',
4986             },
4987             },
4988             38.1 => { # CSf3-a
4989             Name => 'ShutterSpeedLock',
4990             Mask => 0x80,
4991             PrintConv => \%offOn,
4992             },
4993             38.2 => { # CSf3-b
4994             Name => 'ApertureLock',
4995             Mask => 0x40,
4996             PrintConv => \%offOn,
4997             },
4998             38.3 => { # CSg1-h
4999             Name => 'MovieShutterButton',
5000             Mask => 0x10,
5001             PrintConv => {
5002             0 => 'Take Photo',
5003             1 => 'Record Movies',
5004             },
5005             },
5006             38.4 => { # CSe3
5007             Name => 'FlashExposureCompArea',
5008             Mask => 0x04,
5009             PrintConv => {
5010             0 => 'Entire Frame',
5011             1 => 'Background Only',
5012             },
5013             },
5014             38.5 => { # CSe4
5015             Name => 'AutoFlashISOSensitivity',
5016             Mask => 0x02,
5017             PrintConv => {
5018             0 => 'Subject and Background',
5019             1 => 'Subject Only',
5020             },
5021             },
5022             41.1 => { # CSg1-c
5023             Name => 'MovieFunc1Button',
5024             Mask => 0xf0,
5025             PrintConv => {
5026             0 => 'None',
5027             2 => 'Power Aperture (close)',
5028             3 => 'Index Marking',
5029             4 => 'View Photo Shooting Info',
5030             11 => 'Exposure Compensation -',
5031             },
5032             },
5033             41.2 => { # CSg1-a
5034             Name => 'MoviePreviewButton',
5035             Mask => 0x0f,
5036             PrintConv => {
5037             0 => 'None',
5038             1 => 'Power Aperture (open)',
5039             3 => 'Index Marking',
5040             4 => 'View Photo Shooting Info',
5041             10 => 'Exposure Compensation +',
5042             },
5043             },
5044             42.1 => { # CSf1-d
5045             Name => 'Func1ButtonPlusDials',
5046             Mask => 0x0f,
5047             PrintConv => {
5048             0 => 'None',
5049             1 => 'Choose Image Area (DX/1.3x)',
5050             2 => 'Shutter Speed & Aperture Lock',
5051             3 => 'One Step Speed / Aperture',
5052             4 => 'Choose Non-CPU Lens Number',
5053             5 => 'Active D-Lighting',
5054             7 => 'Photo Shooting Menu Bank',
5055             8 => 'Exposure Delay Mode',
5056             },
5057             },
5058             43.1 => { # CSf1-b
5059             Name => 'PreviewButtonPlusDials',
5060             Mask => 0x0f,
5061             PrintConv => {
5062             0 => 'None',
5063             1 => 'Choose Image Area (DX/1.3x)',
5064             2 => 'Shutter Speed & Aperture Lock',
5065             3 => 'One Step Speed / Aperture',
5066             4 => 'Choose Non-CPU Lens Number',
5067             5 => 'Active D-Lighting',
5068             7 => 'Photo Shooting Menu Bank', # new with D500
5069             8 => 'Exposure Delay Mode',
5070             },
5071             },
5072             45.1 => { # CSf1-k
5073             Name => 'AssignMovieRecordButtonPlusDials',
5074             Mask => 0x0f,
5075             PrintConv => {
5076             0 => 'None',
5077             1 => 'Choose Image Area (DX/1.3x)',
5078             2 => 'Shutter Speed & Aperture Lock',
5079             7 => 'Photo Shooting Menu Bank',
5080             11 => 'Exposure Mode',
5081             },
5082             },
5083             46.1 => { # CSb7-d
5084             Name => 'FineTuneOptHighlightWeighted',
5085             Mask => 0x0f,
5086             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
5087             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
5088             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
5089             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
5090             },
5091             47.1 => { # CSa12-b
5092             Name => 'DynamicAreaAFDisplay',
5093             Mask => 0x80,
5094             PrintConv => \%offOn,
5095             },
5096             47.2 => { # CSa12-a
5097             Name => 'AFPointIllumination',
5098             Mask => 0x40,
5099             PrintConv => {
5100             0 => 'Off',
5101             1 => 'On During Manual Focusing',
5102             },
5103             },
5104             47.3 => { # CSa7
5105             Name => 'StoreByOrientation',
5106             Mask => 0x18,
5107             PrintConv => {
5108             0 => 'Off',
5109             1 => 'Focus Point',
5110             2 => 'Focus Point and AF-area Mode',
5111             },
5112             },
5113             47.4 => { # CSa12-c
5114             Name => 'GroupAreaAFIllumination',
5115             Mask => 0x04,
5116             PrintConv => {
5117             0 => 'Squares',
5118             1 => 'Dots',
5119             },
5120             },
5121             48.1 => { # CSb5
5122             Name => 'MatrixMetering',
5123             Mask => 0x80,
5124             PrintConv => {
5125             0 => 'Face Detection On',
5126             1 => 'Face Detection Off',
5127             },
5128             },
5129             48.2 => { # CSf8
5130             Name => 'LiveViewButtonOptions',
5131             Mask => 0x30,
5132             PrintConv => {
5133             0 => 'Enable',
5134             1 => 'Enable (Standby Timer Active)', # new with D500
5135             2 => 'Disable',
5136             },
5137             },
5138             48.3 => { # CSa10
5139             Name => 'AFModeRestrictions',
5140             Mask => 0x03,
5141             PrintConv => {
5142             0 => 'No Restrictions',
5143             1 => 'AF-C',
5144             2 => 'AF-S',
5145             },
5146             },
5147             49.1 => { # CSa9
5148             Name => 'LimitAFAreaModeSelection',
5149             Mask => 0x7e,
5150             PrintConv => {
5151             0 => 'No Restrictions',
5152             BITMASK => {
5153             0 => 'Auto-area',
5154             1 => 'Group-area',
5155             2 => '3D-tracking',
5156             3 => 'Dynamic area (153 points)',
5157             4 => 'Dynamic area (72 points)',
5158             5 => 'Dynamic area (25 points)',
5159             },
5160             },
5161             },
5162             52.1 => { # CSf1-l
5163             Name => 'LensFocusFunctionButtons',
5164             Mask => 0x3f,
5165             PrintConv => {
5166             3 => 'AE/AF Lock',
5167             4 => 'AE Lock Only',
5168             7 => 'AF Lock Only',
5169             8 => 'AF-On',
5170             24 => 'Preset Focus Point',
5171             26 => 'Flash Disable/Enable',
5172             36 => 'AF-Area Mode (Single)',
5173             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
5174             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
5175             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
5176             40 => 'AF-Area Mode (Group Area AF)',
5177             41 => 'AF-Area Mode (Auto Area AF)',
5178             42 => 'AF-Area Mode + AF-On (Single)',
5179             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
5180             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
5181             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
5182             46 => 'AF-Area Mode + AF-On (Group Area AF)',
5183             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
5184             49 => 'Sync Release (Master Only)',
5185             50 => 'Sync Release (Remote Only)',
5186             },
5187             },
5188             66.1 => { # CSf10-d
5189             Name => 'VerticalMultiSelector',
5190             Mask => 0xff,
5191             PrintHex => 1,
5192             PrintConv => {
5193             0x00 => 'Same as Multi-Selector with Info(U/D) & Playback(R/L)',
5194             0x08 => 'Same as Multi-Selector with Info(R/L) & Playback(U/D)',
5195             0x80 => 'Focus Point Selection',
5196             },
5197             },
5198             67.1 => { # CSf10-a
5199             Name => 'AssignMB-D17FuncButton',
5200             Mask => 0x3f,
5201             PrintConv => {
5202             0 => 'None',
5203             1 => 'Preview',
5204             2 => 'FV Lock',
5205             3 => 'AE/AF Lock',
5206             4 => 'AE Lock Only',
5207             5 => 'AE Lock (reset on release)',
5208             6 => 'AE Lock (hold)',
5209             7 => 'AF Lock Only',
5210             8 => 'AF-On',
5211             10 => 'Bracketing Burst',
5212             11 => 'Matrix Metering',
5213             12 => 'Center-weighted Metering',
5214             13 => 'Spot Metering',
5215             14 => 'Playback',
5216             15 => 'My Menu Top Item',
5217             16 => '+NEF(RAW)',
5218             17 => 'Virtual Horizon',
5219             18 => 'Reset Focus Point',
5220             19 => 'Grid Display',
5221             20 => 'My Menu',
5222             22 => 'Remote Release Only',
5223             23 => 'Preset Focus Point',
5224             26 => 'Flash Disable/Enable',
5225             27 => 'Highlight-weighted Metering',
5226             36 => 'AF-Area Mode (Single)',
5227             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
5228             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
5229             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
5230             40 => 'AF-Area Mode (Group Area AF)',
5231             41 => 'AF-Area Mode (Auto Area AF)',
5232             42 => 'AF-Area Mode + AF-On (Single)',
5233             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
5234             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
5235             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
5236             46 => 'AF-Area Mode + AF-On (Group Area AF)',
5237             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
5238             49 => 'Sync Release (Master Only)',
5239             50 => 'Sync Release (Remote Only)',
5240             54 => 'Highlight Active Focus Point',
5241             },
5242             },
5243             68.1 => { # CSf10-b
5244             Name => 'AssignMB-D17FuncButtonPlusDials',
5245             Mask => 0x0f,
5246             PrintConv => {
5247             0 => 'None',
5248             1 => 'Choose Image Area (DX/1.3x)',
5249             2 => 'Shutter Speed & Aperture Lock',
5250             3 => 'One Step Speed / Aperture',
5251             4 => 'Choose Non-CPU Lens Number',
5252             5 => 'Active D-Lighting',
5253             7 => 'Photo Shooting Menu Bank',
5254             8 => 'Exposure Delay Mode',
5255             10 => 'ISO Sensitivity',
5256             11 => 'Exposure Mode',
5257             12 => 'Exposure Compensation',
5258             13 => 'Metering Mode',
5259             },
5260             },
5261             70.1 => { # CSf1-f
5262             Name => 'AF-OnButton',
5263             Mask => 0x3f,
5264             PrintConv => {
5265             0 => 'None',
5266             3 => 'AE/AF Lock',
5267             4 => 'AE Lock Only',
5268             5 => 'AE Lock (reset on release)',
5269             6 => 'AE Lock (hold)',
5270             7 => 'AF Lock Only',
5271             8 => 'AF-On',
5272             36 => 'AF-Area Mode (Single)',
5273             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
5274             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
5275             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
5276             40 => 'AF-Area Mode (Group Area AF)',
5277             41 => 'AF-Area Mode (Auto Area AF)',
5278             42 => 'AF-Area Mode + AF-On (Single)',
5279             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
5280             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
5281             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
5282             46 => 'AF-Area Mode + AF-On (Group Area AF)',
5283             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
5284             },
5285             },
5286             71.1 => { # CSf1-g
5287             Name => 'SubSelector',
5288             Mask => 0x80,
5289             PrintConv => {
5290             0 => 'Focus Point Selection',
5291             1 => 'Same as MultiSelector',
5292             },
5293             },
5294             72.1 => { # CSf1-h
5295             Name => 'SubSelectorCenter',
5296             Mask => 0x3f,
5297             PrintConv => {
5298             0 => 'None',
5299             1 => 'Preview',
5300             2 => 'FV Lock',
5301             3 => 'AE/AF Lock',
5302             4 => 'AE Lock Only',
5303             5 => 'AE Lock (reset on release)',
5304             6 => 'AE Lock (hold)',
5305             7 => 'AF Lock Only',
5306             8 => 'AF-On',
5307             10 => 'Bracketing Burst',
5308             11 => 'Matrix Metering',
5309             12 => 'Center-weighted Metering',
5310             13 => 'Spot Metering',
5311             14 => 'Playback',
5312             15 => 'My Menu Top Item',
5313             16 => '+NEF(RAW)',
5314             17 => 'Virtual Horizon',
5315             18 => 'Reset Focus Point',
5316             19 => 'Grid Display',
5317             20 => 'My Menu',
5318             22 => 'Remote Release Only',
5319             23 => 'Preset Focus Point',
5320             26 => 'Flash Disable/Enable',
5321             27 => 'Highlight-weighted Metering',
5322             36 => 'AF-Area Mode (Single)',
5323             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
5324             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
5325             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
5326             40 => 'AF-Area Mode (Group Area AF)',
5327             41 => 'AF-Area Mode (Auto Area AF)',
5328             42 => 'AF-Area Mode + AF-On (Single)',
5329             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
5330             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
5331             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
5332             46 => 'AF-Area Mode + AF-On (Group Area AF)',
5333             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
5334             49 => 'Sync Release (Master Only)',
5335             50 => 'Sync Release (Remote Only)',
5336             54 => 'Highlight Active Focus Point',
5337             },
5338             },
5339             73.1 => { # CSf1-i
5340             Name => 'SubSelectorPlusDials',
5341             Mask => 0x0f,
5342             PrintConv => {
5343             0 => 'None',
5344             1 => 'Choose Image Area (DX/1.3x)',
5345             2 => 'Shutter Speed & Aperture Lock',
5346             4 => 'Choose Non-CPU Lens Number',
5347             7 => 'Photo Shooting Menu Bank',
5348             },
5349             },
5350             74.1 => { # CSg1-f
5351             Name => 'AssignMovieSubselector',
5352             Mask => 0xf0,
5353             PrintConv => {
5354             0 => 'None',
5355             3 => 'Index Marking',
5356             4 => 'View Photo Shooting Info',
5357             5 => 'AE/AF Lock',
5358             6 => 'AE Lock (Only)',
5359             7 => 'AE Lock (Hold)',
5360             8 => 'AF Lock (Only)',
5361             },
5362             },
5363             75.1 => { # CSg1-d
5364             Name => 'AssignMovieFunc1ButtonPlusDials',
5365             Mask => 0x10,
5366             PrintConv => {
5367             0 => 'None',
5368             1 => 'Choose Image Area (DX/1.3x)',
5369             },
5370             },
5371             75.2 => { # CSg1-b
5372             Name => 'AssignMoviePreviewButtonPlusDials',
5373             Mask => 0x01,
5374             PrintConv => {
5375             0 => 'None',
5376             1 => 'Choose Image Area (DX/1.3x)',
5377             },
5378             },
5379             76.1 => { # CSg1-g
5380             Name => 'AssignMovieSubselectorPlusDials',
5381             Mask => 0x10,
5382             PrintConv => {
5383             0 => 'None',
5384             1 => 'Choose Image Area (DX/1.3x)',
5385             },
5386             },
5387             77.1 => { # CSd4
5388             Name => 'SyncReleaseMode', # new with D500
5389             Mask => 0x80,
5390             PrintConv => {
5391             0 => 'No Sync',
5392             1 => 'Sync',
5393             },
5394             },
5395             78.1 => { # CSa5
5396             Name => 'Three-DTrackingWatchArea', # new with D500
5397             Mask => 0x80,
5398             PrintConv => {
5399             0 => 'Wide',
5400             1 => 'Normal',
5401             },
5402             },
5403             78.2 => { # CSa3-b
5404             Name => 'SubjectMotion',
5405             Mask => 0x60,
5406             PrintConv => {
5407             0 => 'Steady',
5408             1 => 'Middle',
5409             2 => 'Erratic',
5410             },
5411             },
5412             78.3 => { # CSa8
5413             Name => 'AFActivation',
5414             Mask => 0x08,
5415             PrintConv => {
5416             0 => 'Shutter/AF-On',
5417             1 => 'AF-On Only',
5418             },
5419             },
5420             78.4 => { # CSc1
5421             Name => 'ShutterReleaseButtonAE-L',
5422             Mask => 0x03,
5423             PrintConv => {
5424             0 => 'Off',
5425             1 => 'On (Half Press)',
5426             2 => 'On (Burst Mode)'
5427             },
5428             },
5429             79.1 => { # CSf10-c
5430             Name => 'AssignMB-D17AF-OnButton',
5431             Mask => 0x7f,
5432             PrintConv => {
5433             0 => 'None',
5434             3 => 'AE/AF Lock',
5435             4 => 'AE Lock Only',
5436             5 => 'AE Lock (reset on release)',
5437             6 => 'AE Lock (hold)',
5438             7 => 'AF Lock Only',
5439             8 => 'AF-On',
5440             36 => 'AF-Area Mode (Single)',
5441             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
5442             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
5443             39 => 'AF-Area Mode (Dynamic Area 152 Points)',
5444             40 => 'AF-Area Mode (Group Area AF)',
5445             41 => 'AF-Area Mode (Auto Area AF)',
5446             42 => 'AF-Area Mode + AF-On (Single)',
5447             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
5448             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
5449             45 => 'AF-Area Mode + AF-On (Dynamic Area 152 Points)',
5450             46 => 'AF-Area Mode + AF-On (Group Area AF)',
5451             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
5452             100 => 'Same as Camera AF-On Button',
5453             },
5454             },
5455             80.1 => { # CSf1-e
5456             Name => 'Func2Button',
5457             Mask => 0x3f,
5458             PrintConv => {
5459             0 => 'None',
5460             15 => 'My Menu Top Item',
5461             20 => 'My Menu',
5462             55 => 'Rating',
5463             },
5464             },
5465             82.1 => { # CSg1-e
5466             Name => 'AssignMovieFunc2Button',
5467             Mask => 0x70,
5468             PrintConv => {
5469             0 => 'None',
5470             3 => 'Index Marking',
5471             4 => 'View Photo Shooting Info',
5472             },
5473             },
5474             );
5475              
5476             # D610 custom settings (ref forum6942)
5477             %Image::ExifTool::NikonCustom::SettingsD610 = (
5478             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
5479             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
5480             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
5481             WRITABLE => 1,
5482             FIRST_ENTRY => 0,
5483             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
5484             NOTES => 'Custom settings for the D610.',
5485             0.1 => { #CSa1
5486             Name => 'AF-CPrioritySelection',
5487             Mask => 0x80,
5488             PrintConv => {
5489             0 => 'Release',
5490             1 => 'Focus',
5491             },
5492             },
5493             0.2 => { #CSa2
5494             Name => 'AF-SPrioritySelection',
5495             Mask => 0x20,
5496             PrintConv => {
5497             0 => 'Release',
5498             1 => 'Focus',
5499             },
5500             },
5501             0.3 => { # CSa6
5502             Name => 'NumberOfFocusPoints',
5503             Mask => 0x10,
5504             PrintConv => {
5505             0 => '39 Points',
5506             1 => '11 Points',
5507             },
5508             },
5509             0.4 => { # CSa3
5510             Name => 'FocusTrackingLockOn',
5511             Mask => 0x07,
5512             PrintConv => {
5513             0 => 'Off',
5514             1 => '1 Short',
5515             2 => '2',
5516             3 => '3 Normal',
5517             4 => '4',
5518             5 => '5 Long',
5519             },
5520             },
5521             1.1 => { # CSa5
5522             Name => 'FocusPointWrap',
5523             Mask => 0x08,
5524             PrintConv => {
5525             0 => 'No Wrap',
5526             1 => 'Wrap',
5527             },
5528             },
5529             1.2 => { # CSa4
5530             Name => 'AFPointIllumination',
5531             Mask => 0x06,
5532             PrintConv => {
5533             0 => 'Auto',
5534             1 => 'On',
5535             2 => 'Off',
5536             },
5537             },
5538             1.3 => { # CSa7
5539             Name => 'AFAssist',
5540             Mask => 0x01,
5541             PrintConv => \%onOff,
5542             },
5543             5.1 => { # CSb3
5544             Name => 'EasyExposureCompensation',
5545             Mask => 0x03,
5546             PrintConv => {
5547             0 => 'Off',
5548             1 => 'On',
5549             2 => 'On Auto Reset',
5550             },
5551             },
5552             6.1 => { # CSb2
5553             Name => 'ExposureControlStep',
5554             Mask => 0x40,
5555             PrintConv => {
5556             0 => '1/3 EV',
5557             1 => '1/2 EV',
5558             },
5559             },
5560             6.2 => { # CSb1
5561             Name => 'ISOSensitivityStep',
5562             Mask => 0x10,
5563             PrintConv => {
5564             0 => '1/3 EV',
5565             1 => '1/2 EV',
5566             },
5567             },
5568             7.1 => { # CSb4
5569             Name => 'CenterWeightedAreaSize',
5570             Mask => 0xe0,
5571             PrintConv => {
5572             0 => '8 mm',
5573             1 => '12 mm',
5574             2 => '15 mm',
5575             3 => '20 mm',
5576             4 => 'Average',
5577             },
5578             },
5579             7.2 => { # CSb5-a
5580             Name => 'FineTuneOptMatrixMetering',
5581             Mask => 0x0f,
5582             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
5583             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
5584             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
5585             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
5586             },
5587             8.1 => { # CSb5-b
5588             Name => 'FineTuneOptCenterWeighted',
5589             Mask => 0xf0,
5590             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
5591             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
5592             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
5593             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
5594             },
5595             8.2 => { # CSb5-c
5596             Name => 'FineTuneOptSpotMetering',
5597             Mask => 0x0f,
5598             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
5599             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
5600             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
5601             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
5602             },
5603             17.1 => { # CSc1
5604             Name => 'ShutterReleaseButtonAE-L',
5605             Mask => 0x02,
5606             PrintConv => \%offOn,
5607             },
5608             18.1 => { # CSc2
5609             Name => 'StandbyTimer',
5610             Mask => 0xf0,
5611             PrintConv => {
5612             0 => '4 s',
5613             1 => '6 s',
5614             2 => '10 s',
5615             3 => '30 s',
5616             4 => '1 min',
5617             5 => '5 min',
5618             6 => '10 min',
5619             7 => '30 min',
5620             8 => 'No Limit',
5621             },
5622             },
5623             18.2 => { # CSc5
5624             Name => 'RemoteOnDuration',
5625             Mask => 0x03,
5626             PrintConv => {
5627             0 => '1 min',
5628             1 => '5 min',
5629             2 => '10 min',
5630             3 => '20 min',
5631             },
5632             },
5633             19.1 => { # CSc3-a
5634             Name => 'SelfTimerTime',
5635             Mask => 0xc0,
5636             PrintConv => {
5637             0 => '2 s',
5638             1 => '5 s',
5639             2 => '10 s',
5640             3 => '20 s',
5641             },
5642             },
5643             19.2 => { # CSc3-c
5644             Name => 'SelfTimerShotInterval',
5645             Mask => 0x30,
5646             PrintConv => {
5647             0 => '0.5 s',
5648             1 => '1 s',
5649             2 => '2 s',
5650             3 => '3 s',
5651             },
5652             },
5653             19.3 => { # CSc3-b
5654             Name => 'SelfTimerShotCount',
5655             Mask => 0x0f,
5656             },
5657             20.1 => { # CSc4-d
5658             Name => 'ImageReviewMonitorOffTime',
5659             Mask => 0xe0,
5660             PrintConv => {
5661             0 => '2 s',
5662             1 => '4 s',
5663             2 => '10 s',
5664             3 => '20 s',
5665             4 => '1 min',
5666             5 => '5 min',
5667             6 => '10 min',
5668             },
5669             },
5670             20.2 => { # CSc4-e
5671             Name => 'LiveViewMonitorOffTime',
5672             Mask => 0x1c,
5673             PrintConv => {
5674             0 => '5 min',
5675             1 => '10 min',
5676             2 => '15 min',
5677             3 => '20 min',
5678             4 => '30 min',
5679             5 => 'No Limit',
5680             },
5681             },
5682             21.1 => { # CSc4-b
5683             Name => 'MenuMonitorOffTime',
5684             Mask => 0xe0,
5685             PrintConv => {
5686             0 => '4 s',
5687             1 => '10 s',
5688             2 => '20 s', # default
5689             3 => '1 min',
5690             4 => '5 min',
5691             5 => '10 min',
5692             },
5693             },
5694             21.2 => { # CSc4-c
5695             Name => 'ShootingInfoMonitorOffTime',
5696             Mask => 0x1c,
5697             PrintConv => {
5698             0 => '4 s',
5699             1 => '10 s', # default
5700             2 => '20 s',
5701             3 => '1 min',
5702             4 => '5 min',
5703             5 => '10 min',
5704             },
5705             },
5706             35.1 => { # CSc4-a
5707             Name => 'PlaybackMonitorOffTime',
5708             Mask => 0xe0,
5709             PrintConv => {
5710             0 => '4 s',
5711             1 => '10 s',
5712             2 => '20 s',
5713             3 => '1 min',
5714             4 => '5 min',
5715             5 => '10 min',
5716             },
5717             },
5718             );
5719              
5720             # D810 custom settings (ref 1)
5721             %Image::ExifTool::NikonCustom::SettingsD810 = (
5722             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
5723             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
5724             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
5725             WRITABLE => 1,
5726             FIRST_ENTRY => 0,
5727             DATAMEMBER => [ 24.1 ],
5728             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
5729             NOTES => 'Custom settings for the D810.',
5730             0.1 => { # CSf1
5731             Name => 'LightSwitch',
5732             Mask => 0x08,
5733             PrintConv => {
5734             0 => 'LCD Backlight',
5735             1 => 'LCD Backlight and Shooting Information',
5736             },
5737             },
5738             0.2 => {
5739             Name => 'CustomSettingsBank',
5740             Mask => 0x03,
5741             PrintConv => {
5742             0 => 'A',
5743             1 => 'B',
5744             2 => 'C',
5745             3 => 'D',
5746             },
5747             },
5748             1.1 => { #CSa1
5749             Name => 'AF-CPrioritySelection',
5750             Mask => 0xc0,
5751             PrintConv => {
5752             0 => 'Release',
5753             1 => 'Release + Focus',
5754             2 => 'Focus',
5755             },
5756             },
5757             1.2 => { # CSa2
5758             Name => 'AF-SPrioritySelection',
5759             Mask => 0x20,
5760             PrintConv => {
5761             0 => 'Focus',
5762             1 => 'Release',
5763             },
5764             },
5765             1.3 => { # CSa7
5766             Name => 'AFPointSelection',
5767             Mask => 0x10,
5768             PrintConv => {
5769             0 => '51 Points',
5770             1 => '11 Points',
5771             },
5772             },
5773             1.4 => { # CSa3
5774             Name => 'FocusTrackingLockOn',
5775             Mask => 0x07,
5776             PrintConv => {
5777             0 => 'Off',
5778             1 => '1 (Short)',
5779             2 => '2',
5780             3 => '3 (Normal)',
5781             4 => '4',
5782             5 => '5 (Long)',
5783             },
5784             },
5785             2.1 => { # CSa4
5786             Name => 'AFActivation',
5787             Mask => 0x80,
5788             PrintConv => {
5789             0 => 'Shutter/AF-On',
5790             1 => 'AF-On Only',
5791             },
5792             },
5793             2.2 => { # CSa7
5794             Name => 'FocusPointWrap',
5795             Mask => 0x08,
5796             PrintConv => {
5797             0 => 'No Wrap',
5798             1 => 'Wrap',
5799             },
5800             },
5801             2.3 => { # CSa6
5802             Name => 'AFPointBrightness',
5803             Mask => 0x06,
5804             PrintConv => {
5805             0 => 'Auto',
5806             1 => 'On',
5807             2 => 'Off',
5808             },
5809             },
5810             2.4 => { # CSa10
5811             Name => 'AFAssist',
5812             Mask => 0x01,
5813             PrintConv => \%onOff,
5814             },
5815             3.1 => { # CSd13
5816             Name => 'BatteryOrder',
5817             Mask => 0x40,
5818             PrintConv => {
5819             0 => 'MB-D12 First',
5820             1 => 'Camera Battery First',
5821             },
5822             },
5823             3.2 => { # CSd12
5824             Name => 'MB-D12BatteryType',
5825             Mask => 0x03,
5826             PrintConv => {
5827             0 => 'LR6 (AA alkaline)',
5828             1 => 'HR6 (AA Ni-MH)',
5829             2 => 'FR6 (AA lithium)',
5830             },
5831             },
5832             4.1 => { # CSd1-b
5833             Name => 'Pitch',
5834             Mask => 0x40,
5835             PrintConv => { 0 => 'High', 1 => 'Low' },
5836             },
5837             4.2 => { # CSf11
5838             Name => 'NoMemoryCard',
5839             Mask => 0x20,
5840             PrintConv => {
5841             0 => 'Release Locked',
5842             1 => 'Enable Release',
5843             },
5844             },
5845             4.3 => { # CSd8
5846             Name => 'ISODisplay',
5847             Mask => 0x0c,
5848             PrintConv => {
5849             0 => 'Show ISO/Easy ISO',
5850             1 => 'Show ISO Sensitivity',
5851             3 => 'Show Frame Count',
5852             },
5853             },
5854             4.4 => { # CSd7
5855             Name => 'GridDisplay',
5856             Mask => 0x02,
5857             PrintConv => \%onOff,
5858             },
5859             5.1 => { # CSd10
5860             Name => 'ShootingInfoDisplay',
5861             Mask => 0xc0,
5862             PrintConv => {
5863             0 => 'Not Set', # observed on a new camera prior to applying a setting for the first time
5864             1 => 'Auto',
5865             2 => 'Manual (dark on light)',
5866             3 => 'Manual (light on dark)',
5867             },
5868             },
5869             5.2 => { # CSd11
5870             Name => 'LCDIllumination',
5871             Mask => 0x20,
5872             PrintConv => \%offOn,
5873             },
5874             5.3 => { # CSd5
5875             Name => 'ElectronicFront-CurtainShutter',
5876             Mask => 0x08,
5877             PrintConv => \%offOn,
5878             },
5879             5.4 => { # CSd9
5880             Name => 'ScreenTips',
5881             Mask => 0x04,
5882             PrintConv => \%offOn,
5883             },
5884             5.5 => { # CSd1-a
5885             Name => 'Beep',
5886             Mask => 0x03,
5887             PrintConv => {
5888             0 => 'Off',
5889             1 => 'Low',
5890             2 => 'Medium',
5891             3 => 'High',
5892             },
5893             },
5894             6.1 => { # CSf12
5895             Name => 'ReverseIndicators',
5896             Mask => 0x80,
5897             PrintConv => {
5898             0 => '+ 0 -',
5899             1 => '- 0 +',
5900             },
5901             },
5902             6.2 => { # CSf9-a
5903             Name => 'CommandDialsReverseRotation',
5904             Mask => 0x18,
5905             PrintConv => {
5906             0 => 'No',
5907             1 => 'Shutter Speed & Aperture',
5908             2 => 'Exposure Compensation',
5909             3 => 'Exposure Compensation, Shutter Speed & Aperture',
5910             },
5911             },
5912             6.3 => { # CSb4
5913             Name => 'EasyExposureCompensation',
5914             Mask => 0x03,
5915             PrintConv => {
5916             0 => 'Off',
5917             1 => 'On',
5918             2 => 'On (auto reset)',
5919             },
5920             },
5921             7.1 => { # CSb2
5922             Name => 'ExposureControlStepSize',
5923             Mask => 0xc0,
5924             PrintConv => {
5925             0 => '1/3 EV',
5926             1 => '1/2 EV',
5927             2 => '1 EV',
5928             },
5929             },
5930             7.2 => { # CSb1
5931             Name => 'ISOStepSize',
5932             Mask => 0x30,
5933             PrintConv => {
5934             0 => '1/3 EV',
5935             1 => '1/2 EV',
5936             2 => '1 EV',
5937             },
5938             },
5939             7.3 => { # CSb3
5940             Name => 'ExposureCompStepSize',
5941             Mask => 0x0c,
5942             PrintConv => {
5943             0 => '1/3 EV',
5944             1 => '1/2 EV',
5945             2 => '1 EV',
5946             },
5947             },
5948             8.1 => { # CSb6
5949             Name => 'CenterWeightedAreaSize',
5950             Mask => 0xe0,
5951             PrintConv => {
5952             0 => '8 mm',
5953             1 => '12 mm',
5954             2 => '15 mm',
5955             3 => '20 mm',
5956             4 => 'Average',
5957             },
5958             },
5959             8.2 => { # CSb7-a
5960             Name => 'FineTuneOptMatrixMetering',
5961             Mask => 0x0f,
5962             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
5963             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
5964             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
5965             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
5966             },
5967             9.1 => { # CSb7-b
5968             Name => 'FineTuneOptCenterWeighted',
5969             Mask => 0xf0,
5970             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
5971             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
5972             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
5973             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
5974             },
5975             9.2 => { # CSb7-c
5976             Name => 'FineTuneOptSpotMetering',
5977             Mask => 0x0f,
5978             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
5979             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
5980             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
5981             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
5982             },
5983             10.1 => { # CSf2-a
5984             Name => 'MultiSelectorShootMode',
5985             Mask => 0xc0,
5986             PrintConv => {
5987             0 => 'Select Center Focus Point (Reset)',
5988             1 => 'Highlight Active Focus Point',
5989             2 => 'Preset Focus Point (Pre)',
5990             3 => 'Not Used (None)',
5991             },
5992             },
5993             10.2 => { # CSf2-b
5994             Name => 'MultiSelectorPlaybackMode',
5995             Mask => 0x30,
5996             PrintConv => {
5997             0 => 'Thumbnail On/Off',
5998             1 => 'View Histograms',
5999             2 => 'Zoom On/Off',
6000             3 => 'Choose Folder',
6001             },
6002             },
6003             10.3 => { # CSf3
6004             Name => 'MultiSelector',
6005             Mask => 0x01,
6006             PrintConv => {
6007             0 => 'Do Nothing',
6008             1 => 'Reset Meter-off Delay',
6009             },
6010             },
6011             11.1 => { # CSd4
6012             Name => 'ExposureDelayMode',
6013             Mask => 0xc0,
6014             PrintConv => {
6015             0 => 'Off',
6016             1 => '1 s',
6017             2 => '2 s',
6018             3 => '3 s',
6019             },
6020             },
6021             11.2 => { # CSd2
6022             Name => 'CLModeShootingSpeed',
6023             Mask => 0x0f,
6024             PrintConv => '"$val fps"',
6025             PrintConvInv => '$val=~s/\s*fps//i; $val',
6026             },
6027             12.1 => { # CSd3
6028             Name => 'MaxContinuousRelease',
6029             # values: 1-100
6030             },
6031             13.1 => { # CSe6
6032             Name => 'AutoBracketSet',
6033             Mask => 0xe0,
6034             PrintConv => {
6035             0 => 'AE & Flash',
6036             1 => 'AE Only',
6037             2 => 'Flash Only',
6038             3 => 'WB Bracketing',
6039             4 => 'Active D-Lighting',
6040             },
6041             },
6042             13.2 => { # CSe8
6043             Name => 'AutoBracketOrder',
6044             Mask => 0x10,
6045             PrintConv => {
6046             0 => '0,-,+',
6047             1 => '-,0,+',
6048             },
6049             },
6050             13.3 => { # CSe7
6051             Name => 'AutoBracketModeM',
6052             Mask => 0x0c,
6053             PrintConv => {
6054             0 => 'Flash/Speed',
6055             1 => 'Flash/Speed/Aperture',
6056             2 => 'Flash/Aperture',
6057             3 => 'Flash Only',
6058             },
6059             },
6060             14.1 => { # CSf4-a
6061             Name => 'FuncButton',
6062             Mask => 0x1f,
6063             PrintConv => {
6064             0 => 'None',
6065             1 => 'Preview',
6066             2 => 'FV Lock',
6067             3 => 'AE/AF Lock',
6068             4 => 'AE Lock Only',
6069             5 => 'AE Lock (reset on release)',
6070             6 => 'AE Lock (hold)',
6071             7 => 'AF Lock Only',
6072             8 => 'AF-On',
6073             10 => 'Bracketing Burst',
6074             11 => 'Matrix Metering',
6075             12 => 'Center-weighted Metering',
6076             13 => 'Spot Metering',
6077             14 => 'Playback',
6078             15 => 'My Menu Top Item',
6079             16 => '+NEF(RAW)',
6080             17 => 'Virtual Horizon',
6081             19 => 'Grid Display', # values 19 and 20 are swapped from the D4s encodings
6082             20 => 'My Menu',
6083             21 => 'Disable Synchronized Release',
6084             22 => 'Remote Release Only',
6085             26 => 'Flash Disable/Enable',
6086             27 => 'Highlight-weighted Metering', # new value with D810
6087             },
6088             },
6089             15.1 => { # CSf5-a
6090             Name => 'PreviewButton',
6091             Mask => 0x1f,
6092             PrintConv => {
6093             0 => 'None',
6094             1 => 'Preview',
6095             2 => 'FV Lock',
6096             3 => 'AE/AF Lock',
6097             4 => 'AE Lock Only',
6098             5 => 'AE Lock (reset on release)',
6099             6 => 'AE Lock (hold)',
6100             7 => 'AF Lock Only',
6101             8 => 'AF-On',
6102             10 => 'Bracketing Burst',
6103             11 => 'Matrix Metering',
6104             12 => 'Center-weighted Metering',
6105             13 => 'Spot Metering',
6106             14 => 'Playback',
6107             15 => 'My Menu Top Item',
6108             16 => '+NEF(RAW)',
6109             17 => 'Virtual Horizon',
6110             19 => 'Grid Display', # values 19 and 20 are swapped from the D4s encodings
6111             20 => 'My Menu',
6112             21 => 'Disable Synchronized Release',
6113             22 => 'Remote Release Only',
6114             26 => 'Flash Disable/Enable',
6115             27 => 'Highlight-weighted Metering', # new value with D810
6116             },
6117             },
6118             16.1 => { # CSf8
6119             Name => 'AssignBktButton',
6120             Mask => 0x07,
6121             PrintConv => {
6122             0 => 'Auto Bracketing',
6123             1 => 'Multiple Exposure',
6124             2 => 'HDR (high dynamic range)',
6125             3 => 'None',
6126             },
6127             },
6128             17.1 => { # CSf6-a
6129             Name => 'AELockButton',
6130             Mask => 0x1f,
6131             PrintConv => {
6132             0 => 'None',
6133             1 => 'Preview',
6134             2 => 'FV Lock',
6135             3 => 'AE/AF Lock',
6136             4 => 'AE Lock Only',
6137             5 => 'AE Lock (reset on release)',
6138             6 => 'AE Lock (hold)',
6139             7 => 'AF Lock Only',
6140             8 => 'AF-On',
6141             10 => 'Bracketing Burst',
6142             11 => 'Matrix Metering',
6143             12 => 'Center-weighted Metering',
6144             13 => 'Spot Metering',
6145             14 => 'Playback',
6146             15 => 'My Menu Top Item',
6147             16 => '+NEF(RAW)',
6148             17 => 'Virtual Horizon',
6149             19 => 'Grid Display', # values 19 and 20 are swapped from the D4s encodings
6150             20 => 'My Menu',
6151             21 => 'Disable Synchronized Release',
6152             22 => 'Remote Release Only',
6153             26 => 'Flash Disable/Enable',
6154             27 => 'Highlight-weighted Metering', # new value with D810
6155             },
6156             },
6157             18.1 => { # CSf9-b
6158             Name => 'CommandDialsChangeMainSub',
6159             Mask => 0xe0,
6160             PrintConv => {
6161             0 => 'Autofocus Off, Exposure Off',
6162             1 => 'Autofocus Off, Exposure On',
6163             2 => 'Autofocus Off, Exposure On (Mode A)',
6164             4 => 'Autofocus On, Exposure Off',
6165             5 => 'Autofocus On, Exposure On',
6166             6 => 'Autofocus On, Exposure On (Mode A)',
6167             },
6168             },
6169             18.2 => { # CSf9-d
6170             Name => 'CommandDialsMenuAndPlayback',
6171             Mask => 0x18,
6172             PrintConv => {
6173             0 => 'On',
6174             1 => 'Off',
6175             2 => 'On (Image Review Excluded)',
6176             },
6177             },
6178             18.3 => { # CSf9-c
6179             Name => 'CommandDialsApertureSetting',
6180             Mask => 0x04,
6181             PrintConv => {
6182             0 => 'Sub-command Dial',
6183             1 => 'Aperture Ring',
6184             },
6185             },
6186             18.4 => { # CSc1
6187             Name => 'ShutterReleaseButtonAE-L',
6188             Mask => 0x02,
6189             PrintConv => \%offOn,
6190             },
6191             18.5 => { # CSf10
6192             Name => 'ReleaseButtonToUseDial',
6193             Mask => 0x01,
6194             PrintConv => \%noYes,
6195             },
6196             19.1 => { # CSc2
6197             Name => 'StandbyTimer',
6198             Mask => 0xf0,
6199             PrintConv => {
6200             0 => '4 s',
6201             1 => '6 s',
6202             3 => '10 s',
6203             5 => '30 s',
6204             6 => '1 min',
6205             7 => '5 min',
6206             8 => '10 min',
6207             9 => '30 min',
6208             10 => 'No Limit', #1
6209             },
6210             },
6211             20.1 => { # CSc3-a
6212             Name => 'SelfTimerTime',
6213             Mask => 0xc0,
6214             PrintConv => {
6215             0 => '2 s',
6216             1 => '5 s',
6217             2 => '10 s',
6218             3 => '20 s',
6219             },
6220             },
6221             20.2 => { # CSc3-c
6222             Name => 'SelfTimerShotInterval',
6223             Mask => 0x30,
6224             PrintConv => {
6225             0 => '0.5 s',
6226             1 => '1 s',
6227             2 => '2 s',
6228             3 => '3 s',
6229             },
6230             },
6231             20.3 => { # CSc3-b
6232             Name => 'SelfTimerShotCount',
6233             Mask => 0x0f,
6234             },
6235             21.1 => { # CSc4-d
6236             Name => 'ImageReviewMonitorOffTime', # note: decode changed from D4s
6237             Mask => 0xe0,
6238             PrintConv => {
6239             0 => '2 s',
6240             1 => '4 s',
6241             3 => '10 s',
6242             4 => '20 s',
6243             5 => '1 min',
6244             6 => '5 min',
6245             7 => '10 min',
6246             },
6247             },
6248             21.2 => { # CSc4-e # note: decode changed from D4s
6249             Name => 'LiveViewMonitorOffTime',
6250             Mask => 0x1c,
6251             PrintConv => {
6252             1 => '5 min',
6253             2 => '10 min',
6254             3 => '15 min',
6255             4 => '20 min',
6256             5 => '30 min',
6257             6 => 'No Limit',
6258             },
6259             },
6260             22.1 => { # CSc4-b # note: decode changed from D4s
6261             Name => 'MenuMonitorOffTime',
6262             Mask => 0xe0,
6263             PrintConv => {
6264             0 => '4 s',
6265             2 => '10 s',
6266             4 => '20 s',
6267             5 => '1 min',
6268             6 => '5 min',
6269             7 => '10 min',
6270             },
6271             },
6272             22.2 => { # CSc4-c # note: decode changed from D4s
6273             Name => 'ShootingInfoMonitorOffTime',
6274             Mask => 0x1c,
6275             PrintConv => {
6276             0 => '4 s',
6277             2 => '10 s',
6278             4 => '20 s',
6279             5 => '1 min',
6280             6 => '5 min',
6281             7 => '10 min',
6282             },
6283             },
6284             23.1 => { # CSe1
6285             Name => 'FlashSyncSpeed',
6286             Mask => 0xf0,
6287             PrintConv => {
6288             0 => '1/320 s (auto FP)',
6289             2 => '1/250 s (auto FP)',
6290             3 => '1/250 s',
6291             5 => '1/200 s',
6292             6 => '1/160 s',
6293             7 => '1/125 s',
6294             8 => '1/100 s',
6295             9 => '1/80 s',
6296             10 => '1/60 s',
6297             },
6298             },
6299             23.2 => { # CSe2
6300             Name => 'FlashShutterSpeed',
6301             Mask => 0x0f,
6302             PrintConvColumns => 2,
6303             PrintConv => {
6304             0 => '1/60 s',
6305             1 => '1/30 s',
6306             2 => '1/15 s',
6307             3 => '1/8 s',
6308             4 => '1/4 s',
6309             5 => '1/2 s',
6310             6 => '1 s',
6311             7 => '2 s',
6312             8 => '4 s',
6313             9 => '8 s',
6314             10 => '15 s',
6315             11 => '30 s',
6316             },
6317             },
6318             24.1 => { # CSe3
6319             Name => 'FlashControlBuilt-in',
6320             Mask => 0xc0,
6321             RawConv => '$$self{FlashControlBuiltin} = $val',
6322             PrintConv => {
6323             0 => 'TTL',
6324             1 => 'Manual',
6325             2 => 'Repeating Flash',
6326             3 => 'Commander Mode',
6327             },
6328             },
6329             31.1 => { # CSe5
6330             Name => 'ModelingFlash',
6331             Mask => 0x20,
6332             PrintConv => \%onOff,
6333             },
6334             36.1 => { # CSc4-a
6335             Name => 'PlaybackMonitorOffTime',
6336             Mask => 0xe0,
6337             PrintConv => {
6338             0 => '4 s',
6339             1 => '10 s',
6340             2 => '20 s',
6341             3 => '1 min',
6342             4 => '5 min',
6343             5 => '10 min',
6344             },
6345             },
6346             37.1 => { # CSf2-c
6347             Name => 'MultiSelectorLiveView',
6348             Mask => 0xc0,
6349             PrintConv => {
6350             0 => 'Reset',
6351             1 => 'Zoom',
6352             3 => 'Not Used',
6353             },
6354             },
6355             38.1 => { # CSf7-a
6356             Name => 'ShutterSpeedLock',
6357             Mask => 0x80,
6358             PrintConv => \%offOn,
6359             },
6360             38.2 => { # CSf7-b
6361             Name => 'ApertureLock',
6362             Mask => 0x40,
6363             PrintConv => \%offOn,
6364             },
6365             38.3 => { # CSg4
6366             Name => 'MovieShutterButton',
6367             Mask => 0x20,
6368             PrintConv => {
6369             0 => 'Take Photo',
6370             1 => 'Record Movies',
6371             },
6372             },
6373             38.4 => { # CSe4
6374             Name => 'FlashExposureCompArea',
6375             Mask => 0x04,
6376             PrintConv => {
6377             0 => 'Entire frame',
6378             1 => 'Background only',
6379             },
6380             },
6381             40.1 => { # CSg3
6382             Name => 'MovieAELockButtonAssignment',
6383             Mask => 0x0f,
6384             PrintConv => {
6385             0 => 'None',
6386             3 => 'Index Marking',
6387             4 => 'View Photo Shooting Info',
6388             5 => 'AE/AF Lock',
6389             6 => 'AE Lock Only',
6390             7 => 'AE Lock (hold)',
6391             8 => 'AF Lock Only',
6392             },
6393             },
6394             41.1 => { # CSg1
6395             Name => 'MovieFunctionButton',
6396             Mask => 0x70,
6397             PrintConv => {
6398             0 => 'None',
6399             1 => 'Power Aperture (open)', # bit '02' is also toggled on for this setting
6400             3 => 'Index Marking',
6401             4 => 'View Photo Shooting Info',
6402             },
6403             },
6404             41.2 => { # CSg2
6405             Name => 'MoviePreviewButton',
6406             Mask => 0x07,
6407             PrintConv => {
6408             0 => 'None',
6409             2 => 'Power Aperture (open)', # bit '10' is also toggled on for this setting
6410             3 => 'Index Marking',
6411             4 => 'View Photo Shooting Info',
6412             },
6413             },
6414             42.1 => { # CSf4-b
6415             Name => 'FuncButtonPlusDials',
6416             Mask => 0x0f,
6417             PrintConv => {
6418             0 => 'None',
6419             1 => 'Choose Image Area (FX/DX/5:4)',
6420             2 => 'Shutter Speed & Aperture Lock',
6421             3 => 'One Step Speed / Aperture',
6422             4 => 'Choose Non-CPU Lens Number',
6423             5 => 'Active D-Lighting',
6424             8 => 'Exposure Delay Mode',
6425             },
6426             },
6427             43.1 => { # CSf5-b
6428             Name => 'PreviewButtonPlusDials',
6429             Mask => 0x0f,
6430             PrintConv => {
6431             0 => 'None',
6432             1 => 'Choose Image Area (FX/DX/5:4)',
6433             2 => 'Shutter Speed & Aperture Lock',
6434             3 => 'One Step Speed / Aperture',
6435             4 => 'Choose Non-CPU Lens Number',
6436             5 => 'Active D-Lighting',
6437             8 => 'Exposure Delay Mode',
6438             },
6439             },
6440             44.1 => { # CSf6-b
6441             Name => 'AELockButtonPlusDials',
6442             Mask => 0x0f,
6443             PrintConv => {
6444             0 => 'None',
6445             1 => 'Choose Image Area (FX/DX/5:4)',
6446             2 => 'Shutter Speed & Aperture Lock',
6447             4 => 'Choose Non-CPU Lens Number',
6448             8 => 'Exposure Delay Mode',
6449             },
6450             },
6451             45.1 => { # CSf13
6452             Name => 'AssignMovieRecordButton',
6453             Mask => 0x0f,
6454             PrintConv => {
6455             0 => 'None',
6456             1 => 'Choose Image Area (FX/DX/5:4)',
6457             2 => 'Shutter Speed & Aperture Lock',
6458             9 => 'White Balance',
6459             10 => 'ISO Sensitivity',
6460             },
6461             },
6462             46.1 => { # CSb7-d
6463             Name => 'FineTuneOptHighlightWeighted',
6464             Mask => 0x0f,
6465             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
6466             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
6467             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
6468             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
6469             },
6470             47.1 => { # CSa5-b
6471             Name => 'DynamicAreaAFDisplay',
6472             Mask => 0x80,
6473             PrintConv => \%offOn,
6474             },
6475             47.2 => { # CSa5-a # moved with D810
6476             Name => 'AFPointIllumination',
6477             Mask => 0x40,
6478             PrintConv => {
6479             0 => 'Off',
6480             1 => 'On During Manual Focusing',
6481             },
6482             },
6483             47.3 => { # CSa9
6484             Name => 'StoreByOrientation',
6485             Mask => 0x18,
6486             PrintConv => {
6487             0 => 'Off',
6488             1 => 'Focus Point',
6489             2 => 'Focus Point and AF-area mode',
6490             },
6491             },
6492             47.4 => { # CSa5-c
6493             Name => 'GroupAreaAFIllumination',
6494             Mask => 0x04,
6495             PrintConv => {
6496             0 => 'Squares', # moved with D810
6497             1 => 'Dots',
6498             },
6499             },
6500             48.1 => { # CSb5
6501             Name => 'MatrixMetering',
6502             Mask => 0x80,
6503             PrintConv => {
6504             0 => 'Face Detection On',
6505             1 => 'Face Detection Off',
6506             },
6507             },
6508             48.2 => { # CSf14
6509             Name => 'LiveViewButtonOptions',
6510             Mask => 0x30,
6511             PrintConv => {
6512             0 => 'Enable',
6513             2 => 'Disable',
6514             },
6515             },
6516             48.3 => { # CSa12
6517             Name => 'AFModeRestrictions',
6518             Mask => 0x03,
6519             PrintConv => {
6520             0 => 'No Restrictions',
6521             1 => 'AF-C',
6522             2 => 'AF-S',
6523             },
6524             },
6525             49.1 => { # CSa11
6526             Name => 'LimitAFAreaModeSelection',
6527             Mask => 0x7e,
6528             PrintConv => {
6529             0 => 'No Restrictions',
6530             BITMASK => {
6531             0 => 'Auto-area',
6532             1 => 'Group-area',
6533             2 => '3D-tracking',
6534             3 => 'Dynamic area (51 points)',
6535             4 => 'Dynamic area (21 points)',
6536             5 => 'Dynamic area (9 points)',
6537             },
6538             },
6539             },
6540             50.1 => { # CSf15
6541             Name => 'AF-OnForMB-D12',
6542             Mask => 0x07,
6543             PrintConv => {
6544             0 => 'AE/AF Lock',
6545             1 => 'AE Lock Only',
6546             2 => 'AF Lock Only',
6547             3 => 'AE Lock (hold)',
6548             4 => 'AE Lock (reset)',
6549             5 => 'AF-On',
6550             6 => 'FV Lock',
6551             7 => 'Same As Fn Button',
6552             },
6553             },
6554             51.1 => { # CSf16
6555             Name => 'AssignRemoteFnButton',
6556             Mask => 0x1f,
6557             PrintConv => {
6558             0 => 'None',
6559             1 => 'Preview',
6560             2 => 'FV Lock',
6561             3 => 'AE/AF Lock',
6562             4 => 'AE Lock Only',
6563             5 => 'AE Lock (reset on release)',
6564             7 => 'AF Lock Only',
6565             8 => 'AF-On',
6566             16 => '+NEF(RAW)',
6567             25 => 'Live View',
6568             26 => 'Flash Disable/Enable',
6569             },
6570             },
6571             52.1 => { # CSf17
6572             Name => 'LensFocusFunctionButtons',
6573             Mask => 0x3f,
6574             PrintConv => {
6575             3 => 'AE/AF Lock',
6576             4 => 'AE Lock Only',
6577             7 => 'AF Lock Only',
6578             21 => 'Disable Synchronized Release',
6579             22 => 'Remote Release Only',
6580             24 => 'Preset focus Point',
6581             26 => 'Flash Disable/Enable',
6582             32 => 'AF-Area Mode: Single-point AF',
6583             33 => 'AF-Area Mode: Dynamic-area AF (9 points)',
6584             34 => 'AF-Area Mode: Dynamic-area AF (21 points)',
6585             35 => 'AF-Area Mode: Dynamic-area AF (51 points)',
6586             36 => 'AF-Area Mode: Group-area AF',
6587             37 => 'AF-Area Mode: Auto area AF',
6588             },
6589             },
6590             );
6591              
6592             # D850 custom settings (ref 1)
6593             %Image::ExifTool::NikonCustom::SettingsD850 = (
6594             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
6595             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
6596             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
6597             WRITABLE => 1,
6598             FIRST_ENTRY => 0,
6599             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
6600             NOTES => 'Custom settings for the D850.',
6601             0.2 => {
6602             Name => 'CustomSettingsBank',
6603             Mask => 0x03,
6604             PrintConv => {
6605             0 => 'A',
6606             1 => 'B',
6607             2 => 'C',
6608             3 => 'D',
6609             },
6610             },
6611             1.1 => { #CSa1
6612             Name => 'AF-CPrioritySelection',
6613             Mask => 0xc0,
6614             PrintConv => {
6615             0 => 'Release',
6616             1 => 'Release + Focus',
6617             2 => 'Focus',
6618             3 => 'Focus + Release',
6619             },
6620             },
6621             1.2 => { # CSa2
6622             Name => 'AF-SPrioritySelection',
6623             Mask => 0x20,
6624             PrintConv => {
6625             0 => 'Focus',
6626             1 => 'Release',
6627             },
6628             },
6629             1.3 => { # CSa6
6630             Name => 'AFPointSelection',
6631             Mask => 0x10,
6632             PrintConv => {
6633             0 => '55 Points',
6634             1 => '15 Points',
6635             },
6636             },
6637             1.4 => { # CSa4
6638             Name => 'Three-DTrackingFaceDetection',
6639             Mask => 0x08,
6640             PrintConv => \%offOn,
6641             },
6642             1.5 => { # CSa3-a
6643             Name => 'BlockShotAFResponse',
6644             Mask => 0x07,
6645             PrintConv => {
6646             1 => '1 (Quick)',
6647             2 => '2',
6648             3 => '3 (Normal)',
6649             4 => '4',
6650             5 => '5 (Delay)',
6651             },
6652             },
6653             2.1 => { # CSa11
6654             Name => 'FocusPointWrap',
6655             Mask => 0x08,
6656             PrintConv => {
6657             0 => 'No Wrap',
6658             1 => 'Wrap',
6659             },
6660             },
6661             2.2 => { # CSa12-a
6662             Name => 'AFPointBrightness',
6663             Mask => 0x06,
6664             PrintConv => {
6665             0 => 'Auto',
6666             1 => 'On',
6667             2 => 'Off',
6668             },
6669             },
6670             4.1 => { # CSd3
6671             Name => 'ISODisplay',
6672             Mask => 0x08,
6673             PrintConv => {
6674             0 => 'Show ISO Sensitivity',
6675             1 => 'Show Frame Count',
6676             },
6677             },
6678             4.2 => { # CSd9
6679             Name => 'GridDisplay',
6680             Mask => 0x02,
6681             PrintConv => \%onOff,
6682             },
6683             5.1 => { # CSd10
6684             Name => 'LCDIllumination',
6685             Mask => 0x20,
6686             PrintConv => \%offOn,
6687             },
6688             5.2 => { # CSd6
6689             Name => 'ElectronicFront-CurtainShutter',
6690             Mask => 0x08,
6691             PrintConv => \%offOn,
6692             },
6693             6.1 => { # CSf7
6694             Name => 'ReverseIndicators',
6695             Mask => 0x80,
6696             PrintConv => {
6697             0 => '+ 0 -',
6698             1 => '- 0 +',
6699             },
6700             },
6701             6.2 => { # CSf4-a
6702             Name => 'CommandDialsReverseRotation',
6703             Mask => 0x18,
6704             PrintConv => {
6705             0 => 'No',
6706             1 => 'Shutter Speed & Aperture',
6707             2 => 'Exposure Compensation',
6708             3 => 'Exposure Compensation, Shutter Speed & Aperture',
6709             },
6710             },
6711             6.3 => { # CSb4
6712             Name => 'EasyExposureCompensation',
6713             Mask => 0x03,
6714             PrintConv => {
6715             0 => 'Off',
6716             1 => 'On',
6717             2 => 'On (Auto Reset)',
6718             },
6719             },
6720             7.1 => { # CSb2
6721             Name => 'ExposureControlStepSize',
6722             Mask => 0xc0,
6723             PrintConv => {
6724             0 => '1/3 EV',
6725             1 => '1/2 EV',
6726             2 => '1 EV',
6727             },
6728             },
6729             7.2 => { # CSb1
6730             Name => 'ISOStepSize',
6731             Mask => 0x30,
6732             PrintConv => {
6733             0 => '1/3 EV',
6734             1 => '1/2 EV',
6735             2 => '1 EV',
6736             },
6737             },
6738             7.3 => { # CSb3
6739             Name => 'ExposureCompStepSize',
6740             Mask => 0x0c,
6741             PrintConv => {
6742             0 => '1/3 EV',
6743             1 => '1/2 EV',
6744             2 => '1 EV',
6745             },
6746             },
6747             8.1 => { # CSb6
6748             Name => 'CenterWeightedAreaSize',
6749             Mask => 0xe0,
6750             PrintConv => {
6751             0 => '8 mm',
6752             1 => '12 mm',
6753             2 => '15 mm',
6754             3 => '20 mm',
6755             4 => 'Average',
6756             },
6757             },
6758             8.2 => { # CSb7-a
6759             Name => 'FineTuneOptMatrixMetering',
6760             Mask => 0x0f,
6761             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
6762             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
6763             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
6764             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
6765             },
6766             9.1 => { # CSb7-b
6767             Name => 'FineTuneOptCenterWeighted',
6768             Mask => 0xf0,
6769             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
6770             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
6771             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
6772             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
6773             },
6774             9.2 => { # CSb7-c
6775             Name => 'FineTuneOptSpotMetering',
6776             Mask => 0x0f,
6777             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
6778             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
6779             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
6780             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
6781             },
6782             10.1 => { # CSf2-a
6783             Name => 'MultiSelectorShootMode',
6784             Mask => 0xe0,
6785             PrintConv => {
6786             0 => 'Select Center Focus Point (Reset)',
6787             2 => 'Preset Focus Point (Pre)',
6788             3 => 'Highlight Active Focus Point',
6789             4 => 'Not Used (None)',
6790             },
6791             },
6792             10.2 => { # CSf2-b
6793             Name => 'MultiSelectorPlaybackMode',
6794             Mask => 0x0c,
6795             PrintConv => {
6796             0 => 'Thumbnail On/Off',
6797             1 => 'View Histograms',
6798             2 => 'Zoom On/Off',
6799             3 => 'Choose Folder',
6800             },
6801             },
6802             10.3 => { # CSf5
6803             Name => 'MultiSelector',
6804             Mask => 0x01,
6805             PrintConv => {
6806             0 => 'Do Nothing',
6807             1 => 'Reset Meter-off Delay',
6808             },
6809             },
6810             11.1 => { # CSd5
6811             Name => 'ExposureDelayMode',
6812             Mask => 0xe0,
6813             PrintConv => {
6814             0 => 'Off',
6815             1 => '0.2 s', #new with the D850
6816             2 => '0.5 s', #new with the D850
6817             3 => '1 s',
6818             4 => '2 s',
6819             5 => '3 s',
6820             },
6821             },
6822             11.2 => { # CSd1
6823             Name => 'CLModeShootingSpeed',
6824             Mask => 0x0f,
6825             PrintConv => '"$val fps"',
6826             PrintConvInv => '$val=~s/\s*fps//i; $val',
6827             },
6828             12.1 => { # CSd2
6829             Name => 'MaxContinuousRelease',
6830             # values: 1-100
6831             },
6832             13.1 => { # CSe7
6833             Name => 'AutoBracketOrder',
6834             Mask => 0x10,
6835             PrintConv => {
6836             0 => '0,-,+',
6837             1 => '-,0,+',
6838             },
6839             },
6840             13.2 => { # CSe6
6841             Name => 'AutoBracketModeM',
6842             Mask => 0x0c,
6843             PrintConv => {
6844             0 => 'Flash/Speed',
6845             1 => 'Flash/Speed/Aperture',
6846             2 => 'Flash/Aperture',
6847             3 => 'Flash Only',
6848             },
6849             },
6850             14.1 => { # CSf1-c
6851             Name => 'Func1Button',
6852             Mask => 0x3f,
6853             PrintConv => {
6854             0 => 'None',
6855             1 => 'Preview',
6856             2 => 'FV Lock',
6857             3 => 'AE/AF Lock',
6858             4 => 'AE Lock Only',
6859             5 => 'AE Lock (reset on release)',
6860             6 => 'AE Lock (hold)',
6861             7 => 'AF Lock Only',
6862             8 => 'AF-On',
6863             10 => 'Bracketing Burst',
6864             11 => 'Matrix Metering',
6865             12 => 'Center-weighted Metering',
6866             13 => 'Spot Metering',
6867             14 => 'Playback',
6868             15 => 'My Menu Top Item',
6869             16 => '+NEF(RAW)',
6870             17 => 'Virtual Horizon',
6871             19 => 'Grid Display',
6872             20 => 'My Menu',
6873             22 => 'Remote Release Only',
6874             26 => 'Flash Disable/Enable',
6875             27 => 'Highlight-weighted Metering',
6876             36 => 'AF-Area Mode (Single)',
6877             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
6878             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
6879             39 => 'AF-Area Mode (Dynamic Area 153 Points)',
6880             40 => 'AF-Area Mode (Group Area AF)',
6881             41 => 'AF-Area Mode (Auto Area AF)',
6882             42 => 'AF-Area Mode + AF-On (Single)',
6883             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
6884             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
6885             45 => 'AF-Area Mode + AF-On (Dynamic Area 153 Points)',
6886             46 => 'AF-Area Mode + AF-On (Group Area AF)',
6887             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
6888             49 => 'Sync Release (Master Only)',
6889             50 => 'Sync Release (Remote Only)',
6890             56 => 'AF-Area Mode (Dynamic Area 9 Points)',
6891             57 => 'AF-Area Mode + AF-On (Dynamic Area 9 Points)',
6892             },
6893             },
6894             15.1 => { # CSf1-a
6895             Name => 'PreviewButton',
6896             Mask => 0x3f,
6897             PrintConv => {
6898             0 => 'None',
6899             1 => 'Preview',
6900             2 => 'FV Lock',
6901             3 => 'AE/AF Lock',
6902             4 => 'AE Lock Only',
6903             5 => 'AE Lock (reset on release)',
6904             6 => 'AE Lock (hold)',
6905             7 => 'AF Lock Only',
6906             8 => 'AF-On',
6907             10 => 'Bracketing Burst',
6908             11 => 'Matrix Metering',
6909             12 => 'Center-weighted Metering',
6910             13 => 'Spot Metering',
6911             14 => 'Playback',
6912             15 => 'My Menu Top Item',
6913             16 => '+NEF(RAW)',
6914             17 => 'Virtual Horizon',
6915             19 => 'Grid Display',
6916             20 => 'My Menu',
6917             22 => 'Remote Release Only',
6918             26 => 'Flash Disable/Enable',
6919             27 => 'Highlight-weighted Metering',
6920             36 => 'AF-Area Mode (Single)',
6921             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
6922             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
6923             39 => 'AF-Area Mode (Dynamic Area 153 Points)',
6924             40 => 'AF-Area Mode (Group Area AF)',
6925             41 => 'AF-Area Mode (Auto Area AF)',
6926             42 => 'AF-Area Mode + AF-On (Single)',
6927             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
6928             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
6929             45 => 'AF-Area Mode + AF-On (Dynamic Area 153 Points)',
6930             46 => 'AF-Area Mode + AF-On (Group Area AF)',
6931             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
6932             49 => 'Sync Release (Master Only)',
6933             50 => 'Sync Release (Remote Only)',
6934             56 => 'AF-Area Mode (Dynamic Area 9 Points)',
6935             57 => 'AF-Area Mode + AF-On (Dynamic Area 9 Points)',
6936             },
6937             },
6938             16.1 => { # CSf1-j
6939             Name => 'AssignBktButton',
6940             Mask => 0x07,
6941             PrintConv => {
6942             0 => 'Auto Bracketing',
6943             1 => 'Multiple Exposure',
6944             2 => 'HDR (high dynamic range)',
6945             3 => 'None',
6946             },
6947             },
6948             18.1 => { # CSf4-b
6949             Name => 'CommandDialsChangeMainSub',
6950             Mask => 0xe0,
6951             PrintConv => {
6952             0 => 'Autofocus Off, Exposure Off',
6953             1 => 'Autofocus Off, Exposure On',
6954             2 => 'Autofocus Off, Exposure On (Mode A)',
6955             4 => 'Autofocus On, Exposure Off',
6956             5 => 'Autofocus On, Exposure On',
6957             6 => 'Autofocus On, Exposure On (Mode A)',
6958             },
6959             },
6960             18.2 => { # CSf4-d
6961             Name => 'CommandDialsMenuAndPlayback',
6962             Mask => 0x18,
6963             PrintConv => {
6964             0 => 'On',
6965             1 => 'Off',
6966             2 => 'On (Image Review Excluded)',
6967             },
6968             },
6969             18.3 => { # CSf4-c
6970             Name => 'CommandDialsApertureSetting',
6971             Mask => 0x04,
6972             PrintConv => {
6973             0 => 'Sub-command Dial',
6974             1 => 'Aperture Ring',
6975             },
6976             },
6977             18.4 => { # CSf6
6978             Name => 'ReleaseButtonToUseDial',
6979             Mask => 0x01,
6980             PrintConv => \%noYes,
6981             },
6982             19.1 => { # CSc2
6983             Name => 'StandbyTimer',
6984             Mask => 0xf0,
6985             PrintConv => {
6986             0 => '4 s',
6987             1 => '6 s',
6988             3 => '10 s',
6989             5 => '30 s',
6990             6 => '1 min',
6991             7 => '5 min',
6992             8 => '10 min',
6993             9 => '30 min',
6994             10 => 'No Limit',
6995             },
6996             },
6997             20.1 => { # CSc3-a
6998             Name => 'SelfTimerTime',
6999             Mask => 0xc0,
7000             PrintConv => {
7001             0 => '2 s',
7002             1 => '5 s',
7003             2 => '10 s',
7004             3 => '20 s',
7005             },
7006             },
7007             20.2 => { # CSc3-c
7008             Name => 'SelfTimerShotInterval',
7009             Mask => 0x30,
7010             PrintConv => {
7011             0 => '0.5 s',
7012             1 => '1 s',
7013             2 => '2 s',
7014             3 => '3 s',
7015             },
7016             },
7017             20.3 => { # CSc3-b
7018             Name => 'SelfTimerShotCount',
7019             Mask => 0x0f,
7020             },
7021             21.1 => { # CSc4-d
7022             Name => 'ImageReviewMonitorOffTime',
7023             Mask => 0xe0,
7024             PrintConv => {
7025             0 => '2 s',
7026             1 => '4 s',
7027             3 => '10 s',
7028             4 => '20 s',
7029             5 => '1 min',
7030             6 => '5 min',
7031             7 => '10 min',
7032             },
7033             },
7034             21.2 => { # CSc4-e
7035             Name => 'LiveViewMonitorOffTime',
7036             Mask => 0x1c,
7037             PrintConv => {
7038             1 => '5 min',
7039             2 => '10 min',
7040             3 => '15 min',
7041             4 => '20 min',
7042             5 => '30 min',
7043             6 => 'No Limit',
7044             },
7045             },
7046             22.1 => { # CSc4-b
7047             Name => 'MenuMonitorOffTime',
7048             Mask => 0xe0,
7049             PrintConv => {
7050             0 => '4 s',
7051             2 => '10 s',
7052             4 => '20 s',
7053             5 => '1 min',
7054             6 => '5 min',
7055             7 => '10 min',
7056             },
7057             },
7058             22.2 => { # CSc4-c
7059             Name => 'ShootingInfoMonitorOffTime',
7060             Mask => 0x1c,
7061             PrintConv => {
7062             0 => '4 s',
7063             2 => '10 s',
7064             4 => '20 s',
7065             5 => '1 min',
7066             6 => '5 min',
7067             7 => '10 min',
7068             },
7069             },
7070             23.1 => { # CSe1
7071             Name => 'FlashSyncSpeed',
7072             Mask => 0xf0,
7073             PrintConv => {
7074             2 => '1/250 s (auto FP)',
7075             3 => '1/250 s',
7076             5 => '1/200 s',
7077             6 => '1/160 s',
7078             7 => '1/125 s',
7079             8 => '1/100 s',
7080             9 => '1/80 s',
7081             10 => '1/60 s',
7082             },
7083             },
7084             23.2 => { # CSe2
7085             Name => 'FlashShutterSpeed',
7086             Mask => 0x0f,
7087             PrintConvColumns => 2,
7088             PrintConv => {
7089             0 => '1/60 s',
7090             1 => '1/30 s',
7091             2 => '1/15 s',
7092             3 => '1/8 s',
7093             4 => '1/4 s',
7094             5 => '1/2 s',
7095             6 => '1 s',
7096             7 => '2 s',
7097             8 => '4 s',
7098             9 => '8 s',
7099             10 => '15 s',
7100             11 => '30 s',
7101             },
7102             },
7103             31.1 => { # CSe5
7104             Name => 'ModelingFlash',
7105             Mask => 0x20,
7106             PrintConv => \%onOff,
7107             },
7108             36.1 => { # CSc4-a
7109             Name => 'PlaybackMonitorOffTime',
7110             Mask => 0xe0,
7111             PrintConv => {
7112             0 => '4 s',
7113             1 => '10 s',
7114             2 => '20 s',
7115             3 => '1 min',
7116             4 => '5 min',
7117             5 => '10 min',
7118             },
7119             },
7120             37.1 => { # CSf2-c
7121             Name => 'MultiSelectorLiveView',
7122             Mask => 0xc0,
7123             PrintConv => {
7124             0 => 'Reset',
7125             1 => 'Zoom',
7126             3 => 'Not Used',
7127             },
7128             },
7129             38.1 => { # CSf3-a
7130             Name => 'ShutterSpeedLock',
7131             Mask => 0x80,
7132             PrintConv => \%offOn,
7133             },
7134             38.2 => { # CSf3-b
7135             Name => 'ApertureLock',
7136             Mask => 0x40,
7137             PrintConv => \%offOn,
7138             },
7139             38.3 => { # CSg1-h
7140             Name => 'MovieShutterButton',
7141             Mask => 0x10,
7142             PrintConv => {
7143             0 => 'Take Photo',
7144             1 => 'Record Movies',
7145             },
7146             },
7147             38.4 => { # CSe3
7148             Name => 'FlashExposureCompArea',
7149             Mask => 0x04,
7150             PrintConv => {
7151             0 => 'Entire Frame',
7152             1 => 'Background Only',
7153             },
7154             },
7155             38.5 => { # CSe4
7156             Name => 'AutoFlashISOSensitivity',
7157             Mask => 0x02,
7158             PrintConv => {
7159             0 => 'Subject and Background',
7160             1 => 'Subject Only',
7161             },
7162             },
7163             41.1 => { # CSg1-c
7164             Name => 'MovieFunc1Button',
7165             Mask => 0xf0,
7166             PrintConv => {
7167             0 => 'None',
7168             2 => 'Power Aperture (close)',
7169             3 => 'Index Marking',
7170             4 => 'View Photo Shooting Info',
7171             11 => 'Exposure Compensation -',
7172             },
7173             },
7174             41.2 => { # CSg1-a
7175             Name => 'MoviePreviewButton',
7176             Mask => 0x0f,
7177             PrintConv => {
7178             0 => 'None',
7179             1 => 'Power Aperture (open)',
7180             3 => 'Index Marking',
7181             4 => 'View Photo Shooting Info',
7182             10 => 'Exposure Compensation +',
7183             },
7184             },
7185             42.1 => { # CSf1-d
7186             Name => 'Func1ButtonPlusDials',
7187             Mask => 0x0f,
7188             PrintConv => {
7189             0 => 'None',
7190             1 => 'Choose Image Area',
7191             2 => 'Shutter Speed & Aperture Lock',
7192             3 => 'One Step Speed / Aperture',
7193             4 => 'Choose Non-CPU Lens Number',
7194             5 => 'Active D-Lighting',
7195             7 => 'Photo Shooting Menu Bank',
7196             8 => 'Exposure Delay Mode',
7197             },
7198             },
7199             43.1 => { # CSf1-b
7200             Name => 'PreviewButtonPlusDials',
7201             Mask => 0x0f,
7202             PrintConv => {
7203             0 => 'None',
7204             1 => 'Choose Image Area',
7205             2 => 'Shutter Speed & Aperture Lock',
7206             3 => 'One Step Speed / Aperture',
7207             4 => 'Choose Non-CPU Lens Number',
7208             5 => 'Active D-Lighting',
7209             7 => 'Photo Shooting Menu Bank',
7210             8 => 'Exposure Delay Mode',
7211             },
7212             },
7213             45.1 => { # CSf1-k
7214             Name => 'AssignMovieRecordButtonPlusDials',
7215             Mask => 0x0f,
7216             PrintConv => {
7217             0 => 'None',
7218             1 => 'Choose Image Area',
7219             2 => 'Shutter Speed & Aperture Lock',
7220             7 => 'Photo Shooting Menu Bank',
7221             11 => 'Exposure Mode',
7222             },
7223             },
7224             46.1 => { # CSb7-d
7225             Name => 'FineTuneOptHighlightWeighted',
7226             Mask => 0x0f,
7227             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
7228             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
7229             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
7230             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
7231             },
7232             47.1 => { # CSa12-c
7233             Name => 'DynamicAreaAFDisplay',
7234             Mask => 0x80,
7235             PrintConv => \%offOn,
7236             },
7237             47.2 => { # CSa12-b
7238             Name => 'AFPointIllumination',
7239             Mask => 0x40,
7240             PrintConv => {
7241             0 => 'Off',
7242             1 => 'On During Manual Focusing',
7243             },
7244             },
7245             47.3 => { # CSa7
7246             Name => 'StoreByOrientation',
7247             Mask => 0x18,
7248             PrintConv => {
7249             0 => 'Off',
7250             1 => 'Focus Point',
7251             2 => 'Focus Point and AF-area Mode',
7252             },
7253             },
7254             48.1 => { # CSb5
7255             Name => 'MatrixMetering',
7256             Mask => 0x80,
7257             PrintConv => {
7258             0 => 'Face Detection On',
7259             1 => 'Face Detection Off',
7260             },
7261             },
7262             48.2 => { # CSf8
7263             Name => 'LiveViewButtonOptions',
7264             Mask => 0x30,
7265             PrintConv => {
7266             0 => 'Enable',
7267             1 => 'Enable (Standby Timer Active)',
7268             2 => 'Disable',
7269             },
7270             },
7271             48.3 => { # CSa10
7272             Name => 'AFModeRestrictions',
7273             Mask => 0x03,
7274             PrintConv => {
7275             0 => 'No Restrictions',
7276             1 => 'AF-C',
7277             2 => 'AF-S',
7278             },
7279             },
7280             49.1 => { # CSa9
7281             Name => 'LimitAFAreaModeSelection', #note that 'Dynamic area (9 points)' can be selected from the camera menu but the setting is not written to the EXIF data.
7282             Mask => 0x7e, #...This AF Mode was added to the D5 firmware several months after the camera's initial release which may help explain the inconsistency.
7283             PrintConv => {
7284             0 => 'No Restrictions',
7285             BITMASK => {
7286             0 => 'Auto-area',
7287             1 => 'Group-area',
7288             2 => '3D-tracking',
7289             3 => 'Dynamic area (153 points)',
7290             4 => 'Dynamic area (72 points)',
7291             5 => 'Dynamic area (25 points)',
7292             },
7293             },
7294             },
7295             52.1 => { # CSf1-l
7296             Name => 'LensFocusFunctionButtons',
7297             Mask => 0x3f,
7298             PrintConv => {
7299             3 => 'AE/AF Lock',
7300             4 => 'AE Lock Only',
7301             7 => 'AF Lock Only',
7302             8 => 'AF-On',
7303             24 => 'Preset Focus Point',
7304             26 => 'Flash Disable/Enable',
7305             36 => 'AF-Area Mode (Single)',
7306             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
7307             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
7308             39 => 'AF-Area Mode (Dynamic Area 153 Points)',
7309             40 => 'AF-Area Mode (Group Area AF)',
7310             41 => 'AF-Area Mode (Auto Area AF)',
7311             42 => 'AF-Area Mode + AF-On (Single)',
7312             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
7313             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
7314             45 => 'AF-Area Mode + AF-On (Dynamic Area 153 Points)',
7315             46 => 'AF-Area Mode + AF-On (Group Area AF)',
7316             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
7317             49 => 'Sync Release (Master Only)',
7318             50 => 'Sync Release (Remote Only)',
7319             56 => 'AF-Area Mode (Dynamic Area 9 Points)',
7320             57 => 'AF-Area Mode + AF-On (Dynamic Area 9 Points)',
7321             },
7322             },
7323             66.1 => { # CSf10-d
7324             Name => 'VerticalMultiSelector',
7325             Mask => 0xff,
7326             PrintHex => 1,
7327             PrintConv => {
7328             0x00 => 'Same as Multi-Selector with Info(U/D) & Playback(R/L)',
7329             0x08 => 'Same as Multi-Selector with Info(R/L) & Playback(U/D)',
7330             0x80 => 'Focus Point Selection',
7331             },
7332             },
7333             67.1 => { # CSf10-a
7334             Name => 'AssignMB-D18FuncButton',
7335             Mask => 0x3f,
7336             PrintConv => {
7337             0 => 'None',
7338             1 => 'Preview',
7339             2 => 'FV Lock',
7340             3 => 'AE/AF Lock',
7341             4 => 'AE Lock Only',
7342             5 => 'AE Lock (reset on release)',
7343             6 => 'AE Lock (hold)',
7344             7 => 'AF Lock Only',
7345             8 => 'AF-On',
7346             10 => 'Bracketing Burst',
7347             11 => 'Matrix Metering',
7348             12 => 'Center-weighted Metering',
7349             13 => 'Spot Metering',
7350             14 => 'Playback',
7351             15 => 'My Menu Top Item',
7352             16 => '+NEF(RAW)',
7353             17 => 'Virtual Horizon',
7354             18 => 'Reset Focus Point',
7355             19 => 'Grid Display',
7356             20 => 'My Menu',
7357             22 => 'Remote Release Only',
7358             23 => 'Preset Focus Point',
7359             26 => 'Flash Disable/Enable',
7360             27 => 'Highlight-weighted Metering',
7361             36 => 'AF-Area Mode (Single)',
7362             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
7363             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
7364             39 => 'AF-Area Mode (Dynamic Area 153 Points)',
7365             40 => 'AF-Area Mode (Group Area AF)',
7366             41 => 'AF-Area Mode (Auto Area AF)',
7367             42 => 'AF-Area Mode + AF-On (Single)',
7368             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
7369             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
7370             45 => 'AF-Area Mode + AF-On (Dynamic Area 153 Points)',
7371             46 => 'AF-Area Mode + AF-On (Group Area AF)',
7372             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
7373             49 => 'Sync Release (Master Only)',
7374             50 => 'Sync Release (Remote Only)',
7375             54 => 'Highlight Active Focus Point',
7376             56 => 'AF-Area Mode (Dynamic Area 9 Points)',
7377             57 => 'AF-Area Mode + AF-On (Dynamic Area 9 Points)',
7378             },
7379             },
7380             68.1 => { # CSf10-b
7381             Name => 'AssignMB-D18FuncButtonPlusDials',
7382             Mask => 0x0f,
7383             PrintConv => {
7384             0 => 'None',
7385             1 => 'Choose Image Area',
7386             2 => 'Shutter Speed & Aperture Lock',
7387             3 => 'One Step Speed / Aperture',
7388             4 => 'Choose Non-CPU Lens Number',
7389             5 => 'Active D-Lighting',
7390             7 => 'Photo Shooting Menu Bank',
7391             8 => 'Exposure Delay Mode',
7392             10 => 'ISO Sensitivity',
7393             11 => 'Exposure Mode',
7394             12 => 'Exposure Compensation',
7395             13 => 'Metering Mode',
7396             },
7397             },
7398             70.1 => { # CSf1-f
7399             Name => 'AF-OnButton',
7400             Mask => 0x3f,
7401             PrintConv => {
7402             0 => 'None',
7403             3 => 'AE/AF Lock',
7404             4 => 'AE Lock Only',
7405             5 => 'AE Lock (reset on release)',
7406             6 => 'AE Lock (hold)',
7407             7 => 'AF Lock Only',
7408             8 => 'AF-On',
7409             36 => 'AF-Area Mode (Single)',
7410             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
7411             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
7412             39 => 'AF-Area Mode (Dynamic Area 153 Points)',
7413             40 => 'AF-Area Mode (Group Area AF)',
7414             41 => 'AF-Area Mode (Auto Area AF)',
7415             42 => 'AF-Area Mode + AF-On (Single)',
7416             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
7417             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
7418             45 => 'AF-Area Mode + AF-On (Dynamic Area 153 Points)',
7419             46 => 'AF-Area Mode + AF-On (Group Area AF)',
7420             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
7421             56 => 'AF-Area Mode (Dynamic Area 9 Points)',
7422             57 => 'AF-Area Mode + AF-On (Dynamic Area 9 Points)',
7423             },
7424             },
7425             71.1 => { # CSf1-g
7426             Name => 'SubSelector',
7427             Mask => 0x80,
7428             PrintConv => {
7429             0 => 'Focus Point Selection',
7430             1 => 'Same as MultiSelector',
7431             },
7432             },
7433             72.1 => { # CSf1-h
7434             Name => 'SubSelectorCenter',
7435             Mask => 0x3f,
7436             PrintConv => {
7437             0 => 'None',
7438             1 => 'Preview',
7439             2 => 'FV Lock',
7440             3 => 'AE/AF Lock',
7441             4 => 'AE Lock Only',
7442             5 => 'AE Lock (reset on release)',
7443             6 => 'AE Lock (hold)',
7444             7 => 'AF Lock Only',
7445             8 => 'AF-On',
7446             10 => 'Bracketing Burst',
7447             11 => 'Matrix Metering',
7448             12 => 'Center-weighted Metering',
7449             13 => 'Spot Metering',
7450             14 => 'Playback',
7451             15 => 'My Menu Top Item',
7452             16 => '+NEF(RAW)',
7453             17 => 'Virtual Horizon',
7454             18 => 'Reset Focus Point',
7455             19 => 'Grid Display',
7456             20 => 'My Menu',
7457             22 => 'Remote Release Only',
7458             23 => 'Preset Focus Point',
7459             26 => 'Flash Disable/Enable',
7460             27 => 'Highlight-weighted Metering',
7461             36 => 'AF-Area Mode (Single)',
7462             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
7463             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
7464             39 => 'AF-Area Mode (Dynamic Area 153 Points)',
7465             40 => 'AF-Area Mode (Group Area AF)',
7466             41 => 'AF-Area Mode (Auto Area AF)',
7467             42 => 'AF-Area Mode + AF-On (Single)',
7468             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
7469             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
7470             45 => 'AF-Area Mode + AF-On (Dynamic Area 153 Points)',
7471             46 => 'AF-Area Mode + AF-On (Group Area AF)',
7472             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
7473             49 => 'Sync Release (Master Only)',
7474             50 => 'Sync Release (Remote Only)',
7475             54 => 'Highlight Active Focus Point',
7476             56 => 'AF-Area Mode (Dynamic Area 9 Points)',
7477             57 => 'AF-Area Mode + AF-On (Dynamic Area 9 Points)',
7478             },
7479             },
7480             73.1 => { # CSf1-i
7481             Name => 'SubSelectorPlusDials',
7482             Mask => 0x0f,
7483             PrintConv => {
7484             0 => 'None',
7485             1 => 'Choose Image Area',
7486             2 => 'Shutter Speed & Aperture Lock',
7487             4 => 'Choose Non-CPU Lens Number',
7488             7 => 'Photo Shooting Menu Bank',
7489             },
7490             },
7491             74.1 => { # CSg1-f
7492             Name => 'AssignMovieSubselector',
7493             Mask => 0xf0,
7494             PrintConv => {
7495             0 => 'None',
7496             3 => 'Index Marking',
7497             4 => 'View Photo Shooting Info',
7498             5 => 'AE/AF Lock',
7499             6 => 'AE Lock (Only)',
7500             7 => 'AE Lock (Hold)',
7501             8 => 'AF Lock (Only)',
7502             },
7503             },
7504             75.1 => { # CSg1-d
7505             Name => 'AssignMovieFunc1ButtonPlusDials',
7506             Mask => 0x10,
7507             PrintConv => {
7508             0 => 'None',
7509             1 => 'Choose Image Area',
7510             },
7511             },
7512             75.2 => { # CSg1-b
7513             Name => 'AssignMoviePreviewButtonPlusDials',
7514             Mask => 0x01,
7515             PrintConv => {
7516             0 => 'None',
7517             1 => 'Choose Image Area',
7518             },
7519             },
7520             76.1 => { # CSg1-g
7521             Name => 'AssignMovieSubselectorPlusDials',
7522             Mask => 0x10,
7523             PrintConv => {
7524             0 => 'None',
7525             1 => 'Choose Image Area',
7526             },
7527             },
7528             77.1 => { # CSd4
7529             Name => 'SyncReleaseMode',
7530             Mask => 0x80,
7531             PrintConv => {
7532             0 => 'No Sync',
7533             1 => 'Sync',
7534             },
7535             },
7536             77.2 => { # CSd11 (new with D850)
7537             Name => 'ContinuousModeLiveView',
7538             Mask => 0x40,
7539             PrintConv => \%offOn,
7540             },
7541             78.1 => { # CSa5
7542             Name => 'Three-DTrackingWatchArea',
7543             Mask => 0x80,
7544             PrintConv => {
7545             0 => 'Wide',
7546             1 => 'Normal',
7547             },
7548             },
7549             78.2 => { # CSa3-b
7550             Name => 'SubjectMotion',
7551             Mask => 0x60,
7552             PrintConv => {
7553             0 => 'Steady',
7554             1 => 'Middle',
7555             2 => 'Erratic',
7556             },
7557             },
7558             78.3 => { # CSa8
7559             Name => 'AFActivation',
7560             Mask => 0x08,
7561             PrintConv => {
7562             0 => 'Shutter/AF-On',
7563             1 => 'AF-On Only',
7564             },
7565             },
7566             78.4 => { # CSc1
7567             Name => 'ShutterReleaseButtonAE-L',
7568             Mask => 0x03,
7569             PrintConv => {
7570             0 => 'Off',
7571             1 => 'On (Half Press)',
7572             2 => 'On (Burst Mode)'
7573             },
7574             },
7575             79.1 => { # CSf10-c
7576             Name => 'AssignMB-D18AF-OnButton',
7577             Mask => 0x7f,
7578             PrintConv => {
7579             0 => 'None',
7580             3 => 'AE/AF Lock',
7581             4 => 'AE Lock Only',
7582             5 => 'AE Lock (reset on release)',
7583             6 => 'AE Lock (hold)',
7584             7 => 'AF Lock Only',
7585             8 => 'AF-On',
7586             36 => 'AF-Area Mode (Single)',
7587             37 => 'AF-Area Mode (Dynamic Area 25 Points)',
7588             38 => 'AF-Area Mode (Dynamic Area 72 Points)',
7589             39 => 'AF-Area Mode (Dynamic Area 153 Points)',
7590             40 => 'AF-Area Mode (Group Area AF)',
7591             41 => 'AF-Area Mode (Auto Area AF)',
7592             42 => 'AF-Area Mode + AF-On (Single)',
7593             43 => 'AF-Area Mode + AF-On (Dynamic Area 25 Points)',
7594             44 => 'AF-Area Mode + AF-On (Dynamic Area 72 Points)',
7595             45 => 'AF-Area Mode + AF-On (Dynamic Area 153 Points)',
7596             46 => 'AF-Area Mode + AF-On (Group Area AF)',
7597             47 => 'AF-Area Mode + AF-On (Auto Area AF)',
7598             56 => 'AF-Area Mode (Dynamic Area 9 Points)',
7599             57 => 'AF-Area Mode + AF-On (Dynamic Area 9 Points)',
7600             100 => 'Same as Camera AF-On Button',
7601             },
7602             },
7603             80.1 => { # CSf1-e
7604             Name => 'Func2Button',
7605             Mask => 0x3f,
7606             PrintConv => {
7607             0 => 'None',
7608             15 => 'My Menu Top Item',
7609             20 => 'My Menu',
7610             55 => 'Rating',
7611             },
7612             },
7613             82.1 => { # CSg1-e
7614             Name => 'AssignMovieFunc2Button',
7615             Mask => 0x70,
7616             PrintConv => {
7617             0 => 'None',
7618             3 => 'Index Marking',
7619             4 => 'View Photo Shooting Info',
7620             },
7621             },
7622             );
7623              
7624             # D5000 custom settings (ref PH)
7625             %Image::ExifTool::NikonCustom::SettingsD5000 = (
7626             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
7627             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
7628             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7629             WRITABLE => 1,
7630             FIRST_ENTRY => 0,
7631             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7632             NOTES => 'Custom settings for the D5000.',
7633             # Missing/Incomplete settings:
7634             # CSd7 - LiveViewDisplayOptions [couldn't find in data - try again with live view shots]
7635             0.1 => { # CSa1
7636             Name => 'AFAreaModeSetting',
7637             Mask => 0x60,
7638             PrintConv => {
7639             0 => 'Single Area',
7640             1 => 'Dynamic Area',
7641             2 => 'Auto-area',
7642             3 => '3D-tracking (11 points)',
7643             },
7644             },
7645             0.2 => { # CSa2
7646             Name => 'AFAssist',
7647             Mask => 0x01,
7648             PrintConv => \%onOff,
7649             },
7650             2.1 => { # CSd1
7651             Name => 'Beep',
7652             Mask => 0xc0,
7653             PrintConv => {
7654             0 => 'Off',
7655             1 => 'Low',
7656             2 => 'High',
7657             },
7658             },
7659             2.2 => { # CSd2
7660             Name => 'GridDisplay',
7661             Mask => 0x02,
7662             PrintConv => \%onOff,
7663             },
7664             2.3 => { # CSd3
7665             Name => 'ISODisplay',
7666             Mask => 0x08,
7667             PrintConv => \%onOff,
7668             },
7669             2.4 => { # CSf4
7670             Name => 'NoMemoryCard',
7671             Mask => 0x20,
7672             PrintConv => {
7673             0 => 'Release Locked',
7674             1 => 'Enable Release',
7675             },
7676             },
7677             3.1 => { # CSd4
7678             Name => 'FileNumberSequence',
7679             Mask => 0x08,
7680             PrintConv => \%onOff,
7681             },
7682             4.1 => { # CSa4
7683             Name => 'RangeFinder',
7684             Mask => 0x10,
7685             PrintConv => \%offOn,
7686             },
7687             4.2 => { # CSd6
7688             Name => 'DateImprint',
7689             Mask => 0x08,
7690             PrintConv => \%offOn,
7691             },
7692             4.3 => { # CSf5
7693             Name => 'ReverseIndicators',
7694             Mask => 0x80,
7695             PrintConv => {
7696             0 => '+ 0 -',
7697             1 => '- 0 +',
7698             },
7699             },
7700             5.1 => { # CSb1
7701             Name => 'EVStepSize',
7702             Mask => 0x40,
7703             PrintConv => {
7704             0 => '1/3 EV',
7705             1 => '1/2 EV',
7706             },
7707             },
7708             9.1 => { # CSd5
7709             Name => 'ExposureDelayMode',
7710             Mask => 0x40,
7711             PrintConv => \%offOn,
7712             },
7713             11.1 => { # CSe2
7714             Name => 'AutoBracketSet',
7715             Mask => 0xc0,
7716             PrintConv => {
7717             0 => 'Exposure',
7718             # (NOTE: the following are reversed in the D5100 -- is this correct?)
7719             1 => 'Active D-Lighting', #(NC)
7720             2 => 'WB Bracketing',
7721             },
7722             },
7723             12.1 => { # CSf1
7724             Name => 'TimerFunctionButton',
7725             Mask => 0x38,
7726             PrintConv => {
7727             0 => 'Self-timer',
7728             1 => 'Release Mode',
7729             2 => 'Image Quality/Size', #(NC)
7730             3 => 'ISO', #(NC)
7731             4 => 'White Balance', #(NC)
7732             5 => 'Active D-Lighting', #(NC)
7733             6 => '+ NEF (RAW)',
7734             7 => 'Auto Bracketing',
7735             },
7736             },
7737             15.1 => { # CSf2
7738             Name => 'AELockButton',
7739             Mask => 0x38,
7740             PrintConv => {
7741             0 => 'AE/AF Lock',
7742             1 => 'AE Lock Only', #(NC)
7743             2 => 'AF Lock Only', #(NC)
7744             3 => 'AE Lock (hold)',
7745             4 => 'AF-ON',
7746             },
7747             },
7748             16.1 => { # CSc1
7749             Name => 'ShutterReleaseButtonAE-L',
7750             Mask => 0x02,
7751             PrintConv => \%offOn,
7752             },
7753             16.2 => { # CSf3
7754             Name => 'CommandDialsReverseRotation',
7755             Mask => 0x80,
7756             PrintConv => \%noYes,
7757             },
7758             17.1 => { # CSc2-c
7759             Name => 'MeteringTime',
7760             Mask => 0x70,
7761             PrintConv => {
7762             0 => '4 s',
7763             1 => '8 s',
7764             2 => '20 s',
7765             3 => '1 min',
7766             4 => '30 min',
7767             },
7768             },
7769             17.2 => { # CSc4
7770             Name => 'RemoteOnDuration',
7771             Mask => 0x03,
7772             PrintConv => {
7773             0 => '1 min',
7774             1 => '5 min',
7775             2 => '10 min',
7776             3 => '15 min',
7777             },
7778             },
7779             18.1 => { # CSc3-a
7780             Name => 'SelfTimerTime',
7781             Mask => 0xc0,
7782             PrintConv => {
7783             0 => '2 s',
7784             1 => '5 s',
7785             2 => '10 s',
7786             3 => '20 s',
7787             },
7788             },
7789             18.2 => { # CSc3-b
7790             Name => 'SelfTimerShotCount',
7791             Mask => 0x1e,
7792             },
7793             19.1 => { # CSc2-b
7794             Name => 'ImageReviewTime',
7795             Mask => 0xe0,
7796             PrintConv => {
7797             0 => '4 s',
7798             1 => '8 s',
7799             2 => '20 s',
7800             3 => '1 min',
7801             4 => '10 min',
7802             },
7803             },
7804             20.1 => { # CSc2-a
7805             Name => 'PlaybackMenusTime',
7806             Mask => 0xe0,
7807             PrintConv => {
7808             0 => '8 s',
7809             1 => '12 s',
7810             2 => '20 s',
7811             3 => '1 min',
7812             4 => '10 min',
7813             },
7814             },
7815             22.1 => { # CSe1-a
7816             Name => 'InternalFlash',
7817             Mask => 0xc0,
7818             PrintConv => {
7819             0 => 'TTL',
7820             1 => 'Manual',
7821             },
7822             },
7823             22.2 => { # CSe1-b
7824             Name => 'ManualFlashOutput',
7825             Mask => 0x1f,
7826             ValueConv => '2 ** (-$val/3)',
7827             ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
7828             PrintConv => q{
7829             return 'Full' if $val > 0.99;
7830             Image::ExifTool::Exif::PrintExposureTime($val);
7831             },
7832             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
7833             },
7834             32.1 => { # CSa3
7835             Name => 'LiveViewAF',
7836             Mask => 0x60,
7837             PrintConv => {
7838             0 => 'Face Priority',
7839             1 => 'Wide Area',
7840             2 => 'Normal Area',
7841             3 => 'Subject Tracking',
7842             },
7843             },
7844             );
7845              
7846             # D5100 custom settings (ref PH)
7847             %Image::ExifTool::NikonCustom::SettingsD5100 = (
7848             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
7849             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
7850             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
7851             WRITABLE => 1,
7852             FIRST_ENTRY => 0,
7853             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
7854             NOTES => 'Custom settings for the D5100.',
7855             0.1 => { # CSa1
7856             Name => 'AF-CPrioritySelection',
7857             Mask => 0x80,
7858             PrintConv => {
7859             0 => 'Release',
7860             1 => 'Focus',
7861             },
7862             },
7863             1.1 => { # CSa2
7864             Name => 'AFAssist',
7865             Mask => 0x01,
7866             PrintConv => \%onOff,
7867             },
7868             3.1 => { # CSd1
7869             Name => 'Beep',
7870             Mask => 0xc0,
7871             PrintConv => {
7872             0 => 'Off',
7873             1 => 'Low',
7874             2 => 'High',
7875             },
7876             },
7877             3.2 => { # CSf4
7878             Name => 'NoMemoryCard',
7879             Mask => 0x20,
7880             PrintConv => {
7881             0 => 'Release Locked',
7882             1 => 'Enable Release',
7883             },
7884             },
7885             3.3 => { # CSd2
7886             Name => 'ISODisplay',
7887             Mask => 0x08,
7888             PrintConv => \%onOff,
7889             },
7890             4.1 => { # CSd3
7891             Name => 'FileNumberSequence',
7892             Mask => 0x08,
7893             PrintConv => \%onOff,
7894             },
7895             5.1 => { # CSa3
7896             Name => 'RangeFinder',
7897             Mask => 0x10,
7898             PrintConv => \%offOn,
7899             },
7900             # (it looks like CSd5 DateImprint is not stored)
7901             5.2 => { # CSf5
7902             Name => 'ReverseIndicators',
7903             Mask => 0x80,
7904             PrintConv => {
7905             0 => '+ 0 -',
7906             1 => '- 0 +',
7907             },
7908             },
7909             6.1 => { # CSb1
7910             Name => 'EVStepSize',
7911             Mask => 0x40,
7912             PrintConv => {
7913             0 => '1/3 EV',
7914             1 => '1/2 EV',
7915             },
7916             },
7917             10.1 => { # CSd4
7918             Name => 'ExposureDelayMode',
7919             Mask => 0x40,
7920             PrintConv => \%offOn,
7921             },
7922             12.1 => { # CSe2
7923             Name => 'AutoBracketSet',
7924             Mask => 0xc0,
7925             PrintConv => {
7926             0 => 'Exposure',
7927             # (NOTE: the following are reversed from the D5000 -- is D5000 correct?)
7928             1 => 'WB Bracketing',
7929             2 => 'Active D-Lighting',
7930             },
7931             },
7932             13.1 => { # CSf1
7933             Name => 'TimerFunctionButton',
7934             Mask => 0x38,
7935             PrintConv => {
7936             0 => 'Self-timer',
7937             1 => 'Release Mode',
7938             2 => 'Image Quality/Size',
7939             3 => 'ISO',
7940             4 => 'White Balance',
7941             5 => 'Active D-Lighting',
7942             6 => '+ NEF (RAW)',
7943             7 => 'Auto Bracketing',
7944             },
7945             },
7946             16.1 => { # CSf2
7947             Name => 'AELockButton',
7948             Mask => 0x38,
7949             PrintConv => {
7950             0 => 'AE/AF Lock',
7951             1 => 'AE Lock Only',
7952             2 => 'AF Lock Only',
7953             3 => 'AE Lock (hold)',
7954             4 => 'AF-ON',
7955             },
7956             },
7957             17.1 => { # CSc1
7958             Name => 'ShutterReleaseButtonAE-L',
7959             Mask => 0x02,
7960             PrintConv => \%offOn,
7961             },
7962             17.2 => { # CSf3
7963             Name => 'CommandDialsReverseRotation',
7964             Mask => 0x80,
7965             PrintConv => \%noYes,
7966             },
7967             18.1 => { # CSc2-d
7968             Name => 'MeteringTime',
7969             Mask => 0x70,
7970             PrintConv => {
7971             0 => '4 s',
7972             1 => '8 s',
7973             2 => '20 s', #(NC)
7974             3 => '1 min',
7975             4 => '30 min', #(NC)
7976             },
7977             },
7978             18.2 => { # CSc4
7979             Name => 'RemoteOnDuration',
7980             Mask => 0x03,
7981             PrintConv => {
7982             0 => '1 min',
7983             1 => '5 min',
7984             2 => '10 min', #(NC)
7985             3 => '20 min', # (but picture in manual shows 15 min)
7986             },
7987             },
7988             19.1 => { # CSc3-a
7989             Name => 'SelfTimerTime',
7990             Mask => 0xc0,
7991             PrintConv => {
7992             0 => '2 s',
7993             1 => '5 s',
7994             2 => '10 s',
7995             3 => '20 s',
7996             },
7997             },
7998             19.2 => { # CSc3-b
7999             Name => 'SelfTimerShotCount',
8000             Mask => 0x0f,
8001             },
8002             20.1 => { # CSc2-b
8003             Name => 'ImageReviewTime',
8004             Mask => 0xe0,
8005             PrintConv => {
8006             0 => '4 s',
8007             1 => '8 s', #(NC)
8008             2 => '20 s',
8009             3 => '1 min', #(NC)
8010             4 => '10 min', #(NC)
8011             },
8012             },
8013             20.2 => { # CSc2-c
8014             Name => 'LiveViewMonitorOffTime',
8015             Mask => 0x1c,
8016             PrintConv => {
8017             0 => '3 min',
8018             1 => '5 min', #(NC)
8019             2 => '10 min',
8020             3 => '15 min', #(NC)
8021             4 => '20 min', #(NC)
8022             5 => '30 min', #(NC)
8023             },
8024             },
8025             21.1 => { # CSc2-a
8026             Name => 'PlaybackMenusTime',
8027             Mask => 0xe0,
8028             PrintConv => {
8029             0 => '8 s', #(NC)
8030             1 => '12 s',
8031             2 => '20 s',
8032             3 => '1 min',
8033             4 => '10 min', #(NC)
8034             },
8035             },
8036             23.1 => { # CSe1-a
8037             Name => 'InternalFlash',
8038             Mask => 0xc0,
8039             PrintConv => {
8040             0 => 'TTL',
8041             1 => 'Manual',
8042             },
8043             },
8044             23.1 => { # CSe1-b
8045             Name => 'ManualFlashOutput',
8046             Mask => 0x1f,
8047             ValueConv => '2 ** (-$val/3)',
8048             ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
8049             PrintConv => q{
8050             return 'Full' if $val > 0.99;
8051             Image::ExifTool::Exif::PrintExposureTime($val);
8052             },
8053             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
8054             },
8055             );
8056              
8057             # D5200 custom settings (ref PH)
8058             %Image::ExifTool::NikonCustom::SettingsD5200 = (
8059             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
8060             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
8061             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
8062             WRITABLE => 1,
8063             FIRST_ENTRY => 0,
8064             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8065             NOTES => 'Custom settings for the D5200.',
8066             0.1 => { # CSa1
8067             Name => 'AF-CPrioritySelection',
8068             Mask => 0x80,
8069             PrintConv => {
8070             0 => 'Release',
8071             1 => 'Focus',
8072             },
8073             },
8074             0.2 => { # CSa2
8075             Name => 'NumberOfFocusPoints',
8076             Mask => 0x10,
8077             PrintConv => {
8078             0 => '39 Points',
8079             1 => '11 Points',
8080             },
8081             },
8082             1.1 => { # CSa3
8083             Name => 'AFAssist',
8084             Mask => 0x01,
8085             PrintConv => \%onOff,
8086             },
8087             3.1 => { # CSd1
8088             Name => 'Beep',
8089             Mask => 0xc0,
8090             PrintConv => {
8091             0 => 'Off',
8092             1 => 'Low',
8093             2 => 'High',
8094             },
8095             },
8096             3.2 => { # CSf4
8097             Name => 'NoMemoryCard',
8098             Mask => 0x20,
8099             PrintConv => {
8100             0 => 'Release Locked',
8101             1 => 'Enable Release',
8102             },
8103             },
8104             3.3 => { # CSd3
8105             Name => 'ISODisplay',
8106             Mask => 0x08,
8107             PrintConv => \%onOff,
8108             },
8109             4.1 => { # CSd3
8110             Name => 'FileNumberSequence',
8111             Mask => 0x08,
8112             PrintConv => \%onOff,
8113             },
8114             5.1 => { # CSa4
8115             Name => 'RangeFinder',
8116             Mask => 0x04,
8117             PrintConv => \%offOn,
8118             },
8119             5.2 => { # CSf3-a
8120             Name => 'ReverseExposureCompDial',
8121             Mask => 0x10,
8122             PrintConv => \%noYes,
8123             },
8124             5.3 => { # CSf3-b
8125             Name => 'ReverseShutterSpeedAperture',
8126             Mask => 0x08,
8127             PrintConv => \%noYes,
8128             },
8129             5.4 => { # CSf5
8130             Name => 'ReverseIndicators',
8131             Mask => 0x80,
8132             PrintConv => {
8133             0 => '+ 0 -',
8134             1 => '- 0 +',
8135             },
8136             },
8137             6.1 => { # CSb1
8138             Name => 'EVStepSize',
8139             Mask => 0x40, # (bit 0x04 also changes)
8140             PrintConv => {
8141             0 => '1/3 EV',
8142             1 => '1/2 EV',
8143             },
8144             },
8145             10.1 => { # CSd5
8146             Name => 'ExposureDelayMode',
8147             Mask => 0x40,
8148             PrintConv => { 0 => 'Off', 1 => 'On' },
8149             },
8150             12.1 => { # CSe2
8151             Name => 'AutoBracketSet',
8152             Mask => 0xc0,
8153             PrintConv => {
8154             0 => 'Exposure',
8155             # (NOTE: the following are reversed from the D5000 -- is D5000 correct?)
8156             1 => 'WB Bracketing',
8157             2 => 'Active D-Lighting',
8158             },
8159             },
8160             13.1 => { # CSf1
8161             Name => 'FunctionButton',
8162             Mask => 0x1f,
8163             PrintConv => {
8164             3 => 'AE/AF Lock',
8165             4 => 'AE Lock Only',
8166             6 => 'AE Lock (hold)',
8167             7 => 'AF Lock Only',
8168             8 => 'AF-ON',
8169             16 => '+ NEF (RAW)',
8170             18 => 'Active D-Lighting',
8171             25 => 'Live View',
8172             26 => 'Image Quality',
8173             27 => 'ISO',
8174             28 => 'White Balance',
8175             29 => 'HDR',
8176             30 => 'Auto Bracketing',
8177             31 => 'AF-area Mode',
8178             },
8179             },
8180             16.1 => { # CSf2
8181             Name => 'AELockButton',
8182             Mask => 0x0f,
8183             PrintConv => {
8184             3 => 'AE/AF Lock',
8185             4 => 'AE Lock Only',
8186             6 => 'AE Lock (hold)',
8187             7 => 'AF Lock Only',
8188             8 => 'AF-ON',
8189             },
8190             },
8191             17.1 => { # CSc1
8192             Name => 'ShutterReleaseButtonAE-L',
8193             Mask => 0x02,
8194             PrintConv => \%offOn,
8195             },
8196             18.1 => { # CSc2-d
8197             Name => 'StandbyTimer',
8198             Mask => 0xe0,
8199             PrintConv => {
8200             0 => '4 s',
8201             1 => '8 s',
8202             2 => '20 s',
8203             3 => '1 min',
8204             4 => '30 min',
8205             },
8206             },
8207             18.2 => { # CSc4
8208             Name => 'RemoteOnDuration',
8209             Mask => 0x03,
8210             PrintConv => {
8211             0 => '1 min',
8212             1 => '5 min',
8213             2 => '10 min',
8214             3 => '15 min',
8215             },
8216             },
8217             19.1 => { # CSc3-a
8218             Name => 'SelfTimerTime',
8219             Mask => 0xc0,
8220             PrintConv => {
8221             0 => '2 s',
8222             1 => '5 s',
8223             2 => '10 s',
8224             3 => '20 s',
8225             },
8226             },
8227             19.2 => { # CSc3-b
8228             Name => 'SelfTimerShotCount',
8229             Mask => 0x0f,
8230             },
8231             20.1 => { # CSc2-b
8232             Name => 'ImageReviewTime',
8233             Mask => 0xe0,
8234             PrintConv => {
8235             1 => '4 s',
8236             2 => '8 s',
8237             4 => '20 s',
8238             5 => '1 min',
8239             7 => '10 min',
8240             },
8241             },
8242             20.2 => { # CSc2-c
8243             Name => 'LiveViewMonitorOffTime',
8244             Mask => 0x1c,
8245             PrintConv => {
8246             1 => '5 min',
8247             2 => '10 min',
8248             3 => '15 min',
8249             4 => '20 min',
8250             5 => '30 min',
8251             },
8252             },
8253             21.1 => { # CSc2-a
8254             Name => 'PlaybackMenusTime',
8255             Mask => 0xe0,
8256             PrintConv => {
8257             1 => '8 s',
8258             4 => '20 s',
8259             5 => '1 min',
8260             6 => '5 min',
8261             7 => '10 min',
8262             },
8263             },
8264             23.1 => { # CSe1-a
8265             Name => 'InternalFlash',
8266             Mask => 0xc0,
8267             PrintConv => {
8268             0 => 'TTL',
8269             1 => 'Manual',
8270             },
8271             },
8272             23.2 => { # CSe1-b
8273             Name => 'ManualFlashOutput',
8274             Mask => 0x1f,
8275             ValueConv => '2 ** (-$val/3)',
8276             ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
8277             PrintConv => q{
8278             return 'Full' if $val > 0.99;
8279             Image::ExifTool::Exif::PrintExposureTime($val);
8280             },
8281             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
8282             },
8283             );
8284              
8285             # D7000 custom settings (ref 2)
8286             %Image::ExifTool::NikonCustom::SettingsD7000 = (
8287             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
8288             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
8289             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
8290             WRITABLE => 1,
8291             FIRST_ENTRY => 0,
8292             DATAMEMBER => [ 23.1 ],
8293             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8294             NOTES => 'Custom settings for the D7000.',
8295             0.1 => { # CSa1
8296             Name => 'AF-CPrioritySelection',
8297             Mask => 0x80,
8298             PrintConv => {
8299             0 => 'Release',
8300             1 => 'Focus',
8301             },
8302             },
8303             0.2 => { # CSa2
8304             Name => 'AF-SPrioritySelection',
8305             Mask => 0x20,
8306             PrintConv => {
8307             0 => 'Focus',
8308             1 => 'Release',
8309             },
8310             },
8311             0.3 => { # CSa6
8312             Name => 'NumberOfFocusPoints',
8313             Mask => 0x10,
8314             PrintConv => {
8315             0 => '39 Points',
8316             1 => '11 Points',
8317             },
8318             },
8319             0.4 => { # CSa3
8320             Name => 'FocusTrackingLockOn',
8321             Mask => 0x07,
8322             PrintConv => {
8323             0 => 'Off',
8324             1 => '1 Short',
8325             2 => '2',
8326             3 => '3 Normal',
8327             4 => '4',
8328             5 => '5 Long',
8329             },
8330             },
8331             1.1 => { # CSa5
8332             Name => 'FocusPointWrap',
8333             Mask => 0x08,
8334             PrintConv => {
8335             0 => 'No Wrap',
8336             1 => 'Wrap',
8337             },
8338             },
8339             1.2 => { # CSa4
8340             Name => 'AFPointIllumination',
8341             Mask => 0x06,
8342             PrintConv => {
8343             0 => 'Auto',
8344             1 => 'On',
8345             2 => 'Off',
8346             },
8347             },
8348             1.3 => { # CSa7
8349             Name => 'AFAssist',
8350             Mask => 0x01,
8351             PrintConv => \%onOff,
8352             },
8353             2.1 => { # CSd14
8354             Name => 'BatteryOrder',
8355             Mask => 0x40,
8356             PrintConv => {
8357             0 => 'MB-D11 First',
8358             1 => 'Camera Battery First',
8359             },
8360             },
8361             2.2 => { # CSa10
8362             Name => 'AF-OnForMB-D11',
8363             Mask => 0x1c,
8364             PrintConv => {
8365             0 => 'AE/AF Lock',
8366             1 => 'AE Lock Only',
8367             2 => 'AF Lock Only',
8368             3 => 'AE Lock (hold)',
8369             4 => 'AF-ON',
8370             5 => 'FV Lock',
8371             6 => 'Same as FUNC Button',
8372             },
8373             },
8374             2.3 => { # CSd13
8375             Name => 'MB-D11BatteryType',
8376             Mask => 0x03,
8377             PrintConv => {
8378             0 => 'LR6 (AA alkaline)',
8379             1 => 'Ni-MH (AA Ni-MH)',
8380             2 => 'FR6 (AA lithium)',
8381             },
8382             },
8383             3.1 => { # CSd1-b
8384             Name => 'BeepPitch',
8385             Mask => 0xc0,
8386             PrintConv => {
8387             0 => 'Off',
8388             1 => 'Low',
8389             2 => 'High',
8390             },
8391             },
8392             3.2 => { # CSf8
8393             Name => 'NoMemoryCard',
8394             Mask => 0x20,
8395             PrintConv => {
8396             0 => 'Release Locked',
8397             1 => 'Enable Release',
8398             },
8399             },
8400             3.3 => { # CSd3
8401             Name => 'ISODisplay',
8402             Mask => 0x0c,
8403             PrintConv => {
8404             0 => 'Show ISO/Easy ISO',
8405             1 => 'Show ISO Sensitivity',
8406             3 => 'Show Frame Count',
8407             },
8408             },
8409             3.4 => { # CSd2
8410             Name => 'GridDisplay',
8411             Mask => 0x02,
8412             PrintConv => \%onOff,
8413             },
8414             3.5 => { # CSd4
8415             Name => 'ViewfinderWarning',
8416             Mask => 0x01,
8417             PrintConv => \%onOff,
8418             },
8419             4.1 => { # CSd9
8420             Name => 'ShootingInfoDisplay',
8421             Mask => 0xc0,
8422             PrintConv => {
8423             0 => 'Auto',
8424             2 => 'Manual (dark on light)',
8425             3 => 'Manual (light on dark)',
8426             },
8427             },
8428             4.2 => { # CSd10
8429             Name => 'LCDIllumination',
8430             Mask => 0x20,
8431             PrintConv => \%offOn,
8432             },
8433             4.3 => { # CSd8
8434             Name => 'FileNumberSequence',
8435             Mask => 0x08,
8436             PrintConv => \%onOff,
8437             },
8438             4.4 => { # CSd5
8439             Name => 'ScreenTips',
8440             Mask => 0x04,
8441             PrintConv => \%offOn,
8442             },
8443             4.5 => { # CSd1-a
8444             Name => 'BeepVolume',
8445             Mask => 0x03,
8446             PrintConv => {
8447             0 => 'Off',
8448             1 => '1',
8449             2 => '2',
8450             3 => '3',
8451             },
8452             },
8453             5.1 => { # CSf9
8454             Name => 'ReverseIndicators',
8455             Mask => 0x80,
8456             PrintConv => {
8457             0 => '+ 0 -',
8458             1 => '- 0 +',
8459             },
8460             },
8461             5.2 => { # CSb3
8462             Name => 'EasyExposureCompensation',
8463             Mask => 0x03,
8464             PrintConv => {
8465             0 => 'Off',
8466             1 => 'On',
8467             2 => 'On Auto Reset',
8468             },
8469             },
8470             6.1 => { # CSb2
8471             Name => 'ExposureControlStep',
8472             Mask => 0x40,
8473             PrintConv => {
8474             0 => '1/3 EV',
8475             1 => '1/2 EV',
8476             },
8477             },
8478             6.2 => { # CSb1
8479             Name => 'ISOSensitivityStep',
8480             Mask => 0x10,
8481             PrintConv => {
8482             0 => '1/3 EV',
8483             1 => '1/2 EV',
8484             },
8485             },
8486             7.1 => { # CSb4
8487             Name => 'CenterWeightedAreaSize',
8488             Mask => 0xe0,
8489             PrintConv => {
8490             0 => '6 mm',
8491             1 => '8 mm',
8492             2 => '10 mm',
8493             3 => '13 mm',
8494             4 => 'Average',
8495             },
8496             },
8497             10.1 => { # CSd11
8498             Name => 'ExposureDelayMode',
8499             Mask => 0x40,
8500             PrintConv => \%offOn,
8501             },
8502             10.2 => { # CSd6
8503             Name => 'CLModeShootingSpeed',
8504             Mask => 0x07,
8505             PrintConv => '"$val fps"',
8506             PrintConvInv => '$val=~s/\s*fps//i; $val',
8507             },
8508             11 => { # CSd7
8509             Name => 'MaxContinuousRelease',
8510             # values: 1-100
8511             },
8512             12.1 => { # CSe5
8513             Name => 'AutoBracketSet',
8514             Mask => 0xe0, #(NC)
8515             PrintConv => {
8516             0 => 'AE & Flash', # default
8517             1 => 'AE Only',
8518             2 => 'Flash Only', #(NC)
8519             3 => 'WB Bracketing', #(NC)
8520             4 => 'Active D-Lighting', #(NC)
8521             },
8522             },
8523             12.2 => { # CSe6
8524             Name => 'AutoBracketOrder',
8525             Mask => 0x10,
8526             PrintConv => {
8527             0 => '0,-,+',
8528             1 => '-,0,+',
8529             },
8530             },
8531             13.1 => { # CSf3
8532             Name => 'FuncButton',
8533             Mask => 0xf8,
8534             PrintConv => {
8535             0 => 'Grid Display',
8536             1 => 'FV Lock',
8537             2 => 'Flash Off',
8538             3 => 'Matrix Metering',
8539             4 => 'Center-weighted Metering',
8540             5 => 'Spot Metering',
8541             6 => 'My Menu Top',
8542             7 => '+ NEF (RAW)',
8543             8 => 'Active D-Lighting',
8544             9 => 'Preview',
8545             10 => 'AE/AF Lock',
8546             11 => 'AE Lock Only',
8547             12 => 'AF Lock Only',
8548             13 => 'AE Lock (hold)',
8549             14 => 'Bracketing Burst',
8550             15 => 'Playback',
8551             16 => '1EV Step Speed/Aperture',
8552             17 => 'Choose Non-CPU Lens',
8553             18 => 'Virtual Horizon',
8554             19 => 'Start Movie Recording',
8555             },
8556             },
8557             14.1 => { # CSf4
8558             Name => 'PreviewButton',
8559             Mask => 0xf8,
8560             PrintConv => {
8561             0 => 'Grid Display',
8562             1 => 'FV Lock',
8563             2 => 'Flash Off',
8564             3 => 'Matrix Metering',
8565             4 => 'Center-weighted Metering',
8566             5 => 'Spot Metering',
8567             6 => 'My Menu Top',
8568             7 => '+ NEF (RAW)',
8569             8 => 'Active D-Lighting',
8570             9 => 'Preview',
8571             10 => 'AE/AF Lock',
8572             11 => 'AE Lock Only',
8573             12 => 'AF Lock Only',
8574             13 => 'AE Lock (hold)',
8575             14 => 'Bracketing Burst',
8576             15 => 'Playback',
8577             16 => '1EV Step Speed/Aperture',
8578             17 => 'Choose Non-CPU Lens',
8579             18 => 'Virtual Horizon',
8580             19 => 'Start Movie Recording',
8581             },
8582             },
8583             16.1 => { # CSf5
8584             Name => 'AELockButton',
8585             Mask => 0x38,
8586             PrintConv => {
8587             0 => 'AE/AF Lock',
8588             1 => 'AE Lock Only',
8589             2 => 'AF Lock Only',
8590             3 => 'AE Lock (hold)',
8591             4 => 'AF-ON',
8592             5 => 'FV Lock',
8593             },
8594             },
8595             15.1 => { # CSf2
8596             Name => 'OKButton',
8597             Mask => 0x18,
8598             PrintConv => {
8599             1 => 'Select Center Focus Point',
8600             2 => 'Highlight Active Focus Point',
8601             3 => 'Not Used', #(NC)
8602             0 => 'Off', #(NC)
8603             },
8604             },
8605             17.1 => { # CSf6-a
8606             Name => 'CommandDialsReverseRotation',
8607             Mask => 0x80,
8608             PrintConv => \%noYes,
8609             },
8610             17.2 => { # CSf6-b
8611             Name => 'CommandDialsChangeMainSub',
8612             Mask => 0x60,
8613             PrintConv => {
8614             0 => 'Off',
8615             1 => 'On',
8616             2 => 'On (A mode only)',
8617             },
8618             },
8619             17.3 => { # CSf6-c
8620             Name => 'CommandDialsApertureSetting',
8621             Mask => 0x04,
8622             PrintConv => {
8623             0 => 'Sub-command Dial',
8624             1 => 'Aperture Ring',
8625             },
8626             },
8627             17.4 => { # CSf6-d
8628             Name => 'CommandDialsMenuAndPlayback',
8629             Mask => 0x18,
8630             PrintConv => {
8631             0 => 'On',
8632             2 => 'On (Image Review Exclude)',
8633             1 => 'Off',
8634             },
8635             },
8636             17.5 => { # CSc1
8637             Name => 'ShutterReleaseButtonAE-L',
8638             Mask => 0x02,
8639             PrintConv => \%offOn,
8640             },
8641             17.6 => { # CSf7
8642             Name => 'ReleaseButtonToUseDial',
8643             Mask => 0x01,
8644             PrintConv => \%noYes,
8645             },
8646             18.1 => { # CSc2
8647             Name => 'MeteringTime',
8648             Mask => 0xf0,
8649             PrintConvColumns => 2,
8650             PrintConv => {
8651             0 => '4 s',
8652             1 => '6 s', # default
8653             2 => '8 s',
8654             3 => '16 s',
8655             4 => '30 s',
8656             5 => '1 min',
8657             6 => '5 min',
8658             7 => '10 min',
8659             8 => '30 min',
8660             9 => 'No Limit',
8661             },
8662             },
8663             18.2 => { # CSc5
8664             Name => 'RemoteOnDuration',
8665             Mask => 0x03,
8666             PrintConv => {
8667             0 => '1 min',
8668             1 => '5 min',
8669             2 => '10 min',
8670             3 => '15 min',
8671             },
8672             },
8673             19.1 => { # CSc3-a
8674             Name => 'SelfTimerTime',
8675             Mask => 0xc0,
8676             PrintConv => {
8677             0 => '2 s',
8678             1 => '5 s',
8679             2 => '10 s', # default
8680             3 => '20 s',
8681             },
8682             },
8683             19.2 => { # CSc3-c
8684             Name => 'SelfTimerInterval',
8685             Mask => 0x30,
8686             PrintConv => {
8687             0 => '0.5 s',
8688             1 => '1 s',
8689             2 => '2 s', # default
8690             3 => '3 s',
8691             },
8692             },
8693             19.3 => { # CSc3-b
8694             Name => 'SelfTimerShotCount',
8695             Mask => 0x0f,
8696             },
8697             20.1 => { # CSc4-d
8698             Name => 'ImageReviewTime',
8699             Mask => 0xe0,
8700             PrintConv => { #(NC)
8701             0 => '4 s',
8702             1 => '10 s', # default
8703             2 => '20 s',
8704             3 => '1 min',
8705             4 => '5 min',
8706             5 => '10 min',
8707             },
8708             },
8709             20.2 => { # CSc4-e
8710             Name => 'LiveViewMonitorOffTime',
8711             Mask => 0x1c,
8712             PrintConv => { #(NC)
8713             0 => '4 s',
8714             1 => '10 s', # default
8715             2 => '20 s',
8716             3 => '1 min',
8717             4 => '5 min',
8718             5 => '10 min',
8719             },
8720             },
8721             21.1 => { # CSc4-b
8722             Name => 'MenuMonitorOffTime',
8723             Mask => 0xe0,
8724             PrintConv => {
8725             0 => '4 s',
8726             1 => '10 s', # default
8727             2 => '20 s',
8728             3 => '1 min',
8729             4 => '5 min',
8730             5 => '10 min',
8731             },
8732             },
8733             21.2 => { # CSc4-c
8734             Name => 'ShootingInfoMonitorOffTime',
8735             Mask => 0x1c,
8736             PrintConv => { #(NC)
8737             0 => '4 s',
8738             1 => '10 s', # default
8739             2 => '20 s',
8740             3 => '1 min',
8741             4 => '5 min',
8742             5 => '10 min',
8743             },
8744             },
8745             22.1 => { # CSe1
8746             Name => 'FlashSyncSpeed',
8747             Mask => 0xf0,
8748             PrintConv => {
8749             0 => '1/320 s (auto FP)',
8750             1 => '1/250 s (auto FP)',
8751             2 => '1/250 s',
8752             3 => '1/200 s',
8753             4 => '1/160 s',
8754             5 => '1/125 s',
8755             6 => '1/100 s',
8756             7 => '1/80 s',
8757             8 => '1/60 s',
8758             },
8759             },
8760             22.2 => { # CSe2
8761             Name => 'FlashShutterSpeed',
8762             Mask => 0x0f,
8763             PrintConvColumns => 2,
8764             PrintConv => {
8765             0 => '1/60 s',
8766             1 => '1/30 s',
8767             2 => '1/15 s',
8768             3 => '1/8 s',
8769             4 => '1/4 s',
8770             5 => '1/2 s',
8771             6 => '1 s',
8772             7 => '2 s',
8773             8 => '4 s',
8774             9 => '8 s',
8775             10 => '15 s',
8776             11 => '30 s',
8777             },
8778             },
8779             23.1 => { # CSe3
8780             Name => 'FlashControlBuilt-in',
8781             Mask => 0xc0,
8782             RawConv => '$$self{FlashControlBuiltin} = $val',
8783             PrintConv => {
8784             0 => 'TTL',
8785             1 => 'Manual',
8786             2 => 'Repeating Flash',
8787             3 => 'Commander Mode',
8788             },
8789             },
8790             23.2 => { # CSe3-b
8791             Name => 'ManualFlashOutput',
8792             Condition => '$$self{FlashControlBuiltin} == 1',
8793             Mask => 0x1f,
8794             ValueConv => '2 ** (-$val/3)',
8795             ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
8796             PrintConv => q{
8797             return 'Full' if $val > 0.99;
8798             Image::ExifTool::Exif::PrintExposureTime($val);
8799             },
8800             PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
8801             },
8802             24.1 => { # CSe3-ca
8803             Name => 'RepeatingFlashOutput',
8804             Condition => '$$self{FlashControlBuiltin} == 2',
8805             Mask => 0x70,
8806             ValueConv => '2 ** (-$val-2)',
8807             ValueConvInv => '$val > 0 ? int(-log($val)/log(2)-2+0.5) : 0',
8808             PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
8809             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
8810             },
8811             24.2 => { # CSe3-cb
8812             Name => 'RepeatingFlashCount',
8813             Condition => '$$self{FlashControlBuiltin} == 2',
8814             Mask => 0x0f,
8815             ValueConv => '$val < 10 ? $val + 1 : 5 * ($val - 7)',
8816             ValueConvInv => '$val <= 10 ? $val - 1 : $val / 5 + 7',
8817             },
8818             25.1 => { # CSe3-cc (NC)
8819             Name => 'RepeatingFlashRate',
8820             Condition => '$$self{FlashControlBuiltin} == 2',
8821             Mask => 0xf0,
8822             ValueConv => '$val < 10 ? $val + 1 : 10 * ($val - 8)',
8823             ValueConvInv => 'int(($val <= 10 ? $val - 1 : $val / 10 + 8) + 0.5)',
8824             PrintConv => '"$val Hz"',
8825             PrintConvInv => '$val=~/(\d+)/; $1 || 0',
8826             },
8827             26.1 => { # CSe3-da
8828             Name => 'CommanderInternalTTLCompBuiltin',
8829             Condition => '$$self{FlashControlBuiltin} == 3',
8830             Mask => 0x1f,
8831             ValueConv => '($val - 9) / 3',
8832             ValueConvInv => '$val * 3 + 9',
8833             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8834             PrintConvInv => '$val',
8835             },
8836             27.1 => { # CSe3-db
8837             Name => 'CommanderInternalTTLCompGroupA',
8838             Condition => '$$self{FlashControlBuiltin} == 3',
8839             Mask => 0x1f,
8840             ValueConv => '($val - 9) / 3',
8841             ValueConvInv => '$val * 3 + 9',
8842             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8843             PrintConvInv => '$val',
8844             },
8845             28.1 => { # CSe3-dc
8846             Name => 'CommanderInternalTTLCompGroupB',
8847             Condition => '$$self{FlashControlBuiltin} == 3',
8848             Mask => 0x1f,
8849             ValueConv => '($val - 9) / 3',
8850             ValueConvInv => '$val * 3 + 9',
8851             PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
8852             PrintConvInv => '$val',
8853             },
8854             30.1 => { # CSd11
8855             Name => 'FlashWarning',
8856             Mask => 0x80,
8857             PrintConv => \%onOff,
8858             },
8859             30.2 => { # CSe4
8860             Name => 'ModelingFlash',
8861             Mask => 0x20,
8862             PrintConv => \%onOff,
8863             },
8864             34.1 => { # CSa8-b
8865             Name => 'LiveViewAFAreaMode',
8866             Mask => 0x60,
8867             PrintConv => {
8868             0 => 'Face-Priority',
8869             1 => 'NormalArea',
8870             2 => 'WideArea',
8871             3 => 'SubjectTracking',
8872             },
8873             },
8874             34.2 => { # CSa8-a
8875             Name => 'LiveViewAFMode',
8876             Mask => 0x02,
8877             PrintConv => {
8878             0 => 'AF-C',
8879             1 => 'AF-F',
8880             },
8881             },
8882             35.1 => { # CSc4-a
8883             Name => 'PlaybackMonitorOffTime',
8884             Mask => 0xe0,
8885             PrintConv => {
8886             0 => '4 s',
8887             1 => '10 s', # default
8888             2 => '20 s',
8889             3 => '1 min',
8890             4 => '5 min',
8891             5 => '10 min',
8892             },
8893             },
8894             );
8895              
8896             # D4/D4S custom settings (ref 1, decoded from D4S)
8897             %Image::ExifTool::NikonCustom::SettingsD4 = (
8898             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
8899             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
8900             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
8901             WRITABLE => 1,
8902             FIRST_ENTRY => 0,
8903             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
8904             NOTES => 'Custom settings for the D4 and D4S.',
8905             0.1 => {
8906             Name => 'CustomSettingsBank',
8907             Mask => 0x03,
8908             PrintConv => {
8909             0 => 'A',
8910             1 => 'B',
8911             2 => 'C',
8912             3 => 'D',
8913             },
8914             },
8915             1.1 => { #CSa1
8916             Name => 'AF-CPrioritySelection',
8917             Mask => 0xc0,
8918             PrintConv => {
8919             0 => 'Release',
8920             1 => 'Release + Focus',
8921             2 => 'Focus',
8922             3 => 'Focus + Release',
8923             },
8924             },
8925             1.2 => { # CSa2
8926             Name => 'AF-SPrioritySelection',
8927             Mask => 0x20,
8928             PrintConv => {
8929             0 => 'Focus',
8930             1 => 'Release',
8931             },
8932             },
8933             1.3 => { # CSa7
8934             Name => 'AFPointSelection',
8935             Mask => 0x10,
8936             PrintConv => {
8937             0 => '51 Points',
8938             1 => '11 Points',
8939             },
8940             },
8941             1.4 => { # CSa3
8942             Name => 'FocusTrackingLockOn',
8943             Mask => 0x07,
8944             PrintConv => {
8945             0 => 'Off',
8946             1 => '1 (Short)',
8947             2 => '2',
8948             3 => '3 (Normal)',
8949             4 => '4',
8950             5 => '5 (Long)',
8951             },
8952             },
8953             2.1 => { # CSa4
8954             Name => 'AFActivation',
8955             Mask => 0x80,
8956             PrintConv => {
8957             0 => 'Shutter/AF-On',
8958             1 => 'AF-On Only',
8959             },
8960             },
8961             2.2 => { # CSa6
8962             Name => 'FocusPointWrap',
8963             Mask => 0x08,
8964             PrintConv => {
8965             0 => 'No Wrap',
8966             1 => 'Wrap',
8967             },
8968             },
8969             4.1 => { # CSd1-b
8970             Name => 'Pitch',
8971             Mask => 0x40,
8972             PrintConv => { 0 => 'High', 1 => 'Low' },
8973             },
8974             4.2 => { # CSf12
8975             Name => 'NoMemoryCard',
8976             Mask => 0x20,
8977             PrintConv => {
8978             0 => 'Release Locked',
8979             1 => 'Enable Release',
8980             },
8981             },
8982             4.3 => { # CSd6
8983             Name => 'GridDisplay',
8984             Mask => 0x02,
8985             PrintConv => \%onOff,
8986             },
8987             5.1 => { # CSd9
8988             Name => 'ShootingInfoDisplay',
8989             Mask => 0xc0,
8990             PrintConv => {
8991             # 0 - seen for D4 (PH)
8992             1 => 'Auto',
8993             2 => 'Manual (dark on light)',
8994             3 => 'Manual (light on dark)',
8995             },
8996             },
8997             5.2 => { # CSd10
8998             Name => 'LCDIllumination',
8999             Mask => 0x20,
9000             PrintConv => \%offOn,
9001             },
9002             5.3 => { # CSd8
9003             Name => 'ScreenTips',
9004             Mask => 0x04,
9005             PrintConv => \%offOn,
9006             },
9007             5.4 => { # CSd1-a
9008             Name => 'Beep',
9009             Mask => 0x03,
9010             PrintConv => {
9011             0 => 'Off',
9012             1 => 'Low',
9013             2 => 'Medium',
9014             3 => 'High',
9015             },
9016             },
9017             6.1 => { # CSf13
9018             Name => 'ReverseIndicators',
9019             Mask => 0x80,
9020             PrintConv => {
9021             0 => '+ 0 -',
9022             1 => '- 0 +',
9023             },
9024             },
9025             6.2 => { # CSd7-a
9026             Name => 'RearDisplay',
9027             Mask => 0x40,
9028             PrintConv => {
9029             0 => 'ISO',
9030             1 => 'Exposures Remaining',
9031             },
9032             },
9033             6.3 => { # CSd7-b
9034             Name => 'ViewfinderDisplay',
9035             Mask => 0x20,
9036             PrintConv => {
9037             0 => 'Frame Count',
9038             1 => 'Exposures Remaining',
9039             },
9040             },
9041             6.4 => { # CSd10-a
9042             Name => 'CommandDialsReverseRotation',
9043             Mask => 0x18,
9044             PrintConv => {
9045             0 => 'No',
9046             1 => 'Shutter Speed & Aperture',
9047             2 => 'Exposure Compensation',
9048             3 => 'Exposure Compensation, Shutter Speed & Aperture',
9049             },
9050             },
9051             6.5 => { # CSb4
9052             Name => 'EasyExposureCompensation',
9053             Mask => 0x03,
9054             PrintConv => {
9055             0 => 'Off',
9056             1 => 'On',
9057             2 => 'On (auto reset)',
9058             },
9059             },
9060             7.1 => { # CSb2
9061             Name => 'ExposureControlStepSize',
9062             Mask => 0xc0,
9063             PrintConv => {
9064             0 => '1/3 EV',
9065             1 => '1/2 EV',
9066             2 => '1 EV',
9067             },
9068             },
9069             7.2 => { # CSb1
9070             Name => 'ISOStepSize',
9071             Mask => 0x30,
9072             PrintConv => {
9073             0 => '1/3 EV',
9074             1 => '1/2 EV',
9075             2 => '1 EV',
9076             },
9077             },
9078             7.3 => { # CSb3
9079             Name => 'ExposureCompStepSize',
9080             Mask => 0x0c,
9081             PrintConv => {
9082             0 => '1/3 EV',
9083             1 => '1/2 EV',
9084             2 => '1 EV',
9085             },
9086             },
9087             8.1 => { # CSb6 (CSb5 for D4)
9088             Name => 'CenterWeightedAreaSize',
9089             Mask => 0xe0,
9090             PrintConv => {
9091             0 => '8 mm',
9092             1 => '12 mm',
9093             2 => '15 mm',
9094             3 => '20 mm',
9095             4 => 'Average',
9096             },
9097             },
9098             8.2 => { # CSb7-a
9099             Name => 'FineTuneOptMatrixMetering',
9100             Mask => 0x0f,
9101             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
9102             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
9103             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
9104             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
9105             },
9106             9.1 => { # CSb7-b
9107             Name => 'FineTuneOptCenterWeighted',
9108             Mask => 0xf0,
9109             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
9110             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
9111             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
9112             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
9113             },
9114             9.2 => { # CSb7-c
9115             Name => 'FineTuneOptSpotMetering',
9116             Mask => 0x0f,
9117             ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
9118             ValueConvInv => 'int($val*6+($val>0?0.5:-0.5))',
9119             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
9120             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
9121             },
9122             10.1 => { # CSf1-a
9123             Name => 'MultiSelectorShootMode',
9124             Mask => 0xc0,
9125             PrintConv => {
9126             0 => 'Select Center Focus Point (Reset)',
9127             2 => 'Preset Focus Point (Pre)',
9128             3 => 'Not Used (None)',
9129             },
9130             },
9131             10.2 => { # CSf1-b
9132             Name => 'MultiSelectorPlaybackMode',
9133             Mask => 0x30,
9134             PrintConv => {
9135             0 => 'Thumbnail On/Off',
9136             1 => 'View Histograms',
9137             2 => 'Zoom On/Off',
9138             3 => 'Choose Folder',
9139             },
9140             },
9141             10.3 => { # CSf2
9142             Name => 'MultiSelector',
9143             Mask => 0x01,
9144             PrintConv => {
9145             0 => 'Do Nothing',
9146             1 => 'Reset Meter-off Delay',
9147             },
9148             },
9149             11.1 => { # CSd4
9150             Name => 'ExposureDelayMode',
9151             Mask => 0xc0,
9152             PrintConv => {
9153             0 => 'Off',
9154             1 => '1 s',
9155             2 => '2 s',
9156             3 => '3 s',
9157             },
9158             },
9159             11.2 => { # CSd2-a
9160             Name => 'CHModeShootingSpeed',
9161             Mask => 0x10,
9162             PrintConv => {
9163             0 => '10 fps',
9164             1 => '11 fps',
9165             },
9166             },
9167             11.3 => { # CSd2-b
9168             Name => 'CLModeShootingSpeed',
9169             Mask => 0x0f,
9170             PrintConv => '"$val fps"',
9171             PrintConvInv => '$val=~s/\s*fps//i; $val',
9172             },
9173             12 => { # CSd3
9174             Name => 'MaxContinuousRelease',
9175             # values: 1-200
9176             },
9177             13.1 => { # CSe6
9178             Name => 'AutoBracketSet',
9179             Mask => 0xe0,
9180             PrintConv => {
9181             0 => 'AE & Flash',
9182             1 => 'AE Only',
9183             2 => 'Flash Only',
9184             3 => 'WB Bracketing',
9185             4 => 'Active D-Lighting',
9186             },
9187             },
9188             13.2 => { # CSe8
9189             Name => 'AutoBracketOrder',
9190             Mask => 0x10,
9191             PrintConv => {
9192             0 => '0,-,+',
9193             1 => '-,0,+',
9194             },
9195             },
9196             13.3 => { # CSe7
9197             Name => 'AutoBracketModeM',
9198             Mask => 0x0c,
9199             PrintConv => {
9200             0 => 'Flash/Speed',
9201             1 => 'Flash/Speed/Aperture',
9202             2 => 'Flash/Aperture',
9203             3 => 'Flash Only',
9204             },
9205             },
9206             14.1 => { # CSf3-a
9207             Name => 'FuncButton',
9208             Mask => 0xf8,
9209             PrintConv => {
9210             0 => 'None',
9211             1 => 'Preview',
9212             2 => 'FV Lock',
9213             3 => 'AE/AF Lock',
9214             4 => 'AE Lock Only',
9215             5 => 'AE Lock (reset on release)',
9216             6 => 'AE Lock (hold)',
9217             7 => 'AF Lock Only',
9218             8 => 'AF-On',
9219             10 => 'Bracketing Burst',
9220             11 => 'Matrix Metering',
9221             12 => 'Center-weighted Metering',
9222             13 => 'Spot Metering',
9223             14 => 'Playback',
9224             15 => 'My Menu Top Item',
9225             16 => '+NEF(RAW)',
9226             17 => 'Virtual Horizon',
9227             18 => 'My Menu',
9228             20 => 'Grid Display',
9229             21 => 'Disable Synchronized Release',
9230             22 => 'Remote Release Only',
9231             26 => 'Flash Disable/Enable',
9232             },
9233             },
9234             14.2 => { # CSf3-b
9235             Name => 'FuncButtonPlusDials',
9236             Mask => 0x07,
9237             PrintConv => {
9238             0 => 'None',
9239             1 => 'Choose Image Area (FX/DX/5:4)',
9240             2 => 'Shutter Speed & Aperture Lock',
9241             3 => 'One Step Speed / Aperture',
9242             4 => 'Choose Non-CPU Lens Number',
9243             5 => 'Active D-Lighting',
9244             6 => 'Shooting Bank Menu',
9245             },
9246             },
9247             15.1 => { # CSf4-a
9248             Name => 'PreviewButton',
9249             Mask => 0xf8,
9250             PrintConv => {
9251             0 => 'None',
9252             1 => 'Preview',
9253             2 => 'FV Lock',
9254             3 => 'AE/AF Lock',
9255             4 => 'AE Lock Only',
9256             5 => 'AE Lock (reset on release)',
9257             6 => 'AE Lock (hold)',
9258             7 => 'AF Lock Only',
9259             8 => 'AF-On',
9260             10 => 'Bracketing Burst',
9261             11 => 'Matrix Metering',
9262             12 => 'Center-weighted Metering',
9263             13 => 'Spot Metering',
9264             14 => 'Playback',
9265             15 => 'My Menu Top Item',
9266             16 => '+NEF(RAW)',
9267             17 => 'Virtual Horizon',
9268             18 => 'My Menu',
9269             20 => 'Grid Display',
9270             21 => 'Disable Synchronized Release',
9271             22 => 'Remote Release Only',
9272             26 => 'Flash Disable/Enable',
9273             },
9274             },
9275             15.2 => { # CSf4-b
9276             Name => 'PreviewButtonPlusDials',
9277             Mask => 0x07,
9278             PrintConv => {
9279             0 => 'None',
9280             1 => 'Choose Image Area (FX/DX/5:4)',
9281             2 => 'Shutter Speed & Aperture Lock',
9282             3 => 'One Step Speed / Aperture',
9283             4 => 'Choose Non-CPU Lens Number',
9284             5 => 'Active D-Lighting',
9285             6 => 'Shooting Bank Menu',
9286             },
9287             },
9288             16.1 => { # CSf9
9289             Name => 'AssignBktButton',
9290             Mask => 0x07,
9291             PrintConv => {
9292             0 => 'Auto Bracketing',
9293             1 => 'Multiple Exposure',
9294             2 => 'HDR (high dynamic range)',
9295             3 => 'None',
9296             },
9297             },
9298             18.1 => { # CSf10-b
9299             Name => 'CommandDialsChangeMainSub',
9300             Mask => 0xe0,
9301             PrintConv => {
9302             0 => 'Autofocus Off, Exposure Off',
9303             1 => 'Autofocus Off, Exposure On',
9304             2 => 'Autofocus Off, Exposure On (Mode A)',
9305             4 => 'Autofocus On, Exposure Off',
9306             5 => 'Autofocus On, Exposure On',
9307             6 => 'Autofocus On, Exposure On (Mode A)',
9308             },
9309             },
9310             18.2 => { # CSf10-d
9311             Name => 'CommandDialsMenuAndPlayback',
9312             Mask => 0x18,
9313             PrintConv => {
9314             0 => 'On',
9315             1 => 'Off',
9316             2 => 'On (Image Review Excluded)',
9317             },
9318             },
9319             18.3 => { # CSf10-c
9320             Name => 'CommandDialsApertureSetting',
9321             Mask => 0x04,
9322             PrintConv => {
9323             0 => 'Sub-command Dial',
9324             1 => 'Aperture Ring',
9325             },
9326             },
9327             18.4 => { # CSc1
9328             Name => 'ShutterReleaseButtonAE-L',
9329             Mask => 0x02,
9330             PrintConv => \%offOn,
9331             },
9332             18.5 => { # CSf11
9333             Name => 'ReleaseButtonToUseDial',
9334             Mask => 0x01,
9335             PrintConv => \%noYes,
9336             },
9337             19.1 => { # CSc2
9338             Name => 'StandbyTimer',
9339             Mask => 0xf0,
9340             PrintConv => {
9341             0 => '4 s',
9342             1 => '6 s',
9343             3 => '10 s',
9344             5 => '30 s',
9345             6 => '1 min',
9346             7 => '5 min',
9347             8 => '10 min',
9348             9 => '30 min',
9349             },
9350             },
9351             20.1 => { # CSc3-a
9352             Name => 'SelfTimerTime',
9353             Mask => 0xc0,
9354             PrintConv => {
9355             0 => '2 s',
9356             1 => '5 s',
9357             2 => '10 s',
9358             3 => '20 s',
9359             },
9360             },
9361             20.2 => { # CSc3-b
9362             Name => 'SelfTimerShotCount',
9363             Mask => 0x0f,
9364             },
9365             20.3 => { # CSc3-c
9366             Name => 'SelfTimerShotInterval',
9367             Mask => 0x30,
9368             PrintConv => {
9369             0 => '0.5 s',
9370             1 => '1 s',
9371             2 => '2 s',
9372             3 => '3 s',
9373             },
9374             },
9375             21.1 => { # CSc4-d
9376             Name => 'ImageReviewMonitorOffTime',
9377             Mask => 0xe0,
9378             PrintConv => {
9379             0 => '2 s',
9380             1 => '4 s',
9381             2 => '10 s',
9382             3 => '20 s',
9383             4 => '1 min',
9384             5 => '5 min',
9385             6 => '10 min',
9386              
9387             },
9388             },
9389             21.2 => { # CSc4-e
9390             Name => 'LiveViewMonitorOffTime',
9391             Mask => 0x1c,
9392             PrintConv => {
9393             0 => '5 min',
9394             1 => '10 min',
9395             2 => '15 min',
9396             3 => '20 min',
9397             4 => '30 min',
9398             5 => 'No Limit',
9399             },
9400             },
9401             22.1 => { # CSc4-b
9402             Name => 'MenuMonitorOffTime',
9403             Mask => 0xe0,
9404             PrintConv => {
9405             0 => '4 s',
9406             1 => '10 s',
9407             2 => '20 s',
9408             3 => '1 min',
9409             4 => '5 min',
9410             5 => '10 min',
9411             },
9412             },
9413             22.2 => { # CSc4-c
9414             Name => 'ShootingInfoMonitorOffTime',
9415             Mask => 0x1c,
9416             PrintConv => {
9417             0 => '4 s',
9418             1 => '10 s',
9419             2 => '20 s',
9420             3 => '1 min',
9421             4 => '5 min',
9422             5 => '10 min',
9423             },
9424             },
9425             23.1 => { # CSe1
9426             Name => 'FlashSyncSpeed',
9427             Mask => 0xf0,
9428             PrintConv => {
9429             # 0x00 - seen for D4 (PH)
9430             1 => '1/250 s (auto FP)',
9431             2 => '1/250 s',
9432             3 => '1/200 s',
9433             4 => '1/160 s',
9434             5 => '1/125 s',
9435             6 => '1/100 s',
9436             7 => '1/80 s',
9437             8 => '1/60 s',
9438             },
9439             },
9440             23.2 => { # CSe2
9441             Name => 'FlashShutterSpeed',
9442             Mask => 0x0f,
9443             PrintConvColumns => 2,
9444             PrintConv => {
9445             0 => '1/60 s',
9446             1 => '1/30 s',
9447             2 => '1/15 s',
9448             3 => '1/8 s',
9449             4 => '1/4 s',
9450             5 => '1/2 s',
9451             6 => '1 s',
9452             7 => '2 s',
9453             8 => '4 s',
9454             9 => '8 s',
9455             10 => '15 s',
9456             11 => '30 s',
9457             },
9458             },
9459             31.1 => { # CSe5
9460             Name => 'ModelingFlash',
9461             Mask => 0x20,
9462             PrintConv => \%onOff,
9463             },
9464             36.1 => { # CSc4-a
9465             Name => 'PlaybackMonitorOffTime',
9466             Mask => 0xe0,
9467             PrintConv => {
9468             0 => '4 s',
9469             1 => '10 s',
9470             2 => '20 s',
9471             3 => '1 min',
9472             4 => '5 min',
9473             5 => '10 min',
9474             },
9475             },
9476             37.1 => { # CSf15
9477             Name => 'PlaybackZoom',
9478             Mask => 0x01,
9479             PrintConv => {
9480             0 => 'Use Separate Zoom Buttons',
9481             1 => 'Use Either Zoom Button with Command Dial',
9482             },
9483             },
9484             38.1 => { # CSf8-a
9485             Name => 'ShutterSpeedLock',
9486             Mask => 0x80,
9487             PrintConv => \%offOn,
9488             },
9489             38.2 => { # CSf8-b
9490             Name => 'ApertureLock',
9491             Mask => 0x40,
9492             PrintConv => \%offOn,
9493             },
9494             38.3 => { # CSg4
9495             Name => 'MovieShutterButton',
9496             Mask => 0x30,
9497             PrintConv => {
9498             0 => 'Take Photo',
9499             1 => 'Record Movies',
9500             2 => 'Live Frame Grab',
9501             },
9502             },
9503             38.4 => { # CSe4
9504             Name => 'FlashExposureCompArea',
9505             Mask => 0x04,
9506             PrintConv => {
9507             0 => 'Entire frame',
9508             1 => 'Background only',
9509             },
9510             },
9511             41.1 => { # CSg1-a
9512             Name => 'MovieFunctionButton',
9513             Mask => 0x70,
9514             PrintConv => {
9515             0 => 'None',
9516             1 => 'Power Aperture (open)', # bit '02' is also toggled on for this setting
9517             3 => 'Index Marking',
9518             4 => 'View Photo Shooting Info',
9519             },
9520             },
9521             41.2 => { # CSg2-a
9522             Name => 'MoviePreviewButton',
9523             Mask => 0x07,
9524             PrintConv => {
9525             0 => 'None',
9526             2 => 'Power Aperture (open)', # bit '10' is also toggled on for this setting
9527             3 => 'Index Marking',
9528             4 => 'View Photo Shooting Info',
9529             },
9530             },
9531             42.1 => { # CSf14
9532             Name => 'VerticalMultiSelector',
9533             Mask => 0x60,
9534             PrintConv => {
9535             0 => 'Same as Multi-Selector with Info(U/D) & Playback(R/L)',
9536             1 => 'Same as Multi-Selector with Info(R/L) & Playback(U/D)',
9537             2 => 'Focus Point Selection',
9538             },
9539             },
9540             42.2 => { # CSf7-a
9541             Name => 'VerticalFuncButton',
9542             Mask => 0x1f,
9543             PrintConv => {
9544             0 => 'None',
9545             1 => 'Preview',
9546             2 => 'FV Lock',
9547             3 => 'AE/AF Lock',
9548             4 => 'AE Lock Only',
9549             5 => 'AE Lock (reset on release)',
9550             6 => 'AE Lock (hold)',
9551             7 => 'AF Lock Only',
9552             10 => 'Bracketing Burst',
9553             11 => 'Matrix Metering',
9554             12 => 'Center-weighted Metering',
9555             13 => 'Spot Metering',
9556             14 => 'Playback',
9557             15 => 'My Menu Top Item',
9558             16 => '+NEF(RAW)',
9559             17 => 'Virtual Horizon',
9560             18 => 'My Menu',
9561             20 => 'Grid Display',
9562             26 => 'Flash Disable/Enable',
9563             },
9564             },
9565             43.1 => { # CSf7-b
9566             Name => 'VerticalFuncButtonPlusDials',
9567             Mask => 0xf0,
9568             PrintConv => {
9569             0 => 'None',
9570             1 => 'Choose Image Area (FX/DX/5:4)',
9571             2 => 'Shutter Speed & Aperture Lock',
9572             3 => 'One Step Speed / Aperture',
9573             4 => 'Choose Non-CPU Lens Number',
9574             5 => 'Active D-Lighting',
9575             6 => 'Shooting Bank Menu',
9576             7 => 'ISO Sensitivity',
9577             8 => 'Exposure Mode',
9578             9 => 'Exposure Compensation',
9579             10 => 'Metering',
9580             },
9581             },
9582             43.2 => { # CSf16
9583             Name => 'AssignMovieRecordButton',
9584             Mask => 0x07,
9585             PrintConv => {
9586             0 => 'None',
9587             1 => 'Choose Image Area (FX/DX/5:4)',
9588             2 => 'Shutter Speed & Aperture Lock',
9589             3 => 'ISO Sensitivity',
9590             4 => 'Shooting Bank Menu',
9591             },
9592             },
9593             46.1 => { # CSa5-c
9594             Name => 'DynamicAreaAFDisplay',
9595             Mask => 0x80,
9596             PrintConv => \%offOn,
9597             },
9598             46.2 => { # CSa5-a
9599             Name => 'AFPointIllumination',
9600             Mask => 0x60,
9601             PrintConv => {
9602             0 => 'Off',
9603             1 => 'On in Continuous Shooting Modes',
9604             2 => 'On During Manual Focusing',
9605             3 => 'On in Continuous Shooting and Manual Focusing',
9606             },
9607             },
9608             46.3 => { # CSa10 (D4 is slightly different -- needs checking)
9609             Name => 'StoreByOrientation',
9610             Mask => 0x18,
9611             PrintConv => {
9612             0 => 'Off',
9613             1 => 'Focus Point',
9614             2 => 'Focus Point and AF-area mode',
9615             },
9616             },
9617             46.4 => { # CSa5-d
9618             Name => 'GroupAreaAFIllumination',
9619             Mask => 0x04,
9620             PrintConv => {
9621             0 => 'Squares',
9622             1 => 'Dots',
9623             },
9624             },
9625             46.5 => { # CSa5-b
9626             Name => 'AFPointBrightness',
9627             Mask => 0x03,
9628             PrintConv => {
9629             0 => 'Low',
9630             1 => 'Normal',
9631             2 => 'High',
9632             3 => 'Extra High',
9633             },
9634             },
9635             47.1 => { # CSa8
9636             Name => 'AFOnButton',
9637             Mask => 0x70,
9638             PrintConv => {
9639             0 => 'AF On',
9640             1 => 'AE/AF Lock',
9641             2 => 'AE Lock Only',
9642             3 => 'AE Lock (reset on release)',
9643             4 => 'AE Lock (hold)',
9644             5 => 'AF Lock Only',
9645             6 => 'None',
9646             },
9647             },
9648             47.2 => { # CSa9
9649             Name => 'VerticalAFOnButton',
9650             Mask => 0x07,
9651             PrintConv => {
9652             0 => 'Same as AF On',
9653             1 => 'AF On',
9654             2 => 'AE/AF Lock',
9655             3 => 'AE Lock Only',
9656             4 => 'AE Lock (reset on release)',
9657             5 => 'AE Lock (hold)',
9658             6 => 'AF Lock Only',
9659             7 => 'None',
9660             },
9661             },
9662             48.1 => { # CSf5
9663             Name => 'SubSelectorAssignment',
9664             Mask => 0x80,
9665             PrintConv => {
9666             0 => 'Focus Point Selection',
9667             1 => 'Same As Multi-selector',
9668             },
9669             },
9670             48.2 => { # CSg3-a
9671             Name => 'MovieSubSelectorAssignment',
9672             Mask => 0x07,
9673             PrintConv => {
9674             0 => 'None',
9675             1 => 'Index Marking',
9676             2 => 'AE/AF Lock',
9677             3 => 'AE Lock Only',
9678             4 => 'AE Lock (hold)',
9679             5 => 'AF Lock Only',
9680             6 => 'View Photo Shooting Info',
9681             },
9682             },
9683             49.1 => { # CSf6-a
9684             Name => 'SubSelector',
9685             Mask => 0xf8,
9686             PrintConv => {
9687             0 => 'None',
9688             1 => 'Preview',
9689             2 => 'FV Lock',
9690             3 => 'AE/AF Lock',
9691             4 => 'AE Lock Only',
9692             5 => 'AE Lock (reset on release)',
9693             6 => 'AE Lock (hold)',
9694             7 => 'AF Lock Only',
9695             8 => 'AF-On',
9696             # 9 - seen for D4 (PH)
9697             10 => 'Bracketing Burst',
9698             11 => 'Matrix Metering',
9699             12 => 'Center-weighted Metering',
9700             13 => 'Spot Metering',
9701             14 => 'Playback',
9702             15 => 'My Menu Top Item',
9703             16 => '+NEF(RAW)',
9704             17 => 'Virtual Horizon',
9705             18 => 'My Menu',
9706             19 => 'Reset', # value appears to be specific to this control at this time
9707             20 => 'Grid Display',
9708             21 => 'Disable Synchronized Release',
9709             22 => 'Remote Release Only',
9710             23 => 'Preview', # value appears to be specific to this control at this time
9711             26 => 'Flash Disable/Enable',
9712             },
9713             },
9714             49.2 => { # CSf6-b
9715             Name => 'SubSelectorPlusDials',
9716             Mask => 0x07,
9717             PrintConv => {
9718             # (not all values from CSf3-b/CSf4-b are available for CSf6-b)
9719             0 => 'None',
9720             1 => 'Choose Image Area (FX/DX/5:4)',
9721             2 => 'Shutter Speed & Aperture Lock',
9722             # 3 => 'One Step Speed / Aperture', # (not available)
9723             4 => 'Choose Non-CPU Lens Number',
9724             # 5 => 'Active D-Lighting', # (not available)
9725             6 => 'Shooting Bank Menu',
9726             },
9727             },
9728             50.1 => { # CSb5
9729             Name => 'MatrixMetering',
9730             Condition => '$$self{Model} =~ /\bD4S/',
9731             Notes => 'D4S only',
9732             Mask => 0x80,
9733             PrintConv => {
9734             0 => 'Face Detection On',
9735             1 => 'Face Detection Off',
9736             },
9737             },
9738             50.2 => { # CSf17
9739             Name => 'LiveViewButtonOptions',
9740             Condition => '$$self{Model} =~ /\bD4S/',
9741             Notes => 'D4S only',
9742             Mask => 0x30,
9743             PrintConv => {
9744             0 => 'Enable',
9745             1 => 'Enable (standby time active)',
9746             2 => 'Disable',
9747             },
9748             },
9749             50.3 => { # CSa12
9750             Name => 'AFModeRestrictions',
9751             Condition => '$$self{Model} =~ /\bD4S/',
9752             Notes => 'D4S only',
9753             Mask => 0x03,
9754             PrintConv => {
9755             0 => 'Off',
9756             1 => 'AF-C',
9757             2 => 'AF-S',
9758             },
9759             },
9760             51.1 => { # CSa11
9761             Name => 'LimitAFAreaModeSelection',
9762             Condition => '$$self{Model} =~ /\bD4S/',
9763             Notes => 'D4S only',
9764             Mask => 0x7e,
9765             PrintConv => {
9766             0 => 'No Restrictions',
9767             BITMASK => {
9768             0 => 'Auto-area',
9769             1 => 'Group-area',
9770             2 => '3D-tracking',
9771             3 => 'Dynamic area (51 points)',
9772             4 => 'Dynamic area (21 points)',
9773             5 => 'Dynamic area (9 points)',
9774             },
9775             },
9776             },
9777             52.1 => { # CSg1-b
9778             Name => 'MovieFunctionButtonPlusDials',
9779             Mask => 0x10,
9780             PrintConv => {
9781             0 => 'None',
9782             1 => 'Choose Image Area',
9783             },
9784             },
9785             52.2 => { # CSg2-b
9786             Name => 'MoviePreviewButtonPlusDials',
9787             Mask => 0x01,
9788             PrintConv => {
9789             0 => 'None',
9790             1 => 'Choose Image Area',
9791             },
9792             },
9793             53.1 => { # CSg3-b
9794             Name => 'MovieSubSelectorAssignmentPlusDials',
9795             Mask => 0x10,
9796             PrintConv => {
9797             0 => 'None',
9798             1 => 'Choose Image Area',
9799             },
9800             },
9801             54.1 => { # CSf18
9802             Name => 'AssignRemoteFnButton',
9803             Condition => '$$self{Model} =~ /\bD4S/',
9804             Notes => 'D4S only',
9805             Mask => 0x1f,
9806             PrintConv => {
9807             0 => 'None',
9808             1 => 'Preview',
9809             2 => 'FV Lock',
9810             3 => 'AE/AF Lock',
9811             4 => 'AE Lock Only',
9812             5 => 'AE Lock (reset on release)',
9813             7 => 'AF Lock Only',
9814             8 => 'AF-On',
9815             16 => '+NEF(RAW)',
9816             25 => 'Live View',
9817             26 => 'Flash Disable/Enable',
9818             },
9819             },
9820             55.1 => { # CSf19
9821             Name => 'LensFocusFunctionButtons',
9822             Condition => '$$self{Model} =~ /\bD4S/',
9823             Notes => 'D4S only',
9824             Mask => 0x3f,
9825             PrintConv => {
9826             3 => 'AE/AF Lock',
9827             4 => 'AE Lock Only',
9828             7 => 'AF Lock Only',
9829             21 => 'Disable Synchronized Release',
9830             22 => 'Remote Release Only',
9831             24 => 'Preset focus Point',
9832             26 => 'Flash Disable/Enable',
9833             32 => 'AF-Area Mode: Single-point AF',
9834             33 => 'AF-Area Mode: Dynamic-area AF (9 points)',
9835             34 => 'AF-Area Mode: Dynamic-area AF (21 points)',
9836             35 => 'AF-Area Mode: Dynamic-area AF (51 points)',
9837             36 => 'AF-Area Mode: Group-area AF',
9838             37 => 'AF-Area Mode: Auto area AF',
9839             },
9840             },
9841             );
9842              
9843             # Z6III custom settings (ref 1) #base at offset27 + 1255 (firmware 1.0.0)
9844             %Image::ExifTool::NikonCustom::SettingsZ6III = (
9845             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
9846             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
9847             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
9848             WRITABLE => 1,
9849             FIRST_ENTRY => 0,
9850             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
9851             NOTES => 'Custom settings for the Z6III.',
9852             DATAMEMBER => [ 189 ],
9853             3 => { # CSa1
9854             Name => 'AF-CPrioritySelection',
9855             PrintConv => {
9856             0 => 'Release',
9857             1 => 'Release + Focus',
9858             3 => 'Focus',
9859             },
9860             },
9861             5 => { Name => 'AF-SPrioritySelection', PrintConv => {0 => 'Release',1 => 'Focus'}}, #CSa2
9862             7 => { # CSa3 #when AFAreaMode is 3D-tracking, blocked shot response will be 3, regardless of this setting
9863             Name => 'BlockShotAFResponse',
9864             PrintConv => {
9865             1 => '1 (Quick)',
9866             2 => '2',
9867             3 => '3 (Normal)',
9868             4 => '4',
9869             5 => '5 (Delayed)',
9870             },
9871             },
9872             11 => { Name => 'AFPointSel',PrintConv => { 0 => 'Use All',1 => 'Use Half' }}, # CSa4
9873             13 => { # CSa5
9874             Name => 'StoreByOrientation',
9875             PrintConv => {
9876             0 => 'Off',
9877             1 => 'Focus Point',
9878             2 => 'Focus Point and AF-area mode',
9879             },
9880             },
9881             15 => { Name => 'AFActivation', PrintConv => {0 => 'AF-On Only', 1 => 'Shutter/AF-On'}}, # CSa6-a
9882             16 => { Name => 'AF-OnOutOfFocusRelease', PrintConv => {0 => 'Disable', 1 => 'Enable'}, Unknown => 1}, # CSa6-b
9883             17 => { Name => 'LimitAF-AreaModeSelPinpoint', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
9884             19 => { Name => 'LimitAF-AreaModeSelWideAF_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
9885             20 => { Name => 'LimitAF-AreaModeSelWideAF_L', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
9886             21 => { Name => 'LimitAFAreaModeSelAuto', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
9887             22 => { Name => 'FocusPointWrap', PrintConv => { 0 => 'No Wrap', 1 => 'Wrap' }, Unknown => 1 }, # CSa10
9888             23 => { Name => 'ManualFocusPointIllumination', PrintConv => {0 => 'On During Focus Point Selection Only', 1 => 'On', }, Unknown => 1 }, # CSa10a
9889             24 => { Name => 'DynamicAreaAFAssist', PrintConv => { 0 => 'Focus Point Only',1 => 'Focus and Surrounding Points',}, Unknown => 1 }, # CSa10b
9890             26 => { Name => 'AF-AssistIlluminator', PrintConv => \%offOn }, # CSa11
9891             27 => { Name => 'ManualFocusRingInAFMode', PrintConv => \%offOn }, # CSa14
9892             29 => { Name => 'ExposureControlStepSize', PrintConv => \%thirdHalfFull }, # CSb2
9893             31 => { # CSb3
9894             Name => 'EasyExposureCompensation',
9895             PrintConv => {
9896             0 => 'Off',
9897             1 => 'On',
9898             2 => 'On (auto reset)',
9899             },
9900             },
9901             33 => { # CSb5
9902             Name => 'CenterWeightedAreaSize',
9903             PrintConv => {
9904             0 => 'Standard',
9905             1 => 'Small',
9906             4 => 'Average',
9907             },
9908             },
9909             35 => { # CSb6-a
9910             Name => 'FineTuneOptMatrixMetering',
9911             Format => 'int8s',
9912             ValueConv => '$val / 6',
9913             ValueConvInv => 'int($val*6)',
9914             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
9915             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
9916             },
9917             37 => { # CSb6-b
9918             Name => 'FineTuneOptCenterWeighted',
9919             Format => 'int8s',
9920             ValueConv => '$val / 6',
9921             ValueConvInv => 'int($val*6)',
9922             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
9923             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
9924             },
9925             39 => { # CSb6-c
9926             Name => 'FineTuneOptSpotMetering',
9927             Format => 'int8s',
9928             ValueConv => '$val / 6',
9929             ValueConvInv => 'int($val*6)',
9930             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
9931             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
9932             },
9933             41 => { # CSb6-d
9934             Name => 'FineTuneOptHighlightWeighted',
9935             Format => 'int8s',
9936             ValueConv => '$val / 6',
9937             ValueConvInv => 'int($val*6)',
9938             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
9939             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
9940             },
9941             43 => { # CSc1
9942             Name => 'ShutterReleaseButtonAE-L',
9943             PrintConv => {
9944             0 => 'Off',
9945             1 => 'On (Half Press)',
9946             2 => 'On (Burst Mode)',
9947             },
9948             },
9949             45 => { # CSc2-a
9950             Name => 'SelfTimerTime',
9951             PrintConv => {
9952             0 => '2 s',
9953             1 => '5 s',
9954             2 => '10 s',
9955             3 => '20 s',
9956             },
9957             },
9958             49 => { Name => 'SelfTimerShotCount', }, # CSc2-b 1-9
9959             53 => { # CSc2-c
9960             Name => 'SelfTimerShotInterval',
9961             PrintConv => {
9962             0 => '0.5 s',
9963             1 => '1 s',
9964             2 => '2 s',
9965             3 => '3 s',
9966             },
9967             },
9968             55 => { Name => 'PlaybackMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc3-a
9969             57 => { Name => 'MenuMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc3-b
9970             59 => { Name => 'ImageReviewMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc3-d
9971             61 => { Name => 'ShootingInfoMonitorOffTime',%powerOffDelayTimesZ9 }, # CSc3-c
9972              
9973             63 => { Name => 'CLModeShootingSpeed', ValueConv => '$val + 1', ValueConvInv => '$val - 1', PrintConv => '"$val fps"', PrintConvInv => '$val=~s/\s*fps//i; $val' }, # CSd1b
9974             65 => { # CSd2 # values: 1-200 & 'No Limit'
9975             Name => 'MaxContinuousRelease',
9976             Format => 'int16s',
9977             ValueConv => '($val eq -1 ? \'No Limit\' : $val ) ',
9978             },
9979             69 => { Name => 'SyncReleaseMode', PrintConv => { 0 => 'No Sync', 1 => 'Sync' }, Unknown => 1 }, # CSd4
9980             75 => { Name => 'LimitSelectableImageAreaDX', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-1
9981             76 => { Name => 'LimitSelectableImageArea1To1', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-2
9982             77 => { Name => 'LimitSelectableImageArea16To9', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-3
9983             78 => { Name => 'FileNumberSequence', PrintConv => \%offOn }, # CSd7
9984             81 => { #CSa12b
9985             Name => 'FocusPeakingLevel',
9986             Unknown => 1,
9987             PrintConv => {
9988             0 => 'High Sensitivity',
9989             1 => 'Standard Sensitivity',
9990             2 => 'Low Sensitivity',
9991             },
9992             },
9993             83 => { #CSa12c
9994             Name => 'FocusPeakingHighlightColor',
9995             Unknown => 1,
9996             PrintConv => {
9997             0 => 'Red',
9998             1 => 'Yellow',
9999             2 => 'Blue',
10000             3 => 'White',
10001             },
10002             },
10003             85 => { Name => 'ContinuousModeDisplay', PrintConv => \%offOn }, # CSd14
10004             87 => { # CSe1-a Previous cameras reported this with HighSpeedSync indicator appended as '(Auto FP)'.
10005             Name => 'FlashSyncSpeed',
10006             ValueConv => '($val-144)/8',
10007             PrintConv => {
10008             0 => '1/60 s',
10009             1 => '1/80 s',
10010             2 => '1/100 s',
10011             3 => '1/125 s',
10012             4 => '1/160 s',
10013             5 => '1/200 s',
10014             },
10015             },
10016             89 => { Name => 'HighSpeedSync', PrintConv => \%offOn }, # CSe1-b
10017             91 => { # CSe2
10018             Name => 'FlashShutterSpeed',
10019             ValueConv => 'my $t = ($val - 16) % 24; $t ? $val / 24 : 2 + ($val - 16) / 24', #unusual decode perhaps due to need to accommodate 4 new values?
10020             PrintConv => {
10021             0 => '1 s',
10022             1 => '1/2 s',
10023             2 => '1/4 s',
10024             3 => '1/8 s',
10025             4 => '1/15 s',
10026             5 => '1/30 s',
10027             6 => '1/60 s',
10028             7 => '30 s',
10029             8 => '15 s',
10030             9 => '8 s',
10031             10 => '4 s',
10032             11 => '2 s',
10033             },
10034             },
10035             93 => { Name => 'FlashExposureCompArea', PrintConv => { 0 => 'Entire Frame', 1 => 'Background Only' } }, # CSe3
10036             95 => { Name => 'AutoFlashISOSensitivity', PrintConv => { 0 => 'Subject and Background',1 => 'Subject Only'} }, # CSe4
10037             97 => { Name => 'ModelingFlash', PrintConv => \%offOn }, # CSe5
10038             99 => { # CSe6
10039             Name => 'AutoBracketModeM',
10040             PrintConv => {
10041             0 => 'Flash/Speed',
10042             1 => 'Flash/Speed/Aperture',
10043             2 => 'Flash/Aperture',
10044             3 => 'Flash Only',
10045             4 => 'Flash/ISO',
10046             },
10047             },
10048             101 => { Name => 'AutoBracketOrder', PrintConv => { 0 => '0,-,+',1 => '-,0,+' } }, # CSe7
10049             103 => { Name => 'Func1Button', %buttonsZ6III }, # CSf2-a
10050             119 => { Name => 'Func2Button', %buttonsZ6III }, # CSf2-b
10051             135 => { Name => 'AFOnButton', %buttonsZ6III }, # CSf2-d
10052             147 => { Name => 'SubSelector', %buttonsZ6III , Unknown => 1}, # CSf2-g
10053             159 => { Name => 'AssignMovieRecordButton', %buttonsZ6III , Unknown => 1}, # CSf2-m
10054             163 => { Name => 'LensFunc1Button', %buttonsZ6III }, # CSf2-q
10055             171 => { Name => 'LensFunc2Button', %buttonsZ6III }, # CSf2-p
10056             177 => { # CSf2-u
10057             Name => 'LensControlRing',
10058             PrintConv => {
10059             0 => 'None (Disabled)',
10060             1 => 'Focus (M/A)',
10061             2 => 'ISO Sensitivity',
10062             3 => 'Exposure Compensation',
10063             4 => 'Aperture',
10064             },
10065             },
10066             179 => { Name => 'MultiSelectorShootMode', %buttonsZ6III }, # CSf2-h called the OK button in camera, tag name retained for compatibility
10067             183 => { Name => 'MultiSelectorPlaybackMode', %buttonsZ6III }, # CSf3f
10068             187 => { Name => 'ShutterSpeedLock', PrintConv => \%offOn }, # CSf5-a
10069             188 => { Name => 'ApertureLock', PrintConv => \%offOn }, # CSf5-b
10070             189 => { # CSf6-a Previous cameras reported this tag as part of CmdDialsReverseRotation. Blend with CSf5-b separate settings together to match extant tag name and values
10071             Name => 'CmdDialsReverseRotExposureComp',
10072             RawConv => '$$self{CmdDialsReverseRotExposureComp} = $val',
10073             #Hidden => 1,
10074             },
10075             190 => [{ # CSf6-b (continued from above)
10076             Name => 'CmdDialsReverseRotation',
10077             Condition => '$$self{CmdDialsReverseRotExposureComp} == 0',
10078             PrintConv => {
10079             0 => 'No',
10080             1 => 'Shutter Speed & Aperture',
10081             },
10082             },{
10083             Name => 'CmdDialsReverseRotation',
10084             PrintConv => {
10085             0 => 'Exposure Compensation',
10086             1 => 'Exposure Compensation, Shutter Speed & Aperture',
10087             },
10088             }],
10089             195 => { Name => 'UseDialWithoutHold', PrintConv => \%offOn, Unknown => 1 }, # CSf7
10090             197 => { Name => 'ReverseIndicators', PrintConv => { 0 => '+ 0 -', 1 => '- 0 +' }, Unknown => 1 }, # CSf8
10091             199 => { Name => 'MovieFunc1Button', %buttonsZ6III }, # CSg2-a
10092             205 => { Name => 'MovieFunc2Button', %buttonsZ6III }, # CSg2-b
10093             211 => { Name => 'MovieAF-OnButton', %buttonsZ6III }, # CSg2-f
10094             223 => { # CSg2-z
10095             Name => 'MovieLensControlRing',
10096             PrintConv => {
10097             0 => 'None (Disabled)',
10098             2 => 'ISO Sensitivity',
10099             3 => 'Exposure Compensation',
10100             4 => 'Power Aperture',
10101             5 => 'Hi-Res Zoom',
10102             },
10103             },
10104             225 => { Name => 'MovieMultiSelector', %buttonsZ6III, Unknown => 1}, # CSg2-h
10105             229 => { Name => 'MovieAFSpeed', ValueConv => '$val - 5', ValueConvInv => '$val + 5' }, # CSg5-a
10106             231 => { Name => 'MovieAFSpeedApply', PrintConv => {0 => 'Always', 1 => 'Only During Recording'},}, # CSg5-b
10107             233 => { # CSg6
10108             Name => 'MovieAFTrackingSensitivity',
10109             PrintConv => {
10110             0 => '1 (High)',
10111             1 => '2',
10112             2 => '3',
10113             3 => '4 (Normal)',
10114             4 => '5',
10115             5 => '6',
10116             6 => '7 (Low)',
10117             },
10118             },
10119             241 => { Name => 'LCDIllumination', PrintConv => \%offOn, Unknown => 1 }, # CSd13
10120             242 => { Name => 'ExtendedShutterSpeeds', PrintConv => \%offOn }, # CSd7
10121             245 => { Name => 'FocusPointPersistence', PrintConv => {0 => 'Auto', 1 => 'Off'} }, # CSa7
10122             257 => { Name => 'FlashBurstPriority', PrintConv => { 0 => 'Frame Rate',1 => 'Exposure'}, Unknown => 1 }, # CSe8
10123             319 => { Name => 'LimitAF-AreaModeSelDynamic_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10124             320 => { Name => 'LimitAF-AreaModeSelDynamic_M', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10125             321 => { Name => 'LimitAF-AreaModeSelDynamic_L', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10126             323 => { Name => 'LimitAF-AreaModeSel3DTracking', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10127             325 => { Name => 'PlaybackFlickUp', PrintConv => \%flicksZ9, Unknown => 1}, # CSf14-a
10128             329 => { Name => 'PlaybackFlickDown', PrintConv => \%flicksZ9, Unknown => 1}, # CSf14-b
10129             333 => { Name => 'ISOStepSize', PrintConv => \%thirdHalfFull }, # CSb1
10130             340 => { Name => 'TouchFn', PrintConv => \%offOn, Unknown => 1}, # CSf4a
10131             341 => { Name => 'TouchFnRole', %buttonsZ6III , Unknown => 1}, # CSf4b
10132             345 => { Name => 'TouchFnAreaWide', PrintConv => \%touchFnAreaZ6III, Unknown => 1}, # CSf4c-1
10133             347 => { Name => 'TouchFnAreaTall', PrintConv => \%touchFnAreaZ6III, Unknown => 1}, # CSf4c-2
10134             350 => { Name => 'EVFImageFrame', PrintConv => \%offOn, Unknown => 1 }, # CSd16
10135             351 => { Name => 'EVFGrid', PrintConv => \%evfGridsZ9, Unknown => 1 }, # CSd17
10136             353 => { Name => 'VirtualHorizonStyle', PrintConv => {0 => 'Type A (Cockpit)', 1 => 'Type B (Sides)' }, Unknown => 1}, #CSd18
10137             415 => { Name => 'Func1ButtonPlaybackMode', %buttonsZ6III , Unknown => 1}, # CSf3-a
10138             417 => { Name => 'Func2ButtonPlaybackMode', %buttonsZ6III , Unknown => 1}, # CSf3-b
10139             431 => { Name => 'MovieRecordButtonPlaybackMode', %buttonsZ6III , Unknown => 1}, # CSf3-m
10140             463 => { Name => 'ControlRingResponse', PrintConv => { 0 => 'High', 1 => 'Low' } }, # CSf11
10141             559 => { Name => 'FocusPeakingDisplay', PrintConv => \%offOn, Unknown => 1}, # CSa12a
10142             );
10143              
10144             # Z8 custom settings (ref 1) #base at offset26 + 1195 (firmware 1.0.0)
10145             %Image::ExifTool::NikonCustom::SettingsZ8 = (
10146             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
10147             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
10148             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
10149             DATAMEMBER => [ 185, 529 ],
10150             WRITABLE => 1,
10151             FIRST_ENTRY => 0,
10152             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10153             NOTES => 'Custom settings for the Z8.',
10154             1 => {
10155             Name => 'CustomSettingsBank',
10156             PrintConv => {
10157             0 => 'A',
10158             1 => 'B',
10159             2 => 'C',
10160             3 => 'D',
10161             },
10162             },
10163             3 => { # CSa1
10164             Name => 'AF-CPrioritySelection',
10165             PrintConv => {
10166             0 => 'Release',
10167             1 => 'Release + Focus',
10168             3 => 'Focus',
10169             },
10170             },
10171             5 => { Name => 'AF-SPrioritySelection', PrintConv => {0 => 'Release',1 => 'Focus'}}, #CSa2
10172             7 => { # CSa3-a #when AFAreaMode is 3D-tracking, blocked shot response will be 3, regardless of this setting
10173             Name => 'BlockShotAFResponse',
10174             PrintConv => {
10175             1 => '1 (Quick)',
10176             2 => '2',
10177             3 => '3 (Normal)',
10178             4 => '4',
10179             5 => '5 (Delayed)',
10180             },
10181             },
10182             11 => { Name => 'AFPointSel',PrintConv => { 0 => 'Use All',1 => 'Use Half' }}, # CSa4
10183             13 => { # CSa5
10184             Name => 'StoreByOrientation',
10185             PrintConv => {
10186             0 => 'Off',
10187             1 => 'Focus Point',
10188             2 => 'Focus Point and AF-area mode',
10189             },
10190             },
10191             15 => { Name => 'AFActivation', PrintConv => {0 => 'AF-On Only', 1 => 'Shutter/AF-On'}}, # CSa6-a
10192             16 => { Name => 'AF-OnOutOfFocusRelease', PrintConv => {0 => 'Disable', 1 => 'Enable'}, Unknown => 1}, # CSa6-b
10193             17 => { Name => 'LimitAF-AreaModeSelPinpoint', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10194             19 => { Name => 'LimitAF-AreaModeSelWideAF_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10195             20 => { Name => 'LimitAF-AreaModeSelWideAF_L', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10196             21 => { Name => 'LimitAFAreaModeSelAuto', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8 #left out hypen to retain compatibility with tag name in NikonSettings
10197             22 => { Name => 'FocusPointWrap', PrintConv => { 0 => 'No Wrap', 1 => 'Wrap' }, Unknown => 1 }, # CSa10
10198             23 => { Name => 'ManualFocusPointIllumination', PrintConv => {0 => 'On During Focus Point Selection Only', 1 => 'On', }, Unknown => 1 }, # CSa11a
10199             24 => { Name => 'DynamicAreaAFAssist', PrintConv => { 0 => 'Focus Point Only',1 => 'Focus and Surrounding Points',}, Unknown => 1 }, # CSa11b
10200             25 => { Name => 'AF-AssistIlluminator', PrintConv => \%offOn }, # CSa12
10201             26 => { Name => 'ManualFocusRingInAFMode', PrintConv => \%offOn }, # CSa15
10202             27 => { Name => 'ExposureControlStepSize', PrintConv => \%thirdHalfFull }, # CSb2
10203             29 => { # CSb3
10204             Name => 'EasyExposureCompensation',
10205             PrintConv => {
10206             0 => 'Off',
10207             1 => 'On',
10208             2 => 'On (auto reset)',
10209             },
10210             },
10211             31 => { # CSb5
10212             Name => 'CenterWeightedAreaSize',
10213             PrintConv => {
10214             0 => '8 mm',
10215             1 => '12 mm',
10216             4 => 'Average',
10217             },
10218             },
10219             33 => { # CSb6-a
10220             Name => 'FineTuneOptMatrixMetering',
10221             Format => 'int8s',
10222             ValueConv => '$val / 6',
10223             ValueConvInv => 'int($val*6)',
10224             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
10225             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
10226             },
10227             35 => { # CSb6-b
10228             Name => 'FineTuneOptCenterWeighted',
10229             Format => 'int8s',
10230             ValueConv => '$val / 6',
10231             ValueConvInv => 'int($val*6)',
10232             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
10233             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
10234             },
10235             37 => { # CSb6-c
10236             Name => 'FineTuneOptSpotMetering',
10237             Format => 'int8s',
10238             ValueConv => '$val / 6',
10239             ValueConvInv => 'int($val*6)',
10240             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
10241             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
10242             },
10243             39 => { # CSb6-d
10244             Name => 'FineTuneOptHighlightWeighted',
10245             Format => 'int8s',
10246             ValueConv => '$val / 6',
10247             ValueConvInv => 'int($val*6)',
10248             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
10249             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
10250             },
10251             41 => { # CSc1
10252             Name => 'ShutterReleaseButtonAE-L',
10253             PrintConv => {
10254             0 => 'Off',
10255             1 => 'On (Half Press)',
10256             2 => 'On (Burst Mode)',
10257             },
10258             },
10259             43 => { # CSc2-a
10260             Name => 'SelfTimerTime',
10261             PrintConv => {
10262             0 => '2 s',
10263             1 => '5 s',
10264             2 => '10 s',
10265             3 => '20 s',
10266             },
10267             },
10268             45 => { Name => 'SelfTimerShotCount', }, # CSc2-b 1-9
10269             49 => { # CSc2-c
10270             Name => 'SelfTimerShotInterval',
10271             PrintConv => {
10272             0 => '0.5 s',
10273             1 => '1 s',
10274             2 => '2 s',
10275             3 => '3 s',
10276             4 => 'Min',
10277             },
10278             },
10279             51 => { Name => 'PlaybackMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc3-a
10280             53 => { Name => 'MenuMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc3-b
10281             55 => { Name => 'ShootingInfoMonitorOffTime',%powerOffDelayTimesZ9 }, # CSc3-c
10282             57 => { Name => 'ImageReviewMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc3-d
10283             59 => { Name => 'CLModeShootingSpeed', ValueConv => '$val + 1', ValueConvInv => '$val - 1', PrintConv => '"$val fps"', PrintConvInv => '$val=~s/\s*fps//i; $val' }, # CSd1b
10284             61 => { # CSd2 # values: 1-200 & 'No Limit'
10285             Name => 'MaxContinuousRelease',
10286             Format => 'int16s',
10287             ValueConv => '($val eq -1 ? \'No Limit\' : $val ) ',
10288             },
10289             65 => { Name => 'SyncReleaseMode', PrintConv => { 0 => 'No Sync', 1 => 'Sync' }, Unknown => 1 }, # CSd4
10290             69 => { Name => 'LimitSelectableImageAreaDX', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-1
10291             70 => { Name => 'LimitSelectableImageArea1To1', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-2
10292             71 => { Name => 'LimitSelectableImageArea16To9', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-3
10293             72 => { Name => 'FileNumberSequence', PrintConv => \%offOn }, # CSd7
10294             73 => { #CSa13b
10295             Name => 'FocusPeakingLevel',
10296             Unknown => 1,
10297             PrintConv => {
10298             0 => 'High Sensitivity',
10299             1 => 'Standard Sensitivity',
10300             2 => 'Low Sensitivity',
10301             },
10302             },
10303             75 => { #CSa13c
10304             Name => 'FocusPeakingHighlightColor',
10305             Unknown => 1,
10306             PrintConv => {
10307             0 => 'Red',
10308             1 => 'Yellow',
10309             2 => 'Blue',
10310             3 => 'White',
10311             },
10312             },
10313              
10314             81 => { Name => 'ContinuousModeDisplay', PrintConv => \%offOn }, # CSd12
10315             83 => { # CSe1-a Previous cameras reported this with HighSpeedSync indicator appended as '(Auto FP)'. Z9 separated the 2 fields.
10316             Name => 'FlashSyncSpeed',
10317             ValueConv => '($val-144)/8',
10318             PrintConv => {
10319             0 => '1/60 s',
10320             1 => '1/80 s',
10321             2 => '1/100 s',
10322             3 => '1/125 s',
10323             4 => '1/160 s',
10324             5 => '1/200 s',
10325             6 => '1/250 s',
10326             },
10327             },
10328             85 => { Name => 'HighSpeedSync', PrintConv => \%offOn }, # CSe1-b
10329             87 => { # CSe2
10330             Name => 'FlashShutterSpeed',
10331             ValueConv => 'my $t = ($val - 16) % 24; $t ? $val / 24 : 2 + ($val - 16) / 24', #unusual decode perhaps due to need to accommodate 4 new values?
10332             PrintConv => {
10333             0 => '1 s',
10334             1 => '1/2 s',
10335             2 => '1/4 s',
10336             3 => '1/8 s',
10337             4 => '1/15 s',
10338             5 => '1/30 s',
10339             6 => '1/60 s',
10340             7 => '30 s',
10341             8 => '15 s',
10342             9 => '8 s',
10343             10 => '4 s',
10344             11 => '2 s',
10345             },
10346             },
10347             89 => { Name => 'FlashExposureCompArea', PrintConv => { 0 => 'Entire Frame', 1 => 'Background Only' } }, # CSe3
10348             91 => { Name => 'AutoFlashISOSensitivity', PrintConv => { 0 => 'Subject and Background',1 => 'Subject Only'} }, # CSe4
10349             93 => { Name => 'ModelingFlash', PrintConv => \%offOn }, # CSe5
10350             95 => { # CSe6
10351             Name => 'AutoBracketModeM',
10352             PrintConv => {
10353             0 => 'Flash/Speed',
10354             1 => 'Flash/Speed/Aperture',
10355             2 => 'Flash/Aperture',
10356             3 => 'Flash Only',
10357             4 => 'Flash/ISO',
10358             },
10359             },
10360             97 => { Name => 'AutoBracketOrder', PrintConv => { 0 => '0,-,+',1 => '-,0,+' } }, # CSe7
10361             99 => { Name => 'Func1Button', %buttonsZ9}, # CSf2-a
10362             115 => { Name => 'Func2Button', %buttonsZ9}, # CSf2-b
10363             131 => { Name => 'AFOnButton', %buttonsZ9}, # CSf2-c
10364             143 => { Name => 'SubSelector', %buttonsZ9, Unknown => 1}, # CSf2-g
10365             155 => { Name => 'AssignMovieRecordButton', %buttonsZ9, Unknown => 1}, # CSf2-m
10366             159 => { Name => 'LensFunc1Button', %buttonsZ9}, # CSf2-o
10367             167 => { Name => 'LensFunc2Button', %buttonsZ9}, # CSf2-p
10368             173 => { # CSf2-q
10369             Name => 'LensControlRing',
10370             PrintConv => {
10371             0 => 'None (Disabled)',
10372             1 => 'Focus (M/A)',
10373             2 => 'ISO Sensitivity',
10374             3 => 'Exposure Compensation',
10375             4 => 'Aperture',
10376             },
10377             },
10378             175 => { Name => 'MultiSelectorShootMode', %buttonsZ9}, # CSf2-h called the OK button in camera, tag name retained for compatibility
10379             179 => { Name => 'MultiSelectorPlaybackMode', %buttonsZ9}, # CSf3f
10380             183 => { Name => 'ShutterSpeedLock', PrintConv => \%offOn }, # CSf4-a
10381             184 => { Name => 'ApertureLock', PrintConv => \%offOn }, # CSf4-b
10382             185 => { # CSf5-a Previous cameras reported this tag as part of CmdDialsReverseRotation. Blend with CSf5-b separate settings together to match extant tag name and values
10383             Name => 'CmdDialsReverseRotExposureComp',
10384             RawConv => '$$self{CmdDialsReverseRotExposureComp} = $val',
10385             #Hidden => 1,
10386             },
10387             186 => [{ # CSf5-a (continued from above)
10388             Name => 'CmdDialsReverseRotation',
10389             Condition => '$$self{CmdDialsReverseRotExposureComp} == 0',
10390             PrintConv => {
10391             0 => 'No',
10392             1 => 'Shutter Speed & Aperture',
10393             },
10394             },{
10395             Name => 'CmdDialsReverseRotation',
10396             PrintConv => {
10397             0 => 'Exposure Compensation',
10398             1 => 'Exposure Compensation, Shutter Speed & Aperture',
10399             },
10400             }],
10401             191 => { Name => 'UseDialWithoutHold', PrintConv => \%offOn, Unknown => 1 }, # CSf6
10402             193 => { Name => 'ReverseIndicators', PrintConv => { 0 => '+ 0 -', 1 => '- 0 +' }, Unknown => 1 }, # CSf7
10403             195 => { Name => 'MovieFunc1Button', %buttonsZ9}, # CSg2-a
10404             199 => { Name => 'MovieFunc2Button', %buttonsZ9}, # CSg2-b
10405             203 => { Name => 'MovieAF-OnButton', %buttonsZ9}, # CSg2-f
10406             215 => { # CSg2-z
10407             Name => 'MovieLensControlRing',
10408             PrintConv => {
10409             0 => 'None (Disabled)',
10410             2 => 'ISO Sensitivity',
10411             3 => 'Exposure Compensation',
10412             4 => 'Power Aperture',
10413             5 => 'Hi-Res Zoom',
10414             },
10415             },
10416             217 => { Name => 'MovieMultiSelector', %buttonsZ9, Unknown => 1}, # CSg2-h
10417             221 => { Name => 'MovieAFSpeed', ValueConv => '$val - 5', ValueConvInv => '$val + 5' }, # CSg6-a
10418             223 => { Name => 'MovieAFSpeedApply', PrintConv => {0 => 'Always', 1 => 'Only During Recording'},}, # CSg6-b
10419             225 => { # CSg7
10420             Name => 'MovieAFTrackingSensitivity',
10421             PrintConv => {
10422             0 => '1 (High)',
10423             1 => '2',
10424             2 => '3',
10425             3 => '4 (Normal)',
10426             4 => '5',
10427             5 => '6',
10428             6 => '7 (Low)',
10429             },
10430             },
10431             257 => { Name => 'LCDIllumination', PrintConv => \%offOn, Unknown => 1 }, # CSd11
10432             258 => { Name => 'ExtendedShutterSpeeds', PrintConv => \%offOn }, # CSd5
10433             259 => { Name => 'SubjectMotion', PrintConv => {0 => 'Erratic', 1 => 'Steady'} }, # CSa3-b
10434             261 => { Name => 'FocusPointPersistence', PrintConv => {0 => 'Auto', 1 => 'Off'} }, # CSa7
10435             263 => { Name => 'AutoFocusModeRestrictions', PrintConv => \%focusModeRestrictionsZ9, Unknown => 1}, # CSa9
10436             267 => { Name => 'CHModeShootingSpeed', ValueConv => '$val + 1', ValueConvInv => '$val - 1', PrintConv => '"$val fps"', PrintConvInv => '$val=~s/\s*fps//i; $val' }, # CSd1a
10437             273 => { Name => 'FlashBurstPriority', PrintConv => { 0 => 'Frame Rate',1 => 'Exposure'}, Unknown => 1 }, # CSe8
10438             281 => { Name => 'Func3Button', %buttonsZ9}, # CSf2-c
10439             335 => { Name => 'LimitAF-AreaModeSelDynamic_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10440             336 => { Name => 'LimitAF-AreaModeSelDynamic_M', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10441             337 => { Name => 'LimitAF-AreaModeSelDynamic_L', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10442             339 => { Name => 'LimitAF-AreaModeSel3DTracking', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10443             341 => { Name => 'PlaybackFlickUp', PrintConv => \%flicksZ9, Unknown => 1}, # CSf12-a
10444             345 => { Name => 'PlaybackFlickDown', PrintConv => \%flicksZ9, Unknown => 1}, # CSf12-b
10445             349 => { Name => 'ISOStepSize', PrintConv => \%thirdHalfFull }, # CSb1
10446             355 => { Name => 'ReverseFocusRing', PrintConv => { 0 => 'Not Reversed', 1 => 'Reversed' } }, # CSf8
10447             356 => { Name => 'EVFImageFrame', PrintConv => \%offOn, Unknown => 1 }, # CSd14
10448             357 => { Name => 'EVFGrid', PrintConv => \%evfGridsZ9, Unknown => 1 }, # CSd15
10449             359 => { Name => 'VirtualHorizonStyle', PrintConv => {0 => 'Type A (Cockpit)', 1 => 'Type B (Sides)' }, Unknown => 1}, #CSd16
10450             421 => { Name => 'Func1ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-a
10451             423 => { Name => 'Func2ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-b
10452             437 => { Name => 'MovieRecordButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-m
10453             453 => { Name => 'WBButtonPlaybackMode', %buttonsZ9}, # CSf2
10454             461 => { Name => 'CommandDialVideoPlaybackMode', PrintConv => \%dialsVideoZ9, Unknown => 1}, # CSf3-b
10455             465 => { Name => 'SubCommandDialVideoPlaybackMode',PrintConv => \%dialsVideoZ9, Unknown => 1}, # CSf3-b
10456             467 => { Name => 'FocusPointLock', PrintConv => \%offOn, Unknown => 1}, # CSf4-c
10457             459 => { Name => 'CommandDialPlaybackMode', PrintConv => \%dialsZ9, Unknown => 1}, # CSf3-k
10458             463 => { Name => 'SubCommandDialPlaybackMode', PrintConv => \%dialsZ9, Unknown => 1}, # CSf3-l
10459             469 => { Name => 'ControlRingResponse', PrintConv => { 0 => 'High', 1 => 'Low' } }, # CSf10
10460              
10461             #515 => { Name => 'MovieAFAreaMode', %buttonsZ9, Unknown => 1}, # CSg2-e #28 this is incorrect - MovieAFAreaMode is set in the Photo Shooting Menu and the tag is set in Nikon.pm
10462             529 => { # CSg9-a
10463             Name => 'ZebraPatternToneRange',
10464             Unknown => 1,
10465             RawConv => '$$self{ZebraPatternToneRange} = $val',
10466             PrintConv => {
10467             0 => 'Off',
10468             1 => 'Highlights',
10469             2 => 'Midtones',
10470             },
10471             },
10472             531 => { Name => 'MovieZebraPattern', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} != 0', PrintConv => {0 => 'Pattern 1', 1 => 'Pattern 2'}, Unknown => 1}, # CSg12-b
10473             533 => { Name => 'MovieHighlightDisplayThreshold', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} == 1', Unknown => 1 }, # CSg12-c 120-25 when highlights are the selected tone range
10474             535 => { Name => 'MovieMidtoneDisplayValue', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} == 2', Unknown => 1 }, # CSg12-d1 when midtones are the selected tone range
10475             537 => { Name => 'MovieMidtoneDisplayRange', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} == 2', PrintConv => '"+/-$val"', Unknown => 1 }, # CSg12-d1 when midtones are the selected tone range
10476             541 => { Name => 'MovieEVFGrid', PrintConv => \%evfGridsZ9, Unknown => 1 }, # CSg11
10477             549 => { Name => 'MovieShutterSpeedLock', PrintConv => \%offOn, Unknown => 1}, # CSg4-a
10478             550 => { Name => 'MovieFocusPointLock', PrintConv => \%offOn, Unknown => 1}, # CSf4-c
10479             563 => { Name => 'MatrixMetering', PrintConv => { 0 => 'Face Detection Off', 1 => 'Face Detection On' }, Unknown => 1 }, # CSb4
10480             564 => { Name => 'AF-CFocusDisplay', PrintConv => \%offOn }, # CSa11c
10481             565 => { Name => 'FocusPeakingDisplay', PrintConv => \%offOn, Unknown => 1}, # CSa13a
10482             567 => { # CSb7
10483             Name => 'KeepExposure',
10484             PrintConv => {
10485             0 => 'Off',
10486             1 => 'Shutter Speed',
10487             2 => 'ISO',
10488             },
10489             },
10490             585 => { Name => 'StarlightView', PrintConv => \%offOn, Unknown => 1 }, # CSd9
10491             587 => { # CSd10-a
10492             Name => 'EVFWarmDisplayMode',
10493             Unknown => 1,
10494             PrintConv => {
10495             0 => 'Off',
10496             1 => 'Mode 1',
10497             2 => 'Mode 2',
10498             },
10499             },
10500             589 => { # CSd10-b values in range -3 to +3
10501             Name => 'EVFWarmDisplayBrightness',
10502             Format => 'int8s',
10503             Unknown => 1,
10504             },
10505             591 => { #CSd13
10506             Name => 'EVFReleaseIndicator',
10507             Unknown => 1,
10508             PrintConv => {
10509             0 => 'Off',
10510             1 => 'Type A (Dark)',
10511             2 => 'Type B (Border)',
10512             3 => 'Type C (Sides)',
10513             },
10514             },
10515             601 => { Name => 'MovieApertureLock', PrintConv => \%offOn, Unknown => 1 }, # CSg4-b
10516             607 => { Name => 'FlickAdvanceDirection', PrintConv => { 0 => 'Left to Right', 1 => 'Right to Left' }, Unknown => 1 }, # CSf11-c
10517             647 => { #CSd4-a
10518             Name => 'PreReleaseBurstLength',
10519             PrintConv => {
10520             0 => 'None',
10521             1 => '0.3 Sec',
10522             2 => '0.5 Sec',
10523             3 => '1 Sec',
10524             },
10525             },
10526             649 => { #CSd4-b
10527             Name => 'PostReleaseBurstLength',
10528             PrintConv => {
10529             0 => '1 Sec',
10530             1 => '2 Sec',
10531             2 => '3 Sec',
10532             3 => 'Max',
10533             },
10534             },
10535             681 => { Name => 'ViewModeShowEffectsOfSettings', PrintConv => { 0=>'Always', 1=> 'Only When Flash Not Used'}, Unknown => 1 }, #CS8-a
10536             683 => { Name => 'DispButton', %buttonsZ9}, #CSf2
10537             753 => { #CSd5
10538             Name => 'ExposureDelay',
10539             Format => 'int16u',
10540             PrintConv => '$val ? sprintf("%.1f sec",$val/1000) : "Off"',
10541             },
10542             );
10543              
10544             # Z9 custom settings (ref 1) #base at offset26 + 1035 (firmware 1.0.0)
10545             %Image::ExifTool::NikonCustom::SettingsZ9 = (
10546             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
10547             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
10548             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
10549             DATAMEMBER => [ 185, 529 ],
10550             WRITABLE => 1,
10551             FIRST_ENTRY => 0,
10552             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10553             NOTES => 'Custom settings for the Z9.',
10554             1 => {
10555             Name => 'CustomSettingsBank',
10556             PrintConv => {
10557             0 => 'A',
10558             1 => 'B',
10559             2 => 'C',
10560             3 => 'D',
10561             },
10562             },
10563             3 => { # CSa1
10564             Name => 'AF-CPrioritySelection',
10565             PrintConv => {
10566             0 => 'Release',
10567             1 => 'Release + Focus',
10568             3 => 'Focus',
10569             },
10570             },
10571             5 => { Name => 'AF-SPrioritySelection', PrintConv => {0 => 'Release',1 => 'Focus'}}, #CSa2
10572             7 => { # CSa3-a #when AFAreaMode is 3D-tracking, blocked shot response will be 3, regardless of this setting
10573             Name => 'BlockShotAFResponse',
10574             PrintConv => {
10575             1 => '1 (Quick)',
10576             2 => '2',
10577             3 => '3 (Normal)',
10578             4 => '4',
10579             5 => '5 (Delayed)',
10580             },
10581             },
10582             11 => { Name => 'AFPointSel',PrintConv => { 0 => 'Use All',1 => 'Use Half' }}, # CSa4
10583             13 => { # CSa5
10584             Name => 'StoreByOrientation',
10585             PrintConv => {
10586             0 => 'Off',
10587             1 => 'Focus Point',
10588             2 => 'Focus Point and AF-area mode',
10589             },
10590             },
10591             15 => { Name => 'AFActivation', PrintConv => {0 => 'AF-On Only', 1 => 'Shutter/AF-On'}}, # CSa6-a
10592             16 => { Name => 'AF-OnOutOfFocusRelease', PrintConv => {0 => 'Disable', 1 => 'Enable'}, Unknown => 1}, # CSa6-b
10593             17 => { Name => 'LimitAF-AreaModeSelPinpoint', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10594             19 => { Name => 'LimitAF-AreaModeSelWideAF_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10595             20 => { Name => 'LimitAF-AreaModeSelWideAF_L', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10596             21 => { Name => 'LimitAFAreaModeSelAuto', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8 #left out hypen to retain compatibility with tag name in NikonSettings
10597             22 => { Name => 'FocusPointWrap', PrintConv => { 0 => 'No Wrap', 1 => 'Wrap' }, Unknown => 1 }, # CSa10
10598             23 => { Name => 'ManualFocusPointIllumination', PrintConv => {0 => 'On During Focus Point Selection Only', 1 => 'On', }, Unknown => 1 }, # CSa11a
10599             24 => { Name => 'DynamicAreaAFAssist', PrintConv => { 0 => 'Focus Point Only',1 => 'Focus and Surrounding Points',}, Unknown => 1 }, # CSa11b
10600             25 => { Name => 'AF-AssistIlluminator', PrintConv => \%offOn }, # CSa12
10601             26 => { Name => 'ManualFocusRingInAFMode', PrintConv => \%offOn }, # CSa14
10602             27 => { Name => 'ExposureControlStepSize', PrintConv => \%thirdHalfFull }, # CSb2
10603             29 => { # CSb3
10604             Name => 'EasyExposureCompensation',
10605             PrintConv => {
10606             0 => 'Off',
10607             1 => 'On',
10608             2 => 'On (auto reset)',
10609             },
10610             },
10611             31 => { # CSb5
10612             Name => 'CenterWeightedAreaSize',
10613             PrintConv => {
10614             0 => '8 mm',
10615             1 => '12 mm',
10616             4 => 'Average',
10617             },
10618             },
10619             33 => { # CSb6-a
10620             Name => 'FineTuneOptMatrixMetering',
10621             Format => 'int8s',
10622             ValueConv => '$val / 6',
10623             ValueConvInv => 'int($val*6)',
10624             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
10625             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
10626             },
10627             35 => { # CSb6-b
10628             Name => 'FineTuneOptCenterWeighted',
10629             Format => 'int8s',
10630             ValueConv => '$val / 6',
10631             ValueConvInv => 'int($val*6)',
10632             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
10633             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
10634             },
10635             37 => { # CSb6-c
10636             Name => 'FineTuneOptSpotMetering',
10637             Format => 'int8s',
10638             ValueConv => '$val / 6',
10639             ValueConvInv => 'int($val*6)',
10640             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
10641             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
10642             },
10643             39 => { # CSb6-d
10644             Name => 'FineTuneOptHighlightWeighted',
10645             Format => 'int8s',
10646             ValueConv => '$val / 6',
10647             ValueConvInv => 'int($val*6)',
10648             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
10649             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
10650             },
10651             41 => { # CSc1
10652             Name => 'ShutterReleaseButtonAE-L',
10653             PrintConv => {
10654             0 => 'Off',
10655             1 => 'On (Half Press)',
10656             2 => 'On (Burst Mode)',
10657             },
10658             },
10659             43 => { # CSc3-a
10660             Name => 'SelfTimerTime',
10661             PrintConv => {
10662             0 => '2 s',
10663             1 => '5 s',
10664             2 => '10 s',
10665             3 => '20 s',
10666             },
10667             },
10668             45 => { Name => 'SelfTimerShotCount', }, # CSc3-b 1-9
10669             49 => { # CSc3-c
10670             Name => 'SelfTimerShotInterval',
10671             PrintConv => {
10672             0 => '0.5 s',
10673             1 => '1 s',
10674             2 => '2 s',
10675             3 => '3 s',
10676             },
10677             },
10678             51 => { Name => 'PlaybackMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc4-a
10679             53 => { Name => 'MenuMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc4-b
10680             55 => { Name => 'ShootingInfoMonitorOffTime',%powerOffDelayTimesZ9 }, # CSc4-c
10681             57 => { Name => 'ImageReviewMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc4-d
10682             59 => { Name => 'CLModeShootingSpeed', ValueConv => '$val + 1', ValueConvInv => '$val - 1', PrintConv => '"$val fps"', PrintConvInv => '$val=~s/\s*fps//i; $val' }, # CSd1b
10683             61 => { # CSd2 # values: 1-200 & 'No Limit'
10684             Name => 'MaxContinuousRelease',
10685             Format => 'int16s',
10686             ValueConv => '($val eq -1 ? \'No Limit\' : $val ) ',
10687             },
10688             65 => { Name => 'SyncReleaseMode', PrintConv => { 0 => 'No Sync', 1 => 'Sync' }, Unknown => 1 }, # CSd4
10689             69 => { Name => 'LimitSelectableImageAreaDX', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-1
10690             70 => { Name => 'LimitSelectableImageArea1To1', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-2
10691             71 => { Name => 'LimitSelectableImageArea16To9', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-3
10692             72 => { Name => 'FileNumberSequence', PrintConv => \%offOn }, # CSd7
10693             73 => { #CSa13b
10694             Name => 'FocusPeakingLevel',
10695             Unknown => 1,
10696             PrintConv => {
10697             0 => 'High Sensitivity',
10698             1 => 'Standard Sensitivity',
10699             2 => 'Low Sensitivity',
10700             },
10701             },
10702             75 => { #CSa13c
10703             Name => 'FocusPeakingHighlightColor',
10704             Unknown => 1,
10705             PrintConv => {
10706             0 => 'Red',
10707             1 => 'Yellow',
10708             2 => 'Blue',
10709             3 => 'White',
10710             },
10711             },
10712             81 => { Name => 'ContinuousModeDisplay', PrintConv => \%offOn }, # CSd12
10713             83 => { # CSe1-a Previous cameras reported this with HighSpeedSync indicator appended as '(Auto FP)'. Z9 separated the 2 fields.
10714             Name => 'FlashSyncSpeed',
10715             ValueConv => '($val-144)/8',
10716             PrintConv => {
10717             0 => '1/60 s',
10718             1 => '1/80 s',
10719             2 => '1/100 s',
10720             3 => '1/125 s',
10721             4 => '1/160 s',
10722             5 => '1/200 s',
10723             6 => '1/250 s',
10724             },
10725             },
10726             85 => { Name => 'HighSpeedSync', PrintConv => \%offOn }, # CSe1-b
10727             87 => { # CSe2
10728             Name => 'FlashShutterSpeed',
10729             ValueConv => 'my $t = ($val - 16) % 24; $t ? $val / 24 : 2 + ($val - 16) / 24', #unusual decode perhaps due to need to accommodate 4 new values?
10730             PrintConv => {
10731             0 => '1 s',
10732             1 => '1/2 s',
10733             2 => '1/4 s',
10734             3 => '1/8 s',
10735             4 => '1/15 s',
10736             5 => '1/30 s',
10737             6 => '1/60 s',
10738             7 => '30 s',
10739             8 => '15 s',
10740             9 => '8 s',
10741             10 => '4 s',
10742             11 => '2 s',
10743             },
10744             },
10745             89 => { Name => 'FlashExposureCompArea', PrintConv => { 0 => 'Entire Frame', 1 => 'Background Only' } }, # CSe3
10746             91 => { Name => 'AutoFlashISOSensitivity', PrintConv => { 0 => 'Subject and Background',1 => 'Subject Only'} }, # CSe4
10747             93 => { Name => 'ModelingFlash', PrintConv => \%offOn }, # CSe5
10748             95 => { # CSe6
10749             Name => 'AutoBracketModeM',
10750             PrintConv => {
10751             0 => 'Flash/Speed',
10752             1 => 'Flash/Speed/Aperture',
10753             2 => 'Flash/Aperture',
10754             3 => 'Flash Only',
10755             4 => 'Flash/ISO',
10756             },
10757             },
10758             97 => { Name => 'AutoBracketOrder', PrintConv => { 0 => '0,-,+',1 => '-,0,+' } }, # CSe7
10759             99 => { Name => 'Func1Button', %buttonsZ9}, # CSf2-a
10760             #101 Func1Button submenu: Preview 0 => 'Press To Recall', 1=> 'Hold To Recall' # CSf2-a
10761             #103 Func1Button submenu: AreaMode 0-7 => S, Dyn-S, Dyn-M, Dyn-L, Wide-S, Wide-L, 3D, Auto; 11=>n/a # CSf2-a
10762             #105 Func1Button submenu: AreaMode+AF-On 0-7 => S, Dyn-S, Dyn-M, Dyn-L, Wide-S, Wide-L, 3D, Auto; 11=>n/a # CSf2-a
10763             #109 Func1Button submenu: SynchronizedRelease 1=>'Master', 2=>'Remote' # CSf2-a
10764             #111 Func1Button submenu: Zoom 0=>'Zoom (Low)', 2=>'Zoom (1:1)', 2=>'Zoom (High)' # CSf2-a
10765             #113 Func1Button & Func1ButtonPlayback submenu: Rating # CSf2-a & CSf3a 0=>'Candidate For Deletion' 6=>''None'
10766             115 => { Name => 'Func2Button', %buttonsZ9}, # CSf2-b
10767             #117 Func2Button submenu: Preview 0 => 'Press To Recall', 1=> 'Hold To Recall' # CSf2-b
10768             #119 Func2Button submenu: AreaMode 0-7 => S, Dyn-S, Dyn-M, Dyn-L, Wide-S, Wide-L, 3D, Auto; 11=>n/a # CSf2-b
10769             #121 Func2Button submenu: AreaMode+AF-On 0-7 => S, Dyn-S, Dyn-M, Dyn-L, Wide-S, Wide-L, 3D, Auto; 11=>n/a # CSf2-b
10770             #125 Func2Button submenu: SynchronizedRelease 1=>'Master', 2=>'Remote' # CSf2-b
10771             #127 Func2Button submenu: Zoom 0=>'Zoom 5', 2=>'Zoom (1:1)', 2=>'Zoom 200%, 2=>'Zoom 400%' # CSf2-b
10772             #129 Func2Button & Func2ButtonPlayback submenu: Rating # CSf2-b & CSf3b 0=>'Candidate For Deletion' 6=>''None'
10773             131 => { Name => 'AFOnButton', %buttonsZ9}, # CSf2-c
10774             143 => { Name => 'SubSelector', %buttonsZ9, Unknown => 1}, # CSf2-g
10775             155 => { Name => 'AssignMovieRecordButton', %buttonsZ9, Unknown => 1}, # CSf2-m
10776             159 => { Name => 'LensFunc1Button', %buttonsZ9}, # CSf2-o
10777             167 => { Name => 'LensFunc2Button', %buttonsZ9}, # CSf2-p
10778             173 => { # CSf2-q
10779             Name => 'LensControlRing',
10780             PrintConv => {
10781             0 => 'None (Disabled)',
10782             1 => 'Focus (M/A)',
10783             2 => 'ISO Sensitivity',
10784             3 => 'Exposure Compensation',
10785             4 => 'Aperture',
10786             },
10787             },
10788             175 => { Name => 'MultiSelectorShootMode', %buttonsZ9}, # CSf2-h called the OK button in camera, tag name retained for compatibility
10789             179 => { Name => 'MultiSelectorPlaybackMode', %buttonsZ9}, # CSf3f
10790             183 => { Name => 'ShutterSpeedLock', PrintConv => \%offOn }, # CSf4-a
10791             184 => { Name => 'ApertureLock', PrintConv => \%offOn }, # CSf4-b
10792             185 => { # CSf5-a Previous cameras reported this tag as part of CmdDialsReverseRotation. Blend with CSf5-b separate settings together to match extant tag name and values
10793             Name => 'CmdDialsReverseRotExposureComp',
10794             RawConv => '$$self{CmdDialsReverseRotExposureComp} = $val',
10795             #Hidden => 1,
10796             },
10797             186 => [{ # CSf5-a (continued from above)
10798             Name => 'CmdDialsReverseRotation',
10799             Condition => '$$self{CmdDialsReverseRotExposureComp} == 0',
10800             PrintConv => {
10801             0 => 'No',
10802             1 => 'Shutter Speed & Aperture',
10803             },
10804             },{
10805             Name => 'CmdDialsReverseRotation',
10806             PrintConv => {
10807             0 => 'Exposure Compensation',
10808             1 => 'Exposure Compensation, Shutter Speed & Aperture',
10809             },
10810             }],
10811             191 => { Name => 'UseDialWithoutHold', PrintConv => \%offOn, Unknown => 1 }, # CSf6
10812             193 => { Name => 'ReverseIndicators', PrintConv => { 0 => '+ 0 -', 1 => '- 0 +' }, Unknown => 1 }, # CSf7
10813             195 => { Name => 'MovieFunc1Button', %buttonsZ9}, # CSg2-a
10814             199 => { Name => 'MovieFunc2Button', %buttonsZ9}, # CSg2-b
10815             203 => { Name => 'MovieAF-OnButton', %buttonsZ9}, # CSg2-f
10816             207 => { Name => 'MovieMultiSelector', %buttonsZ9, Unknown => 1}, # CSg2-h
10817             215 => { # CSg2-z
10818             Name => 'MovieLensControlRing',
10819             PrintConv => {
10820             0 => 'None (Disabled)',
10821             2 => 'ISO Sensitivity',
10822             3 => 'Exposure Compensation',
10823             4 => 'Power Aperture',
10824             5 => 'Hi-Res Zoom',
10825             },
10826             },
10827             221 => { Name => 'MovieAFSpeed', ValueConv => '$val - 5', ValueConvInv => '$val + 5' }, # CSg6-a
10828             223 => { Name => 'MovieAFSpeedApply', PrintConv => {0 => 'Always', 1 => 'Only During Recording'},}, # CSg6-b
10829             225 => { # CSg7
10830             Name => 'MovieAFTrackingSensitivity',
10831             PrintConv => {
10832             0 => '1 (High)',
10833             1 => '2',
10834             2 => '3',
10835             3 => '4 (Normal)',
10836             4 => '5',
10837             5 => '6',
10838             6 => '7 (Low)',
10839             },
10840             },
10841             257 => { Name => 'LCDIllumination', PrintConv => \%offOn, Unknown => 1 }, # CSd11
10842             258 => { Name => 'ExtendedShutterSpeeds', PrintConv => \%offOn }, # CSd5
10843             259 => { Name => 'SubjectMotion', PrintConv => {0 => 'Erratic', 1 => 'Steady'} }, # CSa3-b
10844             261 => { Name => 'FocusPointPersistence', PrintConv => {0 => 'Auto', 1 => 'Off'} }, # CSa7
10845             263 => { Name => 'AutoFocusModeRestrictions', PrintConv => \%focusModeRestrictionsZ9, Unknown => 1}, # CSa9
10846             267 => { Name => 'CHModeShootingSpeed', ValueConv => '$val + 1', ValueConvInv => '$val - 1', PrintConv => '"$val fps"', PrintConvInv => '$val=~s/\s*fps//i; $val' }, # CSd1a
10847             269.1 => { Name => 'LimitReleaseModeSelCL', Mask => 0x02, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-a
10848             269.2 => { Name => 'LimitReleaseModeSelCH', Mask => 0x04, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-b
10849             269.3 => { Name => 'LimitReleaseModeSelC30', Mask => 0x10, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-e
10850             269.4 => { Name => 'LimitReleaseModeSelC120', Mask => 0x40, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-c
10851             269.5 => { Name => 'LimitReleaseModeSelSelf', Mask => 0x80, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-d
10852             273 => { Name => 'FlashBurstPriority', PrintConv => { 0 => 'Frame Rate',1 => 'Exposure'}, Unknown => 1 }, # CSe8
10853             277 => { Name => 'VerticalFuncButton', %buttonsZ9}, # CSf2-c
10854             281 => { Name => 'Func3Button', %buttonsZ9}, # CSf2-c
10855             285 => { Name => 'VerticalAFOnButton', %buttonsZ9}, # CSf2-l
10856             293 => { Name => 'VerticalMultiSelectorPlaybackMode', PrintConv => { 0 => 'Image Scroll L/R', 1 => 'Image Scroll Up/Down' }, Unknown => 1}, # CSf3-j
10857             295 => { Name => 'MovieFunc3Button', %buttonsZ9}, # CSg2-c
10858             335 => { Name => 'LimitAF-AreaModeSelDynamic_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10859             336 => { Name => 'LimitAF-AreaModeSelDynamic_M', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10860             337 => { Name => 'LimitAF-AreaModeSelDynamic_L', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10861             339 => { Name => 'LimitAF-AreaModeSel3DTracking', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
10862             341 => { Name => 'PlaybackFlickUp', PrintConv => \%flicksZ9, Unknown => 1}, # CSf11-a
10863             345 => { Name => 'PlaybackFlickDown', PrintConv => \%flicksZ9, Unknown => 1}, # CSf11-b
10864             349 => { Name => 'ISOStepSize', PrintConv => \%thirdHalfFull }, # CSb1
10865             355 => { Name => 'ReverseFocusRing', PrintConv => { 0 => 'Not Reversed', 1 => 'Reversed' } }, # CSf8
10866             356 => { Name => 'EVFImageFrame', PrintConv => \%offOn, Unknown => 1 }, # CSd14
10867             357 => { Name => 'EVFGrid', PrintConv => \%evfGridsZ9, Unknown => 1 }, # CSd15
10868             359 => { Name => 'VirtualHorizonStyle', PrintConv => {0 => 'Type A (Cockpit)', 1 => 'Type B (Sides)' }, Unknown => 1}, #CSd16
10869             373 => { Name => 'Func4Button', %buttonsZ9, Unknown => 1}, # CSf2-e
10870             379 => { Name => 'AudioButton', %buttonsZ9, Unknown => 1}, # CSf2-i
10871             381 => { Name => 'QualityButton', %buttonsZ9, Unknown => 1}, # CSf2-j
10872             399 => { Name => 'VerticalMultiSelector', %buttonsZ9, Unknown => 1}, # CSf2-k
10873             421 => { Name => 'Func1ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-a
10874             423 => { Name => 'Func2ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-b
10875             425 => { Name => 'Func3ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-c
10876             431 => { Name => 'Func4ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-e
10877             437 => { Name => 'MovieRecordButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-m
10878             439 => { Name => 'VerticalFuncButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-d
10879             441 => { Name => 'AudioButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-g
10880             447 => { Name => 'QualityButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-h
10881             467 => { Name => 'FocusPointLock', PrintConv => \%offOn, Unknown => 1}, # CSf4-c
10882             453 => { Name => 'WhiteBalanceButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-i
10883             459 => { Name => 'CommandDialPlaybackMode', PrintConv => \%dialsZ9, Unknown => 1}, # CSf3-k
10884             463 => { Name => 'SubCommandDialPlaybackMode', PrintConv => \%dialsZ9, Unknown => 1}, # CSf3-l
10885             469 => { Name => 'ControlRingResponse', PrintConv => { 0 => 'High', 1 => 'Low' } }, # CSf10
10886             481 => { Name => 'VerticalMovieFuncButton', %buttonsZ9, Unknown => 1}, # CSg2-d
10887             505 => { Name => 'VerticalMovieAFOnButton', %buttonsZ9, Unknown => 1}, # CSg2-l
10888             515 => { Name => 'MovieAFAreaMode', %buttonsZ9, Unknown => 1}, # CSg2-e
10889             #521 => { Name => 'MovieLimitAF-AreaModeSelWideAF_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSg4-a
10890             #522 => { Name => 'MovieLimitAF-AreaModeSelWideAF_W', PrintConv => \%limitNolimit, Unknown => 1 }, # CSg4-b
10891             #523 => { Name => 'MovieLimitAF-AreaModeSelSubjectTrack', PrintConv => \%limitNolimit, Unknown => 1 }, # CSg4-c
10892             #524 => { Name => 'MovieLimitAFAreaModeSelAuto', PrintConv => \%limitNolimit, Unknown => 1 }, # CSg4-d
10893             #525 => { Name => 'MovieAutoFocusModeRestrictions', PrintConv => \%focusModeRestrictionsZ9, Unknown => 1}, # CSa9
10894             527 => { Name => 'HDMIViewAssist', PrintConv => \%offOn, Unknown => 1 }, # CSg8
10895             529 => { # CSg9-a
10896             Name => 'ZebraPatternToneRange',
10897             Unknown => 1,
10898             RawConv => '$$self{ZebraPatternToneRange} = $val',
10899             PrintConv => {
10900             0 => 'Off',
10901             1 => 'Highlights',
10902             2 => 'Midtones',
10903             },
10904             },
10905             531 => { Name => 'MovieZebraPattern', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} != 0', PrintConv => {0 => 'Pattern 1', 1 => 'Pattern 2'}, Unknown => 1}, # CSg9-b
10906             533 => { Name => 'MovieHighlightDisplayThreshold', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} == 1', Unknown => 1 }, # CSg9-c 120-25 when highlights are the selected tone range
10907             535 => { Name => 'MovieMidtoneDisplayValue', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} == 2', Unknown => 1 }, # CSg9-d1 when midtones are the selected tone range
10908             537 => { Name => 'MovieMidtoneDisplayRange', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} == 2', PrintConv => '"+/-$val"', Unknown => 1 }, # CSg9-d1 when midtones are the selected tone range
10909             #539 CS g-10 LimitZebraPatternToneRange 0=>'No Restrictions', 1=> 'Highlights', 2=> 'Midtones'
10910             541 => { Name => 'MovieEVFGrid', PrintConv => \%evfGridsZ9, Unknown => 1 }, # CSg11
10911             549 => { Name => 'MovieShutterSpeedLock', PrintConv => \%offOn, Unknown => 1}, # CSg4-a
10912             550 => { Name => 'MovieFocusPointLock', PrintConv => \%offOn, Unknown => 1}, # CSf4-c
10913             563 => { Name => 'MatrixMetering', PrintConv => { 0 => 'Face Detection Off', 1 => 'Face Detection On' }, Unknown => 1 }, # CSb4
10914             564 => { Name => 'AF-CFocusDisplay', PrintConv => \%offOn }, # CSa11c
10915             565 => { Name => 'FocusPeakingDisplay', PrintConv => \%offOn, Unknown => 1}, # CSa13a
10916             567 => { # CSb7
10917             Name => 'KeepExposure',
10918             PrintConv => {
10919             0 => 'Off',
10920             1 => 'Shutter Speed',
10921             2 => 'ISO',
10922             },
10923             },
10924             #569 CDd8 (adjust viewfinder/monitor hue, brightness and/or white balance settings) 0=>'No adjustment', 1=>'Adjust'. Related ontrols & adjustments stored in following dozen bytes or so.
10925             585 => { Name => 'StarlightView', PrintConv => \%offOn, Unknown => 1 }, # CSd9
10926             587 => { # CSd10-a
10927             Name => 'EVFWarmDisplayMode',
10928             Unknown => 1,
10929             PrintConv => {
10930             0 => 'Off',
10931             1 => 'Mode 1',
10932             2 => 'Mode 2',
10933             },
10934             },
10935             589 => { # CSd10-b values in range -3 to +3
10936             Name => 'EVFWarmDisplayBrightness',
10937             Format => 'int8s',
10938             Unknown => 1,
10939             },
10940             591 => { #CSd13
10941             Name => 'EVFReleaseIndicator',
10942             Unknown => 1,
10943             PrintConv => {
10944             0 => 'Off',
10945             1 => 'Type A (Dark)',
10946             2 => 'Type B (Border)',
10947             3 => 'Type C (Sides)',
10948             },
10949             },
10950             601 => { Name => 'MovieApertureLock', PrintConv => \%offOn, Unknown => 1 }, # CSg4-b
10951             607 => { Name => 'FlickAdvanceDirection', PrintConv => { 0 => 'Left to Right', 1 => 'Right to Left' }, Unknown => 1 }, # CSf11-c
10952             );
10953              
10954             # Z9 custom settings (ref 1) #base at offset26 + 1095 (firmware 4.0)
10955             %Image::ExifTool::NikonCustom::SettingsZ9v4 = (
10956             PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
10957             WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
10958             CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
10959             DATAMEMBER => [ 185, 553 ],
10960             WRITABLE => 1,
10961             FIRST_ENTRY => 0,
10962             GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
10963             NOTES => 'Custom settings for the Z9.',
10964             1 => {
10965             Name => 'CustomSettingsBank',
10966             PrintConv => {
10967             0 => 'A',
10968             1 => 'B',
10969             2 => 'C',
10970             3 => 'D',
10971             },
10972             },
10973             3 => { # CSa1
10974             Name => 'AF-CPrioritySelection',
10975             PrintConv => {
10976             0 => 'Release',
10977             1 => 'Release + Focus',
10978             3 => 'Focus',
10979             },
10980             },
10981             5 => { Name => 'AF-SPrioritySelection', PrintConv => {0 => 'Release',1 => 'Focus'}}, #CSa2
10982             7 => { # CSa3-a #when AFAreaMode is 3D-tracking, blocked shot response will be 3, regardless of this setting
10983             Name => 'BlockShotAFResponse',
10984             PrintConv => {
10985             1 => '1 (Quick)',
10986             2 => '2',
10987             3 => '3 (Normal)',
10988             4 => '4',
10989             5 => '5 (Delayed)',
10990             },
10991             },
10992             11 => { Name => 'AFPointSel',PrintConv => { 0 => 'Use All',1 => 'Use Half' }}, # CSa4
10993             13 => { # CSa5
10994             Name => 'StoreByOrientation',
10995             PrintConv => {
10996             0 => 'Off',
10997             1 => 'Focus Point',
10998             2 => 'Focus Point and AF-area mode',
10999             },
11000             },
11001             15 => { Name => 'AFActivation', PrintConv => {0 => 'AF-On Only', 1 => 'Shutter/AF-On'}}, # CSa6-a
11002             16 => { Name => 'AF-OnOutOfFocusRelease', PrintConv => {0 => 'Disable', 1 => 'Enable'}, Unknown => 1}, # CSa6-b
11003             17 => { Name => 'LimitAF-AreaModeSelPinpoint', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
11004             19 => { Name => 'LimitAF-AreaModeSelWideAF_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
11005             20 => { Name => 'LimitAF-AreaModeSelWideAF_L', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
11006             21 => { Name => 'LimitAFAreaModeSelAuto', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8 #left out hypen to retain compatibility with tag name in NikonSettings
11007             22 => { Name => 'FocusPointWrap', PrintConv => { 0 => 'No Wrap', 1 => 'Wrap' }, Unknown => 1 }, # CSa10
11008             23 => { Name => 'ManualFocusPointIllumination', PrintConv => {0 => 'On During Focus Point Selection Only', 1 => 'On', }, Unknown => 1 }, # CSa11a
11009             24 => { Name => 'DynamicAreaAFAssist', PrintConv => { 0 => 'Focus Point Only',1 => 'Focus and Surrounding Points',}, Unknown => 1 }, # CSa11b
11010             25 => { Name => 'AF-AssistIlluminator', PrintConv => \%offOn }, # CSa12
11011             26 => { Name => 'ManualFocusRingInAFMode', PrintConv => \%offOn }, # CSa14
11012             27 => { Name => 'ExposureControlStepSize', PrintConv => \%thirdHalfFull }, # CSb2
11013             29 => { # CSb3
11014             Name => 'EasyExposureCompensation',
11015             PrintConv => {
11016             0 => 'Off',
11017             1 => 'On',
11018             2 => 'On (auto reset)',
11019             },
11020             },
11021             31 => { # CSb5
11022             Name => 'CenterWeightedAreaSize',
11023             PrintConv => {
11024             0 => '8 mm',
11025             1 => '12 mm',
11026             4 => 'Average',
11027             },
11028             },
11029             33 => { # CSb6-a
11030             Name => 'FineTuneOptMatrixMetering',
11031             Format => 'int8s',
11032             ValueConv => '$val / 6',
11033             ValueConvInv => 'int($val*6)',
11034             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
11035             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
11036             },
11037             35 => { # CSb6-b
11038             Name => 'FineTuneOptCenterWeighted',
11039             Format => 'int8s',
11040             ValueConv => '$val / 6',
11041             ValueConvInv => 'int($val*6)',
11042             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
11043             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
11044             },
11045             37 => { # CSb6-c
11046             Name => 'FineTuneOptSpotMetering',
11047             Format => 'int8s',
11048             ValueConv => '$val / 6',
11049             ValueConvInv => 'int($val*6)',
11050             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
11051             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
11052             },
11053             39 => { # CSb6-d
11054             Name => 'FineTuneOptHighlightWeighted',
11055             Format => 'int8s',
11056             ValueConv => '$val / 6',
11057             ValueConvInv => 'int($val*6)',
11058             PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
11059             PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
11060             },
11061             41 => { # CSc1
11062             Name => 'ShutterReleaseButtonAE-L',
11063             PrintConv => {
11064             0 => 'Off',
11065             1 => 'On (Half Press)',
11066             2 => 'On (Burst Mode)',
11067             },
11068             },
11069             43 => { # CSc3-a
11070             Name => 'SelfTimerTime',
11071             PrintConv => {
11072             0 => '2 s',
11073             1 => '5 s',
11074             2 => '10 s',
11075             3 => '20 s',
11076             },
11077             },
11078             45 => { Name => 'SelfTimerShotCount', }, # CSc3-b 1-9
11079             49 => { # CSc3-c
11080             Name => 'SelfTimerShotInterval',
11081             PrintConv => {
11082             0 => '0.5 s',
11083             1 => '1 s',
11084             2 => '2 s',
11085             3 => '3 s',
11086             },
11087             },
11088             51 => { Name => 'PlaybackMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc4-a
11089             53 => { Name => 'MenuMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc4-b
11090             55 => { Name => 'ShootingInfoMonitorOffTime',%powerOffDelayTimesZ9 }, # CSc4-c
11091             57 => { Name => 'ImageReviewMonitorOffTime', %powerOffDelayTimesZ9 }, # CSc4-d
11092             59 => { Name => 'CLModeShootingSpeed', ValueConv => '$val + 1', ValueConvInv => '$val - 1', PrintConv => '"$val fps"', PrintConvInv => '$val=~s/\s*fps//i; $val' }, # CSd1b
11093             61 => { # CSd2 # values: 1-200 & 'No Limit'
11094             Name => 'MaxContinuousRelease',
11095             Format => 'int16s',
11096             ValueConv => '($val eq -1 ? \'No Limit\' : $val ) ',
11097             },
11098             65 => { Name => 'SyncReleaseMode', PrintConv => { 0 => 'No Sync', 1 => 'Sync' }, Unknown => 1 }, # CSd4
11099             69 => { Name => 'LimitSelectableImageAreaDX', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-1
11100             70 => { Name => 'LimitSelectableImageArea1To1', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-2
11101             71 => { Name => 'LimitSelectableImageArea16To9', PrintConv => \%limitNolimit, Unknown => 1 }, # CSd6-3
11102             72 => { Name => 'FileNumberSequence', PrintConv => \%offOn }, # CSd7
11103             73 => { #CSa13b
11104             Name => 'FocusPeakingLevel',
11105             Unknown => 1,
11106             PrintConv => {
11107             0 => 'High Sensitivity',
11108             1 => 'Standard Sensitivity',
11109             2 => 'Low Sensitivity',
11110             },
11111             },
11112             75 => { #CSa13c
11113             Name => 'FocusPeakingHighlightColor',
11114             Unknown => 1,
11115             PrintConv => {
11116             0 => 'Red',
11117             1 => 'Yellow',
11118             2 => 'Blue',
11119             3 => 'White',
11120             },
11121             },
11122             81 => { Name => 'ContinuousModeDisplay', PrintConv => \%offOn }, # CSd12
11123             83 => { # CSe1-a Previous cameras reported this with HighSpeedSync indicator appended as '(Auto FP)'. Z9 separated the 2 fields.
11124             Name => 'FlashSyncSpeed',
11125             ValueConv => '($val-144)/8',
11126             PrintConv => {
11127             0 => '1/60 s',
11128             1 => '1/80 s',
11129             2 => '1/100 s',
11130             3 => '1/125 s',
11131             4 => '1/160 s',
11132             5 => '1/200 s',
11133             6 => '1/250 s',
11134             },
11135             },
11136             85 => { Name => 'HighSpeedSync', PrintConv => \%offOn }, # CSe1-b
11137             87 => { # CSe2
11138             Name => 'FlashShutterSpeed',
11139             ValueConv => 'my $t = ($val - 16) % 24; $t ? $val / 24 : 2 + ($val - 16) / 24', #unusual decode perhaps due to need to accommodate 4 new values?
11140             PrintConv => {
11141             0 => '1 s',
11142             1 => '1/2 s',
11143             2 => '1/4 s',
11144             3 => '1/8 s',
11145             4 => '1/15 s',
11146             5 => '1/30 s',
11147             6 => '1/60 s',
11148             7 => '30 s',
11149             8 => '15 s',
11150             9 => '8 s',
11151             10 => '4 s',
11152             11 => '2 s',
11153             },
11154             },
11155             89 => { Name => 'FlashExposureCompArea', PrintConv => { 0 => 'Entire Frame', 1 => 'Background Only' } }, # CSe3
11156             91 => { Name => 'AutoFlashISOSensitivity', PrintConv => { 0 => 'Subject and Background',1 => 'Subject Only'} }, # CSe4
11157             93 => { Name => 'ModelingFlash', PrintConv => \%offOn }, # CSe5
11158             95 => { # CSe6
11159             Name => 'AutoBracketModeM',
11160             PrintConv => {
11161             0 => 'Flash/Speed',
11162             1 => 'Flash/Speed/Aperture',
11163             2 => 'Flash/Aperture',
11164             3 => 'Flash Only',
11165             4 => 'Flash/ISO',
11166             },
11167             },
11168             97 => { Name => 'AutoBracketOrder', PrintConv => { 0 => '0,-,+',1 => '-,0,+' } }, # CSe7
11169             99 => { Name => 'Func1Button', %buttonsZ9}, # CSf2-a
11170             #101 Func1Button submenu: Preview 0 => 'Press To Recall', 1=> 'Hold To Recall' # CSf2-a
11171             #103 Func1Button submenu: AreaMode 0-7 => S, Dyn-S, Dyn-M, Dyn-L, Wide-S, Wide-L, 3D, Auto; 11=>n/a # CSf2-a
11172             #105 Func1Button submenu: AreaMode+AF-On 0-7 => S, Dyn-S, Dyn-M, Dyn-L, Wide-S, Wide-L, 3D, Auto; 11=>n/a # CSf2-a
11173             #109 Func1Button submenu: SynchronizedRelease 1=>'Master', 2=>'Remote' # CSf2-a
11174             #111 Func1Button submenu: Zoom 0=>'Zoom (Low)', 2=>'Zoom (1:1)', 2=>'Zoom (High)' # CSf2-a
11175             #113 Func1Button & Func1ButtonPlayback submenu: Rating # CSf2-a & CSf3a 0=>'Candidate For Deletion' 6=>''None'
11176             115 => { Name => 'Func2Button', %buttonsZ9}, # CSf2-b
11177             #117 Func2Button submenu: Preview 0 => 'Press To Recall', 1=> 'Hold To Recall' # CSf2-b
11178             #119 Func2Button submenu: AreaMode 0-7 => S, Dyn-S, Dyn-M, Dyn-L, Wide-S, Wide-L, 3D, Auto; 11=>n/a # CSf2-b
11179             #121 Func2Button submenu: AreaMode+AF-On 0-7 => S, Dyn-S, Dyn-M, Dyn-L, Wide-S, Wide-L, 3D, Auto; 11=>n/a # CSf2-b
11180             #125 Func2Button submenu: SynchronizedRelease 1=>'Master', 2=>'Remote' # CSf2-b
11181             #127 Func2Button submenu: Zoom 0=>'Zoom (Low)', 2=>'Zoom (1:1)', 2=>'Zoom (High)' # CSf2-b
11182             #129 Func2Button & Func2ButtonPlayback submenu: Rating # CSf2-b & CSf3b 0=>'Candidate For Deletion' 6=>''None'
11183             131 => { Name => 'AFOnButton', %buttonsZ9}, # CSf2-c
11184             143 => { Name => 'SubSelector', %buttonsZ9, Unknown => 1}, # CSf2-g
11185             155 => { Name => 'AssignMovieRecordButton', %buttonsZ9, Unknown => 1}, # CSf2-m
11186             159 => { Name => 'LensFunc1Button', %buttonsZ9}, # CSf2-o
11187             167 => { Name => 'LensFunc2Button', %buttonsZ9}, # CSf2-p
11188             173 => { # CSf2-q
11189             Name => 'LensControlRing',
11190             PrintConv => {
11191             0 => 'None (Disabled)',
11192             1 => 'Focus (M/A)',
11193             2 => 'ISO Sensitivity',
11194             3 => 'Exposure Compensation',
11195             4 => 'Aperture',
11196             },
11197             },
11198             175 => { Name => 'MultiSelectorShootMode', %buttonsZ9}, # CSf2-h called the OK button in camera, tag name retained for compatibility
11199             179 => { Name => 'MultiSelectorPlaybackMode', %buttonsZ9}, # CSf3f
11200             183 => { Name => 'ShutterSpeedLock', PrintConv => \%offOn }, # CSf4-a
11201             184 => { Name => 'ApertureLock', PrintConv => \%offOn }, # CSf4-b
11202             185 => { # CSf5-a Previous cameras reported this tag as part of CmdDialsReverseRotation. Blend with CSf5-b separate settings together to match extant tag name and values
11203             Name => 'CmdDialsReverseRotExposureComp',
11204             RawConv => '$$self{CmdDialsReverseRotExposureComp} = $val',
11205             #Hidden => 1,
11206             },
11207             186 => [{ # CSf5-a (continued from above)
11208             Name => 'CmdDialsReverseRotation',
11209             Condition => '$$self{CmdDialsReverseRotExposureComp} == 0',
11210             PrintConv => {
11211             0 => 'No',
11212             1 => 'Shutter Speed & Aperture',
11213             },
11214             },{
11215             Name => 'CmdDialsReverseRotation',
11216             PrintConv => {
11217             0 => 'Exposure Compensation',
11218             1 => 'Exposure Compensation, Shutter Speed & Aperture',
11219             },
11220             }],
11221             191 => { Name => 'UseDialWithoutHold', PrintConv => \%offOn, Unknown => 1 }, # CSf6
11222             193 => { Name => 'ReverseIndicators', PrintConv => { 0 => '+ 0 -', 1 => '- 0 +' }, Unknown => 1 }, # CSf7
11223             195 => { Name => 'MovieFunc1Button', %buttonsZ9}, # CSg2-a
11224             199 => { Name => 'MovieFunc2Button', %buttonsZ9}, # CSg2-b
11225             203 => { Name => 'MovieAF-OnButton', %buttonsZ9}, # CSg2-f
11226             207 => { Name => 'MovieMultiSelector', %buttonsZ9, Unknown => 1}, # CSg2-h
11227             215 => { # CSg2-z
11228             Name => 'MovieLensControlRing',
11229             PrintConv => {
11230             0 => 'None (Disabled)',
11231             2 => 'ISO Sensitivity',
11232             3 => 'Exposure Compensation',
11233             4 => 'Power Aperture',
11234             5 => 'Hi-Res Zoom',
11235             },
11236             },
11237             221 => { Name => 'MovieAFSpeed', ValueConv => '$val - 5', ValueConvInv => '$val + 5' }, # CSg6-a
11238             223 => { Name => 'MovieAFSpeedApply', PrintConv => {0 => 'Always', 1 => 'Only During Recording'},}, # CSg6-b
11239             225 => { # CSg7
11240             Name => 'MovieAFTrackingSensitivity',
11241             PrintConv => {
11242             0 => '1 (High)',
11243             1 => '2',
11244             2 => '3',
11245             3 => '4 (Normal)',
11246             4 => '5',
11247             5 => '6',
11248             6 => '7 (Low)',
11249             },
11250             },
11251             279 => { Name => 'LCDIllumination', PrintConv => \%offOn, Unknown => 1 }, # CSd11
11252             280 => { Name => 'ExtendedShutterSpeeds', PrintConv => \%offOn }, # CSd5
11253             281 => { Name => 'SubjectMotion', PrintConv => {0 => 'Erratic', 1 => 'Steady'} }, # CSa3-b
11254             283 => { Name => 'FocusPointPersistence', PrintConv => {0 => 'Auto', 1 => 'Off'} }, # CSa7
11255             285 => { Name => 'AutoFocusModeRestrictions', PrintConv => \%focusModeRestrictionsZ9, Unknown => 1}, # CSa9
11256             289 => { Name => 'CHModeShootingSpeed', ValueConv => '$val + 1', ValueConvInv => '$val - 1', PrintConv => '"$val fps"', PrintConvInv => '$val=~s/\s*fps//i; $val' }, # CSd1a
11257             293.1 => { Name => 'LimitReleaseModeSelCL', Mask => 0x02, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-a
11258             293.2 => { Name => 'LimitReleaseModeSelCH', Mask => 0x04, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-b
11259             293.3 => { Name => 'LimitReleaseModeSelC30', Mask => 0x10, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-e
11260             293.4 => { Name => 'LimitReleaseModeSelC120', Mask => 0x40, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-c
11261             293.5 => { Name => 'LimitReleaseModeSelSelf', Mask => 0x80, PrintConv => \%limitNolimit, Unknown => 1 }, # CSd3-d
11262             297 => { Name => 'FlashBurstPriority', PrintConv => { 0 => 'Frame Rate',1 => 'Exposure'}, Unknown => 1 }, # CSe8
11263             301 => { Name => 'VerticalFuncButton', %buttonsZ9}, # CSf2-c
11264             305 => { Name => 'Func3Button', %buttonsZ9}, # CSf2-c
11265             309 => { Name => 'VerticalAFOnButton', %buttonsZ9}, # CSf2-l
11266             317 => { Name => 'VerticalMultiSelectorPlaybackMode', PrintConv => { 0 => 'Image Scroll L/R', 1 => 'Image Scroll Up/Down' }, Unknown => 1}, # CSf3-j
11267             319 => { Name => 'MovieFunc3Button', %buttonsZ9}, # CSg2-c
11268             359 => { Name => 'LimitAF-AreaModeSelDynamic_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
11269             360 => { Name => 'LimitAF-AreaModeSelDynamic_M', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
11270             361 => { Name => 'LimitAF-AreaModeSelDynamic_L', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
11271             363 => { Name => 'LimitAF-AreaModeSel3DTracking', PrintConv => \%limitNolimit, Unknown => 1 }, # CSa8
11272             365 => { Name => 'PlaybackFlickUp', PrintConv => \%flicksZ9, Unknown => 1}, # CSf11-a
11273             369 => { Name => 'PlaybackFlickDown', PrintConv => \%flicksZ9, Unknown => 1}, # CSf11-b
11274             373 => { Name => 'ISOStepSize', PrintConv => \%thirdHalfFull }, # CSb1
11275             379 => { Name => 'ReverseFocusRing', PrintConv => { 0 => 'Not Reversed', 1 => 'Reversed' } }, # CSf8
11276             380 => { Name => 'EVFImageFrame', PrintConv => \%offOn, Unknown => 1 }, # CSd14
11277             381 => { Name => 'EVFGrid', PrintConv => \%evfGridsZ9, Unknown => 1 }, # CSd15
11278             383 => { Name => 'VirtualHorizonStyle', PrintConv => {0 => 'Type A (Cockpit)', 1 => 'Type B (Sides)' }, Unknown => 1}, #CSd16
11279             397 => { Name => 'Func4Button', %buttonsZ9, Unknown => 1}, # CSf2-e
11280             403 => { Name => 'AudioButton', %buttonsZ9, Unknown => 1}, # CSf2-i
11281             405 => { Name => 'QualityButton', %buttonsZ9, Unknown => 1}, # CSf2-j
11282             423 => { Name => 'VerticalMultiSelector', %buttonsZ9, Unknown => 1}, # CSf2-k
11283             445 => { Name => 'Func1ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-a
11284             447 => { Name => 'Func2ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-b
11285             449 => { Name => 'Func3ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-c
11286             455 => { Name => 'Func4ButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-e
11287             461 => { Name => 'MovieRecordButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-m
11288             463 => { Name => 'VerticalFuncButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-d
11289             465 => { Name => 'AudioButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-g
11290             471 => { Name => 'QualityButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-h
11291             477 => { Name => 'WhiteBalanceButtonPlaybackMode', %buttonsZ9, Unknown => 1}, # CSf3-i
11292             483 => { Name => 'CommandDialPlaybackMode', PrintConv => \%dialsZ9, Unknown => 1}, # CSf3-k
11293             485 => { # CSf3-m2
11294             Name => 'CommandDialVideoPlaybackMode',
11295             Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.00"',
11296             PrintConv => \%dialsVideoZ9,
11297             Unknown => 1
11298             },
11299             487 => { Name => 'SubCommandDialPlaybackMode', PrintConv => \%dialsZ9, Unknown => 1}, # CSf3-l
11300             489 => { # CSf3-n2
11301             Name => 'SubCommandDialVideoPlaybackMode',
11302             Condition => '$$self{FirmwareVersion} and $$self{FirmwareVersion} ge "05.00"',
11303             PrintConv => \%dialsVideoZ9,
11304             Unknown => 1
11305             },
11306             491 => { Name => 'FocusPointLock', PrintConv => \%offOn, Unknown => 1}, # CSf4-c
11307             493 => { Name => 'ControlRingResponse', PrintConv => { 0 => 'High', 1 => 'Low' } }, # CSf10
11308             505 => { Name => 'VerticalMovieFuncButton', %buttonsZ9, Unknown => 1}, # CSg2-d
11309             529 => { Name => 'VerticalMovieAFOnButton', %buttonsZ9, Unknown => 1}, # CSg2-l
11310             #539 => { Name => 'MovieAFAreaMode', %buttonsZ9, Unknown => 1}, # CSg2-e #28 this feels incorrect - MovieAFAreaMode is set in the Photo Shooting Menu and the tag should be in Nikon.pm
11311             #545 => { Name => 'MovieLimitAF-AreaModeSelWideAF_S', PrintConv => \%limitNolimit, Unknown => 1 }, # CSg4-a
11312             #546 => { Name => 'MovieLimitAF-AreaModeSelWideAF_W', PrintConv => \%limitNolimit, Unknown => 1 }, # CSg4-b
11313             #547 => { Name => 'MovieLimitAF-AreaModeSelSubjectTrack', PrintConv => \%limitNolimit, Unknown => 1 }, # CSg4-c
11314             #548 => { Name => 'MovieLimitAFAreaModeSelAuto', PrintConv => \%limitNolimit, Unknown => 1 }, # CSg4-d
11315             #549 => { Name => 'MovieAutoFocusModeRestrictions', PrintConv => \%focusModeRestrictionsZ9, Unknown => 1}, # CSa9
11316             551 => { Name => 'HDMIViewAssist', PrintConv => \%offOn, Unknown => 1 }, # CSg12
11317             553 => { # CSg13-a
11318             Name => 'ZebraPatternToneRange',
11319             Unknown => 1,
11320             RawConv => '$$self{ZebraPatternToneRange} = $val',
11321             PrintConv => {
11322             0 => 'Off',
11323             1 => 'Highlights',
11324             2 => 'Midtones',
11325             },
11326             },
11327             555 => { Name => 'MovieZebraPattern', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} != 0', PrintConv => {0 => 'Pattern 1', 1 => 'Pattern 2'}, Unknown => 1}, # CSg13-b
11328             557 => { Name => 'MovieHighlightDisplayThreshold', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} == 1', Unknown => 1 }, # CSg13-c 120-25 when highlights are the selected tone range
11329             559 => { Name => 'MovieMidtoneDisplayValue', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} == 2', Unknown => 1 }, # CSg13-d1 when midtones are the selected tone range
11330             561 => { Name => 'MovieMidtoneDisplayRange', Condition => '$$self{ZebraPatternToneRange} and $$self{ZebraPatternToneRange} == 2', PrintConv => '"+/-$val"', Unknown => 1 }, # CSg13-d2 when midtones are the selected tone range
11331             #563 CS g-14 LimitZebraPatternToneRange 0=>'No Restrictions', 1=> 'Highlights', 2=> 'Midtones'
11332             565 => { Name => 'MovieEVFGrid', PrintConv => \%evfGridsZ9, Unknown => 1 }, # CSg15
11333             573 => { Name => 'MovieShutterSpeedLock', PrintConv => \%offOn, Unknown => 1}, # CSg3-a
11334             574 => { Name => 'MovieFocusPointLock', PrintConv => \%offOn, Unknown => 1}, # CSg3-c
11335             587 => { Name => 'MatrixMetering', PrintConv => { 0 => 'Face Detection Off', 1 => 'Face Detection On' }, Unknown => 1 }, # CSb4
11336             588 => { Name => 'AF-CFocusDisplay', PrintConv => \%offOn }, # CSa11c
11337             589 => { Name => 'FocusPeakingDisplay', PrintConv => \%offOn, Unknown => 1}, # CSa13a
11338             591 => { # CSb7
11339             Name => 'KeepExposure',
11340             PrintConv => {
11341             0 => 'Off',
11342             1 => 'Shutter Speed',
11343             2 => 'ISO',
11344             },
11345             },
11346             #593 CSd (adjust viewfinder/monitor hue, brightness and/or white balance settings) 0=>'No adjustment', 1=>'Adjust'. Related ontrols & adjustments stored in following dozen bytes or so.
11347             609 => { Name => 'StarlightView', PrintConv => \%offOn, Unknown => 1 }, # CSd11
11348             611 => { # CSd12-a
11349             Name => 'EVFWarmDisplayMode',
11350             Unknown => 1,
11351             PrintConv => {
11352             0 => 'Off',
11353             1 => 'Mode 1',
11354             2 => 'Mode 2',
11355             },
11356             },
11357             613 => { # CSd12-b values in range -3 to +3
11358             Name => 'EVFWarmDisplayBrightness',
11359             Format => 'int8s',
11360             Unknown => 1,
11361             },
11362             615 => { #CSd15
11363             Name => 'EVFReleaseIndicator',
11364             Unknown => 1,
11365             PrintConv => {
11366             0 => 'Off',
11367             1 => 'Type A (Dark)',
11368             2 => 'Type B (Border)',
11369             3 => 'Type C (Sides)',
11370             },
11371             },
11372             625 => { Name => 'MovieApertureLock', PrintConv => \%offOn, Unknown => 1 }, # CSg3-b
11373             631 => { Name => 'FlickAdvanceDirection', PrintConv => { 0 => 'Left to Right', 1 => 'Right to Left' }, Unknown => 1 }, # CSf13-c
11374             );
11375             1; # end
11376              
11377             __END__