mirror of
https://github.com/yellows8/dsi.git
synced 2025-06-18 19:25:42 -04:00

- Use nds-bootloader submodule (latest official devkitPro code) - Consequence of above: FAT12/FAT16 support restored - Now compressing bootloader with exomizer (grab from here:) https://bitbucket.org/magli143/exomizer/wiki/browse/downloads - Miscellaneous code cleanup & stability fixes
63 lines
1.5 KiB
ArmAsm
63 lines
1.5 KiB
ArmAsm
/*
|
|
mini - a Free Software replacement for the Nintendo/BroadOn IOS.
|
|
|
|
ELF loader: system startup
|
|
|
|
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
|
|
|
|
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
|
|
the Free Software Foundation, version 2.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
//Modified for nzonehtmlhaxx by yellowstar6.
|
|
//Stripped down by fincs.
|
|
.arm
|
|
|
|
.arch armv5te
|
|
.fpu softvfp
|
|
|
|
.section ".crt0","ax"
|
|
.global _start
|
|
_start:
|
|
@ REG_IME = 0;
|
|
mov r0, #0x04000000
|
|
str r0, [r0, #0x208]
|
|
|
|
ldr r1, =0x00002078 @ disable TCM and protection unit
|
|
mcr p15, 0, r1, c1, c0
|
|
@ Disable cache
|
|
mov r0, #0
|
|
mcr p15, 0, r0, c7, c5, 0 @ Instruction cache
|
|
mcr p15, 0, r0, c7, c6, 0 @ Data cache
|
|
|
|
@ Wait for write buffer to empty
|
|
mcr p15, 0, r0, c7, c10, 4
|
|
|
|
@ clear BSS
|
|
ldr r1, =__bss_start
|
|
ldr r2, =__bss_end
|
|
mov r3, #0
|
|
cmp r1, r2
|
|
beq done_bss
|
|
bss_loop:
|
|
@ clear the word and move on
|
|
str r3, [r1], #4
|
|
cmp r1, r2
|
|
bne bss_loop
|
|
|
|
done_bss:
|
|
@ take the plunge
|
|
bl main
|
|
1: b 1b @ Added by yellowstar6. This code should never be executed.
|