Fixed bug which ejected discs on hard reset.

This commit is contained in:
TomW 2015-04-02 19:54:47 +01:00
commit 644d17fc7f
3 changed files with 14 additions and 15 deletions

View file

@ -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()
{
// pclog("disc_init %p\n", drives);
drives[0].poll = drives[1].poll = 0;
drives[0].seek = drives[1].seek = 0;
drives[0].readsector = drives[1].readsector = 0;
curdrive = 0;
disc_period = 32;
timer_add(disc_poll, &disc_poll_time, &motoron, NULL);
disc_reset();
}
int oldtrack[2] = {0, 0};

View file

@ -17,6 +17,7 @@ void disc_load(int drive, char *fn);
void disc_new(int drive, char *fn);
void disc_close(int drive);
void disc_init();
void disc_reset();
void disc_poll();
void disc_seek(int drive, int track);
void disc_readsector(int drive, int sector, int track, int side, int density);

View file

@ -220,16 +220,16 @@ void initpc()
mem_init();
loadbios();
mem_add_bios();
disc_load(0, discfns[0]);
disc_load(1, discfns[1]);
timer_reset();
sound_reset();
fdc_init();
disc_init();
fdi_init();
img_init();
disc_load(0, discfns[0]);
disc_load(1, discfns[1]);
//loadfont();
loadnvr();
@ -286,15 +286,8 @@ void resetpchard()
sound_reset();
mem_resize();
fdc_init();
disc_init();
fdi_init();
img_init();
disc_reset();
disc_close(0);
disc_close(1);
disc_load(0, discfns[0]);
disc_load(1, discfns[1]);
model_init();
video_init();
speaker_init();