Revert "Added new NCR and Olivetti machines"

This commit is contained in:
Miran Grča
2021-01-25 19:30:45 +01:00
committed by GitHub
parent 306a2e40de
commit 8200ef5db6
18 changed files with 91 additions and 811 deletions

View File

@@ -17,7 +17,7 @@ add_library(dev OBJECT bugger.c hwm.c hwm_lm75.c hwm_lm78.c hwm_gl518sm.c
hwm_vt82c686.c ibm_5161.c isamem.c isartc.c ../lpt.c pci_bridge.c
postcard.c serial.c vpc2007.c clock_ics9xxx.c i2c.c i2c_gpio.c
smbus_piix4.c keyboard.c keyboard_xt.c keyboard_at.c mouse.c mouse_bus.c
mouse_serial.c mouse_ps2.c phoenix_486_jumper.c olivetti_m290_registers.c)
mouse_serial.c mouse_ps2.c phoenix_486_jumper.c)
if(LASERXT)
target_compile_definitions(dev PRIVATE USE_LASERXT)

View File

@@ -1207,12 +1207,9 @@ write64_generic(void *priv, uint8_t val)
* bit 6: display type (0 color, 1 mono)
* bit 5: power-on default speed (0 high, 1 low)
* bit 4: sense RAM size (0 unsupported, 1 512k on system board)
* bit 3: coprocessor detect
* bit 2: unused
* bit 1: high/auto speed
* bit 0: dma mode
* bits 0-3: unused
*/
add_to_kbc_queue_front(dev, (dev->input_port | fixed_bits | (video_is_mda() ? 0x40 : 0x00) | (hasfpu ? 0x08 : 0x00)) & 0xdf);
add_to_kbc_queue_front(dev, (dev->input_port | fixed_bits | (video_is_mda() ? 0x40 : 0x00)) & 0xdf);
dev->input_port = ((dev->input_port + 1) & 3) |
(dev->input_port & 0xfc);
} else {
@@ -1510,29 +1507,6 @@ write60_quadtel(void *priv, uint8_t val)
return 1;
}
static uint8_t
write64_olivetti(void *priv, uint8_t val)
{
atkbd_t *dev = (atkbd_t *)priv;
switch (val) {
case 0x80: /* Olivetti-specific command */
/*
* bit 7: bus expansion board present (M300) / keyboard unlocked (M290)
* bits 4-6: ???
* bit 3: fast ram check (if inactive keyboard works erratically)
* bit 2: keyboard fuse present
* bits 0-1: ???
*/
add_to_kbc_queue_front(dev, (0x0c | ((is386) ? 0x00 : 0x80)) & 0xdf);
dev->input_port = ((dev->input_port + 1) & 3) |
(dev->input_port & 0xfc);
return 0;
}
return write64_generic(dev, val);
}
static uint8_t
write64_quadtel(void *priv, uint8_t val)
@@ -2163,6 +2137,7 @@ kbd_read(uint16_t port, void *priv)
ret |= 0x2; /* 0x10 would be 40x25 */
else
ret |= 0x0;
ret = 0xff;
} else {
/* bit 2 always on */
ret |= 0x4;
@@ -2316,16 +2291,13 @@ kbd_init(const device_t *info)
switch(dev->flags & KBC_VEN_MASK) {
case KBC_VEN_ACER:
case KBC_VEN_GENERIC:
case KBC_VEN_OLIVETTI:
case KBC_VEN_NCR:
case KBC_VEN_IBM_PS1:
case KBC_VEN_XI8088:
dev->write64_ven = write64_generic;
break;
case KBC_VEN_OLIVETTI:
dev->write64_ven = write64_olivetti;
break;
case KBC_VEN_AMI:
case KBC_VEN_INTEL_AMI:
case KBC_VEN_SAMSUNG:
@@ -2475,16 +2447,6 @@ const device_t keyboard_ps2_ami_device = {
{ NULL }, NULL, NULL, NULL
};
const device_t keyboard_ps2_olivetti_device = {
"PS/2 Keyboard (Olivetti)",
0,
KBC_TYPE_PS2_NOREF | KBC_VEN_OLIVETTI,
kbd_init,
kbd_close,
kbd_reset,
{ NULL }, NULL, NULL, NULL
};
const device_t keyboard_ps2_mca_device = {
"PS/2 Keyboard",
0,

View File

@@ -24,8 +24,6 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#define HAVE_STDARG_H
#include <wchar.h>
#include <86box/86box.h>
#include <86box/device.h>
@@ -600,7 +598,7 @@ kbd_read(uint16_t port, void *priv)
ret = ((mem_size-64) / 32) >> 4;
}
else if (kbd->type == 8 || kbd->type == 9) {
/* Olivetti M19 or Zenith Data Systems Z-151 */
/* Olivetti M19 or Zenith Data Systems Z-151*/
if (kbd->pb & 0x04)
ret = kbd->pd & 0xbf;
else

View File

@@ -1,117 +0,0 @@
/*
* 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 the Olivetti M290 registers Readout
*
* Authors: EngiNerd <webmaster.crrc@yahoo.it>
*
* Copyright 2020-2021 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 "cpu.h"
#include <86box/timer.h>
#include <86box/io.h>
#include <86box/device.h>
#include <86box/chipset.h>
#include <86box/video.h>
typedef struct
{
uint8_t reg_067;
uint8_t reg_069;
} olivetti_m290_registers_t;
#ifdef ENABLE_OLIVETTI_M290_REGISTERS_LOG
int olivetti_m290_registers_do_log = ENABLE_OLIVETTI_M290_REGISTERS_LOG;
static void
olivetti_m290_registers_log(const char *fmt, ...)
{
va_list ap;
if (olivetti_m290_registers_do_log) {
va_start(ap, fmt);
pclog_ex(fmt, ap);
va_end(ap);
}
}
#else
#define olivetti_m290_registers_log(fmt, ...)
#endif
static void
olivetti_m290_registers_write(uint16_t addr, uint8_t val, void *priv)
{
olivetti_m290_registers_t *dev = (olivetti_m290_registers_t *) priv;
olivetti_m290_registers_log("Olivetti M290 registers: Write %02x at %02x\n", val, addr);
switch (addr) {
case 0x067:
dev->reg_067 = val;
break;
case 0x069:
dev->reg_069 = val;
break;
}
}
static uint8_t
olivetti_m290_registers_read(uint16_t addr, void *priv)
{
olivetti_m290_registers_t *dev = (olivetti_m290_registers_t *) priv;
uint8_t ret = 0xff;
switch (addr) {
case 0x067:
ret = dev->reg_067;
break;
case 0x069:
ret = dev->reg_069;
break;
}
olivetti_m290_registers_log("Olivetti M290 registers: Read %02x at %02x\n", ret, addr);
return ret;
}
static void
olivetti_m290_registers_close(void *priv)
{
olivetti_m290_registers_t *dev = (olivetti_m290_registers_t *) priv;
free(dev);
}
static void *
olivetti_m290_registers_init(const device_t *info)
{
olivetti_m290_registers_t *dev = (olivetti_m290_registers_t *) malloc(sizeof(olivetti_m290_registers_t));
memset(dev, 0, sizeof(olivetti_m290_registers_t));
dev->reg_067 = 0x0;
dev->reg_069 = 0x0;
io_sethandler(0x0067, 0x0003, olivetti_m290_registers_read, NULL, NULL, olivetti_m290_registers_write, NULL, NULL, dev);
return dev;
}
const device_t olivetti_m290_registers_device = {
"Olivetti M290 registers Readout",
0,
0,
olivetti_m290_registers_init, olivetti_m290_registers_close, NULL,
{ NULL }, NULL, NULL,
NULL
};