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/perl -w | |
use strict; | |
use File::stat; | |
die "You must specify a rom name!" unless ($#ARGV == 0); | |
my $rom = 0; | |
my $fileSize = stat($ARGV[0])->size; | |
open(FILE, "<$ARGV[0]") or die $!; |
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 <util/atomic.h> | |
#define CH_NUL 0x00 | |
#define CH_BACKSPACE 0x08 | |
#define CH_CANCEL 0x18 | |
#define CH_SUBSTITUTE 0x1a | |
#define CH_ESCAPE 0x1b | |
#define CH_SPACE 0x20 | |
#define CH_CSI 0x9b | |
#define CH_ST 0x9c |
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
inline int Stringify(int value, char* buffer, int bufferLen) | |
{ | |
int i = bufferLen-1, tmp; | |
char *ptr = buffer, c; | |
for(; value && i; --i) | |
{ | |
tmp = value; | |
value/=10; | |
*ptr++ = "9876543210123456789"[9 + tmp - value*10]; |
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
class Callback | |
{ | |
public: | |
Callback() {} | |
virtual ~Callback(); | |
virtual void onMouseMove(int x, int y) = 0; | |
}; | |
template <typename T> |
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
; 426 : glClearColor(0.0f, 0.0f, 0.0f, 0.0f); | |
fldz | |
sub esp, 16 ; 00000010H | |
fst DWORD PTR [esp+12] | |
fst DWORD PTR [esp+8] | |
fst DWORD PTR [esp+4] | |
fstp DWORD PTR [esp] | |
call DWORD PTR __imp__glClearColor@16 |
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
// init | |
glGenVertexArrays(1, &fullscreenTriangleVAO); | |
glBindVertexArray(fullscreenTriangleVAO); | |
glEnableVertexAttribArray(0); | |
glEnableVertexAttribArray(1); | |
glBindBuffer(GL_ARRAY_BUFFER, fullscreenTriangleFBO); | |
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, 0); | |
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, (GLvoid*)(6*sizeof(GLfloat))); | |
glBindBuffer(GL_ARRAY_BUFFER, 0); | |
gl.BindVertexArray(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
union | |
{ | |
struct | |
{ | |
PFNGLATTACHSHADERPROC AttachShader; | |
PFNGLCOMPILESHADERPROC CompileShader; | |
PFNGLCREATEPROGRAMPROC CreateProgram; | |
PFNGLCREATESHADERPROC CreateShader; | |
PFNGLDELETEPROGRAMPROC DeleteProgram; | |
PFNGLDELETESHADERPROC DeleteShader; |
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 <SPI.h> | |
#include "DataFlash.h" | |
DataFlash dataflash; | |
uint8_t currentSector; | |
void setup() | |
{ | |
uint8_t status; | |
DataFlash::ID id; |
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
#ifndef NETWORK_H | |
#define NETWORK_H | |
#include "Config.h" | |
// [todo] enum for error? | |
class Network | |
{ | |
public: |
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
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" |