Skip to content

Commit

Permalink
Alpha release fixes:
Browse files Browse the repository at this point in the history
- Move intro to the front of the pcoess.
- Fix too long text in "no bootloader" issue.
- Add release 45 to SMC 45.1 and SMC 43.0 header for SMC.BIN generation.
- Optimized compile of PRG to prepare 2.1-alpha patch.
  • Loading branch information
FlightControl-User committed Oct 9, 2023
1 parent 383991c commit cbf3b8b
Show file tree
Hide file tree
Showing 12 changed files with 3,548 additions and 4,407 deletions.
Binary file modified bin/SMC-HEADER-R43.0.0.BIN
Binary file not shown.
Binary file modified bin/SMC-HEADER-R45.1.0.BIN
Binary file not shown.
Binary file modified bin/SMC-R43.0.0.BIN
Binary file not shown.
Binary file modified bin/SMC-R45.1.0.BIN
Binary file not shown.
2 changes: 1 addition & 1 deletion bin/x16-smc-header-R43.0.0.hex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:100000002B000000000000000000000000000000C5
:100010000000000000000000000000000000002BB5
:10001000000000000000000000000000002D2C2B5C
:00000001FF
2 changes: 1 addition & 1 deletion bin/x16-smc-header-R45.1.0.hex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:100000002D010000000000000000000000000000C2
:1000100000000000000000000000000000002C2B89
:10001000000000000000000000000000002D2C2B5C
:00000001FF
2 changes: 1 addition & 1 deletion src/cx16-defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#define __INTRO
#define __SMC_CHIP_PROCESS
#define __ROM_CHIP_PROCESS
#define __ROM_CHIP_DETECT
#define __SMC_CHIP_DETECT
#define __ROM_CHIP_DETECT
#define __SMC_CHIP_CHECK
#define __ROM_CHIP_CHECK
#define __SMC_CHIP_FLASH
Expand Down
10 changes: 5 additions & 5 deletions src/cx16-display-text.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const char* display_into_briefing_text[14] = {
" Ensure your J1 jumpers are properly enabled on the CX16!",
"",
"Please read carefully the step by step instructions at ",
"https://flightcontrol-user.github.io/x16-flash",
"https://flightcontrol-user.github.io/x16-flash"
};

const char display_intro_colors_count = 16;
Expand All @@ -44,18 +44,18 @@ const char* display_into_colors_text[16] = {
" - Issue Problem identified during update.",
" - Error Error found during update.",
"",
"Errors indicate your J1 jumpers are not properly set!",
"Errors indicate your J1 jumpers are not properly set!"
};

const char display_no_valid_smc_bootloader_count = 9;
const char* display_no_valid_smc_bootloader_text[9] = {
"The SMC chip in your CX16 system does not contain a valid bootloader.",
"The SMC chip in your CX16 doesn't have a valid bootloader.",
"",
"A valid bootloader is needed to update the SMC chip.",
"Unfortunately, your SMC chip cannot be updated using this tool!",
"",
"You will either need to install or downgrade the bootloader onto",
"the SMC chip on your CX16 using an arduino device,",
"You will either need to install or downgrade the bootloader",
"onto the SMC chip on your CX16 using an arduino device,",
"or alternatively to order a new SMC chip from TexElec or",
"a CX16 community friend containing a valid bootloader!"
};
Expand Down
44 changes: 22 additions & 22 deletions src/cx16-update.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,26 @@ void main() {
display_info_rom(rom_chip, STATUS_NONE, NULL);
}

#ifdef __INTRO

bank_set_brom(4);
CLI();

display_progress_text(display_into_briefing_text, display_intro_briefing_count);
util_wait_space();

display_progress_text(display_into_colors_text, display_intro_colors_count);
for(unsigned char intro_status=0; intro_status<11; intro_status++) {
display_info_led(PROGRESS_X + 3, PROGRESS_Y + 3 + intro_status, status_color[intro_status], BLUE);
}
util_wait_space();
display_progress_clear();

SEI();
bank_set_brom(0);

#endif



#ifdef __SMC_CHIP_PROCESS
Expand Down Expand Up @@ -140,26 +160,6 @@ void main() {

#endif

#ifdef __INTRO

bank_set_brom(4);
CLI();

display_progress_text(display_into_briefing_text, display_intro_briefing_count);
util_wait_space();

display_progress_text(display_into_colors_text, display_intro_colors_count);
for(unsigned char intro_status=0; intro_status<11; intro_status++) {
display_info_led(PROGRESS_X + 3, PROGRESS_Y + 3 + intro_status, status_color[intro_status], BLUE);
}
util_wait_space();
display_progress_clear();

SEI();
bank_set_brom(0);

#endif


#ifdef __SMC_CHIP_PROCESS
#ifdef __SMC_CHIP_CHECK
Expand Down Expand Up @@ -443,13 +443,13 @@ void main() {
}
}

display_progress_clear();

#endif
#endif

}

display_progress_clear();

if((check_status_smc(STATUS_SKIP) || check_status_smc(STATUS_NONE)) &&
(check_status_vera(STATUS_SKIP) || check_status_vera(STATUS_NONE)) &&
check_status_roms_less(STATUS_SKIP)) {
Expand Down
Loading

0 comments on commit cbf3b8b

Please sign in to comment.