mirror of
https://github.com/86Box/86Box.git
synced 2026-02-21 17:15:32 -07:00
Add the IBM PC 330/350 type 65x6. (#6315)
* Change BIOS loading (temporarily) * Change GPIO related stuff on the PC 330 65x6... CPU clock is now properly reported up to 166 MHz. * Add IBM PC 330 type 65x6 machine table entry. * Add IBM PC 330 type 65x6 machine definition. * Fix a compile breaking error. * Block AMD K5/Cx686 CPUs from the IBM PC 330/350 type 65x6. * Correct the PC 330/350 ROM path.
This commit is contained in:
@@ -917,6 +917,7 @@ extern int machine_at_acerv30_init(const machine_t *);
|
||||
extern int machine_at_apollo_init(const machine_t *);
|
||||
extern int machine_at_optiplexgxl_init(const machine_t *);
|
||||
extern int machine_at_pt2000_init(const machine_t *);
|
||||
extern int machine_at_pc330_65x6_init(const machine_t *);
|
||||
extern int machine_at_zappa_init(const machine_t *);
|
||||
extern int machine_at_powermatev_init(const machine_t *);
|
||||
extern int machine_at_hawk_init(const machine_t *);
|
||||
|
||||
@@ -427,6 +427,114 @@ machine_at_optiplexgxl_init(const machine_t *model)
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* Some stuff taken from Monaco */
|
||||
static void
|
||||
machine_at_morrison64_gpio_init(void)
|
||||
{
|
||||
uint32_t gpio = 0xffffe0cf;
|
||||
uint16_t addr;
|
||||
|
||||
/* Return to this after CS4232 PnP is working. */
|
||||
/* Register 0x0078 (Undocumented): */
|
||||
/* Bit 5,4: Vibra 16S base address: 0 = 220h, 1 = 260h, 2 = 240h, 3 = 280h. */
|
||||
/*device_context(machine_get_snd_device(machine));
|
||||
addr = device_get_config_hex16("base");
|
||||
switch (addr) {
|
||||
case 0x0220:
|
||||
gpio |= 0xffff00cf;
|
||||
break;
|
||||
case 0x0240:
|
||||
gpio |= 0xffff00ef;
|
||||
break;
|
||||
case 0x0260:
|
||||
gpio |= 0xffff00df;
|
||||
break;
|
||||
case 0x0280:
|
||||
gpio |= 0xffff00ff;
|
||||
break;
|
||||
}
|
||||
device_context_restore();*/
|
||||
|
||||
/* Register 0x0079: */
|
||||
/* Bit 7: 0 = Clear password, 1 = Keep password. */
|
||||
/* Bit 6: 0 = NVRAM cleared by jumper, 1 = NVRAM normal. */
|
||||
/* Bit 5: 0 = CMOS Setup disabled, 1 = CMOS Setup enabled. */
|
||||
/* Bit 4: External CPU clock (Switch 8). */
|
||||
/* Bit 3: External CPU clock (Switch 7). */
|
||||
/* 50 MHz: Switch 7 = Off, Switch 8 = Off. */
|
||||
/* 60 MHz: Switch 7 = On, Switch 8 = Off. */
|
||||
/* 66 MHz: Switch 7 = Off, Switch 8 = On. */
|
||||
/* Bit 2: 0 = On-board audio absent, 1 = On-board audio present. */
|
||||
/* Bit 1: 0 = Soft-off capable power supply present, 1 = Soft-off capable power supply absent. */
|
||||
/* Bit 0: 0 = 2x multiplier, 1 = 1.5x multiplier (Switch 6). */
|
||||
/* NOTE: A bit is read as 1 if switch is off, and as 0 if switch is on. */
|
||||
if (cpu_busspeed <= 50000000)
|
||||
gpio |= 0xffff0000;
|
||||
else if ((cpu_busspeed > 50000000) && (cpu_busspeed <= 60000000))
|
||||
gpio |= 0xffff0800;
|
||||
else if (cpu_busspeed > 60000000)
|
||||
gpio |= 0xffff1000;
|
||||
|
||||
if (sound_card_current[0] == SOUND_INTERNAL)
|
||||
gpio |= 0xffff0400;
|
||||
|
||||
if (cpu_dmulti <= 1.5)
|
||||
gpio |= 0xffff01af;
|
||||
else if (cpu_dmulti <= 2.0)
|
||||
gpio |= 0xffffe2af;
|
||||
if ((cpu_dmulti > 2.0) && (cpu_dmulti <= 2.5))
|
||||
gpio |= 0xffffe5cf;
|
||||
|
||||
machine_set_gpio_default(gpio);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
machine_at_morrison64_gpio_handler(uint8_t write, uint32_t val)
|
||||
{
|
||||
uint32_t ret = machine_get_gpio_default();
|
||||
|
||||
if (write) {
|
||||
ret &= ((val & 0xffffffcf) | 0xffff0000);
|
||||
ret |= (val & 0x00000030);
|
||||
|
||||
machine_set_gpio(ret);
|
||||
} else
|
||||
ret = machine_get_gpio();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_pc330_65x6_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pc330_65x6/intel.bin",
|
||||
0x000c0000, 262144, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init_ex(model, 2);
|
||||
machine_at_morrison64_gpio_init();
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x08, PCI_CARD_VIDEO, 4, 0, 0, 0);
|
||||
pci_register_slot(0x0B, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 3, 2, 4);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 1, 3, 4);
|
||||
device_add(&i430fx_device);
|
||||
device_add(&piix_device);
|
||||
device_add_params(&pc87306_device, (void *) PCX730X_AMI);
|
||||
device_add(&intel_flash_bxt_ami_device);
|
||||
|
||||
if (gfxcard[0] == VID_INTERNAL)
|
||||
device_add(machine_get_vid_device(machine));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_at_zappa_gpio_init(void)
|
||||
|
||||
@@ -12431,6 +12431,49 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
{
|
||||
.name = "[i430FX] IBM PC 330/350 type 65x6 (Intel Advanced/MN OEM)",
|
||||
.internal_name = "pc330_65x6",
|
||||
.type = MACHINE_TYPE_SOCKET5,
|
||||
.chipset = MACHINE_CHIPSET_INTEL_430FX,
|
||||
.init = machine_at_pc330_65x6_init,
|
||||
.p1_handler = machine_generic_p1_handler,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
.gpio_acpi_handler = NULL,
|
||||
.cpu = {
|
||||
.package = CPU_PKG_SOCKET5_7,
|
||||
.block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86),
|
||||
.min_bus = 50000000,
|
||||
.max_bus = 66666667,
|
||||
.min_voltage = 3380,
|
||||
.max_voltage = 3520,
|
||||
.min_multi = 1.5,
|
||||
.max_multi = 2.0
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM,
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 131072,
|
||||
.step = 8192
|
||||
},
|
||||
.nvrmask = 255,
|
||||
.jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3,
|
||||
.default_jumpered_ecp_dma = 3,
|
||||
.kbc_device = NULL,
|
||||
.kbc_params = 0x00000000,
|
||||
.kbc_p1 = 0x000044f0,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.kbd_device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = &s3_phoenix_trio64_onboard_pci_device,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* According to tests from real hardware: This has AMI MegaKey KBC firmware on the
|
||||
PC87306 Super I/O chip, command 0xA1 returns '5'.
|
||||
Command 0xA0 copyright string: (C)1994 AMI . */
|
||||
|
||||
Reference in New Issue
Block a user