Fixed some stray pre-device_t left-overs from Super I/O chip LPT initialization, fixes #5880.

This commit is contained in:
OBattler
2025-08-03 07:22:42 +02:00
parent 138a4cd0f5
commit 442c029fac
4 changed files with 11 additions and 11 deletions

View File

@@ -54,7 +54,7 @@ fdc_handler(i82091aa_t *dev)
}
static void
lpt1_handler(i82091aa_t *dev)
lpt_handler(i82091aa_t *dev)
{
uint16_t lpt_port = LPT1_ADDR;
@@ -177,7 +177,7 @@ i82091aa_write(uint16_t port, uint8_t val, void *priv)
case 0x20:
*reg = (val & 0xef);
if (valxor & 0x07)
lpt1_handler(dev);
lpt_handler(dev);
break;
case 0x21:
*reg = (val & 0x2f);
@@ -237,7 +237,7 @@ i82091aa_reset(i82091aa_t *dev)
fdc_reset(dev->fdc);
fdc_handler(dev);
lpt1_handler(dev);
lpt_handler(dev);
serial_handler(dev, 0);
serial_handler(dev, 1);
serial_set_clock_src(dev->uart[0], (24000000.0 / 13.0));

View File

@@ -83,7 +83,7 @@ f82c606_update_ports(upc_t *dev, int set)
{
uint8_t uart1_int = 0xff;
uint8_t uart2_int = 0xff;
uint8_t lpt1_int = 0xff;
uint8_t lpt_int = 0xff;
int nvr_int = -1;
serial_remove(dev->uart[0]);
@@ -136,7 +136,7 @@ f82c606_update_ports(upc_t *dev, int set)
uart1_int = 5;
break;
case 0x0c:
lpt1_int = LPT2_IRQ;
lpt_int = LPT2_IRQ;
break;
default:
@@ -151,7 +151,7 @@ f82c606_update_ports(upc_t *dev, int set)
uart2_int = 7;
break;
case 0x03:
lpt1_int = LPT1_IRQ;
lpt_int = LPT1_IRQ;
break;
default:
@@ -175,8 +175,8 @@ f82c606_update_ports(upc_t *dev, int set)
if (dev->regs[0] & 8) {
lpt_port_setup(dev->lpt, ((uint16_t) dev->regs[6]) << 2);
lpt_port_irq(dev->lpt, lpt1_int);
f82c606_log("LPT1 at %04X, IRQ %i\n", ((uint16_t) dev->regs[6]) << 2, lpt1_int);
lpt_port_irq(dev->lpt, lpt_int);
f82c606_log("LPT1 at %04X, IRQ %i\n", ((uint16_t) dev->regs[6]) << 2, lpt_int);
}
nvr_at_handler(1, ((uint16_t) dev->regs[3]) << 2, dev->nvr);

View File

@@ -252,8 +252,8 @@ fdc37c6xx_reset(fdc37c6xx_t *dev)
serial_remove(dev->uart[1]);
serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ);
lpt1_remove();
lpt1_setup(LPT1_ADDR);
lpt_port_remove(lpt->port);
lpt_port_setup(lpt->port, LPT1_ADDR);
fdc_reset(dev->fdc);
fdc_remove(dev->fdc);

View File

@@ -246,7 +246,7 @@ pc87311_ide_handler(pc87311_t *dev)
void
pc87311_enable(pc87311_t *dev)
{
(FUNCTION_ENABLE & 0x01) ? pc87311_lpt_handler(dev) : lpt1_remove();
(FUNCTION_ENABLE & 0x01) ? pc87311_lpt_handler(dev) : lpt_port_remove(dev->lpt);
(FUNCTION_ENABLE & 0x02) ? pc87311_uart_handler(0, dev) : serial_remove(dev->uart[0]);
(FUNCTION_ENABLE & 0x04) ? pc87311_uart_handler(1, dev) : serial_remove(dev->uart[1]);
(FUNCTION_ENABLE & 0x08) ? pc87311_fdc_handler(dev) : fdc_remove(dev->fdc_controller);