Removed the PS/1 Model 2133. Introduced the Siemens D824.
This commit is contained in:
@@ -319,6 +319,7 @@ extern int machine_at_opti495_ami_init(const machine_t *);
|
||||
extern int machine_at_opti495_mr_init(const machine_t *);
|
||||
|
||||
extern int machine_at_vect486vl_init(const machine_t *);
|
||||
extern int machine_at_d824_init(const machine_t *);
|
||||
|
||||
extern int machine_at_403tg_init(const machine_t *);
|
||||
extern int machine_at_pc330_6573_init(const machine_t *);
|
||||
@@ -362,6 +363,7 @@ extern int machine_at_pcm5330_init(const machine_t *);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *at_acera1g_get_device(void);
|
||||
extern const device_t *at_vect486vl_get_device(void);
|
||||
extern const device_t *at_d824_get_device(void);
|
||||
extern const device_t *at_valuepoint433_get_device(void);
|
||||
#endif
|
||||
|
||||
@@ -595,11 +597,6 @@ extern const device_t *pcjr_get_device(void);
|
||||
/* m_ps1.c */
|
||||
extern int machine_ps1_m2011_init(const machine_t *);
|
||||
extern int machine_ps1_m2121_init(const machine_t *);
|
||||
extern int machine_ps1_m2133_init(const machine_t *);
|
||||
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *ps1_m2133_get_device(void);
|
||||
#endif
|
||||
|
||||
/* m_ps1_hdc.c */
|
||||
#ifdef EMU_DEVICE_H
|
||||
|
@@ -20,6 +20,7 @@ extern void vt82c686_sio_write(uint8_t addr, uint8_t val, void *priv);
|
||||
|
||||
extern const device_t acc3221_device;
|
||||
extern const device_t f82c710_device;
|
||||
extern const device_t fdc37c651_device;
|
||||
extern const device_t fdc37c661_device;
|
||||
extern const device_t fdc37c663_device;
|
||||
extern const device_t fdc37c663_ide_device;
|
||||
|
@@ -345,8 +345,7 @@ machine_at_vect486vl_init(const machine_t *model) // has HDC problems
|
||||
|
||||
device_add(&vl82c480_device);
|
||||
device_add(&keyboard_ps2_ami_device);
|
||||
device_add(&fdc37c661_device); // presumably SMC FDC37C651
|
||||
device_add(&ide_isa_2ch_device);
|
||||
device_add(&fdc37c651_device);
|
||||
|
||||
if (gfxcard == VID_INTERNAL)
|
||||
device_add(&gd5428_onboard_device);
|
||||
@@ -354,13 +353,40 @@ machine_at_vect486vl_init(const machine_t *model) // has HDC problems
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
at_vect486vl_get_device(void)
|
||||
{
|
||||
return &gd5428_onboard_device;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_d824_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/d824/fts-biosupdated824noflashbiosepromv320-320334-160.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
machine_at_common_init(model);
|
||||
|
||||
device_add(&vl82c480_device);
|
||||
device_add(&keyboard_ps2_device);
|
||||
device_add(&fdc37c651_device);
|
||||
|
||||
if (gfxcard == VID_INTERNAL)
|
||||
device_add(&gd5428_onboard_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
const device_t *
|
||||
at_d824_get_device(void)
|
||||
{
|
||||
return &gd5428_onboard_device;
|
||||
}
|
||||
|
||||
int
|
||||
machine_at_acera1g_init(const machine_t *model)
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Emulation of the IBM PS/1 models 2011, 2121 and 2133.
|
||||
* Emulation of the IBM PS/1 models 2011, 2121.
|
||||
*
|
||||
* Model 2011: The initial model, using a 10MHz 80286.
|
||||
*
|
||||
@@ -558,37 +558,3 @@ machine_ps1_m2121_init(const machine_t *model)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
machine_ps1_m2133_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = bios_load_linear("roms/machines/ibmps1_2133/ps1_2133_52g2974_rom.bin",
|
||||
0x000e0000, 131072, 0);
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
ps1_common_init(model);
|
||||
/* The PS/1 model 2133 expects a NVR without the century register. */
|
||||
device_add(&ide_isa_device);
|
||||
device_add(&at_nvr_old_device);
|
||||
device_add(&pc87332_398_ide_fdcon_device);
|
||||
device_add(&vl82c480_device);
|
||||
|
||||
nmi_mask = 0x80;
|
||||
|
||||
if (gfxcard == VID_INTERNAL)
|
||||
device_add(&gd5426_onboard_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const device_t *
|
||||
ps1_m2133_get_device(void)
|
||||
{
|
||||
return &gd5426_onboard_device;
|
||||
}
|
||||
|
||||
|
@@ -202,8 +202,8 @@ const machine_t machines[] = {
|
||||
{ "[CS4031] AMI 486 CS4031", "cs4031", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB, 1024, 65536, 1024, 127, machine_at_cs4031_init, NULL },
|
||||
{ "[OPTi 895] Mylex MVI486", "mvi486", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_IDE_DUAL, 1024, 65536, 1024, 127, machine_at_mvi486_init, NULL },
|
||||
{ "[VIA VT82C495] FIC 486-VC-HD", "486vchd", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT, 1024, 64512, 1024, 127, machine_at_486vchd_init, NULL },
|
||||
{ "[VLSI 82C480] IBM PS/1 model 2133", "ibmps1_2133", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_VLB | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_NONMI | MACHINE_VIDEO, 2048, 32768, 1024, 127, machine_ps1_m2133_init, ps1_m2133_get_device },
|
||||
{ "[VLSI 82C480] HP Vectra 486VL", "vect486vl", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 2048, 65536, 1024, 127, machine_at_vect486vl_init, at_vect486vl_get_device },
|
||||
{ "[VLSI 82C480] HP Vectra 486VL", "vect486vl", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 4096, 32768, 4096, 127, machine_at_vect486vl_init, at_vect486vl_get_device },
|
||||
{ "[VLSI 82C481] Siemens Nixdorf System Board D824", "d824", MACHINE_TYPE_486, CPU_PKG_SOCKET1, 0, 0, 0, 0, 0, 0, 0, MACHINE_AT | MACHINE_BUS_PS2 | MACHINE_IDE | MACHINE_VIDEO, 4096, 32768, 4096, 127, machine_at_d824_init, at_d824_get_device },
|
||||
|
||||
/* 486 machines with utilize the MCA bus */
|
||||
#if defined(DEV_BRANCH) && defined(USE_PS2M70T4)
|
||||
|
@@ -13,7 +13,7 @@
|
||||
# Copyright 2020,2021 David Hrdlička.
|
||||
#
|
||||
|
||||
add_library(sio OBJECT sio_acc3221.c sio_f82c710.c sio_82091aa.c sio_fdc37c661.c
|
||||
add_library(sio OBJECT sio_acc3221.c sio_f82c710.c sio_82091aa.c sio_fdc37c651.c sio_fdc37c661.c
|
||||
sio_fdc37c66x.c sio_fdc37c669.c sio_fdc37c93x.c sio_fdc37m60x.c
|
||||
sio_it8661f.c
|
||||
sio_pc87306.c sio_pc87307.c sio_pc87309.c sio_pc87310.c sio_pc87311.c sio_pc87332.c
|
||||
|
190
src/sio/sio_fdc37c651.c
Normal file
190
src/sio/sio_fdc37c651.c
Normal file
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
* 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 LG fdc37c651 Super I/O
|
||||
*
|
||||
* Authors: Tiseno100
|
||||
* Copyright 2020 Tiseno100
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/serial.h>
|
||||
#include <86box/hdc.h>
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/sio.h>
|
||||
|
||||
#ifdef ENABLE_FDC37C651_LOG
|
||||
int fdc37c651_do_log = ENABLE_FDC37C651_LOG;
|
||||
static void
|
||||
fdc37c651_log(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (fdc37c651_do_log)
|
||||
{
|
||||
va_start(ap, fmt);
|
||||
pclog_ex(fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define fdc37c651_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t configuration_select, regs[3];
|
||||
uint16_t com3, com4;
|
||||
|
||||
fdc_t *fdc_controller;
|
||||
serial_t *uart[2];
|
||||
|
||||
} fdc37c651_t;
|
||||
|
||||
static void
|
||||
fdc37c651_write(uint16_t addr, uint8_t val, void *priv)
|
||||
{
|
||||
fdc37c651_t *dev = (fdc37c651_t *)priv;
|
||||
|
||||
switch (addr)
|
||||
{
|
||||
case 0x3f0:
|
||||
dev->configuration_select = val;
|
||||
break;
|
||||
case 0x3f1:
|
||||
switch (dev->configuration_select)
|
||||
{
|
||||
case 0: /* CR0 */
|
||||
dev->regs[dev->configuration_select] = val;
|
||||
ide_pri_disable();
|
||||
fdc_remove(dev->fdc_controller);
|
||||
|
||||
if (val & 1) /* Enable IDE */
|
||||
ide_pri_enable();
|
||||
|
||||
if (val & 0x10) /* Enable FDC */
|
||||
fdc_set_base(dev->fdc_controller, 0x3f0);
|
||||
|
||||
break;
|
||||
|
||||
case 1: /* CR1 */
|
||||
dev->regs[dev->configuration_select] = val;
|
||||
lpt1_remove();
|
||||
|
||||
if ((val & 3) != 0) /* Program LPT if not Disabled */
|
||||
lpt1_init((val & 2) ? ((val & 1) ? 0x278 : 0x378) : 0x3f8);
|
||||
|
||||
switch ((val >> 4) & 3) /* COM3 & 4 Select*/
|
||||
{
|
||||
case 0:
|
||||
dev->com3 = 0x338;
|
||||
dev->com4 = 0x238;
|
||||
break;
|
||||
case 1:
|
||||
dev->com3 = 0x3e8;
|
||||
dev->com4 = 0x2e8;
|
||||
break;
|
||||
case 2:
|
||||
dev->com3 = 0x2e8;
|
||||
dev->com4 = 0x2e0;
|
||||
break;
|
||||
case 3:
|
||||
dev->com3 = 0x220;
|
||||
dev->com4 = 0x228;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2: /* CR2 */
|
||||
dev->regs[dev->configuration_select] = val;
|
||||
serial_remove(dev->uart[0]);
|
||||
serial_remove(dev->uart[1]);
|
||||
|
||||
if (val & 4)
|
||||
serial_setup(dev->uart[0], (val & 2) ? ((val & 1) ? dev->com4 : dev->com3) : ((val & 1) ? 0x2f8 : 0x3f8), 4);
|
||||
|
||||
if (val & 0x40)
|
||||
serial_setup(dev->uart[1], (val & 0x20) ? ((val & 0x10) ? dev->com4 : dev->com3) : ((val & 0x10) ? 0x2f8 : 0x3f8), 3);
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
fdc37c651_read(uint16_t addr, void *priv)
|
||||
{
|
||||
fdc37c651_t *dev = (fdc37c651_t *)priv;
|
||||
|
||||
return dev->regs[dev->configuration_select];
|
||||
}
|
||||
|
||||
static void
|
||||
fdc37c651_close(void *priv)
|
||||
{
|
||||
fdc37c651_t *dev = (fdc37c651_t *)priv;
|
||||
free(dev);
|
||||
}
|
||||
|
||||
static void *
|
||||
fdc37c651_init(const device_t *info)
|
||||
{
|
||||
fdc37c651_t *dev = (fdc37c651_t *)malloc(sizeof(fdc37c651_t));
|
||||
memset(dev, 0, sizeof(fdc37c651_t));
|
||||
|
||||
dev->fdc_controller = device_add(&fdc_at_smc_device);
|
||||
dev->uart[0] = device_add_inst(&ns16550_device, 1);
|
||||
dev->uart[1] = device_add_inst(&ns16550_device, 2);
|
||||
device_add(&ide_isa_device);
|
||||
|
||||
/* Program Defaults */
|
||||
dev->regs[0] = 0x3f;
|
||||
dev->regs[1] = 0x9f;
|
||||
dev->regs[2] = 0xdc;
|
||||
ide_pri_disable();
|
||||
fdc_remove(dev->fdc_controller);
|
||||
lpt1_remove();
|
||||
serial_remove(dev->uart[0]);
|
||||
serial_remove(dev->uart[1]);
|
||||
|
||||
ide_pri_enable();
|
||||
fdc_set_base(dev->fdc_controller, 0x3f0);
|
||||
lpt1_init(0x278);
|
||||
serial_setup(dev->uart[0], 0x2f8, 4);
|
||||
serial_setup(dev->uart[1], 0x3f8, 3);
|
||||
|
||||
io_sethandler(0x03f0, 2, fdc37c651_read, NULL, NULL, fdc37c651_write, NULL, NULL, dev);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
const device_t fdc37c651_device = {
|
||||
"SMC FDC37C651",
|
||||
0,
|
||||
0,
|
||||
fdc37c651_init,
|
||||
fdc37c651_close,
|
||||
NULL,
|
||||
{NULL},
|
||||
NULL,
|
||||
NULL,
|
||||
NULL};
|
@@ -648,7 +648,7 @@ DEVOBJ := bugger.o hwm.o hwm_lm75.o hwm_lm78.o hwm_gl518sm.o hwm_vt82c686.o ibm
|
||||
phoenix_486_jumper.o
|
||||
|
||||
SIOOBJ := sio_acc3221.o \
|
||||
sio_f82c710.o sio_82091aa.o \
|
||||
sio_f82c710.o sio_82091aa.o sio_fdc37c651.o \
|
||||
sio_fdc37c661.o sio_fdc37c66x.o sio_fdc37c669.o sio_fdc37c93x.o sio_fdc37m60x.o \
|
||||
sio_it8661f.o \
|
||||
sio_pc87306.o sio_pc87307.o sio_pc87309.o sio_pc87310.o sio_pc87311.o sio_pc87332.o \
|
||||
|
Reference in New Issue
Block a user