1.1 --- a/src/state.c Sun Dec 05 16:18:50 2010 +0000 1.2 +++ b/src/state.c Sun Dec 05 16:20:00 2010 +0000 1.3 @@ -2,6 +2,7 @@ 1.4 #include <stddef.h> 1.5 #include <malloc.h> 1.6 #include <stdio.h> 1.7 +#include "wd279x.h" 1.8 #include "state.h" 1.9 1.10 int state_init(size_t ramsize) 1.11 @@ -60,6 +61,9 @@ 1.12 fclose(r14c); 1.13 fclose(r15c); 1.14 1.15 + // Initialise the disc controller 1.16 + wd2797_init(&state.fdc_ctx); 1.17 + 1.18 return 0; 1.19 } 1.20 1.21 @@ -69,6 +73,9 @@ 1.22 free(state.ram); 1.23 state.ram = NULL; 1.24 } 1.25 + 1.26 + // Deinitialise the disc controller 1.27 + wd2797_done(&state.fdc_ctx); 1.28 } 1.29 1.30