mirror of
https://github.com/ApacheThunder/NTR_Launcher.git
synced 2025-06-19 03:25:38 -04:00
Merged improvements from NitroHax
The following commits were merged:0fe83d2b25
a87af83597
47ea3da285
66740e751a
No new problems were intreduced however this did not resolve the failure to boot/read slot-1.
This commit is contained in:
parent
89c74797d9
commit
e561b44b7f
@ -21,16 +21,16 @@ SPECS := specs
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ARCH := -mthumb-interwork
|
ARCH := -mthumb-interwork -march=armv4t -mtune=arm7tdmi
|
||||||
|
|
||||||
CFLAGS := -g -Wall -O2\
|
CFLAGS := -g -Wall -O2\
|
||||||
-mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer\
|
-fomit-frame-pointer\
|
||||||
-ffast-math \
|
-ffast-math \
|
||||||
$(ARCH)
|
$(ARCH)
|
||||||
|
|
||||||
CFLAGS += $(INCLUDE) -DARM7
|
CFLAGS += $(INCLUDE) -DARM7
|
||||||
|
|
||||||
ASFLAGS := -g $(ARCH)
|
ASFLAGS := -g $(ARCH) $(INCLUDE)
|
||||||
LDFLAGS := -nostartfiles -T$(CURDIR)/../load.ld -g $(ARCH) -Wl,-Map,$(TARGET).map
|
LDFLAGS := -nostartfiles -T$(CURDIR)/../load.ld -g $(ARCH) -Wl,-Map,$(TARGET).map
|
||||||
|
|
||||||
LIBS := -lnds7
|
LIBS := -lnds7
|
||||||
|
@ -17,10 +17,11 @@
|
|||||||
@ Clears ICache and Dcache, and resets the protection units
|
@ Clears ICache and Dcache, and resets the protection units
|
||||||
@ Originally written by Darkain, modified by Chishm
|
@ Originally written by Darkain, modified by Chishm
|
||||||
|
|
||||||
.arm
|
#include <nds/asminc.h>
|
||||||
.global arm9_clearCache
|
|
||||||
|
|
||||||
arm9_clearCache:
|
.arm
|
||||||
|
|
||||||
|
BEGIN_ASM_FUNC arm9_clearCache
|
||||||
@ Clean and flush cache
|
@ Clean and flush cache
|
||||||
mov r1, #0
|
mov r1, #0
|
||||||
outer_loop:
|
outer_loop:
|
||||||
|
@ -17,10 +17,12 @@
|
|||||||
@ void arm7_clearmem (void* loc, size_t len);
|
@ void arm7_clearmem (void* loc, size_t len);
|
||||||
@ Clears memory using an stmia loop
|
@ Clears memory using an stmia loop
|
||||||
|
|
||||||
.arm
|
#include <nds/asminc.h>
|
||||||
.global arm7_clearmem
|
|
||||||
|
|
||||||
arm7_clearmem:
|
.arm
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_ASM_FUNC arm7_clearmem
|
||||||
add r1, r0, r1
|
add r1, r0, r1
|
||||||
stmfd sp!, {r4-r9}
|
stmfd sp!, {r4-r9}
|
||||||
mov r2, #0
|
mov r2, #0
|
||||||
@ -32,9 +34,10 @@ arm7_clearmem:
|
|||||||
mov r8, #0
|
mov r8, #0
|
||||||
mov r9, #0
|
mov r9, #0
|
||||||
|
|
||||||
clearmem_loop:
|
clearmem_loop:
|
||||||
stmia r0!, {r2-r9}
cmp r0, r1
|
stmia r0!, {r2-r9}
|
||||||
blt clearmem_loop
|
cmp r0, r1
|
||||||
|
blt clearmem_loop
|
||||||
|
|
||||||
ldmfd sp!, {r4-r9}
|
ldmfd sp!, {r4-r9}
|
||||||
bx lr
|
bx lr
|
||||||
|
@ -259,7 +259,8 @@ void arm7_main (void) {
|
|||||||
debugOutput(errorCode);
|
debugOutput(errorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
debugOutput (ERR_STS_HOOK_BIN);
|
//debugOutput (ERR_STS_HOOK_BIN);
|
||||||
|
debugOutput (ERR_STS_START);
|
||||||
|
|
||||||
arm7_startBinary();
|
arm7_startBinary();
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include <nds/asminc.h>
|
||||||
|
|
||||||
@This code comes from a post by CaitSith2 at gbadev.org - THANKS!!
|
@This code comes from a post by CaitSith2 at gbadev.org - THANKS!!
|
||||||
@
|
@
|
||||||
@Code to dump the complete Nintendo DS ARM7 bios, including the
|
@Code to dump the complete Nintendo DS ARM7 bios, including the
|
||||||
@ -9,12 +11,12 @@
|
|||||||
@Additionally, if the PC is outside the 0x0000 - 0x1204 range, that range of the bios
|
@Additionally, if the PC is outside the 0x0000 - 0x1204 range, that range of the bios
|
||||||
@is completely locked out from reading.
|
@is completely locked out from reading.
|
||||||
|
|
||||||
.global readBios
|
|
||||||
@ void readBios (u8* dest, u32 src, u32 size)
|
@ void readBios (u8* dest, u32 src, u32 size)
|
||||||
|
|
||||||
.align
|
|
||||||
readBios:
|
|
||||||
.arm
|
.arm
|
||||||
|
|
||||||
|
BEGIN_ASM_FUNC readBios
|
||||||
adr r3,bios_dump+1
|
adr r3,bios_dump+1
|
||||||
bx r3
|
bx r3
|
||||||
.thumb
|
.thumb
|
||||||
|
@ -22,10 +22,10 @@ DATA :=
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ARCH := -mthumb-interwork
|
ARCH := -mthumb-interwork -march=armv4t -mtune=arm7tdmi
|
||||||
|
|
||||||
CFLAGS := -g -Wall -O2\
|
CFLAGS := -g -Wall -O2\
|
||||||
-mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer\
|
-fomit-frame-pointer\
|
||||||
-ffast-math \
|
-ffast-math \
|
||||||
$(ARCH)
|
$(ARCH)
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ CFLAGS += $(INCLUDE) -DARM7
|
|||||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -fno-rtti
|
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -fno-rtti
|
||||||
|
|
||||||
|
|
||||||
ASFLAGS := -g $(ARCH)
|
ASFLAGS := -g $(ARCH) $(INCLUDE)
|
||||||
LDFLAGS = -specs=ds_arm7.specs -g $(ARCH) -Wl,-Map,$(notdir $*).map
|
LDFLAGS = -specs=ds_arm7.specs -g $(ARCH) -Wl,-Map,$(notdir $*).map
|
||||||
|
|
||||||
LIBS := -lmm7 -lnds7
|
LIBS := -lmm7 -lnds7
|
||||||
|
@ -24,17 +24,17 @@ MUSIC := music
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ARCH := -mthumb -mthumb-interwork
|
ARCH := -march=armv5te -mtune=arm946e-s -mthumb -mthumb-interwork
|
||||||
|
|
||||||
CFLAGS := -g -Wall -O2\
|
CFLAGS := -g -Wall -O2\
|
||||||
-march=armv5te -mtune=arm946e-s -fomit-frame-pointer\
|
-fomit-frame-pointer\
|
||||||
-ffast-math \
|
-ffast-math \
|
||||||
$(ARCH)
|
$(ARCH)
|
||||||
|
|
||||||
CFLAGS += $(INCLUDE) -DARM9 -fno-strict-aliasing
|
CFLAGS += $(INCLUDE) -DARM9 -fno-strict-aliasing
|
||||||
CXXFLAGS := $(CFLAGS)
|
CXXFLAGS := $(CFLAGS)
|
||||||
|
|
||||||
ASFLAGS := -g $(ARCH) -march=armv5te -mtune=arm946e-s
|
ASFLAGS := -g $(ARCH) $(INCLUDE)
|
||||||
|
|
||||||
LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user