Skip to content

Instantly share code, notes, and snippets.

View BlockoS's full-sized avatar
💭
🧙⚔️💾

MooZ BlockoS

💭
🧙⚔️💾
View GitHub Profile
<samplerList>
<sampler2D name="source" minFilter="LINEAR" magFilter="NEAREST" wrapS="CLAMP_TO_EDGE" wrapT="BORDER"/>
<sampler2D name="tex" level="0" minFilter="LINEAR" magFilter="NEAREST" wrapS="CLAMP"/>
</samplerList>
<out>
<vec4 name="color" index="0"/>
<vec4 name="normal" index="1"/>
</out>
#include <pugixml.hpp>
#include <iostream>
#include <string.h>
#include <vector>
#include <unordered_map>
typedef int GLenum;
#define GL_NONE 0
@BlockoS
BlockoS / jkiss32.asm
Created November 16, 2010 22:05
Implementation of a 32-bit KISS generator which uses no multiply instructions (on pcengine [not tested])
; http://www.cs.ucl.ac.uk/staff/d.jones/GoodPracticeRNG.pdf
; Implementation of a 32-bit KISS generator which uses no multiply instructions
.zp
_tmp .ds 4
_x .ds 4
_y .ds 4
_z .ds 4
_w .ds 4
_n .ds 4
_c .ds 1
@BlockoS
BlockoS / openDisplay.c
Created January 19, 2011 19:46
Raw incomplete X client
//// TODO :: 3. Clean up
//// 4. Events
//// 5. Create a colormap
//// 6. glx ?
#ifdef DEBUG
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/un.h>
#include <sys/select.h>
lda <__radius_0
bpl .l0
inc <__radius_0+1
.l0:
eor #128
sta <__radius_0
lda <__radius_1
bpl .l1
inc <__radius_1+1
@BlockoS
BlockoS / gist:973257
Created May 15, 2011 15:53 — forked from anonymous/gist:972294
Just a simple maze generator
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
typedef struct {
unsigned int x;
unsigned int y;
} Coordinate;
@BlockoS
BlockoS / HuC6280Opcodes.c
Created May 19, 2011 21:21
HuC6280 addressing mode
#define ARG1(a) (a)
#define ARG2(a,b) ( (a) | ((b) << 8) )
#define ARG3(a,b,c) ( (a) | ((b) << 8) | ((c) << 16) )
#define INDIRECT(c) ( (c) | 0x80 )
enum
{
ACCUMULATOR,
Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file build\Win32\Debug\pce.dll
File Type: DLL
Section contains the following exports for pce.dll
@BlockoS
BlockoS / array.c
Created June 30, 2011 20:32 — forked from anonymous/array.c
Array C "template"
#include <stdio.h>
#define ARRAY_DECLARE(type) \
typedef struct \
{ \
type *buffer; \
size_t capacity; \
size_t size; \
} type##_array; \
void type##_array_create(type##_array* container); \
mpr 0: ff
mpr 1: f8
mpr 2: 80
mpr 3: 81
mpr 4: 82
mpr 5: 83
mpr 6: 77
mpr 7: 00
5439: ; start of vram "print"