1
0
mirror of https://github.com/mist-devel/mist-firmware.git synced 2026-04-18 00:26:36 +00:00

MiST2: handle FDC via user_io_file_mount

This commit is contained in:
Gyorgy Szombathelyi
2019-08-08 21:55:50 +02:00
parent 2e5ab6e911
commit 58e8a0dfa3

11
tos.c
View File

@@ -575,7 +575,6 @@ static void mist_get_dmastate() {
}
// check if fdc is busy
if(buffer[8] & 0x01) {
spi_newspeed = SPI_SLOW_CLK_VALUE;
handle_fdc(buffer);
}
}
@@ -1219,6 +1218,16 @@ void tos_insert_disk(char i, fileTYPE *file) {
fdd_image[i].sides = 1;
fdd_image[i].spt = 0;
if (user_io_core_type() == CORE_TYPE_MIST2) {
user_io_file_mount(NULL, i);
if (file) {
user_io_file_mount(file, i);
fdd_image[i].file = *file;
tos_update_sysctrl(config.system_ctrl);
}
return;
}
// no new disk given?
if(!file) return;