Skip to content

Instantly share code, notes, and snippets.

View colemancda's full-sized avatar
🏎️
Working with Swift on ARM

Alsey Coleman Miller colemancda

🏎️
Working with Swift on ARM
View GitHub Profile
@colemancda
colemancda / rp5-wine-ports.md
Created June 30, 2025 00:31 — forked from JeodC/rp5-wine-ports.md
A beginner's guide to creating wine ports for the Ayn Odin 2, Retroid Pocket 5, and Retroid Pocket Mini

Rocknix Wine Ports

Using wine is a deep rabbit hole for anyone not familiar with the software, and an even deeper rabbit hole when combined with box86 or box64. This guide attempts to serve as a basic introduction to using the built-in wine and box packages included with Rocknix on a Retroid Pocket 5. While the Retroid Pocket Mini is a similar setup chain, it is weaker hardware than the Retroid Pocket 5 and thus the examples provided here may not function as well.

Terminology - Wine and Box86/64

The first thing anyone should understand is the vernacular used throughout this guide. Two tools are used to make wine ports possible on ARM64:

  • Box86 and Box64 by ptitSeb are Linux x86 and x86_64 emulators targeting AARCH64/ARM64 architecture.

  • Wine is a software that allows Windows programs to run on Linux systems. Prebuilt wine binaries can be downloaded from the [wine-builds](https://github.com

@colemancda
colemancda / script.idc
Created May 6, 2024 03:23 — forked from lastbattle/script.idc
MapleStory IDC script
// IDC script for identifying functions and such
#include <idc.idc>
#define RenameFunction(a, b) Message("Found %s at %a\r\n", b, a); MakeName(a, b)
#define START_ADDR 0x00400000
static main() {
auto addr = BADADDR;
auto onMovePacket = FindAoBAndRename("25 0C FE FF FF 05 E8 03", "?OnMovePacket@CMovePath@@QAEXAAVCInPacket@@H@Z");
@colemancda
colemancda / Program.cs
Created April 18, 2024 03:55 — forked from angelsl/Program.cs
NX Benchmarks
// reNX is copyright angelsl, 2011 to 2012 inclusive.
//
// This file is part of reNX.
//
// reNX is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// reNX is distributed in the hope that it will be useful,
@colemancda
colemancda / DarwinNotificationCenter.swift
Created March 29, 2023 07:17 — forked from AvdLee/DarwinNotificationCenter.swift
A notification center for Darwin Notifications. MIT License applies.
//
// DarwinNotificationCenter.swift
//
// Copyright © 2017 WeTransfer. All rights reserved.
//
import Foundation
/// A Darwin notification payload. It does not contain any userInfo, a Darwin notification is purely event handling.
public struct DarwinNotification {
@colemancda
colemancda / main.go
Created December 13, 2022 09:15 — forked from diamondo25/main.go
Golang TinyMapleServer
package main
import (
"bufio"
"bytes"
"encoding/binary"
"encoding/hex"
"flag"
"fmt"
"net"
@colemancda
colemancda / lichee-nano-fel.md
Created May 11, 2022 07:51 — forked from squeuei/lichee-nano-fel.md
How to enter FEL mode on Lichee nano

How to enter FEL mode on Lichee nano

If SPI flash isn't on the board, just remove the TF(microSD) card from the board and supply the power. It's the same if SPI flash is empty,

If your board have a SPI flash with preloaded image, pull D4(SPI CLK) down to GND. You can use the metal part of USB micro B or TF card slot as GND. Diagram is in the comment below. Thanks: @ernestp for the correction and providing a diagram.

Or you can use the special boot image [link]. Just write it to a TF card and boot.

Don't forget to remove the GND connection after entering FEL mode otherwise you will never be able to write the boot image to the SPI flash.

@colemancda
colemancda / gh-pages.md
Created April 25, 2022 11:10 — forked from ramnathv/gh-pages.md
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" &gt; index.html
@colemancda
colemancda / libdispatch-efficiency-tips.md
Created April 1, 2022 10:42 — forked from tclementdev/libdispatch-efficiency-tips.md
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).

My take-aways are:

  • You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.

  • Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse

@colemancda
colemancda / swift-apt-repo-install.sh
Created March 26, 2022 04:09 — forked from futurejones/swift-apt-repo-install.sh
Install script for the Swift Community Apt Repository - https://archive.swiftlang.xyz
#! /bin/bash
#
# Install script for the Swift Community Apt Repository - swiftlang.xyz
#
# check distribution version and infer distro with switch/case
## as all distribution versions have different names we can use this information to infer the distribution name.
check_ver () {
for var in "${SUPPORTED_VER[@]}"
do
@colemancda
colemancda / alltheflags.md
Created March 17, 2022 16:46 — forked from CodaFi/alltheflags.md
Every Option and Flag /swift (1.2) Accepts Ever

#Every Single Option Under The Sun

  • optimization level options
  • automatic crashing options
  • debug info options
  • swift internal options
  • swift debug/development internal options
  • linker-specific options
  • mode options