uncart/source/gamecart/command_ntr.c
2015-05-12 11:15:16 +12:00

28 lines
761 B
C

// Copyright 2014 Normmatt
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "command_ntr.h"
#include "protocol_ntr.h"
void NTR_CmdReset()
{
static const u32 reset_cmd[2] = { 0x9F000000, 0x00000000 };
NTR_SendCommand(reset_cmd, 0x2000, NTRCARD_CLK_SLOW | NTRCARD_DELAY1(0x1FFF) | NTRCARD_DELAY2(0x18), NULL);
}
int NTR_CmdGetCartId()
{
int id;
static const u32 getid_cmd[2] = { 0x90000000, 0x00000000 };
NTR_SendCommand(getid_cmd, 0x4, NTRCARD_CLK_SLOW | NTRCARD_DELAY1(0x1FFF) | NTRCARD_DELAY2(0x18), &id);
return id;
}
void NTR_CmdEnter16ByteMode()
{
static const u32 enter16bytemode_cmd[2] = { 0x3E000000, 0x00000000 };
NTR_SendCommand(enter16bytemode_cmd, 0x0, 0, NULL);
}