Skip to content

Instantly share code, notes, and snippets.

@Swyter
Swyter / farmer-notes.txt
Last active September 2, 2023 03:38
Sphinx -- Heliopolis Farmer Brothers scripting notes
View farmer-notes.txt
HT_Objective_Hel_Exterior_Farm_PlotTime: in-game timestamp in seconds when they originally started to dig
(gettimer - gPlotTime > 300 seconds) means done
HT_Objective_Hel_Exterior_Farm_FarmerState: 0 = waiting for player to kill all eyes,
1 = waiting in the hut to pick a plot,
2 = walking to farm plot,
3 = digging,
4 = walking back to hut,
5 = waiting for player to give reward
HT_Objective_Hel_Exterior_Farm_Plot: Active/current plot index, from 1 to 16 (this and the one below are set by each plot context action)
HT_Objective_Hel_Exterior_Farm_PlotList: bitfield of spent/dug plots, the set bit index comes from the Farm_Plot objective
View PKGBUILD
# Maintainer: Anastasios Vacharakis <archlinux@vacharakis.de>
pkgname=steamdeck-gyrodsu
pkgver=1.0.0
pkgrel=2
pkgdesc="A tool for enabling gyroscopic controls on Steam Deck."
arch=('x86_64')
url="https://github.com/kmicki/SteamDeckGyroDSU"
license=('MIT')
depends=('unzip')
View septa-scarabae-mount-and-blade-old-versions-taleworlds-post.txt
This is intended to be a resource for those who are working on older modifications, or those who are looking to port old modifications to new versions. I dont have anything older than v.0.202, which I just uploaded to the Repository.
[quote=—Viking Conquest—]
[B][U]Installer[/U][/B]
-: [URL=https://web.archive.org/web/20151222180423if_/http://download2.taleworlds.com/mb_warband_viking_conquest_setup_1168_2005.exe]v.2.005[/URL] (1.2 GB)
-: [URL=https://web.archive.org/web/20171028033906if_/http://download2.taleworlds.com/mb_warband_viking_conquest_setup_1168_2012.exe]v.2.012[/URL] (1.2 GB)
-: [URL=https://web.archive.org/web/20160502183549if_/http://download2.taleworlds.com/mb_warband_viking_conquest_setup_1168_2021.exe]v.2.021[/URL] (1.2 GB)
-: [URL=https://web.archive.org/web/20171028092108if_/http://download.taleworlds.com/mb_warband_viking_conquest_setup_1168_2025h.exe]v.2.025[/URL] (1.2 GB)
-: [URL=https://web.archive.org/web/20191226191057if_/http://download2.taleworlds.com/mb_warband_viking_conquest_se
@Swyter
Swyter / mb-warband-linux-hex-editing-patches.md
Last active July 2, 2023 17:39
`mb_warband_linux` fixes
View mb-warband-linux-hex-editing-patches.md

Enable trilinear texture filtering to fix the ugly line artifacts of the hard mipmap transitions when zooming in:

rglGraphics_context::set_sampler_state() at 0x081806d0:
08180910 c7 44 24 08 01 27 00 00      MOV        dword ptr [ESP + local_24],0x2701 # GL_LINEAR_MIPMAP_NEAREST (0x2701) -> GL_LINEAR_MIPMAP_LINEAR (0x2703)
08180920 c7 44 24 08 01 27 00 00      MOV        dword ptr [ESP + local_24],0x2701 # GL_LINEAR_MIPMAP_NEAREST (0x2701) -> GL_LINEAR_MIPMAP_LINEAR (0x2703)

SDL_GL_DEPTH_SIZE; Improve the depth buffer resolution/quality from 24 to 32 bits:

process_directx_call() at 0x082ec490:
@Swyter
Swyter / gpa-getaffinity-bug.md
Last active July 2, 2023 05:53
Intel GPA on Linux crashing on startup / closing due to CpuEnumerator::InconsistentProcessAffinity: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=intel-gpa-bin&id=e08841e91927447881d5164dfb89e03634241e3d
View gpa-getaffinity-bug.md
$ gpa-frame-analyzer
terminate called after throwing an instance of 'CpuEnumerator::InconsistentProcessAffinity'
  what():  This process is restricted and not able to run on all logical processors managed by OS
$ FA_PATH=/opt/intel/gpa
$ export LD_LIBRARY_PATH=$FA_PATH:$LD_LIBRARY_PATH
$ export LD_PRELOAD="/home/swyter/intel-gpa-bin/libschedwrapper.so $FA_PATH/python3/lib/libpython3.11.so"
View jade-engine-versions.md

v34 - Beyond Good and Evil - Symbolicated PS2 proto .elf
v36 - King Kong - (0xB398CC66 XOR key for headers) - Symbolicated .elf
v36 - Rayman Raving Rabbids - (0xB398CC66 XOR key for headers) - Symbolicated .elf
v36 - Rayman Raving Rabbids 2 - (0xB398CC66 XOR key for headers) - Multiple symbolicated .elf
v37 - Prince of Persia: The Sands of Time - PS2 proto symbol map file
v38 - Prince of Persia: Warrior Within -
v38 - Prince of Persia: The Two Thrones -
v42 - TMNT -
v42 - My Word Coach - Symbolicated .elf, unpacked data, uncompiled AI scripts
v42 - My Spanish Coach -

View fujifilm-sdk-old-file-scrapper.js
/*
https://dl.fujifilm-x.com/global/special/camera-control-sdk/download/SDK12500.zip
https://dl.fujifilm-x.com/global/special/camera-control-sdk/download/SDK12200.zip
https://dl.fujifilm-x.com/global/special/camera-control-sdk/download/SDK12100.zip
*/
for (i=125; i>0; i--)
{
xhr = new XMLHttpRequest()
xhr.open("GET", `https://dl.fujifilm-x.com/global/special/camera-control-sdk/download/SDK${('000' + i).slice(-3)}00.zip`)
@Swyter
Swyter / gist:a17f5f8a4d5e0d489dea9d4a937f46c8
Last active December 15, 2022 16:16
sphinx-amd-radeon-win-driver-crash-opengl-regression-testing.txt
View gist:a17f5f8a4d5e0d489dea9d4a937f46c8
https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-11-1 GOOD
https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-10-3 BAD
https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-10-2 BAD
https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-10-1 BAD
https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-9-1 BAD
https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-7-1 BAD
https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-6-1 GOOD
@Swyter
Swyter / fix-for-qemu-kvm-over-4gb-bug.md
Created November 26, 2022 22:51
Fix for qemu-system-x86_64: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION failed, slot=6, start=0xc004800000000000, size=0x200000000
View fix-for-qemu-kvm-over-4gb-bug.md

If you get this crash after booting macOS in KVM with AMD GPU passthrough you'll need to disable Above 4GB decoding on your BIOS/UEFI Setup.

qemu-system-x86_64: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION failed, slot=6, start=0xc004800000000000, size=0x200000000: Invalid argument kvm_set_phys_mem: error registering slot: Invalid argument
./boot-passthrough.sh: línea 90:  3507 Aborted                (`core' generado) qemu-system-x86_64 "${args[@]}"

That fixed it.

@Swyter
Swyter / fixes.sh
Last active December 6, 2022 07:26
mab-warband-macos-binary-patches.txt
View fixes.sh
sh <<EOF && sh -c "# swy: zsh in catalina+ doesn't support inline comments: https://apple.stackexchange.com/a/405317"
# swy: needed for sed to stop complaining about the wholy unsupported hexadecimal literals
export LANG=C
export LC_ALL=C
# swy: go into the game's binary folder
cd ~/'Library/Application Support/Steam/steamapps/common/MountBlade Warband/Mount and Blade.app/Contents/MacOS'
# swy: turn their ../../.. hack into the harmless .//.//./ without changing the length of the string
sed -i '' 's|\.\./\.\./\.\.|\.//\.//\./|g' ./'Mount and Blade'