Added the Shottle HOT-433A eSupport BIOS.

This commit is contained in:
OBattler
2025-06-09 20:36:21 +02:00
parent 95194556f8
commit a82bb4269f
5 changed files with 97 additions and 9 deletions

View File

@@ -187,10 +187,18 @@ fdc_ctrl_reset(void *priv)
fdc->stat = 0x80; fdc->stat = 0x80;
fdc->pnum = fdc->ptot = 0; fdc->pnum = fdc->ptot = 0;
fdc->st0 = 0; fdc->st0 = 0;
fdc->lock = 0;
fdc->head = 0; fdc->head = 0;
fdc->step = 0; fdc->step = 0;
fdc->power_down = 0; fdc->power_down = 0;
if (!fdc->lock) {
fdc->fifo = 0;
fdc->tfifo = 1;
fifo_reset(fdc->fifo_p);
fifo_set_len(fdc->fifo_p, fdc->tfifo + 1);
fifo_set_trigger_len(fdc->fifo_p, fdc->tfifo + 1);
}
} }
sector_id_t sector_id_t
@@ -2374,6 +2382,8 @@ fdc_reset(void *priv)
fdc->swwp = 0; fdc->swwp = 0;
fdc->disable_write = 0; fdc->disable_write = 0;
fdc->lock = 0;
fdc_ctrl_reset(fdc); fdc_ctrl_reset(fdc);
if (!(fdc->flags & FDC_FLAG_AT)) if (!(fdc->flags & FDC_FLAG_AT))

View File

@@ -102,4 +102,6 @@ extern int picinterrupt(void);
extern uint8_t pic_irq_ack(void); extern uint8_t pic_irq_ack(void);
extern void pic_toggle_latch(int is_ps2);
#endif /*EMU_PIC_H*/ #endif /*EMU_PIC_H*/

View File

@@ -2232,18 +2232,66 @@ machine_at_ecs486_init(const machine_t *model)
return ret; return ret;
} }
static const device_config_t hot433a_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Version",
.type = CONFIG_BIOS,
.default_string = "hot433a",
.default_int = 0,
.file_filter = "",
.spinner = { 0 },
.bios = {
{ .name = "AMI", .internal_name = "hot433a", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/433AUS33.ROM", "" } },
{ .name = "Award (eSupport update)", .internal_name = "hot433a_award", .bios_type = BIOS_NORMAL,
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/hot433/2A4X5H21.BIN", "" } },
{ .files_no = 0 }
},
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
const device_t hot433a_device = {
.name = "Shuttle HOT-433A",
.internal_name = "hot433a_device",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
.available = NULL,
.speed_changed = NULL,
.force_redraw = NULL,
.config = hot433a_config
};
int int
machine_at_hot433a_init(const machine_t *model) machine_at_hot433a_init(const machine_t *model)
{ {
int ret; int ret = 0;
const char* fn;
ret = bios_load_linear("roms/machines/hot433/433AUS33.ROM", /* No ROMs available */
0x000e0000, 131072, 0); if (!device_available(model->device))
return ret;
device_context(model->device);
int is_award = !strcmp(device_get_config_bios("bios"), "hot433a_award");
fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0);
ret = bios_load_linear(fn, 0x000e0000, 131072, 0);
device_context_restore();
if (bios_only || !ret) if (bios_only || !ret)
return ret; return ret;
machine_at_common_init(model); machine_at_common_init_ex(model, 2);
if (is_award)
device_add(&amstrad_megapc_nvr_device);
else
device_add(&ami_1994_nvr_device);
pci_init(PCI_CONFIG_TYPE_1); pci_init(PCI_CONFIG_TYPE_1);
pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
@@ -2255,9 +2303,17 @@ machine_at_hot433a_init(const machine_t *model)
device_add(&umc_hb4_device); device_add(&umc_hb4_device);
device_add(&umc_8886bf_device); device_add(&umc_8886bf_device);
device_add(&um8669f_device); if (is_award)
device_add(&um8663af_device);
else
device_add(&um8669f_device);
device_add(&winbond_flash_w29c010_device); device_add(&winbond_flash_w29c010_device);
device_add(&keyboard_at_ami_device); if (is_award)
device_add(&keyboard_ps2_ami_device);
else
device_add(&keyboard_at_ami_device);
pic_toggle_latch(is_award);
return ret; return ret;
} }

View File

@@ -69,6 +69,7 @@ extern const device_t ap5s_device;
extern const device_t d842_device; extern const device_t d842_device;
extern const device_t d943_device; extern const device_t d943_device;
extern const device_t dells333sl_device; extern const device_t dells333sl_device;
extern const device_t hot433a_device;
const machine_filter_t machine_types[] = { const machine_filter_t machine_types[] = {
{ "None", MACHINE_TYPE_NONE }, { "None", MACHINE_TYPE_NONE },
@@ -9381,7 +9382,7 @@ const machine_t machines[] = {
.min_multi = 0, .min_multi = 0,
.max_multi = 0 .max_multi = 0
}, },
.bus_flags = MACHINE_PCI, .bus_flags = MACHINE_PS2_PCI,
.flags = MACHINE_IDE_DUAL | MACHINE_APM, .flags = MACHINE_IDE_DUAL | MACHINE_APM,
.ram = { .ram = {
.min = 1024, .min = 1024,
@@ -9393,7 +9394,7 @@ const machine_t machines[] = {
.kbc_p1 = 0xff, .kbc_p1 = 0xff,
.gpio = 0xffffffff, .gpio = 0xffffffff,
.gpio_acpi = 0xffffffff, .gpio_acpi = 0xffffffff,
.device = NULL, .device = &hot433a_device,
.fdc_device = NULL, .fdc_device = NULL,
.sio_device = NULL, .sio_device = NULL,
.vid_device = NULL, .vid_device = NULL,

View File

@@ -638,6 +638,25 @@ pic_reset_hard(void)
} }
} }
void
pic_toggle_latch(int is_ps2)
{
pic_kbd_latch(0x00);
pic_mouse_latch(0x00);
/* Explicitly reset the latches. */
kbd_latch = mouse_latch = 0;
latched_irqs = 0x0000;
/* The situation is as follows: There is a giant mess when it comes to these latches on real hardware,
to the point that there's even boards with board-level latched that get used in place of the latches
on the chipset, therefore, I'm just doing this here for the sake of simplicity. */
if (is_ps2) {
pic_kbd_latch(0x01);
pic_mouse_latch(0x01);
}
}
void void
pic_init(void) pic_init(void)
{ {