Fixed booting from internal SD
This commit is contained in:
parent
3b80d10cd8
commit
3de8e37a1a
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
roms/f256k.zip
BIN
roms/f256k.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -72,6 +72,7 @@
|
|||
.public sys_txt_set_border_color
|
||||
.public sys_txt_put
|
||||
.public sys_txt_print
|
||||
.public sys_kbd_handle_irq
|
||||
|
||||
.extern proc_exit
|
||||
.extern int_enable_all
|
||||
|
@ -147,6 +148,7 @@
|
|||
.extern txt_set_border_color
|
||||
.extern txt_put
|
||||
.extern txt_print
|
||||
.extern kbd_handle_irq
|
||||
|
||||
.section jumptable
|
||||
|
||||
|
@ -224,3 +226,4 @@ sys_txt_set_border: jmp long:txt_set_border
|
|||
sys_txt_set_border_color: jmp long:txt_set_border_color
|
||||
sys_txt_put: jmp long:txt_put
|
||||
sys_txt_print: jmp long:txt_print
|
||||
sys_kbd_handle_irq: jmp long:kbd_handle_irq
|
||||
|
|
|
@ -77,3 +77,5 @@ txt_set_border
|
|||
txt_set_border_color
|
||||
txt_put
|
||||
txt_print
|
||||
|
||||
kbd_handle_irq
|
||||
|
|
20
src/boot.c
20
src/boot.c
|
@ -168,9 +168,9 @@ bool is_bootable(enum boot_src_e device, boot_record_p * boot_record) {
|
|||
break;
|
||||
|
||||
case BOOT_SRC_SD1:
|
||||
// if (fsys_stat("/sd1/fnxboot.pgx", &file_info) || fsys_stat("/sd1/fnxboot.pgz", &file_info)) {
|
||||
// return true;
|
||||
// }
|
||||
if (fsys_stat("/sd1/fnxboot.pgx", &file_info) || fsys_stat("/sd1/fnxboot.pgz", &file_info)) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -298,14 +298,17 @@ void boot_from(enum boot_src_e device, boot_record_p boot_record) {
|
|||
if (fsys_stat("/sd0/fnxboot.pgz", &file_info) >= 0) {
|
||||
printf("Booting: /sd0/fnxboot.pgz\n");
|
||||
boot_reset_screen();
|
||||
proc_run("/sd0/fnxboot.pgz", 0, boot_args);
|
||||
result = proc_run("/sd0/fnxboot.pgz", 0, boot_args);
|
||||
if (result != 0) {
|
||||
printf("Could not load /sd0/fnxboot.pgz: %d\n", result);
|
||||
}
|
||||
|
||||
} else if (fsys_stat("/sd0/fnxboot.pgx", &file_info) >= 0) {
|
||||
printf("Booting: /sd0/fnxboot.pgx\n");
|
||||
boot_reset_screen();
|
||||
result = proc_run("/sd0/fnxboot.pgx", 0, boot_args);
|
||||
if (result != 0) {
|
||||
printf("proc_run error: %d\n", result);
|
||||
printf("Could not load /sd0/fnxboot.pgx: %d\n", result);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -314,14 +317,17 @@ void boot_from(enum boot_src_e device, boot_record_p boot_record) {
|
|||
if (fsys_stat("/sd1/fnxboot.pgz", &file_info) >= 0) {
|
||||
printf("Booting: /sd1/fnxboot.pgz\n");
|
||||
boot_reset_screen();
|
||||
proc_run("/sd0/fnxboot.pgz", 0, boot_args);
|
||||
result = proc_run("/sd1/fnxboot.pgz", 0, boot_args);
|
||||
if (result != 0) {
|
||||
printf("Could not load /sd1/fnxboot.pgz: %d\n", result);
|
||||
}
|
||||
|
||||
} else if (fsys_stat("/sd1/fnxboot.pgx", &file_info) >= 0) {
|
||||
printf("Booting: /sd1/fnxboot.pgx\n");
|
||||
boot_reset_screen();
|
||||
result = proc_run("/sd1/fnxboot.pgx", 0, boot_args);
|
||||
if (result != 0) {
|
||||
printf("proc_run error: %d\n", result);
|
||||
printf("Could not load /sd1/fnxboot.pgx: %d\n", result);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -93,9 +93,6 @@ p_int_handler int_handle_25;
|
|||
p_int_handler int_handle_26;
|
||||
p_int_handler int_handle_27;
|
||||
|
||||
uint32_t * irq_ram_vector = (uint32_t *)0x00fdec;
|
||||
uint32_t * nmi_ram_vector = (uint32_t *)0x00fdf4;
|
||||
|
||||
/**
|
||||
* @brief Mapping of FoenixMCP interrupt numbers to F256 GABE group numbers (0xff indicates an unassigned interrupt number)
|
||||
*
|
||||
|
@ -137,10 +134,6 @@ void int_init() {
|
|||
int i;
|
||||
p_int_handler * int_handlers = &int_handle_00;
|
||||
|
||||
// Zero out the interrupt ram vectors
|
||||
*irq_ram_vector = 0;
|
||||
*nmi_ram_vector = 0;
|
||||
|
||||
// Clear all the interrupt handlers
|
||||
for (i = 0; i < 4 * 8; i++) {
|
||||
int_handlers[i] = 0;
|
||||
|
|
|
@ -404,7 +404,7 @@ static void kbd_process_set2_bytecode(uint8_t byte_code) {
|
|||
* @brief Handle an IRQ to query the keyboard
|
||||
*
|
||||
*/
|
||||
void kbd_handle_irq() {
|
||||
SYSTEMCALL void kbd_handle_irq() {
|
||||
// Check to see if there is a keyboard bytecode waiting... process it if so
|
||||
if ((*PS2_STAT & PS2_STAT_KBD_EMP) == 0) {
|
||||
kbd_process_set2_bytecode(*PS2_KBD_IN);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* @brief Handle an IRQ to query the keyboard
|
||||
*
|
||||
*/
|
||||
extern void kbd_handle_irq();
|
||||
extern SYSTEMCALL void kbd_handle_irq();
|
||||
|
||||
/*
|
||||
* Try to retrieve the next scancode from the keyboard.
|
||||
|
|
|
@ -293,7 +293,7 @@ void kbd_scan_optical() {
|
|||
* @brief Handle an IRQ to query the keyboard
|
||||
*
|
||||
*/
|
||||
void kbd_handle_irq() {
|
||||
SYSTEMCALL void kbd_handle_irq() {
|
||||
// The scanning process is different depending on the keyboard type:
|
||||
//
|
||||
// The mechanical keyboard is a simple matrix of keys, and we need to scan it to see
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* @brief Handle an IRQ to query the keyboard
|
||||
*
|
||||
*/
|
||||
extern void kbd_handle_irq();
|
||||
extern SYSTEMCALL void kbd_handle_irq();
|
||||
|
||||
/*
|
||||
* Try to retrieve the next scancode from the keyboard.
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
|
||||
#define VER_MAJOR 1
|
||||
#define VER_MINOR 0
|
||||
#define VER_BUILD 30
|
||||
#define VER_BUILD 32
|
||||
|
||||
#endif
|
||||
|
|
BIN
toolbox-roms-v1-00-0032.zip
Normal file
BIN
toolbox-roms-v1-00-0032.zip
Normal file
Binary file not shown.
Loading…
Reference in a new issue