Skip to content

Instantly share code, notes, and snippets.

View SonoSooS's full-sized avatar

Sono SonoSooS

  • Hungary
  • 13:25 (UTC +02:00)
View GitHub Profile
@SonoSooS
SonoSooS / DMGCPU.MD
Last active April 18, 2024 03:45
Game Boy CPU internals

This document is intended to document certain inner workings of the CPU.

There have been efforts by emu-russia and gekkio to have the CPU decapped, and so we have the decode ROM accessible to us. This means, that we know exactly what each opcode does (besides some nuanced behavior related to HALT, STOP, and some state management related to interrupts and power saving which are hard to untangle).

Table of contents

@SonoSooS
SonoSooS / midiplay2_1.py
Last active May 24, 2021 23:08
One-linear Python MIDI player concept
'''
midiplay2 rev1 - MIDI player written in Python 3.6 for Windows
Copyright (C) 2021 Sono (https://github.com/SonoSooS)
All Rights Reserved
'''
import sys
import struct
import io
import ctypes
/*
Make Discord great again!
Copyright(C) 2017-2018 Sono
All Rights Reserved
*/
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <tlhelp32.h>
#hdr
#include <3ds.h>
#end
#src
#include "stdmacro.h"
#end
typedef void (*SignalHandler)(u32 notif);
@SonoSooS
SonoSooS / aaasoundcloud.lua
Created May 17, 2018 16:41
SoundCloud set playlist plugin for VLC
--[[--
SonundCloud set (playlist) parser
Copyright (C) 2016-2018 Sono (https://github.com/MarcuzD)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
@SonoSooS
SonoSooS / unrestrict.c
Created August 2, 2017 15:07
Unrestrict - parental control remover for Nintendo 3DS
#include <3ds.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void __system_allocateHeaps(void)
{
extern char* fake_heap_start;
extern char* fake_heap_end;
@SonoSooS
SonoSooS / main.c
Created February 24, 2017 08:35
LCD Tweaker
#include <3ds.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
//#include "testimage_bin.h"
void PrettyScroll(char* txt, u32 val)
{
@SonoSooS
SonoSooS / mkelf.sh
Created February 22, 2017 21:42
.cia -> .elf
#!/bin/bash
set -e
FN="$(basename "$1" .cia)_tmp"
rm -rf "$FN"
mkdir "$FN"
ctrtool --contents="$FN/contents" "$1" >/dev/null
ctrtool --exefsdir="$FN/exefs" --decompresscode "$FN/contents.0000.00000000" >/dev/null
ASD="$(ctrtool "$FN/contents.0000.00000000" | grep Code)"
@SonoSooS
SonoSooS / BriSet.c
Created February 22, 2017 00:21
Screen brightness setter for 3DS
#include <3ds.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
gfxInit(GSP_RGBA8_OES, GSP_RGBA8_OES, false);
@SonoSooS
SonoSooS / fstlist.lua
Created December 22, 2016 09:53
FST parser Lua script
#!/bin/lua
-- ===================================
-- FST parser Lua script
--
-- created by MarcusD
-- Copyright $(date +"%Y")
--
-- :P
-- ===================================