Added Wyse WY-700 video card emulation. Patch from John Elliott

This commit is contained in:
SarahW 2016-12-17 21:52:27 +00:00
commit da95fe4bcb
9 changed files with 35 additions and 18 deletions

View file

@ -39,6 +39,7 @@
#include "vid_tgui9440.h"
#include "vid_tvga.h"
#include "vid_vga.h"
#include "vid_wy700.h"
typedef struct
{
@ -71,6 +72,7 @@ static VIDEO_CARD video_cards[] =
{"Tseng ET4000AX", &et4000_device, GFX_ET4000},
{"Trident TGUI9440", &tgui9440_device, GFX_TGUI9440},
{"VGA", &vga_device, GFX_VGA},
{"Wyse 700", &wy700_device, GFX_WY700},
{"", NULL, 0}
};
@ -286,6 +288,7 @@ BITMAP *buffer, *buffer32;
uint8_t fontdat[256][8];
uint8_t fontdatm[256][16];
uint8_t fontdatw[512][32]; /* Wyse700 font */
int xsize=1,ysize=1;
@ -296,10 +299,12 @@ void loadfont(char *s, int format)
FILE *f=romfopen(s,"rb");
int c,d;
if (!f)
return;
if (!format)
{
return;
}
switch (format)
{
case 0: /* MDA */
for (c=0;c<256;c++)
{
for (d=0;d<8;d++)
@ -322,9 +327,8 @@ void loadfont(char *s, int format)
fontdat[c][d]=getc(f);
}
}
}
else if (format == 1)
{
break;
case 1: /* PC200 */
for (c=0;c<256;c++)
{
for (d=0;d<8;d++)
@ -334,7 +338,7 @@ void loadfont(char *s, int format)
}
for (c=0;c<256;c++)
{
for (d=0;d<8;d++)
for (d=0;d<8;d++)
{
fontdatm[c][d+8]=getc(f);
}
@ -348,16 +352,26 @@ void loadfont(char *s, int format)
}
for (d=0;d<8;d++) getc(f);
}
}
else
{
break;
default:
case 2: /* CGA */
for (c=0;c<256;c++)
{
for (d=0;d<8;d++)
for (d=0;d<8;d++)
{
fontdat[c][d]=getc(f);
}
}
break;
case 3: /* Wyse 700 */
for (c=0;c<512;c++)
{
for (d=0;d<32;d++)
{
fontdatw[c][d]=getc(f);
}
}
break;
}
fclose(f);
}