Trned the LPT ports into device_t's.
This commit is contained in:
@@ -26,10 +26,10 @@
|
||||
#include "cpu.h"
|
||||
#include <86box/io.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_cga.h>
|
||||
#include <86box/vid_colorplus.h>
|
||||
@@ -357,7 +357,9 @@ colorplus_standalone_init(UNUSED(const device_t *info))
|
||||
mem_mapping_add(&colorplus->cga.mapping, 0xb8000, 0x08000, colorplus_read, NULL, NULL, colorplus_write, NULL, NULL, NULL, MEM_MAPPING_EXTERNAL, colorplus);
|
||||
io_sethandler(0x03d0, 0x0010, colorplus_in, NULL, NULL, colorplus_out, NULL, NULL, colorplus);
|
||||
|
||||
lpt3_setup(LPT_MDA_ADDR);
|
||||
colorplus->lpt = device_add_inst(&lpt_port_device, 1);
|
||||
lpt_port_setup(colorplus->lpt, LPT_MDA_ADDR);
|
||||
lpt_set_3bc_used(1);
|
||||
|
||||
return colorplus;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#include <86box/rom.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_hercules.h>
|
||||
#include <86box/plat_unused.h>
|
||||
@@ -606,7 +606,9 @@ hercules_init(UNUSED(const device_t *info))
|
||||
video_inform(VIDEO_FLAG_TYPE_MDA, &timing_hercules);
|
||||
|
||||
/* Force the LPT3 port to be enabled. */
|
||||
lpt3_setup(LPT_MDA_ADDR);
|
||||
dev->lpt = device_add_inst(&lpt_port_device, 1);
|
||||
lpt_port_setup(dev->lpt, LPT_MDA_ADDR);
|
||||
lpt_set_3bc_used(1);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
#include <86box/86box.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
@@ -179,6 +179,8 @@ typedef struct {
|
||||
uint32_t rgb[64];
|
||||
|
||||
uint8_t *vram;
|
||||
|
||||
lpt_t *lpt;
|
||||
} incolor_t;
|
||||
|
||||
static video_timings_t timing_incolor = { .type = VIDEO_ISA, .write_b = 8, .write_w = 16, .write_l = 32, .read_b = 8, .read_w = 16, .read_l = 32 };
|
||||
@@ -1035,7 +1037,9 @@ incolor_init(UNUSED(const device_t *info))
|
||||
video_inform(VIDEO_FLAG_TYPE_MDA, &timing_incolor);
|
||||
|
||||
/* Force the LPT3 port to be enabled. */
|
||||
lpt3_setup(LPT_MDA_ADDR);
|
||||
dev->lpt = device_add_inst(&lpt_port_device, 1);
|
||||
lpt_port_setup(dev->lpt, LPT_MDA_ADDR);
|
||||
lpt_set_3bc_used(1);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
#include <86box/86box.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
@@ -86,6 +86,8 @@ typedef struct {
|
||||
int cols[256][2][2];
|
||||
|
||||
uint8_t *vram;
|
||||
|
||||
lpt_t *lpt;
|
||||
} herculesplus_t;
|
||||
|
||||
#define VIDEO_MONITOR_PROLOGUE() \
|
||||
@@ -687,7 +689,9 @@ herculesplus_init(UNUSED(const device_t *info))
|
||||
video_inform(VIDEO_FLAG_TYPE_MDA, &timing_herculesplus);
|
||||
|
||||
/* Force the LPT3 port to be enabled. */
|
||||
lpt3_setup(LPT_MDA_ADDR);
|
||||
dev->lpt = device_add_inst(&lpt_port_device, 1);
|
||||
lpt_port_setup(dev->lpt, LPT_MDA_ADDR);
|
||||
lpt_set_3bc_used(1);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
#include <86box/86box.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/pit.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_mda.h>
|
||||
#include <86box/plat_unused.h>
|
||||
@@ -453,7 +453,9 @@ mda_standalone_init(UNUSED(const device_t *info))
|
||||
|
||||
mda_init(mda);
|
||||
|
||||
lpt3_setup(LPT_MDA_ADDR);
|
||||
mda->lpt = device_add_inst(&lpt_port_device, 1);
|
||||
lpt_port_setup(mda->lpt, LPT_MDA_ADDR);
|
||||
lpt_set_3bc_used(1);
|
||||
|
||||
return mda;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <86box/machine.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/video.h>
|
||||
#include <86box/vid_svga.h>
|
||||
|
||||
Reference in New Issue
Block a user