Now up to date with current dev version.

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
This commit is contained in:
TomW 2013-05-27 17:46:42 +01:00
commit 9312de19ac
87 changed files with 4528 additions and 9373 deletions

View file

@ -1,15 +1,17 @@
/*Hercules emulation*/
#include "ibm.h"
#include "mem.h"
#include "timer.h"
#include "video.h"
void hercules_recalctimings();
void hercules_write(uint32_t addr, uint8_t val);
uint8_t hercules_read(uint32_t addr);
void hercules_write(uint32_t addr, uint8_t val, void *priv);
uint8_t hercules_read(uint32_t addr, void *priv);
static uint8_t hercules_ctrl, hercules_ctrl2, hercules_stat;
uint8_t crtcm[32],crtcmreg;
void hercules_out(uint16_t addr, uint8_t val)
void hercules_out(uint16_t addr, uint8_t val, void *priv)
{
// pclog("Herc out %04X %02X\n",addr,val);
switch (addr)
@ -37,7 +39,7 @@ void hercules_out(uint16_t addr, uint8_t val)
}
}
uint8_t hercules_in(uint16_t addr)
uint8_t hercules_in(uint16_t addr, void *priv)
{
// pclog("Herc in %04X %02X %04X:%04X %04X\n",addr,(hercules_stat & 0xF) | ((hercules_stat & 8) << 4),CS,pc,CX);
switch (addr)
@ -49,33 +51,37 @@ uint8_t hercules_in(uint16_t addr)
case 0x3BA:
return (hercules_stat & 0xF) | ((hercules_stat & 8) << 4);
}
return 0xff;
}
void hercules_write(uint32_t addr, uint8_t val)
void hercules_write(uint32_t addr, uint8_t val, void *priv)
{
// pclog("Herc write %08X %02X\n",addr,val);
vram[addr&0xFFFF]=val;
}
uint8_t hercules_read(uint32_t addr)
uint8_t hercules_read(uint32_t addr, void *priv)
{
return vram[addr&0xFFFF];
}
void hercules_recalctimings()
{
double _dispontime, _dispofftime;
disptime=crtc[0]+1;
dispontime=crtc[1];
dispofftime=disptime-dispontime;
dispontime*=MDACONST;
dispofftime*=MDACONST;
_dispontime=crtc[1];
_dispofftime=disptime-_dispontime;
_dispontime*=MDACONST;
_dispofftime*=MDACONST;
dispontime = (int)(_dispontime * (1 << TIMER_SHIFT));
dispofftime = (int)(_dispofftime * (1 << TIMER_SHIFT));
}
int mdacols[256][2][2];
static int linepos,displine;
static int vc,sc;
static uint16_t ma,maback,ca;
static uint16_t ma,maback;
static int con,coff,cursoron;
static int cgadispon,cgablink;
static int vsynctime,vadj;
@ -87,9 +93,8 @@ void hercules_poll()
int x,c;
int oldvc;
uint8_t chr,attr;
uint16_t dat,dat2,dat3,dat4;
uint16_t dat;
int cols[4];
int col;
int oldsc;
int blink;
if (!linepos)
@ -264,7 +269,7 @@ void hercules_poll()
int hercules_init()
{
mem_sethandler(0xb0000, 0x08000, hercules_read, NULL, NULL, hercules_write, NULL, NULL);
mem_sethandler(0xb0000, 0x08000, hercules_read, NULL, NULL, hercules_write, NULL, NULL, NULL);
return 0;
}