From a320da78165277e1068de2a9e09bf6fe4d3e1155 Mon Sep 17 00:00:00 2001 From: daviunic Date: Mon, 4 May 2020 19:54:16 +0200 Subject: [PATCH] Added Zenith Z-150 machine Needs more work (DIP switches and jumpers emulation). --- src/include/86box/machine.h | 1 + src/machine/m_xt_zenith.c | 21 +++++++++++++++++++++ src/machine/machine_table.c | 1 + 3 files changed, 23 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 5cf520dbf..0d86cdd3d 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -434,6 +434,7 @@ extern const device_t *t1200_get_device(void); /* m_xt_zenith.c */ extern int machine_xt_zenith_init(const machine_t *); +extern int machine_xt_z150_init(const machine_t *); /* m_xt_xi8088.c */ extern int machine_xt_xi8088_init(const machine_t *); diff --git a/src/machine/m_xt_zenith.c b/src/machine/m_xt_zenith.c index 0d527d20b..9a87b563d 100644 --- a/src/machine/m_xt_zenith.c +++ b/src/machine/m_xt_zenith.c @@ -130,3 +130,24 @@ machine_xt_zenith_init(const machine_t *model) return ret; } + +int +machine_xt_z150_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear(L"roms/machines/z150/BIOS-Z150-1988.bin", + 0x000f8000, 32768, 0); + + if (bios_only || !ret) + return ret; + + device_add(&keyboard_pc82_device); + device_add(&zenith_scratchpad_device); + machine_common_init(model); + pit_ctr_set_out_func(&pit->counters[1], pit_refresh_timer_xt); + device_add(&fdc_xt_device); + nmi_init(); + + return ret; +} diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 2ce007f51..4c06743fa 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -67,6 +67,7 @@ const machine_t machines[] = { { "[8088] DTK XT clone", "dtk", {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 64, 640, 64, 0, machine_xt_dtk_init, NULL }, { "[8088] IBM PC (1981)", "ibmpc", {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 16, 64, 16, 0, machine_pc_init, NULL }, { "[8088] IBM PC (1982)", "ibmpc82", {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 256, 256, 256, 0, machine_pc82_init, NULL }, + { "[8088] Zenith Data Z-150", "z150", {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 128, 640, 64, 0, machine_xt_z150_init, NULL }, { "[8088] IBM PCjr", "ibmpcjr", {{"Intel", cpus_pcjr}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_VIDEO | MACHINE_VIDEO_FIXED, 128, 640, 128, 0, machine_pcjr_init, pcjr_get_device }, { "[8088] IBM XT (1982)", "ibmxt", {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 64, 256, 64, 0, machine_xt_init, NULL }, { "[8088] IBM XT (1986)", "ibmxt86", {{"Intel", cpus_8088}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA, 256, 640, 64, 0, machine_xt86_init, NULL },