Skip to content

Instantly share code, notes, and snippets.

#include "nes/cpu.h"
/* ------------------------------------------------------------------------- */
/* -- MOS-6502 emulation and specifics ------------------------------------- */
namespace mos6502
{
// The MOS-6502 instruction set, as an X-Macro. This encodes the
// opcode, instruction name, address mode, cycle count, length, and
// page-crossing penalties of every valid 6502 instruction.
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active February 10, 2025 13:16
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@nightlark
nightlark / gist:6482130
Created September 8, 2013 05:37
Java class to look up a color name from the rgb values.
import java.util.ArrayList;
public class ColorNameLookup {
public class ColorName {
public int r,g,b;
public String name;
public ColorName(String name, int r, int g, int b) {
this.r = r;
this.g = g;