Use one more bit for AT NVR type
Use bottom 4 bits (instead of 3) for the NVR type. This will be necessary in order to support more NVR types (the Epson Equity LT in particular). No functional change.
This commit is contained in:
34
src/nvr_at.c
34
src/nvr_at.c
@@ -981,9 +981,9 @@ nvr_at_init(const device_t *info)
|
|||||||
memset(local->lock, 0x00, nvr->size);
|
memset(local->lock, 0x00, nvr->size);
|
||||||
local->def = 0xff /*0x00*/;
|
local->def = 0xff /*0x00*/;
|
||||||
local->flags = 0x00;
|
local->flags = 0x00;
|
||||||
switch (info->local & 7) {
|
switch (info->local & 0x0f) {
|
||||||
case 0: /* standard AT, no century register */
|
case 0: /* standard AT, no century register */
|
||||||
if (info->local == 16) {
|
if (info->local == 32) {
|
||||||
local->flags |= FLAG_P6RP4_HACK;
|
local->flags |= FLAG_P6RP4_HACK;
|
||||||
nvr->irq = 8;
|
nvr->irq = 8;
|
||||||
local->cent = RTC_CENTURY_AT;
|
local->cent = RTC_CENTURY_AT;
|
||||||
@@ -996,13 +996,13 @@ nvr_at_init(const device_t *info)
|
|||||||
case 1: /* standard AT */
|
case 1: /* standard AT */
|
||||||
case 5: /* AMI WinBIOS 1994 */
|
case 5: /* AMI WinBIOS 1994 */
|
||||||
case 6: /* AMI BIOS 1995 */
|
case 6: /* AMI BIOS 1995 */
|
||||||
if (info->local == 9)
|
if ((info->local & 0x0f) == 1)
|
||||||
local->flags |= FLAG_PIIX4;
|
local->flags |= FLAG_PIIX4;
|
||||||
else {
|
else {
|
||||||
local->def = 0x00;
|
local->def = 0x00;
|
||||||
if ((info->local & 7) == 5)
|
if ((info->local & 0x0f) == 5)
|
||||||
local->flags |= FLAG_AMI_1994_HACK;
|
local->flags |= FLAG_AMI_1994_HACK;
|
||||||
else if ((info->local & 7) == 6)
|
else if ((info->local & 0x0f) == 6)
|
||||||
local->flags |= FLAG_AMI_1995_HACK;
|
local->flags |= FLAG_AMI_1995_HACK;
|
||||||
else
|
else
|
||||||
local->def = 0xff;
|
local->def = 0xff;
|
||||||
@@ -1015,7 +1015,7 @@ nvr_at_init(const device_t *info)
|
|||||||
nvr->irq = 8;
|
nvr->irq = 8;
|
||||||
local->cent = RTC_CENTURY_PS;
|
local->cent = RTC_CENTURY_PS;
|
||||||
local->def = 0x00;
|
local->def = 0x00;
|
||||||
if (info->local & 8)
|
if (info->local & 0x10)
|
||||||
local->flags |= FLAG_NO_NMI;
|
local->flags |= FLAG_NO_NMI;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1023,15 +1023,15 @@ nvr_at_init(const device_t *info)
|
|||||||
nvr->irq = 1;
|
nvr->irq = 1;
|
||||||
local->cent = RTC_CENTURY_AT;
|
local->cent = RTC_CENTURY_AT;
|
||||||
local->def = 0xff;
|
local->def = 0xff;
|
||||||
if (info->local & 8)
|
if (info->local & 0x10)
|
||||||
local->flags |= FLAG_NO_NMI;
|
local->flags |= FLAG_NO_NMI;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: /* IBM AT */
|
case 4: /* IBM AT */
|
||||||
if (info->local == 12) {
|
if (info->local & 0x10) {
|
||||||
local->def = 0x00;
|
local->def = 0x00;
|
||||||
local->flags |= FLAG_AMI_1992_HACK;
|
local->flags |= FLAG_AMI_1992_HACK;
|
||||||
} else if (info->local == 20)
|
} else if (info->local == 36)
|
||||||
local->def = 0x00;
|
local->def = 0x00;
|
||||||
else
|
else
|
||||||
local->def = 0xff;
|
local->def = 0xff;
|
||||||
@@ -1069,7 +1069,7 @@ nvr_at_init(const device_t *info)
|
|||||||
/* Set up the I/O handler for this device. */
|
/* Set up the I/O handler for this device. */
|
||||||
io_sethandler(0x0070, 2,
|
io_sethandler(0x0070, 2,
|
||||||
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
|
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
|
||||||
if (info->local & 8) {
|
if (info->local & 0x10) {
|
||||||
io_sethandler(0x0072, 2,
|
io_sethandler(0x0072, 2,
|
||||||
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
|
nvr_read, NULL, NULL, nvr_write, NULL, NULL, nvr);
|
||||||
}
|
}
|
||||||
@@ -1180,7 +1180,7 @@ const device_t piix4_nvr_device = {
|
|||||||
.name = "Intel PIIX4 PC/AT NVRAM",
|
.name = "Intel PIIX4 PC/AT NVRAM",
|
||||||
.internal_name = "piix4_nvr",
|
.internal_name = "piix4_nvr",
|
||||||
.flags = DEVICE_ISA | DEVICE_AT,
|
.flags = DEVICE_ISA | DEVICE_AT,
|
||||||
.local = 9,
|
.local = 0x10 | 1,
|
||||||
.init = nvr_at_init,
|
.init = nvr_at_init,
|
||||||
.close = nvr_at_close,
|
.close = nvr_at_close,
|
||||||
.reset = nvr_at_reset,
|
.reset = nvr_at_reset,
|
||||||
@@ -1220,7 +1220,7 @@ const device_t ami_1992_nvr_device = {
|
|||||||
.name = "AMI Color 1992 PC/AT NVRAM",
|
.name = "AMI Color 1992 PC/AT NVRAM",
|
||||||
.internal_name = "ami_1992_nvr",
|
.internal_name = "ami_1992_nvr",
|
||||||
.flags = DEVICE_ISA | DEVICE_AT,
|
.flags = DEVICE_ISA | DEVICE_AT,
|
||||||
.local = 12,
|
.local = 0x10 | 4,
|
||||||
.init = nvr_at_init,
|
.init = nvr_at_init,
|
||||||
.close = nvr_at_close,
|
.close = nvr_at_close,
|
||||||
.reset = nvr_at_reset,
|
.reset = nvr_at_reset,
|
||||||
@@ -1234,7 +1234,7 @@ const device_t ami_1994_nvr_device = {
|
|||||||
.name = "AMI WinBIOS 1994 PC/AT NVRAM",
|
.name = "AMI WinBIOS 1994 PC/AT NVRAM",
|
||||||
.internal_name = "ami_1994_nvr",
|
.internal_name = "ami_1994_nvr",
|
||||||
.flags = DEVICE_ISA | DEVICE_AT,
|
.flags = DEVICE_ISA | DEVICE_AT,
|
||||||
.local = 13,
|
.local = 0x10 | 5,
|
||||||
.init = nvr_at_init,
|
.init = nvr_at_init,
|
||||||
.close = nvr_at_close,
|
.close = nvr_at_close,
|
||||||
.reset = nvr_at_reset,
|
.reset = nvr_at_reset,
|
||||||
@@ -1248,7 +1248,7 @@ const device_t ami_1995_nvr_device = {
|
|||||||
.name = "AMI WinBIOS 1995 PC/AT NVRAM",
|
.name = "AMI WinBIOS 1995 PC/AT NVRAM",
|
||||||
.internal_name = "ami_1995_nvr",
|
.internal_name = "ami_1995_nvr",
|
||||||
.flags = DEVICE_ISA | DEVICE_AT,
|
.flags = DEVICE_ISA | DEVICE_AT,
|
||||||
.local = 14,
|
.local = 0x10 | 6,
|
||||||
.init = nvr_at_init,
|
.init = nvr_at_init,
|
||||||
.close = nvr_at_close,
|
.close = nvr_at_close,
|
||||||
.reset = nvr_at_reset,
|
.reset = nvr_at_reset,
|
||||||
@@ -1262,7 +1262,7 @@ const device_t via_nvr_device = {
|
|||||||
.name = "VIA PC/AT NVRAM",
|
.name = "VIA PC/AT NVRAM",
|
||||||
.internal_name = "via_nvr",
|
.internal_name = "via_nvr",
|
||||||
.flags = DEVICE_ISA | DEVICE_AT,
|
.flags = DEVICE_ISA | DEVICE_AT,
|
||||||
.local = 15,
|
.local = 0x10 | 7,
|
||||||
.init = nvr_at_init,
|
.init = nvr_at_init,
|
||||||
.close = nvr_at_close,
|
.close = nvr_at_close,
|
||||||
.reset = nvr_at_reset,
|
.reset = nvr_at_reset,
|
||||||
@@ -1276,7 +1276,7 @@ const device_t p6rp4_nvr_device = {
|
|||||||
.name = "ASUS P/I-P6RP4 PC/AT NVRAM",
|
.name = "ASUS P/I-P6RP4 PC/AT NVRAM",
|
||||||
.internal_name = "p6rp4_nvr",
|
.internal_name = "p6rp4_nvr",
|
||||||
.flags = DEVICE_ISA | DEVICE_AT,
|
.flags = DEVICE_ISA | DEVICE_AT,
|
||||||
.local = 16,
|
.local = 32,
|
||||||
.init = nvr_at_init,
|
.init = nvr_at_init,
|
||||||
.close = nvr_at_close,
|
.close = nvr_at_close,
|
||||||
.reset = nvr_at_reset,
|
.reset = nvr_at_reset,
|
||||||
@@ -1290,7 +1290,7 @@ const device_t amstrad_megapc_nvr_device = {
|
|||||||
.name = "Amstrad MegapC NVRAM",
|
.name = "Amstrad MegapC NVRAM",
|
||||||
.internal_name = "amstrad_megapc_nvr",
|
.internal_name = "amstrad_megapc_nvr",
|
||||||
.flags = DEVICE_ISA | DEVICE_AT,
|
.flags = DEVICE_ISA | DEVICE_AT,
|
||||||
.local = 20,
|
.local = 36,
|
||||||
.init = nvr_at_init,
|
.init = nvr_at_init,
|
||||||
.close = nvr_at_close,
|
.close = nvr_at_close,
|
||||||
.reset = nvr_at_reset,
|
.reset = nvr_at_reset,
|
||||||
|
Reference in New Issue
Block a user