Added WD XTA BIOS revision selection using the new CONFIG_BIOS infrastructure and some related fixes in the Win32 code.
This commit is contained in:
@@ -104,7 +104,8 @@
|
||||
|
||||
#define HDC_TIME (50 * TIMER_USEC)
|
||||
|
||||
#define WD_BIOS_FILE "roms/hdd/xta/idexywd2.bin"
|
||||
#define WD_REV_1_BIOS_FILE "roms/hdd/xta/idexywd2.bin"
|
||||
#define WD_REV_2_BIOS_FILE "roms/hdd/xta/infowdbios.rom"
|
||||
|
||||
enum {
|
||||
STATE_IDLE = 0,
|
||||
@@ -962,16 +963,11 @@ hdc_write(uint16_t port, uint8_t val, void *priv)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
xta_available(void)
|
||||
{
|
||||
return (rom_present(WD_BIOS_FILE));
|
||||
}
|
||||
|
||||
static void *
|
||||
xta_init(const device_t *info)
|
||||
{
|
||||
drive_t *drive;
|
||||
char *bios_rev = NULL;
|
||||
char *fn = NULL;
|
||||
hdc_t *dev;
|
||||
int c, i;
|
||||
@@ -990,7 +986,8 @@ xta_init(const device_t *info)
|
||||
dev->irq = device_get_config_int("irq");
|
||||
dev->rom_addr = device_get_config_hex20("bios_addr");
|
||||
dev->dma = 3;
|
||||
fn = WD_BIOS_FILE;
|
||||
bios_rev = (char *) device_get_config_bios("bios_rev");
|
||||
fn = (char *) device_get_bios_file(info, (const char *) bios_rev, 0);
|
||||
max = 1;
|
||||
break;
|
||||
|
||||
@@ -1123,6 +1120,22 @@ static const device_config_t wdxt150_config[] = {
|
||||
{ .description = "" }
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "bios_rev",
|
||||
.description = "BIOS Revision",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "rev_1",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 }, /*W1*/
|
||||
.bios = {
|
||||
{ .name = "Revision 1.0", .internal_name = "rev_1", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 8192, .files = { WD_REV_1_BIOS_FILE, "" } },
|
||||
{ .name = "Revision 2.0", .internal_name = "rev_2", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 8192, .files = { WD_REV_2_BIOS_FILE, "" } },
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format off
|
||||
};
|
||||
@@ -1135,7 +1148,7 @@ const device_t xta_wdxt150_device = {
|
||||
.init = xta_init,
|
||||
.close = xta_close,
|
||||
.reset = NULL,
|
||||
{ .available = xta_available },
|
||||
{ .available = NULL /*xta_available*/ },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = wdxt150_config
|
||||
|
||||
Reference in New Issue
Block a user