Skip to content

Instantly share code, notes, and snippets.

View RobertTheSable's full-sized avatar

Robert Stewart RobertTheSable

View GitHub Profile
@RobertTheSable
RobertTheSable / clang_msvc_linux_howto.md
Created March 16, 2023 23:48
How to Build MSVC ABI-compatible Binaries on Linux with Clang, CMake, and Conan.

Rationale

I write a lot of hobby projects in C++. I work on Linux, but most of the end users of my tools waill be Windows users, so this necessitates setting up methods for producing windows binaries on Linux.

There are tools I've used for this before, including mingw-w64 and MXE. These work, but they have downsides:

  • They aren't binary compatible with MSVC's runtime libraries, so you're forced to bundle a separate runtime somehow.
@RobertTheSable
RobertTheSable / tpdp_for_penguins.md
Last active June 24, 2024 01:50
How to play Touhou Puppet Dance Performance on the Steam Deck

What's in the Guide

This is a guide for how to get Touhou Puppet Dance Performance on the Steam Deck.

These instructions can also be adapted to play on any Linux PC.

This guide will walk through the process to run any of the following:

  • Touhou Puppet Dance Performance (Including the English Patch)
  • Touhou Puppet Dance Performance: Shard of Dreams (Including the English Patch)
  • The Touhou Puppet Dance Performance: Shard of Dreams Extended mod.
Computer Information:
Manufacturer: ASUSTeK COMPUTER INC.
Model: Z170-A
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz
CPU Family: 0x6
@RobertTheSable
RobertTheSable / seadragon.asm
Last active April 20, 2022 02:00
Asar patch to make the sea dragon class work in FE3
lorom
; patch to make the sea dragon class work in FE3
; has not been extensivley tested
; so, caveat emptor
; the effect of this patch is:
; - using the unobtainable dark dragon stone turns Tiki into a Sea Dragon instead of a Dark Dragon.
; - the Sea Dragon's battle sprite is switched from Fire Dragon > Ice Dragon,
; because I think it matches the map sprite better.
@RobertTheSable
RobertTheSable / enable_aum_anywhere.asm
Last active November 27, 2021 23:09
Enable aum to be used anywhere instead of only specific tiles/maps
; These patches replace a bcs in both locations to enable Aum's use anywhere in the game.
; The checks for the chapter number/tile are still performed, but the result is discarded.
; Note that this doesn't remove the PRF lock of either the B1 or B2 version.
ORG $83E1E0
nop
nop
ORG $83F94A
nop
nop
@RobertTheSable
RobertTheSable / asar.xml
Last active December 2, 2021 01:37
Asar syntax highlighting plugin for Kate
<?xml version="1.0" encoding="UTF-8"?>
<language name="Asar" version="1.04" kateversion="2.1" section="Assembler" extensions="*.asm;*.asr;*.exp" mimetype="text/x-asm650816">
<highlighting>
<list name="data">
<item>db</item><item>dw</item><item>dl</item><item>dd</item>
</list>
<list name="fixed opcodes">
<item>clc</item><item>cld</item><item>cli</item><item>clv</item>
<item>dex</item><item>dey</item><item>inx</item><item>iny</item><item>nop</item>
<item>pha</item><item>phb</item><item>phd</item><item>phk</item><item>php</item>
@RobertTheSable
RobertTheSable / fe3_siege_weapons.md
Last active August 21, 2022 23:01
FE3 Siege Weapons

Ranged weapons in FE3

You may have noticed that in FE3, if you hack a siege weapon in player inventories, they behave a little oddly.

If you haven't done that, here are the odd things about them:

  • Siege weapons have infinite range.
  • Their animations don't play when PC characters use them.

Here is an Asar patch that fixes animations and adds a range check to limit siege tomes to 10 range:

Opening text unique characteristics.

  • Text for the opening crawl is actually on the sprite layer instead of BG layer 2.
    • Presumably this is to allow the text to scroll upward while the background scrolls horizontally
    • There are 128 16x16 sprite slots availabe.
    • Sprite OAM data is copied from $7e0210
  • Unlike in other text types, not all text in VRAM is shown, and it's not neccesarily shown in order.

Some quick terminology clarification: the opening is split into 6 "sections." Each "section" mattches up with an image shown in the opening. Each section is then divided into 8 "sub-sections" which can be shown at various (relative) positions.