Homebrew ARM10 Kernel Under 10.1.x

Status
Not open for further replies.

BootyBoopersRippers

Banned!
OP
Banned
Joined
Oct 6, 2015
Messages
19
Trophies
0
Age
32
XP
3
Country
United States
unsigned char handle[32];
unsigned char bmpHead[] = {
0x42, 0x4D, 0x36, 0x65, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xF0, 0x00,
0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

void memdump(wchar_t* filename, unsigned char* buf, unsigned int size){
unsigned int br = 0;
memset(&handle, 0, 32);
fopen9(&handle, filename, 6);
fwrite9(&handle, &br, buf, size);
fclose9(&handle);
for(int i = 0; i < 0x46500; i++) *(VRAM+0x1E6000 + i) = 0xFF;
}

void transpose (void * dst, const void * src, unsigned dim1, unsigned dim2, unsigned item_length) {
char * ptr_write;
const char * ptr_read;
unsigned x, y, z;
for (x = 0; x < dim1; x ++) for (y = 0; y < dim2; y ++) {
ptr_write = ((char *) dst) + item_length * (y * dim1 + x);
ptr_read = ((const char *) src) + item_length * (x * dim2 + y);
for (z = 0; z < item_length; z ++) *(ptr_write ++) = *(ptr_read ++);
}
}

void screenShot(int frame){
unsigned int br;
short width = frame == 0 ? 400 : 320;
short height = 240;
int frameOff = frame == 0 ? 0x300000 : 0; //0x1E6000 : 0x48F000; //<- Defaults
int length = frame == 0 ? 0x46500 : 0x38400;

memset(&handle, 0, 32);
fopen9(&handle, frame == 0 ? L"sdmc:/screen_top.bmp" : L"sdmc:/screen_bot.bmp", 6);
transpose(FCRAM+0xF80000, VRAM+frameOff, width, height, 3);
bmpHead[18] = frame == 0 ? 0x90 : 0x40;
fwrite9(&handle, &br, bmpHead, 0x36);
fwrite9(&handle, &br, FCRAM+0xF80000, length);
fclose9(&handle);
for(int i = 0; i < length; i++) *(VRAM+frameOff + i) = 0xFF;
}

void myThread(){
while(1){
if(getHID() & BUTTON_SELECT){
screenShot(TOP_FRAME);
screenShot(BOT_FRAME);
}
if(getHID() & BUTTON_START) memdump(L"sdmc:/VRAM.bin", VRAM, 0x00600000);
}
__asm("SVC 0x09");
}

Feel free to ask questions.
Enjoy.
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,005
Trophies
2
XP
7,288
Country
United States
There is no such thing as an ARM10 processor, let alone the 3DS having one. If there is one, I'd like to see.
 
Status
Not open for further replies.
General chit-chat
Help Users
  • Skelletonike @ Skelletonike:
    It's great <3
  • AncientBoi @ AncientBoi:
    LoL. No. good bye
  • Skelletonike @ Skelletonike:
    Fried tripas and fries <3
  • K3N1 @ K3N1:
    My power just randomly went out and it's not even raining out lol
  • H @ hecker_isaac:
    morning peeps
  • coolax @ coolax:
    hey guys anyone can help me for LOZ : TOTK ? im trying to install theses 60fps file but I don't understand where i'm suppose to paste them. ? anyone kno ?
  • K3N1 @ K3N1:
    Your mom's spaghetti
  • Psionic Roshambo @ Psionic Roshambo:
    Her armpits sweaty already
  • K3N1 @ K3N1:
    On the surface
  • Psionic Roshambo @ Psionic Roshambo:
    Flies crawling and pizza stained already
  • K3N1 @ K3N1:
    My noodle has vomit on it already
  • Psionic Roshambo @ Psionic Roshambo:
    Monica's dress stained already
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, Bill Clinton no!
    +1
  • SylverReZ @ SylverReZ:
    Lmao
    +1
  • Sonic Angel Knight @ Sonic Angel Knight:
    Mama Mia spaghetti :P
    +1
  • DJPlace @ DJPlace:
    don't forget the meatballs
    +1
  • Sonic Angel Knight @ Sonic Angel Knight:
    Mama mia wouldn't forget meatballs in her spaghetti. :P
  • Sonic Angel Knight @ Sonic Angel Knight:
    Speaking of meatballs, what's the deal with meatball sandwich? How can people eat those? It's ROUND. Trying to bite those in a sandwich is a challenge. It's easier to eat a burger stacked with toppings. :ninja:
  • idcwhat3v3r @ idcwhat3v3r:
    here's my cup of care
  • idcwhat3v3r @ idcwhat3v3r:
    oh look, IT'S FUCKING EMPTY.
  • K3N1 @ K3N1:
    Seems familiar
  • Psionic Roshambo @ Psionic Roshambo:
    Spaghetti noodles are straight until you get them hot and wet too lol
    Psionic Roshambo @ Psionic Roshambo: Spaghetti noodles are straight until you get them hot and wet too lol