This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; code by PikalaxALT, not me | |
FarDisassemble: | |
; Disassemble the opcode at a:hl to wStringBuffer1 | |
ld [hBuffer], a | |
ld a, [hROMBank] | |
push af | |
ld a, [hBuffer] | |
rst Bankswitch | |
call Disassemble |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Title Transcendence in the Dead of Night | |
#Composer Pigu | |
#Option /v | |
#FM3Extend X | |
#Filename .M | |
#Memo 2017/09/29 | |
#Memo Entry for Battle of the Bits FM Synth 2 | |
#Memo PC-x801 category | |
@01 4 7 ; bd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# By Pigu | |
# Usage: dmf2pmd.py <input.dmf> <output.txt> | |
import io, math, string, sys, zlib | |
poke = lambda c,o,a,d: "y{},{}".format(a+(c%3)+o*4,d) | |
timerB = lambda x: math.floor(256.5-(10400/3/x)) | |
u8 = lambda x: int.from_bytes(x.read(1),byteorder="little") | |
s16 = lambda x: int.from_bytes(x.read(2),byteorder="little",signed=True) | |
s32 = lambda x: int.from_bytes(x.read(4),byteorder="little",signed=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse, string, sys | |
BCODES = { | |
"line": (10,), | |
"id": (11,), | |
"const": (12,), | |
"if": (13,0), | |
"goto": (14,), | |
"print": (15,0), | |
"stop": (16,0), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Decompress: | |
; Pokemon Crystal uses an lz variant for compression. | |
; This is mainly (but not necessarily) used for graphics. | |
; This function decompresses lz-compressed data from hl to de. | |
LZ_END EQU $ff ; Compressed data is terminated with $ff. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> cnt = 0 | |
>>> for i in roms: | |
... fi = open(i,"rb") | |
... t = fi.seek(0x147) | |
... cart = ord(fi.read(1)) | |
... siz = romsiz(ord(fi.read(1))) | |
... if 0x18 < cart < 0x20 and siz < 1024: | |
... print("{} | {} KiB".format(i.split("\\")[-1],siz)) | |
... cnt += 1 | |
... fi.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Arduino.h" | |
#include "SPI.h" | |
const uint8_t F[] = {57,57,57,57,77,102,128,153}; | |
const int8_t L[] = {1,3,5,7,9,11,13,15,-1,-3,-5,-7,-9,-11,-13,-15}; | |
const uint16_t MIN_Q = 127; | |
const uint16_t MAX_Q = 24576; | |
uint16_t qn; | |
int16_t xn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io, string, sys, zlib | |
CH3_DMF_VOL_IS_DS_VOL = False | |
def sane(a): | |
cap = True | |
t = "" | |
for i in a.decode(): | |
if i in string.ascii_letters + string.digits + "_": | |
t += i.upper() if cap else i | |
cap = False |