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:
OBattler
2022-12-22 02:30:25 +01:00
parent 849133dd34
commit e0c797a20f
4 changed files with 63 additions and 13 deletions

View File

@@ -347,6 +347,39 @@ device_available(const device_t *d)
return (0);
}
const char *
device_get_bios_file(const device_t *d, const char *internal_name, int file_no)
{
device_config_t *config = NULL;
device_config_bios_t *bios = NULL;
if (d != NULL) {
config = (device_config_t *) d->config;
if (config != NULL) {
while (config->type != -1) {
if (config->type == CONFIG_BIOS) {
bios = (device_config_bios_t *) config->bios;
/* Go through the ROM's in the device configuration. */
while (bios->files_no != 0) {
if (!strcmp(internal_name, bios->internal_name)) {
if (file_no < bios->files_no)
return bios->files[file_no];
else
return NULL;
}
bios++;
}
}
config++;
}
}
}
/* A NULL device is never available. */
return (NULL);
}
int
device_has_config(const device_t *d)
{