1.1 --- a/src/wd2010.c Wed Jan 16 00:38:13 2013 +0000 1.2 +++ b/src/wd2010.c Wed Jan 16 00:40:18 2013 +0000 1.3 @@ -12,7 +12,9 @@ 1.4 #endif 1.5 #include "utils.h" 1.6 1.7 -#define SEEK_DELAY 30 1.8 +#ifndef WD2010_SEEK_DELAY 1.9 +#define WD2010_SEEK_DELAY 30 1.10 +#endif 1.11 1.12 #define CMD_ENABLE_RETRY 0x01 1.13 #define CMD_LONG_MODE 0x02 1.14 @@ -307,7 +309,7 @@ 1.15 case CMD_RESTORE: 1.16 // Restore. Set track to 0 and throw an IRQ. 1.17 ctx->track = 0; 1.18 - SDL_AddTimer(SEEK_DELAY, (SDL_NewTimerCallback)seek_complete, ctx); 1.19 + SDL_AddTimer(WD2010_SEEK_DELAY, (SDL_NewTimerCallback)seek_complete, ctx); 1.20 break; 1.21 case CMD_SCAN_ID: 1.22 ctx->cylinder_high_reg = (ctx->track >> 8) & 0xff; 1.23 @@ -337,7 +339,7 @@ 1.24 ctx->formatting = cmd == CMD_WRITE_FORMAT; 1.25 switch (cmd){ 1.26 case CMD_SEEK: 1.27 - SDL_AddTimer(SEEK_DELAY, (SDL_NewTimerCallback)seek_complete, ctx); 1.28 + SDL_AddTimer(WD2010_SEEK_DELAY, (SDL_NewTimerCallback)seek_complete, ctx); 1.29 break; 1.30 case CMD_READ_SECTOR: 1.31 /*XXX: does a separate function to set the head have to be added?*/ 1.32 @@ -387,7 +389,7 @@ 1.33 1.34 ctx->status = 0; 1.35 ctx->status |= (ctx->data_pos < ctx->data_len) ? SR_DRQ | SR_COMMAND_IN_PROGRESS | SR_BUSY : 0x00; 1.36 - SDL_AddTimer(SEEK_DELAY, (SDL_NewTimerCallback)transfer_seek_complete, ctx); 1.37 + SDL_AddTimer(WD2010_SEEK_DELAY, (SDL_NewTimerCallback)transfer_seek_complete, ctx); 1.38 1.39 break; 1.40 case CMD_WRITE_FORMAT: 1.41 @@ -429,7 +431,7 @@ 1.42 1.43 ctx->status = 0; 1.44 ctx->status |= (ctx->data_pos < ctx->data_len) ? SR_DRQ | SR_COMMAND_IN_PROGRESS | SR_BUSY : 0x00; 1.45 - SDL_AddTimer(SEEK_DELAY, (SDL_NewTimerCallback)transfer_seek_complete, ctx); 1.46 + SDL_AddTimer(WD2010_SEEK_DELAY, (SDL_NewTimerCallback)transfer_seek_complete, ctx); 1.47 1.48 break; 1.49 default: