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
use std::fmt::{self, Display, Formatter}; | |
use std::ops::Add; | |
#[derive(Debug, Clone)] | |
struct u256 { | |
lo: u128, | |
hi: u128, | |
} | |
impl Add<u256> for u256 { |
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
#!/usr/bin/env python3 | |
import sys | |
def main(argv): | |
if len(argv) != 3: | |
print(f"Usage: {argv[0} -(0|1) file.csv", file=sys.stderr) | |
return 1 | |
if argv[1] == "-0": | |
bounds = (-128, 127) |
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
use std::convert::{TryFrom, TryInto}; | |
use std::env::{self, Args}; | |
use std::fs::{self, File}; | |
use std::io::{self, BufRead, BufReader, BufWriter, Read, Stdin, Write}; | |
use std::path::PathBuf; | |
use std::process::{self, Command, Stdio}; | |
use std::thread; | |
use std::time::Duration; | |
const NB_CHILDREN: usize = 8; |
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
use std::collections::HashSet; | |
use std::convert::TryInto; | |
use std::ops::Deref; | |
use std::sync::{Arc, Mutex}; | |
use std::thread; | |
const NB_THREADS: usize = 8; | |
fn main() { | |
let mut seeds = Arc::new(Mutex::new(HashSet::new())); |
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
issotm@sheik-kitty ~/gb-boilerplate% make -dr [master|✔] | |
GNU Make 4.3 | |
Built for x86_64-pc-linux-gnu | |
Copyright (C) 1988-2020 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. | |
Reading makefiles... | |
Reading makefile 'Makefile'... | |
Reading makefile 'project.mk' (search path) (no ~ expansion)... |
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
PLEASE NOTE THAT THIS WAS MADE FOR C-INTERCAL | |
PLEASE DO .10 <- #18 | |
PLEASE DO ,10 <- .10 | |
PLEASE DO ,11 <- .10 | |
DO NOT BE AFRAID, THESE ARE ASCII NUMBERS, NOT "TURING TAPE" | |
DO ,10SUB#1 <- #65 | |
DO ,10SUB#2 <- #114 | |
DO ,10SUB#3 <- #99 | |
DO ,10SUB#4 <- #104 |
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
NEWCHARMAP "Low byte" | |
charmap "A", $12 | |
NEWCHARMAP "High byte" | |
charmap "A", $34 | |
; ... | |
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
$(BINDIR)/game.gb: $(SRCDIR)/tools/crcify.py $(OBJS) | |
@$(MKDIR) -p $(@D) | |
$(RGBLINK) $(LDFLAGS) -o $@ $(OBJS) | |
$(RGBFIX) $(FIXFLAGS) $@ | |
$(RGBASM) $(ASFLAGS) -D'BANK_BYTE=$$'$$(xxd -s 0x148 -l 1 -p $@) -o $(OBJDIR)/crc.o $(SRCDIR)/crc.asm | |
$(RGBLINK) $(LDFLAGS) -o $@ $(OBJS) \ | |
&& $(RGBFIX) $(FIXFLAGS) $@ \ | |
&& $(PY) $< $@ \ | |
&& $(RGBFIX) $(FIXFLAGS) $@ |
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
#!/usr/bin/env python3 | |
import itertools | |
import sys | |
if len(sys.argv) < 2: | |
print(f"Usage: {argv[0]} <subnet mask>\n\tSubnet mask must be in dotted decimal form.", file=sys.stderr) | |
exit(1) |
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
FadeDMGToWhite: | |
ld c, LOW(hBGP) | |
ld hl, wBGP | |
.fadeDMGPalToWhite | |
ld a, [hli] | |
ld b, 4 | |
.fadeDMGColorToWhite | |
ld e, a | |
and $C0 |