Skip to content

Instantly share code, notes, and snippets.

View ookiineko's full-sized avatar
😣
A noob who tries weird things sometimes

小さい猫 ookiineko

😣
A noob who tries weird things sometimes
  • Somewhere
View GitHub Profile
@Vogtinator
Vogtinator / README.md
Last active June 16, 2024 00:50
Run Win11 on ARM in QEMU

When following this guide on a host not capable of native arm64 KVM, replace -M virt -cpu host -accel kvm with -M virt,virtualization=on -cpu max.

The reason for virtualization=on is that the Windows bootloader does an smc #0 PSCI call, but without EL2, QEMU's TCG does not handle those because PSCI is in HVC mode and such that instruction is treated as undefined. With KVM enabled, smc #0 is handled properly.

Workaround in QEMU for using TCG without virtualization=on:

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index b871350856..de11ff51d1 100644
--- a/hw/arm/virt.c

Using KAGΣ (GPU rendered) with the macOS version of Kirikiri SDL2

  1. Compile Kirikiri SDL2 with -Denable_canvas=true
  2. Download a Chromium build from here: https://chromium.woolyss.com/
  3. Extract the Chromium archive
  4. Find the path of libEGL.dylib: find ~/Downloads/Chromium.app -name libEGL.dylib
  5. Find the path of libGLESv2.dylib: find ~/Downloads/Chromium.app -name libGLESv2.dylib
  6. Clone my fork of KAGΣ: git clone https://github.com/uyjulian/KAGSigma.git
  7. Run: SDL_VIDEO_EGL_DRIVER="/path/to/libEGL.dylib" SDL_VIDEO_GL_DRIVER="/path/to/libGLESv2.dylib" /path/to/krkrsdl2 /path/to/KAGSigma

Introduction

Here are some rough notes on building Kirikiri SDL2 for iOS and Android.
Please note that these may or may not be incomplete. Improved documentation is being planned, but not started yet.

Startup Directory selection

For iOS, the startup directory will be searched in <app name>.app/Contents/Resources/.
For Android, the startup directory will be searched in the root of the assets directory embedded in the apk. For best performance, the file should be stored uncomompressed.

Startup folder candidates:

What is CVE-2015-5672?

CVE-2015-5672 is a code execution exploit which can be used by specially-crafted savedata files. This exploit was reported to TYPE-MOON by Kazuhiko Kusano, but they did not release a patch because it is "difficult to solve with a new patch" (see section The fix for this security hole)

Affected games

@fnky
fnky / ANSI.md
Last active June 21, 2024 03:15
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@hackjutsu
hackjutsu / gai.config
Last active November 6, 2023 15:43
[IPv4 over IPv6 on Ubuntu] Solved the issue when connecting to archive.ubuntu.com takes too long. Edit /etc/gai.conf and uncomment line 4, which lets you keep IPv6 enabled, but sets the order of precedence to prefer IPv4 over IPv6. (http://askubuntu.com/a/354886) #tags: ubuntu, bittiger
#
# For sites which prefer IPv4 connections change the last line to
#
precedence ::ffff:0:0/96 100
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active May 23, 2024 07:53
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \