Skip to content

Commit

Permalink
2.10 for Luma3DS 9.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanquitas committed Dec 20, 2017
1 parent 1ccfe6e commit d4740a1
Show file tree
Hide file tree
Showing 16 changed files with 872 additions and 863 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LIBRARY_DIRS := $(PORTLIBS) $(CTRULIB)
LIBRARIES := citro3d ctru png z m

VERSION_MAJOR := 2
VERSION_MINOR := 9
VERSION_MINOR := 10
VERSION_MICRO := 0


Expand Down
32 changes: 16 additions & 16 deletions source/Credits.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#ifndef CREDITS_H
#define CREDITS_H

static const int creditsCount = 15;
static const int creditsCount = 15;
static const char * credits[] =
{
"AstronautLevel",
"AuroraWright",
"b1l1s",
"Cell9",
"d3m3vilurr",
"enler",
"fincs",
"Flat",
"FONZD",
"lucaboy",
"Nanquitas",
"PabloMK7",
"Steveice10",
"TuxSH",
"xerpi"
"AstronautLevel",
"AuroraWright",
"b1l1s",
"Cell9",
"d3m3vilurr",
"enler",
"fincs",
"Flat",
"FONZD",
"lucaboy",
"Nanquitas",
"PabloMK7",
"Steveice10",
"TuxSH",
"xerpi"
};

#endif
96 changes: 48 additions & 48 deletions source/common_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,73 +5,73 @@ extern char *g_primary_error;
extern char *g_secondary_error;
extern bool g_exit;

bool abort_and_exit(void)
bool abort_and_exit(void)
{
hidScanInput();
if ((hidKeysDown() | hidKeysHeld() | hidKeysUp()) & KEY_B)
{
g_exit = true;
g_primary_error = USER_ABORT;
hidScanInput();
if ((hidKeysDown() | hidKeysHeld() | hidKeysUp()) & KEY_B)
{
g_exit = true;
g_primary_error = USER_ABORT;
newAppStatus(DEFAULT_COLOR, CENTER | SKINNY | SMALL, "Loading aborted");
while (1)
{
hidScanInput();
if ((hidKeysDown() | hidKeysUp() | hidKeysHeld()) == 0)
break;
}
return (true);
}
return (false);
while (1)
{
hidScanInput();
if ((hidKeysDown() | hidKeysUp() | hidKeysHeld()) == 0)
break;
}
return (true);
}
return (false);
}

u32 getCurrentProcessHandle(void)
u32 getCurrentProcessHandle(void)
{
u32 handle = 0;
u32 ret;
u32 hCurrentProcess;
u32 currentPid;

svc_getProcessId(&currentPid, 0xffff8001);
ret = svc_openProcess(&handle, currentPid);
if (ret != 0)
return (0);
hCurrentProcess = handle;
return (hCurrentProcess);
u32 handle = 0;
u32 ret;
u32 hCurrentProcess;
u32 currentPid;

svc_getProcessId(&currentPid, 0xffff8001);
ret = svc_openProcess(&handle, currentPid);
if (ret != 0)
return (0);
hCurrentProcess = handle;
return (hCurrentProcess);
}

void flushDataCache(void)
void flushDataCache(void)
{
u32 *ptr = (u32 *)tmpBuffer;
u32 i;
u32 *ptr = (u32 *)tmpBuffer;
u32 i;

for (i = 0; i < (0x20000 / 4); i++)
{
ptr[i] += 0x11111111;
}
for (i = 0; i < (0x20000 / 4); i++)
{
ptr[i] += 0x11111111;
}
}

void doFlushCache(void)
void doFlushCache(void)
{
FlushAllCache();
InvalidateEntireInstructionCache();
InvalidateEntireDataCache();
flushDataCache();
FlushAllCache();
InvalidateEntireInstructionCache();
InvalidateEntireDataCache();
FlushAllCache();
InvalidateEntireInstructionCache();
InvalidateEntireDataCache();
flushDataCache();
FlushAllCache();
InvalidateEntireInstructionCache();
InvalidateEntireDataCache();
}

void doStallCpu(void)
{
vu32 i;
for (i = 0; i < 0x00100000; i++)
{
}
vu32 i;
for (i = 0; i < 0x00100000; i++)
{
}
}

void doWait(void)
void doWait(void)
{
svcSleepThread(500000000);
svcSleepThread(500000000);
}

void strJoin(char *dst, const char *s1, const char *s2)
Expand Down
Loading

0 comments on commit d4740a1

Please sign in to comment.