Skip to content

Instantly share code, notes, and snippets.

View Sanqui's full-sized avatar
🦉

Sanqui Sanqui

🦉
View GitHub Profile
@Sanqui
Sanqui / gbz80asm.lang.xml
Last active June 7, 2019 19:29
GTK language description for RGBDS-compatible GBZ80 assembly syntax. Save as /usr/share/gtksourceview-3.0/language-specs/gbz80asm.lang
<?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Sanky
License: Public domain
-->
<language id="gbz80asm" _name="gbz80asm" version="2.0" _section="Sources">
<metadata>
<property name="mimetypes">text/x-z80asm</property>
import colorsys
import png
import datamijn
from datamijn import dmtypes
VGATLAS_DIR = "/home/sanqui/romhacking/vgatlas/vgatlas"
name = "pokered"
rom_filename = "pokered.gbc"
@Sanqui
Sanqui / boom-plus-plus.lua
Last active February 16, 2019 19:38
A Lua script for corrupting Gameboy and Gameboy Advance games live. Supply to VBA-RR. Consult your doctor before use.
--
-- ░█▀▄░█▀█░█▀█░█▄█░░░░█░░░█░█░█▀█
-- ░█▀▄░█░█░█░█░█░█░░░░█░░░█░█░█▀█
-- ░▀▀░░▀▀▀░▀▀▀░▀░▀░▀░░▀▀▀░▀▀▀░▀░▀
--
--
-- Fair warning: this code is about as bad as the things it does to games.
-- GBA support experimental and frankly quite boring.
143245| sanqui@kuriputoraido:~ $ /home/sanqui/Downloads/Telegram/Telegram
Fontconfig warning: line 5: unknown element "its:rules"
Fontconfig warning: line 6: unknown element "its:translateRule"
Fontconfig error: line 6: invalid attribute 'translate'
Fontconfig error: line 6: invalid attribute 'selector'
Fontconfig error: line 7: invalid attribute 'xmlns:its'
Fontconfig error: line 7: invalid attribute 'version'
Fontconfig warning: line 9: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: unknown element "its:translateRule"
diff --git a/constants.asm b/constants.asm
index 0b24ea0..58339bc 100644
--- a/constants.asm
+++ b/constants.asm
@@ -30,3 +30,8 @@ INCLUDE "constants/credits_constants.asm"
INCLUDE "constants/music_constants.asm"
INCLUDE "constants/tilesets.asm"
INCLUDE "constants/starter_mons.asm"
+
+INCLUDE "constants/misc.asm"
@Sanqui
Sanqui / vmu_dec.asm
Created January 10, 2014 18:10
vmu decompressor for a nybble-based 1bpp compression
decompress_quit:
jmp goodbye
decompress_ret:
jmp decompress_done
decompress:
xor acc
ldc
be #$ff, decompress_quit
#!/usr/bin/python3
import struct
from sys import argv, stderr
from gbaddr import gbaddr, gbswitch
def readbyte(): return struct.unpack("B", rom.read(1))[0]
def readshort(): return struct.unpack("<H", rom.read(2))[0]
rom = open(argv[1], "rb")
# TODO load symfile
@Sanqui
Sanqui / gbaddr.py
Last active February 6, 2018 11:13
#!/bin/python3
from sys import argv
def gbaddr(arg):
if ":" in arg:
bank, pointer = arg.split(":")
bank = int(bank, 16)
pointer = int(pointer, 16)
address = None
if bank == 0 and pointer < 0x4000:
@Sanqui
Sanqui / dlxasm.lang.xml
Created November 28, 2016 09:39
dlx asm syntax highlighting for gedit. sudo cp dlxasm.lang /usr/share/gtksourceview-3.0/language-specs/
<?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Sanqui
License: Public domain
-->
<language id="dlxasm" _name="dlxasm" version="2.0" _section="Sources">
<metadata>
<property name="mimetypes">text/x-dlxasm</property>
@Sanqui
Sanqui / twitchautoban.py
Last active December 26, 2015 01:19
xchat twitch auto bot ban
__module_name__ = "twitchautoban"
__module_version__ = "0.1.0"
__module_description__ = "bans twitch spambots lol"
import xchat
import os
import re
print "twitchautoban loaded!"