mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 20:35:32 -07:00
Assorted fixes and Dev branched the Matrox G100 and the PCL printer.
This commit is contained in:
@@ -27,6 +27,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
add_compile_definitions(_FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1 _LARGEFILE64_SOURCE=1)
|
||||
endif()
|
||||
|
||||
if(PCL)
|
||||
target_compile_definitions(86Box PRIVATE USE_PCL)
|
||||
endif()
|
||||
|
||||
if(CPPTHREADS)
|
||||
target_sources(86Box PRIVATE thread.cpp)
|
||||
endif()
|
||||
|
||||
@@ -2508,7 +2508,7 @@ const cpu_family_t cpu_families[] = {
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 75000000,
|
||||
.multi = 3.0,
|
||||
.voltage = 5000,
|
||||
.voltage = 3300,
|
||||
.edx_reset = 0x480,
|
||||
.cpuid_model = 0x480,
|
||||
.cyrix_id = 0x0000,
|
||||
@@ -2525,7 +2525,7 @@ const cpu_family_t cpu_families[] = {
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 100000000,
|
||||
.multi = 3.0,
|
||||
.voltage = 5000,
|
||||
.voltage = 3300,
|
||||
.edx_reset = 0x483,
|
||||
.cpuid_model = 0x483,
|
||||
.cyrix_id = 0x0000,
|
||||
@@ -3066,7 +3066,7 @@ const cpu_family_t cpu_families[] = {
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 133333333,
|
||||
.multi = 4.0,
|
||||
.voltage = 5000,
|
||||
.voltage = 3450,
|
||||
.edx_reset = 0x4e0,
|
||||
.cpuid_model = 0x4e0,
|
||||
.cyrix_id = 0,
|
||||
@@ -3083,7 +3083,7 @@ const cpu_family_t cpu_families[] = {
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 150000000,
|
||||
.multi = 3.0,
|
||||
.voltage = 5000,
|
||||
.voltage = 3450,
|
||||
.edx_reset = 0x482,
|
||||
.cpuid_model = 0x482,
|
||||
.cyrix_id = 0,
|
||||
@@ -3100,7 +3100,7 @@ const cpu_family_t cpu_families[] = {
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 160000000,
|
||||
.multi = 4.0,
|
||||
.voltage = 5000,
|
||||
.voltage = 3450,
|
||||
.edx_reset = 0x4e0,
|
||||
.cpuid_model = 0x4e0,
|
||||
.cyrix_id = 0,
|
||||
@@ -3332,7 +3332,7 @@ const cpu_family_t cpu_families[] = {
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 80000000,
|
||||
.multi = 2.0,
|
||||
.voltage = 5000,
|
||||
.voltage = 3450,
|
||||
.edx_reset = 0x480,
|
||||
.cpuid_model = 0,
|
||||
.cyrix_id = 0x002f,
|
||||
@@ -3349,7 +3349,7 @@ const cpu_family_t cpu_families[] = {
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 100000000,
|
||||
.multi = 3.0,
|
||||
.voltage = 5000,
|
||||
.voltage = 3450,
|
||||
.edx_reset = 0x480,
|
||||
.cpuid_model = 0,
|
||||
.cyrix_id = 0x002f,
|
||||
@@ -3366,7 +3366,7 @@ const cpu_family_t cpu_families[] = {
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 120000000,
|
||||
.multi = 3.0,
|
||||
.voltage = 5000,
|
||||
.voltage = 3450,
|
||||
.edx_reset = 0x480,
|
||||
.cpuid_model = 0,
|
||||
.cyrix_id = 0x002f,
|
||||
@@ -3383,7 +3383,7 @@ const cpu_family_t cpu_families[] = {
|
||||
.fpus = fpus_internal,
|
||||
.rspeed = 133333333,
|
||||
.multi = 4.0,
|
||||
.voltage = 5000,
|
||||
.voltage = 3450,
|
||||
.edx_reset = 0x480,
|
||||
.cpuid_model = 0,
|
||||
.cyrix_id = 0x002f,
|
||||
|
||||
@@ -171,6 +171,8 @@ typedef struct dp8390_t {
|
||||
/* DP8390 memory */
|
||||
uint8_t *mem; /* on-chip packet memory */
|
||||
|
||||
uint8_t sink_buffer[4096];
|
||||
|
||||
uint8_t macaddr[32]; /* ASIC ROM'd MAC address, even bytes */
|
||||
uint8_t macaddr_size, /* Defaults to 16 but can be 32 */
|
||||
flags, /* Flags affecting some behaviors. */
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
extern const lpt_device_t lpt_prt_text_device;
|
||||
extern const lpt_device_t lpt_prt_escp_device;
|
||||
extern const lpt_device_t lpt_prt_ps_device;
|
||||
#ifdef USE_PCL
|
||||
extern const lpt_device_t lpt_prt_pcl_device;
|
||||
#endif
|
||||
|
||||
#endif /*EMU_PRT_DEVS_H*/
|
||||
|
||||
@@ -48,6 +48,8 @@ extern void svga_render_text_80_ksc5601(svga_t *svga);
|
||||
|
||||
extern void svga_render_2bpp_lowres(svga_t *svga);
|
||||
extern void svga_render_2bpp_highres(svga_t *svga);
|
||||
extern void svga_render_2bpp_s3_lowres(svga_t *svga);
|
||||
extern void svga_render_2bpp_s3_highres(svga_t *svga);
|
||||
extern void svga_render_2bpp_headland_highres(svga_t *svga);
|
||||
extern void svga_render_4bpp_lowres(svga_t *svga);
|
||||
extern void svga_render_4bpp_highres(svga_t *svga);
|
||||
|
||||
@@ -446,7 +446,9 @@ extern const device_t millennium_device;
|
||||
extern const device_t mystique_device;
|
||||
extern const device_t mystique_220_device;
|
||||
extern const device_t millennium_ii_device;
|
||||
#ifdef USE_G100
|
||||
extern const device_t productiva_g100_device;
|
||||
#endif
|
||||
|
||||
/* Oak OTI-0x7 */
|
||||
extern const device_t oti037c_device;
|
||||
|
||||
@@ -42,7 +42,9 @@ static const struct {
|
||||
{"text_prt", &lpt_prt_text_device },
|
||||
{"dot_matrix", &lpt_prt_escp_device },
|
||||
{"postscript", &lpt_prt_ps_device },
|
||||
{"pcl", &lpt_prt_pcl_device },
|
||||
#ifdef USE_PCL
|
||||
{"pcl", &lpt_prt_pcl_device },
|
||||
#endif
|
||||
{"plip", &lpt_plip_device },
|
||||
{"dongle_savquest", &lpt_hasp_savquest_device },
|
||||
{"", NULL }
|
||||
|
||||
@@ -384,7 +384,12 @@ dp8390_rx_common(void *priv, uint8_t *buf, int io_len)
|
||||
pkthdr[0], pkthdr[1], pkthdr[2], pkthdr[3]);
|
||||
|
||||
/* Copy into buffer, update curpage, and signal interrupt if config'd */
|
||||
startptr = &dev->mem[(dev->curr_page * 256) - dev->mem_start];
|
||||
if (((dev->curr_page * 256) - dev->mem_start) >= dev->mem_size)
|
||||
/* Do this to fix Windows 2000 crashing the emulator when its
|
||||
MPU-401 probe hits the NIC. */
|
||||
startptr = &dev->sink_buffer;
|
||||
else
|
||||
startptr = &dev->mem[(dev->curr_page * 256) - dev->mem_start];
|
||||
memcpy(startptr, pkthdr, sizeof(pkthdr));
|
||||
if ((nextpage > dev->curr_page) || ((dev->curr_page + pages) == dev->page_stop)) {
|
||||
memcpy(startptr + sizeof(pkthdr), buf, io_len);
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
|
||||
add_library(print OBJECT png.c prt_cpmap.c prt_escp.c prt_text.c prt_ps.c)
|
||||
|
||||
if(PCL)
|
||||
target_compile_definitions(print PRIVATE USE_PCL)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
find_library(GHOSTSCRIPT_LIB gs)
|
||||
if (NOT GHOSTSCRIPT_LIB)
|
||||
|
||||
@@ -411,6 +411,7 @@ ps_init(void *lpt)
|
||||
return dev;
|
||||
}
|
||||
|
||||
#ifdef USE_PCL
|
||||
static void *
|
||||
pcl_init(void *lpt)
|
||||
{
|
||||
@@ -459,6 +460,7 @@ pcl_init(void *lpt)
|
||||
|
||||
return dev;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
ps_close(void *priv)
|
||||
@@ -491,6 +493,7 @@ const lpt_device_t lpt_prt_ps_device = {
|
||||
.read_ctrl = NULL
|
||||
};
|
||||
|
||||
#ifdef USE_PCL
|
||||
const lpt_device_t lpt_prt_pcl_device = {
|
||||
.name = "Generic PCL5e Printer",
|
||||
.internal_name = "pcl",
|
||||
@@ -502,3 +505,4 @@ const lpt_device_t lpt_prt_pcl_device = {
|
||||
.read_status = ps_read_status,
|
||||
.read_ctrl = NULL
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,10 @@ add_library(vid OBJECT agpgart.c video.c vid_table.c vid_cga.c vid_cga_comp.c
|
||||
vid_tvp3026_ramdac.c vid_att2xc498_ramdac.c vid_xga.c
|
||||
vid_bochs_vbe.c)
|
||||
|
||||
if(G100)
|
||||
target_compile_definitions(vid PRIVATE USE_G100)
|
||||
endif()
|
||||
|
||||
if(XL24)
|
||||
target_compile_definitions(vid PRIVATE USE_XL24)
|
||||
endif()
|
||||
|
||||
@@ -6963,6 +6963,7 @@ const device_t millennium_ii_device = {
|
||||
.config = millennium_ii_config
|
||||
};
|
||||
|
||||
#ifdef USE_G100
|
||||
const device_t productiva_g100_device = {
|
||||
.name = "Matrox Productiva G100",
|
||||
.internal_name = "productiva_g100",
|
||||
@@ -6976,3 +6977,4 @@ const device_t productiva_g100_device = {
|
||||
.force_redraw = mystique_force_redraw,
|
||||
.config = millennium_ii_config
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -4153,6 +4153,11 @@ s3_recalctimings(svga_t *svga)
|
||||
svga->hoverride = 1;
|
||||
else
|
||||
svga->hoverride = 0;
|
||||
|
||||
if (svga->render == svga_render_2bpp_lowres)
|
||||
svga->render = svga_render_2bpp_s3_lowres;
|
||||
else if (svga->render == svga_render_2bpp_highres)
|
||||
svga->render = svga_render_2bpp_s3_highres;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4333,6 +4338,11 @@ s3_trio64v_recalctimings(svga_t *svga)
|
||||
}
|
||||
|
||||
svga->hoverride = 1;
|
||||
|
||||
if (svga->render == svga_render_2bpp_lowres)
|
||||
svga->render = svga_render_2bpp_s3_lowres;
|
||||
else if (svga->render == svga_render_2bpp_highres)
|
||||
svga->render = svga_render_2bpp_s3_highres;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -973,6 +973,11 @@ s3_virge_recalctimings(svga_t *svga)
|
||||
}
|
||||
|
||||
svga->hoverride = 1;
|
||||
|
||||
if (svga->render == svga_render_2bpp_lowres)
|
||||
svga->render = svga_render_2bpp_s3_lowres;
|
||||
else if (svga->render == svga_render_2bpp_highres)
|
||||
svga->render = svga_render_2bpp_s3_highres;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -685,9 +685,10 @@ svga_recalctimings(svga_t *svga)
|
||||
else
|
||||
svga->render = svga_render_4bpp_highres;
|
||||
} else if ((svga->gdcreg[5] & 0x60) == 0x20) {
|
||||
if (svga->seqregs[1] & 8) /*Low res (320)*/
|
||||
if (svga->seqregs[1] & 8) { /*Low res (320)*/
|
||||
svga->render = svga_render_2bpp_lowres;
|
||||
else
|
||||
pclog("2 bpp low res\n");
|
||||
} else
|
||||
svga->render = svga_render_2bpp_highres;
|
||||
} else {
|
||||
svga->map8 = svga->pallook;
|
||||
|
||||
@@ -418,6 +418,202 @@ svga_render_text_80_ksc5601(svga_t *svga)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
svga_render_2bpp_s3_lowres(svga_t *svga)
|
||||
{
|
||||
int changed_offset;
|
||||
int x;
|
||||
uint8_t dat[2];
|
||||
uint32_t addr;
|
||||
uint32_t *p;
|
||||
uint32_t changed_addr;
|
||||
|
||||
if ((svga->displine + svga->y_add) < 0)
|
||||
return;
|
||||
|
||||
if (svga->force_old_addr) {
|
||||
changed_offset = ((svga->ma << 1) + (svga->sc & ~svga->crtc[0x17] & 3) * 0x8000) >> 12;
|
||||
|
||||
if (svga->changedvram[changed_offset] || svga->changedvram[changed_offset + 1] || svga->fullchange) {
|
||||
p = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add];
|
||||
|
||||
if (svga->firstline_draw == 2000)
|
||||
svga->firstline_draw = svga->displine;
|
||||
svga->lastline_draw = svga->displine;
|
||||
|
||||
for (x = 0; x <= (svga->hdisp + svga->scrollcache); x += 16) {
|
||||
addr = svga->ma;
|
||||
|
||||
if (!(svga->crtc[0x17] & 0x40)) {
|
||||
addr = (addr << 1) & svga->vram_mask;
|
||||
addr &= ~7;
|
||||
|
||||
if ((svga->crtc[0x17] & 0x20) && (svga->ma & 0x20000))
|
||||
addr |= 4;
|
||||
|
||||
if (!(svga->crtc[0x17] & 0x20) && (svga->ma & 0x8000))
|
||||
addr |= 4;
|
||||
}
|
||||
|
||||
if (!(svga->crtc[0x17] & 0x01))
|
||||
addr = (addr & ~0x8000) | ((svga->sc & 1) ? 0x8000 : 0);
|
||||
|
||||
if (!(svga->crtc[0x17] & 0x02))
|
||||
addr = (addr & ~0x10000) | ((svga->sc & 2) ? 0x10000 : 0);
|
||||
|
||||
dat[0] = svga->vram[addr];
|
||||
dat[1] = svga->vram[addr | 0x1];
|
||||
if (svga->seqregs[1] & 4)
|
||||
svga->ma += 2;
|
||||
else
|
||||
svga->ma += 4;
|
||||
svga->ma &= svga->vram_mask;
|
||||
p[0] = p[1] = svga->pallook[svga->egapal[(dat[0] >> 6) & 3]];
|
||||
p[2] = p[3] = svga->pallook[svga->egapal[(dat[0] >> 4) & 3]];
|
||||
p[4] = p[5] = svga->pallook[svga->egapal[(dat[0] >> 2) & 3]];
|
||||
p[6] = p[7] = svga->pallook[svga->egapal[dat[0] & 3]];
|
||||
p[8] = p[9] = svga->pallook[svga->egapal[(dat[1] >> 6) & 3]];
|
||||
p[10] = p[11] = svga->pallook[svga->egapal[(dat[1] >> 4) & 3]];
|
||||
p[12] = p[13] = svga->pallook[svga->egapal[(dat[1] >> 2) & 3]];
|
||||
p[14] = p[15] = svga->pallook[svga->egapal[dat[1] & 3]];
|
||||
p += 16;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
changed_addr = svga->remap_func(svga, svga->ma);
|
||||
|
||||
if (svga->changedvram[changed_addr >> 12] || svga->changedvram[(changed_addr >> 12) + 1] || svga->fullchange) {
|
||||
p = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add];
|
||||
|
||||
if (svga->firstline_draw == 2000)
|
||||
svga->firstline_draw = svga->displine;
|
||||
svga->lastline_draw = svga->displine;
|
||||
|
||||
for (x = 0; x <= (svga->hdisp + svga->scrollcache); x += 16) {
|
||||
addr = svga->remap_func(svga, svga->ma);
|
||||
|
||||
dat[0] = svga->vram[addr];
|
||||
dat[1] = svga->vram[addr | 0x1];
|
||||
if (svga->seqregs[1] & 4)
|
||||
svga->ma += 2;
|
||||
else
|
||||
svga->ma += 4;
|
||||
|
||||
svga->ma &= svga->vram_mask;
|
||||
|
||||
p[0] = p[1] = svga->pallook[svga->egapal[(dat[0] >> 6) & 3]];
|
||||
p[2] = p[3] = svga->pallook[svga->egapal[(dat[0] >> 4) & 3]];
|
||||
p[4] = p[5] = svga->pallook[svga->egapal[(dat[0] >> 2) & 3]];
|
||||
p[6] = p[7] = svga->pallook[svga->egapal[dat[0] & 3]];
|
||||
p[8] = p[9] = svga->pallook[svga->egapal[(dat[1] >> 6) & 3]];
|
||||
p[10] = p[11] = svga->pallook[svga->egapal[(dat[1] >> 4) & 3]];
|
||||
p[12] = p[13] = svga->pallook[svga->egapal[(dat[1] >> 2) & 3]];
|
||||
p[14] = p[15] = svga->pallook[svga->egapal[dat[1] & 3]];
|
||||
|
||||
p += 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
svga_render_2bpp_s3_highres(svga_t *svga)
|
||||
{
|
||||
int changed_offset;
|
||||
int x;
|
||||
uint8_t dat[2];
|
||||
uint32_t addr;
|
||||
uint32_t *p;
|
||||
uint32_t changed_addr;
|
||||
|
||||
if ((svga->displine + svga->y_add) < 0)
|
||||
return;
|
||||
|
||||
if (svga->force_old_addr) {
|
||||
changed_offset = ((svga->ma << 1) + (svga->sc & ~svga->crtc[0x17] & 3) * 0x8000) >> 12;
|
||||
|
||||
if (svga->changedvram[changed_offset] || svga->changedvram[changed_offset + 1] || svga->fullchange) {
|
||||
p = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add];
|
||||
|
||||
if (svga->firstline_draw == 2000)
|
||||
svga->firstline_draw = svga->displine;
|
||||
svga->lastline_draw = svga->displine;
|
||||
|
||||
for (x = 0; x <= (svga->hdisp + svga->scrollcache); x += 8) {
|
||||
addr = svga->ma;
|
||||
|
||||
if (!(svga->crtc[0x17] & 0x40)) {
|
||||
addr = (addr << 1) & svga->vram_mask;
|
||||
addr &= ~7;
|
||||
|
||||
if ((svga->crtc[0x17] & 0x20) && (svga->ma & 0x20000))
|
||||
addr |= 4;
|
||||
|
||||
if (!(svga->crtc[0x17] & 0x20) && (svga->ma & 0x8000))
|
||||
addr |= 4;
|
||||
}
|
||||
|
||||
if (!(svga->crtc[0x17] & 0x01))
|
||||
addr = (addr & ~0x8000) | ((svga->sc & 1) ? 0x8000 : 0);
|
||||
|
||||
if (!(svga->crtc[0x17] & 0x02))
|
||||
addr = (addr & ~0x10000) | ((svga->sc & 2) ? 0x10000 : 0);
|
||||
|
||||
dat[0] = svga->vram[addr];
|
||||
dat[1] = svga->vram[addr | 0x1];
|
||||
if (svga->seqregs[1] & 4)
|
||||
svga->ma += 2;
|
||||
else
|
||||
svga->ma += 4;
|
||||
svga->ma &= svga->vram_mask;
|
||||
p[0] = svga->pallook[svga->egapal[(dat[0] >> 6) & 3]];
|
||||
p[1] = svga->pallook[svga->egapal[(dat[0] >> 4) & 3]];
|
||||
p[2] = svga->pallook[svga->egapal[(dat[0] >> 2) & 3]];
|
||||
p[3] = svga->pallook[svga->egapal[dat[0] & 3]];
|
||||
p[4] = svga->pallook[svga->egapal[(dat[1] >> 6) & 3]];
|
||||
p[5] = svga->pallook[svga->egapal[(dat[1] >> 4) & 3]];
|
||||
p[6] = svga->pallook[svga->egapal[(dat[1] >> 2) & 3]];
|
||||
p[7] = svga->pallook[svga->egapal[dat[1] & 3]];
|
||||
p += 8;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
changed_addr = svga->remap_func(svga, svga->ma);
|
||||
|
||||
if (svga->changedvram[changed_addr >> 12] || svga->changedvram[(changed_addr >> 12) + 1] || svga->fullchange) {
|
||||
p = &svga->monitor->target_buffer->line[svga->displine + svga->y_add][svga->x_add];
|
||||
|
||||
if (svga->firstline_draw == 2000)
|
||||
svga->firstline_draw = svga->displine;
|
||||
svga->lastline_draw = svga->displine;
|
||||
|
||||
for (x = 0; x <= (svga->hdisp + svga->scrollcache); x += 8) {
|
||||
addr = svga->remap_func(svga, svga->ma);
|
||||
|
||||
dat[0] = svga->vram[addr];
|
||||
dat[1] = svga->vram[addr | 0x1];
|
||||
if (svga->seqregs[1] & 4)
|
||||
svga->ma += 2;
|
||||
else
|
||||
svga->ma += 4;
|
||||
|
||||
svga->ma &= svga->vram_mask;
|
||||
|
||||
p[0] = svga->pallook[svga->egapal[(dat[0] >> 6) & 3]];
|
||||
p[1] = svga->pallook[svga->egapal[(dat[0] >> 4) & 3]];
|
||||
p[2] = svga->pallook[svga->egapal[(dat[0] >> 2) & 3]];
|
||||
p[3] = svga->pallook[svga->egapal[dat[0] & 3]];
|
||||
p[4] = svga->pallook[svga->egapal[(dat[1] >> 6) & 3]];
|
||||
p[5] = svga->pallook[svga->egapal[(dat[1] >> 4) & 3]];
|
||||
p[6] = svga->pallook[svga->egapal[(dat[1] >> 2) & 3]];
|
||||
p[7] = svga->pallook[svga->egapal[dat[1] & 3]];
|
||||
|
||||
p += 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
svga_render_2bpp_headland_highres(svga_t *svga)
|
||||
{
|
||||
|
||||
@@ -234,7 +234,9 @@ video_cards[] = {
|
||||
{ &s3_virge_357_agp_device },
|
||||
{ &s3_diamond_stealth_4000_agp_device },
|
||||
{ &s3_trio3d2x_agp_device },
|
||||
#ifdef USE_G100
|
||||
{ &productiva_g100_device, VIDEO_FLAG_TYPE_SPECIAL },
|
||||
#endif
|
||||
{ &velocity_100_agp_device },
|
||||
{ &velocity_200_agp_device },
|
||||
{ &voodoo_3_1000_agp_device },
|
||||
|
||||
Reference in New Issue
Block a user