Skip to content

Instantly share code, notes, and snippets.

View gucchan22's full-sized avatar

GUCCHAN gucchan22

  • Japan
View GitHub Profile
UNIXの特徴
唯一のアクティブな実体: プロセス
(古典的な逐次プロセスと似ており、最初は1つのプロセスが1つのスレッドを処理している)
メッセージ通信によってUNIXのプロセスは互いに通信できる
- pipe(proc<->proc), signal(system->proc)
- シグナルは対象のプロセスグループ(親,兄弟,子)のメンバーに対してのみ送信される
- シグナルの配信は期待できない
ゾンビ状態: 親プロセスにwait()されずにプロセステーブルから削除されなかった子プロセスの状態
@gucchan22
gucchan22 / webrokeup.html
Last active August 29, 2015 14:26
We broke up
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>We broke up</title>
<link href='http://fonts.googleapis.com/css?family=Cookie' rel='stylesheet' type='text/css'>
</head>
<body>
<h1>生まれ変わる7.24</h1>
<script type="text/javascript">
require("date-utils");
var exec = require("child_process").exec;
var process = require("process");
setInterval(function() {
exec("fswebcam /tmp/captured_"+cap_timestamp+".jpg", function(err, stdout) {
//var data = fs.readFileSync("/tmp/captured_"+cap_timestamp"+.jpg").toString("base64");
});
});
First Nintendo DS cartridge information by DarkFader (aka Rafael Vuijk)
Pinout
------
pin x name name description
--- - --------- ---------- ----------------
1 > GND
2 CLK CLKB-MC Clock. High when idle. Data must be stable on rising edge.
void PPU::pattern_table_debug() {
uint16_t base = 0x0000;
uint8_t nespal[4] = { 0x31, 0x21, 0x11, 0x01 }; int w = 0, h = 0;
for(int k = 1; k <= (0x2000 / 16); k++) {
for(int y = 0; y < 8; y++) {
for(int x = 0; x < 8; x++) {
uint8_t c = ((((vm.get_chr(base + y + 8) >> (7 - x)) & 1) << 1) | ((vm.get_chr(base + y) >> (7 - x)) & 1)) & 3;
screen_buffer[(NES_SCREEN_HEIGHT * (y + h)) + (x + w)] = nespal[c]; }
}
w += 8;
struct OAMData { int y, x, tile, flags; };
void render_line(int line) {
int x,c = 0;
struct OAMData oam_per_line[10];
unsigned int *screen_buff = sdl_get_framebuffer();
for(int i = 0; i < 40; i++) { // 40 * 4byte = 160byte (0xfe00 ~ )
int y = mem_get_raw(0xfe00 + (i * 4)) - 16;
if(line < y || line >= y + 8 + (sprite_size * 8)) continue;
oam_per_line[i].y = y;
oam_per_line[i].x = mem_get_raw(0xfe00 + (i * 4) + 1) - 8;
table = {
"aarch64" => "ARM Architecture 64bit State",
"alpha" => "DEC Alpha(Alpha AXP), alpha:ev(4~6)=Alpha (4~6)",
"arc" => "Synopsys DesignWare ARC Processor, arc:(5~8)=ARC (5~8)"
"arm" => "ARM armv(2~5)=ARMv(2~5), v2a, v3m, v4t, v5t, v5te",
"xscale" => "Intel XScale (ARM Architecture)",
"ep9312" => "ARM (ARM 920T based)",
"iwmmxt" => "Intel Wireless MMX Technology(iWMMXt) iwmmxt2=iWMMXt 2",
"avr" => "Atmel AVR avr:(1,2,25,3,31,35,4,5,51,6,101,102,103,104,105,106,107)=AVR (1..107)",
"bfin" => "Blackfin Processor",
#-*- coding:utf-8 -*-
require "net/http"
require "json"
require "nokogiri"
class ODA
ODA_hdr = {
"Host" => "www2.onlinedisassembler.com",
"Content-Type" => "application/x-www-form-urlencoded; charset=UTF-8",
"Referer" => "http://www2.onlinedisassembler.com/odaweb/",
function generateCounter2(a)
{
var b=String(a).split("");
if(b.length>=4)
{
b.splice(b.length-3,0,',')
}
if(b.length>=8)
{
b.splice(b.length-7,0,',')
@gucchan22
gucchan22 / p.rb
Last active August 29, 2015 14:09
diff -ur litenes/src/fce/cpu.c litenes2/src/fce/cpu.c
--- litenes/src/fce/cpu.c 2014-11-17 23:59:46.283859234 +0900
+++ litenes2/src/fce/cpu.c 2014-11-18 00:01:49.787853728 +0900
@@ -46,7 +46,7 @@
#define cpu_update_zn_flags(value) cpu.P = (cpu.P & ~(zero_flag | negative_flag)) | cpu_zn_flag_table[value]
-#define cpu_branch(flag) if (flag) cpu.PC = op_address;
+#define cpu_branch(flag) if (flag) cpu.PC = op_address; op_cycles += 1;
#define cpu_compare(reg) int result = reg - op_value; \