Skip to content

Commit

Permalink
Fix touch not working and JAP language always being used
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Jun 12, 2019
1 parent 6228ec7 commit 8492898
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
10 changes: 0 additions & 10 deletions hb/bootloader/source/arm7/arm7clear.s
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ clear_IWRAM_loop:
cmp r8, r9
blt clear_IWRAM_loop

// clear most of EWRAM - except after RAM end - 0xc000, which has the bootstub
mov r8, #0x02000000

mov r9, #0x02400000
sub r9, #0x00010000
clear_EWRAM_loop:
stmia r8!, {r0, r1, r2, r3, r4, r5, r6, r7}
cmp r8, r9
blt clear_EWRAM_loop

pop {r0-r9}

bx lr
Expand Down
8 changes: 5 additions & 3 deletions hb/bootloader/source/arm7/main.arm7.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ static void resetMemory_ARM7 (void)
TIMER_DATA(i) = 0;
}

arm7clearRAM();
arm7clearRAM(); // clear exclusive IWRAM
toncset((u32*)0x02000000, 0, 0x3F0000); // clear most of EWRAM - except before 0x023F4000, which has the arm9 code
toncset((u32*)0x02400000, 0, 0xC00000); // clear other part of EWRAM

REG_IE = 0;
REG_IF = ~0;
Expand Down Expand Up @@ -384,8 +386,8 @@ int arm7_main (void) {
hookNds((tNDSHeader*)NDS_HEADER, (u32*)SDENGINE_LOCATION, wordCommandAddr);
}

if (!dsiMode) {
tonccpy ((char*)NDS_HEADER_4MB, (char*)NDS_HEADER, 0x200); // Copy header to 4MB area of main memory
if (dsiMode) {
tonccpy ((char*)0x2FFF000, (char*)0x23FF000, 0x1000); // Copy header to last MB of main memory
}

arm9_stateFlag = ARM9_SETSCFG;
Expand Down
4 changes: 2 additions & 2 deletions hb/common/include/locations.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define SDENGINE_LOCATION 0x037C0000
//#define TEMP_MEM 0x02FFE000 // __DSiHeader

#define NDS_HEADER_4MB 0x023FFE00
#define NDS_HEADER 0x02FFFE00
#define NDS_HEADER 0x023FFE00
#define NDS_HEADER_16MB 0x02FFFE00

#define ARM9_START_ADDRESS_LOCATION (NDS_HEADER + 0x1F4) //0x02FFFFF4

Expand Down

1 comment on commit 8492898

@RocketRobz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for hb build, ofc

Please sign in to comment.