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
asm """ | |
.balign 4 | |
.string \"SRAM_Vnnn\" | |
""" | |
import natu | |
irqInit() | |
irqEnable(II_VBLANK) |
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
import macros | |
iterator mutIter[T](a: var T): var T = | |
yield a | |
macro mut(a, body: untyped) = | |
if a.kind != nnkInfix or a[0].strVal != "as": | |
error("Invalid first parameter to `mut`. Usage: `mut <expression> as <name>: <block>`", a) | |
let exp = a[1] | |
let name = a[2] |
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
Analysing the GBA .elf.map | |
-------------------------- | |
The gba linker script can be found under | |
/opt/devkitPro/devkitARM/arm-none-eabi/lib/gba_cart.ld | |
This can be used to see which sections in the .elf go into which parts of memory on the GBA | |
ROM: |
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
import docopt | |
import json | |
let doc = """ | |
gltfstrip | |
Remove materials, textures and images from GLTF files | |
Usage: | |
gltfstrip [-b] <file>... |
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
// ==UserScript== | |
// @name Nim Redirect to Latest Docs | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Redirect from "nim-lang.org" to the corresponding page on "nim-lang.github.io" | |
// @author exelotl | |
// @match https://nim-lang.org/docs/* | |
// @grant none | |
// ==/UserScript== |
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
import strformat, strutils | |
const main = "dlghelper.nim" # file to watch | |
const mainHtml = "index.html" # source web page | |
const outputHtml = "debug.html" # receive the contents of source web page, only if nothing went wrong. | |
proc sleep(seconds: float) = | |
exec("sleep {seconds}".fmt) | |
proc lastModified(file: string): float = |
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
import macros | |
macro compose*(t:typedesc, field:untyped) = | |
## | |
## Composition helper to expose subfields as if they belonged to the root type. | |
## | |
## E.g. allow `foo.x` as a shorthand for `foo.bar.x` | |
## | |
## **Parameters:** | |
## |
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
/* ==UserStyle== | |
@name Tonc Dark | |
@namespace exelo.tl | |
@version 1.0.4 | |
@description A dark theme for the Tonc GBA tutorial, based on Water.css | |
@updateURL https://gist.githubusercontent.com/exelotl/b6b1592a910ae7914e48fda14c593cd3/raw/tonc-dark.user.css | |
@author exelotl | |
==/UserStyle== */ | |
@-moz-document url-prefix("https://www.coranac.com/tonc/text/"), url-prefix("https://coranac.com/tonc/text/"), url-prefix("http://www.coranac.com/tonc/text/"), url-prefix("http://coranac.com/tonc/text/") { |
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
/* ==UserStyle== | |
@name GBATEK Dark | |
@namespace exelo.tl | |
@version 1.0.2 | |
@description GBATEK dark userstyle based on Water.css | |
@updateURL https://gist.githubusercontent.com/exelotl/8bdb37470e16174f668a54be62094cef/raw/gbatek-dark.user.css | |
@author exelotl | |
==/UserStyle== */ | |
@-moz-document url("http://problemkaputt.de/gbatek.htm"), | |
url("https://problemkaputt.de/gbatek.htm"), |
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
# Nim bindings for cgltf - a single-file glTF 2.0 parser written in C99. | |
# Version: 1.3 | |
# Website: https://github.com/jkuhlmann/cgltf | |
# See cgltf.h for license information | |
type | |
FileType* {.size: sizeof(cint), pure.} = enum | |
invalid | |
gltf |
NewerOlder