CD-ROM code clean-ups, also reduces memory usage by a further about 2 MB.

This commit is contained in:
OBattler
2018-03-17 20:32:20 +01:00
parent f8f889b72c
commit a59dc8e436
13 changed files with 869 additions and 605 deletions

View File

@@ -8,7 +8,7 @@
*
* Common code to handle all sorts of disk controllers.
*
* Version: @(#)hdc.c 1.0.9 2018/02/14
* Version: @(#)hdc.c 1.0.10 2018/03/17
*
* Authors: Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
@@ -24,6 +24,7 @@
#include "../machine/machine.h"
#include "../device.h"
#include "hdc.h"
#include "hdc_ide.h"
char *hdc_name; /* configured HDC name */
@@ -158,6 +159,15 @@ hdc_reset(void)
/* If we have a valid controller, add its device. */
if (hdc_current > 1)
device_add(controllers[hdc_current].device);
/* Reconfire and reset the IDE layer. */
ide_ter_disable();
ide_qua_disable();
if (ide_enable[2])
ide_ter_init();
if (ide_enable[3])
ide_qua_init();
ide_reset_hard();
}