Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jarikomppa's full-sized avatar

Jari Komppa jarikomppa

View GitHub Profile
#ifdef __EMSCRIPTEN__
#include <emscripten/emscripten.h>
#endif
#include "SDL3/SDL.h"
#include "SDL3/SDL_main.h"
int* fb;
SDL_Window* window;
SDL_Renderer* renderer;
SDL_Texture* tex;
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h> // mmap
#include <fcntl.h> // open
static unsigned int *gpio_mmap = 0;
int init_gpio()
{
int gpio_file = -1;
push ix
push iy
push hl
push bc
push de
ld ix,#0 ; set up ix to point at stack
add ix,sp
ld d, 15 (ix) ; aY
#define _CRT_SECURE_NO_WARNINGS
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
int tp[10000];
int tps = 0;
void fillcell(int* img, int y, int x, int w, int fill)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <chrono>
double payload(int w, int h, int iters)
{
float xscale, yscale, zx, zy, cx, tempx, cy;
int x, y, i, j;
int maxx, maxy, count;
#include <Windows.h>
#include <math.h>
#include <stdio.h>
#define DATASIZE 1024//*1024
#define SUBSET 32//256
void swap(int *a, int *b)
{
@jarikomppa
jarikomppa / m.py
Last active October 8, 2018 19:43
using multiple processes now!
# Sol's Stupidly Simple Build System v.2.1
# (c) 2018 Jari Komppa http://iki.fi/sol
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely, subject to the following restrictions:
#include <Windows.h>
#include <stdio.h>
namespace Thread
{
typedef void(*threadFunction)(void *aParam);
struct ThreadHandleData;
typedef ThreadHandleData* ThreadHandle;