Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89cc6ede1a | ||
|
|
dd6e071dde | ||
|
|
2127271b33 | ||
|
|
1600171ffa | ||
|
|
7f7a9fab2d | ||
|
|
b15d86f31d | ||
|
|
89a3dc8643 | ||
|
|
3477beb05c | ||
|
|
8447c209a7 | ||
|
|
e78f706c1a | ||
|
|
f776c56cd4 | ||
|
|
dc195dffad | ||
|
|
a2177c0510 | ||
|
|
356a94cc2e | ||
|
|
9d507e046c | ||
|
|
47c47f967a | ||
|
|
1182d3a627 | ||
|
|
938cb6492f | ||
|
|
fed62855cb | ||
|
|
4f54596658 | ||
|
|
0b41ed04d5 | ||
|
|
9509a86998 | ||
|
|
6d4d80a798 | ||
|
|
76d274cfe2 | ||
|
|
ccf13be964 | ||
|
|
e36b27ccf0 | ||
|
|
34c80ad476 | ||
|
|
97ae106d8e | ||
|
|
7cb74b74d7 | ||
|
|
337205eb08 | ||
|
|
f36977017b | ||
|
|
e40b547bb6 | ||
|
|
1fd689f5da | ||
|
|
c5c8dca14c | ||
|
|
11f820efa7 | ||
|
|
9074688491 | ||
|
|
1de27c54f1 | ||
|
|
3e67e64faa | ||
|
|
553f8d2533 | ||
|
|
ec7ae35da1 | ||
|
|
7e8da0d236 | ||
|
|
b3e6561072 | ||
|
|
41f32ed983 | ||
|
|
bbadf840ef | ||
|
|
acc50aae46 | ||
|
|
6a68a77973 | ||
|
|
0f4d66dd61 | ||
|
|
d28642d2c3 | ||
|
|
ca4685cc42 | ||
|
|
522f10582d | ||
|
|
239d113177 | ||
|
|
fd80294bf2 | ||
|
|
b379d83469 | ||
|
|
27f352fdf1 | ||
|
|
bfec874a7c | ||
|
|
93561003e8 | ||
|
|
1572bfd989 | ||
|
|
cb945612a3 | ||
|
|
1b440f7f3b | ||
|
|
78791f7b66 | ||
|
|
5def0c18e2 | ||
|
|
0e67b0f026 | ||
|
|
8052946517 | ||
|
|
b6d6cc9750 |
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -6,7 +6,7 @@
|
|||||||
--
|
--
|
||||||
-- Also check the Wiki (https://github.com/AuroraWright/Luma3DS/wiki) before making an issue.
|
-- Also check the Wiki (https://github.com/AuroraWright/Luma3DS/wiki) before making an issue.
|
||||||
--
|
--
|
||||||
-- For GBA/DSiWare/DS/AGB_FIRM/TWL_FIRM problems: https://3ds.guide/troubleshooting
|
-- For GBA/DSiWare/DS/AGB_FIRM/TWL_FIRM problems: https://3ds.hacks.guide/troubleshooting
|
||||||
-- If you're using an emu/redNAND try installing anything on it to sysNAND.
|
-- If you're using an emu/redNAND try installing anything on it to sysNAND.
|
||||||
-- Please make sure to read "Enable game patching" https://github.com/AuroraWright/Luma3DS/wiki/Options-and-usage before posting any issues about the "Enable game patching" option(s).
|
-- Please make sure to read "Enable game patching" https://github.com/AuroraWright/Luma3DS/wiki/Options-and-usage before posting any issues about the "Enable game patching" option(s).
|
||||||
--
|
--
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -14,3 +14,7 @@ exceptions/arm11/build
|
|||||||
*.elf
|
*.elf
|
||||||
*.cxi
|
*.cxi
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.dmp
|
||||||
|
.project
|
||||||
|
.cproject
|
||||||
|
.settings
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
**Luma3DS** is a program to patch the system software of (New) Nintendo 3DS handheld consoles "on the fly", adding features (such as per-game language settings and debugging capabilities for developers) and removing restrictions enforced by Nintendo (such as the region lock).
|
**Luma3DS** is a program to patch the system software of (New) Nintendo 3DS handheld consoles "on the fly", adding features (such as per-game language settings and debugging capabilities for developers) and removing restrictions enforced by Nintendo (such as the region lock).
|
||||||
It also allows you to run unauthorized ("homebrew") content by removing signature checks.
|
It also allows you to run unauthorized ("homebrew") content by removing signature checks.
|
||||||
To use it, you will need a console capable of running homebrew software on the ARM9 processor. We recommend [Plailect's guide](https://3ds.guide/) for details on how to get your system ready.
|
To use it, you will need a console capable of running homebrew software on the ARM9 processor. We recommend [Plailect's guide](https://3ds.hacks.guide/) for details on how to get your system ready.
|
||||||
|
|
||||||
Since Luma3DS v8.0, Luma3DS has its own in-game menu, triggerable by `L+Down+Select` (see the [release notes](https://github.com/AuroraWright/Luma3DS/releases/tag/v8.0)).
|
Since Luma3DS v8.0, Luma3DS has its own in-game menu, triggerable by `L+Down+Select` (see the [release notes](https://github.com/AuroraWright/Luma3DS/releases/tag/v8.0)).
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ Since Luma3DS v8.0, Luma3DS has its own in-game menu, triggerable by `L+Down+Sel
|
|||||||
First you need to clone the repository with: `git clone https://github.com/AuroraWright/Luma3DS.git`
|
First you need to clone the repository with: `git clone https://github.com/AuroraWright/Luma3DS.git`
|
||||||
To compile, you'll need [armips](https://github.com/Kingcom/armips) and a build of a recent commit of [makerom](https://github.com/profi200/Project_CTR) added to your PATH. You'll also need to install [firmtool](https://github.com/TuxSH/firmtool), its README contains installation instructions.
|
To compile, you'll need [armips](https://github.com/Kingcom/armips) and a build of a recent commit of [makerom](https://github.com/profi200/Project_CTR) added to your PATH. You'll also need to install [firmtool](https://github.com/TuxSH/firmtool), its README contains installation instructions.
|
||||||
You'll also need to update your [libctru](https://github.com/smealum/ctrulib) install, building from the latest commit.
|
You'll also need to update your [libctru](https://github.com/smealum/ctrulib) install, building from the latest commit.
|
||||||
Here are [Windows](https://buildbot.orphis.net/armips/) and [Linux](https://mega.nz/#!uQ1T1IAD!Q91O0e12LXKiaXh_YjXD3D5m8_W3FuMI-hEa6KVMRDQ) builds of armips (thanks to who compiled them!) and [makerom](https://github.com/Steveice10/buildtools/tree/master/3ds) (thanks @Steveice10!).
|
Here are [Windows](https://buildbot.orphis.net/armips/) and [Linux](https://ev1l0rd.s-ul.eu/mEIk4atQ) builds of armips (thanks to who compiled them!).
|
||||||
Run `make` and everything should work!
|
Run `make` and everything should work!
|
||||||
You can find the compiled files in the `out` folder.
|
You can find the compiled files in the `out` folder.
|
||||||
|
|
||||||
@@ -38,3 +38,5 @@ See https://github.com/AuroraWright/Luma3DS/wiki/Credits
|
|||||||
|
|
||||||
This software is licensed under the terms of the GPLv3.
|
This software is licensed under the terms of the GPLv3.
|
||||||
You can find a copy of the license in the LICENSE.txt file.
|
You can find a copy of the license in the LICENSE.txt file.
|
||||||
|
|
||||||
|
You can also use all of `sysmodules/rosalina/include/gdb/`, all of `sysmodules/rosalina/source/gdb/`, `sysmodules/rosalina/include/gdb.h`, `sysmodules/rosalina/source/gdb.c`, `sysmodules/rosalina/include/sock_util.h` and `sysmodules/rosalina/source/sock_util.c` under the terms of the GPLv2, as an option. If you choose to do so, you needn't include the GPLv3 notices that are present in the beginning of each of these files.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -50,7 +50,7 @@ struct fb {
|
|||||||
u8 *top_left;
|
u8 *top_left;
|
||||||
u8 *top_right;
|
u8 *top_right;
|
||||||
u8 *bottom;
|
u8 *bottom;
|
||||||
} __attribute__((packed));
|
};
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -42,4 +42,4 @@ struct fb {
|
|||||||
u8 *top_left;
|
u8 *top_left;
|
||||||
u8 *top_right;
|
u8 *top_right;
|
||||||
u8 *bottom;
|
u8 *bottom;
|
||||||
} __attribute__((packed));
|
};
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ dir_build := build
|
|||||||
dir_out := ../../$(dir_build)
|
dir_out := ../../$(dir_build)
|
||||||
|
|
||||||
ASFLAGS := -mcpu=arm946e-s
|
ASFLAGS := -mcpu=arm946e-s
|
||||||
CFLAGS := -Wall -Wextra -mthumb $(ASFLAGS) -fno-builtin -std=c11 -Wno-main -O2 -flto -ffast-math
|
CFLAGS := -Wall -Wextra -marm $(ASFLAGS) -fno-builtin -std=c11 -Wno-main -Os -ffast-math
|
||||||
LDFLAGS := -nostdlib
|
LDFLAGS := -nostartfiles -Wl,--nmagic
|
||||||
|
|
||||||
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, \
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ OUTPUT_ARCH(arm)
|
|||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = 0x01FF7FE0;
|
. = 0x01FF8000;
|
||||||
|
|
||||||
.text : ALIGN(4) { *(.text.start) *(.text*); . = ALIGN(4); }
|
.text : ALIGN(4) { *(.text.start) *(.text*); . = ALIGN(4); }
|
||||||
.rodata : ALIGN(4) { *(.rodata*); . = ALIGN(4); }
|
.rodata : ALIGN(4) { *(.rodata*); . = ALIGN(4); }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -43,8 +43,9 @@ typedef struct __attribute__((packed))
|
|||||||
u32 additionalDataSize;
|
u32 additionalDataSize;
|
||||||
} ExceptionDumpHeader;
|
} ExceptionDumpHeader;
|
||||||
|
|
||||||
u32 readMPUConfig(u32 *regionSettings);
|
|
||||||
void FIQHandler(void);
|
void FIQHandler(void);
|
||||||
void undefinedInstructionHandler(void);
|
void undefinedInstructionHandler(void);
|
||||||
void dataAbortHandler(void);
|
void dataAbortHandler(void);
|
||||||
void prefetchAbortHandler(void);
|
void prefetchAbortHandler(void);
|
||||||
|
|
||||||
|
u32 safecpy(void *dst, const void *src, u32 len);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
@@ -22,92 +22,131 @@
|
|||||||
@ or requiring that modified versions of such material be marked in
|
@ or requiring that modified versions of such material be marked in
|
||||||
@ reasonable ways as different from the original version.
|
@ reasonable ways as different from the original version.
|
||||||
|
|
||||||
.macro GEN_HANDLER name
|
.macro GEN_USUAL_HANDLER name, index
|
||||||
.global \name
|
\name\()Handler:
|
||||||
.type \name, %function
|
ldr sp, =_regs
|
||||||
\name:
|
stmia sp, {r0-r7}
|
||||||
ldr sp, =#0x02000000 @ We make the (full descending) stack point to the end of ITCM for our exception handlers.
|
|
||||||
@ It doesn't matter if we're overwriting stuff here, since we're going to reboot.
|
|
||||||
|
|
||||||
stmfd sp!, {r0-r7} @ FIQ has its own r8-r14 regs
|
mov r0, #\index
|
||||||
ldr r1, =\@ @ macro expansion counter
|
|
||||||
b _commonHandler
|
b _commonHandler
|
||||||
|
|
||||||
.size \name, . - \name
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.text
|
.text
|
||||||
.arm
|
.arm
|
||||||
.align 4
|
.balign 4
|
||||||
|
|
||||||
.global _commonHandler
|
.global _commonHandler
|
||||||
.type _commonHandler, %function
|
.type _commonHandler, %function
|
||||||
_commonHandler:
|
_commonHandler:
|
||||||
|
mov r1, r0
|
||||||
|
mov r0, sp
|
||||||
mrs r2, spsr
|
mrs r2, spsr
|
||||||
mov r6, sp
|
|
||||||
mrs r3, cpsr
|
mrs r3, cpsr
|
||||||
|
add r6, r0, #(8 * 4)
|
||||||
|
|
||||||
orr r3, #0x1c0 @ disable Imprecise Aborts, IRQ and FIQ (equivalent to "cpsid aif" on arm11)
|
orr r3, #0xc0 @ mask interrupts
|
||||||
msr cpsr_cx, r3
|
msr cpsr_cx, r3
|
||||||
|
|
||||||
tst r2, #0x20
|
|
||||||
bne noSvcBreak
|
|
||||||
cmp r1, #2
|
|
||||||
bne noSvcBreak
|
|
||||||
|
|
||||||
sub r0, lr, #4 @ calling cannotAccessAddress cause more problems that it actually solves... (I've to save a lot of regs and that's a pain tbh)
|
|
||||||
lsr r0, #20 @ we'll just do some address checks (to see if it's in ARM9 internal memory)
|
|
||||||
cmp r0, #0x80
|
|
||||||
bne noSvcBreak
|
|
||||||
ldr r4, [lr, #-4]
|
|
||||||
ldr r5, =#0xe12fff7f
|
|
||||||
cmp r4, r5
|
|
||||||
bne noSvcBreak
|
|
||||||
bic r5, r3, #0xf
|
|
||||||
orr r5, #0x3
|
|
||||||
msr cpsr_c, r5 @ switch to supervisor mode
|
|
||||||
ldmfd sp, {r8-r11}^
|
|
||||||
ldr r2, [sp, #0x1c] @ implementation details of the official svc handler
|
|
||||||
ldr r4, [sp, #0x18]
|
|
||||||
msr cpsr_c, r3 @ restore processor mode
|
|
||||||
tst r2, #0x20
|
|
||||||
addne lr, r4, #2 @ adjust address for later
|
|
||||||
moveq lr, r4
|
|
||||||
|
|
||||||
noSvcBreak:
|
|
||||||
ands r4, r2, #0xf @ get the mode that triggered the exception
|
ands r4, r2, #0xf @ get the mode that triggered the exception
|
||||||
moveq r4, #0xf @ usr => sys
|
moveq r4, #0xf @ usr => sys
|
||||||
bic r5, r3, #0xf
|
bic r5, r3, #0xf
|
||||||
orr r5, r4
|
orr r5, r4
|
||||||
msr cpsr_c, r5 @ change processor mode
|
msr cpsr_c, r5 @ change processor mode
|
||||||
stmfd r6!, {r8-lr}
|
stmia r6!, {r8-lr}
|
||||||
msr cpsr_c, r3 @ restore processor mode
|
msr cpsr_c, r3 @ restore processor mode
|
||||||
mov sp, r6
|
|
||||||
|
|
||||||
stmfd sp!, {r2,lr} @ it's a bit of a mess, but we will fix that later
|
str lr, [r6], #4
|
||||||
@ order of saved regs now: cpsr, pc + (2/4/8), r8-r14, r0-r7
|
str r2, [r6]
|
||||||
|
|
||||||
mov r0, sp
|
|
||||||
|
|
||||||
|
msr cpsr_cxsf, #0xdf @ finally, switch to system mode, mask interrupts and clear flags (in case of double faults)
|
||||||
|
ldr sp, =0x02000000
|
||||||
b mainHandler
|
b mainHandler
|
||||||
|
|
||||||
GEN_HANDLER FIQHandler
|
|
||||||
GEN_HANDLER undefinedInstructionHandler
|
|
||||||
GEN_HANDLER prefetchAbortHandler
|
|
||||||
GEN_HANDLER dataAbortHandler
|
|
||||||
|
|
||||||
.global readMPUConfig
|
.global FIQHandler
|
||||||
.type readMPUConfig, %function
|
.type FIQHandler, %function
|
||||||
readMPUConfig:
|
GEN_USUAL_HANDLER FIQ, 0
|
||||||
stmfd sp!, {r4-r8, lr}
|
|
||||||
mrc p15,0,r1,c6,c0,0
|
.global undefinedInstructionHandler
|
||||||
mrc p15,0,r2,c6,c1,0
|
.type undefinedInstructionHandler, %function
|
||||||
mrc p15,0,r3,c6,c2,0
|
GEN_USUAL_HANDLER undefinedInstruction, 1
|
||||||
mrc p15,0,r4,c6,c3,0
|
|
||||||
mrc p15,0,r5,c6,c4,0
|
.global prefetchAbortHandler
|
||||||
mrc p15,0,r6,c6,c5,0
|
.type prefetchAbortHandler, %function
|
||||||
mrc p15,0,r7,c6,c6,0
|
prefetchAbortHandler:
|
||||||
mrc p15,0,r8,c6,c7,0
|
msr cpsr_cx, #0xd7 @ mask interrupts (abort mode)
|
||||||
stmia r0, {r1-r8}
|
mrs sp, spsr
|
||||||
mrc p15,0,r0,c5,c0,2 @ read data access permission bits
|
and sp, #0x3f
|
||||||
ldmfd sp!, {r4-r8, pc}
|
cmp sp, #0x13
|
||||||
|
bne _prefetchAbortNormalHandler
|
||||||
|
|
||||||
|
ldr sp, =BreakPtr
|
||||||
|
ldr sp, [sp]
|
||||||
|
cmp sp, #0
|
||||||
|
beq _prefetchAbortNormalHandler
|
||||||
|
add sp, #(1*4 + 4)
|
||||||
|
cmp lr, sp
|
||||||
|
bne _prefetchAbortNormalHandler
|
||||||
|
|
||||||
|
mov sp, r8
|
||||||
|
pop {r8-r11}
|
||||||
|
ldr lr, [sp, #8]!
|
||||||
|
ldr sp, [sp, #4]
|
||||||
|
msr spsr_cxsf, sp
|
||||||
|
tst sp, #0x20
|
||||||
|
addne lr, #2 @ adjust address for later
|
||||||
|
|
||||||
|
GEN_USUAL_HANDLER _prefetchAbortNormal, 2
|
||||||
|
|
||||||
|
.global dataAbortHandler
|
||||||
|
.type dataAbortHandler, %function
|
||||||
|
dataAbortHandler:
|
||||||
|
msr cpsr_cx, #0xd7 @ mask interrupts (abort mode)
|
||||||
|
mrs sp, spsr
|
||||||
|
and sp, #0x3f
|
||||||
|
cmp sp, #0x1f
|
||||||
|
bne _dataAbortNormalHandler
|
||||||
|
|
||||||
|
sub lr, #8
|
||||||
|
adr sp, safecpy
|
||||||
|
cmp lr, sp
|
||||||
|
blo _j_dataAbortNormalHandler
|
||||||
|
adr sp, _safecpy_end
|
||||||
|
cmp lr, sp
|
||||||
|
bhs _j_dataAbortNormalHandler
|
||||||
|
|
||||||
|
msr spsr_f, #(1 << 30)
|
||||||
|
mov r12, #0
|
||||||
|
adds pc, lr, #4
|
||||||
|
|
||||||
|
_j_dataAbortNormalHandler:
|
||||||
|
add lr, #8
|
||||||
|
|
||||||
|
GEN_USUAL_HANDLER _dataAbortNormal, 3
|
||||||
|
|
||||||
|
|
||||||
|
.global safecpy
|
||||||
|
.type safecpy, %function
|
||||||
|
safecpy:
|
||||||
|
push {r4, lr}
|
||||||
|
mov r3, #0
|
||||||
|
movs r12, #1
|
||||||
|
|
||||||
|
_safecpy_loop:
|
||||||
|
ldrb r4, [r1, r3]
|
||||||
|
cmp r12, #0
|
||||||
|
beq _safecpy_loop_end
|
||||||
|
strb r4, [r0, r3]
|
||||||
|
add r3, #1
|
||||||
|
cmp r3, r2
|
||||||
|
blo _safecpy_loop
|
||||||
|
|
||||||
|
_safecpy_loop_end:
|
||||||
|
mov r0, r3
|
||||||
|
pop {r4, pc}
|
||||||
|
|
||||||
|
_safecpy_end:
|
||||||
|
|
||||||
|
.bss
|
||||||
|
.balign 4
|
||||||
|
_regs: .skip (4 * 17)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -32,48 +32,10 @@
|
|||||||
#define REG_DUMP_SIZE 4 * 17
|
#define REG_DUMP_SIZE 4 * 17
|
||||||
#define CODE_DUMP_SIZE 48
|
#define CODE_DUMP_SIZE 48
|
||||||
|
|
||||||
bool cannotAccessAddress(const void *address)
|
void __attribute__((noreturn)) mainHandler(u32 *registerDump, u32 type)
|
||||||
{
|
|
||||||
u32 regionSettings[8];
|
|
||||||
u32 addr = (u32)address;
|
|
||||||
|
|
||||||
u32 dataAccessPermissions = readMPUConfig(regionSettings);
|
|
||||||
for(u32 i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
if((dataAccessPermissions & 0xF) == 0 || (regionSettings[i] & 1) == 0)
|
|
||||||
continue; //No access / region not enabled
|
|
||||||
|
|
||||||
u32 regionAddrBase = regionSettings[i] & ~0xFFF;
|
|
||||||
u32 regionSize = 1 << (((regionSettings[i] >> 1) & 0x1F) + 1);
|
|
||||||
|
|
||||||
if(addr >= regionAddrBase && addr < regionAddrBase + regionSize)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
dataAccessPermissions >>= 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static u32 __attribute__((noinline)) copyMemory(void *dst, const void *src, u32 size, u32 alignment)
|
|
||||||
{
|
|
||||||
u8 *out = (u8 *)dst;
|
|
||||||
const u8 *in = (const u8 *)src;
|
|
||||||
|
|
||||||
if(((u32)src & (alignment - 1)) != 0 || cannotAccessAddress(src) || (size != 0 && cannotAccessAddress((u8 *)src + size - 1)))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
for(u32 i = 0; i < size; i++)
|
|
||||||
*out++ = *in++;
|
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void __attribute__((noreturn)) mainHandler(u32 *regs, u32 type)
|
|
||||||
{
|
{
|
||||||
ExceptionDumpHeader dumpHeader;
|
ExceptionDumpHeader dumpHeader;
|
||||||
|
|
||||||
u32 registerDump[REG_DUMP_SIZE / 4];
|
|
||||||
u8 codeDump[CODE_DUMP_SIZE];
|
u8 codeDump[CODE_DUMP_SIZE];
|
||||||
|
|
||||||
dumpHeader.magic[0] = 0xDEADC0DE;
|
dumpHeader.magic[0] = 0xDEADC0DE;
|
||||||
@@ -89,27 +51,22 @@ void __attribute__((noreturn)) mainHandler(u32 *regs, u32 type)
|
|||||||
dumpHeader.codeDumpSize = CODE_DUMP_SIZE;
|
dumpHeader.codeDumpSize = CODE_DUMP_SIZE;
|
||||||
dumpHeader.additionalDataSize = 0;
|
dumpHeader.additionalDataSize = 0;
|
||||||
|
|
||||||
//Dump registers
|
u32 cpsr = registerDump[16];
|
||||||
//Current order of saved regs: cpsr, pc, r8-r14, r0-r7
|
u32 pc = registerDump[15] - (type < 3 ? (((cpsr & 0x20) != 0 && type == 1) ? 2 : 4) : 8);
|
||||||
u32 cpsr = regs[0];
|
|
||||||
u32 pc = regs[1] - (type < 3 ? (((cpsr & 0x20) != 0 && type == 1) ? 2 : 4) : 8);
|
|
||||||
|
|
||||||
registerDump[15] = pc;
|
registerDump[15] = pc;
|
||||||
registerDump[16] = cpsr;
|
|
||||||
for(u32 i = 0; i < 7; i++) registerDump[8 + i] = regs[2 + i];
|
|
||||||
for(u32 i = 0; i < 8; i++) registerDump[i] = regs[9 + i];
|
|
||||||
|
|
||||||
//Dump code
|
//Dump code
|
||||||
u8 *instr = (u8 *)pc + ((cpsr & 0x20) ? 2 : 4) - dumpHeader.codeDumpSize; //Doesn't work well on 32-bit Thumb instructions, but it isn't much of a problem
|
u8 *instr = (u8 *)pc + ((cpsr & 0x20) ? 2 : 4) - dumpHeader.codeDumpSize; //wouldn't work well on 32-bit Thumb instructions, but it isn't much of a problem
|
||||||
dumpHeader.codeDumpSize = copyMemory(codeDump, instr, dumpHeader.codeDumpSize, ((cpsr & 0x20) != 0) ? 2 : 4);
|
dumpHeader.codeDumpSize = ((u32)instr & (((cpsr & 0x20) != 0) ? 1 : 3)) != 0 ? 0 : safecpy(codeDump, instr, dumpHeader.codeDumpSize);
|
||||||
|
|
||||||
//Copy register dump and code dump
|
//Copy register dump and code dump
|
||||||
u8 *final = (u8 *)(FINAL_BUFFER + sizeof(ExceptionDumpHeader));
|
u8 *final = (u8 *)(FINAL_BUFFER + sizeof(ExceptionDumpHeader));
|
||||||
final += copyMemory(final, registerDump, dumpHeader.registerDumpSize, 1);
|
final += safecpy(final, registerDump, dumpHeader.registerDumpSize);
|
||||||
final += copyMemory(final, codeDump, dumpHeader.codeDumpSize, 1);
|
final += safecpy(final, codeDump, dumpHeader.codeDumpSize);
|
||||||
|
|
||||||
//Dump stack in place
|
//Dump stack in place
|
||||||
dumpHeader.stackDumpSize = copyMemory(final, (const void *)registerDump[13], 0x1000 - (registerDump[13] & 0xFFF), 1);
|
dumpHeader.stackDumpSize = safecpy(final, (const void *)registerDump[13], 0x1000 - (registerDump[13] & 0xFFF));
|
||||||
|
|
||||||
dumpHeader.totalSize = sizeof(ExceptionDumpHeader) + dumpHeader.registerDumpSize + dumpHeader.codeDumpSize + dumpHeader.stackDumpSize + dumpHeader.additionalDataSize;
|
dumpHeader.totalSize = sizeof(ExceptionDumpHeader) + dumpHeader.registerDumpSize + dumpHeader.codeDumpSize + dumpHeader.stackDumpSize + dumpHeader.additionalDataSize;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
@@ -26,8 +26,12 @@
|
|||||||
.align 4
|
.align 4
|
||||||
.global _start
|
.global _start
|
||||||
_start:
|
_start:
|
||||||
add pc, r0, #(handlers - .) @ Dummy instruction to prevent compiler optimizations
|
add pc, r0, #(handlers - .) @ Dummy instruction
|
||||||
|
|
||||||
|
.global BreakPtr
|
||||||
|
BreakPtr: .word 0
|
||||||
|
|
||||||
|
.global handlers
|
||||||
handlers:
|
handlers:
|
||||||
.word FIQHandler
|
.word FIQHandler
|
||||||
.word undefinedInstructionHandler
|
.word undefinedInstructionHandler
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Requires Python >= 3.2 or >= 2.7
|
# Requires Python >= 3.2 or >= 2.7
|
||||||
|
|
||||||
# This file is part of Luma3DS
|
# This file is part of Luma3DS
|
||||||
# Copyright (C) 2016 Aurora Wright, TuxSH
|
# Copyright (C) 2016-2018 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
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ enum multiOptions
|
|||||||
DEFAULTEMU = 0,
|
DEFAULTEMU = 0,
|
||||||
BRIGHTNESS,
|
BRIGHTNESS,
|
||||||
SPLASH,
|
SPLASH,
|
||||||
|
SPLASH_DURATION,
|
||||||
PIN,
|
PIN,
|
||||||
NEWCPU
|
NEWCPU
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
@@ -159,7 +159,7 @@ _commonHandler:
|
|||||||
|
|
||||||
_no_L2C:
|
_no_L2C:
|
||||||
|
|
||||||
cps #0x1F
|
msr cpsr_cxsf, #0xdf @ finally, switch to system mode, mask interrupts and clear flags (in case of double faults)
|
||||||
ldr sp, =exceptionStackTop
|
ldr sp, =exceptionStackTop
|
||||||
ldr sp, [sp]
|
ldr sp, [sp]
|
||||||
sub sp, #0x100
|
sub sp, #0x100
|
||||||
@@ -221,7 +221,8 @@ prefetchAbortHandler:
|
|||||||
pop {r8-r11}
|
pop {r8-r11}
|
||||||
ldr lr, [sp, #8]!
|
ldr lr, [sp, #8]!
|
||||||
ldr sp, [sp, #4]
|
ldr sp, [sp, #4]
|
||||||
msr spsr, sp
|
msr spsr_cxsf, sp
|
||||||
|
tst sp, #0x20
|
||||||
addne lr, #2 @ adjust address for later
|
addne lr, #2 @ adjust address for later
|
||||||
|
|
||||||
GEN_USUAL_HANDLER _prefetchAbortNormal, 2, 12
|
GEN_USUAL_HANDLER _prefetchAbortNormal, 2, 12
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -37,7 +37,7 @@ bool isExceptionFatal(u32 spsr, u32 *regs, u32 index)
|
|||||||
{
|
{
|
||||||
if(CONFIG(DISABLEARM11EXCHANDLERS)) return false;
|
if(CONFIG(DISABLEARM11EXCHANDLERS)) return false;
|
||||||
|
|
||||||
if((spsr & 0x1f) != 0x10) return true;
|
if((spsr & 0x1F) != 0x10) return true;
|
||||||
|
|
||||||
KThread *thread = currentCoreContext->objectContext.currentThread;
|
KThread *thread = currentCoreContext->objectContext.currentThread;
|
||||||
KProcess *currentProcess = currentCoreContext->objectContext.currentProcess;
|
KProcess *currentProcess = currentCoreContext->objectContext.currentProcess;
|
||||||
@@ -65,7 +65,7 @@ bool isExceptionFatal(u32 spsr, u32 *regs, u32 index)
|
|||||||
extern u32 safecpy_sz;
|
extern u32 safecpy_sz;
|
||||||
bool isDataAbortExceptionRangeControlled(u32 spsr, u32 addr)
|
bool isDataAbortExceptionRangeControlled(u32 spsr, u32 addr)
|
||||||
{
|
{
|
||||||
return ((spsr & 0x1F) != 0x10) && (
|
return (!(spsr & 0x20) && (spsr & 0x1F) != 0x10) && (
|
||||||
((u32)kernelUsrCopyFuncsStart <= addr && addr < (u32)kernelUsrCopyFuncsEnd) ||
|
((u32)kernelUsrCopyFuncsStart <= addr && addr < (u32)kernelUsrCopyFuncsEnd) ||
|
||||||
((u32)safecpy <= addr && addr < (u32)safecpy + safecpy_sz)
|
((u32)safecpy <= addr && addr < (u32)safecpy + safecpy_sz)
|
||||||
);
|
);
|
||||||
@@ -96,7 +96,7 @@ void fatalExceptionHandlersMain(u32 *registerDump, u32 type, u32 cpuId)
|
|||||||
registerDump[15] = pc;
|
registerDump[15] = pc;
|
||||||
|
|
||||||
//Dump code
|
//Dump code
|
||||||
u8 *instr = (u8 *)pc + ((cpsr & 0x20) ? 2 : 4) - dumpHeader.codeDumpSize; //Doesn't work well on 32-bit Thumb instructions, but it isn't much of a problem
|
u8 *instr = (u8 *)pc + ((cpsr & 0x20) ? 2 : 4) - dumpHeader.codeDumpSize; //wouldn't work well on 32-bit Thumb instructions, but it isn't much of a problem
|
||||||
dumpHeader.codeDumpSize = ((u32)instr & (((cpsr & 0x20) != 0) ? 1 : 3)) != 0 ? 0 : safecpy(codeDump, instr, dumpHeader.codeDumpSize);
|
dumpHeader.codeDumpSize = ((u32)instr & (((cpsr & 0x20) != 0) ? 1 : 3)) != 0 ? 0 : safecpy(codeDump, instr, dumpHeader.codeDumpSize);
|
||||||
|
|
||||||
//Copy register dump and code dump
|
//Copy register dump and code dump
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -147,7 +147,8 @@ static void findUsefulSymbols(void)
|
|||||||
for(off = (u32 *)decodeARMBranch(3 + (u32 *)officialSVCs[0x34]) /* OpenThread */; *off != 0xD9001BF7; off++);
|
for(off = (u32 *)decodeARMBranch(3 + (u32 *)officialSVCs[0x34]) /* OpenThread */; *off != 0xD9001BF7; off++);
|
||||||
threadList = *(KObjectList **)(off + 1);
|
threadList = *(KObjectList **)(off + 1);
|
||||||
|
|
||||||
KProcessHandleTable__ToKThread = (KThread * (*)(KProcessHandleTable *, Handle))decodeARMBranch((u32 *)decodeARMBranch((u32 *)officialSVCs[0x37] + 3) /* GetThreadId */ + 5);
|
off = (u32 *)decodeARMBranch((u32 *)officialSVCs[0x37] + 3) + 5; /* GetThreadId */
|
||||||
|
KProcessHandleTable__ToKThread = (KThread * (*)(KProcessHandleTable *, Handle))decodeARMBranch((*off >> 16) == 0xEB00 ? off : off + 2);
|
||||||
|
|
||||||
for(off = (u32 *)officialSVCs[0x50]; off[0] != 0xE1A05000 || off[1] != 0xE2100102 || off[2] != 0x5A00000B; off++);
|
for(off = (u32 *)officialSVCs[0x50]; off[0] != 0xE1A05000 || off[1] != 0xE2100102 || off[2] != 0x5A00000B; off++);
|
||||||
InterruptManager__MapInterrupt = (Result (*)(InterruptManager *, KBaseInterruptEvent *, u32, u32, u32, bool, bool))decodeARMBranch(--off);
|
InterruptManager__MapInterrupt = (Result (*)(InterruptManager *, KBaseInterruptEvent *, u32, u32, u32, bool, bool))decodeARMBranch(--off);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -109,16 +109,14 @@ bytes_read: .word 0
|
|||||||
fopen: .ascii "OPEN"
|
fopen: .ascii "OPEN"
|
||||||
.pool
|
.pool
|
||||||
|
|
||||||
.area 82, 0
|
.area 2*(80+1), 0
|
||||||
fname: .ascii "FILE"
|
fname: .ascii "FILE"
|
||||||
.endarea
|
.endarea
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
kernelcode_start:
|
kernelcode_start:
|
||||||
|
|
||||||
mrs r0, cpsr ; disable interrupts
|
msr cpsr_cxsf, #0xD3 ; disable interrupts and clear flags
|
||||||
orr r0, #0xC0
|
|
||||||
msr cpsr, r0
|
|
||||||
|
|
||||||
ldr sp, =copy_launch_stub_stack_top
|
ldr sp, =copy_launch_stub_stack_top
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@ This file is part of Luma3DS
|
@ This file is part of Luma3DS
|
||||||
@ Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
@ Copyright (C) 2016-2018 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
|
||||||
@ it under the terms of the GNU General Public License as published by
|
@ it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
|
#include "strings.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
@@ -81,6 +82,7 @@ void configMenu(bool oldPinStatus, u32 oldPinMode)
|
|||||||
static const char *multiOptionsText[] = { "Default EmuNAND: 1( ) 2( ) 3( ) 4( )",
|
static const char *multiOptionsText[] = { "Default EmuNAND: 1( ) 2( ) 3( ) 4( )",
|
||||||
"Screen brightness: 4( ) 3( ) 2( ) 1( )",
|
"Screen brightness: 4( ) 3( ) 2( ) 1( )",
|
||||||
"Splash: Off( ) Before( ) After( ) payloads",
|
"Splash: Off( ) Before( ) After( ) payloads",
|
||||||
|
"Splash duration: 1( ) 3( ) 5( ) 7( ) seconds",
|
||||||
"PIN lock: Off( ) 4( ) 6( ) 8( ) digits",
|
"PIN lock: Off( ) 4( ) 6( ) 8( ) digits",
|
||||||
"New 3DS CPU: Off( ) Clock( ) L2( ) Clock+L2( )",
|
"New 3DS CPU: Off( ) Clock( ) L2( ) Clock+L2( )",
|
||||||
};
|
};
|
||||||
@@ -109,6 +111,11 @@ void configMenu(bool oldPinStatus, u32 oldPinMode)
|
|||||||
"\t* 'After payloads' displays it\n"
|
"\t* 'After payloads' displays it\n"
|
||||||
"afterwards.",
|
"afterwards.",
|
||||||
|
|
||||||
|
"Select how long the splash screen\n"
|
||||||
|
"displays.\n\n"
|
||||||
|
"This has no effect if the splash\n"
|
||||||
|
"screen is not enabled.",
|
||||||
|
|
||||||
"Activate a PIN lock.\n\n"
|
"Activate a PIN lock.\n\n"
|
||||||
"The PIN will be asked each time\n"
|
"The PIN will be asked each time\n"
|
||||||
"Luma3DS boots.\n\n"
|
"Luma3DS boots.\n\n"
|
||||||
@@ -195,11 +202,12 @@ void configMenu(bool oldPinStatus, u32 oldPinMode)
|
|||||||
u32 enabled;
|
u32 enabled;
|
||||||
bool visible;
|
bool visible;
|
||||||
} multiOptions[] = {
|
} multiOptions[] = {
|
||||||
{ .posXs = {19, 24, 29, 34}, .visible = isSdMode },
|
{ .visible = isSdMode },
|
||||||
{ .posXs = {21, 26, 31, 36}, .visible = true },
|
{ .visible = true },
|
||||||
{ .posXs = {12, 22, 31, 0}, .visible = true },
|
{ .visible = true },
|
||||||
{ .posXs = {14, 19, 24, 29}, .visible = true },
|
{ .visible = true },
|
||||||
{ .posXs = {17, 26, 32, 44}, .visible = ISN3DS },
|
{ .visible = true },
|
||||||
|
{ .visible = ISN3DS },
|
||||||
};
|
};
|
||||||
|
|
||||||
struct singleOption {
|
struct singleOption {
|
||||||
@@ -227,7 +235,15 @@ void configMenu(bool oldPinStatus, u32 oldPinMode)
|
|||||||
|
|
||||||
//Parse the existing options
|
//Parse the existing options
|
||||||
for(u32 i = 0; i < multiOptionsAmount; i++)
|
for(u32 i = 0; i < multiOptionsAmount; i++)
|
||||||
|
{
|
||||||
|
//Detect the positions where the "x" should go
|
||||||
|
u32 optionNum = 0;
|
||||||
|
for(u32 j = 0; optionNum < 4 && j < strlen(multiOptionsText[i]); j++)
|
||||||
|
if(multiOptionsText[i][j] == '(') multiOptions[i].posXs[optionNum++] = j + 1;
|
||||||
|
while(optionNum < 4) multiOptions[i].posXs[optionNum++] = 0;
|
||||||
|
|
||||||
multiOptions[i].enabled = MULTICONFIG(i);
|
multiOptions[i].enabled = MULTICONFIG(i);
|
||||||
|
}
|
||||||
for(u32 i = 0; i < singleOptionsAmount; i++)
|
for(u32 i = 0; i < singleOptionsAmount; i++)
|
||||||
singleOptions[i].enabled = CONFIG(i);
|
singleOptions[i].enabled = CONFIG(i);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#define CONFIG_FILE "config.bin"
|
#define CONFIG_FILE "config.bin"
|
||||||
#define CONFIG_VERSIONMAJOR 2
|
#define CONFIG_VERSIONMAJOR 2
|
||||||
#define CONFIG_VERSIONMINOR 2
|
#define CONFIG_VERSIONMINOR 3
|
||||||
|
|
||||||
#define BOOTCFG_NAND BOOTCONFIG(0, 7)
|
#define BOOTCFG_NAND BOOTCONFIG(0, 7)
|
||||||
#define BOOTCFG_FIRM BOOTCONFIG(3, 7)
|
#define BOOTCFG_FIRM BOOTCONFIG(3, 7)
|
||||||
@@ -46,6 +46,7 @@ enum multiOptions
|
|||||||
DEFAULTEMU = 0,
|
DEFAULTEMU = 0,
|
||||||
BRIGHTNESS,
|
BRIGHTNESS,
|
||||||
SPLASH,
|
SPLASH,
|
||||||
|
SPLASH_DURATION,
|
||||||
PIN,
|
PIN,
|
||||||
NEWCPU
|
NEWCPU
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Luma3DS
|
* This file is part of Luma3DS
|
||||||
* Copyright (C) 2016-2017 Aurora Wright, TuxSH
|
* Copyright (C) 2016-2018 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
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -36,6 +36,7 @@
|
|||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
#include "fmt.h"
|
#include "fmt.h"
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
bool loadSplash(void)
|
bool loadSplash(void)
|
||||||
{
|
{
|
||||||
@@ -56,7 +57,9 @@ bool loadSplash(void)
|
|||||||
if(!isTopSplashValid && !isBottomSplashValid) return false;
|
if(!isTopSplashValid && !isBottomSplashValid) return false;
|
||||||
|
|
||||||
swapFramebuffers(true);
|
swapFramebuffers(true);
|
||||||
wait(3000ULL);
|
|
||||||
|
u32 durationIndex = MULTICONFIG(SPLASH_DURATION);
|
||||||
|
wait(1000ULL + (durationIndex * 2000ULL));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user