Skip to content

Instantly share code, notes, and snippets.

View profi200's full-sized avatar

profi200

View GitHub Profile
3dshaxclient.exe --serveradr=192.168.1.87 "--customcmd=installcia:1,0 blah.cia" // Install a title. "installcia:[mediaType],[title db to be used. 0 standard, 1 dlp] filePath"
3dshaxclient.exe --serveradr=192.168.1.87 "--customcmd=deletetitle:1,0 0x000400000ff3ff00" // Delete a title. "deletetitle:[mediaType],[1 for deleting system titles] titleID"
3dshaxclient.exe --serveradr=192.168.1.87 "--customcmd=readctrcard game.3ds" // Dump 3DS gamecard. "readctrcard [out file path]"
3dshaxclient.exe --serveradr=192.168.1.87 "--customcmd=readmem:9 0x268ae1a4 0x60" // Read mem. "readmem:[9, 11kern, 11usr=procName] address size [@filePath]"
3dshaxclient.exe --serveradr=192.168.1.87 "--customcmd=writemem:9 0x20000004 0x4 0xbadc0ded" // Write mem. "writemem:[9, 11kern, 11usr=procName] address size [data, @filePath]"
3ds
@profi200
profi200 / getFbAdr.bat
Created January 10, 2017 15:54
Screenshots with 3dshaxclient on fw 9.2 old 3DS
@echo off
Setlocal
Pushd "%~dp0"
if %1 == 1 3dshaxclient --serveradr=192.168.1.16 "--customcmd=readmem:11kern 0xFFFC0468 0x4" | grep -o 0x[0-f]*
if %1 == 2 3dshaxclient --serveradr=192.168.1.16 "--customcmd=readmem:11kern 0xFFFC046C 0x4" | grep -o 0x[0-f]*
if %2 == 1 3dshaxclient --serveradr=192.168.1.16 "--customcmd=readmem:11kern 0xFFFC0568 0x4" | grep -o 0x[0-f]*
if %2 == 2 3dshaxclient --serveradr=192.168.1.16 "--customcmd=readmem:11kern 0xFFFC056C 0x4" | grep -o 0x[0-f]*
/*
* Action Replay DSi flash tool.
* Copyright (C) 2017 derrek, profi200
*
* 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 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
// extern Handle dspHandle;
/*
* filter values:
*
* 0 = filterHP32
* 1 = filterHP47
* 2 = filterSP32
* 3 = filterSP47
*/
@profi200
profi200 / crypto.c
Created April 13, 2020 15:30
Some crypto measurements for Corgi3DS.
void setupStuff(bool sha, u32 aesMode)
{
if(!sha)
{
REG_AESCNT = (AES_INPUT_BIG | AES_INPUT_NORMAL)<<23;
static const u32 whatever[4] = {0x12345678, 0x87654321, 0x12345678, 0x87654321};
for(u32 i = 0; i < 4; i++) REG_AESCTR[i] = whatever[i];
REG_NDMA3_SRC_ADDR = 0;
REG_NDMA3_DST_ADDR = REG_AESWRFIFO;
[TEXUNIT_CONFIG] = 00011000, MASK = FFFF00FF
[TEXUNIT0_BORDER_COLOR] = 00000000
[TEXUNIT0_DIM] = 00000000
[TEXUNIT0_PARAM] = 00000000
[TEXUNIT0_LOD] = 00000000
[TEXUNIT0_ADDR1] = 00000000
[TEXUNIT0_ADDR2] = 00000000
[TEXUNIT0_ADDR3] = 00000000
[TEXUNIT0_ADDR4] = 00000000
[TEXUNIT0_ADDR5] = 00000000
@profi200
profi200 / vblank_test.s
Created April 26, 2020 12:04
VBlank time test for citra
#include "asmfunc.h"
.arm
.cpu mpcore
.fpu vfpv2
@ u32 vblankTest(void)
ASM_FUNC vblankTest
@profi200
profi200 / texcopy.c
Created April 26, 2020 14:46
Texture copy measurements originally done for Corgi3DS
static u32 counter = 1;
stopProfiling();
GFX_deinit(false);
TIMER_sleepMs(1000);
*((vu32*)0x10140140) = 0; // REG_CFG11_GPUPROT
*((vu32*)0x10141200) = 0x1007F; // REG_CFG11_GPU_CNT
IRQ_registerHandler(IRQ_PPF, 14, 0, true, NULL);
__cpsid(i);
static void *const dsts[4] = {(void*)VRAM_BASE, (void*)0x1F000000, (void*)DSP_MEM_BASE, (void*)FCRAM_BASE};
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <3ds.h>
#include <citro3d.h>
#include <string.h>
#include "vshader_shbin.h"
@profi200
profi200 / gbaEepromSaveFix.c
Last active March 30, 2023 20:23
A tool to fix wrong byte order GBA EEPROM saves as created by some emulators.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// Compile with "gcc -std=c17 -O2 -fstrict-aliasing -ffunction-sections -Wall -Wl,--gc-sections gbaEepromSaveFix.c -o gbaEepromSaveFix"
int main(int argc, char *argv[])
{
int res = 0;