Added the following new machines:

- NCR PC8/810/710/3390/3392
- NCR 3302
- Olivetti M290
This commit is contained in:
EngiNerd89
2020-12-23 20:55:09 +01:00
parent f27e443bfa
commit 3d516c223f
6 changed files with 134 additions and 2 deletions

View File

@@ -13,10 +13,12 @@
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
* Fred N. van Kempen, <decwiz@yahoo.com>
* EngiNerd <webmaster.crrc@yahoo.it>
*
* Copyright 2008-2020 Sarah Walker.
* Copyright 2016-2020 Miran Grca.
* Copyright 2017-2020 Fred N. van Kempen.
* Copyright 2020 EngiNerd.
*/
#include <stdio.h>
#include <stdint.h>
@@ -87,6 +89,7 @@
#define KBC_VEN_ACER 0x1c
#define KBC_VEN_INTEL_AMI 0x20
#define KBC_VEN_OLIVETTI 0x24
#define KBC_VEN_NCR 0x28
#define KBC_VEN_MASK 0x3c
@@ -1197,6 +1200,17 @@ write64_generic(void *priv, uint8_t val)
dev->input_port = ((dev->input_port + 1) & 3) |
(dev->input_port & 0xfc) |
(fdd_is_525(current_drive) ? 0x40 : 0x00);
} else if (kbc_ven == KBC_VEN_NCR) {
/* switch settings
* bit 7: keyboard disable
* 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)
* bits 0-3: unused
*/
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 {
if (((dev->flags & KBC_TYPE_MASK) >= KBC_TYPE_PS2_NOREF) &&
((dev->flags & KBC_VEN_MASK) != KBC_VEN_INTEL_AMI))
@@ -2277,6 +2291,7 @@ kbd_init(const device_t *info)
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;
@@ -2350,6 +2365,16 @@ const device_t keyboard_at_olivetti_device = {
{ NULL }, NULL, NULL, NULL
};
const device_t keyboard_at_ncr_device = {
"PC/AT Keyboard (NCR)",
0,
KBC_TYPE_ISA | KBC_VEN_NCR,
kbd_init,
kbd_close,
kbd_reset,
{ NULL }, NULL, NULL, NULL
};
const device_t keyboard_ps2_device = {
"PS/2 Keyboard",
0,