Skip to content

Instantly share code, notes, and snippets.

View city41's full-sized avatar
🙃

Matt Greer city41

🙃
View GitHub Profile
@city41
city41 / drawBitmap.cpp
Last active September 10, 2018 23:59
Arduboy2's Sprite and ArdBitmap primary drawBitmap methods combined into one
#include "drawBitmap.h"
#include <Arduboy2.h>
/**
* draw a bitmap with an optional mask, optional mirroring and optional inverting
*
* This code is a combination of Arduboy2's Sprite::drawExternalMask() and Ardbitmap's drawBitmap()
*
* This method can accomplish the same effect as most of Sprite's methods:
* drawOverwrite: pass in a mask of NULL
@city41
city41 / tileRoom.cpp
Last active September 23, 2018 18:58
Ardynia's loadRoom (RLE decompression) method
/**
* Load a compressed room from progmem into RAM
*
* maps are compressed in two ways:
*
* * two tiles per byte, as there are less than 16 tiles
* * run length encoding is employed to remove long runs of the same tile
*
* The RLE is done per room, and there is a header section containing the starting
* index of each room. This is because with RLE compression, each room will have a different
@city41
city41 / gist:e0080a93c0e8f8e1eac8cf6d8ff33fc5
Created October 20, 2019 20:55
chromium version for window onCreated question to Chromium newsgroup
Chromium 76.0.3809.121 (Official Build) (64-bit)
Revision d28530da606049009612d26e41b73a92e2bf3299-refs/heads/master@{#692470}
Platform 76.4.69 (Developer Build - neverware) stable-channel chromeover64
Firmware Version
JavaScript V8 7.6.303.31
Flash (Disabled)
User Agent Mozilla/5.0 (X11; CrOS x86_64 12239.2.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.121 Safari/537.36
Command Line /opt/google/chrome/chrome --use-gl=egl --gpu-sandbox-failures-fatal=no --enable-logging --log-level=1 --use-cras --enable-wayland-server --user-data-dir=/home/chronos --enable-features=MachineLearningService,MyFilesVolume,Crostini,ExperimentalCrostiniUI --system-developer-mode --login-profile=user --default-wallpaper-is-oem --aura-legacy-power-button --default-wallpaper-large=/usr/share/chromeos-assets/wallpaper/oem_large.jpg --default-wallpaper-small=/usr/share/chromeos-assets/wallpaper/oem_small.jpg --default-wallpaper-is-oem --enterprise-enrollment-initial-modulus=15 --enterprise-enrollment-modulus-limit=19 --log
@city41
city41 / vram.lua
Created January 21, 2024 03:53
MAME neo geo vram lua script
-- how to use:
-- mame -autoboot_script path/to/vram.lua <game>
cpu = manager.machine.devices[":maincpu"]
mem = cpu.spaces["program"]
screen = manager.machine.screens[":screen"]
-- what vram looked like last frame
prev_vram = {}
-- what vram looks like this frame