diff --git a/src/machine/m_at_socket5.c b/src/machine/m_at_socket5.c index 0d50fead8..47d13d941 100644 --- a/src/machine/m_at_socket5.c +++ b/src/machine/m_at_socket5.c @@ -394,6 +394,84 @@ machine_at_hawk_init(const machine_t *model) return ret; } +int +machine_at_d858_init(const machine_t *model) + +{ + int ret = 0; + const char* fn; + + /* No ROMs available */ + if (!device_available(model->device)) + return ret; + + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios_versions"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + + machine_at_common_init_ex(model, 2); + device_add(&amstrad_megapc_nvr_device); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 3, 2, 4); /* Slot 01 */ + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 3, 4); /* Slot 02 */ + device_add(&keyboard_ps2_ami_pci_device); + device_add(&i430fx_rev02_device); + device_add(&piix_rev02_device); + device_add(&fdc37c665_device); + device_add(&intel_flash_bxt_device); + + + if (sound_card_current[0] == SOUND_INTERNAL) + device_add(&sb_vibra16s_onboard_device); + + return ret; +} + + +static const device_config_t d858_config[] = { + // clang-format off + { + .name = "bios_versions", + .description = "BIOS Versions", + .type = CONFIG_BIOS, + .default_string = "d858", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "Version 4.04 Revision 1.00.858 (04/25/1995)", .internal_name = "d858", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d858/d858.bin", "" } }, + { .name = "Version 4.04 Revision 1.07.858 (08/06/1996)", .internal_name = "d858_aug96", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d858/d858aug96.bin", "" } }, + { .name = "Version 4.05 Revision 2.00.858 (09/24/1997)", .internal_name = "d858_sept97", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/d858/d858_sept97.bin", "" } }, + + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + + + +const device_t d858_device = { + .name = "Siemens-Nixdorf D858", + .internal_name = "d858", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = &d858_config[0] +}; + int machine_at_pt2000_init(const machine_t *model) {