mirror of
https://github.com/86Box/86Box.git
synced 2026-02-21 17:15:32 -07:00
Added the Sanyo MBC-17, Sharp AX 286, ECS Socket 4 machine, LG Multinet x52, and Taken Socket 4/5 machine, also IDE PIO mode 3+ fixes, and ATA-3 IDE drives now default to PIO mode 3 maximum instead of 0.
This commit is contained in:
@@ -60,6 +60,7 @@ add_library(chipset OBJECT
|
||||
opti895.c
|
||||
opti5x7.c
|
||||
philips.c
|
||||
sanyo.c
|
||||
scamp.c
|
||||
scat.c
|
||||
sis_85c310.c
|
||||
|
||||
123
src/chipset/sanyo.c
Normal file
123
src/chipset/sanyo.c
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Emulation of the Philips XT-compatible machines.
|
||||
*
|
||||
* Authors: EngiNerd <webmaster.crrc@yahoo.it>
|
||||
*
|
||||
* Copyright 2020-2025 EngiNerd.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/nmi.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/gameport.h>
|
||||
#include <86box/ibm_5161.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
typedef struct sanyo_t {
|
||||
uint8_t reg;
|
||||
} sanyo_t;
|
||||
|
||||
#ifdef ENABLE_SANYO_LOG
|
||||
int sanyo_do_log = ENABLE_SANYO_LOG;
|
||||
|
||||
static void
|
||||
sanyo_log(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (sanyo_do_log) {
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define sanyo_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
static void
|
||||
sanyo_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
sanyo_t *dev = (sanyo_t *) priv;
|
||||
|
||||
dev->reg = val;
|
||||
|
||||
cpu_waitstates = !(val & 0x01);
|
||||
cpu_update_waitstates();
|
||||
|
||||
sanyo_log("Sanyo MBC-17 Mainboard: Write %02x at %02x\n", val, port);
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
sanyo_read(uint16_t port, void *priv)
|
||||
{
|
||||
const sanyo_t *dev = (sanyo_t *) priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
ret = dev->reg;
|
||||
|
||||
sanyo_log("Sanyo MBC-17 Mainboard: Read %02x at %02x\n", ret, port);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
sanyo_close(void *priv)
|
||||
{
|
||||
sanyo_t *dev = (sanyo_t *) priv;
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
static void *
|
||||
sanyo_init(UNUSED(const device_t *info))
|
||||
{
|
||||
sanyo_t *dev = (sanyo_t *) calloc(1, sizeof(sanyo_t));
|
||||
|
||||
dev->reg = cpu_waitstates ? 0x00 : 0x01;
|
||||
|
||||
io_sethandler(0x0063, 0x01, sanyo_read, NULL, NULL, sanyo_write, NULL, NULL, dev);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
const device_t sanyo_device = {
|
||||
.name = "Sanyo MBC-17 Mainboard",
|
||||
.internal_name = "sanyo",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = sanyo_init,
|
||||
.close = sanyo_close,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
@@ -1896,6 +1896,7 @@ read_p1(atkbc_t *dev)
|
||||
ret = dev->p1 | fixed_bits;
|
||||
|
||||
dev->p1 = ((dev->p1 + 1) & 3) | (dev->p1 & 0xfc);
|
||||
pclog("P1 = %02X\n", dev->p1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ static int
|
||||
ide_get_max(const ide_t *ide, const int type)
|
||||
{
|
||||
const int ata_4 = ide_is_ata4(ide_boards[ide->board]);
|
||||
const int max[2][4] = { { 0, -1, -1, -1 }, { 4, 2, 2, 5 } };
|
||||
const int max[2][4] = { { 3, -1, -1, -1 }, { 4, 2, 2, 5 } };
|
||||
int ret;
|
||||
|
||||
if (ide->type == IDE_ATAPI)
|
||||
@@ -495,7 +495,7 @@ static int
|
||||
ide_get_timings(const ide_t *ide, const int type)
|
||||
{
|
||||
const int ata_4 = ide_is_ata4(ide_boards[ide->board]);
|
||||
const int timings[2][3] = { { 0, 0, 0 }, { 120, 120, 0 } };
|
||||
const int timings[2][3] = { { 0, 240, 180 }, { 120, 120, 120 } };
|
||||
int ret;
|
||||
|
||||
if (ide->type == IDE_ATAPI)
|
||||
@@ -666,8 +666,9 @@ ide_identify(ide_t *ide)
|
||||
ide->buffer[88] = 0x0000;
|
||||
|
||||
if (max_pio >= 3) {
|
||||
ide->buffer[49] |= 0x0c00;
|
||||
ide->buffer[53] |= 0x0002;
|
||||
ide->buffer[67] = ide_get_timings(ide, TIMINGS_PIO);
|
||||
ide->buffer[67] = ide_get_timings(ide, TIMINGS_PIO_FC);
|
||||
ide->buffer[68] = ide_get_timings(ide, TIMINGS_PIO_FC);
|
||||
for (i = 3; i <= max_pio; i++)
|
||||
ide->buffer[64] |= (1 << (i - 3));
|
||||
@@ -710,12 +711,8 @@ ide_identify(ide_t *ide)
|
||||
}
|
||||
|
||||
if (ide->mdma_mode != -1) {
|
||||
d = (ide->mdma_mode & 0xff);
|
||||
d <<= 8;
|
||||
if ((ide->mdma_mode & 0x300) == 0x000) {
|
||||
if ((ide->mdma_mode & 0xff) >= 3)
|
||||
ide->buffer[64] |= d;
|
||||
} else if ((ide->mdma_mode & 0x300) == 0x100)
|
||||
d = (ide->mdma_mode & 0xff) << 8;
|
||||
if ((ide->mdma_mode & 0x300) == 0x100)
|
||||
ide->buffer[62] |= d;
|
||||
else if ((ide->mdma_mode & 0x300) == 0x200)
|
||||
ide->buffer[63] |= d;
|
||||
@@ -829,6 +826,7 @@ ide_set_features(ide_t *ide)
|
||||
int mode;
|
||||
int submode;
|
||||
int max;
|
||||
int max_pio_submode;
|
||||
|
||||
features = ide->tf->cylprecomp;
|
||||
features_data = ide->tf->secount;
|
||||
@@ -844,9 +842,10 @@ ide_set_features(ide_t *ide)
|
||||
|
||||
switch (mode) {
|
||||
case 0x00: /* PIO default */
|
||||
if (submode != 0)
|
||||
max = ide_get_max(ide, TYPE_PIO);
|
||||
max_pio_submode = (max >= 3) ? 1 : 0;
|
||||
if (submode > max_pio_submode)
|
||||
return 0;
|
||||
max = ide_get_max(ide, TYPE_PIO);
|
||||
ide->mdma_mode = (1 << max);
|
||||
ide_log("IDE %02X: Setting DPIO mode: %02X, %08X\n", ide->channel,
|
||||
submode, ide->mdma_mode);
|
||||
|
||||
@@ -45,7 +45,7 @@ typedef struct cmd640_t {
|
||||
uint8_t pci;
|
||||
uint8_t irq_state;
|
||||
uint8_t pci_slot;
|
||||
uint8_t pad0;
|
||||
uint8_t force_on;
|
||||
uint8_t regs[256];
|
||||
uint32_t local;
|
||||
int irq_mode[2];
|
||||
@@ -143,7 +143,7 @@ cmd640_ide_handlers(cmd640_t *dev)
|
||||
ide_set_base(0, main);
|
||||
ide_set_side(0, side);
|
||||
|
||||
if (dev->regs[0x04] & 0x01)
|
||||
if ((dev->regs[0x04] & 0x01) || dev->force_on)
|
||||
ide_pri_enable();
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ cmd640_ide_handlers(cmd640_t *dev)
|
||||
ide_set_base(1, main);
|
||||
ide_set_side(1, side);
|
||||
|
||||
if ((dev->regs[0x04] & 0x01) && (dev->regs[0x51] & 0x08))
|
||||
if (((dev->regs[0x04] & 0x01) || dev->force_on) && (dev->regs[0x51] & 0x08))
|
||||
ide_sec_enable();
|
||||
}
|
||||
}
|
||||
@@ -512,6 +512,7 @@ cmd640_init(const device_t *info)
|
||||
dev->local = info->local;
|
||||
|
||||
dev->channels = ((info->local & 0x60000) >> 17) & 0x03;
|
||||
dev->force_on = !!(info->local & 0x100000);
|
||||
|
||||
if (info->flags & DEVICE_PCI) {
|
||||
device_add(&ide_pci_2ch_device);
|
||||
|
||||
@@ -2016,7 +2016,7 @@ mo_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
|
||||
|
||||
switch (type) {
|
||||
case TYPE_PIO:
|
||||
ret = ide_has_dma ? 3 : 0;
|
||||
ret = 3;
|
||||
break;
|
||||
case TYPE_SDMA:
|
||||
default:
|
||||
@@ -2043,10 +2043,10 @@ mo_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
|
||||
ret = ide_has_dma ? 0x96 : 0;
|
||||
break;
|
||||
case TIMINGS_PIO:
|
||||
ret = ide_has_dma ? 0xb4 : 0;
|
||||
ret = 0xf0;
|
||||
break;
|
||||
case TIMINGS_PIO_FC:
|
||||
ret = ide_has_dma ? 0xb4 : 0;
|
||||
ret = 0xb4;
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
|
||||
@@ -2090,7 +2090,7 @@ rdisk_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
|
||||
|
||||
switch (type) {
|
||||
case TYPE_PIO:
|
||||
ret = ide_has_dma ? 3 : 0;
|
||||
ret = 3;
|
||||
break;
|
||||
case TYPE_SDMA:
|
||||
default:
|
||||
@@ -2117,10 +2117,10 @@ rdisk_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int typ
|
||||
ret = ide_has_dma ? 0x96 : 0;
|
||||
break;
|
||||
case TIMINGS_PIO:
|
||||
ret = ide_has_dma ? 0xb4 : 0;
|
||||
ret = 0xf0;
|
||||
break;
|
||||
case TIMINGS_PIO_FC:
|
||||
ret = ide_has_dma ? 0xb4 : 0;
|
||||
ret = 0xb4;
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
|
||||
@@ -151,6 +151,9 @@ extern const device_t opti5x7_pci_device;
|
||||
/* Philips */
|
||||
extern const device_t philips_device;
|
||||
|
||||
/* Sanyo */
|
||||
extern const device_t sanyo_device;
|
||||
|
||||
/* SiS */
|
||||
extern const device_t rabbit_device;
|
||||
extern const device_t sis_85c401_device;
|
||||
|
||||
@@ -196,6 +196,7 @@ enum {
|
||||
MACHINE_TYPE_486_S3_PCI,
|
||||
MACHINE_TYPE_486_MISC,
|
||||
MACHINE_TYPE_SOCKET4,
|
||||
MACHINE_TYPE_SOCKET4_5,
|
||||
MACHINE_TYPE_SOCKET5,
|
||||
MACHINE_TYPE_SOCKET7_3V,
|
||||
MACHINE_TYPE_SOCKET7,
|
||||
@@ -498,6 +499,8 @@ extern int machine_at_ibmatpx_init(const machine_t *);
|
||||
/* IBM AT with Quadtel BIOS */
|
||||
extern int machine_at_ibmatquadtel_init(const machine_t *);
|
||||
extern int machine_at_pb286_init(const machine_t *);
|
||||
extern int machine_at_mbc17_init(const machine_t *);
|
||||
extern int machine_at_ax286_init(const machine_t *);
|
||||
/* Siemens PCD-2L. N82330 discrete machine. It segfaults in some places */
|
||||
extern int machine_at_siemens_init(const machine_t *);
|
||||
|
||||
@@ -860,6 +863,11 @@ extern int machine_at_p5vl_init(const machine_t *);
|
||||
extern int machine_at_excaliburpci2_init(const machine_t *);
|
||||
extern void machine_at_sp4_common_init(const machine_t *model);
|
||||
extern int machine_at_p5sp4_init(const machine_t *);
|
||||
extern int machine_at_ecs50x_init(const machine_t *);
|
||||
|
||||
/* m_at_socket4_5.c */
|
||||
/* OPTi 597 */
|
||||
extern int machine_at_pci56001_init(const machine_t *);
|
||||
|
||||
/* m_at_socket5.c */
|
||||
/* i430NX */
|
||||
@@ -972,6 +980,10 @@ extern int machine_at_p5vxb_init(const machine_t *);
|
||||
extern int machine_at_p55va_init(const machine_t *);
|
||||
extern int machine_at_gw2kte_init(const machine_t *);
|
||||
extern int machine_at_brio80xx_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t lgibmx52_device;
|
||||
#endif
|
||||
extern int machine_at_lgibmx52_init(const machine_t *);
|
||||
extern int machine_at_pb680_init(const machine_t *);
|
||||
extern int machine_at_pb810_init(const machine_t *);
|
||||
extern int machine_at_mb520n_init(const machine_t *);
|
||||
|
||||
@@ -45,6 +45,7 @@ add_library(mch OBJECT
|
||||
m_at_socket3_pci.c
|
||||
m_at_486_misc.c
|
||||
m_at_socket4.c
|
||||
m_at_socket4_5.c
|
||||
m_at_socket5.c
|
||||
m_at_socket7_3v.c
|
||||
m_at_socket7.c
|
||||
|
||||
@@ -455,8 +455,8 @@ machine_at_pb286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/pb286/LB_V332P.BIN",
|
||||
"roms/machines/pb286/HB_V332P.BIN",
|
||||
ret = bios_load_interleaved("roms/machines/pb286/V000B200-1",
|
||||
"roms/machines/pb286/V000B200-2",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
@@ -467,6 +467,50 @@ machine_at_pb286_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_mbc17_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/mbc17/SAT200C_U45EVEN_FB3H2.bin",
|
||||
"roms/machines/mbc17/SAT200C_U44ODD_FB3J2.bin",
|
||||
0x000f8000, 32768, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
device_add(&sanyo_device);
|
||||
|
||||
device_add(&kbc_at_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ax286_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_interleaved("roms/machines/ax286/AM27C512@DIP28_even.BIN",
|
||||
"roms/machines/ax286/AM27C512@DIP28_odd.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_ide_init(model);
|
||||
device_add(&kbc_at_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_siemens_init(const machine_t *model)
|
||||
{
|
||||
|
||||
@@ -520,7 +520,6 @@ machine_at_p5vl_init(const machine_t *model)
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 9, 10, 11, 12);
|
||||
@@ -608,3 +607,33 @@ machine_at_p5sp4_init(const machine_t *model)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_ecs50x_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ecs50x/ECSSi5piaio.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST);
|
||||
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(0x02, PCI_CARD_IDE, 1, 2, 3, 4);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
device_add(&sis_85c50x_device);
|
||||
device_add_params(&ide_cmd640_pci_device, (void *) 0x100000);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(&fdc37c6xx_device, (void *) FDC37C665);
|
||||
device_add(&intel_flash_bxt_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
72
src/machine/m_at_socket4_5.c
Normal file
72
src/machine/m_at_socket4_5.c
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Implementation of Socket 4/5 machines.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2016-2025 Miran Grca.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/pci.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/flash.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/scsi_ncr53c8xx.h>
|
||||
#include <86box/sio.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/machine.h>
|
||||
|
||||
/* OPTi 597 */
|
||||
int
|
||||
machine_at_pci56001_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/pci56001/AWARD_ISA_PCI_586_non_PNP_SN_013870745_1994.BIN",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x10, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x12, PCI_CARD_NORMAL, 5, 6, 7, 8);
|
||||
pci_register_slot(0x13, PCI_CARD_NORMAL, 9, 10, 11, 12);
|
||||
pci_register_slot(0x14, PCI_CARD_NORMAL, 13, 14, 15, 16);
|
||||
|
||||
device_add(&opti5x7_pci_device);
|
||||
device_add(&opti822_device);
|
||||
device_add(&sst_flash_29ee010_device);
|
||||
device_add(&kbc_at_ami_device);
|
||||
|
||||
if (fdc_current[0] == FDC_INTERNAL)
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -801,6 +801,75 @@ machine_at_brio80xx_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const device_config_t lgibmx52_config[] = {
|
||||
// clang-format off
|
||||
{
|
||||
.name = "bios",
|
||||
.description = "BIOS Version",
|
||||
.type = CONFIG_BIOS,
|
||||
.default_string = "lgibmx52",
|
||||
.default_int = 0,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.bios = {
|
||||
{ .name = "08/21/97", .internal_name = "lgibmx52_082197", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/lgibmx52/BIOS.ROM", "" } },
|
||||
{ .name = "03/26/99", .internal_name = "lgibmx52", .bios_type = BIOS_NORMAL,
|
||||
.files_no = 1, .local = 0, .size = 131072, .files = { "roms/machines/lgibmx52/MS5136 LG IBM OEM.ROM", "" } },
|
||||
{ .files_no = 0 }
|
||||
},
|
||||
},
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t lgibmx52_device = {
|
||||
.name = "LG IBM Multinet x52 (MSI MS-5136)",
|
||||
.internal_name = "lgibmx52_device",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = NULL,
|
||||
.close = NULL,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = lgibmx52_config
|
||||
};
|
||||
|
||||
int
|
||||
machine_at_lgibmx52_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, 131072, 0);
|
||||
device_context_restore();
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
pci_init(PCI_CONFIG_TYPE_1);
|
||||
pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0);
|
||||
pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4);
|
||||
pci_register_slot(0x0E, PCI_CARD_NORMAL, 2, 3, 4, 1);
|
||||
pci_register_slot(0x0F, PCI_CARD_NORMAL, 3, 4, 1, 2);
|
||||
pci_register_slot(0x10, PCI_CARD_NORMAL, 4, 1, 2, 3);
|
||||
pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0);
|
||||
device_add(&i430vx_device);
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_ami_pci_device);
|
||||
device_add_params(&w83877_device, (void *) (W83877F | W83877_3F0));
|
||||
device_add(&winbond_flash_w29c010_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* The PB680 is a NV430VX, I'm assuming it has the same configuration bits as
|
||||
the TC430HX, hence the #define. */
|
||||
#define machine_at_nv430vx_gpio_init machine_at_tc430hx_gpio_init
|
||||
|
||||
@@ -55,6 +55,7 @@ const machine_filter_t machine_types[] = {
|
||||
{ "[1994] i486 (Socket 3 PCI)", MACHINE_TYPE_486_S3_PCI },
|
||||
{ "[1992] i486 (Miscellaneous)", MACHINE_TYPE_486_MISC },
|
||||
{ "[1993] Socket 4", MACHINE_TYPE_SOCKET4 },
|
||||
{ "[1994] Socket 4/5", MACHINE_TYPE_SOCKET4_5 },
|
||||
{ "[1994] Socket 5", MACHINE_TYPE_SOCKET5 },
|
||||
{ "[1995] Socket 7 (Single Voltage)", MACHINE_TYPE_SOCKET7_3V },
|
||||
{ "[1996] Socket 7 (Dual Voltage)", MACHINE_TYPE_SOCKET7 },
|
||||
@@ -3543,6 +3544,92 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* Has unknown KBC firmware. */
|
||||
{
|
||||
.name = "[ISA] Sanyo MBC-17",
|
||||
.internal_name = "mbc17",
|
||||
.type = MACHINE_TYPE_286,
|
||||
.chipset = MACHINE_CHIPSET_DISCRETE,
|
||||
.init = machine_at_mbc17_init,
|
||||
.p1_handler = NULL,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
.gpio_acpi_handler = NULL,
|
||||
.cpu = {
|
||||
.package = CPU_PKG_286,
|
||||
.block = CPU_BLOCK_NONE,
|
||||
.min_bus = 0,
|
||||
.max_bus = 12000000,
|
||||
.min_voltage = 0,
|
||||
.max_voltage = 0,
|
||||
.min_multi = 0,
|
||||
.max_multi = 0
|
||||
},
|
||||
.bus_flags = MACHINE_AT,
|
||||
.flags = MACHINE_IDE,
|
||||
.ram = {
|
||||
.min = 512,
|
||||
.max = 16384,
|
||||
.step = 128
|
||||
},
|
||||
.nvrmask = 127,
|
||||
.jumpered_ecp_dma = 0,
|
||||
.default_jumpered_ecp_dma = -1,
|
||||
.kbc_device = NULL,
|
||||
.kbc_p1 = 0xff,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.kbd_device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* Has unknown KBC firmware. */
|
||||
{
|
||||
.name = "[ISA] Sharp AX 286",
|
||||
.internal_name = "ax286",
|
||||
.type = MACHINE_TYPE_286,
|
||||
.chipset = MACHINE_CHIPSET_DISCRETE,
|
||||
.init = machine_at_ax286_init,
|
||||
.p1_handler = NULL,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
.gpio_acpi_handler = NULL,
|
||||
.cpu = {
|
||||
.package = CPU_PKG_286,
|
||||
.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_AT,
|
||||
.flags = MACHINE_IDE,
|
||||
.ram = {
|
||||
.min = 512,
|
||||
.max = 16384,
|
||||
.step = 128
|
||||
},
|
||||
.nvrmask = 127,
|
||||
.jumpered_ecp_dma = 0,
|
||||
.default_jumpered_ecp_dma = -1,
|
||||
.kbc_device = NULL,
|
||||
.kbc_p1 = 0xff,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.kbd_device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* This has a Siemens proprietary KBC which is completely undocumented. */
|
||||
{
|
||||
.name = "[ISA] Siemens PCD-2L",
|
||||
@@ -11589,6 +11676,96 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* This has an AMIKey-2, which is an updated version of type 'H'. */
|
||||
{
|
||||
.name = "[SiS 501] ECS SI5PI AIO",
|
||||
.internal_name = "ecs50x",
|
||||
.type = MACHINE_TYPE_SOCKET4,
|
||||
.chipset = MACHINE_CHIPSET_SIS_501,
|
||||
.init = machine_at_ecs50x_init,
|
||||
.p1_handler = NULL,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
.gpio_acpi_handler = NULL,
|
||||
.cpu = {
|
||||
.package = CPU_PKG_SOCKET4,
|
||||
.block = CPU_BLOCK_NONE,
|
||||
.min_bus = 60000000,
|
||||
.max_bus = 66666667,
|
||||
.min_voltage = 5000,
|
||||
.max_voltage = 5000,
|
||||
.min_multi = MACHINE_MULTIPLIER_FIXED,
|
||||
.max_multi = MACHINE_MULTIPLIER_FIXED
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_APM,
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 131072,
|
||||
.step = 8192
|
||||
},
|
||||
.nvrmask = 127,
|
||||
.jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3,
|
||||
.default_jumpered_ecp_dma = 3,
|
||||
.kbc_device = NULL,
|
||||
.kbc_p1 = 0xff,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.kbd_device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
|
||||
/* Socket 4/5 machines */
|
||||
/* OPTi 596/597 */
|
||||
/* This has AMIKey-2 'H' KBC firmware. */
|
||||
{
|
||||
.name = "[OPTi 597] Taken PCI560-01",
|
||||
.internal_name = "pci56001",
|
||||
.type = MACHINE_TYPE_SOCKET4_5,
|
||||
.chipset = MACHINE_CHIPSET_OPTI_547_597,
|
||||
.init = machine_at_pci56001_init,
|
||||
.p1_handler = NULL,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
.gpio_acpi_handler = NULL,
|
||||
.cpu = {
|
||||
.package = CPU_PKG_SOCKET4 | CPU_PKG_SOCKET5_7,
|
||||
.block = CPU_BLOCK_NONE,
|
||||
.min_bus = 50000000,
|
||||
.max_bus = 66666667,
|
||||
.min_voltage = 3520,
|
||||
.max_voltage = 5000,
|
||||
.min_multi = 1.0,
|
||||
.max_multi = 1.5
|
||||
},
|
||||
.bus_flags = MACHINE_PCI,
|
||||
.flags = MACHINE_APM,
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 131072,
|
||||
.step = 8192
|
||||
},
|
||||
.nvrmask = 127,
|
||||
.jumpered_ecp_dma = 0,
|
||||
.default_jumpered_ecp_dma = -1,
|
||||
.kbc_device = NULL,
|
||||
.kbc_p1 = 0xff,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.kbd_device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
|
||||
/* Socket 5 machines */
|
||||
/* 430NX */
|
||||
/* This has the Phoenix MultiKey KBC firmware.
|
||||
@@ -14533,6 +14710,49 @@ const machine_t machines[] = {
|
||||
.snd_device = NULL,
|
||||
.net_device = NULL
|
||||
},
|
||||
/* Has the AMIKey-2 (updated 'H') KBC firmware. */
|
||||
{
|
||||
.name = "[i430VX] LG IBM Multinet x52 (MSI MS-5136)",
|
||||
.internal_name = "lgibmx52",
|
||||
.type = MACHINE_TYPE_SOCKET7,
|
||||
.chipset = MACHINE_CHIPSET_INTEL_430VX,
|
||||
.init = machine_at_lgibmx52_init,
|
||||
.p1_handler = NULL,
|
||||
.gpio_handler = NULL,
|
||||
.available_flag = MACHINE_AVAILABLE,
|
||||
.gpio_acpi_handler = NULL,
|
||||
.cpu = {
|
||||
.package = CPU_PKG_SOCKET5_7,
|
||||
.block = CPU_BLOCK_NONE,
|
||||
.min_bus = 50000000,
|
||||
.max_bus = 75000000,
|
||||
.min_voltage = 2100,
|
||||
.max_voltage = 3520,
|
||||
.min_multi = 1.5,
|
||||
.max_multi = 4.0
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_APM,
|
||||
.ram = {
|
||||
.min = 8192,
|
||||
.max = 131072,
|
||||
.step = 4096
|
||||
},
|
||||
.nvrmask = 127,
|
||||
.jumpered_ecp_dma = 0,
|
||||
.default_jumpered_ecp_dma = -1,
|
||||
.kbc_device = NULL,
|
||||
.kbc_p1 = 0xff,
|
||||
.gpio = 0xffffffff,
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = &lgibmx52_device,
|
||||
.kbd_device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.sio_device = NULL,
|
||||
.vid_device = NULL,
|
||||
.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 . */
|
||||
|
||||
@@ -3810,8 +3810,10 @@ scsi_cdrom_get_max(const ide_t *ide, UNUSED(const int ide_has_dma), const int ty
|
||||
static int
|
||||
scsi_cdrom_get_timings(const ide_t *ide, UNUSED(const int ide_has_dma), const int type)
|
||||
{
|
||||
const scsi_cdrom_t *dev = (scsi_cdrom_t *) ide->sc;
|
||||
int has_dma = cdrom_has_dma(dev->drv->type);
|
||||
const scsi_cdrom_t *dev = (scsi_cdrom_t *) ide->sc;
|
||||
int has_dma = cdrom_has_dma(dev->drv->type);
|
||||
int pio_cyc_time[5] = { 600, 383, 240, 180, 120 };
|
||||
int max_pio = cdrom_get_transfer_max(dev->drv->type, TYPE_PIO);
|
||||
int ret;
|
||||
|
||||
switch (type) {
|
||||
@@ -3819,10 +3821,20 @@ scsi_cdrom_get_timings(const ide_t *ide, UNUSED(const int ide_has_dma), const in
|
||||
ret = has_dma ? 120 : 0;
|
||||
break;
|
||||
case TIMINGS_PIO:
|
||||
ret = has_dma ? 120 : 0;
|
||||
if (max_pio <= 0)
|
||||
ret = 600;
|
||||
else if (max_pio == 1)
|
||||
ret = 383;
|
||||
else
|
||||
ret = 240;
|
||||
break;
|
||||
case TIMINGS_PIO_FC:
|
||||
ret = 0;
|
||||
if (max_pio > 4)
|
||||
ret = 120;
|
||||
else if (max_pio < 0)
|
||||
ret = 600;
|
||||
else
|
||||
ret = pio_cyc_time[max_pio];
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
|
||||
Reference in New Issue
Block a user