Skip to content

Instantly share code, notes, and snippets.

View profi200's full-sized avatar

profi200

View GitHub Profile
text:FFFFB088 @ FirmBlacklist firmSectionBlacklist[8]
text:FFFFB088 firmSectionBlacklist:FirmBlacklist <0x7FFB800, 0x7FFFC00>
text:FFFFB088 @ DATA XREF: verifyFirmSections+A↑o
text:FFFFB088 @ text:off_FFFFA4A0↑o ...
text:FFFFB088 FirmBlacklist <0xFFF00000, 0xFFF03000>
text:FFFFB088 FirmBlacklist <0xFFF03000, 0xFFF04000>
text:FFFFB088 FirmBlacklist <0x80F8000, 0x8100000>
text:FFFFB088 FirmBlacklist <0x8000000, 0x8000040>
text:FFFFB088 FirmBlacklist <0x20000000, 0x28000000>
text:FFFFB088 FirmBlacklist <0xFFF00000, 0x20000000>
"BRXJB2" 2899 - Vattroller X - Taikenban (Japan) (Demo) (Kiosk, GameCube)
"BMVE01" 2898 - Mario Pinball Land (USA) (Kiosk, GameCube)
"!none" 2900 - Commandos 2 (Japan) (Proto)
"!none" x325 - Metal Slug - Super Vehicle-001 (Japan) (En) (Proto)
"MRDK01" x114 - Mario vs. Donkey Kong (USA) (Demo) (Kiosk, GameCube)
"AZWJ01" 2901 - Made in Wario (Japan) (Demo) (Kiosk, GameCube)
"!none" x326 - Metal Slug Advance (Japan) (Beta)
1, 2 and 5, 6 have their maker code mistakenly included in the game code ("serial").
@profi200
profi200 / ssp.c
Last active October 28, 2020 16:24
devkitARM bare metal stack protector
#include "types.h"
#include "arm11/debug.h"
// Needs to be marked as used to work with LTO.
// The used attribute also overrides the newlib symbol.
// This is for debugging purposes only. For security this value needs to be random!
__attribute__((used)) uintptr_t __stack_chk_guard = 0x2D9B1A0E;
//#include "types.h"
#include <stdio.h>
#include <inttypes.h>
#include "pico/stdlib.h"
#include "hardware/gpio.h"
#include "hardware/spi.h"
#include "pico/bootrom.h"
#define LED_PIN (25u)
...
int main(void) // send test
{
irqInit();
irqEnable(IRQ_VBLANK);
consoleDemoInit();
REG_KEYCNT = 0;
iprintf("reg align 16 test value: %X\n", 0xCAFE);
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Compile with "gcc -std=c17 -O2 -fstrict-aliasing -ffunction-sections -Wall -Wl,--gc-sections codecCoeffConvert.c -o codecCoeffConvert -lm"
int main(int argc, char *argv[])
#include <inttypes.h>
#include <gba_console.h>
#include <gba_video.h>
#include <gba_interrupt.h>
#include <gba_systemcalls.h>
#include <gba_input.h>
#include <gba_sound.h>
#include <gba_timers.h>
#include <stdio.h>
#include <stdlib.h>
@ u32 pcTest(void)
@ Expected result is pc + 8 but it's pc + 10 on ARM7.
BEGIN_ASM_FUNC pcTest
ldr pc, =pcTest_mov + 2
pcTest_mov:
mov r0, pc
bx lr
END_ASM_FUNC
3 MiB:
vector: 15926306
struct: 16319471
1 KiB:
vector: 5597
struct: 5758
128 bytes:
vector: 1057/1085
@profi200
profi200 / main.c
Created July 4, 2022 15:46
ips_artifact_fixer
#include <stdio.h>
#include <3ds.h>
#define REVERSE_INTERVAL (60u * 15)
static void setLcdFill(const u32 val)
{