Add a version of the XTIDE Universal BIOS for V20/V30 CPUs

This commit is contained in:
Alexander Babikov
2022-12-04 22:45:51 +05:00
parent 6a2cfbe929
commit a93efb68e1
3 changed files with 30 additions and 2 deletions

View File

@@ -45,6 +45,7 @@
#include <86box/hdc_ide.h>
#define ROM_PATH_XT "roms/hdd/xtide/ide_xt.bin"
#define ROM_PATH_XTP "roms/hdd/xtide/ide_xtp.bin"
#define ROM_PATH_AT "roms/hdd/xtide/ide_at.bin"
#define ROM_PATH_PS2 "roms/hdd/xtide/SIDE1V12.BIN"
#define ROM_PATH_PS2AT "roms/hdd/xtide/ide_at_1_1_5.bin"
@@ -130,8 +131,13 @@ xtide_init(const device_t *info)
memset(xtide, 0x00, sizeof(xtide_t));
rom_init(&xtide->bios_rom, ROM_PATH_XT,
0xc8000, 0x2000, 0x1fff, 0, MEM_MAPPING_EXTERNAL);
if (info->local == 1) {
rom_init(&xtide->bios_rom, ROM_PATH_XTP,
0xc8000, 0x2000, 0x1fff, 0, MEM_MAPPING_EXTERNAL);
} else {
rom_init(&xtide->bios_rom, ROM_PATH_XT,
0xc8000, 0x2000, 0x1fff, 0, MEM_MAPPING_EXTERNAL);
}
xtide->ide_board = ide_xtide_init();
@@ -148,6 +154,12 @@ xtide_available(void)
return (rom_present(ROM_PATH_XT));
}
static int
xtide_plus_available(void)
{
return (rom_present(ROM_PATH_XTP));
}
static void *
xtide_at_init(const device_t *info)
{
@@ -258,6 +270,20 @@ const device_t xtide_device = {
.config = NULL
};
const device_t xtide_plus_device = {
.name = "PC/XT XTIDE (V20/V30/8018x)",
.internal_name = "xtide_plus",
.flags = DEVICE_ISA,
.local = 1,
.init = xtide_init,
.close = xtide_close,
.reset = NULL,
{ .available = xtide_plus_available },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
const device_t xtide_at_device = {
.name = "PC/AT XTIDE",
.internal_name = "xtide_at",