Translator

Thursday, March 14, 2019

Xbox Controller Swap

Code to move the controller player 1 to player 2 or Player 2 to 1
Hotkeys:
L2+DPAD LEFT set to player 1
L2+DPAD RIGHT set to player 2
L2+DPAD DOWN set to player 1 and 2

<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
  <CheatEntries>
    <CheatEntry>
      <ID>450</ID>
      <Description>"Xinput"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <LastState Value="" RealAddress="00000000"/>
      <Color>400000</Color>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>272</ID>
          <Description>"controller 1"</Description>
          <LastState Value="80 01 87 01 C0 E1 4F 00 50 8E 06" RealAddress="204FE0D0"/>
          <ShowAsHex>1</ShowAsHex>
          <VariableType>Array of byte</VariableType>
          <ByteLength>11</ByteLength>
          <Address>204FE0D0</Address>
          <Hotkeys>
            <Hotkey>
              <Action>Set Value</Action>
              <Keys>
                <Key>22534</Key>
                <Key>22547</Key>
              </Keys>
              <Value>80 02 87 01 40 E2 4F 00 60 95 06</Value>
              <ID>0</ID>
            </Hotkey>
            <Hotkey>
              <Action>Set Value</Action>
              <Keys>
                <Key>22534</Key>
                <Key>22546</Key>
              </Keys>
              <Value>80 01 87 01 C0 E1 4F 00 50 8E 06</Value>
              <ID>1</ID>
            </Hotkey>
          </Hotkeys>
        </CheatEntry>
        <CheatEntry>
          <ID>273</ID>
          <Description>"controller 2"</Description>
          <LastState Value="80 02 87 01 40 E2 4F 00 60 95 06" RealAddress="204FE140"/>
          <ShowAsHex>1</ShowAsHex>
          <VariableType>Array of byte</VariableType>
          <ByteLength>11</ByteLength>
          <Address>204FE140</Address>
          <Hotkeys>
            <Hotkey>
              <Action>Set Value</Action>
              <Keys>
                <Key>22534</Key>
                <Key>22547</Key>
              </Keys>
              <Value>80 01 87 01 C0 E1 4F 00 50 8E 06</Value>
              <ID>0</ID>
            </Hotkey>
            <Hotkey>
              <Action>Set Value</Action>
              <Keys>
                <Key>22534</Key>
                <Key>22546</Key>
              </Keys>
              <Value>80 02 87 01 40 E2 4F 00 60 95 06</Value>
              <ID>1</ID>
            </Hotkey>
            <Hotkey>
              <Action>Set Value</Action>
              <Keys>
                <Key>22534</Key>
                <Key>22545</Key>
              </Keys>
              <Value>80 01 87 01 C0 E1 4F 00 50 8E 06</Value>
              <ID>2</ID>
            </Hotkey>
          </Hotkeys>
        </CheatEntry>
        <CheatEntry>
          <ID>1134</ID>
          <Description>"control enemies"</Description>
          <LastState/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
originalcode:
add [eax],al
add [eax],al
add [eax],al
exit:
jmp returnhere
204F8110:
add al,[eax]
add [eax],al
add [eax],al
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
204F8110:
add [eax],al
add [eax],al
add [eax],al
//Alt: db 00 00 00 00 00 00
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
</CheatTable>




Tenchu mods by redmarch