Skip to content

Instantly share code, notes, and snippets.

@NeKzor
Created November 29, 2019 21:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeKzor/3ceb7ef77b8307bf8d5f593a294961eb to your computer and use it in GitHub Desktop.
Save NeKzor/3ceb7ef77b8307bf8d5f593a294961eb to your computer and use it in GitHub Desktop.
Play Portal 2 Sixense Perceptual Pack without Senz3D camera.
const fs = require('fs');
const client_sixense = process.argv[2] || './portal2_sixense/bin/client_sixense.dll';
const module = fs.readFileSync(client_sixense);
const patch = [
[
// Fix crash in init
// cmp ecx 69
0x401F66, [0x83, 0xF9, 0x45],
],
[
// Fix in-game menu
// jz short loc_5163FC43
0x3FF027, [0x74, 0x1A],
],
[
// Set cam frame rate to anything else than 30/60 to prevent further crashes
// push offset a10
0x736B15, [0x68, 0xB4, 0xE9, 0x7A, 0x10],
],
];
patch.forEach((p) => p[1].forEach((b, i) => module[p[0] + i] = b));
fs.writeFileSync(client_sixense, module);
console.log('patched');
@SatisfactoryBug
Copy link

SatisfactoryBug commented May 9, 2020

May i ask how to use it or install it ?? as i like to play without Camera as it wont let it run without any camera i think

@NeKzor
Copy link
Author

NeKzor commented Jun 29, 2020

@SatisfactoryBug It is pretty much pointless to play the game with keyboard and mouse only as you cannot complete it without the required hardware. This is only a script that I quickly hacked together so you would need some knowledge about NodeJs if you want to run and test this yourself.

@glados19965
Copy link

okay but how to install it

@AlexanderTheGreat26
Copy link

SyntaxError: Identifier 'module' has already been declared

@NeKzor
Copy link
Author

NeKzor commented Nov 20, 2021

@AlexanderTheGreat26 This sounds like a NodeJs version issue. Try renaming the variable 'module' into anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment