Skip to content

Instantly share code, notes, and snippets.

View yuriks's full-sized avatar

Yuri Kunde Schlesner yuriks

View GitHub Profile
@yuriks
yuriks / gist:1144547
Created August 14, 2011 03:55
yuriks' coding links collection
@drhelius
drhelius / Gameboy's video hardware
Last active April 5, 2018 02:05
Gameboy's video hardware
Nitty Gritty Gameboy Cycle Timing
---------------------------------
A document about the down and dirty timing of the Gameboy's video hardware.
Written by: Kevin Horton
Version: 0.01 (preliminary)
My findings here are based on the original DMG, Super Gameboy, and GB
[merge "clang_format"]
name = clang-format merge driver
driver = /tmp/merge_driver.sh %O %A %B %L %P
recursive = binary

Merry's very quick guide to elliptic curve crypto

An elliptic curve is made up of the following:

  1. A field, F_p.
  • What this means is all arithmetic on scalars is modulo p.
  • Modern ECC have p as some large prime.
  • For curve25519, p = 2^255 - 19, a prime.
  1. An equation and it's parameters:
@Subv
Subv / kernel_scheduling.md
Last active December 8, 2017 05:14
Nintendo 3DS Kernel scheduler findings

Kernel synchronization

The AppCore uses a mostly cooperative scheduler, however, it is allowed to preempt threads under some specific circumstances, see the Rescheduling section for the cases where the scheduler may preempt a lower-priority thread to let a higher-priority run.

Each core has its own KScheduler instance.

KObject waitlists

Each KObject manages a list of threads that are waiting on it. This list is iterated over each time the KObject is signalled.

vsync fr cpl hsync cp cpg ld mdata mwr mrd mcs maddr sout sin sclk p1 addr data wr rd cs phi t2 t1 res clk
0 0 0 0 0 0 00 ff 1 0 1 0000 0 1 1 001111 ff50 ff 1 0 1 1 0 0 1 1
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 8100 ff 1 0 1 1 0 0 1 0
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 1 0 0 1 1
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 1 0 0 1 0
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 0 0 0 1 1
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 0 0 0 1 0
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 0 0 0 1 1
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 0 0 0 1 0
0 0 0 0 0 0 00 ff 1 0 1 0000 0 1 1 001111 8000 ff 1 0 1 1 0 0 1 1