Skip to content

Instantly share code, notes, and snippets.

View devinacker's full-sized avatar

Devin Acker devinacker

View GitHub Profile
MMC3 on the left, MMC5 on the right
mapper init ($FFF1):
PRG: makes $8000-9FFF swappable and $C000-DFFF fixed,
CHR: sets up 2x2kb lower and 4x1kb upper
(probably only PRG part matters here; this should probably be replaced with
an entire MMC5 init routine somewhere else, which may also set up the CHR-ROM
bank setup that is normally asserted when selecting banks on the MMC3,
as well as PRG-RAM and other stuff)
@devinacker
devinacker / bch2obj.go
Last active August 29, 2015 14:06 — forked from magical/bch2obj.go
package main
import (
"bytes"
"encoding/binary"
"flag"
"fmt"
"io"
"io/ioutil"
"math"
@devinacker
devinacker / TX2.cs
Last active August 29, 2015 14:24
paint.net plugin for Nippon Ichi Software .tx2 images
/* this is unfinished */
using System;
using System.Windows.Forms;
using PaintDotNet;
using System.Drawing;
public class TX2FileType : FileType {
public TX2FileType() : base ("TX2", FileTypeFlags.SupportsLoading,
/* compile as C++11 */
#include <QApplication>
#include <QPushButton>
#include <QSlider>
#include <QLabel>
#include <QLayout>
int main(int argc, char *argv[])
map(lambda i:"DEHUMANIZE YOURSELF AND FACE TO FIZZBUZZ"[-8+4*(i%3>0):][4*(i%3*i%5>0):4+4*(i%5==0)].rjust(1,chr(48+i%10)).rjust(2,chr(48+i/10)), range(1, 100))
Argonaut/Anthrox
AF C8 F0 D0 FB 5D D5 00 01 C8 ?? B0 03 D5 00 02 3D D0 F3 END
AF C8 F0 D0 FB 5D D5 00 01 D5 00 02 C8 ?? B0 03 D5 00 03 3D D0 F0 END
Atelier_Double
FC D0 02 AB ?? 78 08 ?? D0 F4 END
E4 ?? F0 ?? EB ?? E5 ?? ?? CF 60 85 ?? ?? C5 ?? ?? 90 END
(Atelier_Double_v1)
FC D0 02 AB ?? 78 08 ?? D0 F4 E8 00 ?? F5 END
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
const char *ui_template = \
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\
<ui version=\"4.0\">\n\
<class>%s</class>\n\
<widget class=\"%s\" name=\"%s\">\n\
/*
Quick SDL2 wrapper for uPNG
d@revenant1.net
This code is public domain.
*/
// https://github.com/elanthis/upng
#include "upng/upng.h"
#include <SDL2/SDL.h>
.p816
.code
main:
sei
stz $4207 ; IRQ at H=0
stz $4208 ; (leave IRQ disable flag set so it only resumes after WAI)
lda #%00010000
sta $4200
wai
@devinacker
devinacker / gist:7a038ceba2d5652b8b7816107f579c7f
Last active September 17, 2018 16:43
Ad blocker filters for keeping some of Twitter's obtrusive garbage off of your timeline
twitter.com##.moments
twitter.com##div[data-card2-type^="promo"]
twitter.com##div[data-component-context^="suggest_activity_tweet"]
twitter.com##div[data-component-context^="suggest_recycled_tweet_inline"]