mirror of
https://github.com/86Box/86Box.git
synced 2026-02-25 04:45:31 -07:00
Thoroughly clean up the code to vastly reduce the number of compiler warnings and found and fixed several bugs in the process; Applied all mainline PCem commits; Added SCSI hard disk emulation; Commented out all unfinished machines and graphics cards; Added the AOpen AP53 and ASUS P/I-P55T2 machines as well as another Tyan 440FX machine, all three with AMI WinBIOS (patch from TheCollector1995); Added the Diamond Stealth 3D 3000 (S3 ViRGE/VX) graphics card (patch from TheCollector1995); Added the PS/2 XT IDE (AccuLogic) HDD Controller (patch from TheCollector1995); Added Microsoft/Logitech Bus Mouse emulation (patch from waltje); Overhauled the makefiles (patch from waltje); Added the Adaptec AHA-1542CF SCSI controller (patch from waltje); Added preliminary (but still unfinished) Adaptec AHA-154x SCSI controller BIOS support (patch from waltje); Added an ISABugger debugging device (patch from waltje); Added sanity checks to the Direct3D code.
62 lines
1.8 KiB
C
62 lines
1.8 KiB
C
/* Copyright holders: Sarah Walker
|
|
see COPYING for more details
|
|
*/
|
|
/*Trident TKD8001 RAMDAC emulation*/
|
|
#include "ibm.h"
|
|
#include "mem.h"
|
|
#include "video.h"
|
|
#include "vid_svga.h"
|
|
#include "vid_tkd8001_ramdac.h"
|
|
|
|
void tkd8001_ramdac_out(uint16_t addr, uint8_t val, tkd8001_ramdac_t *ramdac, svga_t *svga)
|
|
{
|
|
switch (addr)
|
|
{
|
|
case 0x3C6:
|
|
if (ramdac->state == 4)
|
|
{
|
|
ramdac->state = 0;
|
|
ramdac->ctrl = val;
|
|
switch (val >> 5)
|
|
{
|
|
case 0: case 1: case 2: case 3:
|
|
svga->bpp = 8;
|
|
break;
|
|
case 5:
|
|
svga->bpp = 15;
|
|
break;
|
|
case 6:
|
|
svga->bpp = 24;
|
|
break;
|
|
case 7:
|
|
svga->bpp = 16;
|
|
break;
|
|
}
|
|
return;
|
|
}
|
|
break;
|
|
case 0x3C7: case 0x3C8: case 0x3C9:
|
|
ramdac->state = 0;
|
|
break;
|
|
}
|
|
svga_out(addr, val, svga);
|
|
}
|
|
|
|
uint8_t tkd8001_ramdac_in(uint16_t addr, tkd8001_ramdac_t *ramdac, svga_t *svga)
|
|
{
|
|
switch (addr)
|
|
{
|
|
case 0x3C6:
|
|
if (ramdac->state == 4)
|
|
{
|
|
return ramdac->ctrl;
|
|
}
|
|
ramdac->state++;
|
|
break;
|
|
case 0x3C7: case 0x3C8: case 0x3C9:
|
|
ramdac->state = 0;
|
|
break;
|
|
}
|
|
return svga_in(addr, svga);
|
|
}
|