Skip to content

Instantly share code, notes, and snippets.

View jaames's full-sized avatar
🐳
~

James jaames

🐳
~
  • UK, '97
  • 23:56 (UTC +01:00)
View GitHub Profile
@jaames
jaames / gamenote.py
Last active January 25, 2021 03:02
basic decoding for 3ds game note files
import numpy as np
from PIL import Image
from sys import argv
# format structure:
# header
# 4 bytes seem to be a checksum of some kind? they're definitely not a timestamp
# 8 bytes are some kind of magic/ident? (10RC1000 for me)
# 4 bytes padding ?
@jaames
jaames / rkgParser.php
Created September 23, 2016 14:10
PHP parser for Mario Kart Wii rkg files (ghost trial data)
<?php
// ====== Mario Kart RKG (ghost trial data) Parser ======
//
// Based on the documentation found here:
// http://wiki.tockdom.com/wiki/RKG
//
// Written by James Daniel
// github.com/jaames | rakujira.jp
@jaames
jaames / miiParser.php
Created December 12, 2016 15:48
PHP class for parsing Mii data from the Nintendo Wii
<?php
// ====== Mii Data Parser ======
//
// Based on the documentation found here:
// http://wiibrew.org/wiki/Mii_Data#Mii_format
//
// Written by James Daniel
// github.com/jaames | rakujira.jp
// ====== Usage ======
//
@jaames
jaames / dsi_browser_crash.html
Last active February 26, 2021 09:29
POC code that crashes the Nintendo DSi Browser on load (see https://rakujira.jp/dsi/crash.htm)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=256">
</head>
<body>
<div id="readout"></div>
<script type="text/javascript">
var readout = document.getElementById("readout");
@jaames
jaames / pegaswitch.html
Last active December 18, 2018 20:20
Original landing page for the PegaSwitch exploit by ReSwitched team (built in one evening :P)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PegaSwitch</title>
<meta name="description" content="PegaSwitch -- an exploit toolkit for the Nintendo Switch">
<meta name="twitter:card" content="summary">
<meta property="og:site_name" content="PegaSwitch">
@jaames
jaames / lst.py
Last active April 27, 2023 20:21
convert Flipnote Studio .lst and .pls files to and from .txt
from sys import argv
import hashlib
import numpy as np
xorkey = [
0xF7, 0x4C, 0x6A, 0x3A, 0xFB, 0x82, 0xA6, 0x37,
0x6E, 0x11, 0x38, 0xCF, 0xA0, 0xDD, 0x85, 0xC0,
0xC7, 0x9B, 0xC4, 0xD8, 0xDD, 0x28, 0x8A, 0x87,
0x53, 0x20, 0xEE, 0xE0, 0x0B, 0xEB, 0x43, 0xA0,
0xDB, 0x55, 0x0F, 0x75, 0x36, 0x37, 0xEB, 0x35,
@jaames
jaames / sudoplayer.html
Created May 5, 2017 17:31
sudomemo video player component, for Svelte (https://svelte.technology/guide)
<div class="player">
<div class="player__stage" ref:player on:click="togglePlay()">
<video
class="player__video"
src="{{src}}"
loop="{{meta.loop}}"
ref:video
on:play="_video_play()"
on:pause="_video_pause()"
on:timeupdate="_video_timeupdate()"
@jaames
jaames / adpcm.js
Last active October 20, 2023 19:17
javascript implementation of converting 4-bit adpcm audio to float32 pcm
// ADPCM decoder implementation based on https://github.com/jwzhangjie/Adpcm_Pcm/blob/master/adpcm.c
const indexTable = [
-1, -1, -1, -1, 2, 4, 6, 8,
-1, -1, -1, -1, 2, 4, 6, 8
];
const stepSizeTable = [
7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
@jaames
jaames / commentImage.py
Created February 17, 2018 17:07
flipnote studio comment ppm (assumes one frame, single layer, black pen) -> image
#!/usr/bin/python
# Comment PPM -> NPF or Image script for Sudomemo
# github.com/Sudomemo | www.sudomemo.net
#
# Written by James Daniel
# github.com/jaames | rakujira.jp
#
# Command Line Args:
@jaames
jaames / dsi_shop_kong_api.md
Last active January 5, 2024 14:38
Nintendo DSI Shop reverse-engineering notes

ECommerceInterface

This API provides access to information and features related to ecommerce. Such as providing a list of installed titles, etc

Setup

First it's necessary to create an instance of the ECommerceInterface class, the instance is used to interact with the API.

Nintendo create a single instance and store it globally as ec: