# contributed by:
#	Kipp Cannon <kipp|gravity.phys.uwm.edu>
#
# brand:
#	Sony
# model no. of remote control:
#	RMT-V402A
# devices being controlled by this remote:
#	VCR (SLV-N750), TV (generic Sony)
#
# Notes:
# This remote came bundled with a Sony VCR model SLV-N750.  It has a switch
# on it that switches the remote between VCR and television operation
# (labeled TV/VIDEO).  The two modes of operation are listed as seperate
# remotes in this configuration file because several buttons (notably the
# numerals) produce different codes depending on the remote's mode.  The
# VCR's transport control buttons, for example PLAY, FF, etc., produce
# longer codes than the buttons on the rest of the remote, and so these too
# must be listed as a seperate remote which I have called the "SHUTTLE"
# functions.
#
# I have discovered that the VCR which this remote controls also responds
# to STOP, REW, etc., commands other than those produced by the remote.
# The universal remote that came with my satellite TV receiver produces
# "Sony" VCR codes different from those of my remote but which my VCR,
# nevertheless, responds to.  I have added these codes to this remote file,
# even though the remote doesn't produce them.  The idea here is to enable
# one to control the matching VCR by sending them, or to allow the computer
# to respond to universal remotes programmed for the VCR.  These extra
# codes match the format of the "VIDEO" codes below, so that's where they
# are listed.
#
# So to be clear:  the remote's buttons generate the codes in the "TV", and
# "SHUTTLE" lists below, and all the buttons in the "VIDEO" list excluding
# the "extra" codes;  the VCR responds to none of the "TV" codes, but all
# of the codes in the "SHUTTLE" and "VIDEO" lists including the extra
# codes.

begin remote
	name	Sony_RMT-V402A-VIDEO
	flags	SPACE_ENC|CONST_LENGTH
	eps	25

	frequency	40000
	header	2400	600
	one	1200	600
	zero	600	600
	gap	44835

	bits	7
	post_data_bits	5
	post_data	0x1A
	min_repeat	2

	begin codes
		KEY_EJECTCD          0x34
		KEY_POWER          0x54
		       0x2A
		 0x41
		   0x74
		DISPLAY        0x2D
		          0x63
		KEY_1              0x00
		KEY_2              0x40
		KEY_3              0x20
		KEY_4              0x60
		KEY_5              0x10
		KEY_6              0x50
		KEY_7              0x30
		KEY_8              0x70
		KEY_9              0x08
		KEY_0              0x48
		KEY_ENTER          0x68
		          0x0D
		KEY_CHANNELUP            0x04
		    0x79
		KEY_CHANNELDOWN            0x44
		KEY_RECORD            0x5C
		         0x35
		           0x62
		             0x14
		KEY_MENU           0x59
		 0x5D
# extra codes:
		KEY_STOP           0x0C
		KEY_FASTFORWARD             0x1C
		KEY_PLAY           0x2C
		KEY_PAUSE          0x4C
		KEY_REWIND            0x6C
	end codes
end remote


begin remote
	name	Sony_RMT-V402A-SHUTTLE
	flags	SPACE_ENC|CONST_LENGTH
	eps	25

	frequency	40000
	header	2400	600
	one	1200	600
	zero	600	600
	gap	44835

	bits	7
	post_data_bits	8
	post_data	0x5D
	min_repeat	2

	begin codes
		REPLAY    0x6D
		PAUSE/UP  0x38
		FF/RIGHT  0x44
		STOP/DOWN 0x78
		REW/LEFT  0x04
		PLAY/OK   0x0C
	end codes
end remote


begin remote
	name	Sony_RMT-V402A-TV
	flags	SPACE_ENC|CONST_LENGTH
	eps	25

	frequency	40000
	header	2400	600
	one	1200	600
	zero	600	600
	gap	44835

	bits	7
	post_data_bits	5
	post_data	0x10
	min_repeat	2

	begin codes
		POWER        0x54
		TV/VIDEO     0x52
		AUDIOMONITOR 0x74
		DISPLAY      0x2E
		1            0x00
		2            0x40
		3            0x20
		4            0x60
		5            0x10
		6            0x50
		7            0x30
		8            0x70
		9            0x08
		0            0x48
		ENTER        0x68
		CH+          0x04
		VOL+         0x24
		VOL-         0x64
		CH-          0x44
	end codes
end remote
