hacks tab | advanced tab |
---|---|
Displayed with default settings for both tabs. |
Tested on a 2021 16" MacBook Pro M1 Max. These settings should apply to other M1 Mac's, relatively speaking.
#!/bin/zsh | |
sec=${argv[( $argv[(i)--timeout|-t] + 1 )]:-10} | |
out=${argv[( $argv[(i)--output|-o] + 1 )]:-~/Desktop/Texture\ Loads/`date "+%m.%d,%H.%M.%S"`} | |
com=$argv[( $argv[(i)--compare|-c] + 1 )] | |
pre=$argv[( $argv[(i)--preview|-p] )] | |
if [[ $argv[(I)(--help|-h)] -gt 0 ]]; then | |
echo "\ | |
--timeout|-t [n] |
hacks tab | advanced tab |
---|---|
Displayed with default settings for both tabs. |
Tested on a 2021 16" MacBook Pro M1 Max. These settings should apply to other M1 Mac's, relatively speaking.
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |
Taken from S3_Texture_Compression (Wikipedia) and condensed to what's relevant to Dolphin's texture support.
There are five three variations of the S3TC algorithm (named DXT1 through DXT5, referring to the FourCC code assigned by Microsoft to each format), each designed for specific types of image data. All convert a 4×4 block of pixels to a 64-bit or 128-bit quantity, resulting in compression ratios of 6:1 with 24-bit RGB input data or 4:1 with 32-bit RGBA input data. S3TC is a lossy compression algorithm, resulting in image quality degradation, an effect which is minimized by the ability to increase texture resolutions while maintaining the same memory requirements. Hand-drawn cartoon-like images do not compress well which usually generate artifacts.
Like many modern image compression algorithms, S3TC only specifies the method used to decompress images, allowing implementers to design the compre
#!/usr/bin/env zsh | |
set -e | |
# Set up possible first parameter commands. | |
cmds_any=( | |
install info abv edit uses deps desc fetch cleanup options home homepage log | |
audit cat formula livecheck style unbottled unpack | |
) | |
cmds_installed=( |
#!/bin/zsh | |
# - Requires homebrew. https://brew.sh | |
# - Converted files will be moved to the current working directory in all cases. | |
# - You can pass the starting directory for fzf search functions. | |
# - Pass in glob patterns for the standalone function to convert in bulk. | |
# For example, to convert gdi's in a sub-directory: chd.create */*.gdi | |
alias chd.fzf.create='_fzf-paths-to chd.create f ".(gdi|cue)$"' | |
alias chd.fzf.extract-to-cue='_fzf-paths-to chd.extract-to-cue f .chd$' |
#!/bin/zsh | |
# | |
# For use on MAME files managed by OpenEmu. | |
# advscan roms/disks/samples verifies and repairs. | |
# | |
# All options apply to roms, disks (chd) and samples. | |
# Options: | |
# | |
# scan : Generates a report specific to your collection. (default) |
# advscan MAME roms/disks/samples scans and repairs. | |
function oemame.scan { | |
local command=${@:-scan} | |
local base_dir=$HOME/Library/Application\ Support/OpenEmu | |
local version=${${${:-`defaults read \ | |
$base_dir/Cores/MAME.oecoreplugin/Contents/Info.plist CFBundleVersion` | |
}/./}%%.*} | |
# Go back to current directory when done. | |
# advscan can't resolve paths when run outside advscan.rc. |
# OpenEmu shader functions. Requires fzf. | |
function oeshader.search { | |
defaults find videoShader.openemu | grep $@ | |
} | |
function oeshader.copy { | |
local source=`oeshader.ls ${@:-1} | fzf --header="Select source:"` | |
if [[ -n $source ]]; then | |
oeshader.search -oE "system\.[a-z0-9]*" | sort -u | | |
fzf -m --header="Apply settings from \"${source##*.}\"." | |