Skip to content

Instantly share code, notes, and snippets.

@shauninman
shauninman / my355.dts
Created December 29, 2024 05:01
Miyoo Flip dtb
/dts-v1/;
/ {
compatible = "rockchip,rk3566-miyoo-355-v10-linux\0rockchip,rk3566";
interrupt-parent = <0x01>;
#address-cells = <0x02>;
#size-cells = <0x02>;
model = "MIYOO RK3566 355 V10 Board";
ddr3-params {
@shauninman
shauninman / trimui-brick.dts
Created December 23, 2024 15:16
Trimui Brick dtb
/dts-v1/;
/memreserve/ 0x0000000048000000 0x0000000001000000;
/memreserve/ 0x0000000048100000 0x0000000000100000;
/ {
model = "sun50iw10";
compatible = "allwinner,a133\0arm,sun50iw10p1";
interrupt-parent = <0x01>;
#address-cells = <0x02>;
#size-cells = <0x02>;
@shauninman
shauninman / gist:55910b62a0d3fc208409055bb5fc092b
Created December 12, 2024 15:47
Trimui Brick (and probably Smart Pro) display options
DIR
/sys/devices/virtual/disp/disp/attr
STOCK DEFAULT FILE DEFAULT RANGE
Contrast 5 enhance_contrast 50 0 - 100
Saturation 5 enhance_saturation 50 0 - 100
Color Temp 5 color_temperature 0 -50 - 50
Exposure 5 enhance_bright 50 0 - 100
@shauninman
shauninman / patching-mainui-with-cutter.txt
Last active December 14, 2024 19:39
Using Cutter on MainUI
(This was originally written January 11, 2022 for the Miyoo Mini, the result was the precursor to Onion)
How to patch out Retroarch from MainUI with https://cutter.re
1. Make a backup of your MainUI, just in case (changes are saved instantly and not undo-able!)
2. Open Cutter and select your MainUI binary and click the Open button
3. Make sure "Load in write mode (-w)" is checked and click the Ok button
4. Once it opens (it will take about 25 seconds), select the Strings tab and enter "createMenu" in the Quick Filter input
5. Select the only/first result and press X (or control-click and select Show X-Refs)
6. Double-click the only function (in the 20220110 update named "fcn.0003100c" but the name may change because it's just an address within the compiled binary)
@shauninman
shauninman / mkimage.sh
Created August 29, 2024 12:02
simplified mkimage for the MagicX XU Mini M
#!/bin/bash
set -x
HERE=$(dirname "$0")
cd "$HERE"
SYSTEM_SIZE=368
SYSTEM_PART_START=32768
BOOTLOADER="u-boot"
DISK_LABEL=msdos
@shauninman
shauninman / patch.sh
Last active August 15, 2024 03:54
Patching h700 panel values on device
#/bin/bash
# NOTE: requires dtc to be somewhere in your path
cd "$(dirname "$0")"
# const
DT_NAME=device
DEV_PATH=/dev/mmcblk0
BOOT_OFFSET=$((16400 * 1024))
@shauninman
shauninman / updating h700 device dtb.txt
Last active August 14, 2024 02:56
updating h700 device dtb
| HOST for me is macOS
| DOCKER for me a debian:bookworm-slim docker image with device-tree-compiler installed (among other things)
| these offsets and values are specific to the 40xxH
| /dev/rdisk4 was the (raw) SD mount point at time of testing
| double check DiskUtility.app and update path accordingly
| boot_package offsets from https://github.com/knulli-cfw/knulli.org/blob/main/docs/guides/h700-firmware-extract.md
HOST: extract the boot_package.img and dupe
sudo dd if=/dev/rdisk4 of=boot_package.img bs=1024 skip=16400 count=20464
@shauninman
shauninman / auto.sh
Last active May 28, 2024 13:58
MinUI single-game mode
#!/bin/sh
# edit ROM path (relative to root of SD card)
# and save to the /.userdata/<device> folder
ROM="/Roms/Game Boy (GB)/Dr. Mario (World).gb"
#######################################
#
# NO NEED TO EDIT BEYOND HERE UNESS YOU
# REALLY KNOW WHAT YOU'RE DOING...
@shauninman
shauninman / gist:5a801ff9acdc14cf2cc391f5e1a61b66
Created November 10, 2023 02:51
rg35xx-stock-expand-ROMS-partition-macos
Note: Commands that are prefaced with one backtick (`) are entered directly into the terminal. Commands with two backticks (``) are entered into the gdisk prompt. Each step is explained in English with the corresponding terminal command below it. This was done on MacOS 12.3 Monterey with an M1 processor but should work without problem on any modern MacOS, M1 or otherwise. You will end up formatting the ROM partition completely, so it is best to do this before you waste time copying any rom files over.
1. Back up the CFW folder from the ROMS partition. If the image named both partitions "No Name" rename the one with the CFW folder "ROMS" and the other partition "MISC" before starting this. This can be done in the Finder just like renaming any other file.
2. Install gdisk using homebrew. If you don't have Homebrew already installed please visit https://brew.sh/ for details on how to install it.
`brew install --cask gdisk
3. Use diskutil to get the list of mounted drives and look for the micro SD card path, m
@shauninman
shauninman / custom.css
Created December 14, 2020 17:25
white out promoted tweets on twitter.com
/* bye-bye brands */
div[aria-label~="Timeline"] div[role="group"]+div{background-color:white;position:absolute !important;top:-24px !important;left:-64px !important;margin-top:0 !important;width:calc(100% + 64px);height:calc(100% + 24px);}
div[aria-label~="Timeline"] div[role="group"]+div *{display:none !important;}