1.1 --- a/src/main.c Sun Dec 05 16:18:50 2010 +0000 1.2 +++ b/src/main.c Sun Dec 05 16:20:00 2010 +0000 1.3 @@ -188,6 +188,10 @@ 1.4 printf("Set %dx%d at %d bits-per-pixel mode\n\n", screen->w, screen->h, screen->format->BitsPerPixel); 1.5 SDL_WM_SetCaption("FreeBee 3B1 emulator", "FreeBee"); 1.6 1.7 + // Load a disc image 1.8 + FILE *disc = fopen("discim", "rb"); 1.9 + wd2797_load(&state.fdc_ctx, disc, 512, 10, 2); 1.10 + 1.11 /*** 1.12 * The 3B1 CPU runs at 10MHz, with DMA running at 1MHz and video refreshing at 1.13 * around 60Hz (???), with a 60Hz periodic interrupt. 1.14 @@ -237,5 +241,9 @@ 1.15 if (exitEmu) break; 1.16 } 1.17 1.18 + // Release the disc image 1.19 + wd2797_unload(&state.fdc_ctx); 1.20 + fclose(disc); 1.21 + 1.22 return 0; 1.23 }