Device Multiplexer Special Protocol
===================================

Because the 1K extender needs to be kept as small as possible,
this special protocol is not pre-installed with the extender as
is done with most other extenders. If you want to use it, you
must install the device (TV/1101) and protocol (1FE) upgrades
below in IR.EXE after the extender has been installed.

This version of the Device Multiplexer is specific to the
Atlas DVR 1K extender.

Upgrade Code 0 = 0C 4D (TV/1101)
 FE 00 01
End

Upgrade Protocol 0 = 01 FE (S3C8+)
 00 00 02 08 A3 02 00 06 C0 4E F5 03 C0 83 C0 04
 AF
End

This protocol allows you to assign two or more Setup Codes 
to the same device button. At the press of a button, you can
choose which Setup Code is the active one.

Use the the Keymap Master Spreadsheet to calculate the value
for the EFC/Hex Cmd section of the Key Move.

On the Setup sheet,

1) Choose the Remote.

2) Choose the Device Type and enter the Setup Code for the device
you want to switch to.

3) Make sure that the first two digits of the ProtocolID is "00".
If it is not, change the Protocol Name to "NEC1".

4) Look at the Upgrade code section and use the values after
"Upgrade code 0 = " (shown as "XX XX" below.)

Upgrade code 0 = XX XX  (.../....)
 5A 00 01 00 FF FF                              
End


When you create the Key Move:

1) The Device portion of "Bound key" is the device key whose
setup code you want to change (and the device which must be
active when you perform the change).

2) The Key portion of "Bound key" is the key you want to use
to perform the change.

3) Specify "TV" and "1101" in the Device Type and Setup code of
the Key Move.

4) In the EFC/Hex Cmd section, you must select Hex Cmd (not
EFC) and enter the pair of two digit hex values computed in
above steps.

Some examples:

    DVD/Shift-A = TV/1101  10 A2
    will change the DVD button to code VCR/DVD/0162

    DVD/Shift-B = TV/1101  12 3B
    will change the DVD button to code VCR/DVD/0571

    DVD/Shift-C = TV/1101  04 E8
    will change the DVD button to code TV/1256

The Setup Code change is remembered, so you can press
other device buttons and then press VCR again, and still
control the last device you selected.


If you want to re-assemble the extender with this protocol built-in,
copy the source code below and paste into the extender .asm file
in the area indicated.

;-----------------------------------------------------------
; ---- Device/Protocol upgrades for Device Multiplexer
					xorg	D_addr
					org	$$
tv_1101:
	db	FE	;Protocol = 0x1FE
	db	0	;No digit map
	db	1	;No defined keys

					D_addr = $$
					xorg	P_addr
					org	$$
Protocol_1FE:
	db	00,00,02
					org	Ram
	LD	RC0, R_DevO
	ADD	RC0, RC0
	ADD	RC0, 4E
	LD	@RC0, R03
	PUSHUI	@RC0, R04
	RET
					P_addr = $$
					xorg	D_table+2+DT_index+DT_index
					org	$$
	dw	0C4D		;Type=TV, Protocol>255, setup code = 0x44D = 1101
					xorg	D_table2+DT_index+DT_index
					org	$$
	dw	tv_1101
					xorg	P_table+2+DT_index+DT_index
					org	$$
	dw	1FE		;Protocol ID
					xorg	P_table2+DT_index+DT_index
					org	$$
	dw	Protocol_1FE
					DT_index = DT_index+1

;-----------------------------------------------------------
