*(vu32 *)0x10141200 = 0x1007F;
*(vu32 *)0x10202014 = 0x00000001;
*(vu32 *)0x1020200C &= 0xFFFEFFFE;
+ }
+
*(vu32 *)0x10202240 = brightnessLevel; // Alteration; directly read brightness.
*(vu32 *)0x10202A40 = brightnessLevel;
+
+ if (do_init == INIT_FULL) {
*(vu32 *)0x10202244 = 0x1023E;
*(vu32 *)0x10202A44 = 0x1023E;
+ }
// Top screen
*(vu32 *)0x10400400 = 0x000001c2;
*(vu32 *)0x10400540 = 0x01980194;
*(vu32 *)0x10400544 = 0x00000000;
*(vu32 *)0x10400548 = 0x00000011;
-
*(vu32 *)0x1040055C = 0x00f00140;
*(vu32 *)0x10400560 = 0x01c100d1;
*(vu32 *)0x10400564 = 0x01920052;
*((vu32 *)0x23FFFE00) = 0x18300000;
*((vu32 *)0x23FFFE04) = 0x18300000;
*((vu32 *)0x23FFFE08) = 0x18300000 + (yaw * 400);
- } else if (do_init == INIT_DEINIT) {
-
- }
//Clear ARM11 entry offset
*arm11 = 0;
#include <ctr9/ctr_hid.h>
+#include <ctr9/io.h>
+#include <ctr9/ctr_screen.h>
+#include <ctr9/i2c.h>
#include "common.h"
#include "firm/firm.h"
std_init();
int c = fmount();
- screen_mode(0);
+
+ screen_mode(0); // Use RGBA8 mode.
+
clear_bg();
- load_bg_top(PATH_BITS "/top.bin");
+
+ load_bg_top (PATH_BITS "/top.bin");
load_bg_bottom(PATH_BITS "/bottom.bin"); // This is basically a menuhax splash (90deg rotated BGR8 pixel data)
+
clear_disp(TOP_SCREEN);
clear_disp(BOTTOM_SCREEN);
+ ctr_screen_enable_backlight(CTR_SCREEN_BOTH);
+
set_font(PATH_BITS "/termfont.bin");
install_interrupts(); // Get some free debug info.
// And no, 3dbrew didn't help. Partial init seems to be a superset of what
// I was attempting.
-// if (PDN_GPU_CNT == 1) {
+ screenInitAddress[2] = 1; // Do a partial init.
+
+ if (PDN_GPU_CNT == 1)
screenInitAddress[2] = 0; // Do a full init.
- screenInitAddress[3] = 0xFF; // Brightness
- screenInitAddress[4] = mode; // Mode
- *a11_entry = (uint32_t)screenInitAddress;
+ screenInitAddress[3] = 0xFF; // Brightness
+ screenInitAddress[4] = mode; // Mode
- while (*a11_entry);
+ *a11_entry = (uint32_t)screenInitAddress;
- // Turn on backlight
- i2cWriteRegister(I2C_DEV_MCU, 0x22, 1 << 1);
+ while (*a11_entry);
- // FIXME - Time to yell at Gelex now. :|
- ctr_screen_enable_backlight(CTR_SCREEN_BOTH);
-// }
+ // Turn on backlight
+ i2cWriteRegister(I2C_DEV_MCU, 0x22, 1 << 1);
}