dtb
	compile:
		dtc -O dtb -o kernel.dtb kernel.dts
	decompile:
		dtc -I dtb -O dts -o kernel.dts kernel.dtb

---------------------------------------------------------------------------------------------------------
MinUI			code	dec		video/fbcon/SDL_fbkeys.h		SDL_keysym.h	linux/input-event-codes.h
---------------------------------------------------------------------------------------------------------
CODE_UP			0x5A	 90														KEY_KATAKANA
CODE_DOWN		0x5B	 91														KEY_HIRAGANA
CODE_LEFT		0x5C	 92														KEY_HENKAN
CODE_RIGHT		0x5D	 93														KEY_KATAKANAHIRAGANA
CODE_A			0x5E	 94														KEY_MUHENKAN
CODE_B			0x5F	 95														KEY_KPJPCOMMA
CODE_X			0x60	 96		SCANCODE_KEYPADENTER			SDLK_KP_ENTER	KEY_KPENTER
CODE_Y			0x61	 97		SCANCODE_RIGHTCONTROL			SDLK_RCTRL		KEY_RIGHTCTRL
CODE_START		0x62	 98		SCANCODE_KEYPADDIVIDE			SDLK_KP_DIVIDE	KEY_KPSLASH
CODE_SELECT		0x63	 99		SCANCODE_PRINTSCREEN			SDLK_PRINT		KEY_SYSRQ
CODE_L1			0x64	100		SCANCODE_RIGHTALT				SDLK_RALT		KEY_RIGHTALT
CODE_R1			0x65	101		SCANCODE_BREAK					SDLK_BREAK		KEY_LINEFEED
CODE_L2			0x66	102		SCANCODE_HOME					SDLK_HOME		KEY_HOME
CODE_R2			0x67	103		SCANCODE_CURSORBLOCKUP							KEY_UP
	rev							SCANCODE_UP						SDKL_UP
CODE_MENU		0x68	104		SCANCODE_PAGEUP					SDLK_PAGEUP		KEY_PAGEUP
CODE_PLUS		0x6C	108		SCANCODE_CURSORBLOCKDOWN						KEY_DOWN
	rev							SCANCODE_DOWN					SDKL_DOWN
CODE_MINUS		0x6D	109		SCANCODE_PAGEDOWN				SDLK_PAGEDOWN	KEY_PAGEDOWN
CODE_POWER		0x74	116		SCANCODE_POWER					SDLK_POWER		KEY_POWER
	rev							0								SDLK_UNKNOWN
---------------------------------------------------------------------------------------------------------
See also: FB_InitOSKeymap() in
	video/fbcon/SDL_fbevents.c:1079
---------------------------------------------------------------------------------------------------------

framebuffer to png
	
	adb pull /dev/fb0 && magick -size 640x3840 "RGB565:fb0" fb0.png && open fb0.png

---------------------------------------------------------------------------------------------------------

remove file from repo and history

	git filter-repo --path file.ext --invert-paths --force

---------------------------------------------------------------------------------------------------------

prepare a stock TF1.img (on macOS)
	
	/dev/disk4 for me (use `diskutil list` to identify correct devices)
	add ` && say done` to commands that take a while for audio feedback upon completion
	
	download the official release or backup a fresh stock sd card
		https://drive.google.com/drive/folders/1HfGCxkratM_zYiYfGWCrHZ1AynO3hIwU (last updated 2023-03-09)
	flash the initial img to a new card
	use gdisk to delete and recreate partition 4 (ROMS)
		set End (sector) to +3G
		full instructions https://pastebin.com/raw/YV1Va5JL
	erase the ROMS partition in Disk Utility
	rename partition 1 to MISC if necessary
	zero all free space on the accessible parititions
		
		diskutil secureErase freespace 0 disk4s1
		diskutil secureErase freespace 0 disk4s4
	
	delete all stock folders on the ROMS partition
	delete all hidden macOS files and folders on accessible partitions
	unmount and use dd to create a clean image (use rdisk* for faster raw reads)
	
		sudo dd if=/dev/rdisk4 of=TF1-raw.dmg bs=1m count=1152
	
	removing trailing null bytes
	
		python3 -c "open('TF1.img', 'wb').write(open('TF1-raw.img', 'rb').read().rstrip(b'\0'))"
	
	zip img file (macOS Compress contextual menu is somehow smaller than command line)

---------------------------------------------------------------------------------------------------------
