Changes since v0.7 : - Major CPU reorganisation. This has possibly broken some stuff, though I fixed all the regressions I could find - Lazy flags. This brought 10% speed improvement at one point, but that's probably been lost now - 430 VX chipset emulation - IDT Winchip emulation (currently sans MMX). Timing is probably wrong - Fixed a few FPU bugs - Timer reorganisation - Sound reorganisation - Other general reorganisation - AdLib Gold emulation - Windows Sound System emulation - Pro Audio Spectrum 16 emulation. This currently works with most DOS stuff, but not in Windows - Major improvements to GUS emulation. Has the downside that it now conflicts with SB emulation, so probably best to not enable both simultaneously - New graphics cards : - ATI-18800 (VGA Edge-16) - ATI-28800 (VGA Charger) - ATI Mach64GX (Graphics Pro Turbo). Quite a few features missing, but Windows doesn't seem to use half the features of this card - Cirrus Logic CL-GD5429. Blitter is a bit broken - Oak OTI-067 - S3 Trio64 (Number Nine 9FX) - S3 Virge. Only framebuffer stuff at the minute, Windows won't recognise the card - Trident TGUI-9440 - VGA. Doesn't work yet - Beginnings of 3DFX emulation, however this is in extremely early stages and doesn't do anything useful - Fixed DMA bug stopping floppy drives working in Windows 3.x - Fixed some other stuff probably - Broke some other stuff probably as well
87 lines
2.4 KiB
C
87 lines
2.4 KiB
C
#include "ibm.h"
|
|
#include "io.h"
|
|
|
|
#include "lpt.h"
|
|
|
|
static uint8_t lpt1_dat, lpt2_dat;
|
|
void lpt1_write(uint16_t port, uint8_t val, void *priv)
|
|
{
|
|
switch (port & 3)
|
|
{
|
|
case 0:
|
|
writedac(val);
|
|
lpt1_dat = val;
|
|
break;
|
|
case 2:
|
|
writedacctrl(val);
|
|
break;
|
|
}
|
|
}
|
|
uint8_t lpt1_read(uint16_t port, void *priv)
|
|
{
|
|
switch (port & 3)
|
|
{
|
|
case 0:
|
|
return lpt1_dat;
|
|
case 1:
|
|
return readdacfifo();
|
|
}
|
|
return 0xff;
|
|
}
|
|
|
|
void lpt2_write(uint16_t port, uint8_t val, void *priv)
|
|
{
|
|
switch (port & 3)
|
|
{
|
|
case 0:
|
|
writedac(val);
|
|
lpt2_dat = val;
|
|
break;
|
|
case 2:
|
|
writedacctrl(val);
|
|
break;
|
|
}
|
|
}
|
|
uint8_t lpt2_read(uint16_t port, void *priv)
|
|
{
|
|
switch (port & 3)
|
|
{
|
|
case 0:
|
|
return lpt2_dat;
|
|
case 1:
|
|
return readdacfifo();
|
|
}
|
|
return 0xff;
|
|
}
|
|
|
|
void lpt_init()
|
|
{
|
|
io_sethandler(0x0278, 0x0003, lpt1_read, NULL, NULL, lpt1_write, NULL, NULL, NULL);
|
|
io_sethandler(0x0378, 0x0003, lpt2_read, NULL, NULL, lpt2_write, NULL, NULL, NULL);
|
|
}
|
|
|
|
void lpt1_init(uint16_t port)
|
|
{
|
|
io_sethandler(port, 0x0003, lpt1_read, NULL, NULL, lpt1_write, NULL, NULL, NULL);
|
|
}
|
|
void lpt1_remove()
|
|
{
|
|
io_removehandler(0x0278, 0x0003, lpt1_read, NULL, NULL, lpt1_write, NULL, NULL, NULL);
|
|
io_removehandler(0x0378, 0x0003, lpt1_read, NULL, NULL, lpt1_write, NULL, NULL, NULL);
|
|
io_removehandler(0x03bc, 0x0003, lpt1_read, NULL, NULL, lpt1_write, NULL, NULL, NULL);
|
|
}
|
|
void lpt2_init(uint16_t port)
|
|
{
|
|
io_sethandler(port, 0x0003, lpt2_read, NULL, NULL, lpt2_write, NULL, NULL, NULL);
|
|
}
|
|
void lpt2_remove()
|
|
{
|
|
io_removehandler(0x0278, 0x0003, lpt2_read, NULL, NULL, lpt2_write, NULL, NULL, NULL);
|
|
io_removehandler(0x0378, 0x0003, lpt2_read, NULL, NULL, lpt2_write, NULL, NULL, NULL);
|
|
io_removehandler(0x03bc, 0x0003, lpt2_read, NULL, NULL, lpt2_write, NULL, NULL, NULL);
|
|
}
|
|
|
|
void lpt2_remove_ams()
|
|
{
|
|
io_removehandler(0x0379, 0x0002, lpt2_read, NULL, NULL, lpt2_write, NULL, NULL, NULL);
|
|
}
|