Minor stuff
This commit is contained in:
parent
6845e42f2c
commit
6ed8741006
@ -24,7 +24,7 @@ ASFLAGS := -mcpu=arm946e-s
|
|||||||
CFLAGS := -Wall -Wextra -MMD -MP -marm $(ASFLAGS) -fno-builtin -fshort-wchar -std=c11 -Wno-main -O2 -flto -ffast-math
|
CFLAGS := -Wall -Wextra -MMD -MP -marm $(ASFLAGS) -fno-builtin -fshort-wchar -std=c11 -Wno-main -O2 -flto -ffast-math
|
||||||
LDFLAGS := -nostartfiles
|
LDFLAGS := -nostartfiles
|
||||||
FLAGS := name=$(name).dat dir_out=$(abspath $(dir_out)) ICON=$(abspath icon.png) APP_DESCRIPTION="Noob-friendly 3DS CFW." APP_AUTHOR="Aurora Wright/TuxSH" --no-print-directory
|
FLAGS := name=$(name).dat dir_out=$(abspath $(dir_out)) ICON=$(abspath icon.png) APP_DESCRIPTION="Noob-friendly 3DS CFW." APP_AUTHOR="Aurora Wright/TuxSH" --no-print-directory
|
||||||
ROP_FLAGS := DATNAME=$(name).dat DISPNAME=$(name).dat GRAPHICS=../data/
|
ROP_FLAGS := DATNAME=$(name).dat DISPNAME=$(name)
|
||||||
|
|
||||||
objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \
|
objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \
|
||||||
$(patsubst $(dir_source)/%.c, $(dir_build)/%.o, \
|
$(patsubst $(dir_source)/%.c, $(dir_build)/%.o, \
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
-W3
|
|
||||||
# disable alpha and set opaque bit for all pixels
|
|
||||||
-gT!
|
|
||||||
|
|
||||||
# use lz77 compression
|
|
||||||
-gzl
|
|
||||||
|
|
||||||
# 16 bit bitmap
|
|
||||||
-gB16
|
|
||||||
|
|
||||||
-gb
|
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* This pathFile is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016 Aurora Wright, TuxSH
|
* Copyright (C) 2016 Aurora Wright, TuxSH
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@ -15,7 +15,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* Additional Terms 7.b of GPLv3 applies to this pathFile: Requiring preservation of specified
|
* Additional Terms 7.b of GPLv3 applies to this file: Requiring preservation of specified
|
||||||
* reasonable legal notices or author attributions in that material or in the Appropriate Legal
|
* reasonable legal notices or author attributions in that material or in the Appropriate Legal
|
||||||
* Notices displayed by works containing it.
|
* Notices displayed by works containing it.
|
||||||
*/
|
*/
|
||||||
@ -32,13 +32,9 @@ void main()
|
|||||||
{
|
{
|
||||||
if(f_mount(&fs, "0:", 0) == FR_OK)
|
if(f_mount(&fs, "0:", 0) == FR_OK)
|
||||||
{
|
{
|
||||||
u32 *loaderAddress = (u32 *)0x24FFFF00;
|
|
||||||
u8 *payloadAddress = (u8 *)0x24F00000;
|
|
||||||
FIL pathFile,
|
FIL pathFile,
|
||||||
payload;
|
payload;
|
||||||
bool useDefault = true;
|
bool foundPayload = false;
|
||||||
|
|
||||||
memcpy(loaderAddress, loader_bin, loader_bin_size);
|
|
||||||
|
|
||||||
if(f_open(&pathFile, "/luma/path.txt", FA_READ) == FR_OK)
|
if(f_open(&pathFile, "/luma/path.txt", FA_READ) == FR_OK)
|
||||||
{
|
{
|
||||||
@ -55,22 +51,27 @@ void main()
|
|||||||
if(pathSize > 5 && pathSize < 38 && path[0] == '/' && memcmp(&path[pathSize - 4], ".bin", 4) == 0)
|
if(pathSize > 5 && pathSize < 38 && path[0] == '/' && memcmp(&path[pathSize - 4], ".bin", 4) == 0)
|
||||||
{
|
{
|
||||||
path[pathSize] = 0;
|
path[pathSize] = 0;
|
||||||
useDefault = f_open(&payload, path, FA_READ) == FR_OK;
|
foundPayload = f_open(&payload, path, FA_READ) == FR_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
f_close(&pathFile);
|
f_close(&pathFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!useDefault) f_open(&payload, "arm9loaderhax.bin", FA_READ);
|
if(!foundPayload) foundPayload = f_open(&payload, "arm9loaderhax.bin", FA_READ);
|
||||||
|
|
||||||
|
if(foundPayload)
|
||||||
|
{
|
||||||
|
u32 *loaderAddress = (u32 *)0x24FFFF00;
|
||||||
|
void *payloadAddress = (void *)0x24F00000;
|
||||||
u32 payloadSize = f_size(&payload);
|
u32 payloadSize = f_size(&payload);
|
||||||
|
|
||||||
if(payloadSize > 0)
|
memcpy(loaderAddress, loader_bin, loader_bin_size);
|
||||||
{
|
loaderAddress[1] = payloadSize;
|
||||||
|
|
||||||
unsigned int read;
|
unsigned int read;
|
||||||
f_read(&payload, payloadAddress, payloadSize, &read);
|
f_read(&payload, payloadAddress, payloadSize, &read);
|
||||||
loaderAddress[1] = payloadSize;
|
f_close(&payload);
|
||||||
|
|
||||||
flushDCacheRange(loaderAddress, loader_bin_size);
|
flushDCacheRange(loaderAddress, loader_bin_size);
|
||||||
flushICacheRange(loaderAddress, loader_bin_size);
|
flushICacheRange(loaderAddress, loader_bin_size);
|
||||||
|
Reference in New Issue
Block a user