1
0
mirror of https://github.com/mist-devel/mist-firmware.git synced 2026-02-07 00:17:13 +00:00

Allow to use <corename>.hd0/hd1 to mount at boot

This commit is contained in:
Gyorgy Szombathelyi
2021-03-13 18:32:36 +01:00
parent 56dba800ea
commit 3f59afa0eb

View File

@@ -31,7 +31,8 @@ unsigned char key_remap_table[MAX_REMAP][2];
#define BREAK 0x8000
static IDXFile sd_image[2];
#define MAX_IMAGES 2
static IDXFile sd_image[MAX_IMAGES];
static char buffer[512];
static uint8_t buffer_drive_index = 0;
static uint32_t buffer_lba = 0xffffffff;
@@ -357,6 +358,15 @@ void user_io_detect_core_type() {
strcpy(s+8, "VHD");
if (FileOpen(&file, s))
user_io_file_mount(&file, 0);
else {
// check for <core>.HD0/1 files
strcpy(s+8, "HD ");
for (int i = 0; i < MAX_IMAGES; i++) {
s[10] = '0'+i;
if (FileOpen(&file, s))
user_io_file_mount(&file, i);
}
}
}