add machine Multitech PC-500 with BIOS ROM v3.10 and v3.30

This commit is contained in:
Bozo Scum
2025-09-09 12:39:41 +08:00
parent fb64862fcf
commit a5a9ca148e
3 changed files with 122 additions and 0 deletions

View File

@@ -1319,6 +1319,10 @@ extern const device_t jukopc_device;
extern int machine_xt_jukopc_init(const machine_t *); extern int machine_xt_jukopc_init(const machine_t *);
extern int machine_xt_kaypropc_init(const machine_t *); extern int machine_xt_kaypropc_init(const machine_t *);
extern int machine_xt_micoms_xl7turbo_init(const machine_t *); extern int machine_xt_micoms_xl7turbo_init(const machine_t *);
#ifdef EMU_DEVICE_H
extern const device_t pc500_device;
#endif
extern int machine_xt_pc500_init(const machine_t *);
extern int machine_xt_pc500plus_init(const machine_t *); extern int machine_xt_pc500plus_init(const machine_t *);
extern int machine_xt_pc700_init(const machine_t *); extern int machine_xt_pc700_init(const machine_t *);
extern int machine_xt_pc4i_init(const machine_t *); extern int machine_xt_pc4i_init(const machine_t *);

View File

@@ -974,6 +974,81 @@ machine_xt_micoms_xl7turbo_init(const machine_t *model)
return ret; return ret;
} }
static const device_config_t pc500_config[] = {
// clang-format off
{
.name = "bios",
.description = "BIOS Version",
.type = CONFIG_BIOS,
.default_string = "pc500_330",
.default_int = 0,
.file_filter = NULL,
.spinner = { 0 },
.bios = {
{
.name = "3.30",
.internal_name = "pc500_330",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { "roms/machines/pc500/rom330.bin", "" }
},
{
.name = "3.10",
.internal_name = "pc500_310",
.bios_type = BIOS_NORMAL,
.files_no = 1,
.local = 0,
.size = 8192,
.files = { "roms/machines/pc500/rom310.bin", "" }
},
{ .files_no = 0 }
},
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};
const device_t pc500_device = {
.name = "Multitech PC-500",
.internal_name = "pc500_device",
.flags = 0,
.local = 0,
.init = NULL,
.close = NULL,
.reset = NULL,
.available = NULL,
.speed_changed = NULL,
.force_redraw = NULL,
.config = pc500_config
};
int
machine_xt_pc500_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(model->device, device_get_config_bios("bios"), 0);
ret = bios_load_linear(fn, 0x000fe000, 8192, 0);
device_context_restore();
if (bios_only || !ret)
return ret;
device_add(&kbc_pc_device);
machine_xt_common_init(model, 0);
return ret;
}
int int
machine_xt_pc500plus_init(const machine_t *model) machine_xt_pc500plus_init(const machine_t *model)
{ {

View File

@@ -1094,6 +1094,49 @@ const machine_t machines[] = {
.snd_device = NULL, .snd_device = NULL,
.net_device = NULL .net_device = NULL
}, },
{
.name = "[8088] Multitech PC-500",
.internal_name = "pc500",
.type = MACHINE_TYPE_8088,
.chipset = MACHINE_CHIPSET_DISCRETE,
.init = machine_xt_pc500_init,
.p1_handler = NULL,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_8088,
.block = CPU_BLOCK_NONE,
.min_bus = 0,
.max_bus = 0,
.min_voltage = 0,
.max_voltage = 0,
.min_multi = 0,
.max_multi = 0
},
.bus_flags = MACHINE_PC,
.flags = MACHINE_FLAGS_NONE,
.ram = {
.min = 128,
.max = 640,
.step = 64
},
.nvrmask = 0,
.jumpered_ecp_dma = 0,
.default_jumpered_ecp_dma = -1,
.kbc_device = &kbc_pc_device,
.kbc_params = 0x00000000,
.kbc_p1 = 0xff,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = &pc500_device,
.kbd_device = &keyboard_pc_xt_device,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
},
{ {
.name = "[8088] Multitech PC-500 plus", .name = "[8088] Multitech PC-500 plus",
.internal_name = "pc500plus", .internal_name = "pc500plus",