Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


ldr.ld

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ENTRY(_start)

SECTIONS
{
	. = 0x25800;
	.text :
	{
		*(.text)
	}
	.data :
	{
		*(.data)
		*(.rodata)
	}
	.bss :
	{
		bss = .;
		*(.bss)
	}
}

types.h

1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef _TYPES_H_
#define _TYPES_H_

typedef char s8;
typedef unsigned char u8;
typedef short s16;
typedef unsigned short u16;
typedef int s32;
typedef unsigned int u32;
typedef long long int s64;
typedef unsigned long long int u64;

#endif

start.S

1
2
3
4
5
6
7
8
9
10
11
12
13
.text

/* Loader entry. */
.global _start
_start:
	/* Setup stack pointer. */
	ila sp, 0x3DFA0
	
	/* Well... */
	brsl lr, main

	_hang:
		br _hang

main.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "types.h"

void *_memcpy(void *dst, void *src, u32 len);

void main()
{
	//Copy eid root key/iv to shared LS.
	_memcpy((u8 *)0x3E000, (u8 *)0x00000, 0x30);
	//Hang (the PPU should copy the key/iv from shared LS now).
	while(1);
}

void *_memcpy(void *dst, void *src, u32 len)
{
	u8 *d = (u8 *)dst;
	u8 *s = (u8 *)src;
	u32 i;
	
	for(i = 0; i < len; i++)
		d[i] = s[i];
	
	return dst;
}