Skip to content

Instantly share code, notes, and snippets.

View Wolfvak's full-sized avatar

Wolfvak

View GitHub Profile
REGISTERS:
IO:10009160 ; unsigned __int16 REG_SIF_UNK00
IO:10009160 REG_SIF_UNK00 % 2 ; DATA XREF: sub_24075C08+4↓o
IO:10009160 ; sub_24075C08+104↓r ...
IO:10009162 ; unsigned __int16 REG_SIF_OUTPUT_ENABLE_maybe
IO:10009162 REG_SIF_OUTPUT_ENABLE_maybe % 2 ; DATA XREF: SDRAM:2400064C↓o
IO:10009162 ; SDRAM:24000654↓w ...
IO:10009164 ; unsigned __int8 REG_SIF_OUTPUT
IO:10009164 REG_SIF_OUTPUT % 2 ; DATA XREF: sub_24075C08+130↓r
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
static const char *reg_name(unsigned reg);
static uint32_t cmd_paramask_to_sane_mask(unsigned mask) {
uint32_t ret = 0;
@Wolfvak
Wolfvak / bpm.txt
Created December 24, 2019 20:31
BPM almost-documentation, scavenged off beat v03's source code
signature "BPM1"
number metadata_len
string metadata
actions {
// create directory with name `target_name`
action 0: CreatePath | ((name_len - 1) << 2) {
byte[] target_name
}
@Wolfvak
Wolfvak / beat.c
Last active December 27, 2019 03:37
simple and (hopefully) not too broken BPS patcher
/**
compile with gcc beat.c -o beat
run as ./beat patch.bps input.bin output.bin
*/
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>

Keybase proof

I hereby claim:

  • I am wolfvak on github.
  • I am wolfvak (https://keybase.io/wolfvak) on keybase.
  • I have a public key ASAJv__7H0Ae97MFtHoAXccY2yPaVoYHtVY7CrAu9Tuaswo

To claim this, I am signing this object:

@Wolfvak
Wolfvak / changes.txt
Created June 3, 2019 01:12
GM9 + better_arm11 overview
new features:
- added touchscreen and circlepad support: cpad behaves the same as the dpad and the touchscreen is used by the swkbd
- turns off the LCD whenever the shell is closed (and turns it on when the shell is opened)
- starts flashing the notification LED whenever it expects input and the shell is closed
- touchscreen calibration is performed automagically with the data provided by the user on initial 3DS boot
- added a software keyboard for text input
performance optimizations:
- basically a complete rewrite of the ARM11 binary used, now it performs a ton of tasks in the background, giving more CPU time for the ARM9
- HID latencies have been removed from the ARM9 (faster response)
@Wolfvak
Wolfvak / makebax_bench.txt
Created March 8, 2018 22:30
makebax benchmarks on amd64, ARM64 and ARMv7
"real" = wall clock elapsed time
"user" = CPU time taken
"sys" = kernel time (IO, thread management)
amd64 platforms
---------------
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
#include <unistd.h>
const char *pagetype[] = {
"INVALID", "COARSE PAGE", "SECTION", "FINE PAGE"
};
const char *cachetype[] = {
"NONCACHED NONBUFFERED", "NONCACHED BUFFERED",