Merge branch 'master' of ssh://github.com/86Box/86Box
This commit is contained in:
@@ -1177,7 +1177,7 @@ scamp_init(UNUSED(const device_t *info))
|
|||||||
dev->mem_flags[i] = MEM_FLAG_READ | MEM_FLAG_WRITE;
|
dev->mem_flags[i] = MEM_FLAG_READ | MEM_FLAG_WRITE;
|
||||||
scamp_mem_update_state(dev, i * EMS_PGSIZE, EMS_PGSIZE, 0x00, MEM_FMASK_RW);
|
scamp_mem_update_state(dev, i * EMS_PGSIZE, EMS_PGSIZE, 0x00, MEM_FMASK_RW);
|
||||||
|
|
||||||
if (i >= 60)
|
if (i >= 56)
|
||||||
scamp_mem_update_state(dev, i * EMS_PGSIZE, EMS_PGSIZE, MEM_FLAG_ROMCS, MEM_FMASK_ROMCS);
|
scamp_mem_update_state(dev, i * EMS_PGSIZE, EMS_PGSIZE, MEM_FLAG_ROMCS, MEM_FMASK_ROMCS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1079,7 +1079,14 @@ write_cmd_generic(void *priv, uint8_t val)
|
|||||||
/* The SMM handlers of Intel AMI Pentium BIOS'es expect bit 6 to be set. */
|
/* The SMM handlers of Intel AMI Pentium BIOS'es expect bit 6 to be set. */
|
||||||
if ((kbc_ven == KBC_VEN_AMI) && ((dev->flags & KBC_TYPE_MASK) == KBC_TYPE_GREEN))
|
if ((kbc_ven == KBC_VEN_AMI) && ((dev->flags & KBC_TYPE_MASK) == KBC_TYPE_GREEN))
|
||||||
fixed_bits |= 0x40;
|
fixed_bits |= 0x40;
|
||||||
if (kbc_ven == KBC_VEN_IBM_PS1) {
|
if (!strcmp(machine_get_internal_name(), "dells333sl")) {
|
||||||
|
/*
|
||||||
|
Dell System 333s/L:
|
||||||
|
- Bit 5: Stuck in reboot loop if clear.
|
||||||
|
*/
|
||||||
|
uint8_t p1 = 0x20 | (video_is_mda() ? 0x40 : 0x00);
|
||||||
|
kbc_delay_to_ob(dev, p1, 0, 0x00);
|
||||||
|
} else if (kbc_ven == KBC_VEN_IBM_PS1) {
|
||||||
current_drive = fdc_get_current_drive();
|
current_drive = fdc_get_current_drive();
|
||||||
/* (B0 or F0) | (fdd_is_525(current_drive) on bit 6) */
|
/* (B0 or F0) | (fdd_is_525(current_drive) on bit 6) */
|
||||||
kbc_delay_to_ob(dev, dev->p1 | fixed_bits | (fdd_is_525(current_drive) ? 0x40 : 0x00),
|
kbc_delay_to_ob(dev, dev->p1 | fixed_bits | (fdd_is_525(current_drive) ? 0x40 : 0x00),
|
||||||
@@ -1114,7 +1121,7 @@ write_cmd_generic(void *priv, uint8_t val)
|
|||||||
Dell 466/NP:
|
Dell 466/NP:
|
||||||
- Bit 2: Keyboard fuse (must be set);
|
- Bit 2: Keyboard fuse (must be set);
|
||||||
- Bit 4: Password disable jumper (must be clear);
|
- Bit 4: Password disable jumper (must be clear);
|
||||||
- Bit 5: Manufacturing jumper (must be set);
|
- Bit 5: Manufacturing jumper (must be set).
|
||||||
*/
|
*/
|
||||||
uint8_t p1 = 0x24;
|
uint8_t p1 = 0x24;
|
||||||
kbc_delay_to_ob(dev, p1, 0, 0x00);
|
kbc_delay_to_ob(dev, p1, 0, 0x00);
|
||||||
@@ -1123,7 +1130,7 @@ write_cmd_generic(void *priv, uint8_t val)
|
|||||||
Dell OptiPlex GXL/GXM:
|
Dell OptiPlex GXL/GXM:
|
||||||
- Bit 3: Password disable jumper (must be clear);
|
- Bit 3: Password disable jumper (must be clear);
|
||||||
- Bit 4: Keyboard fuse (must be set);
|
- Bit 4: Keyboard fuse (must be set);
|
||||||
- Bit 5: Manufacturing jumper (must be set);
|
- Bit 5: Manufacturing jumper (must be set).
|
||||||
*/
|
*/
|
||||||
uint8_t p1 = 0x30;
|
uint8_t p1 = 0x30;
|
||||||
kbc_delay_to_ob(dev, p1, 0, 0x00);
|
kbc_delay_to_ob(dev, p1, 0, 0x00);
|
||||||
|
|||||||
@@ -100,7 +100,8 @@ postcard_setui(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (strstr(machines[machine].name, " Dell ") &&
|
} else if (strstr(machines[machine].name, " Dell ") &&
|
||||||
(machine_get_chipset(machine) >= MACHINE_CHIPSET_INTEL_430FX)) {
|
((machine_get_chipset(machine) >= MACHINE_CHIPSET_INTEL_430FX) ||
|
||||||
|
(machine_get_chipset(machine) >= MACHINE_CHIPSET_VLSI_SCAMP))) {
|
||||||
char dell_diags[10] = { 0 };
|
char dell_diags[10] = { 0 };
|
||||||
|
|
||||||
if (!postcard_written[1])
|
if (!postcard_written[1])
|
||||||
@@ -225,8 +226,9 @@ postcard_init(UNUSED(const device_t *info))
|
|||||||
NULL, NULL, NULL, postcard_write, NULL, NULL, NULL);
|
NULL, NULL, NULL, postcard_write, NULL, NULL, NULL);
|
||||||
|
|
||||||
if (strstr(machines[machine].name, " Dell ") &&
|
if (strstr(machines[machine].name, " Dell ") &&
|
||||||
(machine_get_chipset(machine) >= MACHINE_CHIPSET_INTEL_430FX))
|
((machine_get_chipset(machine) >= MACHINE_CHIPSET_INTEL_430FX) ||
|
||||||
io_sethandler(0x00e0, 0x0001,
|
(machine_get_chipset(machine) >= MACHINE_CHIPSET_VLSI_SCAMP)))
|
||||||
|
io_sethandler(is486 ? 0x00e0 : 0x00e4, 0x0001,
|
||||||
NULL, NULL, NULL, NULL, NULL, postcard_writel, NULL);
|
NULL, NULL, NULL, NULL, NULL, postcard_writel, NULL);
|
||||||
|
|
||||||
return postcard_write;
|
return postcard_write;
|
||||||
|
|||||||
@@ -485,6 +485,7 @@ extern int machine_at_adi386sx_init(const machine_t *);
|
|||||||
extern int machine_at_cmdsl386sx16_init(const machine_t *);
|
extern int machine_at_cmdsl386sx16_init(const machine_t *);
|
||||||
extern int machine_at_cmdsl386sx25_init(const machine_t *);
|
extern int machine_at_cmdsl386sx25_init(const machine_t *);
|
||||||
extern int machine_at_dataexpert386sx_init(const machine_t *);
|
extern int machine_at_dataexpert386sx_init(const machine_t *);
|
||||||
|
extern int machine_at_dells333sl_init(const machine_t *);
|
||||||
extern int machine_at_if386sx_init(const machine_t *);
|
extern int machine_at_if386sx_init(const machine_t *);
|
||||||
extern int machine_at_spc6033p_init(const machine_t *);
|
extern int machine_at_spc6033p_init(const machine_t *);
|
||||||
extern int machine_at_wd76c10_init(const machine_t *);
|
extern int machine_at_wd76c10_init(const machine_t *);
|
||||||
|
|||||||
@@ -356,6 +356,7 @@ extern const device_t gd5401_isa_device;
|
|||||||
extern const device_t gd5402_isa_device;
|
extern const device_t gd5402_isa_device;
|
||||||
extern const device_t gd5402_onboard_device;
|
extern const device_t gd5402_onboard_device;
|
||||||
extern const device_t gd5420_isa_device;
|
extern const device_t gd5420_isa_device;
|
||||||
|
extern const device_t gd5420_onboard_device;
|
||||||
extern const device_t gd5422_isa_device;
|
extern const device_t gd5422_isa_device;
|
||||||
extern const device_t gd5424_vlb_device;
|
extern const device_t gd5424_vlb_device;
|
||||||
extern const device_t gd5426_isa_device;
|
extern const device_t gd5426_isa_device;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include <86box/hdc.h>
|
#include <86box/hdc.h>
|
||||||
#include <86box/nvr.h>
|
#include <86box/nvr.h>
|
||||||
#include <86box/port_6x.h>
|
#include <86box/port_6x.h>
|
||||||
|
#define USE_SIO_DETECT
|
||||||
#include <86box/sio.h>
|
#include <86box/sio.h>
|
||||||
#include <86box/serial.h>
|
#include <86box/serial.h>
|
||||||
#include <86box/video.h>
|
#include <86box/video.h>
|
||||||
@@ -760,6 +761,75 @@ machine_at_cmdsl386sx25_init(const machine_t *model)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const device_config_t dells333sl_config[] = {
|
||||||
|
// clang-format off
|
||||||
|
{
|
||||||
|
.name = "bios",
|
||||||
|
.description = "BIOS Version",
|
||||||
|
.type = CONFIG_BIOS,
|
||||||
|
.default_string = "dells333sl",
|
||||||
|
.default_int = 0,
|
||||||
|
.file_filter = "",
|
||||||
|
.spinner = { 0 },
|
||||||
|
.bios = {
|
||||||
|
{ .name = "J01 (Jostens Learning Corporation OEM)", .internal_name = "dells333sl_j01", .bios_type = BIOS_NORMAL,
|
||||||
|
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/dells333sl/DELL386.BIN", "" } },
|
||||||
|
{ .name = "A02", .internal_name = "dells333sl", .bios_type = BIOS_NORMAL,
|
||||||
|
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/dells333sl/Dell_386SX_30807_UBIOS_B400_VLSI_VL82C311_Cirrus_Logic_GD5420.bin", "" } },
|
||||||
|
{ .files_no = 0 }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ .name = "", .description = "", .type = CONFIG_END }
|
||||||
|
// clang-format on
|
||||||
|
};
|
||||||
|
|
||||||
|
const device_t dells333sl_device = {
|
||||||
|
.name = "Dell System 333s/L",
|
||||||
|
.internal_name = "dells333sl_device",
|
||||||
|
.flags = 0,
|
||||||
|
.local = 0,
|
||||||
|
.init = NULL,
|
||||||
|
.close = NULL,
|
||||||
|
.reset = NULL,
|
||||||
|
.available = NULL,
|
||||||
|
.speed_changed = NULL,
|
||||||
|
.force_redraw = NULL,
|
||||||
|
.config = dells333sl_config
|
||||||
|
};
|
||||||
|
|
||||||
|
int
|
||||||
|
machine_at_dells333sl_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"), 0);
|
||||||
|
ret = bios_load_linear(fn, 0x000e0000, 262144, 0);
|
||||||
|
memcpy(rom, &(rom[0x00020000]), 131072);
|
||||||
|
mem_mapping_set_addr(&bios_mapping, 0x0c0000, 0x40000);
|
||||||
|
mem_mapping_set_exec(&bios_mapping, rom);
|
||||||
|
device_context_restore();
|
||||||
|
|
||||||
|
if (gfxcard[0] == VID_INTERNAL)
|
||||||
|
device_add(machine_get_vid_device(machine));
|
||||||
|
|
||||||
|
machine_at_common_init_ex(model, 2);
|
||||||
|
|
||||||
|
device_add(&ide_isa_device);
|
||||||
|
|
||||||
|
device_add(&pc87311_device);
|
||||||
|
device_add(&vl82c113_device); /* The keyboard controller is part of the VL82c113. */
|
||||||
|
|
||||||
|
device_add(&vlsi_scamp_device);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
machine_at_dataexpert386sx_init(const machine_t *model)
|
machine_at_dataexpert386sx_init(const machine_t *model)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ extern const device_t vendex_device;
|
|||||||
extern const device_t c5sbm2_device;
|
extern const device_t c5sbm2_device;
|
||||||
extern const device_t sb486pv_device;
|
extern const device_t sb486pv_device;
|
||||||
extern const device_t ap5s_device;
|
extern const device_t ap5s_device;
|
||||||
|
extern const device_t dells333sl_device;
|
||||||
|
|
||||||
const machine_filter_t machine_types[] = {
|
const machine_filter_t machine_types[] = {
|
||||||
{ "None", MACHINE_TYPE_NONE },
|
{ "None", MACHINE_TYPE_NONE },
|
||||||
@@ -4942,6 +4943,47 @@ const machine_t machines[] = {
|
|||||||
.snd_device = NULL,
|
.snd_device = NULL,
|
||||||
.net_device = NULL
|
.net_device = NULL
|
||||||
},
|
},
|
||||||
|
/* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC
|
||||||
|
firmware. */
|
||||||
|
{
|
||||||
|
.name = "[SCAMP] Dell System 333s/L",
|
||||||
|
.internal_name = "dells333sl",
|
||||||
|
.type = MACHINE_TYPE_386SX,
|
||||||
|
.chipset = MACHINE_CHIPSET_VLSI_SCAMP,
|
||||||
|
.init = machine_at_dells333sl_init,
|
||||||
|
.p1_handler = NULL,
|
||||||
|
.gpio_handler = NULL,
|
||||||
|
.available_flag = MACHINE_AVAILABLE,
|
||||||
|
.gpio_acpi_handler = NULL,
|
||||||
|
.cpu = {
|
||||||
|
.package = CPU_PKG_386SX,
|
||||||
|
.block = CPU_BLOCK_NONE,
|
||||||
|
.min_bus = 10000000,
|
||||||
|
.max_bus = 33333333,
|
||||||
|
.min_voltage = 0,
|
||||||
|
.max_voltage = 0,
|
||||||
|
.min_multi = 0,
|
||||||
|
.max_multi = 0
|
||||||
|
},
|
||||||
|
.bus_flags = MACHINE_PS2,
|
||||||
|
.flags = MACHINE_IDE | MACHINE_VIDEO,
|
||||||
|
.ram = {
|
||||||
|
.min = 1024,
|
||||||
|
.max = 16384,
|
||||||
|
.step = 128
|
||||||
|
},
|
||||||
|
.nvrmask = 127,
|
||||||
|
.kbc_device = NULL,
|
||||||
|
.kbc_p1 = 0xff,
|
||||||
|
.gpio = 0xffffffff,
|
||||||
|
.gpio_acpi = 0xffffffff,
|
||||||
|
.device = &dells333sl_device,
|
||||||
|
.fdc_device = NULL,
|
||||||
|
.sio_device = NULL,
|
||||||
|
.vid_device = &gd5420_onboard_device,
|
||||||
|
.snd_device = NULL,
|
||||||
|
.net_device = NULL
|
||||||
|
},
|
||||||
/* Has IBM PS/2 Type 1 KBC firmware. */
|
/* Has IBM PS/2 Type 1 KBC firmware. */
|
||||||
{
|
{
|
||||||
.name = "[SCAMP] Samsung SPC-6033P",
|
.name = "[SCAMP] Samsung SPC-6033P",
|
||||||
|
|||||||
@@ -47,11 +47,12 @@ sio_detect_write(uint16_t port, uint8_t val, void *priv)
|
|||||||
static uint8_t
|
static uint8_t
|
||||||
sio_detect_read(uint16_t port, void *priv)
|
sio_detect_read(uint16_t port, void *priv)
|
||||||
{
|
{
|
||||||
const sio_detect_t *dev = (sio_detect_t *) priv;
|
/*const sio_detect_t *dev = (sio_detect_t *) priv*/;
|
||||||
|
uint8_t ret = 0xff /*dev->regs[port & 1]*/;
|
||||||
|
|
||||||
pclog("sio_detect_read : port=%04x = %02X\n", port, dev->regs[port & 1]);
|
pclog("sio_detect_read : port=%04x = %02X\n", port, ret);
|
||||||
|
|
||||||
return 0xff /*dev->regs[port & 1]*/;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -4247,7 +4247,10 @@ gd54xx_init(const device_t *info)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CIRRUS_ID_CLGD5420:
|
case CIRRUS_ID_CLGD5420:
|
||||||
romfn = BIOS_GD5420_PATH;
|
if (info->local & 0x200)
|
||||||
|
romfn = NULL;
|
||||||
|
else
|
||||||
|
romfn = BIOS_GD5420_PATH;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CIRRUS_ID_CLGD5422:
|
case CIRRUS_ID_CLGD5422:
|
||||||
@@ -4978,6 +4981,20 @@ const device_t gd5420_isa_device = {
|
|||||||
.config = gd542x_config,
|
.config = gd542x_config,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const device_t gd5420_onboard_device = {
|
||||||
|
.name = "Cirrus Logic GD5420 (ISA)",
|
||||||
|
.internal_name = "cl_gd5420_isa",
|
||||||
|
.flags = DEVICE_ISA16,
|
||||||
|
.local = CIRRUS_ID_CLGD5420 | 0x200,
|
||||||
|
.init = gd54xx_init,
|
||||||
|
.close = gd54xx_close,
|
||||||
|
.reset = gd54xx_reset,
|
||||||
|
.available = NULL,
|
||||||
|
.speed_changed = gd54xx_speed_changed,
|
||||||
|
.force_redraw = gd54xx_force_redraw,
|
||||||
|
.config = gd542x_config,
|
||||||
|
};
|
||||||
|
|
||||||
const device_t gd5422_isa_device = {
|
const device_t gd5422_isa_device = {
|
||||||
.name = "Cirrus Logic GD5422 (ISA)",
|
.name = "Cirrus Logic GD5422 (ISA)",
|
||||||
.internal_name = "cl_gd5422_isa",
|
.internal_name = "cl_gd5422_isa",
|
||||||
|
|||||||
Reference in New Issue
Block a user