<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE device PUBLIC "-//bengt-martensson.de//devices//en"
 "../dtds/devices.dtd">
<device id="oppo_dv983" name="Oppo DV-983H" vendor="Oppo" model="dv-983h" type="dvd">
  <jp1data>
    <setupcode value="1199"/>
  </jp1data>
  <commandset type="ir" protocol="nec1" deviceno="73" remotename="oppo_dv983">
    <!--"Custom Code",49,73,,Device,49B6,18870,,-->
    
    <command cmdref="power_toggle"	cmdno="26"/>
    <command cmdref="open_close"	cmdno="27"/>
    <command cmdref="setup"		cmdno="0"/>
    <command cmdref="power_on"		cmdno="90"/>
    <command cmdref="power_off"		cmdno="91"/>
    <command cmdref="in_usb"		cmdno="17" type="toggle"/>
    <command cmdref="play"		cmdno="86"/>
    <command cmdref="pause_toggle"	cmdno="20"/>
    <command cmdref="stop"		cmdno="82" remark="one stop allows resuming with play, two really stops"/>
    <command cmdref="rewind"		cmdno="85" remark="set speed backwards"/>
    <command cmdref="fast_forward"	cmdno="81" remark="set speed forwards"/>
    <command cmdref="next"		cmdno="80"/>
    <command cmdref="previous"		cmdno="84"/>
    <command cmdref="slow"		cmdno="78" remark="ignored on CDs"/>
    <command cmdref="a_b"		cmdno="77"/>
    <command cmdref="repeat"		cmdno="76"/>
    <command cmdref="title"		cmdno="72"/>
    <command cmdref="menu"		cmdno="64"/>
    <command cmdref="cmd_goto"		cmdno="74"/>
    <command cmdref="cmd_return"	cmdno="66"/>
    <command cmdref="cmd_0"		cmdno="4"/>
    <command cmdref="cmd_1"		cmdno="11"/>
    <command cmdref="cmd_2"		cmdno="7"/>
    <command cmdref="cmd_3"		cmdno="3"/>
    <command cmdref="cmd_4"		cmdno="10"/>
    <command cmdref="cmd_5"		cmdno="6"/>
    <command cmdref="cmd_6"		cmdno="2"/>
    <command cmdref="cmd_7"		cmdno="9"/>
    <command cmdref="cmd_8"		cmdno="5"/>
    <command cmdref="cmd_9"		cmdno="1"/>
    <command cmdref="plus10"		cmdno="8"/>
    <command cmdref="up"		cmdno="24"/>
    <command cmdref="down"		cmdno="16"/>
    <command cmdref="left"		cmdno="87"/>
    <command cmdref="right"		cmdno="79"/>
    <command cmdref="ok"		cmdno="83"/>
    <command cmdref="subtitle"		cmdno="75"/>
    <command cmdref="audio"		cmdno="71"/>
    <command cmdref="angle"		cmdno="73"/>
    <command cmdref="zoom"		cmdno="69"/>
    <command cmdref="osd"		cmdno="68"/>
    <command cmdref="info"		cmdno="13" remark="disk to go to?"/>
    <command cmdref="bookmark"		cmdno="88"/>
    <command cmdref="img_logo_capture"	cmdno="89"/>
    <command cmdref="volume_up"		cmdno="19"/>
    <command cmdref="volume_down"	cmdno="23"/>
    <command cmdref="mute_toggle"	cmdno="67"/>
    <command cmdref="audio_only"	cmdno="65"/>
    <command cmdref="pal_ntsc"		cmdno="22"/>
    <command cmdref="resolution"	cmdno="21" name="hdmi"/>
  </commandset>

  <commandset type="serial" protocol="rs232_9600_8n1" prefix="#" suffix="\r">
    <commandgroup description="Command without arguments or return values.">
      <command transmit="POW" cmdref="power_toggle" wakeup="yes"/>
      <command transmit="PON" cmdref="power_on" wakeup="yes"/>
      <command transmit="POF" cmdref="power_off"/>
      <command transmit="EJT" cmdref="open_close"/>
      <command transmit="BMK" cmdref="bookmark"/>
      <command transmit="SFD" cmdref="soundfield" type="cyclic"/>
      <command transmit="EQR" cmdref="equalizing"/>
      <command transmit="CAP" cmdref="img_logo_capture"/>
      <command transmit="BRW" cmdref="info"/>
      <command transmit="VUP" cmdref="volume_up"/>
      <command transmit="VDN" cmdref="volume_down"/>
      <command transmit="MUT" cmdref="mute_toggle"/>
      <command transmit="NU1" cmdref="cmd_1"/>
      <command transmit="NU2" cmdref="cmd_2"/>
      <command transmit="NU3" cmdref="cmd_3"/>
      <command transmit="NU4" cmdref="cmd_4"/>
      <command transmit="NU5" cmdref="cmd_5"/>
      <command transmit="NU6" cmdref="cmd_6"/>
      <command transmit="NU7" cmdref="cmd_7"/>
      <command transmit="NU8" cmdref="cmd_8"/>
      <command transmit="NU9" cmdref="cmd_9"/>
      <command transmit="NU0" cmdref="cmd_0"/>
      <command transmit="N10" cmdref="plus10"/>
      <command transmit="CLR" cmdref="clear"/>
      <command transmit="TTL" cmdref="title"/>
      <command transmit="MNU" cmdref="menu"/>
      <command transmit="NUP" cmdref="up"/>
      <command transmit="NLT" cmdref="left"/>
      <command transmit="NRT" cmdref="right"/>
      <command transmit="NDN" cmdref="down"/>
      <command transmit="SEL" cmdref="ok"/>
      <command transmit="SET" cmdref="setup"/>
      <command transmit="RET" cmdref="cmd_return"/>
      <command transmit="SUB" cmdref="subtitle"/>
      <command transmit="AUD" cmdref="audio"/>
      <command transmit="ANG" cmdref="angle"/>
      <command transmit="ZOM" cmdref="zoom"/>
      <command transmit="PLP" cmdref="play_pause"/>
      <command transmit="STP" cmdref="stop"/>
      <command transmit="GOT" cmdref="cmd_goto"/>
      <command transmit="REV" cmdref="rewind"/>
      <command transmit="FWD" cmdref="fast_forward"/>
      <command transmit="ATB" cmdref="a_b"/>
      <command transmit="PRE" cmdref="previous"/>
      <command transmit="NXT" cmdref="next"/>
      <command transmit="RPT" cmdref="repeat"/>
      <command transmit="OSD" cmdref="osd"/>
      <command transmit="KBD" cmdref="keyboard"/><!-- ??? -->
      <command transmit="SLW" cmdref="slow"/>
      <command transmit="HDM" cmdref="resolution"/>
      <command transmit="SYS" cmdref="pal_ntsc"/>
      <command transmit="PLA" cmdref="play"/>
      <command transmit="PAU" cmdref="pause_toggle"/>
    </commandgroup>

    <commandgroup description="Commands without parameters, but with returnvalue.">
      <!-- appears not be be correctly implemented -->
      <!--command cmdref="get_power" transmit="QPW" remark="Query power on or off status" response_lines="1">
	<returnvalues>
	  <description>
	POWER ON
	POWER OFF
	  </description>
	</returnvalues>
      </command-->
      <command cmdref="get_version" transmit="QVR" remark="Query firmware version" response_lines="1">
	<returnvalues>
	  <description>DV983H-05-0303</description>
	</returnvalues>
      </command>
      <command cmdref="get_volume" transmit="QVL" remark="Query volume setting"
	response_lines="1">
	<returnvalues>
	  <description>Volume is XX (XX = 00 - 20, 0 is mute)</description>
	</returnvalues>
      </command>
      <command cmdref="get_soundfield" transmit="QSF" remark="Query sound field setting" 
	response_lines="1">
	<returnvalues>
	  <description>
	Off
	Concert
	Living Room
	Hall
	Bathroom
	Cave
	Arena
	Church
          </description>
	</returnvalues>
      </command>
      <command cmdref="get_equalizing" transmit="QEQ" remark="Query EQ mode" response_lines="1">
	<returnvalues>
	  <description>
	None
	Rock
	Pop
	Live
	Dance
	Techno
	Classic
	Soft
          </description>
	</returnvalues>
      </command>
      <command cmdref="get_resolution" transmit="QHD" remark="Query output resolution" response_lines="1">
	<returnvalues>
	  <description>
	480I
	480P
	720P60
	1080I60
	1080P60
	576I
	576P
	720P50
	1080I50
	1080P50
          </description>
	</returnvalues>
      </command>
      <command cmdref="get_title" transmit="QTK" remark="Query title playing" response_lines="1">
	<returnvalues>
	  <description>
	XX/YY
	Current title number / Total
	title number
<!-- broken on CD -->
          </description>
	</returnvalues>
      </command>
      <command cmdref="get_chapter" transmit="QCH" remark="Query chapter playing"
	response_lines="1">
	<returnvalues>
	  <description>XX/YY
	Current chapter number / Total chapter number
</description>
	</returnvalues>
      </command>
      <command cmdref="get_elapsed_time" transmit="QTE" remark="Query title elapsed time" response_lines="1">
	<returnvalues>
	  <description>H:MM:SS</description>
	</returnvalues>
      </command>
      <command cmdref="get_remaining_time" transmit="QTR" remark="Query title remaining time"
	response_lines="1">
	<returnvalues>
	  <description>H:MM:SS</description>
	</returnvalues>

      </command>
      <command cmdref="get_chapter_elapsed_time" transmit="QCE" remark="Query chapter elapsed time"
	response_lines="1">
	<returnvalues>
	  <description>H:MM:SS</description>
	</returnvalues>
      </command>
      <command cmdref="get_chapter_remaining_time" transmit="QCR" remark="Query chapter remaining time" response_lines="1">
	<returnvalues>
	  <description>H:MM:SS</description>
	</returnvalues>
      </command>
      <command cmdref="get_total_elapsed_time" transmit="QEL" remark="Query total elapsed time"
	response_lines="1">
	<returnvalues>
	  <description>H:MM:SS</description>
	  <!-- broken on CDs -->
	</returnvalues>
      </command>
      <command cmdref="get_total_remaining_time" transmit="QRE" remark="Query
	total remaining time" response_lines="1">
	<returnvalues>
	  <description>H:MM:SS</description>
	  <!-- broken on CDs -->
	</returnvalues>
      </command>
      <command cmdref="get_disc_type" transmit="QDT" remark="Query disc type" response_lines="1">
	<returnvalues>
	  <description>
	Opening 
	No disc
	Loading
	DVD-Video
	DVD-Audio
	SACD
	CD-DA
          </description>
	</returnvalues>
      </command>
      <command cmdref="get_audio_type" transmit="QAT" remark="Query audio type" response_lines="1">
	<returnvalues>
	  <description>
	EEE X/Y ZZZZZ
	EE - Encoding
	X -  Current audio track
	Y -  Total audio tracks
	ZZZZZ - Language
          </description>
	</returnvalues>
      </command>
      <command cmdref="get_subtitle_type" transmit="QST" remark="Query subtitle type" response_lines="1">
	<returnvalues>
	  <description>
	X/Y ZZZZZ
	X - Current subtitle track
	Y - Total subtitle tracks
	ZZZZZ - Language
          </description>
	</returnvalues>
      </command>
    </commandgroup>

    <commandgroup description="Commands with a parameter.">
      <command cmdref="set_resolution" transmit="SHD $1" remark="Set output resolution.">
	<argument name="resolution">
	  <description>
	The resolution parameter can be one of the followings:
	480P 	
	720P60 	
	1080I60 	
	1080P60 	
	576P 	
	720P50 	
	1080I50 	
	1080P50 	
	480PAUTO
	720PAUTO
	1080IAUTO
	1080PAUTO
	Playback must be stopped before changing the output resolution.
<!-- Note that only upper case is accepted -->
          </description>
	</argument>
      </command>
      <command cmdref="set_volume" transmit="SVL $1" remark="Set volume.">
	<argument name="volume">
	  <description>	The volume parameter can be one of the followings:
	MUTE
	00-20</description>
	</argument>
      </command>

      <command cmdref="set_forward_speed" transmit="SFF $1" remark="Fast forward">
	<argument name="speed">
	  <description>The speed parameter can be one of the followings:
	1X 	
	2X 	
	4X 	
	8X 	
	16X 	
	32X
</description>
	</argument>
      </command>
      <command cmdref="set_reverse_speed" transmit="SRV $1" remark="Fast reverse">
	<argument name="speed">
	<description>The speed parameter can be one of the followings:
	1X 	
	2X 	
	4X 	
	8X 	
	16X 	
	32X</description>
	</argument>
      </command>

      <command cmdref="set_repeat" transmit="SRP $1" remark="Set repeat mode.">
	<argument name="mode">
	  <description>The mode parameter can be one of the followings:
	CH 	Repeat chapter
	TT 	Repeat title
	ALL 	Repeat all
	OFF     Repeat off
	SHF 	Shuffle
	RND 	Random
	Depending on the disc type, some repeat mode may not be applicable.</description>
	</argument>
      </command>

      <command cmdref="set_position" transmit="SRH $1" remark="Search to position.">
	<argument name="position">
<description>
	The position parameter can be one of the followings:
	TXX CYYY Search to Chapter YYY of Title XX
	TXX H:MM:SS Search to elapsed time H:MM:SS of Title XX
	CXXX H:MM:SS Search to elapsed time H:MM:SS of Chapter XXX
	TXX Search to Title XX
	CXXX Search to Chapter XXX
	H:MM:SS Search to total elapsed time H:MM:SS
	The disc may prohibit some of the search function.</description>
	</argument>
      </command>
    </commandgroup>
  </commandset>
</device>
