Fixed bug which ejected discs on hard reset.
This commit is contained in:
parent
1098b1f870
commit
644d17fc7f
3 changed files with 14 additions and 15 deletions
11
src/disc.c
11
src/disc.c
|
|
@ -141,15 +141,20 @@ void disc_set_rate(int rate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void disc_reset()
|
||||||
|
{
|
||||||
|
curdrive = 0;
|
||||||
|
disc_period = 32;
|
||||||
|
timer_add(disc_poll, &disc_poll_time, &motoron, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void disc_init()
|
void disc_init()
|
||||||
{
|
{
|
||||||
// pclog("disc_init %p\n", drives);
|
// pclog("disc_init %p\n", drives);
|
||||||
drives[0].poll = drives[1].poll = 0;
|
drives[0].poll = drives[1].poll = 0;
|
||||||
drives[0].seek = drives[1].seek = 0;
|
drives[0].seek = drives[1].seek = 0;
|
||||||
drives[0].readsector = drives[1].readsector = 0;
|
drives[0].readsector = drives[1].readsector = 0;
|
||||||
curdrive = 0;
|
disc_reset();
|
||||||
disc_period = 32;
|
|
||||||
timer_add(disc_poll, &disc_poll_time, &motoron, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int oldtrack[2] = {0, 0};
|
int oldtrack[2] = {0, 0};
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ void disc_load(int drive, char *fn);
|
||||||
void disc_new(int drive, char *fn);
|
void disc_new(int drive, char *fn);
|
||||||
void disc_close(int drive);
|
void disc_close(int drive);
|
||||||
void disc_init();
|
void disc_init();
|
||||||
|
void disc_reset();
|
||||||
void disc_poll();
|
void disc_poll();
|
||||||
void disc_seek(int drive, int track);
|
void disc_seek(int drive, int track);
|
||||||
void disc_readsector(int drive, int sector, int track, int side, int density);
|
void disc_readsector(int drive, int sector, int track, int side, int density);
|
||||||
|
|
|
||||||
15
src/pc.c
15
src/pc.c
|
|
@ -221,9 +221,6 @@ void initpc()
|
||||||
loadbios();
|
loadbios();
|
||||||
mem_add_bios();
|
mem_add_bios();
|
||||||
|
|
||||||
disc_load(0, discfns[0]);
|
|
||||||
disc_load(1, discfns[1]);
|
|
||||||
|
|
||||||
timer_reset();
|
timer_reset();
|
||||||
sound_reset();
|
sound_reset();
|
||||||
fdc_init();
|
fdc_init();
|
||||||
|
|
@ -231,6 +228,9 @@ void initpc()
|
||||||
fdi_init();
|
fdi_init();
|
||||||
img_init();
|
img_init();
|
||||||
|
|
||||||
|
disc_load(0, discfns[0]);
|
||||||
|
disc_load(1, discfns[1]);
|
||||||
|
|
||||||
//loadfont();
|
//loadfont();
|
||||||
loadnvr();
|
loadnvr();
|
||||||
sound_init();
|
sound_init();
|
||||||
|
|
@ -286,14 +286,7 @@ void resetpchard()
|
||||||
sound_reset();
|
sound_reset();
|
||||||
mem_resize();
|
mem_resize();
|
||||||
fdc_init();
|
fdc_init();
|
||||||
disc_init();
|
disc_reset();
|
||||||
fdi_init();
|
|
||||||
img_init();
|
|
||||||
|
|
||||||
disc_close(0);
|
|
||||||
disc_close(1);
|
|
||||||
disc_load(0, discfns[0]);
|
|
||||||
disc_load(1, discfns[1]);
|
|
||||||
|
|
||||||
model_init();
|
model_init();
|
||||||
video_init();
|
video_init();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue