Skip to content

Instantly share code, notes, and snippets.

View rmmh's full-sized avatar

Ryan Hitchman rmmh

  • Boulder, Colorado
View GitHub Profile
@rmmh
rmmh / dcpu-16.txt
Last active August 29, 2015 13:57
DCPU Spec Proposals
DCPU-16 Specification
Copyright 2012 Mojang
Version 1.1 (Check 0x10c.com for updated versions)
* 16 bit words
* 0x10000 words of ram
* 8 registers (A, B, C, X, Y, Z, I, J)
* program counter (PC)
* stack pointer (SP)
* extra/excess (EX)
@rmmh
rmmh / -
Created April 21, 2014 01:51
example passwords generated by https://github.com/rmmh/abbrase
Generating 32 passwords with 50 bits of entropy
Password Phrase
--------------- --------------------
fibpsygotetemol fibres psychology got eternal molecules
crohismacwrosiz cross his machine wrong size
haswrigooalsarm has written good also army
livfoctelduerow living focus telescope due row
achtexmeaimiela achieved text means imitation elaborate
poiatmengdocpea point atmospheric engine doctor pearson
phosinwayladpha photographs since way laden phagocytes
@rmmh
rmmh / rng.py
Last active August 29, 2015 14:03
generating random permutations for the chip8
import random
poss = [0] * 65536
def bitcount(x):
return bin(x).count("1")
@rmmh
rmmh / -
Created August 17, 2014 21:35
Disassembled Chip8 Programs
# INPUT FILE LISTING:
# chip8/Chip-8 Demos/Maze (alt) [David Winter, 199x].ch8
# chip8/Chip-8 Demos/Maze [David Winter, 199x].ch8
# chip8/Chip-8 Demos/Particle Demo [zeroZshadow, 2008].ch8
# chip8/Chip-8 Demos/Sierpinski [Sergey Naydenov, 2010].ch8
# chip8/Chip-8 Demos/Sirpinski [Sergey Naydenov, 2010].ch8
# chip8/Chip-8 Demos/Stars [Sergey Naydenov, 2010].ch8
# chip8/Chip-8 Demos/Trip8 Demo (2008) [Revival Studios].ch8
# chip8/Chip-8 Demos/Zero Demo [zeroZshadow, 2007].ch8
# chip8/Chip-8 Games/15 Puzzle [Roger Ivie] (alt).ch8
@rmmh
rmmh / readme.txt
Created September 1, 2014 16:07 — forked from anonymous/readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@rmmh
rmmh / -
Last active September 3, 2015 07:52
PICO-8 cart compression analysis. 'picolz' is the current compression method.
path text picolz zlib -9 lz4hc zlib code + ram
---------------------------------------------------- ------ -------- --------- ------- -----------------
2267_12639_chode_br.p8.png 0 8 8 20 74
2137_11694_interstellar.p8.png 248 180 152 191 1346
2338_13131_swirlthing.p8.png 314 254 213 269 296
2120_11629_heavy_snare_worm.p8.png 479 336 280 377 591
2109_11533_transdimensional_butterfly.p8.png 712 504 408 578 1090
2178_11993_garter.p8.png 729 503 388 555 524
2129_11647_snake_killer.p8.png 921 473 397 561 1316
2117_11597_workplace.p8.png 940 369 316 434 1058
@rmmh
rmmh / bot_trust.py
Created May 9, 2011 02:46
Google Code Jam 2011 Prelim Round A
n_cases = input()
for case in xrange(1, n_cases + 1):
bot = {'O': [1, 0], 'B': [1, 0]}
buttons = raw_input().split()[1:]
buttons = zip(buttons[::2], map(int, buttons[1::2]))
time = 0
@rmmh
rmmh / 0x10c_radio_v1.txt
Created April 6, 2012 20:27
0x10c Radio Communications
0x10c Radio Communications
For each solar system, there are 256 channels.
Each channel holds 128 words of data, and gets reset to zeros 8 times per second.
A radio can broadcast 1-128 words once per second to any channel, and receive
1-128 words eight times per second from any channel.
Broadcasting XORs the sent data with the current contents of the channel.
//===-- DCPU16InstrFormats.td - DCPU16 Instruction Formats -*- tablegen -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
@rmmh
rmmh / A.mdown
Created April 9, 2012 04:36
DPCU-16 Spec Suggestions

DCPU-16 Spec Suggestions

  1. Evaluate b before a

This makes instructions that address the stack twice meaningful instead of confusing and useless.

ADD PEEK, POP should pop the top of the stack and add it to the second entry, but currently the PEEK is evaluated before the POP occurs.

  1. Add [SP+next word] addressing