From cd194fa5b2ba45dede2d578712c989c59d8dee74 Mon Sep 17 00:00:00 2001 From: profi200 Date: Sun, 13 Aug 2017 03:05:32 +0200 Subject: [PATCH 1/2] Revert 9273a88d and make it not freeze the GPU/LCD hardware. --- arm11/source/main.c | 6 ++++++ source/screen.c | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arm11/source/main.c b/arm11/source/main.c index f304390..51d8ceb 100644 --- a/arm11/source/main.c +++ b/arm11/source/main.c @@ -70,10 +70,14 @@ static void initScreens(u32 brightnessLevel) *(vu32 *)0x1040045C = 0x00f00190; *(vu32 *)0x10400460 = 0x01c100d1; *(vu32 *)0x10400464 = 0x01920002; + *(vu32 *)0x10400468 = 0x18000000; + *(vu32 *)0x1040046C = 0x18000000; *(vu32 *)0x10400470 = 0x80341; *(vu32 *)0x10400474 = 0x00010501; *(vu32 *)0x10400478 = 0; *(vu32 *)0x10400490 = 0x000002D0; + *(vu32 *)0x10400494 = 0x18100000; + *(vu32 *)0x10400498 = 0x18100000; *(vu32 *)0x1040049C = 0x00000000; //Disco register @@ -103,6 +107,8 @@ static void initScreens(u32 brightnessLevel) *(vu32 *)0x1040055C = 0x00f00140; *(vu32 *)0x10400560 = 0x01c100d1; *(vu32 *)0x10400564 = 0x01920052; + *(vu32 *)0x10400568 = 0x18046500; + *(vu32 *)0x1040056c = 0x18046500; *(vu32 *)0x10400570 = 0x80301; *(vu32 *)0x10400574 = 0x00010501; *(vu32 *)0x10400578 = 0; diff --git a/source/screen.c b/source/screen.c index 75a4a66..86ab666 100644 --- a/source/screen.c +++ b/source/screen.c @@ -96,9 +96,6 @@ void initScreens(void) if(needToSetup) { - memcpy((void *)ARM11_PARAMETERS_ADDRESS, fbs, sizeof(fbs)); - invokeArm11Function(SETUP_FRAMEBUFFERS); - if(!ARESCREENSINITIALIZED) { *(vu32 *)ARM11_PARAMETERS_ADDRESS = brightness[MULTICONFIG(BRIGHTNESS)]; @@ -109,6 +106,8 @@ void initScreens(void) } else updateBrightness(MULTICONFIG(BRIGHTNESS)); + memcpy((void *)ARM11_PARAMETERS_ADDRESS, fbs, sizeof(fbs)); + invokeArm11Function(SETUP_FRAMEBUFFERS); clearScreens(true); needToSetup = false; } From 9344a7b4342218ef5c7c341cd488aaf1b1f99a41 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sun, 13 Aug 2017 16:00:35 +0200 Subject: [PATCH 2/2] Fix default FB addresses --- arm11/source/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arm11/source/main.c b/arm11/source/main.c index 51d8ceb..3c2441c 100644 --- a/arm11/source/main.c +++ b/arm11/source/main.c @@ -70,14 +70,14 @@ static void initScreens(u32 brightnessLevel) *(vu32 *)0x1040045C = 0x00f00190; *(vu32 *)0x10400460 = 0x01c100d1; *(vu32 *)0x10400464 = 0x01920002; - *(vu32 *)0x10400468 = 0x18000000; - *(vu32 *)0x1040046C = 0x18000000; + *(vu32 *)0x10400468 = 0x18300000; + *(vu32 *)0x1040046C = 0x18400000; *(vu32 *)0x10400470 = 0x80341; *(vu32 *)0x10400474 = 0x00010501; *(vu32 *)0x10400478 = 0; *(vu32 *)0x10400490 = 0x000002D0; - *(vu32 *)0x10400494 = 0x18100000; - *(vu32 *)0x10400498 = 0x18100000; + *(vu32 *)0x10400494 = 0x18300000; + *(vu32 *)0x10400498 = 0x18400000; *(vu32 *)0x1040049C = 0x00000000; //Disco register @@ -107,8 +107,8 @@ static void initScreens(u32 brightnessLevel) *(vu32 *)0x1040055C = 0x00f00140; *(vu32 *)0x10400560 = 0x01c100d1; *(vu32 *)0x10400564 = 0x01920052; - *(vu32 *)0x10400568 = 0x18046500; - *(vu32 *)0x1040056c = 0x18046500; + *(vu32 *)0x10400568 = 0x18346500; + *(vu32 *)0x1040056c = 0x18446500; *(vu32 *)0x10400570 = 0x80301; *(vu32 *)0x10400574 = 0x00010501; *(vu32 *)0x10400578 = 0;