mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-11-22 11:56:42 +00:00
Make stuff work maybe
This commit is contained in:
parent
ee6ea3e64c
commit
83b49299b4
4 changed files with 32 additions and 19 deletions
2
Makefile
2
Makefile
|
@ -44,6 +44,8 @@ CUSTOMDEFINES := -DIPL_LOAD_ADDR=$(IPL_LOAD_ADDR)
|
|||
CUSTOMDEFINES += -DLP_VER_MJ=$(LPVERSION_MAJOR) -DLP_VER_MN=$(LPVERSION_MINOR) -DLP_VER_BF=$(LPVERSION_BUGFX) -DLP_VER=$(LPVERSION) -DBDK_EMUMMC_ENABLE
|
||||
CUSTOMDEFINES += -DGFX_INC=$(GFX_INC) -DFFCFG_INC=$(FFCFG_INC)
|
||||
|
||||
CUSTOMDEFINES += -DBDK_MALLOC_NO_DEFRAG -DBDK_MC_ENABLE_AHB_REDIRECT -DBDK_EMUMMC_ENABLE
|
||||
|
||||
FFCFG_INC := '"../$(PROJECT_DIR)/libs/fatfs/ffconf.h"'
|
||||
|
||||
# 0: UART_A, 1: UART_B.
|
||||
|
|
|
@ -58,12 +58,6 @@
|
|||
#define RAM_DISK_SZ 0x41000000 // 1040MB.
|
||||
#define RAM_DISK2_SZ 0x21000000 // 528MB.
|
||||
|
||||
// NX BIS driver sector cache.
|
||||
#define NX_BIS_CACHE_ADDR 0xC5000000
|
||||
#define NX_BIS_CACHE_SZ 0x10020000 // 256MB.
|
||||
#define NX_BIS_LOOKUP_ADDR 0xD6000000
|
||||
#define NX_BIS_LOOKUP_SZ 0xF000000 // 240MB.
|
||||
|
||||
// L4T Kernel Panic Storage (PSTORE).
|
||||
#define PSTORE_ADDR 0xB0000000
|
||||
#define PSTORE_SZ SZ_2M
|
||||
|
@ -119,4 +113,10 @@
|
|||
// #define RCM_PAYLOAD_ADDR (EXT_PAYLOAD_ADDR + ALIGN(PATCHED_RELOC_SZ, 0x10))
|
||||
// #define COREBOOT_ADDR (0xD0000000 - rom_size)
|
||||
|
||||
// NX BIS driver sector cache.
|
||||
#define NX_BIS_CACHE_ADDR 0xC5000000
|
||||
#define NX_BIS_CACHE_SZ 0x10020000 // 256MB.
|
||||
#define NX_BIS_LOOKUP_ADDR DRAM_MEM_HOLE_ADR
|
||||
#define NX_BIS_LOOKUP_SZ DRAM_MEM_HOLE_SZ // 240MB.
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,18 +26,17 @@ Input_t *hidRead(){
|
|||
u8 right_connected = 0;
|
||||
|
||||
if (controller != NULL){
|
||||
if (controller->home && !h_cfg.t210b01)
|
||||
RebootToPayloadOrRcm();
|
||||
|
||||
if (controller->cap)
|
||||
TakeScreenshot();
|
||||
|
||||
inputs.buttons = controller->buttons;
|
||||
|
||||
left_connected = controller->conn_l;
|
||||
right_connected = controller->conn_r;
|
||||
}
|
||||
|
||||
if (right_connected && controller->home && !h_cfg.t210b01)
|
||||
RebootToPayloadOrRcm();
|
||||
|
||||
if (left_connected && controller->cap)
|
||||
TakeScreenshot();
|
||||
|
||||
|
||||
u8 btn = btn_read();
|
||||
inputs.volp = (btn & BTN_VOL_UP) ? 1 : 0;
|
||||
|
@ -45,15 +44,23 @@ Input_t *hidRead(){
|
|||
inputs.power = (btn & BTN_POWER) ? 1 : 0;
|
||||
|
||||
if (left_connected){
|
||||
/*
|
||||
if ((LbaseX == 0 || LbaseY == 0) || controller->l3){
|
||||
LbaseX = controller->lstick_x;
|
||||
LbaseY = controller->lstick_y;
|
||||
}
|
||||
|
||||
inputs.up = (controller->up || (controller->lstick_y > LbaseY + 500)) ? 1 : 0;
|
||||
inputs.down = (controller->down || (controller->lstick_y < LbaseY - 500)) ? 1 : 0;
|
||||
inputs.left = (controller->left || (controller->lstick_x < LbaseX - 500)) ? 1 : 0;
|
||||
inputs.right = (controller->right || (controller->lstick_x > LbaseX + 500)) ? 1 : 0;
|
||||
|
||||
inputs.up = (controller->up || (controller->lstick_y > LbaseY + 10000)) ? 1 : 0;
|
||||
inputs.down = (controller->down || (controller->lstick_y < LbaseY - 10000)) ? 1 : 0;
|
||||
inputs.left = (controller->left || (controller->lstick_x < LbaseX - 10000)) ? 1 : 0;
|
||||
inputs.right = (controller->right || (controller->lstick_x > LbaseX + 10000)) ? 1 : 0;
|
||||
*/
|
||||
|
||||
inputs.up = controller->up ? 1 : 0;
|
||||
inputs.down = controller->down ? 1 : 0;
|
||||
inputs.left = controller->left ? 1 : 0;
|
||||
inputs.right = controller->right ? 1 : 0;
|
||||
}
|
||||
else {
|
||||
inputs.up = inputs.volp;
|
||||
|
@ -61,6 +68,7 @@ Input_t *hidRead(){
|
|||
}
|
||||
|
||||
if (right_connected){
|
||||
/*
|
||||
if ((RbaseX == 0 || RbaseY == 0) || controller->r3){
|
||||
RbaseX = controller->rstick_x;
|
||||
RbaseY = controller->rstick_y;
|
||||
|
@ -70,6 +78,7 @@ Input_t *hidRead(){
|
|||
inputs.rDown = (controller->rstick_y < RbaseY - 500) ? 1 : 0;
|
||||
inputs.rLeft = (controller->rstick_x < RbaseX - 500) ? 1 : 0;
|
||||
inputs.rRight = (controller->rstick_x > RbaseX + 500) ? 1 : 0;
|
||||
*/
|
||||
}
|
||||
else
|
||||
inputs.a = inputs.power;
|
||||
|
|
|
@ -227,6 +227,8 @@ void ipl_main()
|
|||
h_cfg.emummc_force_disable = false;
|
||||
h_cfg.t210b01 = !!(hw_get_chip_id() == GP_HIDREV_MAJOR_T210B01);
|
||||
|
||||
|
||||
max77620_rtc_prep_read();
|
||||
display_init();
|
||||
|
||||
// Mount SD Card.
|
||||
|
@ -238,7 +240,7 @@ void ipl_main()
|
|||
// Train DRAM and switch to max frequency.
|
||||
if (TConf.minervaEnabled) //!TODO: Add Tegra210B01 support to minerva.
|
||||
h_cfg.errors |= ERR_LIBSYS_MTC;
|
||||
minerva_change_freq(FREQ_1600);
|
||||
minerva_change_freq(FREQ_800);
|
||||
|
||||
u32 *fb = display_init_framebuffer_pitch();
|
||||
gfx_init_ctxt(fb, 720, 1280, 720);
|
||||
|
@ -249,7 +251,7 @@ void ipl_main()
|
|||
display_backlight_brightness(100, 1000);
|
||||
|
||||
// Overclock BPMP.
|
||||
bpmp_clk_rate_set(BPMP_CLK_DEFAULT_BOOST);
|
||||
bpmp_clk_rate_set(h_cfg.t210b01 ? BPMP_CLK_DEFAULT_BOOST : BPMP_CLK_LOWER_BOOST);
|
||||
|
||||
emummc_load_cfg();
|
||||
// Ignore whether emummc is enabled.
|
||||
|
|
Loading…
Reference in a new issue