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
#!/usr/bin/python | |
from ftplib import FTP | |
from io import BytesIO | |
# pip install python-slugify | |
from slugify import slugify | |
import argparse | |
import time | |
parser = argparse.ArgumentParser() |
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
#include "png.h" | |
#include <stdbool.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <zlib.h> | |
static void crc32_to_buf(uint8_t* buf, const uint8_t* in, size_t len) { | |
const uint32_t c = crc32(0, in, len); |
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
#include "SDL_memory_map.h" | |
#include <SDL3/SDL.h> | |
// #include "SDL_internal.h" | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <errno.h> |
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
struct RingBuf | |
{ | |
uint32_t buf[8]; | |
uint32_t r_index; | |
uint32_t w_index; | |
}; | |
static void ringbuf_reset(struct RingBuf* ring) | |
{ | |
ring->r_index = ring->w_index; |
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
#include "scheduler.h" | |
#include <stdbool.h> | |
#include <assert.h> | |
#ifndef SCHEDULER_UNUSED | |
#define SCHEDULER_UNUSED(x) (void)(x) | |
#endif // SCHEDULER_UNUSED | |
// this is the value that events are set to when disabled | |
enum { SCHEDULER_DISABLE_VALUE = INT_MAX }; |
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
/* | |
io_ezfo.c | |
Hardware Routines for reading the EZ Flash Omega filesystem | |
*/ | |
#include "io_ezfo.h" | |
#include <gba_dma.h> |
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
// Copyright 2022 TotalJustice. | |
// SPDX-License-Identifier: GPL-3.0-only | |
#pragma once | |
#ifndef SCHEDULER_USE_BOOST | |
#define SCHEDULER_USE_BOOST 1 | |
#endif | |
// set this to 0 if the scheduler can be empty, 1 by default | |
// due to the reset event always being set! |
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
#include <switch.h> | |
#include <cstdlib> | |
#include <cstring> | |
#include <cstdio> | |
#include <cstdarg> | |
#include <vector> | |
#include <memory> | |
#include <bit> | |
#include <experimental/scope> |
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
// SOURCE: https://github.com/nba-emu/NanoBoyAdvance/blob/master/src/platform/core/src/device/shader/color_agb.glsl.hpp | |
// GODBOLT: https://godbolt.org/z/1cfaedavK | |
#include <cstdint> | |
#include <cmath> | |
#include <algorithm> | |
uint32_t gba_shader(uint16_t bgr555) { | |
constexpr auto darken_screen = 1.0; | |
constexpr auto target_gamma = 2.2; |
NewerOlder