]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/z180-serv.c
set MAX_DRIVE (number of CP/M disks) from 2 to 4
[z180-stamp.git] / avr / z180-serv.c
index c80daeb4da407b2c2e06aae214d05525afa2977a..dfdb022d3fff18eafa1844209fbe2ba16d55b3c9 100644 (file)
@@ -104,15 +104,9 @@ void do_msg_echo(uint8_t subf, int len, uint8_t * msg)
 
 /* ---------------------------------------------------------------------------*/
 
-#define MAX_DEVICE     2
-#define MAX_DRIVE      2
+#define MAX_DRIVE      4
 #define BLOCK_SIZE     512
 
-struct fat_device_s {
-       FATFS dd;
-       bool active;
-};
-
 
 struct cpm_drive_s {
        uint8_t drv;
@@ -122,7 +116,6 @@ struct cpm_drive_s {
 };
 
 static uint8_t disk_buffer[BLOCK_SIZE];
-static struct fat_device_s device_table[MAX_DEVICE];
 static struct cpm_drive_s drv_table[MAX_DRIVE];
 
 /*
@@ -158,17 +151,6 @@ void do_msg_cpm_login(uint8_t subf, int len, uint8_t * msg)
                goto out;
        }
 
-       /* TODO: this has to be done somewhere globaly */
-
-       if (!device_table[0].active) {
-               f_mount(&device_table[0].dd, "0:", 0);
-               device_table[0].active = true;
-       }
-       if (!device_table[1].active) {
-               f_mount(&device_table[1].dd, "1:", 0);
-               device_table[1].active = true;
-       }
-
 /*
        uint32_t dph = ((uint32_t)msg[4] << 16) + ((uint16_t)msg[3] << 8) + msg[2];
 */
@@ -489,11 +471,6 @@ void restart_z180_serv(void)
                z80_memfifo_init(i, 0);
        bg_setstat(handle_msg_handling, 0);
 
-       f_mount(NULL, "0:", 0);
-       device_table[0].active = false;
-       f_mount(NULL, "1:", 0);
-       device_table[1].active = false;
-
 }
 
 /*--------------------------------------------------------------------------*/