├── obj └── dummy.txt ├── .gitignore ├── icon.ico ├── cheats ├── PS2 │ ├── 8966730F.pnach │ ├── B4A004F2.pnach │ ├── 785B28DA.pnach │ ├── 67A29886.pnach │ ├── FBB5290C.pnach │ ├── 23510F99.pnach │ ├── 44A5FA15.pnach │ ├── 42DF8C8C.pnach │ ├── EFE4448F.pnach │ └── 327053E8.pnach ├── PS1 │ ├── Baroque_SLPM-86328.cht │ ├── Disruptor_SLUS-00224.cht │ ├── DukeNukemTimeToKill_SLUS-00583.cht │ ├── LSDDreamEmulator_SLPS-01556.cht │ ├── Powerslave_SLUS-00102.cht │ ├── Hellnight_SLES-10562.cht │ ├── SouthPark_SLUS-00936.cht │ ├── IronSoldier3_SLUS-01061.cht │ ├── AquanautsHoliday_SCUS-94603.cht │ ├── Hybrid_SLES-03531.cht │ ├── Hybrid_SLPS-01102.cht │ ├── AlienTrilogy_SLUS-00007.cht │ └── JumpingFlash_SCUS-94103.cht ├── GC │ └── TurokEvolutionGTKE51.txt └── N64 │ └── 007 The World Is Not Enough (USA) │ ├── Project64 │ └── 007 - The World is Not Enough (U).cht │ └── RA_Mupen64Plus-Next │ └── 007 - The World Is Not Enough (USA).cht ├── patches ├── PS1 │ └── 007TWINE_SLUS-01272_patch.xdelta └── SNES │ └── Wild Guns (No CursorX Movement) (USA).ips ├── joystick.h ├── inputprofiles ├── PCSX2 │ ├── Time Crisis II MouseInjector.ini │ ├── Ninja Assault MouseInjector.ini │ ├── Vampire Night MouseInjector.ini │ ├── Resident Evil Dead Aim MouseInjector.ini │ ├── Gunslinger Girl Vol. 1 MouseInjector.ini │ ├── King's Field IV MouseInjector.ini │ ├── Eternal Ring (Type-C) MouseInjector.ini │ ├── 50 Cent Bulletproof MouseInjector.ini │ ├── Quake III - Revolution MouseInjector.ini │ ├── Black MouseInjector.ini │ ├── Michigan Report from Hell MouseInjector.ini │ ├── Urban Chaos - Riot Response MouseInjector.ini │ ├── Call of Duty - Finest Hour MouseInjector.ini │ ├── Tribes - Aerial Assault MouseInjector.ini │ ├── Cold Winter (Preset 4) MouseInjector.ini │ ├── 007 - Agent Under Fire (A).ini │ ├── Red Dead Revolver MouseInjector.ini │ ├── Darkwatch Mouse Injector.ini │ ├── Medal of Honor Vanguard MouseInjector.ini │ ├── Mercenaries Playground of Destruction MouseInjector.ini │ ├── TimeSplitters MouseInjector.ini │ ├── Robotech Invasion MouseInjector.ini │ ├── Call of Duty 3 MouseInjector.ini │ ├── Return to Castle Wolfenstein MouseInjector.ini │ ├── Ratchet and Clank Up Your Arsenal MouseInjector.ini │ ├── Armored Core 2 MouseInjector.ini │ ├── Serious Sam Next Encounter MouseInjector.ini │ ├── Beverly Hills Cop MouseInjector.ini │ ├── SOCOM 1 (Precision Shooter Preset) MouseInjector.ini │ ├── Global Defense Force MouseInjector.ini │ ├── Ghost in the Shell MouseInjector.ini │ ├── Jurassic The Hunted MouseInjector.ini │ ├── SWAT Global Strike Team MouseInjector.ini │ ├── No One Lives Forever MouseInjector.ini │ ├── GTA VC MouseInjector.ini │ ├── GTA III MouseInjector.ini │ └── GTA SA MouseInjector.ini ├── DuckStation │ ├── Revolution X.ini │ ├── Jumping Flash MouseInjector.ini │ ├── LSD Dream Emulator MouseInjector.ini │ ├── Resident Evil - Survivor MouseInjector.ini │ ├── Hellnight MouseInjector.ini │ ├── Baroque MouseInjector.ini │ ├── Echo Night MouseInjector.ini │ ├── Disruptor MouseInjector.ini │ ├── South Park MouseInjector.ini │ ├── Armored Core MouseInjector.ini │ ├── Shadow Tower MouseInjector.ini │ ├── Alien Trilogy MouseInjector.ini │ ├── Armorines - Project S.W.A.R.M..ini │ ├── Aquanaut's Holiday MouseInjector.ini │ ├── King's Field MouseInjector.ini │ ├── Note, The MouseInjector.ini │ ├── Uprising X MouseInjector.ini │ ├── King's Field II Mouse Injector.ini │ ├── Iron Soldier 3 MouseInjector.ini │ ├── Brahma Force MouseInjector.ini │ ├── Powerslave MouseInjector.ini │ ├── Codename - Tenka.ini │ ├── Hybrid MouseInjector.ini │ ├── MIB Crashdown.ini │ ├── G-Police MouseInjector.ini │ ├── Future Cop LAPD MouseInjector.ini │ ├── Medal of Honor - Underground.ini │ ├── 007 The World Is Not Enough MouseInjector.ini │ ├── Duke Nukem Time to Kill MouseInjector.ini │ └── Delta Force Urban Warfare MouseInjector.ini └── Dolphin │ └── Resident Evil 4.ini ├── manymouse ├── LICENSE.txt ├── manymouse.h └── manymouse.c ├── .github └── FUNDING.yml ├── mouse.h ├── TODO ├── games ├── game.h ├── blank.c ├── ps2_black.c ├── snes_starfox.c ├── sd_reddog.c ├── ps2_codwawff.c ├── psp_resistance.c ├── n64_megaman64.c ├── sd_makenx.c ├── n64_turokragewars.c ├── ps2_foreverkingdom.c ├── ss_virtualhydlide.c ├── ps1_disruptor.c ├── ps2_eternalring.c ├── ps2_deltaforce.c ├── ps2_q3.c ├── ps2_spiderman2.c ├── ps2_gsgirl1.c ├── ps2_nolf.c ├── ps2_50cbp.c ├── snes_cybernator.c ├── ps2_vampirenight.c ├── ps2_timecrisis2.c ├── ps1_revx.c ├── ps2_beverlyhillscop.c ├── ps1_expert.c ├── ps2_daemon.c ├── ps1_dnlotb.c ├── ps1_galegunner.c ├── ps2_urbanchaos.c ├── ps1_c12.c ├── ps1_hpss.c ├── ps1_populous.c ├── ss_pslave.c ├── ps2_shadowofrome.c ├── ps1_whksothr.c ├── ps2_gregmaxd.c ├── snes_shadrun.c ├── ps1_note.c ├── ps1_hybrid.c ├── ps1_hybrid_japan.c └── ps2_ninjaassault.c ├── icon.rc └── makefile /obj/dummy.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | obj/ 2 | .vscode/ 3 | *.exe 4 | mouseinjector.ini 5 | *.zip -------------------------------------------------------------------------------- /icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/regilopes/MouseInjectorDolphinDuck/HEAD/icon.ico -------------------------------------------------------------------------------- /cheats/PS2/8966730F.pnach: -------------------------------------------------------------------------------- 1 | gametitle=TimeSplitters(v2.00) SLUS-20090 0x8966730F 2 | 3 | // Always display crosshair 4 | //patch=1,EE,202817FC,word,AE270320 -------------------------------------------------------------------------------- /cheats/PS2/B4A004F2.pnach: -------------------------------------------------------------------------------- 1 | gametitle=TimeSplitters(v1.10) SLUS-20090 0xB4A004F2 2 | 3 | // Always display crosshair 4 | //patch=1,EE,2027E7A4,word,AE270320 -------------------------------------------------------------------------------- /patches/PS1/007TWINE_SLUS-01272_patch.xdelta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/regilopes/MouseInjectorDolphinDuck/HEAD/patches/PS1/007TWINE_SLUS-01272_patch.xdelta -------------------------------------------------------------------------------- /cheats/PS1/Baroque_SLPM-86328.cht: -------------------------------------------------------------------------------- 1 | #group=Ungrouped 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable CamY Adjust On Hit (MouseInjector)] 5 | 8001A2D4 0000 6 | -------------------------------------------------------------------------------- /cheats/PS1/Disruptor_SLUS-00224.cht: -------------------------------------------------------------------------------- 1 | #group=MouseInjector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable CamX] 5 | E00093AC 0053 6 | 800380A0 0000 7 | 8 | -------------------------------------------------------------------------------- /cheats/PS2/785B28DA.pnach: -------------------------------------------------------------------------------- 1 | gametitle=Ninja Assault SLUS-20492 0x785B28DA 2 | 3 | // Disable aim-lock 4 | patch=1,EE,00121070,word,00000000 5 | patch=1,EE,00121080,word,00000000 -------------------------------------------------------------------------------- /patches/SNES/Wild Guns (No CursorX Movement) (USA).ips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/regilopes/MouseInjectorDolphinDuck/HEAD/patches/SNES/Wild Guns (No CursorX Movement) (USA).ips -------------------------------------------------------------------------------- /cheats/PS1/DukeNukemTimeToKill_SLUS-00583.cht: -------------------------------------------------------------------------------- 1 | #group=MouseInjector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable Rotate X] 5 | E00092D4 0053 6 | 80057ADC 0000 7 | E00092D4 0053 8 | 80057ADE 0000 9 | -------------------------------------------------------------------------------- /cheats/PS1/LSDDreamEmulator_SLPS-01556.cht: -------------------------------------------------------------------------------- 1 | #group=MouseInjector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable CamY AutoCenter] 5 | 80059890 0000 6 | 80059892 0000 7 | 800598DC 0000 8 | 800598DE 0000 9 | -------------------------------------------------------------------------------- /cheats/PS1/Powerslave_SLUS-00102.cht: -------------------------------------------------------------------------------- 1 | #group=MouseInjector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable Auto-lookahead] 5 | E000934C 0053 6 | 80027910 0000 7 | E000934C 0053 8 | 80027912 0000 9 | 10 | -------------------------------------------------------------------------------- /cheats/PS2/67A29886.pnach: -------------------------------------------------------------------------------- 1 | gametitle=Destroy All Humans! SLUS-20945 0x67A29886 2 | 3 | [Disable Aim-Assist (requries restart to disable)] 4 | patch=1,EE,202223C0,extended,00000000 5 | patch=1,EE,202223DC,extended,00000000 -------------------------------------------------------------------------------- /joystick.h: -------------------------------------------------------------------------------- 1 | //extern int32_t xmouse, ymouse, mouse0, mouse1; 2 | 3 | extern int16_t rx, ry; 4 | extern int16_t smousex, smousey; 5 | 6 | 7 | extern uint8_t JOYSTICK_Init(); 8 | extern void JOYSTICK_Update(); 9 | extern void JOYSTICK_Quit(); -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Time Crisis II MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | R1 = Pointer-0/RightButton 3 | Cross = Pointer-0/LeftButton 4 | Up = Keyboard/W 5 | Down = Keyboard/S 6 | Left = Keyboard/A 7 | Right = Keyboard/D 8 | Start = Keyboard/Z 9 | Select = Keyboard/Tab 10 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Ninja Assault MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | Start = Keyboard/Z 7 | Select = Keyboard/Tab 8 | Triangle = Pointer-0/RightButton 9 | Cross = Pointer-0/LeftButton 10 | -------------------------------------------------------------------------------- /cheats/PS1/Hellnight_SLES-10562.cht: -------------------------------------------------------------------------------- 1 | #group=MouseInjector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable CamY] 5 | E0009244 0053 6 | 8005AAA4 0000 7 | E0009244 0053 8 | 8005AAA6 0000 9 | E0009244 0053 10 | 80057E90 0000 11 | E0009244 0053 12 | 80057E92 0000 13 | -------------------------------------------------------------------------------- /cheats/PS2/FBB5290C.pnach: -------------------------------------------------------------------------------- 1 | gametitle=Resident Evil: Dead Aim SLUS-20669 0xFBB5290C 2 | 3 | // Disable FPS Camera Auto-Center 4 | patch=1,EE,20233234,word,00000000 5 | patch=1,EE,2023328C,word,00000000 6 | 7 | // Disable Rounded Corner CamX Adjust 8 | patch=1,EE,201D96F4,word,00000000 -------------------------------------------------------------------------------- /cheats/PS2/23510F99.pnach: -------------------------------------------------------------------------------- 1 | gametitle=Mercenaries: Playground of Destruction SLUS-20932 0x23510F99 2 | 3 | // 60 fps 4 | //patch=1,EE,203AD720,extended,2C420001 5 | 6 | // disable aim-assist (also causes onFoot reticle to always remain neutral color) 7 | patch=1,EE,2032D21C,extended,AE200010 -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Revolution X.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | Square = Pointer-0/LeftButton 7 | Cross = Pointer-0/RightButton 8 | Triangle = Keyboard/Q 9 | Start = Keyboard/Z 10 | L2 = Keyboard/Tab 11 | -------------------------------------------------------------------------------- /cheats/PS1/SouthPark_SLUS-00936.cht: -------------------------------------------------------------------------------- 1 | #group=Ungrouped 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable CamY Slope Adjust (MouseInjector)] 5 | 800186B4 0000 6 | 7 | #group=Ungrouped 8 | #type=Gameshark 9 | #activation=EndFrame 10 | [*Disable CamY Rebound (MouseInjector)] 11 | 80018B6C 0000 12 | 13 | -------------------------------------------------------------------------------- /cheats/PS1/IronSoldier3_SLUS-01061.cht: -------------------------------------------------------------------------------- 1 | #group=MouseInjector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable Cruise Missile Pitch/Roll Auto-Center] 5 | E00A803C 3241 6 | 8005F97C 0000 7 | E00A803C 3241 8 | 8005F97E 0000 9 | E00A803C 3241 10 | 8005F99C 0000 11 | E00A803C 3241 12 | 8005F99E 0000 13 | 14 | -------------------------------------------------------------------------------- /cheats/PS2/44A5FA15.pnach: -------------------------------------------------------------------------------- 1 | gametitle=Dirge of Cerberus - Final Fantasy VII 0x44A5FA15 2 | 3 | [Disable Auto-Lookahead] 4 | patch=1,EE,2032D668,extended,00000000 5 | patch=1,EE,2032D168,extended,00000000 6 | patch=1,EE,2032CF7C,extended,00000000 7 | patch=1,EE,2032D66C,extended,00000000 8 | patch=1,EE,2032D8A0,extended,00000000 -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Vampire Night MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Cross = Pointer-0/LeftButton 3 | Triangle = Pointer-0/RightButton 4 | Start = Keyboard/Z 5 | Select = Keyboard/Tab 6 | Up = Keyboard/W 7 | Down = Keyboard/S 8 | Left = Keyboard/A 9 | Right = Keyboard/D 10 | 11 | 12 | [UI] 13 | EnableMouseMapping = false 14 | -------------------------------------------------------------------------------- /cheats/PS2/42DF8C8C.pnach: -------------------------------------------------------------------------------- 1 | gametitle=Destroy All Humans! 2 SLUS-21439 0x42DF8C8C 2 | 3 | [Write PlayerBasePointer (required by MouseInjector)] 4 | patch=1,EE,D01E8C50,extended,00000000 5 | patch=1,EE,201E8C50,extended,AD910020 6 | 7 | [Disable Aim Assist] 8 | patch=1,EE,201E8D28,extended,00000000 9 | patch=1,EE,201E8D40,extended,00000000 -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Resident Evil Dead Aim MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | R1 = Pointer-0/LeftButton 7 | R2 = Keyboard/R 8 | Triangle = Keyboard/Q 9 | Cross = Keyboard/E 10 | Start = Keyboard/Z 11 | Select = Keyboard/Tab 12 | L1 = Keyboard/Space 13 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Jumping Flash MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | Square = Pointer-0/LeftButton 7 | Cross = Keyboard/Space 8 | Circle = Pointer-0/RightButton 9 | Start = Keyboard/Z 10 | L2 = Keyboard/Shift 11 | Triangle = Keyboard/E 12 | Select = Keyboard/Tab 13 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/LSD Dream Emulator MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | L2 = Keyboard/A 5 | R2 = Keyboard/D 6 | Left = Keyboard/1 7 | Right = Keyboard/3 8 | Select = Keyboard/Tab 9 | Start = Keyboard/Z 10 | Triangle = Keyboard/R 11 | Square = Keyboard/F 12 | Cross = Keyboard/E 13 | Circle = Keyboard/Q 14 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Resident Evil - Survivor MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | Start = Keyboard/Z 7 | Select = Keyboard/Tab 8 | Cross = Pointer-0/LeftButton 9 | R1 = Pointer-0/RightButton 10 | L1 = Keyboard/E 11 | Square = Keyboard/Q 12 | Square = Keyboard/Shift 13 | -------------------------------------------------------------------------------- /cheats/PS1/AquanautsHoliday_SCUS-94603.cht: -------------------------------------------------------------------------------- 1 | #group=MouseInjector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable CamY Auto-Center] 5 | 80017F9C 0000 6 | 80017F9E 0000 7 | 80017F88 0000 8 | 80017F8A 0000 9 | 10 | #group=MouseInjector 11 | #type=Gameshark 12 | #activation=EndFrame 13 | [*Disable CamY Zero] 14 | 80017F74 0000 15 | 80017F76 0000 16 | 17 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Hellnight MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | L1 = Keyboard/A 5 | R1 = Keyboard/D 6 | Left = Keyboard/1 7 | Right = Keyboard/3 8 | Select = Keyboard/Z 9 | Start = Keyboard/Tab 10 | Triangle = Pointer-0/RightButton 11 | Cross = Pointer-0/LeftButton 12 | Square = Keyboard/Space 13 | Circle = Keyboard/E 14 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Gunslinger Girl Vol. 1 MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | Cross = Keyboard/Space 7 | Circle = Pointer-0/LeftButton 8 | Triangle = Keyboard/Q 9 | Square = Keyboard/E 10 | Start = Keyboard/Z 11 | Select = Keyboard/Tab 12 | L2 = Pointer-0/WheelY- 13 | R2 = Pointer-0/WheelY+ 14 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Baroque MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | L1 = Keyboard/A 5 | R1 = Keyboard/D 6 | Start = Keyboard/Z 7 | Select = Keyboard/Tab 8 | Circle = Pointer-0/LeftButton 9 | Cross = Keyboard/Space 10 | Square = Pointer-0/RightButton 11 | Triangle = Keyboard/E 12 | Left = Keyboard/1 13 | Right = Keyboard/3 14 | Type = DigitalController 15 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Echo Night MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Left = Keyboard/A 4 | Down = Keyboard/S 5 | Right = Keyboard/D 6 | Circle = Keyboard/Control 7 | Square = Keyboard/Q 8 | Cross = Keyboard/E 9 | Start = Keyboard/Z 10 | Select = Keyboard/Tab 11 | Triangle = Pointer-0/LeftButton 12 | L2 = Keyboard/I 13 | R2 = Keyboard/K 14 | L1 = Keyboard/J 15 | R1 = Keyboard/L 16 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Disruptor MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/J 5 | Right = Keyboard/L 6 | L2 = Keyboard/A 7 | R2 = Keyboard/D 8 | L1 = Keyboard/Q 9 | Triangle = Keyboard/E 10 | Cross = Pointer-0/LeftButton 11 | Circle = Keyboard/Space 12 | Square = Pointer-0/RightButton 13 | R1 = Keyboard/R 14 | Start = Keyboard/Z 15 | Select = Keyboard/Tab 16 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/South Park MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | R2 = Keyboard/I 7 | L2 = Keyboard/K 8 | L1 = Keyboard/J 9 | R1 = Keyboard/L 10 | Start = Keyboard/Z 11 | Select = Pointer-0/RightButton 12 | Cross = Keyboard/Space 13 | Square = Pointer-0/LeftButton 14 | Triangle = Keyboard/Q 15 | Circle = Keyboard/E 16 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/King's Field IV MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | Select = Keyboard/Tab 7 | Start = Keyboard/Z 8 | Square = Pointer-0/LeftButton 9 | L1 = Keyboard/J 10 | R1 = Keyboard/L 11 | L2 = Keyboard/I 12 | R2 = Keyboard/K 13 | Cross = Keyboard/E 14 | Triangle = Pointer-0/RightButton 15 | Circle = Keyboard/Space 16 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Armored Core MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | L1 = Keyboard/J 7 | R1 = Keyboard/L 8 | L2 = Keyboard/I 9 | R2 = Keyboard/K 10 | Select = Keyboard/Tab 11 | Start = Keyboard/Z 12 | Square = Pointer-0/LeftButton 13 | Cross = Keyboard/Space 14 | Circle = Pointer-0/RightButton 15 | Triangle = Keyboard/Q 16 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Shadow Tower MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | L1 = Keyboard/J 7 | R1 = Keyboard/L 8 | L2 = Keyboard/I 9 | R2 = Keyboard/K 10 | Start = Keyboard/Z 11 | Select = Keyboard/Tab 12 | Cross = Keyboard/E 13 | Square = Pointer-0/RightButton 14 | Triangle = Pointer-0/LeftButton 15 | Circle = Keyboard/Space 16 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Eternal Ring (Type-C) MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/A 5 | Right = Keyboard/D 6 | L2 = Keyboard/I 7 | R2 = Keyboard/K 8 | L1 = Keyboard/J 9 | R1 = Keyboard/L 10 | Select = Keyboard/Tab 11 | Start = Keyboard/Z 12 | Triangle = Pointer-0/LeftButton 13 | Cross = Keyboard/E 14 | Circle = Keyboard/Q 15 | Square = Pointer-0/RightButton 16 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Alien Trilogy MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | Left = Keyboard/1 5 | Right = Keyboard/3 6 | L1 = Keyboard/A 7 | R1 = Keyboard/D 8 | L2 = Keyboard/Space 9 | Select = Keyboard/Tab 10 | Start = Keyboard/Z 11 | R2 = Keyboard/Shift 12 | Triangle = Keyboard/E 13 | Circle = Pointer-0/RightButton 14 | Square = Pointer-0/LeftButton 15 | Cross = Keyboard/Q 16 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Armorines - Project S.W.A.R.M..ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Start = Keyboard/Z 3 | Select = Keyboard/Tab 4 | L2 = Keyboard/Control 5 | L1 = Keyboard/Shift 6 | R2 = Keyboard/S 7 | R1 = Keyboard/W 8 | Triangle = Keyboard/Space 9 | Cross = Pointer-0/LeftButton 10 | Circle = Keyboard/D 11 | Square = Keyboard/A 12 | Up = Keyboard/Q 13 | Right = Keyboard/E 14 | Down = Keyboard/F 15 | Left = Keyboard/R 16 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Aquanaut's Holiday MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Triangle = Keyboard/Space 3 | Square = Keyboard/Control 4 | Cross = Pointer-0/LeftButton 5 | Circle = Pointer-0/RightButton 6 | Left = Keyboard/A 7 | Right = Keyboard/D 8 | Up = Keyboard/W 9 | Down = Keyboard/S 10 | Start = Keyboard/Z 11 | Select = Keyboard/Tab 12 | L2 = Keyboard/Q 13 | R2 = Keyboard/E 14 | L1 = Keyboard/1 15 | R1 = Keyboard/3 16 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/King's Field MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/W 3 | Down = Keyboard/S 4 | L1 = Keyboard/A 5 | R1 = Keyboard/D 6 | Left = Keyboard/J 7 | Right = Keyboard/L 8 | L2 = Keyboard/I 9 | R2 = Keyboard/K 10 | Start = Keyboard/Z 11 | Select = Keyboard/Tab 12 | Circle = Keyboard/E 13 | Cross = Keyboard/Space 14 | Square = Pointer-0/RightButton 15 | Triangle = Pointer-0/LeftButton 16 | Type = DigitalController 17 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Note, The MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Square = Keyboard/A 3 | Circle = Keyboard/D 4 | Up = Keyboard/W 5 | Up = Keyboard/Up 6 | Right = Keyboard/Right 7 | Left = Keyboard/Left 8 | Down = Keyboard/S 9 | Down = Keyboard/Down 10 | Select = Keyboard/Tab 11 | Cross = Keyboard/E 12 | R1 = Pointer-0/LeftButton 13 | L1 = Keyboard/F 14 | R2 = Pointer-0/RightButton 15 | L2 = Pointer-0/Button3 16 | Start = Keyboard/Space 17 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Uprising X MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Up = Keyboard/W 4 | Right = Keyboard/D 5 | Down = Keyboard/S 6 | Left = Keyboard/A 7 | Triangle = Keyboard/R 8 | Circle = Keyboard/L 9 | Cross = Keyboard/E 10 | Square = Keyboard/J 11 | Select = Keyboard/Tab 12 | Start = Keyboard/Z 13 | L1 = Keyboard/Q 14 | R1 = Pointer-0/LeftButton 15 | L2 = Keyboard/Space 16 | R2 = Keyboard/F 17 | 18 | 19 | [Pad2] 20 | Type = None 21 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/King's Field II Mouse Injector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = DigitalController 3 | Up = Keyboard/W 4 | Right = Keyboard/L 5 | Down = Keyboard/S 6 | Left = Keyboard/J 7 | Triangle = Pointer-0/RightButton 8 | Circle = Keyboard/Space 9 | Cross = Keyboard/E 10 | Square = Pointer-0/LeftButton 11 | Select = Keyboard/Tab 12 | Start = Keyboard/Z 13 | L1 = Keyboard/A 14 | R1 = Keyboard/D 15 | L2 = Keyboard/I 16 | R2 = Keyboard/K 17 | 18 | 19 | [Pad2] 20 | Type = None 21 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/50 Cent Bulletproof MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Cross = Keyboard/Space 3 | Square = Keyboard/R 4 | L1 = Keyboard/Control 5 | R1 = Pointer-0/LeftButton 6 | LUp = Keyboard/W 7 | LDown = Keyboard/S 8 | LLeft = Keyboard/A 9 | LRight = Keyboard/D 10 | R2 = Keyboard/Tab 11 | Start = Keyboard/Z 12 | L2 = Keyboard/1 13 | Circle = Keyboard/E 14 | Triangle = Keyboard/Q 15 | Up = Keyboard/Up 16 | Down = Keyboard/Down 17 | Left = Keyboard/Left 18 | Right = Keyboard/Right 19 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Iron Soldier 3 MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Up = Keyboard/Up 4 | Right = Keyboard/Right 5 | Down = Keyboard/Down 6 | Left = Keyboard/Left 7 | Triangle = Keyboard/Shift 8 | Circle = Pointer-0/LeftButton 9 | Cross = Keyboard/E 10 | Square = Keyboard/Q 11 | Select = Keyboard/Tab 12 | Start = Keyboard/Z 13 | L1 = Pointer-0/RightButton 14 | R1 = Keyboard/W 15 | L2 = Keyboard/Space 16 | R2 = Keyboard/S 17 | 18 | 19 | [Pad2] 20 | Type = None 21 | -------------------------------------------------------------------------------- /cheats/PS2/EFE4448F.pnach: -------------------------------------------------------------------------------- 1 | gametitle=Jurassic The Hunted SLUS-21907 0xEFE4448F 2 | 3 | // 60 FPS 4 | patch=1,EE,2017D480,word,2C420001 5 | 6 | // write camBase to free address (required to use MouseInjector) 7 | patch=1,EE,20214B78,word,AF84FF00 // write camBase to 006BE670 | sw a0,-0x100(gp) 8 | patch=1,EE,20214B7C,word,0C06E7AA // move other opcodes down by one 9 | patch=1,EE,20214B80,word,8C4400E0 10 | patch=1,EE,20214B84,word,DFBF0000 11 | patch=1,EE,20214B88,word,03E00008 12 | patch=1,EE,20214B8C,word,27BD0010 -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Quake III - Revolution MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | L2 = Keyboard/Control 3 | L1 = Keyboard/Space 4 | Select = Keyboard/X 5 | Start = Keyboard/Z 6 | R1 = Pointer-0/LeftButton 7 | R2 = Pointer-0/RightButton 8 | Triangle = Keyboard/Tab 9 | Square = Keyboard/E 10 | Circle = Pointer-0/WheelY+ 11 | Cross = Pointer-0/WheelY- 12 | RUp = Keyboard/I 13 | RDown = Keyboard/K 14 | RLeft = Keyboard/J 15 | RRight = Keyboard/L 16 | Up = Keyboard/W 17 | Down = Keyboard/S 18 | Left = Keyboard/A 19 | Right = Keyboard/D 20 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Brahma Force MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Up = Keyboard/W 4 | Right = Keyboard/D 5 | Down = Keyboard/S 6 | Left = Keyboard/A 7 | Triangle = Keyboard/E 8 | Circle = Pointer-0/RightButton 9 | Cross = Keyboard/Space 10 | Square = Pointer-0/LeftButton 11 | Select = Keyboard/Tab 12 | Start = Keyboard/Z 13 | Analog = SDL-0/Guide 14 | L1 = Keyboard/J 15 | R1 = Keyboard/L 16 | L2 = Keyboard/K 17 | R2 = Keyboard/I 18 | L3 = SDL-0/LeftStick 19 | R3 = SDL-0/RightStick 20 | 21 | 22 | [Pad2] 23 | Type = None 24 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Black MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [UI] 2 | EnableMouseMapping = false 3 | 4 | 5 | [Pad1] 6 | R1 = Pointer-0/LeftButton 7 | Cross = Keyboard/R 8 | Start = Keyboard/Z 9 | Select = Keyboard/Tab 10 | L1 = Pointer-0/RightButton 11 | L2 = Keyboard/Control 12 | Right = Pointer-0/WheelY+ 13 | Left = Pointer-0/WheelY- 14 | Circle = Pointer-0/Button3 15 | Triangle = Keyboard/C 16 | R2 = Keyboard/G 17 | Square = Keyboard/F 18 | Up = Keyboard/Q 19 | Down = Keyboard/E 20 | LUp = Keyboard/W 21 | LDown = Keyboard/S 22 | LLeft = Keyboard/A 23 | LRight = Keyboard/D 24 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Powerslave MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Up = Keyboard/W 4 | Down = Keyboard/S 5 | Triangle = Keyboard/V 6 | Circle = Keyboard/E 7 | Cross = Keyboard/Space 8 | Square = Pointer-0/LeftButton 9 | Select = Keyboard/Tab 10 | Start = Keyboard/Z 11 | L1 = Keyboard/A 12 | R1 = Keyboard/D 13 | L2 = Keyboard/Q 14 | R2 = Keyboard/F 15 | Left = Keyboard/J 16 | Left = Keyboard/1 17 | Left = Pointer-0/Button4 18 | Right = Keyboard/L 19 | Right = Keyboard/3 20 | Right = Pointer-0/Button3 21 | 22 | 23 | [Pad2] 24 | Type = None 25 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Michigan Report from Hell MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Up = Keyboard/Space 3 | Down = Keyboard/Control 4 | Select = Keyboard/Tab 5 | Start = Keyboard/Z 6 | L1 = Pointer-0/Button3 7 | R1 = Pointer-0/Button4 8 | Cross = Pointer-0/LeftButton 9 | R2 = Keyboard/Shift 10 | LUp = Keyboard/W 11 | LDown = Keyboard/S 12 | LLeft = Keyboard/A 13 | LRight = Keyboard/D 14 | RUp = Keyboard/I 15 | RDown = Keyboard/K 16 | RLeft = Keyboard/J 17 | RRight = Keyboard/L 18 | Triangle = Pointer-0/RightButton 19 | Circle = Keyboard/Q 20 | Square = Keyboard/F 21 | L2 = Keyboard/R 22 | -------------------------------------------------------------------------------- /cheats/PS1/Hybrid_SLES-03531.cht: -------------------------------------------------------------------------------- 1 | #group=MouseInjector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable Auto-Lookahead] 5 | E00A5CC4 0001 6 | 8002C364 0000 7 | E00A5CC4 0001 8 | 8002C366 0000 9 | E00A5CC4 0001 10 | 8002C3D8 0000 11 | E00A5CC4 0001 12 | 8002C3DA 0000 13 | E00A5CC4 0001 14 | 8002C348 0000 15 | E00A5CC4 0001 16 | 8002C34A 0000 17 | E00A5CC4 0001 18 | 8002C3C4 0000 19 | E00A5CC4 0001 20 | 8002C3C6 0000 21 | E00A5CC4 0001 22 | 8002C328 0000 23 | E00A5CC4 0001 24 | 8002C32A 0000 25 | E00A5CC4 0001 26 | 8002C3A4 0000 27 | E00A5CC4 0001 28 | 8002C3A6 0000 29 | 30 | -------------------------------------------------------------------------------- /cheats/PS1/Hybrid_SLPS-01102.cht: -------------------------------------------------------------------------------- 1 | #group=MouseInjector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable Auto-Lookahead] 5 | E009E770 0001 6 | 800269A8 0000 7 | E009E770 0001 8 | 800269AA 0000 9 | E009E770 0001 10 | 80026A24 0000 11 | E009E770 0001 12 | 80026A26 0000 13 | E009E770 0001 14 | 80026A04 0000 15 | E009E770 0001 16 | 80026A06 0000 17 | E009E770 0001 18 | 800269C4 0000 19 | E009E770 0001 20 | 800269C6 0000 21 | E009E770 0001 22 | 80026990 0000 23 | E009E770 0001 24 | 80026992 0000 25 | E009E770 0001 26 | 80026A40 0000 27 | E009E770 0001 28 | 80026A42 0000 29 | 30 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Codename - Tenka.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | LUp = Keyboard/W 3 | LDown = Keyboard/S 4 | LLeft = Keyboard/A 5 | LRight = Keyboard/D 6 | RUp = Keyboard/I 7 | RLeft = Keyboard/J 8 | RRight = Keyboard/L 9 | RDown = Keyboard/K 10 | Up = Keyboard/Up 11 | Left = Keyboard/Left 12 | Right = Keyboard/Right 13 | Down = Keyboard/Down 14 | Square = Keyboard/Shift 15 | Start = Keyboard/Z 16 | Circle = Keyboard/Control 17 | Triangle = Keyboard/Space 18 | Cross = Pointer-0/LeftButton 19 | Select = Keyboard/Tab 20 | R1 = Keyboard/E 21 | 22 | 23 | [UI] 24 | EnableMouseMapping = true 25 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Urban Chaos - Riot Response MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Select = Keyboard/Tab 3 | Start = Keyboard/Z 4 | R1 = Pointer-0/LeftButton 5 | R3 = Pointer-0/RightButton 6 | Circle = Pointer-0/Button3 7 | Triangle = Keyboard/2 8 | Cross = Keyboard/R 9 | Square = Keyboard/1 10 | L3 = Keyboard/Control 11 | R2 = Keyboard/F 12 | L1 = Keyboard/Space 13 | LUp = Keyboard/W 14 | LDown = Keyboard/S 15 | LLeft = Keyboard/A 16 | LRight = Keyboard/D 17 | Pressure = Keyboard/Shift 18 | Up = Keyboard/Up 19 | Left = Keyboard/Left 20 | Right = Keyboard/Right 21 | Down = Keyboard/Down 22 | L2 = Keyboard/C 23 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Call of Duty - Finest Hour MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | R1 = Pointer-0/LeftButton 3 | R2 = Pointer-0/Button3 4 | L2 = Keyboard/G 5 | L1 = Pointer-0/RightButton 6 | Select = Keyboard/Tab 7 | Start = Keyboard/Z 8 | Triangle = Keyboard/Space 9 | Circle = Keyboard/Control 10 | Cross = Keyboard/F 11 | Square = Keyboard/R 12 | LUp = Keyboard/W 13 | LDown = Keyboard/S 14 | LLeft = Keyboard/A 15 | LRight = Keyboard/D 16 | RUp = Keyboard/I 17 | RDown = Keyboard/K 18 | RLeft = Keyboard/J 19 | RRight = Keyboard/L 20 | Left = Keyboard/Q 21 | Right = Keyboard/E 22 | Up = Keyboard/1 23 | Down = Keyboard/X 24 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Tribes - Aerial Assault MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Left = Keyboard/Left 3 | Right = Keyboard/Right 4 | R1 = Pointer-0/RightButton 5 | L2 = Pointer-0/LeftButton 6 | R2 = Pointer-0/MiddleButton 7 | L1 = Keyboard/Space 8 | Select = Keyboard/Tab 9 | Start = Keyboard/Z 10 | Triangle = Keyboard/G 11 | Cross = Keyboard/Q 12 | Up = Pointer-0/Button4 13 | Down = Pointer-0/Button3 14 | LUp = Keyboard/W 15 | LDown = Keyboard/S 16 | LLeft = Keyboard/A 17 | LRight = Keyboard/D 18 | RUp = Keyboard/I 19 | RDown = Keyboard/K 20 | RLeft = Keyboard/J 21 | RRight = Keyboard/L 22 | Circle = Keyboard/E 23 | Square = Keyboard/F 24 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Hybrid MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Triangle = Keyboard/Q 4 | Circle = Keyboard/Space 5 | Cross = Pointer-0/LeftButton 6 | Square = Keyboard/E 7 | Square = Keyboard/Shift 8 | Select = Keyboard/Tab 9 | Start = Keyboard/Z 10 | L1 = Keyboard/A 11 | R1 = Keyboard/D 12 | L2 = Pointer-0/RightButton 13 | R2 = Keyboard/V 14 | Up = Keyboard/W 15 | Up = Keyboard/I 16 | Left = Keyboard/1 17 | Left = Pointer-0/Button4 18 | Left = Keyboard/J 19 | Down = Keyboard/S 20 | Down = Keyboard/K 21 | Right = Keyboard/3 22 | Right = Pointer-0/Button3 23 | Right = Keyboard/L 24 | 25 | 26 | [Pad2] 27 | Type = None 28 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/MIB Crashdown.ini: -------------------------------------------------------------------------------- 1 | [ControllerPorts] 2 | MultitapMode = Disabled 3 | 4 | 5 | [Pad1] 6 | Type = AnalogController 7 | Up = Keyboard/Up 8 | Right = Keyboard/Right 9 | Down = Keyboard/Down 10 | Left = Keyboard/Left 11 | Triangle = Keyboard/Q 12 | Circle = Keyboard/F 13 | Cross = Pointer-0/LeftButton 14 | Square = Keyboard/E 15 | Select = Keyboard/Tab 16 | Start = Keyboard/Z 17 | L2 = Keyboard/Control 18 | LLeft = Keyboard/A 19 | LRight = Keyboard/D 20 | LDown = Keyboard/S 21 | LUp = Keyboard/W 22 | RLeft = Keyboard/J 23 | RRight = Keyboard/L 24 | RDown = Keyboard/K 25 | RUp = Keyboard/I 26 | 27 | 28 | [Pad2] 29 | Type = None 30 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Cold Winter (Preset 4) MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Left = Keyboard/Q 3 | Start = Keyboard/Z 4 | Select = Keyboard/Tab 5 | L1 = Keyboard/Space 6 | L2 = Keyboard/Shift 7 | R2 = Keyboard/G 8 | R1 = Pointer-0/LeftButton 9 | L3 = Keyboard/Control 10 | R3 = Pointer-0/RightButton 11 | LUp = Keyboard/W 12 | LDown = Keyboard/S 13 | LLeft = Keyboard/A 14 | LRight = Keyboard/D 15 | RUp = Keyboard/I 16 | RDown = Keyboard/K 17 | RLeft = Keyboard/J 18 | RRight = Keyboard/L 19 | Square = Keyboard/R 20 | Triangle = Pointer-0/Button3 21 | Cross = Keyboard/F 22 | Circle = Keyboard/C 23 | Up = Keyboard/1 24 | Down = Keyboard/X 25 | Right = Keyboard/E 26 | -------------------------------------------------------------------------------- /cheats/GC/TurokEvolutionGTKE51.txt: -------------------------------------------------------------------------------- 1 | Turok: Evolution Mouse Injector cheats/patches 2 | 3 | **Game must be restarted for cheats and patches to take effect** 4 | 5 | === CHEATS === 6 | -OPTIONAL- For better mouse flying control 7 | Disable Flying Roll Speed Auto-Center (disables max yaw speed w/ controller) 8 | 0C1C0E4C D01F0B4C 9 | 041C0E4C 60000000 10 | 11 | === PATCHES === 12 | -OPTIONAL- adds ability to look around freely while climbing vertically 13 | Disable Climbing Camera Rebound (disables analog-stick control while climbing) 14 | 15 | Type: 32-bit 16 | Address: 801cbebc 17 | Value: 60000000 18 | 19 | Type: 32-bit 20 | Address: 801cbec4 21 | Value: 60000000 -------------------------------------------------------------------------------- /cheats/PS1/AlienTrilogy_SLUS-00007.cht: -------------------------------------------------------------------------------- 1 | #group=Mouse Injector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable Auto-Center] 5 | E0009334 0053 6 | 80039E78 0000 7 | E0009334 0053 8 | 80039E7A 0000 9 | E0009334 0053 10 | 80039E94 0000 11 | E0009334 0053 12 | 80039E98 0000 13 | 14 | #group=Mouse Injector 15 | #type=Gameshark 16 | #activation=EndFrame 17 | [*Disable Slope Adjust] 18 | E0009334 0053 19 | 80039D7C 0000 20 | E0009334 0053 21 | 80039D7E 0000 22 | E0009334 0053 23 | 80039D9C 0000 24 | E0009334 0053 25 | 80039D9E 0000 26 | E0009334 0053 27 | 80039E14 0000 28 | E0009334 0053 29 | 80039E16 0000 30 | E0009334 0053 31 | 80039E38 0000 32 | E0009334 0053 33 | 80039E3A 0000 34 | 35 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/G-Police MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Up = Pointer-0/Button4 4 | Right = Keyboard/D 5 | Down = Pointer-0/Button3 6 | Left = Keyboard/A 7 | Triangle = Keyboard/W 8 | Circle = Keyboard/E 9 | Cross = Pointer-0/LeftButton 10 | Square = Keyboard/S 11 | Select = Keyboard/Tab 12 | Start = Keyboard/Z 13 | L1 = Keyboard/Space 14 | R1 = Pointer-0/RightButton 15 | L2 = Keyboard/Control 16 | R2 = Keyboard/Shift 17 | RLeft = Keyboard/J 18 | RRight = Keyboard/L 19 | RDown = Keyboard/K 20 | RUp = Keyboard/I 21 | LUp = Keyboard/Up 22 | LDown = Keyboard/Down 23 | LLeft = Keyboard/Left 24 | LRight = Keyboard/Right 25 | 26 | 27 | [Pad2] 28 | Type = None 29 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Future Cop LAPD MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Up = Keyboard/W 4 | Right = Keyboard/3 5 | Down = Keyboard/S 6 | Left = Keyboard/1 7 | Triangle = Keyboard/Space 8 | Circle = Keyboard/Q 9 | Cross = Pointer-0/RightButton 10 | Square = Pointer-0/LeftButton 11 | Select = Keyboard/Tab 12 | Start = Keyboard/Z 13 | Analog = SDL-0/Guide 14 | L1 = Keyboard/E 15 | R1 = Keyboard/R 16 | L2 = Keyboard/A 17 | R2 = Keyboard/D 18 | L3 = SDL-0/LeftStick 19 | R3 = SDL-0/RightStick 20 | LLeft = SDL-0/-LeftX 21 | LRight = SDL-0/+LeftX 22 | LDown = SDL-0/+LeftY 23 | LUp = SDL-0/-LeftY 24 | RLeft = SDL-0/-RightX 25 | RRight = SDL-0/+RightX 26 | RDown = SDL-0/+RightY 27 | RUp = SDL-0/-RightY 28 | 29 | 30 | [Pad2] 31 | Type = None 32 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Medal of Honor - Underground.ini: -------------------------------------------------------------------------------- 1 | [ControllerPorts] 2 | MultitapMode = Disabled 3 | 4 | 5 | [Pad1] 6 | Type = AnalogController 7 | Up = Keyboard/W 8 | Right = Keyboard/D 9 | Down = Keyboard/S 10 | Left = Keyboard/A 11 | Triangle = Keyboard/Q 12 | Circle = Keyboard/F 13 | Cross = Keyboard/Space 14 | Square = Keyboard/E 15 | Select = Keyboard/Tab 16 | Start = Keyboard/Z 17 | L1 = Keyboard/Control 18 | R1 = Keyboard/R 19 | R2 = Pointer-0/LeftButton 20 | L3 = Pointer-0/RightButton 21 | LLeft = Keyboard/J 22 | LRight = Keyboard/L 23 | LDown = Keyboard/K 24 | LUp = Keyboard/I 25 | RLeft = Keyboard/Left 26 | RRight = Keyboard/Right 27 | RDown = Keyboard/Down 28 | RUp = Keyboard/Up 29 | R3 = Keyboard/X 30 | L2 = Pointer-0/RightButton 31 | 32 | 33 | [Pad2] 34 | Type = None 35 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/007 The World Is Not Enough MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Up = Keyboard/Up 4 | Right = Keyboard/Right 5 | Down = Keyboard/Down 6 | Left = Keyboard/Left 7 | Triangle = Keyboard/Q 8 | Circle = Keyboard/E 9 | Circle = Keyboard/R 10 | Cross = Pointer-0/LeftButton 11 | Square = Keyboard/F 12 | Select = Keyboard/Tab 13 | Start = Keyboard/Z 14 | Analog = SDL-0/Guide 15 | L1 = Keyboard/A 16 | R1 = Keyboard/D 17 | L2 = Keyboard/Control 18 | R2 = Pointer-0/RightButton 19 | L3 = SDL-0/LeftStick 20 | R3 = SDL-0/RightStick 21 | LLeft = Keyboard/J 22 | LRight = Keyboard/L 23 | LDown = Keyboard/S 24 | LUp = Keyboard/W 25 | RLeft = SDL-0/-RightX 26 | RRight = SDL-0/+RightX 27 | RDown = SDL-0/+RightY 28 | RUp = SDL-0/-RightY 29 | 30 | 31 | [Pad2] 32 | Type = None 33 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Duke Nukem Time to Kill MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Up = Keyboard/W 4 | Down = Keyboard/S 5 | Triangle = Keyboard/F 6 | Circle = Keyboard/Q 7 | Cross = Pointer-0/LeftButton 8 | Square = Keyboard/Space 9 | Select = Keyboard/Tab 10 | Start = Keyboard/Z 11 | Analog = SDL-0/Guide 12 | L1 = Keyboard/R 13 | R1 = SDL-0/RightShoulder 14 | R1 = Pointer-0/RightButton 15 | L2 = Keyboard/A 16 | R2 = Keyboard/D 17 | L3 = SDL-0/LeftStick 18 | R3 = SDL-0/RightStick 19 | LLeft = SDL-0/-LeftX 20 | LRight = SDL-0/+LeftX 21 | LDown = SDL-0/+LeftY 22 | LUp = SDL-0/-LeftY 23 | RLeft = SDL-0/-RightX 24 | RRight = SDL-0/+RightX 25 | RDown = SDL-0/+RightY 26 | RUp = SDL-0/-RightY 27 | Left = Pointer-0/WheelY+ 28 | Left = Keyboard/1 29 | Right = Pointer-0/WheelY- 30 | Right = Keyboard/3 31 | 32 | 33 | [Pad2] 34 | Type = None 35 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/007 - Agent Under Fire (A).ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = DualShock2 3 | Up = Keyboard/1 4 | Right = Pointer-0/Button3 5 | Down = Keyboard/2 6 | Left = Pointer-0/Button4 7 | Triangle = Keyboard/Space 8 | Circle = Pointer-0/RightButton 9 | Cross = Keyboard/R 10 | Square = Keyboard/Q 11 | Select = Keyboard/Tab 12 | Start = Keyboard/Z 13 | L1 = Keyboard/T 14 | L2 = Keyboard/Control 15 | R1 = Pointer-0/LeftButton 16 | R2 = Keyboard/F 17 | LUp = Keyboard/W 18 | LRight = Keyboard/D 19 | LDown = Keyboard/S 20 | LLeft = Keyboard/A 21 | RUp = Keyboard/I 22 | RDown = Keyboard/K 23 | RLeft = Keyboard/J 24 | RRight = Keyboard/L 25 | 26 | 27 | [Pad2] 28 | Type = None 29 | 30 | 31 | [Pad3] 32 | Type = None 33 | 34 | 35 | [Pad4] 36 | Type = None 37 | 38 | 39 | [Pad5] 40 | Type = None 41 | 42 | 43 | [Pad6] 44 | Type = None 45 | 46 | 47 | [Pad7] 48 | Type = None 49 | 50 | 51 | [Pad8] 52 | Type = None 53 | -------------------------------------------------------------------------------- /cheats/PS2/327053E8.pnach: -------------------------------------------------------------------------------- 1 | gametitle=Darkwatch SLUS-21042 0x327053E8 2 | 3 | // Disable auto-centering 4 | patch=1,EE,0020517C,word,00000000 5 | 6 | // Disable horizontal aim-lock (required by MouseInjectorDolphinDuck) 7 | patch=1,EE,00204E94,word,00000000 8 | 9 | // Disable vertical aim-lock (required by MouseInjectorDolphinDuck) 10 | patch=1,EE,002050D4,word,00000000 11 | 12 | // Write turret base to 0x720590 (required by MouseInjectorDolphinDuck) (disables turret Y-axis with analog stick) 13 | patch=1,EE,00287970,word,AC310590 14 | 15 | // Write FOV base to 0x620090 (required by MouseInjectorDolphinDuck) 16 | patch=1,EE,001EF890,word,AC320090 17 | patch=1,EE,001EF894,word,03E00008 18 | patch=1,EE,001EF898,word,27BD0080 19 | 20 | // Write cambase to 0x620230 (for use with MouseInjectorDolphinDuck) 21 | patch=1,EE,0020520C,word,AC220230 22 | patch=1,EE,00205210,word,03E00008 23 | patch=1,EE,00205214,word,27BD0070 24 | -------------------------------------------------------------------------------- /cheats/N64/007 The World Is Not Enough (USA)/Project64/007 - The World is Not Enough (U).cht: -------------------------------------------------------------------------------- 1 | [033F4C13-319EE7A7-C:45] 2 | Name=007 - The World is Not Enough (U) 3 | 4 | $Disable Auto-Center/Level on Cold Reception 5 | D0117D37 0030 6 | 81066BB0 0000 7 | D0117D37 0030 8 | 81066BB2 0000 9 | D0117D37 0030 10 | 81067054 0000 11 | D0117D37 0030 12 | 81067056 0000 13 | D0117D37 0030 14 | 81067058 0000 15 | D0117D37 0030 16 | 8106705A 0000 17 | D0117D37 0030 18 | 8111B94C 0000 19 | D0117D37 0030 20 | 8111B94E 0000 21 | D0117D37 0030 22 | 8106CB54 0000 23 | D0117D37 0030 24 | 8106CB56 0000 25 | D0117D37 0030 26 | 8106EFD0 0000 27 | D0117D37 0030 28 | 8106EFD2 0000 29 | D0117D37 0030 30 | 8111B964 0000 31 | D0117D37 0030 32 | 8111B966 0000 33 | D0117D37 0030 34 | 8111B984 0000 35 | D0117D37 0030 36 | 8111B986 0000 37 | D0117D37 0030 38 | 81067080 0000 39 | D0117D37 0030 40 | 81067082 0000 41 | D0117D37 0030 42 | 810670A8 0000 43 | D0117D37 0030 44 | 810670AA 0000 -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Red Dead Revolver MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = DualShock2 3 | Up = Keyboard/Up 4 | Right = Keyboard/Right 5 | Down = Keyboard/Down 6 | Left = Keyboard/Left 7 | Triangle = Keyboard/R 8 | Circle = Keyboard/X 9 | Cross = Keyboard/Space 10 | Square = Keyboard/C 11 | Select = Keyboard/Tab 12 | Start = Keyboard/Z 13 | L1 = Pointer-0/RightButton 14 | L2 = Keyboard/Q 15 | R1 = Pointer-0/LeftButton 16 | R2 = Keyboard/F 17 | L3 = Keyboard/Control 18 | R3 = Keyboard/E 19 | LUp = Keyboard/W 20 | LRight = Keyboard/D 21 | LDown = Keyboard/S 22 | LLeft = Keyboard/A 23 | RUp = Keyboard/I 24 | RRight = Keyboard/L 25 | RDown = Keyboard/K 26 | RLeft = Keyboard/J 27 | 28 | 29 | [Pad2] 30 | Type = None 31 | 32 | 33 | [Pad3] 34 | Type = None 35 | 36 | 37 | [Pad4] 38 | Type = None 39 | 40 | 41 | [Pad5] 42 | Type = None 43 | 44 | 45 | [Pad6] 46 | Type = None 47 | 48 | 49 | [Pad7] 50 | Type = None 51 | 52 | 53 | [Pad8] 54 | Type = None 55 | -------------------------------------------------------------------------------- /inputprofiles/DuckStation/Delta Force Urban Warfare MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = AnalogController 3 | Up = Keyboard/Up 4 | Down = Keyboard/Down 5 | Triangle = Keyboard/E 6 | Circle = Keyboard/F 7 | Cross = Keyboard/X 8 | Square = Keyboard/Space 9 | Select = Keyboard/Tab 10 | Start = Keyboard/Z 11 | L1 = Pointer-0/RightButton 12 | R1 = Pointer-0/LeftButton 13 | L2 = Pointer-0/Button4 14 | R2 = Pointer-0/Button3 15 | LLeft = Keyboard/A 16 | LRight = Keyboard/D 17 | LDown = Keyboard/S 18 | LUp = Keyboard/W 19 | RLeft = Keyboard/J 20 | RRight = Keyboard/L 21 | RDown = Keyboard/K 22 | RUp = Keyboard/I 23 | Macro1 = Keyboard/Control 24 | Macro1Binds = Square & LDown 25 | Macro2 = Keyboard/Space 26 | Macro2Binds = Square & LUp 27 | Macro2Frequency = 0 28 | Macro3 = Keyboard/C 29 | Macro3Binds = Square & R2 30 | Right = Keyboard/Right 31 | Right = Pointer-0/WheelY- 32 | Left = Keyboard/Left 33 | Left = Pointer-0/WheelY+ 34 | 35 | 36 | [Pad2] 37 | Type = None 38 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Darkwatch Mouse Injector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = DualShock2 3 | Up = Pointer-0/WheelY+ 4 | Right = Keyboard/E 5 | Down = Pointer-0/WheelY- 6 | Left = Keyboard/Q 7 | Triangle = Keyboard/Space 8 | Circle = Keyboard/R 9 | Cross = Keyboard/F 10 | Square = Pointer-0/Button3 11 | Select = Keyboard/Tab 12 | Start = Keyboard/Z 13 | L1 = Keyboard/G 14 | L2 = Keyboard/T 15 | R1 = Pointer-0/LeftButton 16 | R2 = Keyboard/V 17 | L3 = Keyboard/Control 18 | R3 = Pointer-0/RightButton 19 | LUp = Keyboard/W 20 | LRight = Keyboard/D 21 | LDown = Keyboard/S 22 | LLeft = Keyboard/A 23 | RUp = Keyboard/Up 24 | RLeft = Keyboard/Left 25 | RRight = Keyboard/Right 26 | RDown = Keyboard/Down 27 | 28 | 29 | [Pad2] 30 | Type = None 31 | 32 | 33 | [Pad3] 34 | Type = None 35 | 36 | 37 | [Pad4] 38 | Type = None 39 | 40 | 41 | [Pad5] 42 | Type = None 43 | 44 | 45 | [Pad6] 46 | Type = None 47 | 48 | 49 | [Pad7] 50 | Type = None 51 | 52 | 53 | [Pad8] 54 | Type = None 55 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Medal of Honor Vanguard MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = DualShock2 3 | Up = Pointer-0/WheelY+ 4 | Up = Keyboard/Up 5 | Right = Keyboard/Right 6 | Down = Pointer-0/WheelY- 7 | Down = Keyboard/Down 8 | Left = Keyboard/Left 9 | Triangle = Keyboard/Space 10 | Circle = Keyboard/Q 11 | Cross = Keyboard/R 12 | Square = Keyboard/Control 13 | Select = Keyboard/Tab 14 | Start = Keyboard/Z 15 | L1 = Pointer-0/RightButton 16 | L2 = Keyboard/Shift 17 | R1 = Pointer-0/LeftButton 18 | R2 = Keyboard/G 19 | R3 = Pointer-0/Button3 20 | LUp = Keyboard/W 21 | LRight = Keyboard/D 22 | LDown = Keyboard/S 23 | LLeft = Keyboard/A 24 | RUp = Keyboard/I 25 | RRight = Keyboard/L 26 | RDown = Keyboard/K 27 | RLeft = Keyboard/J 28 | 29 | 30 | [Pad2] 31 | Type = None 32 | 33 | 34 | [Pad3] 35 | Type = None 36 | 37 | 38 | [Pad4] 39 | Type = None 40 | 41 | 42 | [Pad5] 43 | Type = None 44 | 45 | 46 | [Pad6] 47 | Type = None 48 | 49 | 50 | [Pad7] 51 | Type = None 52 | 53 | 54 | [Pad8] 55 | Type = None 56 | -------------------------------------------------------------------------------- /manymouse/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2005-2012 Ryan C. Gordon and others. 3 | 4 | This software is provided 'as-is', without any express or implied warranty. 5 | In no event will the authors be held liable for any damages arising from 6 | the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software in a 14 | product, an acknowledgment in the product documentation would be 15 | appreciated but is not required. 16 | 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 20 | 3. This notice may not be removed or altered from any source distribution. 21 | 22 | Ryan C. Gordon 23 | 24 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Mercenaries Playground of Destruction MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad1] 2 | Type = DualShock2 3 | Triangle = Keyboard/E 4 | Circle = Keyboard/Space 5 | Select = Keyboard/Tab 6 | Start = Keyboard/Z 7 | L2 = Keyboard/C 8 | R2 = Keyboard/Q 9 | LUp = Keyboard/W 10 | LRight = Keyboard/D 11 | LDown = Keyboard/S 12 | LLeft = Keyboard/A 13 | Left = Keyboard/Left 14 | Right = Keyboard/Right 15 | RUp = Keyboard/I 16 | RDown = Keyboard/K 17 | RLeft = Keyboard/J 18 | RRight = Keyboard/L 19 | Up = Keyboard/Up 20 | Up = Keyboard/2 21 | L1 = Keyboard/G 22 | L3 = Keyboard/Control 23 | R3 = Pointer-0/MiddleButton 24 | Square = Pointer-0/Button3 25 | Square = Keyboard/M 26 | R1 = Pointer-0/LeftButton 27 | R1 = Keyboard/H 28 | Cross = Keyboard/R 29 | Cross = Keyboard/U 30 | Cross = Pointer-0/Button4 31 | Down = Keyboard/Down 32 | Down = Keyboard/X 33 | 34 | 35 | [Pad2] 36 | Type = None 37 | 38 | 39 | [Pad3] 40 | Type = None 41 | 42 | 43 | [Pad4] 44 | Type = None 45 | 46 | 47 | [Pad5] 48 | Type = None 49 | 50 | 51 | [Pad6] 52 | Type = None 53 | 54 | 55 | [Pad7] 56 | Type = None 57 | 58 | 59 | [Pad8] 60 | Type = None 61 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [regilopes] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: regilopes # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: ["https://www.paypal.com/donate/?business=GSZQ8D9ET5UFG&no_recurring=0&item_name=Donation+to+support+MouseInjector+project¤cy_code=USD"] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /mouse.h: -------------------------------------------------------------------------------- 1 | //========================================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | extern int32_t xmouse, ymouse, mouse0, mouse1; 21 | 22 | 23 | extern uint8_t MOUSE_Init(void); 24 | extern void MOUSE_Quit(void); 25 | extern void MOUSE_Lock(void); 26 | extern void MOUSE_Update(const uint16_t tickrate); -------------------------------------------------------------------------------- /inputprofiles/PCSX2/TimeSplitters MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Up = Pointer-0/WheelY+ 18 | Right = Keyboard/F 19 | Down = Pointer-0/WheelY- 20 | Left = Keyboard/Q 21 | Triangle = Keyboard/R 22 | Circle = Keyboard/V 23 | Cross = Keyboard/E 24 | Square = Keyboard/C 25 | Select = Keyboard/Tab 26 | Start = Keyboard/Z 27 | L1 = Keyboard/Control 28 | L2 = Pointer-0/RightButton 29 | R1 = Pointer-0/Button3 30 | R2 = Pointer-0/LeftButton 31 | Analog = SDL-0/Guide 32 | LUp = Keyboard/W 33 | LRight = Keyboard/D 34 | LDown = Keyboard/S 35 | LLeft = Keyboard/A 36 | RUp = Keyboard/I 37 | RRight = Keyboard/L 38 | RDown = Keyboard/K 39 | RLeft = Keyboard/J 40 | InvertL = 0 41 | InvertR = 0 42 | Deadzone = 0 43 | AxisScale = 1.33 44 | LargeMotorScale = 0 45 | SmallMotorScale = 0 46 | ButtonDeadzone = 0 47 | PressureModifier = 0.5 48 | 49 | 50 | [Pad2] 51 | Type = None 52 | 53 | 54 | [Pad3] 55 | Type = None 56 | 57 | 58 | [Pad4] 59 | Type = None 60 | 61 | 62 | [Pad5] 63 | Type = None 64 | 65 | 66 | [Pad6] 67 | Type = None 68 | 69 | 70 | [Pad7] 71 | Type = None 72 | 73 | 74 | [Pad8] 75 | Type = None 76 | -------------------------------------------------------------------------------- /cheats/N64/007 The World Is Not Enough (USA)/RA_Mupen64Plus-Next/007 - The World Is Not Enough (USA).cht: -------------------------------------------------------------------------------- 1 | cheat0_address = "0" 2 | cheat0_address_bit_position = "0" 3 | cheat0_big_endian = "false" 4 | cheat0_cheat_type = "1" 5 | cheat0_code = "D0117D37 0030; 81066BB0 0000; D0117D37 0030; 81066BB2 0000; D0117D37 0030; 81067054 0000; D0117D37 0030; 81067056 0000; D0117D37 0030; 81067058 0000; D0117D37 0030; 8106705A 0000; D0117D37 0030; 8111B94C 0000; D0117D37 0030; 8111B94E 0000; D0117D37 0030; 8106CB54 0000; D0117D37 0030; 8106CB56 0000; D0117D37 0030; 8106EFD0 0000; D0117D37 0030; 8106EFD2 0000; D0117D37 0030; 8111B964 0000; D0117D37 0030; 8111B966 0000; D0117D37 0030; 8111B984 0000; D0117D37 0030; 8111B986 0000; D0117D37 0030; 81067080 0000; D0117D37 0030; 81067082 0000; D0117D37 0030; 810670A8 0000; D0117D37 0030; 810670AA 0000" 6 | cheat0_desc = "Disable Auto-Center/Level on Cold Reception" 7 | cheat0_enable = "true" 8 | cheat0_handler = "0" 9 | cheat0_memory_search_size = "3" 10 | cheat0_repeat_add_to_address = "1" 11 | cheat0_repeat_add_to_value = "0" 12 | cheat0_repeat_count = "0" 13 | cheat0_rumble_port = "0" 14 | cheat0_rumble_primary_duration = "0" 15 | cheat0_rumble_primary_strength = "0" 16 | cheat0_rumble_secondary_duration = "0" 17 | cheat0_rumble_secondary_strength = "0" 18 | cheat0_rumble_type = "0" 19 | cheat0_rumble_value = "0" 20 | cheat0_value = "0" 21 | cheats = "1" 22 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Robotech Invasion MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Up = Pointer-0/Button4 18 | Right = Keyboard/C 19 | Down = Keyboard/F 20 | Left = Keyboard/V 21 | Triangle = Keyboard/X 22 | Circle = Keyboard/Q 23 | Cross = Keyboard/Space 24 | Square = Keyboard/R 25 | Select = Keyboard/Tab 26 | Start = Keyboard/Z 27 | L1 = Keyboard/T 28 | L2 = Pointer-0/Button3 29 | R1 = Pointer-0/LeftButton 30 | R2 = Keyboard/G 31 | L3 = Keyboard/E 32 | R3 = Pointer-0/RightButton 33 | Analog = SDL-0/Guide 34 | LUp = Keyboard/W 35 | LRight = Keyboard/D 36 | LDown = Keyboard/S 37 | LLeft = Keyboard/A 38 | RUp = Keyboard/I 39 | RRight = Keyboard/L 40 | RDown = Keyboard/K 41 | RLeft = Keyboard/J 42 | LargeMotor = SDL-0/LargeMotor 43 | SmallMotor = SDL-0/SmallMotor 44 | InvertL = 0 45 | InvertR = 0 46 | Deadzone = 0 47 | AxisScale = 1.33 48 | LargeMotorScale = 1 49 | SmallMotorScale = 1 50 | ButtonDeadzone = 0 51 | PressureModifier = 0.5 52 | 53 | 54 | [Pad2] 55 | Type = None 56 | 57 | 58 | [Pad3] 59 | Type = None 60 | 61 | 62 | [Pad4] 63 | Type = None 64 | 65 | 66 | [Pad5] 67 | Type = None 68 | 69 | 70 | [Pad6] 71 | Type = None 72 | 73 | 74 | [Pad7] 75 | Type = None 76 | 77 | 78 | [Pad8] 79 | Type = None 80 | -------------------------------------------------------------------------------- /cheats/PS1/JumpingFlash_SCUS-94103.cht: -------------------------------------------------------------------------------- 1 | #group=Mouse Injector 2 | #type=Gameshark 3 | #activation=EndFrame 4 | [*Disable CamY] 5 | D00DD762 AC82 6 | 800DD75C 0000 7 | D00DD762 AC82 8 | 800DD75E 0000 9 | D00DD762 AC82 10 | 800DD770 0000 11 | D00DD762 AC82 12 | 800DD772 0000 13 | D00DD3E2 AC82 14 | 800DD3DC 0000 15 | D00DD3E2 AC82 16 | 800DD3DE 0000 17 | D00DD3E2 AC82 18 | 800DD3F0 0000 19 | D00DD3E2 AC82 20 | 800DD3F2 0000 21 | D00CB7B2 AC82 22 | 800CB7AC 0000 23 | D00CB7B2 AC82 24 | 800CB7AE 0000 25 | D00CB7B2 AC82 26 | 800CB7C0 0000 27 | D00CB7B2 AC82 28 | 800CB7C2 0000 29 | D00DD54E AC82 30 | 800DD548 0000 31 | D00DD54E AC82 32 | 800DD54A 0000 33 | D00DD54E AC82 34 | 800DD55C 0000 35 | D00DD54E AC82 36 | 800DD55E 0000 37 | D00E2432 AC82 38 | 800E242C 0000 39 | D00E2432 AC82 40 | 800E242E 0000 41 | D00E2432 AC82 42 | 800E2440 0000 43 | D00E2432 AC82 44 | 800E2442 0000 45 | D00DAFCA AC82 46 | 800DAFC4 0000 47 | D00DAFCA AC82 48 | 800DAFC6 0000 49 | D00DAFCA AC82 50 | 800DAFD8 0000 51 | D00DAFCA AC82 52 | 800DAFDA 0000 53 | D00DD3F2 AC82 54 | 800DD3EC 0000 55 | D00DD3F2 AC82 56 | 800DD3EE 0000 57 | D00DD3F2 AC82 58 | 800DD400 0000 59 | D00DD3F2 AC82 60 | 800DD402 0000 61 | D00DD566 AC82 62 | 800DD560 0000 63 | D00DD566 AC82 64 | 800DD562 0000 65 | D00DD566 AC82 66 | 800DD574 0000 67 | D00DD566 AC82 68 | 800DD576 0000 69 | D00E2336 AC82 70 | 800E2330 0000 71 | D00E2336 AC82 72 | 800E2332 0000 73 | D00E2336 AC82 74 | 800E2344 0000 75 | D00E2336 AC82 76 | 800E2346 0000 77 | 78 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Call of Duty 3 MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Up = Keyboard/Up 18 | Right = Keyboard/Right 19 | Down = Keyboard/Down 20 | Left = Keyboard/Left 21 | Triangle = Keyboard/Q 22 | Circle = Keyboard/Control 23 | Cross = Keyboard/Space 24 | Square = Keyboard/R 25 | Select = Keyboard/Tab 26 | Start = Keyboard/Z 27 | L1 = Pointer-0/RightButton 28 | L2 = Keyboard/T 29 | R1 = Pointer-0/LeftButton 30 | R2 = Keyboard/G 31 | L3 = Pointer-0/Button4 32 | R3 = Pointer-0/Button3 33 | Analog = SDL-0/Guide 34 | LUp = Keyboard/W 35 | LRight = Keyboard/D 36 | LDown = Keyboard/S 37 | LLeft = Keyboard/A 38 | RUp = Keyboard/I 39 | RRight = Keyboard/L 40 | RDown = Keyboard/K 41 | RLeft = Keyboard/J 42 | LargeMotor = SDL-0/LargeMotor 43 | SmallMotor = SDL-0/SmallMotor 44 | InvertL = 0 45 | InvertR = 0 46 | Deadzone = 0 47 | AxisScale = 1.33 48 | LargeMotorScale = 1 49 | SmallMotorScale = 1 50 | ButtonDeadzone = 0 51 | PressureModifier = 0.5 52 | 53 | 54 | [Pad2] 55 | Type = None 56 | 57 | 58 | [Pad3] 59 | Type = None 60 | 61 | 62 | [Pad4] 63 | Type = None 64 | 65 | 66 | [Pad5] 67 | Type = None 68 | 69 | 70 | [Pad6] 71 | Type = None 72 | 73 | 74 | [Pad7] 75 | Type = None 76 | 77 | 78 | [Pad8] 79 | Type = None 80 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | Change all instances of accumulators for float-like addition of integers to use AccumulateAddRemainder 2 | Also add this functionality to the PS1 games that don't use it yet 3 | Add ability to reset variables when disabled, that way you can reset wrong bases just by turning it off and on 4 | Add game serials to README 5 | Check the BIOS version to make sure it is 5XXXX or higher 6 | Find better checks for N64 status 7 | After switching games in RetroArch, the last game's status is still valid? 8 | so the injector must be closed and reopened 9 | Might be a problem with RA in general 10 | Try looking for lastRegionSize 11 | *DONE* Different time/sleep implementation for more consistent tickrate 12 | Some PS2 titles (or all?) seem to be affected 13 | Options stuct defined in each game 14 | PCSX2 | use pointer to PS2 RAM? "pcsx2-qtx64-avx2.exe"+342CDD0 15 | seems to be static 16 | Help discussion with small questionaire 17 | Read the FAQ before posting 18 | Do other games/emulators work? 19 | Add message for games that require cheats 20 | 21 | -- Long term -- 22 | Add auto-updater 23 | GUI 24 | Support for mapping keyboard keys to in-game functions 25 | Ex: For Quake III have the ability to map weapons to number keys 26 | Change the keys and toggle them on/off 27 | Ability to enable/disable features like aim-assist from GUI 28 | Select emulator to hook to from drop-down menu 29 | Select input device 30 | Multiple input devices for multiplayer -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Return to Castle Wolfenstein MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Up = SDL-0/DPadUp 18 | Right = Keyboard/Q 19 | Down = SDL-0/DPadDown 20 | Left = Keyboard/F 21 | Triangle = Pointer-0/RightButton 22 | Circle = Pointer-0/WheelY+ 23 | Cross = Keyboard/E 24 | Square = Pointer-0/WheelY- 25 | Select = Keyboard/Tab 26 | Start = Keyboard/Z 27 | L1 = Keyboard/Space 28 | L2 = Keyboard/Control 29 | R1 = Pointer-0/LeftButton 30 | R2 = Pointer-0/Button3 31 | L3 = SDL-0/LeftStick 32 | R3 = Keyboard/R 33 | Analog = SDL-0/Guide 34 | LUp = Keyboard/W 35 | LRight = Keyboard/D 36 | LDown = Keyboard/S 37 | LLeft = Keyboard/A 38 | RUp = Keyboard/I 39 | RRight = Keyboard/L 40 | RDown = Keyboard/K 41 | RLeft = Keyboard/J 42 | LargeMotor = SDL-0/LargeMotor 43 | SmallMotor = SDL-0/SmallMotor 44 | InvertL = 0 45 | InvertR = 0 46 | Deadzone = 0 47 | AxisScale = 1.33 48 | LargeMotorScale = 1 49 | SmallMotorScale = 1 50 | ButtonDeadzone = 0 51 | PressureModifier = 0.5 52 | 53 | 54 | [Pad2] 55 | Type = None 56 | 57 | 58 | [Pad3] 59 | Type = None 60 | 61 | 62 | [Pad4] 63 | Type = None 64 | 65 | 66 | [Pad5] 67 | Type = None 68 | 69 | 70 | [Pad6] 71 | Type = None 72 | 73 | 74 | [Pad7] 75 | Type = None 76 | 77 | 78 | [Pad8] 79 | Type = None 80 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Ratchet and Clank Up Your Arsenal MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Up = Keyboard/Up 18 | Right = Keyboard/Right 19 | Down = Keyboard/Down 20 | Left = Keyboard/Left 21 | Triangle = Keyboard/Q 22 | Circle = Keyboard/R 23 | Cross = Keyboard/Space 24 | Square = Pointer-0/Button3 25 | Select = Keyboard/Tab 26 | Start = Keyboard/Z 27 | L1 = Keyboard/Space 28 | L2 = Pointer-0/RightButton 29 | R1 = Pointer-0/LeftButton 30 | R2 = Keyboard/Shift 31 | L3 = SDL-0/LeftStick 32 | R3 = SDL-0/RightStick 33 | Analog = SDL-0/Guide 34 | LUp = Keyboard/W 35 | LRight = Keyboard/D 36 | LDown = Keyboard/S 37 | LLeft = Keyboard/A 38 | RUp = Keyboard/I 39 | RRight = Keyboard/L 40 | RDown = Keyboard/K 41 | RLeft = Keyboard/J 42 | LargeMotor = SDL-0/LargeMotor 43 | SmallMotor = SDL-0/SmallMotor 44 | InvertL = 0 45 | InvertR = 0 46 | Deadzone = 0 47 | AxisScale = 1.33 48 | LargeMotorScale = 1 49 | SmallMotorScale = 1 50 | ButtonDeadzone = 0 51 | PressureModifier = 0.5 52 | 53 | 54 | [Pad2] 55 | Type = None 56 | 57 | 58 | [Pad3] 59 | Type = None 60 | 61 | 62 | [Pad4] 63 | Type = None 64 | 65 | 66 | [Pad5] 67 | Type = None 68 | 69 | 70 | [Pad6] 71 | Type = None 72 | 73 | 74 | [Pad7] 75 | Type = None 76 | 77 | 78 | [Pad8] 79 | Type = None 80 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Armored Core 2 MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Triangle = Keyboard/Q 18 | Square = Pointer-0/LeftButton 19 | Select = Keyboard/Tab 20 | Start = Keyboard/Z 21 | L1 = Keyboard/A 22 | L2 = Keyboard/I 23 | R1 = Keyboard/D 24 | R2 = Keyboard/K 25 | R3 = Keyboard/F 26 | Analog = SDL-0/Guide 27 | LargeMotor = SDL-0/LargeMotor 28 | SmallMotor = SDL-0/SmallMotor 29 | InvertL = 0 30 | InvertR = 0 31 | Deadzone = 0 32 | AxisScale = 1.33 33 | LargeMotorScale = 1 34 | SmallMotorScale = 1 35 | ButtonDeadzone = 0 36 | PressureModifier = 0.5 37 | Up = Keyboard/W 38 | Up = Keyboard/Up 39 | Left = Keyboard/1 40 | Left = Keyboard/J 41 | Left = Keyboard/Left 42 | Right = Keyboard/3 43 | Right = Keyboard/L 44 | Right = Keyboard/Right 45 | Down = Keyboard/S 46 | Down = Keyboard/Down 47 | Cross = Keyboard/Space 48 | Cross = Keyboard/Return 49 | Circle = Pointer-0/Button3 50 | Circle = Keyboard/E 51 | Circle = Keyboard/Backspace 52 | L3 = Keyboard/R 53 | L3 = Pointer-0/RightButton 54 | 55 | 56 | [Pad2] 57 | Type = None 58 | 59 | 60 | [Pad3] 61 | Type = None 62 | 63 | 64 | [Pad4] 65 | Type = None 66 | 67 | 68 | [Pad5] 69 | Type = None 70 | 71 | 72 | [Pad6] 73 | Type = None 74 | 75 | 76 | [Pad7] 77 | Type = None 78 | 79 | 80 | [Pad8] 81 | Type = None 82 | -------------------------------------------------------------------------------- /manymouse/manymouse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ManyMouse main header. Include this from your app. 3 | * 4 | * Please see the file LICENSE.txt in the source's root directory. 5 | * 6 | * This file written by Ryan C. Gordon. 7 | */ 8 | 9 | #ifndef _INCLUDE_MANYMOUSE_H_ 10 | #define _INCLUDE_MANYMOUSE_H_ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | #define MANYMOUSE_VERSION "0.0.3" 17 | 18 | typedef enum 19 | { 20 | MANYMOUSE_EVENT_ABSMOTION = 0, 21 | MANYMOUSE_EVENT_RELMOTION, 22 | MANYMOUSE_EVENT_BUTTON, 23 | MANYMOUSE_EVENT_SCROLL, 24 | MANYMOUSE_EVENT_DISCONNECT, 25 | MANYMOUSE_EVENT_MAX 26 | } ManyMouseEventType; 27 | 28 | typedef struct 29 | { 30 | ManyMouseEventType type; 31 | unsigned int device; 32 | unsigned int item; 33 | int value; 34 | int minval; 35 | int maxval; 36 | } ManyMouseEvent; 37 | 38 | 39 | /* internal use only. */ 40 | typedef struct 41 | { 42 | const char *driver_name; 43 | int (*init)(void); 44 | void (*quit)(void); 45 | const char *(*name)(unsigned int index); 46 | int (*poll)(ManyMouseEvent *event); 47 | } ManyMouseDriver; 48 | 49 | 50 | int ManyMouse_Init(void); 51 | const char *ManyMouse_DriverName(void); 52 | void ManyMouse_Quit(void); 53 | const char *ManyMouse_DeviceName(unsigned int index); 54 | int ManyMouse_PollEvent(ManyMouseEvent *event); 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | #endif /* !defined _INCLUDE_MANYMOUSE_H_ */ 61 | 62 | /* end of manymouse.h ... */ 63 | 64 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Serious Sam Next Encounter MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Up = Keyboard/Up 18 | Right = Keyboard/Right 19 | Down = Keyboard/Down 20 | Left = Keyboard/Left 21 | Triangle = Keyboard/C 22 | Circle = Keyboard/G 23 | Select = Keyboard/Tab 24 | Start = Keyboard/Z 25 | L1 = Keyboard/Q 26 | L2 = Keyboard/Space 27 | R1 = Keyboard/E 28 | L3 = SDL-0/LeftStick 29 | R3 = SDL-0/RightStick 30 | Analog = SDL-0/Guide 31 | LUp = Keyboard/W 32 | LRight = Keyboard/D 33 | LDown = Keyboard/S 34 | LLeft = Keyboard/A 35 | RUp = Keyboard/I 36 | RRight = Keyboard/L 37 | RDown = Keyboard/K 38 | RLeft = Keyboard/J 39 | LargeMotor = SDL-0/LargeMotor 40 | SmallMotor = SDL-0/SmallMotor 41 | InvertL = 0 42 | InvertR = 0 43 | Deadzone = 0 44 | AxisScale = 1.33 45 | LargeMotorScale = 1 46 | SmallMotorScale = 1 47 | ButtonDeadzone = 0 48 | PressureModifier = 0.5 49 | R2 = Pointer-0/LeftButton 50 | R2 = Keyboard/U 51 | Cross = Keyboard/F 52 | Square = Keyboard/R 53 | Square = Pointer-0/RightButton 54 | 55 | 56 | [Pad2] 57 | Type = None 58 | 59 | 60 | [Pad3] 61 | Type = None 62 | 63 | 64 | [Pad4] 65 | Type = None 66 | 67 | 68 | [Pad5] 69 | Type = None 70 | 71 | 72 | [Pad6] 73 | Type = None 74 | 75 | 76 | [Pad7] 77 | Type = None 78 | 79 | 80 | [Pad8] 81 | Type = None 82 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Beverly Hills Cop MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Triangle = Pointer-0/RightButton 18 | Circle = Pointer-0/WheelY+ 19 | Cross = Keyboard/E 20 | Square = Keyboard/R 21 | Select = Keyboard/Tab 22 | Start = Keyboard/Z 23 | L1 = Keyboard/Control 24 | L2 = Keyboard/Space 25 | R1 = Pointer-0/LeftButton 26 | R2 = Pointer-0/Button3 27 | L3 = SDL-0/LeftStick 28 | R3 = Keyboard/R 29 | Analog = SDL-0/Guide 30 | LUp = Keyboard/W 31 | LRight = Keyboard/D 32 | LDown = Keyboard/S 33 | LLeft = Keyboard/A 34 | RUp = Keyboard/I 35 | RRight = Keyboard/L 36 | RDown = Keyboard/K 37 | RLeft = Keyboard/J 38 | LargeMotor = SDL-0/LargeMotor 39 | SmallMotor = SDL-0/SmallMotor 40 | InvertL = 0 41 | InvertR = 0 42 | Deadzone = 0 43 | AxisScale = 1.33 44 | LargeMotorScale = 1 45 | SmallMotorScale = 1 46 | ButtonDeadzone = 0 47 | PressureModifier = 0.5 48 | Left = Keyboard/Left 49 | Left = Keyboard/1 50 | Up = Keyboard/Up 51 | Down = Keyboard/Down 52 | Right = Keyboard/3 53 | Right = Keyboard/Right 54 | 55 | 56 | [Pad2] 57 | Type = None 58 | 59 | 60 | [Pad3] 61 | Type = None 62 | 63 | 64 | [Pad4] 65 | Type = None 66 | 67 | 68 | [Pad5] 69 | Type = None 70 | 71 | 72 | [Pad6] 73 | Type = None 74 | 75 | 76 | [Pad7] 77 | Type = None 78 | 79 | 80 | [Pad8] 81 | Type = None 82 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/SOCOM 1 (Precision Shooter Preset) MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Triangle = Keyboard/Control 18 | Circle = Keyboard/C 19 | Cross = Keyboard/E 20 | Square = Keyboard/Space 21 | Select = Keyboard/Tab 22 | Start = Keyboard/Z 23 | L1 = Keyboard/1 24 | L2 = Keyboard/2 25 | R1 = Pointer-0/LeftButton 26 | R2 = Keyboard/Q 27 | L3 = Keyboard/X 28 | R3 = Keyboard/R 29 | LUp = Keyboard/W 30 | LRight = Keyboard/D 31 | LDown = Keyboard/S 32 | LLeft = Keyboard/A 33 | RUp = Keyboard/I 34 | RRight = Keyboard/L 35 | RDown = Keyboard/K 36 | RLeft = Keyboard/J 37 | LargeMotor = SDL-0/LargeMotor 38 | SmallMotor = SDL-0/SmallMotor 39 | InvertL = 0 40 | InvertR = 0 41 | Deadzone = 0 42 | AxisScale = 1.33 43 | LargeMotorScale = 1 44 | SmallMotorScale = 1 45 | ButtonDeadzone = 0 46 | PressureModifier = 0.5 47 | Up = Pointer-0/Button4 48 | Up = Keyboard/Up 49 | Left = Keyboard/G 50 | Left = Keyboard/Left 51 | Down = Pointer-0/Button3 52 | Down = Keyboard/Down 53 | Right = Keyboard/H 54 | Right = Keyboard/Right 55 | 56 | 57 | [Pad2] 58 | Type = None 59 | 60 | 61 | [Pad3] 62 | Type = None 63 | 64 | 65 | [Pad4] 66 | Type = None 67 | 68 | 69 | [Pad5] 70 | Type = None 71 | 72 | 73 | [Pad6] 74 | Type = None 75 | 76 | 77 | [Pad7] 78 | Type = None 79 | 80 | 81 | [Pad8] 82 | Type = None 83 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Global Defense Force MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Up = SDL-0/DPadUp 18 | Right = SDL-0/DPadRight 19 | Down = SDL-0/DPadDown 20 | Left = SDL-0/DPadLeft 21 | Triangle = Keyboard/Tab 22 | Circle = Keyboard/R 23 | Cross = Keyboard/E 24 | Cross = Keyboard/Control 25 | Square = Pointer-0/LeftButton 26 | Select = Keyboard/Tab 27 | Start = Keyboard/Z 28 | L1 = Keyboard/Space 29 | L1 = Keyboard/1 30 | L2 = Pointer-0/RightButton 31 | R1 = Pointer-0/LeftButton 32 | R1 = Keyboard/3 33 | R2 = Keyboard/Q 34 | L3 = SDL-0/LeftStick 35 | R3 = Pointer-0/Button3 36 | Analog = SDL-0/Guide 37 | LUp = Keyboard/W 38 | LRight = Keyboard/D 39 | LDown = Keyboard/S 40 | LLeft = Keyboard/A 41 | RUp = Keyboard/I 42 | RRight = Keyboard/L 43 | RDown = Keyboard/K 44 | RLeft = Keyboard/J 45 | LargeMotor = SDL-0/LargeMotor 46 | SmallMotor = SDL-0/SmallMotor 47 | InvertL = 0 48 | InvertR = 0 49 | Deadzone = 0 50 | AxisScale = 1.33 51 | LargeMotorScale = 0 52 | SmallMotorScale = 0 53 | ButtonDeadzone = 0 54 | PressureModifier = 0.5 55 | 56 | 57 | [Pad2] 58 | Type = None 59 | 60 | 61 | [Pad3] 62 | Type = None 63 | 64 | 65 | [Pad4] 66 | Type = None 67 | 68 | 69 | [Pad5] 70 | Type = None 71 | 72 | 73 | [Pad6] 74 | Type = None 75 | 76 | 77 | [Pad7] 78 | Type = None 79 | 80 | 81 | [Pad8] 82 | Type = None 83 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Ghost in the Shell MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Triangle = Keyboard/Q 18 | Circle = Keyboard/R 19 | Cross = Keyboard/E 20 | Square = Keyboard/C 21 | Select = Keyboard/Tab 22 | Start = Keyboard/Z 23 | L1 = Pointer-0/LeftButton 24 | R1 = Pointer-0/Button3 25 | R2 = Keyboard/Space 26 | L3 = Keyboard/Control 27 | R3 = Pointer-0/RightButton 28 | LUp = Keyboard/W 29 | LRight = Keyboard/D 30 | LDown = Keyboard/S 31 | LLeft = Keyboard/A 32 | RUp = Keyboard/I 33 | RRight = Keyboard/L 34 | RDown = Keyboard/K 35 | RLeft = Keyboard/J 36 | Macro1 = Keyboard/Shift & Keyboard/A 37 | Macro1Binds = LLeft 38 | Macro1Pressure = 0.3 39 | Macro2 = Keyboard/Shift & Keyboard/S 40 | Macro2Binds = LDown 41 | Macro2Pressure = 0.3 42 | Macro3 = Keyboard/Shift & Keyboard/D 43 | Macro3Binds = LRight 44 | Macro3Pressure = 0.3 45 | Macro4 = Keyboard/Shift & Keyboard/W 46 | Macro4Binds = LUp 47 | Macro4Pressure = 0.3 48 | InvertL = 0 49 | InvertR = 0 50 | Deadzone = 0 51 | AxisScale = 1.33 52 | ButtonDeadzone = 0 53 | PressureModifier = 0.2 54 | L2 = Keyboard/F 55 | L2 = Pointer-0/Button4 56 | 57 | 58 | [Pad2] 59 | Type = None 60 | 61 | 62 | [Pad3] 63 | Type = None 64 | 65 | 66 | [Pad4] 67 | Type = None 68 | 69 | 70 | [Pad5] 71 | Type = None 72 | 73 | 74 | [Pad6] 75 | Type = None 76 | 77 | 78 | [Pad7] 79 | Type = None 80 | 81 | 82 | [Pad8] 83 | Type = None 84 | -------------------------------------------------------------------------------- /games/game.h: -------------------------------------------------------------------------------- 1 | //========================================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | typedef struct 21 | { 22 | const char *Name; 23 | uint8_t (*Status)(void); 24 | void (*Inject)(void); 25 | uint16_t Tickrate; 26 | uint8_t Crosshair; 27 | char *Option; 28 | char *Option2; 29 | } GAMEDRIVER; 30 | 31 | extern uint8_t GAME_Status(void); 32 | extern void GAME_Inject(void); 33 | extern const char *GAME_Name(void); 34 | extern uint16_t GAME_Tickrate(void); 35 | extern uint8_t GAME_CrosshairSwaySupported(void); 36 | extern uint8_t GAME_OptionSupported(void); 37 | extern const char *GAME_OptionMessage(void); -------------------------------------------------------------------------------- /inputprofiles/PCSX2/Jurassic The Hunted MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Up = Keyboard/Up 18 | Right = Keyboard/Right 19 | Down = Keyboard/E 20 | Down = Keyboard/Down 21 | Left = Keyboard/Left 22 | Select = Keyboard/Tab 23 | Start = Keyboard/Z 24 | L2 = Pointer-0/RightButton 25 | R1 = Keyboard/G 26 | R2 = Pointer-0/LeftButton 27 | L3 = Keyboard/Shift 28 | R3 = Pointer-0/Button3 29 | Analog = SDL-0/Guide 30 | LUp = Keyboard/W 31 | LRight = Keyboard/D 32 | LDown = Keyboard/S 33 | LLeft = Keyboard/A 34 | RUp = Keyboard/I 35 | RRight = Keyboard/L 36 | RDown = Keyboard/K 37 | RLeft = Keyboard/J 38 | LargeMotor = SDL-0/LargeMotor 39 | SmallMotor = SDL-0/SmallMotor 40 | InvertL = 0 41 | InvertR = 0 42 | Deadzone = 0 43 | AxisScale = 1.33 44 | LargeMotorScale = 1 45 | SmallMotorScale = 1 46 | ButtonDeadzone = 0 47 | PressureModifier = 0.5 48 | Triangle = Keyboard/Q 49 | Triangle = Keyboard/Numpad5 50 | Square = Keyboard/R 51 | Square = Keyboard/Numpad1 52 | Cross = Keyboard/Space 53 | Cross = Keyboard/Numpad2 54 | Circle = Keyboard/Control 55 | Circle = Keyboard/Numpad3 56 | L1 = Keyboard/F 57 | L1 = Pointer-0/Button4 58 | 59 | 60 | [Pad2] 61 | Type = None 62 | 63 | 64 | [Pad3] 65 | Type = None 66 | 67 | 68 | [Pad4] 69 | Type = None 70 | 71 | 72 | [Pad5] 73 | Type = None 74 | 75 | 76 | [Pad6] 77 | Type = None 78 | 79 | 80 | [Pad7] 81 | Type = None 82 | 83 | 84 | [Pad8] 85 | Type = None 86 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/SWAT Global Strike Team MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Up = Keyboard/Up 18 | Up = Keyboard/X 19 | Right = Keyboard/Right 20 | Right = Keyboard/V 21 | Left = Keyboard/Left 22 | Left = Keyboard/C 23 | Triangle = Keyboard/Q 24 | Circle = Pointer-0/Button3 25 | Cross = Keyboard/R 26 | Cross = Keyboard/E 27 | Square = Keyboard/Space 28 | Select = Keyboard/Tab 29 | Start = Keyboard/Z 30 | L1 = Keyboard/G 31 | R1 = Pointer-0/LeftButton 32 | R2 = Keyboard/F 33 | L3 = Keyboard/Control 34 | R3 = Pointer-0/RightButton 35 | Analog = SDL-0/Guide 36 | LUp = Keyboard/W 37 | LRight = Keyboard/D 38 | LDown = Keyboard/S 39 | LLeft = Keyboard/A 40 | RUp = SDL-0/-RightY 41 | RUp = Keyboard/I 42 | RRight = SDL-0/+RightX 43 | RRight = Keyboard/L 44 | RDown = SDL-0/+RightY 45 | RDown = Keyboard/K 46 | RLeft = SDL-0/-RightX 47 | RLeft = Keyboard/J 48 | LargeMotor = SDL-0/LargeMotor 49 | SmallMotor = SDL-0/SmallMotor 50 | InvertL = 0 51 | InvertR = 0 52 | Deadzone = 0 53 | AxisScale = 1.33 54 | LargeMotorScale = 1 55 | SmallMotorScale = 1 56 | ButtonDeadzone = 0 57 | PressureModifier = 0.5 58 | Down = Keyboard/Down 59 | Down = Keyboard/B 60 | Down = Pointer-0/Button4 61 | 62 | 63 | [Pad2] 64 | Type = None 65 | 66 | 67 | [Pad3] 68 | Type = None 69 | 70 | 71 | [Pad4] 72 | Type = None 73 | 74 | 75 | [Pad5] 76 | Type = None 77 | 78 | 79 | [Pad6] 80 | Type = None 81 | 82 | 83 | [Pad7] 84 | Type = None 85 | 86 | 87 | [Pad8] 88 | Type = None 89 | -------------------------------------------------------------------------------- /icon.rc: -------------------------------------------------------------------------------- 1 | //========================================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "icon.ico" 21 | 1 VERSIONINFO 22 | FILEVERSION 0,3,1,0 23 | PRODUCTVERSION 0,3,1,0 24 | { 25 | BLOCK "StringFileInfo" 26 | { 27 | BLOCK "040904E4" 28 | { 29 | VALUE "FileVersion", "0, 3, 1, 0" 30 | VALUE "FileDescription", "Mouse Injector for Dolphin" 31 | VALUE "InternalName", "Mouse Injector" 32 | VALUE "LegalCopyright", "Copyright (C) 2020 Carnivorous" 33 | VALUE "LegalTrademarks", "" 34 | VALUE "OriginalFilename", "Mouse Injector.exe" 35 | VALUE "ProductName", "Mouse Injector for Dolphin" 36 | VALUE "ProductVersion", "0, 3, 1, 0" 37 | VALUE "CompanyName", "" 38 | } 39 | } 40 | BLOCK "VarFileInfo" 41 | { 42 | VALUE "Translation", 0x0409, 1252 43 | } 44 | } -------------------------------------------------------------------------------- /inputprofiles/PCSX2/No One Lives Forever MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | Keyboard = true 8 | Mouse = true 9 | DInput = false 10 | XInput = false 11 | SDL = true 12 | SDLControllerEnhancedMode = false 13 | 14 | 15 | [Pad1] 16 | Type = DualShock2 17 | Right = Keyboard/Right 18 | Right = Keyboard/Q 19 | Left = Keyboard/Left 20 | Triangle = Pointer-0/WheelY+ 21 | Circle = SDL-0/B 22 | Cross = Keyboard/E 23 | Square = Pointer-0/WheelY- 24 | Select = Keyboard/Z 25 | Start = Keyboard/Tab 26 | L1 = Keyboard/Space 27 | L2 = Keyboard/Control 28 | R1 = Pointer-0/LeftButton 29 | R2 = Keyboard/R 30 | L3 = Keyboard/N 31 | R3 = Keyboard/M 32 | Analog = SDL-0/Guide 33 | LUp = Keyboard/W 34 | LRight = Keyboard/D 35 | LDown = Keyboard/S 36 | LLeft = Keyboard/A 37 | RUp = Keyboard/I 38 | RRight = Keyboard/L 39 | RDown = Keyboard/K 40 | RLeft = Keyboard/J 41 | LargeMotor = SDL-0/LargeMotor 42 | SmallMotor = SDL-0/SmallMotor 43 | Macro1 = Keyboard/Shift & Keyboard/W 44 | Macro1Binds = LUp 45 | Macro1Frequency = 0 46 | Macro1Pressure = 0.4 47 | Macro2 = Keyboard/Shift & Keyboard/D 48 | Macro2Binds = LRight 49 | Macro2Pressure = 0.4 50 | Macro3 = Keyboard/Shift & Keyboard/S 51 | Macro3Binds = LDown 52 | Macro3Pressure = 0.4 53 | Macro4 = Keyboard/Shift & Keyboard/A 54 | Macro4Binds = LLeft 55 | Macro4Pressure = 0.4 56 | InvertL = 0 57 | InvertR = 0 58 | Deadzone = 0 59 | AxisScale = 1.33 60 | LargeMotorScale = 1 61 | SmallMotorScale = 1 62 | ButtonDeadzone = 0 63 | PressureModifier = 0.5 64 | Up = Keyboard/Up 65 | Up = Pointer-0/Button4 66 | Down = Keyboard/Down 67 | Down = Pointer-0/Button3 68 | 69 | 70 | [Pad2] 71 | Type = None 72 | 73 | 74 | [Pad3] 75 | Type = None 76 | 77 | 78 | [Pad4] 79 | Type = None 80 | 81 | 82 | [Pad5] 83 | Type = None 84 | 85 | 86 | [Pad6] 87 | Type = None 88 | 89 | 90 | [Pad7] 91 | Type = None 92 | 93 | 94 | [Pad8] 95 | Type = None 96 | -------------------------------------------------------------------------------- /games/blank.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define TAU 6.2831853f // 0x40C90FDB 27 | 28 | static uint8_t _Status(void); 29 | static void _Inject(void); 30 | 31 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 32 | { 33 | "Name", 34 | _Status, 35 | _Inject, 36 | 1, // 1000 Hz tickrate 37 | 0 // crosshair sway not supported for driver 38 | }; 39 | 40 | const GAMEDRIVER *GAME_ = &GAMEDRIVER_INTERFACE; 41 | 42 | //========================================================================== 43 | // Purpose: return 1 if game is detected 44 | //========================================================================== 45 | static uint8_t _Status(void) 46 | { 47 | return (0x0); 48 | } 49 | 50 | static void _Inject(void) 51 | { 52 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 53 | return; 54 | 55 | } -------------------------------------------------------------------------------- /inputprofiles/PCSX2/GTA VC MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | UseProfileHotkeyBindings = false 3 | MultitapPort1 = false 4 | MultitapPort2 = false 5 | 6 | 7 | [InputSources] 8 | SDL = true 9 | DInput = false 10 | XInput = false 11 | 12 | 13 | [Pad1] 14 | Type = DualShock2 15 | Up = SDL-0/DPadUp 16 | Up = Keyboard/Up 17 | Right = SDL-0/DPadRight 18 | Right = Keyboard/Right 19 | Down = SDL-0/DPadDown 20 | Down = Keyboard/Down 21 | Left = SDL-0/DPadLeft 22 | Left = Keyboard/Left 23 | Triangle = SDL-0/FaceNorth 24 | Triangle = Keyboard/F 25 | Circle = SDL-0/FaceEast 26 | Circle = Pointer-0/LeftButton 27 | Cross = SDL-0/FaceSouth 28 | Cross = Keyboard/Shift 29 | Square = SDL-0/FaceWest 30 | Square = Keyboard/Space 31 | Select = SDL-0/Back 32 | Start = SDL-0/Start 33 | R1 = SDL-0/RightShoulder 34 | R1 = Pointer-0/RightButton 35 | R3 = SDL-0/RightStick 36 | R3 = Pointer-0/MiddleButton 37 | Analog = SDL-0/Guide 38 | LUp = SDL-0/-LeftY 39 | LUp = Keyboard/W 40 | LRight = SDL-0/+LeftX 41 | LRight = Keyboard/D 42 | LDown = SDL-0/+LeftY 43 | LDown = Keyboard/S 44 | LLeft = SDL-0/-LeftX 45 | LLeft = Keyboard/A 46 | LargeMotor = SDL-0/LargeMotor 47 | SmallMotor = SDL-0/SmallMotor 48 | Macro1 = SDL-0/LeftShoulder 49 | Macro1Deadzone = 0 50 | Macro2 = SDL-0/+RightTrigger 51 | Macro3 = SDL-0/+LeftTrigger 52 | Macro4 = SDL-0/-RightX 53 | Macro4Deadzone = 0.4 54 | Macro5 = SDL-0/+RightX 55 | Macro5Deadzone = 0.4 56 | Macro16Toggle = false 57 | AxisScale = 1 58 | Deadzone = 0 59 | L1 = SDL-0/LeftShoulder 60 | L2Deadzone = 0 61 | R2Deadzone = 0 62 | L2 = Keyboard/Q 63 | L2 = SDL-0/+LeftTrigger 64 | R2 = Keyboard/E 65 | R2 = SDL-0/+RightTrigger 66 | L3 = Keyboard/C 67 | Macro1Toggle = true 68 | 69 | 70 | [Pad2] 71 | Type = None 72 | 73 | 74 | [Pad3] 75 | Type = None 76 | 77 | 78 | [Pad4] 79 | Type = None 80 | 81 | 82 | [Pad5] 83 | Type = None 84 | 85 | 86 | [Pad6] 87 | Type = None 88 | 89 | 90 | [Pad7] 91 | Type = None 92 | 93 | 94 | [Pad8] 95 | Type = None 96 | 97 | 98 | [USB1] 99 | Type = None 100 | 101 | 102 | [USB2] 103 | Type = None 104 | -------------------------------------------------------------------------------- /inputprofiles/Dolphin/Resident Evil 4.ini: -------------------------------------------------------------------------------- 1 | [Profile] 2 | Device = XInput/0/Gamepad 3 | Buttons/A = `Button A` | `DInput/0/Keyboard Mouse:SPACE` | `DInput/0/Keyboard Mouse:F` | `DInput/0/Keyboard Mouse:Click 0` | `DInput/0/Keyboard Mouse:E` * sin( 5 / timer(0.01)) 4 | Buttons/B = toggle(`Thumb R`|`DInput/0/Keyboard Mouse:LSHIFT`,`DInput/0/Keyboard Mouse:R`|`DInput/0/Keyboard Mouse:S`|`Button X`|`DInput/0/Keyboard Mouse:Q`) | `DInput/0/Keyboard Mouse:R` |`Button X`|`DInput/0/Keyboard Mouse:LSHIFT`|`DInput/0/Keyboard Mouse:SPACE` | `DInput/0/Keyboard Mouse:Q` * sin( 5 / timer(0.01)) 5 | Buttons/X = `Button B` | `DInput/0/Keyboard Mouse:BACK`|`DInput/0/Keyboard Mouse:Z` 6 | Buttons/Y = `Button Y` | `DInput/0/Keyboard Mouse:TAB` 7 | Buttons/Z = Back | `DInput/0/Keyboard Mouse:V` 8 | Buttons/Start = Start | `DInput/0/Keyboard Mouse:C` 9 | Main Stick/Up = `Left Y+` 10 | Main Stick/Down = `Left Y-` 11 | Main Stick/Left = `Left X-` 12 | Main Stick/Right = `Left X+` 13 | Main Stick/Calibration = 98.92 99.07 99.30 99.56 100.06 100.02 99.76 99.71 100.00 99.54 100.06 100.26 100.38 100.57 100.53 97.72 98.80 99.69 100.06 100.05 99.83 99.64 99.45 99.04 99.14 99.18 99.20 98.97 99.10 99.42 99.11 99.56 14 | C-Stick/Up = `DInput/0/Keyboard Mouse:Click 1`? smooth(`DInput/0/Keyboard Mouse:RelativeMouse Z+`*2,0.01,0.1):`Right Y+` 15 | C-Stick/Down = `DInput/0/Keyboard Mouse:Click 1`? smooth(`DInput/0/Keyboard Mouse:RelativeMouse Z-`*2,0.01,0.1):`Right Y-` 16 | C-Stick/Left = `Right X-` 17 | C-Stick/Right = `Right X+` 18 | C-Stick/Calibration = 99.21 99.37 99.74 99.92 99.68 100.00 99.55 100.37 100.00 100.35 100.80 100.73 100.45 100.32 100.60 100.09 100.00 99.84 100.30 100.27 99.83 100.18 99.82 99.47 100.00 99.38 99.47 99.53 99.49 99.48 99.17 99.56 19 | Triggers/L = `Shoulder L` 20 | Triggers/R = toggle(`Shoulder R`) | `DInput/0/Keyboard Mouse:Click 1` 21 | Triggers/L-Analog = `Trigger L`| `DInput/0/Keyboard Mouse:SPACE` 22 | Triggers/R-Analog = `Trigger R`| `DInput/0/Keyboard Mouse:SPACE` 23 | D-Pad/Up = `Pad N`|`DInput/0/Keyboard Mouse:W` 24 | D-Pad/Down = `Pad S`|`DInput/0/Keyboard Mouse:S` 25 | D-Pad/Left = `Pad W`|`DInput/0/Keyboard Mouse:A` 26 | D-Pad/Right = `Pad E`|`DInput/0/Keyboard Mouse:D` 27 | Rumble/Motor = `Motor L` | `Motor R` 28 | -------------------------------------------------------------------------------- /inputprofiles/PCSX2/GTA III MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | MultitapPort1 = false 3 | MultitapPort2 = false 4 | 5 | 6 | [InputSources] 7 | SDL = true 8 | DInput = false 9 | XInput = false 10 | 11 | 12 | [Pad1] 13 | Type = DualShock2 14 | AxisScale = 1 15 | Macro1 = SDL-0/LeftShoulder 16 | Macro2 = SDL-0/+RightTrigger 17 | Macro3 = SDL-0/+LeftTrigger 18 | Macro1Deadzone = 0 19 | Deadzone = 0 20 | Macro5 = SDL-0/+RightX 21 | Macro4 = SDL-0/-RightX 22 | Macro5Deadzone = 0.4 23 | Macro4Deadzone = 0.4 24 | Macro16Toggle = false 25 | Select = SDL-0/Back 26 | Start = SDL-0/Start 27 | L3 = SDL-0/LeftStick 28 | Analog = SDL-0/Guide 29 | LargeMotor = SDL-0/LargeMotor 30 | SmallMotor = SDL-0/SmallMotor 31 | LUp = SDL-0/-LeftY 32 | LUp = Keyboard/W 33 | LDown = SDL-0/+LeftY 34 | LDown = Keyboard/S 35 | LRight = SDL-0/+LeftX 36 | LRight = Keyboard/D 37 | Up = SDL-0/DPadUp 38 | Up = Keyboard/Up 39 | Down = SDL-0/DPadDown 40 | Down = Keyboard/Down 41 | Left = SDL-0/DPadLeft 42 | Left = Keyboard/Left 43 | Right = SDL-0/DPadRight 44 | Right = Keyboard/Right 45 | R1 = SDL-0/RightShoulder 46 | R1 = Pointer-0/RightButton 47 | R2 = SDL-0/+RightTrigger 48 | R2 = Keyboard/E 49 | L2 = SDL-0/+LeftTrigger 50 | L2 = Keyboard/Q 51 | Triangle = SDL-0/FaceNorth 52 | Triangle = Keyboard/F 53 | Square = SDL-0/FaceWest 54 | Square = Keyboard/Space 55 | Circle = SDL-0/FaceEast 56 | Circle = Pointer-0/LeftButton 57 | Cross = SDL-0/FaceSouth 58 | Cross = Keyboard/Shift 59 | R3 = SDL-0/RightStick 60 | R3 = Pointer-0/MiddleButton 61 | LLeft = SDL-0/-LeftX 62 | LLeft = Keyboard/A 63 | RLeft = SDL-0/DPadLeft 64 | RRight = SDL-0/DPadRight 65 | L1 = SDL-0/LeftShoulder 66 | 67 | 68 | [Pad2] 69 | Type = None 70 | 71 | 72 | [Pad3] 73 | Type = None 74 | 75 | 76 | [Pad4] 77 | Type = None 78 | 79 | 80 | [Pad5] 81 | Type = None 82 | 83 | 84 | [Pad6] 85 | Type = None 86 | 87 | 88 | [Pad7] 89 | Type = None 90 | 91 | 92 | [Pad8] 93 | Type = None 94 | 95 | 96 | [USB1] 97 | Type = None 98 | 99 | 100 | [USB2] 101 | Type = None 102 | 103 | 104 | [UI] 105 | EnableMouseMapping = false 106 | -------------------------------------------------------------------------------- /games/ps2_black.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define BL_CAM_X 0x5A8FA8 27 | #define BL_CAM_Y 0x5A8FAC 28 | 29 | static uint8_t PS2_BL_Status(void); 30 | static void PS2_BL_Inject(void); 31 | 32 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 33 | { 34 | "Black", 35 | PS2_BL_Status, 36 | PS2_BL_Inject, 37 | 1, // 1000 Hz tickrate 38 | 0 // crosshair sway not supported for driver 39 | }; 40 | 41 | const GAMEDRIVER *GAME_PS2_BLACK = &GAMEDRIVER_INTERFACE; 42 | 43 | //========================================================================== 44 | // Purpose: return 1 if game is detected 45 | //========================================================================== 46 | static uint8_t PS2_BL_Status(void) 47 | { 48 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && PS2_MEM_ReadWord(0x00093394) == 0x5F323133U) && 49 | PS2_MEM_ReadWord(0x00093398) == 0x2E37363BU; 50 | } 51 | 52 | static void PS2_BL_Inject(void) 53 | { 54 | // TODO: gun angle drift? just for show 55 | 56 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 57 | return; 58 | 59 | // float fov = PS2_MEM_ReadFloat(cambase + RDR_camFov); 60 | float looksensitivity = (float)sensitivity / 500.f; 61 | 62 | 63 | float camX = PS2_MEM_ReadFloat(BL_CAM_X); 64 | camX -= (float)xmouse * looksensitivity; 65 | PS2_MEM_WriteFloat(BL_CAM_X, (float)camX); 66 | 67 | float camY = PS2_MEM_ReadFloat(BL_CAM_Y); 68 | camY += (float)(invertpitch ? -ymouse : ymouse) * looksensitivity * 1.333; 69 | PS2_MEM_WriteFloat(BL_CAM_Y, (float)camY); 70 | 71 | } -------------------------------------------------------------------------------- /games/snes_starfox.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include "../main.h" 23 | #include "../memory.h" 24 | #include "../mouse.h" 25 | #include "game.h" 26 | 27 | #define TAU 6.2831853f // 0x40C90FDB 28 | 29 | #define SFOX_shipx 0x000342 // signed 30 | #define SFOX_shipy 0x000344 // signed 31 | 32 | static uint8_t SNES_SFOX_Status(void); 33 | static void SNES_SFOX_Inject(void); 34 | 35 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 36 | { 37 | "Star Fox", 38 | SNES_SFOX_Status, 39 | SNES_SFOX_Inject, 40 | 1, // 1000 Hz tickrate 41 | 0 // crosshair sway not supported for driver 42 | }; 43 | 44 | const GAMEDRIVER *GAME_SNES_STARFOX = &GAMEDRIVER_INTERFACE; 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t SNES_SFOX_Status(void) 50 | { 51 | return (SNES_MEM_ReadWord(0xE64) == 0x0E9A); 52 | } 53 | //========================================================================== 54 | // Purpose: calculate mouse look and inject into current game 55 | //========================================================================== 56 | static void SNES_SFOX_Inject(void) 57 | { 58 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 59 | return; 60 | 61 | const float looksensitivity = (float)sensitivity; 62 | 63 | int16_t cursorx = SNES_MEM_ReadWord(SFOX_shipx); 64 | int16_t cursory = SNES_MEM_ReadWord(SFOX_shipy); 65 | 66 | cursorx += ((float)xmouse) * looksensitivity / 80.f; 67 | cursory += ((float)ymouse) * looksensitivity / 80.f; 68 | 69 | SNES_MEM_WriteWord(SFOX_shipx, (int16_t)cursorx); 70 | SNES_MEM_WriteWord(SFOX_shipy, (int16_t)cursory); 71 | } -------------------------------------------------------------------------------- /games/sd_reddog.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define RD_CURSORX 0x28D358 27 | #define RD_CURSORY 0x28D35C 28 | 29 | static uint8_t SD_RD_Status(void); 30 | static void SD_RD_Inject(void); 31 | 32 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 33 | { 34 | "Red Dog: Superior Firepower", 35 | SD_RD_Status, 36 | SD_RD_Inject, 37 | 1, // 1000 Hz tickrate 38 | 0 // crosshair sway not supported for driver 39 | }; 40 | 41 | const GAMEDRIVER *GAME_SD_REDDOG = &GAMEDRIVER_INTERFACE; 42 | 43 | //========================================================================== 44 | // Purpose: return 1 if game is detected 45 | //========================================================================== 46 | static uint8_t SD_RD_Status(void) 47 | { 48 | return (SD_MEM_ReadWord(0x8040) == 0x54343032U && SD_MEM_ReadWord(0x8044) == 0x31354E20U); 49 | } 50 | //========================================================================== 51 | // Purpose: calculate mouse look and inject into current game 52 | //========================================================================== 53 | static void SD_RD_Inject(void) 54 | { 55 | // TODO: rotate camera when cursor is at edge 56 | 57 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 58 | return; 59 | 60 | float looksensitivity = (float)sensitivity / 40.f; 61 | float scale = 0.01f; 62 | 63 | float cursorX = SD_MEM_ReadFloat(RD_CURSORX); 64 | float cursorY = SD_MEM_ReadFloat(RD_CURSORY); 65 | 66 | cursorX += (float)xmouse * looksensitivity * scale; 67 | cursorY -= (float)ymouse * looksensitivity * scale; 68 | 69 | SD_MEM_WriteFloat(RD_CURSORX, (float)cursorX); 70 | SD_MEM_WriteFloat(RD_CURSORY, (float)cursorY); 71 | 72 | } -------------------------------------------------------------------------------- /games/ps2_codwawff.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define WAWFF_CAMY 0x1EA9CC0 27 | #define WAWFF_CAMX 0x1EA9CC4 28 | #define WAWFF_ZOOM 0x4DC048 29 | 30 | static uint8_t PS2_WAWFF_Status(void); 31 | static void PS2_WAWFF_Inject(void); 32 | 33 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 34 | { 35 | "Call of Duty: World at War - Final Fronts", 36 | PS2_WAWFF_Status, 37 | PS2_WAWFF_Inject, 38 | 1, // 1000 Hz tickrate 39 | 0 // crosshair sway not supported for driver 40 | }; 41 | 42 | const GAMEDRIVER *GAME_PS2_CALLOFDUTYWORLDATWAR = &GAMEDRIVER_INTERFACE; 43 | 44 | //========================================================================== 45 | // Purpose: return 1 if game is detected 46 | //========================================================================== 47 | static uint8_t PS2_WAWFF_Status(void) 48 | { 49 | // SLUS_217.46 50 | return (PS2_MEM_ReadWord(0x93390) == 0x534C5553U && 51 | PS2_MEM_ReadWord(0x93394) == 0x5F323137U && 52 | PS2_MEM_ReadWord(0x93398) == 0x2E34363BU); 53 | } 54 | 55 | static void PS2_WAWFF_Inject(void) 56 | { 57 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 58 | return; 59 | 60 | float looksensitivity = (float)sensitivity / 40.f; 61 | float scale = 400.f; 62 | float zoom = 1.56968534f / PS2_MEM_ReadFloat(WAWFF_ZOOM); 63 | 64 | float camX = PS2_MEM_ReadFloat(WAWFF_CAMX); 65 | camX += (float)xmouse * looksensitivity / scale * zoom; 66 | PS2_MEM_WriteFloat(WAWFF_CAMX, (float)camX); 67 | 68 | float camY = PS2_MEM_ReadFloat(WAWFF_CAMY); 69 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale * zoom; 70 | camY = ClampFloat(camY, -1.299999952f, 1.299999952f); 71 | PS2_MEM_WriteFloat(WAWFF_CAMY, (float)camY); 72 | 73 | } -------------------------------------------------------------------------------- /games/psp_resistance.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define TAU 6.2831853f // 0x40C90FDB 27 | 28 | // Resistance: Retribution 29 | #define RR_CAMY 0x1C98920 30 | 31 | static uint8_t PSP_RR_Status(void); 32 | static void PSP_RR_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Resistance: Retribution", 37 | PSP_RR_Status, 38 | PSP_RR_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PSP_RESISTANCERETRIBUTION = &GAMEDRIVER_INTERFACE; 44 | 45 | //========================================================================== 46 | // Purpose: return 1 if game is detected 47 | //========================================================================== 48 | static uint8_t PSP_RR_Status(void) 49 | { 50 | // UCUS98668 51 | return (PSP_MEM_ReadWord(0x10AEAC0) == 0x55435553U && 52 | PSP_MEM_ReadWord(0x10AEAC4) == 0x39383636U && 53 | PSP_MEM_ReadWord(0x10AEAC8) == 0x38000000U); 54 | } 55 | 56 | //========================================================================== 57 | // Purpose: calculate mouse look and inject into current game 58 | //========================================================================== 59 | static void PSP_RR_Inject(void) 60 | { 61 | if (xmouse == 0 && ymouse == 0) // if mouse is idle 62 | return; 63 | 64 | float camY = PSP_MEM_ReadFloat(RR_CAMY); 65 | 66 | const float looksensitivity = (float)sensitivity / 20.f; 67 | const float scale = 2000.f; 68 | const float zoom = 1.f; 69 | 70 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale / zoom; 71 | 72 | // camY = ClampFloat(camY, -45.f, 45.f); 73 | 74 | PSP_MEM_WriteFloat(RR_CAMY, (float)camY); 75 | } -------------------------------------------------------------------------------- /manymouse/manymouse.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ManyMouse foundation code; apps talks to this and it talks to the lowlevel 3 | * code for various platforms. 4 | * 5 | * Please see the file LICENSE.txt in the source's root directory. 6 | * 7 | * This file written by Ryan C. Gordon. 8 | */ 9 | 10 | #include 11 | #include "manymouse.h" 12 | 13 | static const char *manymouse_copyright = 14 | "ManyMouse " MANYMOUSE_VERSION " copyright (c) 2005-2012 Ryan C. Gordon."; 15 | 16 | extern const ManyMouseDriver *ManyMouseDriver_windows; 17 | 18 | /* 19 | * These have to be in the favored order...obviously it doesn't matter if the 20 | * Linux driver comes before or after the Windows one, since one won't 21 | * exist on a given platform, but things like Mac OS X's hidmanager (which 22 | * only works on OS X 10.5 and later) should come before Mac OS X's 23 | * hidutilities (which works on older systems, but may stop working in 10.6 24 | * and later). In the Mac OS X case, you want to try the newer tech, and if 25 | * it's not available (on 10.4 or earlier), fall back to trying the legacy 26 | * code. 27 | */ 28 | static const ManyMouseDriver **mice_drivers[] = 29 | { 30 | &ManyMouseDriver_windows, 31 | }; 32 | 33 | 34 | static const ManyMouseDriver *driver = NULL; 35 | 36 | int ManyMouse_Init(void) 37 | { 38 | const int upper = (sizeof (mice_drivers) / sizeof (mice_drivers[0])); 39 | int i; 40 | int retval = -1; 41 | 42 | /* impossible test to keep manymouse_copyright linked into the binary. */ 43 | if (manymouse_copyright == NULL) 44 | return -1; 45 | 46 | if (driver != NULL) 47 | return -1; 48 | 49 | for (i = 0; (i < upper) && (driver == NULL); i++) 50 | { 51 | const ManyMouseDriver *this_driver = *(mice_drivers[i]); 52 | if (this_driver != NULL) /* if not built for this platform, skip it. */ 53 | { 54 | const int mice = this_driver->init(); 55 | if (mice > retval) 56 | retval = mice; /* may move from "error" to "no mice found". */ 57 | 58 | if (mice >= 0) 59 | driver = this_driver; 60 | } /* if */ 61 | } /* for */ 62 | 63 | return retval; 64 | } /* ManyMouse_Init */ 65 | 66 | 67 | void ManyMouse_Quit(void) 68 | { 69 | if (driver != NULL) 70 | { 71 | driver->quit(); 72 | driver = NULL; 73 | } /* if */ 74 | } /* ManyMouse_Quit */ 75 | 76 | const char *ManyMouse_DriverName(void) 77 | { 78 | return (driver) ? driver->driver_name : NULL; 79 | } /* ManyMouse_DriverName */ 80 | 81 | const char *ManyMouse_DeviceName(unsigned int index) 82 | { 83 | return (driver) ? driver->name(index) : NULL; 84 | } /* ManyMouse_DeviceName */ 85 | 86 | int ManyMouse_PollEvent(ManyMouseEvent *event) 87 | { 88 | return (driver) ? driver->poll(event) : 0; 89 | } /* ManyMouse_PollEvent */ 90 | 91 | /* end of manymouse.c ... */ 92 | 93 | -------------------------------------------------------------------------------- /games/n64_megaman64.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include "../main.h" 23 | #include "../memory.h" 24 | #include "../mouse.h" 25 | #include "game.h" 26 | 27 | #define MM64_ROTX 0x80204A04 28 | #define MM64_CAMX 0x80204358 29 | #define MM64_CAMY 0x8020435C 30 | 31 | static uint8_t N64_MM64_Status(void); 32 | static void N64_MM64_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Mega Man 64", 37 | N64_MM64_Status, 38 | N64_MM64_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_N64_MEGAMAN64 = &GAMEDRIVER_INTERFACE; 44 | 45 | static float xAccumulator = 0.f; 46 | static float yAccumulator = 0.f; 47 | 48 | static uint8_t N64_MM64_Status(void) 49 | { 50 | return (N64_MEM_ReadUInt(0x80000000) == 0x3C1A800A && N64_MEM_ReadUInt(0x80000004) == 0x275AF980); // unique header in RDRAM 51 | } 52 | 53 | static void N64_MM64_Inject(void) 54 | { 55 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 56 | return; 57 | 58 | const float looksensitivity = (float)sensitivity; 59 | const float scale = 4.f; 60 | 61 | int16_t rotX = N64_MEM_ReadInt16(MM64_ROTX); 62 | int16_t camY = N64_MEM_ReadInt16(MM64_CAMY); 63 | float rotXF = (float)rotX; 64 | float camYF = (float)camY; 65 | 66 | float dx = (float)xmouse * looksensitivity / scale; 67 | AccumulateAddRemainder(&rotXF, &xAccumulator, xmouse, dx); 68 | 69 | float ym = (float)(invertpitch ? -ymouse : ymouse); 70 | float dy = ym * looksensitivity / scale; 71 | AccumulateAddRemainder(&camYF, &yAccumulator, ym, dy); 72 | 73 | float cameraX = rotXF - 2048; 74 | while (cameraX > 4096) 75 | cameraX -= 4096; 76 | while (cameraX < 0) 77 | cameraX += 4096; 78 | 79 | N64_MEM_WriteInt16(MM64_ROTX, (int16_t)rotXF); 80 | N64_MEM_WriteInt16(MM64_CAMX, (int16_t)cameraX); 81 | N64_MEM_WriteInt16(MM64_CAMY, (int16_t)camYF); 82 | } -------------------------------------------------------------------------------- /games/sd_makenx.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define MX_CAMY 0x1E3634 27 | // #define MX_CAMY 0x47634 28 | // #define MX_CAMX 0x413F94 29 | 30 | static uint8_t SD_MX_Status(void); 31 | static void SD_MX_Inject(void); 32 | 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Maken X", 37 | SD_MX_Status, 38 | SD_MX_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_SD_MAKENX = &GAMEDRIVER_INTERFACE; 44 | 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t SD_MX_Status(void) 50 | { 51 | return (SD_MEM_ReadWord(0x8040) == 0x4D4B2D35U && SD_MEM_ReadWord(0x8044) == 0x31303530U); 52 | // return (SD_MEM_ReadWord(0x0) == 0x28220389U && SD_MEM_ReadWord(0x4) == 0x60D3B365U); 53 | } 54 | //========================================================================== 55 | // Purpose: calculate mouse look and inject into current game 56 | //========================================================================== 57 | static void SD_MX_Inject(void) 58 | { 59 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 60 | return; 61 | 62 | float looksensitivity = (float)sensitivity / 40.f; 63 | 64 | // float camX = SD_MEM_ReadFloat(MX_CAMX); 65 | float camY = SD_MEM_ReadFloat(MX_CAMY); 66 | 67 | // camX += (float)xmouse * looksensitivity; 68 | camY -= (float)ymouse * looksensitivity; 69 | 70 | int i; 71 | // bunch of redundant values that are all the same but need to all be set? 72 | for (i = 0; i < 30; ++i) 73 | { 74 | SD_MEM_WriteFloat(MX_CAMY + (i * 0x4), (float)camY); 75 | } 76 | // SD_MEM_WriteFloat(MX_CAMY + (i * 0x4), (float)camY); 77 | 78 | } -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | #Mouse Injector Makefile 2 | #Use with TDM-GCC 4.9.2-tdm-3 or MinGW 3 | #For portable MinGW download Orwell Dev-C++ 4 | #mingw32-make.exe -f makefile to compile 5 | 6 | #Compiler directories 7 | #MINGWDIR = C:/Dev/Dev-Cpp/MinGW64/bin/ 8 | MINGWDIR = C:/TDM-GCC-64/bin/ 9 | CC = $(MINGWDIR)gcc 10 | WINDRES = $(MINGWDIR)windres 11 | 12 | #Source directories 13 | SRCDIR = ./ 14 | MANYMOUSEDIR = $(SRCDIR)manymouse/ 15 | SDLDIR = $(SRCDIR)include/SDL2/ 16 | GAMESDIR = $(SRCDIR)games/ 17 | OBJDIR = $(SRCDIR)obj/ 18 | EXENAME = "$(SRCDIR)Mouse Injector.exe" 19 | 20 | #Compiler flags 21 | CFLAGS = -ansi -O2 -m64 -std=c99 -Wall 22 | WFLAGS = -Wextra -pedantic -Wno-parentheses 23 | RESFLAGS = -F pe-x86-64 --input-format=rc -O coff 24 | 25 | #Linker flags 26 | OBJS = $(OBJDIR)main.o $(OBJDIR)memory.o $(OBJDIR)mouse.o $(OBJDIR)manymouse.o $(OBJDIR)windows_wminput.o $(OBJDIR)icon.res $(OBJDIR)joystick.o #$(OBJDIR)xinputjoy.o 27 | GAMEOBJS = $(patsubst $(GAMESDIR)%.c, $(OBJDIR)%.o, $(wildcard $(GAMESDIR)*.c)) 28 | LIBS = -static-libgcc -lpsapi -lwinmm -lmingw32 -lSDL2main -lSDL2 #-lxinput 29 | LFLAGS = $(OBJS) $(GAMEOBJS) -I/include -L/lib -o $(EXENAME) $(LIBS) -m64 -s 30 | 31 | #Main recipes 32 | mouseinjector: $(OBJS) $(GAMEOBJS) 33 | $(CC) $(LFLAGS) 34 | 35 | all: clean mouseinjector 36 | 37 | #Individual recipes 38 | $(OBJDIR)main.o: $(SRCDIR)main.c $(SRCDIR)main.h $(SRCDIR)memory.h $(SRCDIR)joystick.h $(SRCDIR)mouse.h $(GAMESDIR)game.h 39 | $(CC) -c $(SRCDIR)main.c -o $(OBJDIR)main.o $(CFLAGS) $(WFLAGS) 40 | 41 | $(OBJDIR)memory.o: $(SRCDIR)memory.c $(SRCDIR)memory.h 42 | $(CC) -c $(SRCDIR)memory.c -o $(OBJDIR)memory.o $(CFLAGS) $(WFLAGS) 43 | 44 | $(OBJDIR)joystick.o: $(SRCDIR)joystick.c $(SRCDIR)joystick.h 45 | $(CC) -c $(SRCDIR)joystick.c -o $(OBJDIR)joystick.o $(CFLAGS) $(WFLAGS) 46 | 47 | # $(OBJDIR)xinputjoy.o: $(SRCDIR)xinputjoy.c $(SRCDIR)xinputjoy.h 48 | # $(CC) -c $(SRCDIR)xinputjoy.c -o $(OBJDIR)xinputjoy.o $(CFLAGS) $(WFLAGS) 49 | 50 | $(OBJDIR)mouse.o: $(SRCDIR)mouse.c $(SRCDIR)mouse.h $(MANYMOUSEDIR)manymouse.h 51 | $(CC) -c $(SRCDIR)mouse.c -o $(OBJDIR)mouse.o $(CFLAGS) $(WFLAGS) 52 | 53 | $(OBJDIR)manymouse.o: $(MANYMOUSEDIR)manymouse.c $(MANYMOUSEDIR)manymouse.h 54 | $(CC) -c $(MANYMOUSEDIR)manymouse.c -o $(OBJDIR)manymouse.o $(CFLAGS) $(WFLAGS) 55 | 56 | $(OBJDIR)windows_wminput.o: $(MANYMOUSEDIR)windows_wminput.c $(MANYMOUSEDIR)manymouse.h 57 | $(CC) -c $(MANYMOUSEDIR)windows_wminput.c -o $(OBJDIR)windows_wminput.o $(CFLAGS) 58 | 59 | 60 | 61 | $(OBJDIR)icon.res: $(SRCDIR)icon.rc $(SRCDIR)icon.ico 62 | $(WINDRES) -i $(SRCDIR)icon.rc -o $(OBJDIR)icon.res $(RESFLAGS) 63 | 64 | #Game drivers recipe 65 | $(OBJDIR)%.o: $(GAMESDIR)%.c $(SRCDIR)main.h $(SRCDIR)memory.h $(SRCDIR)mouse.h $(GAMESDIR)game.h $(SRCDIR)joystick.h #$(SRCDIR)xinputjoy.h 66 | $(CC) -c $< -o $@ $(CFLAGS) $(WFLAGS) 67 | 68 | clean: 69 | rm -f $(SRCDIR)*.exe $(OBJDIR)*.o $(OBJDIR)*.res $(SRCDIR)*.ini -------------------------------------------------------------------------------- /games/n64_turokragewars.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include "../main.h" 23 | #include "../memory.h" 24 | #include "../mouse.h" 25 | #include "game.h" 26 | 27 | #define TAU 6.2831853f // 0x40C90FDB 28 | 29 | #define TRW_CAMX 0x8069260C 30 | #define TRW_CAMY 0x80692C2C 31 | #define TRW_CAMY_ANGLE 0x80692CC4 32 | 33 | static uint8_t N64_TRW_Status(void); 34 | static void N64_TRW_Inject(void); 35 | 36 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 37 | { 38 | "Turok: Rage Wars", 39 | N64_TRW_Status, 40 | N64_TRW_Inject, 41 | 1, // 1000 Hz tickrate 42 | 0 // crosshair sway not supported for driver 43 | }; 44 | 45 | const GAMEDRIVER *GAME_N64_TUROKRAGEWARS = &GAMEDRIVER_INTERFACE; 46 | 47 | static float xAccumulator = 0.f; 48 | static float yAccumulator = 0.f; 49 | 50 | static uint8_t N64_TRW_Status(void) 51 | { 52 | return (N64_MEM_ReadUInt(0x80000000) == 0x3C1A002C && N64_MEM_ReadUInt(0x80000004) == 0x275A0D70); // unique header in RDRAM 53 | } 54 | 55 | static void N64_TRW_Inject(void) 56 | { 57 | // TODO: find different cheat to disable auto-level 58 | // current one breaks CPUs 59 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 60 | return; 61 | 62 | const float looksensitivity = (float)sensitivity; 63 | const float scale = 9000.f; 64 | // const float zoom = 256.f / N64_MEM_ReadInt16(DNZH_ZOOM); 65 | const float zoom = 1.f; 66 | 67 | float camX = N64_MEM_ReadFloat(TRW_CAMX); 68 | // float camY = N64_MEM_ReadFloat(TRW_CAMY); 69 | float camY = N64_MEM_ReadFloat(TRW_CAMY_ANGLE); 70 | 71 | camX += (float)xmouse * looksensitivity / scale * zoom * 2.f; 72 | 73 | float ym = (float)(invertpitch ? -ymouse : ymouse); 74 | camY -= ym * looksensitivity / scale * zoom; 75 | 76 | N64_MEM_WriteFloat(TRW_CAMX, (float)camX); 77 | // N64_MEM_WriteFloat(TRW_CAMY, (float)camY); 78 | N64_MEM_WriteFloat(TRW_CAMY_ANGLE, (float)camY); 79 | // N64_MEM_WriteFloat(TRW_CAMY_ANGLE, (float)camY * 1.570796251f); 80 | } -------------------------------------------------------------------------------- /inputprofiles/PCSX2/GTA SA MouseInjector.ini: -------------------------------------------------------------------------------- 1 | [Pad] 2 | UseProfileHotkeyBindings = false 3 | MultitapPort1 = false 4 | MultitapPort2 = false 5 | 6 | 7 | [InputSources] 8 | SDL = true 9 | DInput = false 10 | XInput = false 11 | SDLControllerEnhancedMode = false 12 | 13 | 14 | [Pad1] 15 | Type = DualShock2 16 | Up = SDL-0/DPadUp 17 | Right = SDL-0/DPadRight 18 | Down = SDL-0/DPadDown 19 | Left = SDL-0/DPadLeft 20 | Select = SDL-0/Back 21 | L1 = SDL-0/LeftShoulder 22 | R3 = SDL-0/RightStick 23 | Analog = SDL-0/Guide 24 | RUp = SDL-0/-RightY 25 | RRight = SDL-0/+RightX 26 | RDown = SDL-0/+RightY 27 | RLeft = SDL-0/-RightX 28 | LargeMotor = SDL-0/LargeMotor 29 | SmallMotor = SDL-0/SmallMotor 30 | Macro1 = SDL-0/LeftShoulder 31 | Macro1Deadzone = 0 32 | Macro2 = SDL-0/+RightTrigger 33 | Macro3 = SDL-0/+LeftTrigger 34 | Macro4 = SDL-0/-RightX 35 | Macro4Deadzone = 0.4 36 | Macro5 = SDL-0/+RightX 37 | Macro5Deadzone = 0.4 38 | Macro16Toggle = false 39 | AxisScale = 1 40 | Deadzone = 0 41 | LUp = SDL-0/-LeftY 42 | LUp = Keyboard/W 43 | LDown = SDL-0/+LeftY 44 | LDown = Keyboard/S 45 | LLeft = SDL-0/-LeftX 46 | LLeft = Keyboard/A 47 | LRight = SDL-0/+LeftX 48 | LRight = Keyboard/D 49 | Circle = SDL-0/FaceEast 50 | Circle = Pointer-0/LeftButton 51 | Square = SDL-0/FaceWest 52 | Square = Keyboard/Space 53 | Cross = SDL-0/FaceSouth 54 | Cross = Keyboard/Shift 55 | Triangle = SDL-0/FaceNorth 56 | Triangle = Keyboard/F 57 | R1 = SDL-0/RightShoulder 58 | R1 = Pointer-0/RightButton 59 | R2 = SDL-0/+RightTrigger 60 | R2 = Keyboard/E 61 | L2 = SDL-0/+LeftTrigger 62 | L2 = Keyboard/Q 63 | Start = SDL-0/Start 64 | Start = Keyboard/V 65 | L3 = Keyboard/C 66 | 67 | 68 | [Pad2] 69 | Type = None 70 | 71 | 72 | [Pad3] 73 | Type = None 74 | 75 | 76 | [Pad4] 77 | Type = None 78 | 79 | 80 | [Pad5] 81 | Type = None 82 | 83 | 84 | [Pad6] 85 | Type = None 86 | 87 | 88 | [Pad7] 89 | Type = None 90 | 91 | 92 | [Pad8] 93 | Type = None 94 | 95 | 96 | [Hotkeys] 97 | ToggleFullscreen = Keyboard/Escape 98 | OpenAchievementsList = SDL-0/Guide 99 | OpenAchievementsList = Keyboard/F1 100 | TogglePause = Keyboard/Pause 101 | TogglePause = SDL-0/Guide 102 | FrameAdvance = Keyboard/N 103 | ToggleFrameLimit = SDL-0/LeftStick 104 | ToggleFrameLimit = SDL-1/LeftStick 105 | HoldTurbo = SDL-1/JoyButton6 106 | HoldTurbo = SDL-0/JoyButton6 107 | HoldTurbo = SDL-2/JoyButton6 108 | HoldTurbo = Keyboard/Apostrophe 109 | ResetVM = Keyboard/K 110 | PreviousSaveStateSlot = Keyboard/F6 111 | NextSaveStateSlot = Keyboard/F7 112 | SaveStateToSlot = Keyboard/F5 113 | LoadStateFromSlot = Keyboard/F8 114 | IncreaseVolume = Keyboard/NumpadPlus 115 | DecreaseVolume = Keyboard/NumpadMinus 116 | ToggleSoftwareRendering = Keyboard/F9 117 | 118 | 119 | [USB1] 120 | Type = None 121 | 122 | 123 | [USB2] 124 | Type = None 125 | -------------------------------------------------------------------------------- /games/ps2_foreverkingdom.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define TAU 6.2831853f // 0x40C90FDB 27 | 28 | #define FK_CAMY 0x245F50 29 | #define FK_CAMX 0x245F54 30 | 31 | static uint8_t PS2_FK_Status(void); 32 | static void PS2_FK_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Forever Kingdom", 37 | PS2_FK_Status, 38 | PS2_FK_Inject, 39 | 1, 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_FOREVERKINGDOM = &GAMEDRIVER_INTERFACE; 44 | 45 | //========================================================================== 46 | // Purpose: return 1 if game is detected 47 | //========================================================================== 48 | static uint8_t PS2_FK_Status(void) 49 | { 50 | // SLUS_203.43 51 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && 52 | PS2_MEM_ReadWord(0x00093394) == 0x5F323033U && 53 | PS2_MEM_ReadWord(0x00093398) == 0x2E34333BU); 54 | } 55 | //========================================================================== 56 | // Purpose: calculate mouse look and inject into current game 57 | //========================================================================== 58 | static void PS2_FK_Inject(void) 59 | { 60 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 61 | return; 62 | 63 | float looksensitivity = (float)sensitivity / 40.f; 64 | float scale = 500.f; 65 | 66 | float camX = PS2_MEM_ReadFloat(FK_CAMX); 67 | float camY = PS2_MEM_ReadFloat(FK_CAMY); 68 | 69 | camX += (float)xmouse * looksensitivity / scale; 70 | while (camX > TAU / 2) 71 | camX -= TAU; 72 | while (camX < -TAU / 2) 73 | camX += TAU; 74 | 75 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale; 76 | camY = ClampFloat(camY, -1.3f, 1.3f); 77 | 78 | PS2_MEM_WriteFloat(FK_CAMX, camX); 79 | PS2_MEM_WriteFloat(FK_CAMY, camY); 80 | 81 | } -------------------------------------------------------------------------------- /games/ss_virtualhydlide.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define VH_CAMX 0x58D28 27 | #define VH_ROTX 0x599BC 28 | 29 | static uint8_t SS_VH_Status(void); 30 | static void SS_VH_Inject(void); 31 | 32 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 33 | { 34 | "Virtual Hydlide", 35 | SS_VH_Status, 36 | SS_VH_Inject, 37 | 1, // 1000 Hz tickrate 38 | 0 // crosshair sway supported for driver 39 | }; 40 | 41 | const GAMEDRIVER *GAME_SS_VIRTUALHYDLIDE = &GAMEDRIVER_INTERFACE; 42 | 43 | static float xAccumulator = 0.f; 44 | 45 | //========================================================================== 46 | // Purpose: return 1 if game is detected 47 | //========================================================================== 48 | static uint8_t SS_VH_Status(void) 49 | { 50 | return (PS1_MEM_ReadWord(0xC20) == 0x2D543431U && 51 | PS1_MEM_ReadWord(0xC24) == 0x30344831U); 52 | } 53 | //========================================================================== 54 | // Purpose: calculate mouse look and inject into current game 55 | //========================================================================== 56 | static void SS_VH_Inject(void) 57 | { 58 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 59 | return; 60 | 61 | float looksensitivity = (float)sensitivity / 20.f; 62 | float scale = 10.f; 63 | // float scale = 1.f; 64 | 65 | uint8_t camX = PS1_MEM_ReadByte(VH_CAMX); 66 | float camXF = (float)camX; 67 | 68 | float dx = -(float)xmouse * looksensitivity / scale; 69 | AccumulateAddRemainder(&camXF, &xAccumulator, -xmouse, dx); 70 | 71 | while (camXF >= 256) 72 | camXF -= 256; 73 | while (camXF < 0) 74 | camXF += 256; 75 | 76 | PS1_MEM_WriteByte(VH_CAMX, (uint8_t)camXF); 77 | 78 | camXF -= 256; 79 | 80 | while (camXF >= 256) 81 | camXF -= 256; 82 | while (camXF < 0) 83 | camXF += 256; 84 | 85 | PS1_MEM_WriteByte(VH_ROTX, (uint8_t)camXF); 86 | } -------------------------------------------------------------------------------- /games/ps1_disruptor.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define DIS_CAMX 0x77624 27 | #define DIS_CAMX_SPEED 0x77604 28 | #define DIS_CAMX_VEL 0x77618 29 | #define DIS_DIRX 0x77671 30 | 31 | #define DIS_IS_LOADING 0x5B900 32 | #define DIS_IS_PAUSED 0x7145C 33 | 34 | static uint8_t PS1_DIS_Status(void); 35 | static void PS1_DIS_Inject(void); 36 | 37 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 38 | { 39 | "Disruptor", 40 | PS1_DIS_Status, 41 | PS1_DIS_Inject, 42 | 1, // 1000 Hz tickrate 43 | 0 // crosshair sway supported for driver 44 | }; 45 | 46 | const GAMEDRIVER *GAME_PS1_DISRUPTOR = &GAMEDRIVER_INTERFACE; 47 | 48 | static float xAccumulator = 0.f; 49 | 50 | //========================================================================== 51 | // Purpose: return 1 if game is detected 52 | //========================================================================== 53 | static uint8_t PS1_DIS_Status(void) 54 | { 55 | return (PS1_MEM_ReadWord(0x93AC) == 0x534C5553U && 56 | PS1_MEM_ReadWord(0x93B0) == 0x5F303032U && 57 | PS1_MEM_ReadWord(0x93B4) == 0x2E32343BU); 58 | } 59 | //========================================================================== 60 | // Purpose: calculate mouse look and inject into current game 61 | //========================================================================== 62 | static void PS1_DIS_Inject(void) 63 | { 64 | if(xmouse == 0) // if mouse is idle 65 | return; 66 | 67 | if (PS1_MEM_ReadWord(DIS_IS_LOADING)) 68 | return; 69 | 70 | if (PS1_MEM_ReadHalfword(DIS_IS_PAUSED)) 71 | return; 72 | 73 | uint8_t camX = PS1_MEM_ReadByte(DIS_CAMX); 74 | float camXF = (float)camX; 75 | 76 | const float looksensitivity = (float)sensitivity / 20.f; 77 | const float scale = 12.f; 78 | 79 | float dx = -(float)xmouse * looksensitivity / scale; 80 | AccumulateAddRemainder(&camXF, &xAccumulator, -xmouse, dx); 81 | 82 | PS1_MEM_WriteByte(DIS_CAMX, (uint8_t)camXF); 83 | } -------------------------------------------------------------------------------- /games/ps2_eternalring.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define ER_CAMY 0x1FF350 27 | #define ER_CAMX 0x1FF354 28 | #define ER_IS_BUSY 0x1FFAA4 29 | #define ER_IS_PAUSED 0x202B74 30 | 31 | static uint8_t PS2_ER_Status(void); 32 | static void PS2_ER_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Eternal Ring", 37 | PS2_ER_Status, 38 | PS2_ER_Inject, 39 | 1, 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_ETERNALRING = &GAMEDRIVER_INTERFACE; 44 | 45 | //========================================================================== 46 | // Purpose: return 1 if game is detected 47 | //========================================================================== 48 | static uint8_t PS2_ER_Status(void) 49 | { 50 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && 51 | PS2_MEM_ReadWord(0x00093394) == 0x5F323030U && 52 | PS2_MEM_ReadWord(0x00093398) == 0x2E31353BU); 53 | } 54 | //========================================================================== 55 | // Purpose: calculate mouse look and inject into current game 56 | //========================================================================== 57 | static void PS2_ER_Inject(void) 58 | { 59 | // opening doors, cutscenes, item pickup, reading message, conversation 60 | if (PS2_MEM_ReadUInt16(ER_IS_BUSY)) 61 | return; 62 | 63 | if (PS2_MEM_ReadUInt16(ER_IS_PAUSED)) 64 | return; 65 | 66 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 67 | return; 68 | 69 | float looksensitivity = (float)sensitivity / 40.f; 70 | float scale = 500.f; 71 | 72 | float camX = PS2_MEM_ReadFloat(ER_CAMX); 73 | float camY = PS2_MEM_ReadFloat(ER_CAMY); 74 | 75 | camX += (float)xmouse * looksensitivity / scale; 76 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale; 77 | 78 | PS2_MEM_WriteFloat(ER_CAMX, camX); 79 | PS2_MEM_WriteFloat(ER_CAMY, camY); 80 | 81 | } -------------------------------------------------------------------------------- /games/ps2_deltaforce.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include 23 | #include "../main.h" 24 | #include "../memory.h" 25 | #include "../mouse.h" 26 | #include "game.h" 27 | 28 | #define DF_CAMY 0x1D917D0 29 | #define DF_CAMX 0x1D917D4 30 | 31 | static uint8_t PS2_DF_Status(void); 32 | static void PS2_DF_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Delta Force: Black Hawk Down", 37 | PS2_DF_Status, 38 | PS2_DF_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_DELTAFORCE = &GAMEDRIVER_INTERFACE; 44 | 45 | static float xAccumulator = 0.; 46 | static float yAccumulator = 0.; 47 | static float scale = 0.005f; 48 | 49 | //========================================================================== 50 | // Purpose: return 1 if game is detected 51 | //========================================================================== 52 | static uint8_t PS2_DF_Status(void) 53 | { 54 | // SLUS_211.24 55 | return (PS2_MEM_ReadWord(0x003FA550) == 0x534C5553U && 56 | PS2_MEM_ReadWord(0x003FA554) == 0x5F323131U && 57 | PS2_MEM_ReadWord(0x003FA558) == 0x2E323400U); 58 | } 59 | //========================================================================== 60 | // Purpose: calculate mouse look and inject into current game 61 | //========================================================================== 62 | static void PS2_DF_Inject(void) 63 | { 64 | // TODO: camX clamp when in helicopter gun 65 | 66 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 67 | return; 68 | 69 | const float looksensitivity = (float)sensitivity / 40.f; 70 | 71 | float camX = PS2_MEM_ReadFloat(DF_CAMX); 72 | float camY = PS2_MEM_ReadFloat(DF_CAMY); 73 | 74 | camX += (float)xmouse * looksensitivity * scale; 75 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity * scale; 76 | camY = ClampFloat(camY, -1.299999952f, 1.299999952f); 77 | 78 | PS2_MEM_WriteFloat(DF_CAMX, camX); 79 | PS2_MEM_WriteFloat(DF_CAMY, camY); 80 | } -------------------------------------------------------------------------------- /games/ps2_q3.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define Q3_ONFOOT_CAMY 0x33D56C 27 | #define Q3_ONFOOT_CAMX 0x33D570 28 | #define Q3_ONFOOT_SANITY 0x33D57C 29 | #define Q3_ONFOOT_FOV 0x6D4020 30 | 31 | static uint8_t PS2_Q3_Status(void); 32 | static void PS2_Q3_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Quake III: Revolution", 37 | PS2_Q3_Status, 38 | PS2_Q3_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_QUAKE3 = &GAMEDRIVER_INTERFACE; 44 | 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t PS2_Q3_Status(void) 50 | { 51 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && PS2_MEM_ReadWord(0x00093394) == 0x5F323031U) && 52 | PS2_MEM_ReadWord(0x00093398) == 0x2E36373BU; 53 | } 54 | //========================================================================== 55 | // Purpose: calculate mouse look and inject into current game 56 | //========================================================================== 57 | static void PS2_Q3_Inject(void) 58 | { 59 | // TODO: disable mouse during level intro and possibly boss cutscenes 60 | 61 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 62 | return; 63 | 64 | float looksensitivity = (float)sensitivity / 140.f; 65 | 66 | if (PS2_MEM_ReadWord(Q3_ONFOOT_SANITY) != 0x0) { // in-game 67 | 68 | float fov = PS2_MEM_ReadFloat(Q3_ONFOOT_FOV); 69 | float camX = PS2_MEM_ReadFloat(Q3_ONFOOT_CAMX); 70 | float camY = PS2_MEM_ReadFloat(Q3_ONFOOT_CAMY); 71 | 72 | camX -= (float)xmouse * looksensitivity * (fov / 90.f); 73 | camY += (float)ymouse * looksensitivity * (fov / 90.f); 74 | 75 | PS2_MEM_WriteFloat(Q3_ONFOOT_CAMX, (float)camX); 76 | PS2_MEM_WriteFloat(Q3_ONFOOT_CAMY, (float)camY); 77 | } 78 | 79 | } -------------------------------------------------------------------------------- /games/ps2_spiderman2.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define TAU 6.2831853f // 0x40C90FDB 27 | 28 | #define SM2_CAMY 0x1BA4318 29 | #define SM2_CAMX 0x1BA4314 30 | 31 | static uint8_t PS2_SM2_Status(void); 32 | static void PS2_SM2_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Spider-Man 2", 37 | PS2_SM2_Status, 38 | PS2_SM2_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_SPIDERMAN2 = &GAMEDRIVER_INTERFACE; 44 | 45 | //========================================================================== 46 | // Purpose: return 1 if game is detected 47 | //========================================================================== 48 | static uint8_t PS2_SM2_Status(void) 49 | { 50 | // SLUS_207.76 51 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && 52 | PS2_MEM_ReadWord(0x00093394) == 0x5F323037U && 53 | PS2_MEM_ReadWord(0x00093398) == 0x2E37363BU); 54 | } 55 | //========================================================================== 56 | // Purpose: calculate mouse look and inject into current game 57 | //========================================================================== 58 | static void PS2_SM2_Inject(void) 59 | { 60 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 61 | return; 62 | 63 | float looksensitivity = (float)sensitivity / 10000.f; 64 | // float zoom = 1.f / PS2_MEM_ReadFloat(NOLF_ZOOM); 65 | float zoom = 1.f; 66 | 67 | float camX = PS2_MEM_ReadFloat(SM2_CAMX); 68 | float camY = PS2_MEM_ReadFloat(SM2_CAMY); 69 | 70 | camX -= (float)xmouse * looksensitivity * zoom; 71 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity * zoom; 72 | 73 | while (camX > TAU / 2.f) 74 | camX -= TAU; 75 | while (camX < -TAU / 2.f) 76 | camX += TAU; 77 | 78 | camY = ClampFloat(camY, 0.3f, 2.7f); 79 | 80 | PS2_MEM_WriteFloat(SM2_CAMX, (float)camX); 81 | PS2_MEM_WriteFloat(SM2_CAMY, (float)camY); 82 | 83 | } -------------------------------------------------------------------------------- /games/ps2_gsgirl1.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include "../main.h" 23 | #include "../memory.h" 24 | #include "../mouse.h" 25 | #include "game.h" 26 | 27 | #define GSG_cursorx 0x303D80 // range: 0 (left) - 512 (right) 28 | #define GSG_last_cursorx 0x303D90 29 | #define GSG_cursory 0x303D84 // range: 0 (top) - 448 (bottom) 30 | #define GSG_last_cursory 0x303D94 31 | 32 | static uint8_t PS2_GSG_Status(void); 33 | static void PS2_GSG_Inject(void); 34 | 35 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 36 | { 37 | "PS2 Gunslinger Girl Vol. 1", 38 | PS2_GSG_Status, 39 | PS2_GSG_Inject, 40 | 1, // 1000 Hz tickrate 41 | 0 // crosshair sway not supported for driver 42 | }; 43 | 44 | const GAMEDRIVER *GAME_PS2_GUNSLINGERGIRL1 = &GAMEDRIVER_INTERFACE; 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t PS2_GSG_Status(void) 50 | { 51 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5053U && PS2_MEM_ReadWord(0x00093394) == 0x5F323533U && 52 | PS2_MEM_ReadWord(0x00093398) == 0x2E34333BU); 53 | } 54 | //========================================================================== 55 | // Purpose: calculate mouse look and inject into current game 56 | //========================================================================== 57 | static void PS2_GSG_Inject(void) 58 | { 59 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 60 | return; 61 | 62 | const float looksensitivity = (float)sensitivity / 40.f; 63 | 64 | float cursorX = PS2_MEM_ReadFloat(GSG_cursorx); 65 | float cursorY = PS2_MEM_ReadFloat(GSG_cursory); 66 | 67 | cursorX += (float)xmouse * looksensitivity; 68 | cursorY += (float)(invertpitch ? -ymouse : ymouse) * looksensitivity * 1.2; 69 | 70 | PS2_MEM_WriteFloat(GSG_cursorx, (float)cursorX); 71 | PS2_MEM_WriteFloat(GSG_last_cursorx, (float)cursorX); 72 | PS2_MEM_WriteFloat(GSG_cursory, (float)cursorY); 73 | PS2_MEM_WriteFloat(GSG_last_cursory, (float)cursorY); 74 | } -------------------------------------------------------------------------------- /games/ps2_nolf.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define NOLF_CAMY 0x7C3E50 27 | #define NOLF_CAMX 0x7C3E54 28 | #define NOLF_ZOOM 0x426100 29 | 30 | #define NOLF_IS_IN_GAME_CUTSCENE 0x424064 31 | 32 | static uint8_t PS2_NOLF_Status(void); 33 | static void PS2_NOLF_Inject(void); 34 | 35 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 36 | { 37 | "No One Lives Forever", 38 | PS2_NOLF_Status, 39 | PS2_NOLF_Inject, 40 | 1, // 1000 Hz tickrate 41 | 0 // crosshair sway not supported for driver 42 | }; 43 | 44 | const GAMEDRIVER *GAME_PS2_NOONELIVESFOREVER = &GAMEDRIVER_INTERFACE; 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t PS2_NOLF_Status(void) 50 | { 51 | // SLUS_200.28 52 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && 53 | PS2_MEM_ReadWord(0x00093394) == 0x5F323030U && 54 | PS2_MEM_ReadWord(0x00093398) == 0x2E32383BU); 55 | } 56 | //========================================================================== 57 | // Purpose: calculate mouse look and inject into current game 58 | //========================================================================== 59 | static void PS2_NOLF_Inject(void) 60 | { 61 | if (PS2_MEM_ReadUInt(NOLF_IS_IN_GAME_CUTSCENE)) 62 | return; 63 | 64 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 65 | return; 66 | 67 | float looksensitivity = (float)sensitivity / 14000.f; 68 | float zoom = 1.f / PS2_MEM_ReadFloat(NOLF_ZOOM); 69 | 70 | float camX = PS2_MEM_ReadFloat(NOLF_CAMX); 71 | float camY = PS2_MEM_ReadFloat(NOLF_CAMY); 72 | 73 | camX += (float)xmouse * looksensitivity * zoom; 74 | camY += (float)(invertpitch ? -ymouse : ymouse) * looksensitivity * zoom; 75 | 76 | camY = ClampFloat(camY, -1.470796347, 1.470796347); 77 | 78 | PS2_MEM_WriteFloat(NOLF_CAMX, (float)camX); 79 | PS2_MEM_WriteFloat(NOLF_CAMY, (float)camY); 80 | 81 | } -------------------------------------------------------------------------------- /games/ps2_50cbp.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define BP_ONFOOT_CAMY 0x55B520 27 | #define BP_ONFOOT_CAMX 0x55B524 28 | #define BP_AUTOCENTER_BASE 0x427654 29 | #define BP_AUTOCENTER 0x394 // offset 30 | 31 | static uint8_t PS2_BP_Status(void); 32 | static void PS2_BP_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "50 Cent: Bulletproof", 37 | PS2_BP_Status, 38 | PS2_BP_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_50CENTBULLETPROOF = &GAMEDRIVER_INTERFACE; 44 | 45 | //========================================================================== 46 | // Purpose: return 1 if game is detected 47 | //========================================================================== 48 | static uint8_t PS2_BP_Status(void) 49 | { 50 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && PS2_MEM_ReadWord(0x00093394) == 0x5F323133U) && 51 | PS2_MEM_ReadWord(0x00093398) == 0x2E31353BU; 52 | } 53 | //========================================================================== 54 | // Purpose: calculate mouse look and inject into current game 55 | //========================================================================== 56 | static void PS2_BP_Inject(void) 57 | { 58 | // TODO: fov? 59 | 60 | // disable auto-center after landing 61 | uint32_t autoCenterBase = PS2_MEM_ReadPointer(BP_AUTOCENTER_BASE); 62 | if (autoCenterBase != 0x0) 63 | PS2_MEM_WriteUInt(autoCenterBase + BP_AUTOCENTER, 0x0); 64 | 65 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 66 | return; 67 | 68 | float looksensitivity = (float)sensitivity / 40.f; 69 | 70 | float camX = PS2_MEM_ReadFloat(BP_ONFOOT_CAMX); 71 | float camY = PS2_MEM_ReadFloat(BP_ONFOOT_CAMY); 72 | 73 | camX += (float)xmouse * looksensitivity / 200.f; 74 | camY += (float)ymouse * looksensitivity / 200.f; 75 | 76 | PS2_MEM_WriteFloat(BP_ONFOOT_CAMX, (float)camX); 77 | PS2_MEM_WriteFloat(BP_ONFOOT_CAMY, (float)camY); 78 | 79 | } -------------------------------------------------------------------------------- /games/snes_cybernator.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include 23 | #include "../main.h" 24 | #include "../memory.h" 25 | #include "../mouse.h" 26 | #include "game.h" 27 | 28 | // STATIC addresses 29 | #define CYB_GUN_ANGLE 0x0014F0 30 | #define CYB_AIM_LOCK 0x14F7 31 | 32 | static uint8_t SNES_CYB_Status(void); 33 | static void SNES_CYB_Inject(void); 34 | 35 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 36 | { 37 | "Cybernator", 38 | SNES_CYB_Status, 39 | SNES_CYB_Inject, 40 | 1, // 1000 Hz tickrate 41 | 0 // crosshair sway not supported for driver 42 | }; 43 | 44 | const GAMEDRIVER *GAME_SNES_CYBERNATOR = &GAMEDRIVER_INTERFACE; 45 | 46 | static float yAccumulator = 0.f; 47 | 48 | //========================================================================== 49 | // Purpose: return 1 if game is detected 50 | //========================================================================== 51 | static uint8_t SNES_CYB_Status(void) 52 | { 53 | return (SNES_MEM_ReadWord(0xE0) == 0x614A && SNES_MEM_ReadWord(0xE2) == 0x656B); 54 | } 55 | //========================================================================== 56 | // Purpose: calculate mouse look and inject into current game 57 | //========================================================================== 58 | static void SNES_CYB_Inject(void) 59 | { 60 | // TODO: Don't adjust when Punch weapon selected 61 | // TODO: Make patch file 62 | // TODO: Add cursor 63 | // TODO: Lock aim so you can walk backwards and control direction with mouse 64 | 65 | if(ymouse == 0) // if mouse is idle 66 | return; 67 | 68 | const float looksensitivity = (float)sensitivity / 20.f; 69 | const float scale = 5.f; 70 | 71 | uint16_t gunAngle = SNES_MEM_ReadWord(CYB_GUN_ANGLE); 72 | float gunAngleF = (float)gunAngle; 73 | 74 | float dy = (float)ymouse * looksensitivity * scale; 75 | AccumulateAddRemainder(&gunAngleF, &yAccumulator, ymouse, dy); 76 | 77 | if (gunAngleF < 200) 78 | gunAngleF = 200; 79 | if (gunAngleF > 4096) 80 | gunAngleF = 4096; 81 | 82 | SNES_MEM_WriteWord(CYB_GUN_ANGLE, (uint16_t)gunAngleF); 83 | } -------------------------------------------------------------------------------- /games/ps2_vampirenight.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include 23 | #include "../main.h" 24 | #include "../memory.h" 25 | #include "../mouse.h" 26 | #include "game.h" 27 | 28 | #define VN_cursorx 0x492E78 29 | #define VN_cursory 0x492E7A 30 | 31 | static uint8_t PS2_VN_Status(void); 32 | static void PS2_VN_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "PS2 Vampire Night", 37 | PS2_VN_Status, 38 | PS2_VN_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_VAMPIRENIGHT = &GAMEDRIVER_INTERFACE; 44 | 45 | static float xAccumulator = 0.; 46 | static float yAccumulator = 0.; 47 | 48 | //========================================================================== 49 | // Purpose: return 1 if game is detected 50 | //========================================================================== 51 | static uint8_t PS2_VN_Status(void) 52 | { 53 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && PS2_MEM_ReadWord(0x00093394) == 0x5F323032U && 54 | PS2_MEM_ReadWord(0x00093398) == 0x2E32313BU); 55 | } 56 | //========================================================================== 57 | // Purpose: calculate mouse look and inject into current game 58 | //========================================================================== 59 | static void PS2_VN_Inject(void) 60 | { 61 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 62 | return; 63 | 64 | const float looksensitivity = (float)sensitivity / 40.f; 65 | 66 | float cursorX = PS2_MEM_ReadUInt16(VN_cursorx); 67 | float cursorY = PS2_MEM_ReadUInt16(VN_cursory); 68 | float cursorXF = (float)cursorX; 69 | float cursorYF = (float)cursorY; 70 | 71 | float dx = (float)xmouse * looksensitivity; 72 | AccumulateAddRemainder(&cursorXF, &xAccumulator, xmouse, dx); 73 | 74 | float ym = (float)(invertpitch ? -ymouse : ymouse); 75 | float dy = -ym * looksensitivity; 76 | AccumulateAddRemainder(&cursorYF, &yAccumulator, -ym, dy); 77 | 78 | PS2_MEM_WriteUInt16(VN_cursorx, (uint16_t)cursorXF); 79 | PS2_MEM_WriteUInt16(VN_cursory, (uint16_t)cursorYF); 80 | } -------------------------------------------------------------------------------- /games/ps2_timecrisis2.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include 23 | #include "../main.h" 24 | #include "../memory.h" 25 | #include "../mouse.h" 26 | #include "game.h" 27 | 28 | #define TC2_cursorx 0x3AD240 29 | #define TC2_cursory 0x3AD244 30 | 31 | static uint8_t PS2_TC2_Status(void); 32 | static void PS2_TC2_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "PS2 Time Crisis II", 37 | PS2_TC2_Status, 38 | PS2_TC2_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_TIMECRISIS2 = &GAMEDRIVER_INTERFACE; 44 | 45 | static float xAccumulator = 0.; 46 | static float yAccumulator = 0.; 47 | 48 | //========================================================================== 49 | // Purpose: return 1 if game is detected 50 | //========================================================================== 51 | static uint8_t PS2_TC2_Status(void) 52 | { 53 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && PS2_MEM_ReadWord(0x00093394) == 0x5F323032U && 54 | PS2_MEM_ReadWord(0x00093398) == 0x2E31393BU); 55 | } 56 | //========================================================================== 57 | // Purpose: calculate mouse look and inject into current game 58 | //========================================================================== 59 | static void PS2_TC2_Inject(void) 60 | { 61 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 62 | return; 63 | 64 | const float looksensitivity = (float)sensitivity / 40.f; 65 | 66 | float cursorX = PS2_MEM_ReadUInt(TC2_cursorx); 67 | float cursorY = PS2_MEM_ReadUInt(TC2_cursory); 68 | float cursorXF = (float)cursorX; 69 | float cursorYF = (float)cursorY; 70 | 71 | float dx = (float)xmouse * looksensitivity; 72 | AccumulateAddRemainder(&cursorXF, &xAccumulator, xmouse, dx); 73 | 74 | float ym = (float)(invertpitch ? -ymouse : ymouse); 75 | float dy = ym * looksensitivity; 76 | AccumulateAddRemainder(&cursorYF, &yAccumulator, ym, dy); 77 | 78 | PS2_MEM_WriteUInt(TC2_cursorx, (uint32_t)cursorXF); 79 | PS2_MEM_WriteUInt(TC2_cursory, (uint32_t)cursorYF); 80 | } -------------------------------------------------------------------------------- /games/ps1_revx.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define REVX_crosshairx 0x000FEB68 27 | #define REVX_crosshairy 0x000FEB6A 28 | 29 | #define CROSSHAIRXHIGH 0x1400 30 | #define CROSSHAIRYLOW 0x2C0 31 | #define CROSSHAIRYHIGH 0xE00 32 | 33 | static uint8_t PS1_REVX_Status(void); 34 | static void PS1_REVX_Inject(void); 35 | 36 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 37 | { 38 | "PS1 Revolution X", 39 | PS1_REVX_Status, 40 | PS1_REVX_Inject, 41 | 1, // 1000 Hz tickrate 42 | 0 // crosshair sway not supported for driver 43 | }; 44 | 45 | const GAMEDRIVER *GAME_PS1_REVOLUTIONX = &GAMEDRIVER_INTERFACE; 46 | 47 | //========================================================================== 48 | // Purpose: return 1 if game is detected 49 | //========================================================================== 50 | static uint8_t PS1_REVX_Status(void) 51 | { 52 | return (PS1_MEM_ReadWord(0xB8B8) == 0x4C55535FU && PS1_MEM_ReadWord(0xB8BC) == 0x3030302EU && PS1_MEM_ReadWord(0xB8C0) == 0x31323B31U); // LUS_000.12;1 53 | } 54 | //========================================================================== 55 | // Purpose: calculate mouse look and inject into current game 56 | //========================================================================== 57 | static void PS1_REVX_Inject(void) 58 | { 59 | // TODO: check if pause/on menu/aka not in-game 60 | 61 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 62 | return; 63 | 64 | // PS1 camx is stored in a Halfword (uint16_t) 65 | uint16_t crosshairx = PS1_MEM_ReadHalfword(REVX_crosshairx); 66 | uint16_t crosshairy = PS1_MEM_ReadHalfword(REVX_crosshairy); 67 | 68 | const float looksensitivity = (float)sensitivity / 7.f; 69 | 70 | crosshairx += (float)xmouse * looksensitivity; 71 | crosshairx = ClampHalfword(crosshairx, 0, CROSSHAIRXHIGH); 72 | 73 | crosshairy += (float)ymouse * looksensitivity; 74 | crosshairy = ClampHalfword(crosshairy, CROSSHAIRYLOW, CROSSHAIRYHIGH); 75 | 76 | PS1_MEM_WriteHalfword(REVX_crosshairx, (uint16_t)crosshairx); 77 | PS1_MEM_WriteHalfword(REVX_crosshairy, (uint16_t)crosshairy); 78 | } -------------------------------------------------------------------------------- /games/ps2_beverlyhillscop.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define BHC_CAMY 0x31DC90 27 | #define BHC_CAMX_BASE_PTR 0x31D050 28 | // offset from camX base 29 | #define BHC_CAMX 0xE38 30 | 31 | #define BHC_CAN_ACT 0x3BD4B8 32 | 33 | static uint8_t PS2_BHC_Status(void); 34 | static void PS2_BHC_Inject(void); 35 | 36 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 37 | { 38 | "Beverly Hills Cop", 39 | PS2_BHC_Status, 40 | PS2_BHC_Inject, 41 | 1, // 1000 Hz tickrate 42 | 0 // crosshair sway not supported for driver 43 | }; 44 | 45 | const GAMEDRIVER *GAME_PS2_BEVERLYHILLSCOP = &GAMEDRIVER_INTERFACE; 46 | 47 | uint32_t camXBase = 0; 48 | 49 | //========================================================================== 50 | // Purpose: return 1 if game is detected 51 | //========================================================================== 52 | static uint8_t PS2_BHC_Status(void) 53 | { 54 | // SLES_544.56 55 | return (PS2_MEM_ReadWord(0x93390) == 0x534C4553U && 56 | PS2_MEM_ReadWord(0x93394) == 0x5F353434U && 57 | PS2_MEM_ReadWord(0x93398) == 0x2E35363BU); 58 | } 59 | //========================================================================== 60 | // Purpose: calculate mouse look and inject into current game 61 | //========================================================================== 62 | static void PS2_BHC_Inject(void) 63 | { 64 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 65 | return; 66 | 67 | if (!PS2_MEM_ReadUInt(BHC_CAN_ACT)) 68 | return; 69 | 70 | camXBase = PS2_MEM_ReadUInt(BHC_CAMX_BASE_PTR); 71 | if (!camXBase) 72 | return; 73 | 74 | float looksensitivity = (float)sensitivity / 40.f; 75 | float scale = 250.f; 76 | 77 | float camX = PS2_MEM_ReadFloat(camXBase + BHC_CAMX); 78 | float camY = PS2_MEM_ReadFloat(BHC_CAMY); 79 | 80 | camX += (float)xmouse * looksensitivity / scale; 81 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale; 82 | 83 | camY = ClampFloat(camY, -1.221730471f, 1.221730471f); 84 | 85 | PS2_MEM_WriteFloat(camXBase + BHC_CAMX, (float)camX); 86 | PS2_MEM_WriteFloat(BHC_CAMY, (float)camY); 87 | 88 | } -------------------------------------------------------------------------------- /games/ps1_expert.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define EX_CAMY 0x61F4C 27 | #define EX_CAMX 0x61F4E 28 | #define EX_CAMROLL 0x61F50 29 | 30 | static uint8_t PS1_EX_Status(void); 31 | static void PS1_EX_Inject(void); 32 | 33 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 34 | { 35 | "Expert", 36 | PS1_EX_Status, 37 | PS1_EX_Inject, 38 | 1, // 1000 Hz tickrate 39 | 0 // crosshair sway supported for driver 40 | }; 41 | 42 | const GAMEDRIVER *GAME_PS1_EXPERT = &GAMEDRIVER_INTERFACE; 43 | 44 | static float xAccumulator = 0.f; 45 | static float yAccumulator = 0.f; 46 | 47 | //========================================================================== 48 | // Purpose: return 1 if game is detected 49 | //========================================================================== 50 | static uint8_t PS1_EX_Status(void) 51 | { 52 | return (PS1_MEM_ReadWord(0x92D4) == 0x534C5053U && 53 | PS1_MEM_ReadWord(0x92D8) == 0x5F303033U && 54 | PS1_MEM_ReadWord(0x92DC) == 0x2E34323BU); 55 | } 56 | //========================================================================== 57 | // Purpose: calculate mouse look and inject into current game 58 | //========================================================================== 59 | static void PS1_EX_Inject(void) 60 | { 61 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 62 | return; 63 | 64 | int16_t camX = PS1_MEM_ReadInt16(EX_CAMX); 65 | int16_t camY = PS1_MEM_ReadInt16(EX_CAMY); 66 | float camXF = (float)camX; 67 | float camYF = (float)camY; 68 | 69 | const float looksensitivity = (float)sensitivity / 20.f; 70 | const float scale = 1.f; 71 | 72 | float dx = (float)xmouse * looksensitivity * scale; 73 | AccumulateAddRemainder(&camXF, &xAccumulator, xmouse, dx); 74 | 75 | float ym = (float)(invertpitch ? -ymouse : ymouse); 76 | float dy = -ym * looksensitivity * scale; 77 | AccumulateAddRemainder(&camYF, &yAccumulator, -ym, dy); 78 | 79 | camYF = ClampFloat(camYF, -200.f, 200.f); 80 | 81 | PS1_MEM_WriteInt16(EX_CAMX, (int16_t)camXF); 82 | // PS1_MEM_WriteInt16(EX_CAMY, (int16_t)camYF); 83 | // PS1_MEM_WriteInt16(EX_CAMROLL, -(int16_t)camYF); 84 | } -------------------------------------------------------------------------------- /games/ps2_daemon.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define DAE_CAM_Y 0x2B05B0 27 | #define DAE_CAMXBASE 0x2A6744 28 | #define DAE_CAM_X 0x98 29 | 30 | static uint8_t PS2_DAE_Status(void); 31 | static uint8_t PS2_DAE_DetectCam(void); 32 | static void PS2_DAE_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Daemon Summoner", 37 | PS2_DAE_Status, 38 | PS2_DAE_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_DAEMONSUMMONER = &GAMEDRIVER_INTERFACE; 44 | 45 | static uint32_t camXBase = 0; 46 | 47 | //========================================================================== 48 | // Purpose: return 1 if game is detected 49 | //========================================================================== 50 | static uint8_t PS2_DAE_Status(void) 51 | { 52 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C4553U && 53 | PS2_MEM_ReadWord(0x00093394) == 0x5F353336U && 54 | PS2_MEM_ReadWord(0x00093398) == 0x2E35323BU); 55 | } 56 | 57 | static uint8_t PS2_DAE_DetectCam(void) 58 | { 59 | uint32_t tempCamBase = PS2_MEM_ReadUInt(DAE_CAMXBASE); 60 | if (tempCamBase) 61 | { 62 | camXBase = tempCamBase; 63 | return 1; 64 | } 65 | return 0; 66 | } 67 | 68 | static void PS2_DAE_Inject(void) 69 | { 70 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 71 | return; 72 | 73 | // if (!PS2_DAE_DetectCam()) 74 | // return; 75 | 76 | camXBase = PS2_MEM_ReadUInt(DAE_CAMXBASE); 77 | 78 | // float zoom = PS2_MEM_ReadFloat(TAA_ZOOM) / 1.221730351f; 79 | float zoom = 1.f; 80 | float looksensitivity = (float)sensitivity / 40.f; 81 | float scale = 300.f; 82 | 83 | float camX = PS2_MEM_ReadFloat(camXBase + DAE_CAM_X); 84 | camX -= (float)xmouse * looksensitivity / scale * zoom; 85 | PS2_MEM_WriteFloat(camXBase + DAE_CAM_X, (float)camX); 86 | 87 | float camY = PS2_MEM_ReadFloat(DAE_CAM_Y); 88 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale * zoom; 89 | camY = ClampFloat(camY, -0.8000000119f, 0.8000000119f); 90 | PS2_MEM_WriteFloat(DAE_CAM_Y, (float)camY); 91 | 92 | } -------------------------------------------------------------------------------- /games/ps1_dnlotb.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define LOTB_CAMX 0xE9D1C 27 | #define LOTB_CAMY_1 0x10A70C 28 | #define LOTB_CAMY_2 0x10A720 29 | 30 | static uint8_t PS1_DNLOTB_Status(void); 31 | static void PS1_DNLOTB_Inject(void); 32 | 33 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 34 | { 35 | "Duke Nukem: Land of the Babes", 36 | PS1_DNLOTB_Status, 37 | PS1_DNLOTB_Inject, 38 | 1, // 1000 Hz tickrate 39 | 0 // crosshair sway supported for driver 40 | }; 41 | 42 | const GAMEDRIVER *GAME_PS1_DNLANDOFTHEBABES = &GAMEDRIVER_INTERFACE; 43 | 44 | static float xAccumulator = 0.f; 45 | static float yAccumulator = 0.f; 46 | 47 | //========================================================================== 48 | // Purpose: return 1 if game is detected 49 | //========================================================================== 50 | static uint8_t PS1_DNLOTB_Status(void) 51 | { 52 | return (PS1_MEM_ReadWord(0x92EC) == 0x534C5553U && PS1_MEM_ReadWord(0x92F0) == 0x5F303130U && PS1_MEM_ReadWord(0x92F4) == 0x2E30323BU); // SLUS_010.02; 53 | } 54 | //========================================================================== 55 | // Purpose: calculate mouse look and inject into current game 56 | //========================================================================== 57 | static void PS1_DNLOTB_Inject(void) 58 | { 59 | 60 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 61 | return; 62 | 63 | uint16_t camX = PS1_MEM_ReadHalfword(LOTB_CAMX); 64 | // uint16_t camY = PS1_MEM_ReadHalfword(LOTB_CAMY_2); 65 | float camXF = (float)camX; 66 | // float camYF = (float)camY; 67 | 68 | const float looksensitivity = (float)sensitivity / 30.f; 69 | 70 | float dx = (float)xmouse * looksensitivity; 71 | AccumulateAddRemainder(&camXF, &xAccumulator, xmouse, dx); 72 | 73 | // float ym = (float)(invertpitch ? -ymouse : ymouse); 74 | // float dy = ym * looksensitivity; 75 | // AccumulateAddRemainder(&camYF, &yAccumulator, ym, dy); 76 | 77 | PS1_MEM_WriteHalfword(LOTB_CAMX, (uint16_t)camXF); 78 | // PS1_MEM_WriteHalfword(LOTB_CAMY_1, (uint16_t)camYF); 79 | // PS1_MEM_WriteHalfword(LOTB_CAMY_2, (uint16_t)camYF); 80 | } -------------------------------------------------------------------------------- /games/ps1_galegunner.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define GG_CAMX 0xD39CA 27 | #define GG_CAMY 0xD3C48 28 | 29 | static uint8_t PS1_GG_Status(void); 30 | static void PS1_GG_Inject(void); 31 | 32 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 33 | { 34 | "Gale Gunner", 35 | PS1_GG_Status, 36 | PS1_GG_Inject, 37 | 1, // 1000 Hz tickrate 38 | 0 // crosshair sway supported for driver 39 | }; 40 | 41 | const GAMEDRIVER *GAME_PS1_GALEGUNNER = &GAMEDRIVER_INTERFACE; 42 | 43 | static float xAccumulator = 0.f; 44 | static float yAccumulator = 0.f; 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t PS1_GG_Status(void) 50 | { 51 | return (PS1_MEM_ReadWord(0x9244) == 0x534C5053U && PS1_MEM_ReadWord(0x9248) == 0x5F303235U && PS1_MEM_ReadWord(0x924C) == 0x2E39363BU); 52 | } 53 | //========================================================================== 54 | // Purpose: calculate mouse look and inject into current game 55 | //========================================================================== 56 | static void PS1_GG_Inject(void) 57 | { 58 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 59 | return; 60 | 61 | uint16_t camX = PS1_MEM_ReadHalfword(GG_CAMX); 62 | uint16_t camY = PS1_MEM_ReadHalfword(GG_CAMY); 63 | float camXF = (float)camX; 64 | float camYF = (float)camY; 65 | 66 | const float looksensitivity = (float)sensitivity / 20.f; 67 | const float scale = 1.f; 68 | 69 | float dx = (float)xmouse * looksensitivity * scale; 70 | AccumulateAddRemainder(&camXF, &xAccumulator, xmouse, dx); 71 | 72 | float ym = (float)(invertpitch ? -ymouse : ymouse); 73 | float dy = ym * looksensitivity * scale; 74 | AccumulateAddRemainder(&camYF, &yAccumulator, ym, dy); 75 | 76 | // clamp y-axis 77 | // if (camYF > 600 && camYF < 32000) 78 | // camYF = 600; 79 | // if (camYF < 65000 && camYF > 32000) 80 | // camYF = 65000; 81 | 82 | PS1_MEM_WriteHalfword(GG_CAMX, (uint16_t)camXF); 83 | PS1_MEM_WriteHalfword(GG_CAMY, (uint16_t)camYF); 84 | } -------------------------------------------------------------------------------- /games/ps2_urbanchaos.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define UC_CAMBASE 0x779188 27 | #define UC_CAM_Y 0x674 // offset 28 | #define UC_CAM_X 0x678 // offset 29 | #define UC_ON_LADDER 0x2E0 // offset 30 | #define UC_FOV 0x370 31 | 32 | static uint8_t PS2_UC_Status(void); 33 | static void PS2_UC_Inject(void); 34 | 35 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 36 | { 37 | "Urban Chaos - Riot Response", 38 | PS2_UC_Status, 39 | PS2_UC_Inject, 40 | 1, // 1000 Hz tickrate 41 | 0 // crosshair sway not supported for driver 42 | }; 43 | 44 | const GAMEDRIVER *GAME_PS2_URBANCHAOS = &GAMEDRIVER_INTERFACE; 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t PS2_UC_Status(void) 50 | { 51 | // BASLUS-21390 52 | return (PS2_MEM_ReadWord(0x006AC730) == 0x4241534C && PS2_MEM_ReadWord(0x006AC734) == 0x55532D32 && 53 | PS2_MEM_ReadWord(0x006AC738) == 0x31333930); 54 | } 55 | 56 | static void PS2_UC_Inject(void) 57 | { 58 | // TODO: no mouse when paused 59 | // TODO: adjust sensitivity based on FOV 60 | 61 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 62 | return; 63 | 64 | uint32_t camBase = PS2_MEM_ReadPointer(UC_CAMBASE); 65 | 66 | if (camBase == 0x0) // no cambase, not in game 67 | return; 68 | 69 | if (PS2_MEM_ReadUInt(camBase + UC_ON_LADDER) == 0x1) // don't move camera when on ladder | NEEDS TESTING 70 | return; 71 | 72 | // float fov = PS2_MEM_ReadFloat(cambase + RDR_camFov); 73 | float fov = PS2_MEM_ReadFloat(camBase + UC_FOV); // default FOV = 53 74 | float looksensitivity = (float)sensitivity / 13000.f * ((int)fov / 53.f); 75 | 76 | 77 | float camX = PS2_MEM_ReadFloat(camBase + UC_CAM_X); 78 | camX -= (float)xmouse * looksensitivity; 79 | PS2_MEM_WriteFloat(camBase + UC_CAM_X, (float)camX); 80 | 81 | float camY = PS2_MEM_ReadFloat(camBase + UC_CAM_Y); 82 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity; 83 | camY = ClampFloat(camY, -1.256637096f, 1.256637096f); 84 | PS2_MEM_WriteFloat(camBase + UC_CAM_Y, (float)camY); 85 | 86 | } -------------------------------------------------------------------------------- /games/ps1_c12.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define C12_TP_CAMY 0x1DE800 27 | #define C12_TP_CAMX 0x1DE802 28 | 29 | static uint8_t PS1_C12_Status(void); 30 | static void PS1_C12_Inject(void); 31 | 32 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 33 | { 34 | "C-12: Final Resistance", 35 | PS1_C12_Status, 36 | PS1_C12_Inject, 37 | 1, // 1000 Hz tickrate 38 | 0 // crosshair sway supported for driver 39 | }; 40 | 41 | const GAMEDRIVER *GAME_PS1_C12FINALRESISTANCE = &GAMEDRIVER_INTERFACE; 42 | 43 | static float xAccumulator = 0.f; 44 | static float yAccumulator = 0.f; 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t PS1_C12_Status(void) 50 | { 51 | return (PS1_MEM_ReadWord(0x9274) == 0x53435553U && PS1_MEM_ReadWord(0x9278) == 0x5F393436U && PS1_MEM_ReadWord(0x927C) == 0x2E36363BU); 52 | } 53 | //========================================================================== 54 | // Purpose: calculate mouse look and inject into current game 55 | //========================================================================== 56 | static void PS1_C12_Inject(void) 57 | { 58 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 59 | return; 60 | 61 | uint16_t camX = PS1_MEM_ReadHalfword(C12_TP_CAMX); 62 | uint16_t camY = PS1_MEM_ReadHalfword(C12_TP_CAMY); 63 | float camXF = (float)camX; 64 | float camYF = (float)camY; 65 | 66 | const float looksensitivity = (float)sensitivity / 20.f; 67 | const float scale = 1.f; 68 | 69 | float dx = (float)xmouse * looksensitivity * scale; 70 | AccumulateAddRemainder(&camXF, &xAccumulator, xmouse, dx); 71 | 72 | float ym = (float)(invertpitch ? -ymouse : ymouse); 73 | float dy = -ym * looksensitivity * scale; 74 | AccumulateAddRemainder(&camYF, &yAccumulator, -ym, dy); 75 | 76 | // clamp y-axis 77 | // if (camYF > 600 && camYF < 32000) 78 | // camYF = 600; 79 | // if (camYF < 65000 && camYF > 32000) 80 | // camYF = 65000; 81 | 82 | PS1_MEM_WriteHalfword(C12_TP_CAMX, (uint16_t)camXF); 83 | PS1_MEM_WriteHalfword(C12_TP_CAMY, (uint16_t)camYF); 84 | } -------------------------------------------------------------------------------- /games/ps1_hpss.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define HPSS_CAMY 0x1ABD95 27 | #define HPSS_CAMX 0x1ABD99 28 | 29 | static uint8_t PS1_HPSS_Status(void); 30 | static void PS1_HPSS_Inject(void); 31 | 32 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 33 | { 34 | "Harry Potter and the Sorcerer's Stone", 35 | PS1_HPSS_Status, 36 | PS1_HPSS_Inject, 37 | 1, // 1000 Hz tickrate 38 | 0 // crosshair sway supported for driver 39 | }; 40 | 41 | const GAMEDRIVER *GAME_PS1_HPSORCERERSSTONE = &GAMEDRIVER_INTERFACE; 42 | 43 | static float xAccumulator = 0.f; 44 | static float yAccumulator = 0.f; 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t PS1_HPSS_Status(void) 50 | { 51 | return (PS1_MEM_ReadWord(0x9274) == 0x534C5553U && PS1_MEM_ReadWord(0x9278) == 0x5F303134U && PS1_MEM_ReadWord(0x927C) == 0x2E31353BU); 52 | } 53 | //========================================================================== 54 | // Purpose: calculate mouse look and inject into current game 55 | //========================================================================== 56 | static void PS1_HPSS_Inject(void) 57 | { 58 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 59 | return; 60 | 61 | uint16_t camX = PS1_MEM_ReadHalfword(HPSS_CAMX); 62 | uint16_t camY = PS1_MEM_ReadHalfword(HPSS_CAMY); 63 | float camXF = (float)camX; 64 | float camYF = (float)camY; 65 | 66 | const float looksensitivity = (float)sensitivity / 20.f; 67 | const float scale = 10.f; 68 | 69 | float dx = -(float)xmouse * looksensitivity * scale; 70 | AccumulateAddRemainder(&camXF, &xAccumulator, -xmouse, dx); 71 | 72 | float ym = (float)(invertpitch ? -ymouse : ymouse); 73 | float dy = -ym * looksensitivity * scale; 74 | AccumulateAddRemainder(&camYF, &yAccumulator, -ym, dy); 75 | 76 | // clamp y-axis 77 | // if (camYF > 600 && camYF < 32000) 78 | // camYF = 600; 79 | // if (camYF < 65000 && camYF > 32000) 80 | // camYF = 65000; 81 | 82 | PS1_MEM_WriteHalfword(HPSS_CAMX, (uint16_t)camXF); 83 | PS1_MEM_WriteHalfword(HPSS_CAMY, (uint16_t)camYF); 84 | } -------------------------------------------------------------------------------- /games/ps1_populous.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define PTB_CURSORX 0x164726 27 | #define PTB_CURSORY 0x164728 28 | 29 | static uint8_t PS1_PTB_Status(void); 30 | static void PS1_PTB_Inject(void); 31 | 32 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 33 | { 34 | "Populous: The Beginning", 35 | PS1_PTB_Status, 36 | PS1_PTB_Inject, 37 | 1, // 1000 Hz tickrate 38 | 0 // crosshair sway supported for driver 39 | }; 40 | 41 | const GAMEDRIVER *GAME_PS1_POPULOUSTHEBEGINNING = &GAMEDRIVER_INTERFACE; 42 | 43 | static float xAccumulator = 0.f; 44 | static float yAccumulator = 0.f; 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t PS1_PTB_Status(void) 50 | { 51 | // SLUS_002.77 52 | return (PS1_MEM_ReadWord(0x9334) == 0x534C5553U && 53 | PS1_MEM_ReadWord(0x9338) == 0x5F303032U && 54 | PS1_MEM_ReadWord(0x933C) == 0x2E37373BU); 55 | } 56 | //========================================================================== 57 | // Purpose: calculate mouse look and inject into current game 58 | //========================================================================== 59 | static void PS1_PTB_Inject(void) 60 | { 61 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 62 | return; 63 | 64 | uint16_t cursorX = PS1_MEM_ReadHalfword(PTB_CURSORX); 65 | uint16_t cursorY = PS1_MEM_ReadHalfword(PTB_CURSORY); 66 | float cursorXF = (float)cursorX; 67 | float cursorYF = (float)cursorY; 68 | 69 | const float looksensitivity = (float)sensitivity / 20.f; 70 | const float scale = 0.6f; 71 | 72 | float dx = (float)xmouse * looksensitivity * scale; 73 | AccumulateAddRemainder(&cursorXF, &xAccumulator, xmouse, dx); 74 | cursorXF = ClampFloat(cursorXF, 8.f, 312.f); 75 | 76 | float ym = (float)(invertpitch ? -ymouse : ymouse); 77 | float dy = ym * looksensitivity * scale; 78 | AccumulateAddRemainder(&cursorYF, &yAccumulator, ym, dy); 79 | cursorYF = ClampFloat(cursorYF, 16.f, 224.f); 80 | 81 | PS1_MEM_WriteHalfword(PTB_CURSORX, (uint16_t)cursorXF); 82 | PS1_MEM_WriteHalfword(PTB_CURSORY, (uint16_t)cursorYF); 83 | } -------------------------------------------------------------------------------- /games/ss_pslave.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define PS_CAMY 0x632AC 27 | #define PS_CAMX_INT 0x632A8 28 | #define PS_CAMX_FRAC 0x632AA 29 | 30 | static uint8_t SS_PS_Status(void); 31 | static void SS_PS_Inject(void); 32 | 33 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 34 | { 35 | "PowerSlave", 36 | SS_PS_Status, 37 | SS_PS_Inject, 38 | 1, // 1000 Hz tickrate 39 | 0 // crosshair sway supported for driver 40 | }; 41 | 42 | const GAMEDRIVER *GAME_SS_POWERSLAVE = &GAMEDRIVER_INTERFACE; 43 | 44 | static float xAccumulator = 0.f; 45 | static float yAccumulator = 0.f; 46 | 47 | //========================================================================== 48 | // Purpose: return 1 if game is detected 49 | //========================================================================== 50 | static uint8_t SS_PS_Status(void) 51 | { 52 | return (PS1_MEM_ReadWord(0x0) == 0x00064A09U && PS1_MEM_ReadWord(0x4) == 0x00064A09U); 53 | } 54 | //========================================================================== 55 | // Purpose: calculate mouse look and inject into current game 56 | //========================================================================== 57 | static void SS_PS_Inject(void) 58 | { 59 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 60 | return; 61 | 62 | float looksensitivity = (float)sensitivity / 20.f; 63 | float scale = 10000.f; 64 | // float scale = 1.f; 65 | 66 | int16_t camXInt = PS1_MEM_ReadInt16(PS_CAMX_INT); 67 | uint16_t camXFrac = PS1_MEM_ReadHalfword(PS_CAMX_FRAC); 68 | float camXFracF = (float)camXFrac; 69 | float camXF = (float)camXInt; 70 | 71 | camXFracF -= (float)xmouse * looksensitivity * scale; 72 | // float dx = -(float)xmouse * looksensitivity * scale; 73 | // AccumulateAddRemainder(&camXFracF, &xAccumulator, -xmouse, dx); 74 | 75 | while (camXFracF > 65536) 76 | { 77 | camXFracF -= 65536; 78 | camXF += 1; 79 | } 80 | while (camXFracF < 0) 81 | { 82 | camXFracF += 65536; 83 | camXF -= 1; 84 | } 85 | 86 | while (camXF >= 180) 87 | camXF -= 360; 88 | while (camXF <= -180) 89 | camXF += 360; 90 | 91 | PS1_MEM_WriteInt16(PS_CAMX_INT, (int16_t)camXF); 92 | PS1_MEM_WriteHalfword(PS_CAMX_FRAC, (uint16_t)camXFracF); 93 | 94 | } -------------------------------------------------------------------------------- /games/ps2_shadowofrome.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include 23 | #include "../main.h" 24 | #include "../memory.h" 25 | #include "../mouse.h" 26 | #include "game.h" 27 | 28 | #define SOR_CAMY 0x4C80E0 29 | #define SOR_CAMX 0x4C80E2 30 | 31 | static uint8_t PS2_SOR_Status(void); 32 | static void PS2_SOR_Inject(void); 33 | 34 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 35 | { 36 | "Shadow of Rome", 37 | PS2_SOR_Status, 38 | PS2_SOR_Inject, 39 | 1, // 1000 Hz tickrate 40 | 0 // crosshair sway not supported for driver 41 | }; 42 | 43 | const GAMEDRIVER *GAME_PS2_SHADOWOFROME = &GAMEDRIVER_INTERFACE; 44 | 45 | static float xAccumulator = 0.; 46 | static float yAccumulator = 0.; 47 | static float scale = 3.f; 48 | 49 | //========================================================================== 50 | // Purpose: return 1 if game is detected 51 | //========================================================================== 52 | static uint8_t PS2_SOR_Status(void) 53 | { 54 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && 55 | PS2_MEM_ReadWord(0x00093394) == 0x5F323039U && 56 | PS2_MEM_ReadWord(0x00093398) == 0x2E30323BU); 57 | } 58 | //========================================================================== 59 | // Purpose: calculate mouse look and inject into current game 60 | //========================================================================== 61 | static void PS2_SOR_Inject(void) 62 | { 63 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 64 | return; 65 | 66 | const float looksensitivity = (float)sensitivity / 40.f; 67 | 68 | uint16_t camX = PS2_MEM_ReadUInt16(SOR_CAMX); 69 | int16_t camY = PS2_MEM_ReadInt16(SOR_CAMY); 70 | float camXF = (float)camX; 71 | float camYF = (float)camY; 72 | 73 | float dx = -(float)xmouse * looksensitivity * scale; 74 | AccumulateAddRemainder(&camXF, &xAccumulator, -xmouse, dx); 75 | while (camXF >= 4096) 76 | camXF -= 4096.f; 77 | while (camXF < 0) 78 | camXF += 4096.f; 79 | 80 | float ym = (float)(invertpitch ? -ymouse : ymouse); 81 | float dy = -ym * looksensitivity * scale; 82 | AccumulateAddRemainder(&camYF, &yAccumulator, -ym, dy); 83 | camYF = ClampFloat(camYF, -700.f, 200.f); 84 | 85 | PS2_MEM_WriteUInt16(SOR_CAMX, (uint16_t)camXF); 86 | PS2_MEM_WriteInt16(SOR_CAMY, (int16_t)camYF); 87 | } -------------------------------------------------------------------------------- /games/ps1_whksothr.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define SOTHR_CURSORX 0xD5D8C 27 | #define SOTHR_CURSORY 0xD5D90 28 | 29 | static uint8_t PS1_SOTHR_Status(void); 30 | static void PS1_SOTHR_Inject(void); 31 | 32 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 33 | { 34 | "Warhammer: Shadow of the Horned Rat", 35 | PS1_SOTHR_Status, 36 | PS1_SOTHR_Inject, 37 | 1, // 1000 Hz tickrate 38 | 0 // crosshair sway supported for driver 39 | }; 40 | 41 | const GAMEDRIVER *GAME_PS1_WARHAMMERSOTHR = &GAMEDRIVER_INTERFACE; 42 | 43 | static float xAccumulator = 0.f; 44 | static float yAccumulator = 0.f; 45 | 46 | //========================================================================== 47 | // Purpose: return 1 if game is detected 48 | //========================================================================== 49 | static uint8_t PS1_SOTHR_Status(void) 50 | { 51 | return (PS1_MEM_ReadWord(0x92EC) == 0x534C5553U && 52 | PS1_MEM_ReadWord(0x92F0) == 0x5F303031U && 53 | PS1_MEM_ReadWord(0x92F4) == 0x2E31373BU); 54 | } 55 | //========================================================================== 56 | // Purpose: calculate mouse look and inject into current game 57 | //========================================================================== 58 | static void PS1_SOTHR_Inject(void) 59 | { 60 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 61 | return; 62 | 63 | uint16_t cursorX = PS1_MEM_ReadHalfword(SOTHR_CURSORX); 64 | uint16_t cursorY = PS1_MEM_ReadHalfword(SOTHR_CURSORY); 65 | float cursorXF = (float)cursorX; 66 | float cursorYF = (float)cursorY; 67 | 68 | const float looksensitivity = (float)sensitivity / 20.f; 69 | const float scale = 4.f; 70 | 71 | float dx = (float)xmouse * looksensitivity * scale; 72 | AccumulateAddRemainder(&cursorXF, &xAccumulator, xmouse, dx); 73 | 74 | float ym = (float)(invertpitch ? -ymouse : ymouse); 75 | float dy = -ym * looksensitivity * scale; 76 | AccumulateAddRemainder(&cursorYF, &yAccumulator, -ym, dy); 77 | 78 | cursorXF = ClampFloat(cursorXF, 0.f, 65535.f); 79 | cursorYF = ClampFloat(cursorYF, 0.f, 65535.f); 80 | 81 | PS1_MEM_WriteHalfword(SOTHR_CURSORX, (uint16_t)cursorXF); 82 | PS1_MEM_WriteHalfword(SOTHR_CURSORY, (uint16_t)cursorYF); 83 | } -------------------------------------------------------------------------------- /games/ps2_gregmaxd.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define TAU 6.2831853f // 0x40C90FDB 27 | 28 | #define GMAXD_CAMY 0x17DCA60 29 | #define GMAXD_CAMXSIN 0x17DCA58 30 | #define GMAXD_CAMXCOS 0x17DCA5C 31 | 32 | #define GMAXD_IS_DEATH_CAM 0x1B82800 33 | 34 | static uint8_t PS2_GMAXD_Status(void); 35 | static void PS2_GMAXD_Inject(void); 36 | 37 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 38 | { 39 | "Greg Hastings' Tournament Paintball Max'd", 40 | PS2_GMAXD_Status, 41 | PS2_GMAXD_Inject, 42 | 1, 43 | 0 // crosshair sway not supported for driver 44 | }; 45 | 46 | const GAMEDRIVER *GAME_PS2_GREGMAXD = &GAMEDRIVER_INTERFACE; 47 | 48 | //========================================================================== 49 | // Purpose: return 1 if game is detected 50 | //========================================================================== 51 | static uint8_t PS2_GMAXD_Status(void) 52 | { 53 | return (PS2_MEM_ReadWord(0x00410CA8) == 0x534C5553U && 54 | PS2_MEM_ReadWord(0x00410CAC) == 0x5F323135U && 55 | PS2_MEM_ReadWord(0x00410CB0) == 0x2E33393BU); 56 | } 57 | //========================================================================== 58 | // Purpose: calculate mouse look and inject into current game 59 | //========================================================================== 60 | static void PS2_GMAXD_Inject(void) 61 | { 62 | // FIXME: delta time/FPS dependent sensitivity? 63 | 64 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 65 | return; 66 | 67 | if (PS2_MEM_ReadUInt(GMAXD_IS_DEATH_CAM) == 0x6) 68 | return; 69 | 70 | float looksensitivity = (float)sensitivity / 20.f; 71 | float scale = 400.f; 72 | 73 | float camY = PS2_MEM_ReadFloat(GMAXD_CAMY); 74 | camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale; 75 | camY = ClampFloat(camY, -0.707106, 0.422618); 76 | 77 | 78 | float camXSin = PS2_MEM_ReadFloat(GMAXD_CAMXSIN); 79 | float camXCos = PS2_MEM_ReadFloat(GMAXD_CAMXCOS); 80 | 81 | float angle = atan(camXSin / camXCos); 82 | if (camXCos < 0) 83 | angle += TAU / 2; 84 | 85 | angle += (float)xmouse * looksensitivity / scale; 86 | 87 | camXSin = sin(angle); 88 | camXCos = cos(angle); 89 | 90 | PS2_MEM_WriteFloat(GMAXD_CAMXSIN, camXSin); 91 | PS2_MEM_WriteFloat(GMAXD_CAMXCOS, camXCos); 92 | PS2_MEM_WriteFloat(GMAXD_CAMY, camY); 93 | 94 | } -------------------------------------------------------------------------------- /games/snes_shadrun.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include "../main.h" 23 | #include "../memory.h" 24 | #include "../mouse.h" 25 | #include "game.h" 26 | 27 | #define TAU 6.2831853f // 0x40C90FDB 28 | 29 | // STATIC addresses 30 | #define SRUN_cursorx 0x0001F0 // range: 768-61184 31 | #define SRUN_cursory 0x0001F2 // range: 768-52736 32 | #define SRUN_aimmode 0x0001F4 // 0x0=off, 0xFFFF=on 33 | 34 | #define SRUN_aimmode_on 0xFFFF 35 | 36 | static uint8_t SNES_SRUN_Status(void); 37 | static void SNES_SRUN_Inject(void); 38 | 39 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 40 | { 41 | "Shadowrun", 42 | SNES_SRUN_Status, 43 | SNES_SRUN_Inject, 44 | 1, // 1000 Hz tickrate 45 | 0 // crosshair sway not supported for driver 46 | }; 47 | 48 | const GAMEDRIVER *GAME_SNES_SHADOWRUN = &GAMEDRIVER_INTERFACE; 49 | 50 | //========================================================================== 51 | // Purpose: return 1 if game is detected 52 | //========================================================================== 53 | static uint8_t SNES_SRUN_Status(void) 54 | { 55 | return (SNES_MEM_ReadWord(0x1CC5) == 0xF25F && SNES_MEM_ReadWord(0x1CCB) == 0xC10A); 56 | } 57 | //========================================================================== 58 | // Purpose: calculate mouse look and inject into current game 59 | //========================================================================== 60 | static void SNES_SRUN_Inject(void) 61 | { 62 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 63 | return; 64 | 65 | SNES_MEM_WriteWord(0x1FA, 0xFFFF); 66 | 67 | if (SNES_MEM_ReadWord(SRUN_aimmode) != SRUN_aimmode_on) 68 | return; 69 | 70 | const float looksensitivity = (float)sensitivity; 71 | 72 | uint16_t cursorx = SNES_MEM_ReadWord(SRUN_cursorx); 73 | uint16_t cursory = SNES_MEM_ReadWord(SRUN_cursory); 74 | uint16_t lastX = cursorx; 75 | uint16_t lastY = cursory; 76 | 77 | cursorx += ((float)xmouse) * looksensitivity * 5.f; 78 | cursory += ((float)ymouse) * looksensitivity * 5.f; 79 | 80 | // prevent wrapping 81 | // if (lastX > 0 && lastX < 100 && cursorx > 200) 82 | // cursorx = 0.f; 83 | // if (lastY > 0 && lastY < 80 && cursory > 140) 84 | // cursory = 0.f; 85 | 86 | cursorx = ClampFloat(cursorx, 17.f, 61184.f); 87 | cursory = ClampFloat(cursory, 17.f, 52736.f); 88 | 89 | SNES_MEM_WriteWord(SRUN_cursorx, (uint16_t)cursorx); 90 | SNES_MEM_WriteWord(SRUN_cursory, (uint16_t)cursory); 91 | } -------------------------------------------------------------------------------- /games/ps1_note.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define NOTE_CAMY 0x17D310 27 | #define NOTE_CAMX 0x17D312 28 | #define NOTE_IS_PAUSED_TRANSITION_CUTSCENE 0x1FB6AE 29 | 30 | static uint8_t PS1_NOTE_Status(void); 31 | static void PS1_NOTE_Inject(void); 32 | 33 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 34 | { 35 | "The Note", 36 | PS1_NOTE_Status, 37 | PS1_NOTE_Inject, 38 | 1, // 1000 Hz tickrate 39 | 0 // crosshair sway supported for driver 40 | }; 41 | 42 | const GAMEDRIVER *GAME_PS1_THENOTE = &GAMEDRIVER_INTERFACE; 43 | 44 | static float xAccumulator = 0.f; 45 | static float yAccumulator = 0.f; 46 | 47 | //========================================================================== 48 | // Purpose: return 1 if game is detected 49 | //========================================================================== 50 | static uint8_t PS1_NOTE_Status(void) 51 | { 52 | return (PS1_MEM_ReadWord(0x9364) == 0x534C4553U && PS1_MEM_ReadWord(0x9368) == 0x5F303037 && PS1_MEM_ReadWord(0x936C) == 0x2E34393BU); 53 | } 54 | //========================================================================== 55 | // Purpose: calculate mouse look and inject into current game 56 | //========================================================================== 57 | static void PS1_NOTE_Inject(void) 58 | { 59 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 60 | return; 61 | 62 | // don't move camera on pause menu, during screen transition, or during cutscene 63 | if (PS1_MEM_ReadHalfword(NOTE_IS_PAUSED_TRANSITION_CUTSCENE)) 64 | return; 65 | 66 | uint16_t camX = PS1_MEM_ReadHalfword(NOTE_CAMX); 67 | uint16_t camY = PS1_MEM_ReadHalfword(NOTE_CAMY); 68 | float camXF = (float)camX; 69 | float camYF = (float)camY; 70 | 71 | const float looksensitivity = (float)sensitivity / 20.f; 72 | 73 | float dx = -(float)xmouse * looksensitivity; 74 | AccumulateAddRemainder(&camXF, &xAccumulator, -xmouse, dx); 75 | 76 | float ym = (float)(invertpitch ? -ymouse : ymouse); 77 | float dy = ym * looksensitivity; 78 | AccumulateAddRemainder(&camYF, &yAccumulator, ym, dy); 79 | 80 | // clamp y-axis 81 | // if (camYF > 800 && camYF < 32000) 82 | // camYF = 800; 83 | // if (camYF < 64735 && camYF > 32000) 84 | // camYF = 64735; 85 | 86 | PS1_MEM_WriteHalfword(NOTE_CAMX, (uint16_t)camXF); 87 | PS1_MEM_WriteHalfword(NOTE_CAMY, (uint16_t)camYF); 88 | } -------------------------------------------------------------------------------- /games/ps1_hybrid.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define HYB_CAMY 0x14F524 27 | #define HYB_CAMY2 0xA5CCC 28 | #define HYB_CAMX 0xF5806 29 | 30 | #define HYB_IS_NOT_PAUSED 0xA5CC4 31 | 32 | static uint8_t PS1_HYB_Status(void); 33 | static void PS1_HYB_Inject(void); 34 | 35 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 36 | { 37 | "Hybrid", 38 | PS1_HYB_Status, 39 | PS1_HYB_Inject, 40 | 1, // 1000 Hz tickrate 41 | 0 // crosshair sway supported for driver 42 | }; 43 | 44 | const GAMEDRIVER *GAME_PS1_HYBRID = &GAMEDRIVER_INTERFACE; 45 | 46 | static float xAccumulator = 0.f; 47 | static float yAccumulator = 0.f; 48 | 49 | //========================================================================== 50 | // Purpose: return 1 if game is detected 51 | //========================================================================== 52 | static uint8_t PS1_HYB_Status(void) 53 | { 54 | // SLES_035.31 55 | return (PS1_MEM_ReadWord(0x93DC) == 0x534C4553U && 56 | PS1_MEM_ReadWord(0x93E0) == 0x5F303335U && 57 | PS1_MEM_ReadWord(0x93E4) == 0x2E33313BU); 58 | } 59 | //========================================================================== 60 | // Purpose: calculate mouse look and inject into current game 61 | //========================================================================== 62 | static void PS1_HYB_Inject(void) 63 | { 64 | // TODO: 25/50 FPS cheat 65 | 66 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 67 | return; 68 | 69 | if (!PS1_MEM_ReadByte(HYB_IS_NOT_PAUSED)) 70 | return; 71 | 72 | uint16_t camX = PS1_MEM_ReadHalfword(HYB_CAMX); 73 | int16_t camY = PS1_MEM_ReadInt16(HYB_CAMY); 74 | float camXF = (float)camX; 75 | float camYF = (float)camY; 76 | 77 | const float looksensitivity = (float)sensitivity / 20.f; 78 | 79 | float dx = (float)xmouse * looksensitivity; 80 | AccumulateAddRemainder(&camXF, &xAccumulator, xmouse, dx); 81 | while (camXF > 4096.f) 82 | camXF -= 4096.f; 83 | while (camXF < 0.f) 84 | camXF += 4096.f; 85 | 86 | float ym = (float)(invertpitch ? -ymouse : ymouse); 87 | float dy = ym * looksensitivity; 88 | AccumulateAddRemainder(&camYF, &yAccumulator, ym, dy); 89 | camYF = ClampFloat(camYF, -340.f, 340.f); 90 | 91 | PS1_MEM_WriteHalfword(HYB_CAMX, (uint16_t)camXF); 92 | PS1_MEM_WriteInt16(HYB_CAMY, (int16_t)camYF); 93 | PS1_MEM_WriteInt16(HYB_CAMY2, (int16_t)camYF); 94 | } -------------------------------------------------------------------------------- /games/ps1_hybrid_japan.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include "../main.h" 22 | #include "../memory.h" 23 | #include "../mouse.h" 24 | #include "game.h" 25 | 26 | #define HYB_CAMY 0x156E7C 27 | #define HYB_CAMY2 0x9E7B8 28 | #define HYB_CAMX 0xEE2EE 29 | 30 | #define HYB_IS_NOT_PAUSED 0x9E770 31 | 32 | static uint8_t PS1_HYB_Status(void); 33 | static void PS1_HYB_Inject(void); 34 | 35 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 36 | { 37 | "Hybrid", 38 | PS1_HYB_Status, 39 | PS1_HYB_Inject, 40 | 1, // 1000 Hz tickrate 41 | 0 // crosshair sway supported for driver 42 | }; 43 | 44 | const GAMEDRIVER *GAME_PS1_HYBRID_JAPAN = &GAMEDRIVER_INTERFACE; 45 | 46 | static float xAccumulator = 0.f; 47 | static float yAccumulator = 0.f; 48 | 49 | //========================================================================== 50 | // Purpose: return 1 if game is detected 51 | //========================================================================== 52 | static uint8_t PS1_HYB_Status(void) 53 | { 54 | // SLPS_011.02 55 | return (PS1_MEM_ReadWord(0x93C4) == 0x534C5053U && 56 | PS1_MEM_ReadWord(0x93C8) == 0x5F303131U && 57 | PS1_MEM_ReadWord(0x93CC) == 0x2E30323BU); 58 | } 59 | //========================================================================== 60 | // Purpose: calculate mouse look and inject into current game 61 | //========================================================================== 62 | static void PS1_HYB_Inject(void) 63 | { 64 | // TODO: 25/50 FPS cheat 65 | 66 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 67 | return; 68 | 69 | if (!PS1_MEM_ReadByte(HYB_IS_NOT_PAUSED)) 70 | return; 71 | 72 | uint16_t camX = PS1_MEM_ReadHalfword(HYB_CAMX); 73 | int16_t camY = PS1_MEM_ReadInt16(HYB_CAMY); 74 | float camXF = (float)camX; 75 | float camYF = (float)camY; 76 | 77 | const float looksensitivity = (float)sensitivity / 20.f; 78 | 79 | float dx = (float)xmouse * looksensitivity; 80 | AccumulateAddRemainder(&camXF, &xAccumulator, xmouse, dx); 81 | while (camXF > 4096.f) 82 | camXF -= 4096.f; 83 | while (camXF < 0.f) 84 | camXF += 4096.f; 85 | 86 | float ym = (float)(invertpitch ? -ymouse : ymouse); 87 | float dy = ym * looksensitivity; 88 | AccumulateAddRemainder(&camYF, &yAccumulator, ym, dy); 89 | camYF = ClampFloat(camYF, -340.f, 340.f); 90 | 91 | PS1_MEM_WriteHalfword(HYB_CAMX, (uint16_t)camXF); 92 | PS1_MEM_WriteInt16(HYB_CAMY, (int16_t)camYF); 93 | // PS1_MEM_WriteInt16(HYB_CAMY2, (int16_t)camYF); 94 | } -------------------------------------------------------------------------------- /games/ps2_ninjaassault.c: -------------------------------------------------------------------------------- 1 | //=========================================================== 2 | // Mouse Injector for Dolphin 3 | //========================================================================== 4 | // Copyright (C) 2019-2020 Carnivorous 5 | // All rights reserved. 6 | // 7 | // Mouse Injector is free software; you can redistribute it and/or modify it 8 | // under the terms of the GNU General Public License as published by the Free 9 | // Software Foundation; either version 2 of the License, or (at your option) 10 | // any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, but 13 | // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14 | // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | // for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html 19 | //========================================================================== 20 | #include 21 | #include 22 | #include 23 | #include "../main.h" 24 | #include "../memory.h" 25 | #include "../mouse.h" 26 | #include "game.h" 27 | 28 | #define NA_cursorx 0x4E6E20 29 | #define NA_cursory 0x4E6E24 30 | // #define NA_targetLock1 0xE06598 31 | // #define NA_targetLock2 0xE0659C 32 | // #define NA_targetLock3 0xE065A4 33 | // #define NA_targetLock4 0xE065A8 34 | 35 | static uint8_t PS2_NA_Status(void); 36 | static void PS2_NA_Inject(void); 37 | 38 | static const GAMEDRIVER GAMEDRIVER_INTERFACE = 39 | { 40 | "PS2 Ninja Assault", 41 | PS2_NA_Status, 42 | PS2_NA_Inject, 43 | 1, // 1000 Hz tickrate 44 | 0 // crosshair sway not supported for driver 45 | }; 46 | 47 | const GAMEDRIVER *GAME_PS2_NINJAASSAULT = &GAMEDRIVER_INTERFACE; 48 | 49 | static float xAccumulator = 0.; 50 | static float yAccumulator = 0.; 51 | static float scale = 1.f; 52 | 53 | //========================================================================== 54 | // Purpose: return 1 if game is detected 55 | //========================================================================== 56 | static uint8_t PS2_NA_Status(void) 57 | { 58 | return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U && PS2_MEM_ReadWord(0x00093394) == 0x5F323034U && 59 | PS2_MEM_ReadWord(0x00093398) == 0x2E39323BU); 60 | } 61 | //========================================================================== 62 | // Purpose: calculate mouse look and inject into current game 63 | //========================================================================== 64 | static void PS2_NA_Inject(void) 65 | { 66 | if(xmouse == 0 && ymouse == 0) // if mouse is idle 67 | return; 68 | 69 | const float looksensitivity = (float)sensitivity / 40.f; 70 | 71 | 72 | uint16_t cursorX = PS2_MEM_ReadUInt16(NA_cursorx); 73 | uint16_t cursorY = PS2_MEM_ReadUInt16(NA_cursory); 74 | float cursorXF = (float)cursorX; 75 | float cursorYF = (float)cursorY; 76 | 77 | float dx = (float)xmouse * looksensitivity / scale; 78 | AccumulateAddRemainder(&cursorXF, &xAccumulator, xmouse, dx); 79 | 80 | float ym = (float)(invertpitch ? -ymouse : ymouse); 81 | float dy = ym * looksensitivity / scale; 82 | AccumulateAddRemainder(&cursorYF, &yAccumulator, ym, dy); 83 | 84 | cursorXF = ClampFloat(cursorXF, 0, 639); 85 | cursorYF = ClampFloat(cursorYF, 0, 479); 86 | 87 | PS2_MEM_WriteUInt16(NA_cursorx, (uint16_t)cursorXF); 88 | PS2_MEM_WriteUInt16(NA_cursory, (uint16_t)cursorYF); 89 | } --------------------------------------------------------------------------------