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
Embedded / Electronics night featuring a functionality and design demo of the μJoypad, the world's (unofficially) smallest NES controller |+ ..| | |
Monday, November 5th, 2012 | |
7:00 pm | |
SkullSpace Lounge, 3rd floor, 125 Adelaide St. | |
After the success of our last embedded / electronics night, I thought we should have another! I'm proposing we get together on November 5th at 7:00 | |
and I will start things off with a short, informal demo of my latest project, the μJoypad, a nickel sized NES controller[1][2]. I designed the board | |
using the free and open source tools available as part of the gEDA project and will be showing how I used those tools to quickly put together the | |
schematic and PCB layout. |
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
// Bind F7 to 'step' | |
javascript:$(document).bind('keydown', function(e) { e.which == 118 && parse('s'); }); void(0) | |
// Add a 'readhex' command that works just like 'read' but dumps nothing but the hex | |
javascript:cpu._readhex = | |
function(e) { | |
if (!e[1]) return write(" Please give an expression to read the memory at."), void 0; | |
var t = cpu.to_addr(e[1]); | |
cpu.get("/cpu/dbg/memory/" + t + "?len=" + (parseInt(e[2], 16) + (15 - parseInt(e[2], 16) & 15) || 32), function(e) { | |
for (var n = atob(e.raw), i = "", o = " ", s = 0; s < n.length; s++) s % 2 == 0 && (o += " "), o += pad(n.charCodeAt(s).toString(16), 2), s % 8 == 7 && (i += " " + o + "\n", o = " "); |
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/sh | |
# Update latest epel | |
sudo yum -y instlal epel-release | |
# perl-IO-Socket-IP isn't in the repos | |
wget http://rpm.mag-sol.com/Centos/6/x86_64/perl-IO-Socket-IP-0.31-1.el6.noarch.rpm | |
sudo rpm -Uvh perl-IO-Socket-IP-0.31-1.el6.noarch.rpm | |
rm perl-IO-Socket-IP-0.31-1.el6.noarch.rpm |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#ifdef _MSC_VER | |
#include <intrin.h> /* for rdtscp and clflush */ | |
#pragma optimize("gt",on) | |
#else | |
#include <x86intrin.h> /* for rdtscp and clflush */ | |
#endif |