Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e7e5081a7 | ||
|
|
fff750e609 | ||
|
|
38ce46a158 | ||
|
|
7a27a7b3b5 |
@@ -7,5 +7,5 @@ BLVERSION_RSVD := 0
|
|||||||
# Nyx Version.
|
# Nyx Version.
|
||||||
NYXVERSION_MAJOR := 1
|
NYXVERSION_MAJOR := 1
|
||||||
NYXVERSION_MINOR := 0
|
NYXVERSION_MINOR := 0
|
||||||
NYXVERSION_HOTFX := 0
|
NYXVERSION_HOTFX := 1
|
||||||
NYXVERSION_RSVD := 0
|
NYXVERSION_RSVD := 0
|
||||||
|
|||||||
@@ -694,9 +694,15 @@ retry:
|
|||||||
|
|
||||||
void jc_deinit()
|
void jc_deinit()
|
||||||
{
|
{
|
||||||
|
// Disable power.
|
||||||
|
jc_power_supply(UART_B, false);
|
||||||
|
jc_power_supply(UART_C, false);
|
||||||
|
|
||||||
|
// Turn off Joy-Con detect.
|
||||||
gpio_config(GPIO_PORT_G, GPIO_PIN_0, GPIO_MODE_SPIO);
|
gpio_config(GPIO_PORT_G, GPIO_PIN_0, GPIO_MODE_SPIO);
|
||||||
gpio_config(GPIO_PORT_D, GPIO_PIN_1, GPIO_MODE_SPIO);
|
gpio_config(GPIO_PORT_D, GPIO_PIN_1, GPIO_MODE_SPIO);
|
||||||
|
|
||||||
|
// Send sleep command.
|
||||||
u8 data = HCI_STATE_SLEEP;
|
u8 data = HCI_STATE_SLEEP;
|
||||||
|
|
||||||
if (jc_r.connected && !(jc_r.type & JC_ID_HORI))
|
if (jc_r.connected && !(jc_r.type & JC_ID_HORI))
|
||||||
@@ -709,9 +715,6 @@ void jc_deinit()
|
|||||||
jc_send_hid_cmd(UART_C, JC_HID_SUBCMD_HCI_STATE, &data, 1);
|
jc_send_hid_cmd(UART_C, JC_HID_SUBCMD_HCI_STATE, &data, 1);
|
||||||
jc_rcv_pkt(&jc_l);
|
jc_rcv_pkt(&jc_l);
|
||||||
}
|
}
|
||||||
|
|
||||||
jc_power_supply(UART_B, false);
|
|
||||||
jc_power_supply(UART_C, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void jc_init_conn(joycon_ctxt_t *jc)
|
static void jc_init_conn(joycon_ctxt_t *jc)
|
||||||
|
|||||||
@@ -651,6 +651,8 @@ static int _dump_emummc_raw_part(emmc_tool_gui_t *gui, int active_part, int part
|
|||||||
|
|
||||||
if (resized_count)
|
if (resized_count)
|
||||||
{
|
{
|
||||||
|
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, "Done!\n");
|
||||||
|
|
||||||
// Calculate USER size and set it for FatFS.
|
// Calculate USER size and set it for FatFS.
|
||||||
u32 user_sectors = resized_count - user_offset - 33;
|
u32 user_sectors = resized_count - user_offset - 33;
|
||||||
disk_set_info(DRIVE_EMU, SET_SECTOR_COUNT, &user_sectors);
|
disk_set_info(DRIVE_EMU, SET_SECTOR_COUNT, &user_sectors);
|
||||||
@@ -662,7 +664,7 @@ static int _dump_emummc_raw_part(emmc_tool_gui_t *gui, int active_part, int part
|
|||||||
strcpy(user_part.name, "USER");
|
strcpy(user_part.name, "USER");
|
||||||
nx_emmc_bis_init(&user_part, true, sd_sector_off);
|
nx_emmc_bis_init(&user_part, true, sd_sector_off);
|
||||||
|
|
||||||
s_printf(gui->txt_buf, "\nFormatting USER...\n");
|
s_printf(gui->txt_buf, "Formatting USER... \n");
|
||||||
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
||||||
manual_system_maintenance(true);
|
manual_system_maintenance(true);
|
||||||
|
|
||||||
@@ -676,17 +678,18 @@ static int _dump_emummc_raw_part(emmc_tool_gui_t *gui, int active_part, int part
|
|||||||
|
|
||||||
if (mkfs_error)
|
if (mkfs_error)
|
||||||
{
|
{
|
||||||
s_printf(gui->txt_buf, "#FF0000 USER format failed (%d)...#\nPlease try again...\n", mkfs_error);
|
s_printf(gui->txt_buf, "#FF0000 Failed (%d)!#\nPlease try again...\n", mkfs_error);
|
||||||
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, "Done!\n");
|
||||||
|
|
||||||
// Flush BIS cache, deinit, clear BIS keys slots and reinstate SBK.
|
// Flush BIS cache, deinit, clear BIS keys slots and reinstate SBK.
|
||||||
nx_emmc_bis_end();
|
nx_emmc_bis_end();
|
||||||
hos_bis_keys_clear();
|
hos_bis_keys_clear();
|
||||||
|
|
||||||
s_printf(gui->txt_buf, "Writing new GPT...\n");
|
s_printf(gui->txt_buf, "Writing new GPT... ");
|
||||||
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
||||||
manual_system_maintenance(true);
|
manual_system_maintenance(true);
|
||||||
|
|
||||||
@@ -706,7 +709,7 @@ static int _dump_emummc_raw_part(emmc_tool_gui_t *gui, int active_part, int part
|
|||||||
|
|
||||||
if (gpt_entry_idx >= gpt_main.header.num_part_ents)
|
if (gpt_entry_idx >= gpt_main.header.num_part_ents)
|
||||||
{
|
{
|
||||||
s_printf(gui->txt_buf, "#FF0000 No USER partition...#\nPlease try again...\n");
|
s_printf(gui->txt_buf, "\n#FF0000 No USER partition...#\nPlease try again...\n");
|
||||||
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -1621,9 +1621,16 @@ static lv_res_t _create_mbox_partitioning_next(lv_obj_t *btn)
|
|||||||
s_printf(txt_buf, "#FFDD00 Warning: This will partition the SD Card!#\n\n");
|
s_printf(txt_buf, "#FFDD00 Warning: This will partition the SD Card!#\n\n");
|
||||||
|
|
||||||
if (part_info.backup_possible)
|
if (part_info.backup_possible)
|
||||||
strcat(txt_buf, "#C7EA46 Your files will be backed up and restored!#\n#FFDD00Any other partition will be wiped!#");
|
{
|
||||||
|
strcat(txt_buf, "#C7EA46 Your files will be backed up and restored!#\n"
|
||||||
|
"#FFDD00 Any other partition will be wiped!#");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
strcat(txt_buf, "#FFDD00 Your files will be wiped!#\n#FFDD00 Use USB UMS to copy them over!#");
|
{
|
||||||
|
strcat(txt_buf, "#FFDD00 Your files will be wiped!#\n"
|
||||||
|
"#FFDD00 Any other partition will be also wiped!#\n"
|
||||||
|
"#FFDD00 Use USB UMS to copy them over!#");
|
||||||
|
}
|
||||||
|
|
||||||
lv_label_set_text(lbl_status, txt_buf);
|
lv_label_set_text(lbl_status, txt_buf);
|
||||||
|
|
||||||
@@ -1909,7 +1916,8 @@ static void create_mbox_check_files_total_size()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
lv_mbox_set_text(mbox,
|
lv_mbox_set_text(mbox,
|
||||||
"#FFDD00 The SD Card cannot be backed up!#\n\n"
|
"#FFDD00 The SD Card cannot be backed up!#\n"
|
||||||
|
"#FFDD00 Any other partition will be also wiped!#\n\n"
|
||||||
"You will be asked to back up your files later via UMS.");
|
"You will be asked to back up your files later via UMS.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ static int nx_emmc_bis_write_block(u32 sector, u32 count, void *buff, bool flush
|
|||||||
if (!emu_offset)
|
if (!emu_offset)
|
||||||
res = nx_emmc_part_write(&emmc_storage, system_part, sector, count, bis_cache->dma_buff);
|
res = nx_emmc_part_write(&emmc_storage, system_part, sector, count, bis_cache->dma_buff);
|
||||||
else
|
else
|
||||||
res = sdmmc_storage_read(&sd_storage, emu_offset + system_part->lba_start + sector, count, bis_cache->dma_buff);
|
res = sdmmc_storage_write(&sd_storage, emu_offset + system_part->lba_start + sector, count, bis_cache->dma_buff);
|
||||||
if (!res)
|
if (!res)
|
||||||
return 1; // R/W error.
|
return 1; // R/W error.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user