Skip to content

Instantly share code, notes, and snippets.

View features_cpu.c
* cpu_features_get_time_usec:
* Gets time in microseconds.
* Returns: time in microseconds.
retro_time_t cpu_features_get_time_usec(void)
struct timeval tv;
View RA crash
Starting program: /home/simias/src/RetroArch/retroarch
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
[New Thread 0x7fffdecff700 (LWP 14633)]
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] Found shader "/home/simias/.config/retroarch/shaders/gb.glslp"
[INFO] Found shader "/home/simias/.config/retroarch/shaders/retroarch.glslp"
View zsort_audio2.c
void ZSortBOSS_Audio2( u32 _w0, u32 _w1 )
int len = _w1 >> 24;
u16 *mem16 = (u16*)DMEM;
// Destination address (in 16bit sample unit)
u32 dst = (((u32*)DMEM)[0x10>>2] >> 1) ^ 1;
/* Fixed point 8.16 */
u32 fp0 = _w0 & 0xfffff;
View socfpga_arria10.h
* Copyright (C) 2014-2016 Altera Corporation <>
* SPDX-License-Identifier: GPL-2.0
#include <asm/arch/hardware.h>
fn main() {
let font =
[ /* space */
View font.c
/* 4bpp 3x5 pixel font (texture size: 192 x 10, 240 32bit words) */
const uint8_t font[192 * 10 / 2] = {
0x00, 0x00, 0x10, 0x10, 0x11, 0x01, 0x01, 0x11,
0x01, 0x01, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x11, 0x10, 0x10, 0x11, 0x01, 0x10, 0x10, 0x11,
0x11, 0x11, 0x11, 0x11, 0x01, 0x01, 0x11, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11,
0x11, 0x10, 0x10, 0x11, 0x00, 0x11, 0x01, 0x11,
0x11, 0x11, 0x10, 0x11, 0x10, 0x11, 0x11, 0x00,
View Makefile
NAME = mybin
CFLAGS = -Wall -O2 -MMD -MP
SRC = main.c
OBJ = $(SRC:%.c=%.o)
DEP = $(SRC:%.c=%.d)
$(NAME) : $(OBJ)
View bios-vectors.s
.set mips1
.set noreorder
.set noat
.set nomacro
.section .text.bios_printf
.global bios_printf
.type bios_printf, function

Keybase proof

I hereby claim:

  • I am simias on github.
  • I am simias ( on keybase.
  • I have a public key whose fingerprint is 60DD 85DC B0E4 8F93 64C5 717D 5C96 8D2B 76C4 CE95

To claim this, I am signing this object:

simias / mkpimage.c
Created Feb 1, 2017
Rewrite of barebox's mkpimage
View mkpimage.c
/* Replacement for altera's proprietary mkpimage (part of their EDS)
* Create an Altera BootROM-compatible image of the Second Stage Boot
* Loader (SSBL).
* This program should generate the same output as Altera's mkpimage
* version 16.1 (build 196). If it doesn't it's a bug.
* The original version of this program was part of barebox.