42 |
|
#define DEBUG 0 |
43 |
|
#include "debug.h" |
44 |
|
|
45 |
+ |
|
46 |
+ |
// Check for inserted disks by polling? |
47 |
|
#ifdef AMIGA |
48 |
< |
#define DISK_INSERT_CHECK 1 // Check for inserted disks (problem: on most hardware, disks are not ejected and automatically remounted) |
48 |
> |
#define DISK_INSERT_CHECK 1 |
49 |
|
#else |
50 |
|
#define DISK_INSERT_CHECK 0 |
51 |
|
#endif |
125 |
|
uint32 SonyDiskIconAddr; |
126 |
|
uint32 SonyDriveIconAddr; |
127 |
|
|
126 |
– |
// Number of ticks between checks for disk insertion |
127 |
– |
const int driver_delay = 120; |
128 |
– |
|
128 |
|
// Flag: Control(accRun) has been called, interrupt routine is now active |
129 |
|
static bool acc_run_called = false; |
130 |
|
|
519 |
|
|
520 |
|
|
521 |
|
/* |
522 |
< |
* Driver interrupt routine - check for volumes to be mounted |
522 |
> |
* Driver interrupt routine (1Hz) - check for volumes to be mounted |
523 |
|
*/ |
524 |
|
|
525 |
|
void SonyInterrupt(void) |
526 |
|
{ |
528 |
– |
static int tick_count = 0; |
527 |
|
if (!acc_run_called) |
528 |
|
return; |
529 |
|
|
530 |
< |
tick_count++; |
533 |
< |
if (tick_count > driver_delay) { |
534 |
< |
tick_count = 0; |
535 |
< |
mount_mountable_volumes(); |
536 |
< |
} |
530 |
> |
mount_mountable_volumes(); |
531 |
|
} |