This file contains hidden or 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
func (p *Ppu) renderTileRow() { | |
// 32 total loops for 32 tiles, 1 pixel of each | |
for x := 0; x < 32; x++ { | |
// for i := a; i < a+0x20; i++ { | |
attrAddr := 0x23C0 | (p.VramAddress & 0xC00) | int(p.AttributeLocation[p.VramAddress&0x3FF]) | |
shift := p.AttributeShift[p.VramAddress&0x3FF] | |
attr := ((p.Vram[attrAddr] >> shift) & 0x03) << 2 | |
ntAddress := p.selectNametable((p.VramAddress & 0xC00) >> 10) | |
t := p.bgPatternTableAddress(p.Vram[(p.VramAddress&0x3FF)+ntAddress]) |
This file contains hidden or 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
package main | |
import ( | |
"math" | |
) | |
const ( | |
StatusSpriteOverflow = iota | |
StatusSprite0Hit |
This file contains hidden or 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
package main | |
const ( | |
StatusSpriteOverflow = iota | |
StatusSprite0Hit | |
StatusVblankStarted | |
MirroringVertical | |
MirroringHorizontal |
This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"crypto/tls" | |
"encoding/binary" | |
"encoding/hex" | |
"encoding/json" | |
"fmt" |
This file contains hidden or 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
package main | |
type Cpu struct { | |
X Word | |
Y Word | |
A Word | |
P Word | |
CycleCount int | |
StackPointer Word | |
Verbose bool |
This file contains hidden or 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
@Override | |
public boolean onCreateOptionsMenu(Menu aMenu) { | |
MenuInflater inflater = getMenuInflater(); | |
inflater.inflate(R.menu.my_main_menu, aMenu); | |
return true; | |
} |
This file contains hidden or 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 os | |
import sys | |
sys.path.append(os.path.dirname(__file__)) | |
sys.path.append('/usr/local/django') | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' | |
import django.core.handlers.wsgi | |
application = django.core.handlers.wsgi.WSGIHandler() |
This file contains hidden or 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
#!/bin/bash | |
for x in `adb devices | awk '/device$/ {print $1}'`; do | |
echo `adb -s $x install -r bin/*-debug.apk` | |
sleep 0; | |
done |
This file contains hidden or 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
// Copyright (c) 2009, Scott Ferguson | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the | |
// documentation and/or other materials provided with the distribution. |
This file contains hidden or 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
from pymt import * | |
import sys, dbus, subprocess, os | |
import time | |
class Tracer(MTWidget): | |
SWIPE_X_THRESHOLD = 220 | |
SWIPE_Y_THRESHOLD = 100 | |
LEFT_SWIPE, RIGHT_SWIPE = range(2) | |
block = False |