Skip to content

Instantly share code, notes, and snippets.

@wareya
wareya / spi_recorder.ino
Last active April 25, 2024 02:11
long SPI message recorder - rasberry pi pico (rp2040), arduino IDE .ino file (C++)
// wiring example for ripping a PMW3360 SROM: https://i.imgur.com/EspAlvz.jpeg
// set the board to 240mhz or higher for best results (WARNING: higher than 240mhz only works with USB if you overvolt the MCU)
// this implements reading SPI mode 3. if you want a different mode, you need to edit these two lines:
// uint32_t clockval = (1 << pin_clock);
// if (newclock && !clockval && buff_i < buffsize)
#include <pico/stdlib.h>
#define buffsize 50000
@wheremyfoodat
wheremyfoodat / post.md
Last active March 18, 2024 19:05
Why having multiple emulators is good

Forenote: Most of the following is simply my point of view as an emulator developer. Various names are omitted for privacy reasons.

I usually write blog posts aimed at developers, but I'd like to make an exception just this once. For a lot of game consoles you have likely noticed that there's multiple emulators for said console. Even for more modern systems like the Nintendo 3DS, you've got several active emulators such as Citra, Mikage and Panda3DS, and some less active ones at the moment such as Corgi3DS. This has made many people in the emulation community ask "Why do emulator developers not simply collaborate"? Thus, I'd like to dedicate this post to answering this question as an emulator developer myself.

1) We actually do collaborate!

Even when we're working on different emulators, we very often collaborate and help each other. A lot of people don't know, since it usually happens ov

@rain-1
rain-1 / llama-home.md
Last active February 22, 2024 05:52
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@nviet
nviet / stable-diffusion-webui-termux.md
Last active April 1, 2024 02:14
Install stable-diffusion-webui on Termux (Android) + PRoot

Install stable-diffusion-webui on Termux (Android) + PRoot

This will guide you on installing AUTOMATIC1111/stable-diffusion-webui on Termux (Android) + PRoot Distro. Make sure that you have a high-end phone to actually make this usable. On my phone with 8GB RAM, launch the webui alone take at least ~ 2 GB RAM, thus making it impossible to load any model and process further.

1. Prerequisites

First you have to install Termux and install PRoot. Then install and login to Ubuntu in PRoot

2. Installing AUTOMATIC1111/stable-diffusion-webui

@psxdev
psxdev / gist:b876404d30cea461ed54feaa752bc780
Created July 31, 2022 22:38
prospero handle for modules
[PROSPERO][INFO] [+] before call sceKernelGetModuleInfo for module 0x2
[PROSPERO][INFO] [+] module name libSceLibcInternal.sprx
[PROSPERO][INFO] [+] module base 0x8058d8000
[PROSPERO][INFO] [+] module size 901120
[PROSPERO][INFO] [+] before call sceKernelGetModuleInfo for module 0x11
[PROSPERO][INFO] [+] module name libSceSysmodule.sprx
[PROSPERO][INFO] [+] module base 0x807f90000
[PROSPERO][INFO] [+] module size 49152
[PROSPERO][INFO] [+] handle 11 dlsym symbol sceSysmoduleIsLoaded address 0x807f90290
[PROSPERO][INFO] [+] handle 11 dlsym symbol sceSysmoduleIsLoadedInternal address 0x807f90540
@psxdev
psxdev / gist:4b09f9f417f5cebce7e9ac77043e38b2
Created July 21, 2022 23:33
prospero implementation :P
debug.sh
[HOST] debugnet listener up
[HOST] ready to have a lot of fun!!!
[PROSPERO][INFO] [+] Logger initialized...
[PROSPERO][INFO] [+] Receive udp log in 192.168.1.12 with: socat udp-recv:18194 stdout
[PROSPERO][INFO] [+] bd-jb by bigboss based on TheFlow and sleirsgoevy implementation
[PROSPERO][INFO] [+] Creating JavaSecurityAccess
[PROSPERO][INFO] [+] Creating fake JavaSecurityProxy
[PROSPERO][INFO] [+] Set fake JavaSecurityProxy
[PROSPERO][INFO] [+] Creating URLClassLoader
@Pokechu22
Pokechu22 / Major Minor 1.md
Last active May 17, 2022 20:10
Messy Major Minor's Majestic March notes

Major minor: at one point in the tutorial, the screen does get greyed out, even with Dolphin's broken rendering. That's a starting point to figure out why things broke.

EID 611 - the scissor region is over the screen in that case, but not in the others. Obj 232, which renders:

BP register BPMEM_SCISSOROFFSET
Scissor X offset: 171
Scissor Y offset: 171
@emoose
emoose / dllmain.cpp
Last active February 19, 2022 23:30
Bloodstained RotN dialogue/menu resolution fix
// This code requires some files from my Arise-SDK project:
// https://github.com/emoose/Arise-SDK/tree/b73c7ea9fceea2c494cbb8ebc74c6b3d1d35cbf6
#include "pch.h"
#include <cstdio>
#define SDK_VERSION "0.1.25"
HMODULE DllHModule;
HMODULE GameHModule;
@rlaphoenix
rlaphoenix / shr-build.md
Last active September 1, 2023 14:26
Simpsons Hit & Run SRC Compiling

Simpsons Hit & Run SRC Compiling

TODO: Cleanup, improve, support other platforms and such.

  • All information in this is a community effort and I do not take credit for any of it.
  • SHA256: EA72121D29CE40EBD9F6B5BA2E337CEE02B812BB07ED67797F37E382FE075A85
  • Ensure the full path of the src has absolutely no spaces or characters that would need escaping.

Compiling for PC with the original VS 2002 Solution

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.