Fixed the RAM granularity ont he NCR PC4i, fixes #3654.
This commit is contained in:
@@ -599,12 +599,19 @@ kbd_read(uint16_t port, void *priv)
|
|||||||
|
|
||||||
switch (port) {
|
switch (port) {
|
||||||
case 0x60: /* Keyboard Data Register (aka Port A) */
|
case 0x60: /* Keyboard Data Register (aka Port A) */
|
||||||
if ((kbd->pb & 0x80) && ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_PRAVETZ) || (kbd->type == KBD_TYPE_XT82) ||
|
if ((kbd->pb & 0x80) && ((kbd->type == KBD_TYPE_PC81) ||
|
||||||
(kbd->type == KBD_TYPE_XT86) || (kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) || (kbd->type == KBD_TYPE_ZENITH))) {
|
(kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_PRAVETZ) ||
|
||||||
if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) || (kbd->type == KBD_TYPE_PRAVETZ))
|
(kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_XT86) ||
|
||||||
|
(kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) ||
|
||||||
|
(kbd->type == KBD_TYPE_ZENITH))) {
|
||||||
|
if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) ||
|
||||||
|
(kbd->type == KBD_TYPE_XTCLONE) || (kbd->type == KBD_TYPE_COMPAQ) ||
|
||||||
|
(kbd->type == KBD_TYPE_PRAVETZ))
|
||||||
ret = (kbd->pd & ~0x02) | (hasfpu ? 0x02 : 0x00);
|
ret = (kbd->pd & ~0x02) | (hasfpu ? 0x02 : 0x00);
|
||||||
else if ((kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_XT86))
|
else if ((kbd->type == KBD_TYPE_XT82) || (kbd->type == KBD_TYPE_XT86))
|
||||||
ret = 0xff; /* According to Ruud on the PCem forum, this is supposed to return 0xFF on the XT. */
|
/* According to Ruud on the PCem forum, this is supposed to
|
||||||
|
return 0xFF on the XT. */
|
||||||
|
ret = 0xff;
|
||||||
else if (kbd->type == KBD_TYPE_ZENITH) {
|
else if (kbd->type == KBD_TYPE_ZENITH) {
|
||||||
/* Zenith Data Systems Z-151
|
/* Zenith Data Systems Z-151
|
||||||
* SW1 switch settings:
|
* SW1 switch settings:
|
||||||
@@ -633,7 +640,8 @@ kbd_read(uint16_t port, void *priv)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x62: /* Switch Register (aka Port C) */
|
case 0x62: /* Switch Register (aka Port C) */
|
||||||
if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) || (kbd->type == KBD_TYPE_PRAVETZ)) {
|
if ((kbd->type == KBD_TYPE_PC81) || (kbd->type == KBD_TYPE_PC82) ||
|
||||||
|
(kbd->type == KBD_TYPE_PRAVETZ)) {
|
||||||
if (kbd->pb & 0x04) /* PB2 */
|
if (kbd->pb & 0x04) /* PB2 */
|
||||||
switch (mem_size + isa_mem_size) {
|
switch (mem_size + isa_mem_size) {
|
||||||
case 64:
|
case 64:
|
||||||
@@ -648,8 +656,8 @@ kbd_read(uint16_t port, void *priv)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = (((mem_size + isa_mem_size) - 64) / 32) >> 4;
|
ret = (((mem_size + isa_mem_size) - 64) / 32) >> 4;
|
||||||
} else if (kbd->type == KBD_TYPE_OLIVETTI
|
} else if ((kbd->type == KBD_TYPE_OLIVETTI) ||
|
||||||
|| kbd->type == KBD_TYPE_ZENITH) {
|
(kbd->type == KBD_TYPE_ZENITH)) {
|
||||||
/* Olivetti M19 or Zenith Data Systems Z-151 */
|
/* Olivetti M19 or Zenith Data Systems Z-151 */
|
||||||
if (kbd->pb & 0x04) /* PB2 */
|
if (kbd->pb & 0x04) /* PB2 */
|
||||||
ret = kbd->pd & 0xbf;
|
ret = kbd->pd & 0xbf;
|
||||||
@@ -754,7 +762,6 @@ kbd_init(const device_t *info)
|
|||||||
(kbd->type <= KBD_TYPE_XT86) || (kbd->type == KBD_TYPE_XTCLONE) ||
|
(kbd->type <= KBD_TYPE_XT86) || (kbd->type == KBD_TYPE_XTCLONE) ||
|
||||||
(kbd->type == KBD_TYPE_COMPAQ) || (kbd->type == KBD_TYPE_TOSHIBA) ||
|
(kbd->type == KBD_TYPE_COMPAQ) || (kbd->type == KBD_TYPE_TOSHIBA) ||
|
||||||
(kbd->type == KBD_TYPE_OLIVETTI)) {
|
(kbd->type == KBD_TYPE_OLIVETTI)) {
|
||||||
|
|
||||||
/* DIP switch readout: bit set = OFF, clear = ON. */
|
/* DIP switch readout: bit set = OFF, clear = ON. */
|
||||||
if (kbd->type == KBD_TYPE_OLIVETTI)
|
if (kbd->type == KBD_TYPE_OLIVETTI)
|
||||||
/* Olivetti M19
|
/* Olivetti M19
|
||||||
|
@@ -1045,7 +1045,7 @@ const machine_t machines[] = {
|
|||||||
.ram = {
|
.ram = {
|
||||||
.min = 256,
|
.min = 256,
|
||||||
.max = 640,
|
.max = 640,
|
||||||
.step = 256
|
.step = 128
|
||||||
},
|
},
|
||||||
.nvrmask = 0,
|
.nvrmask = 0,
|
||||||
.kbc_device = &keyboard_xtclone_device,
|
.kbc_device = &keyboard_xtclone_device,
|
||||||
|
Reference in New Issue
Block a user