Add EGA status information.
This commit is contained in:
parent
b90b5b7d7d
commit
7a0398dd07
1 changed files with 21 additions and 6 deletions
|
|
@ -540,7 +540,6 @@ void ega_poll(void *p)
|
||||||
}
|
}
|
||||||
if (ega->vc == ega->vsyncstart)
|
if (ega->vc == ega->vsyncstart)
|
||||||
{
|
{
|
||||||
int wx = 0, wy = 0;
|
|
||||||
ega->dispon = 0;
|
ega->dispon = 0;
|
||||||
// printf("Vsync on at line %i %i\n",displine,vc);
|
// printf("Vsync on at line %i %i\n",displine,vc);
|
||||||
ega->stat |= 8;
|
ega->stat |= 8;
|
||||||
|
|
@ -563,10 +562,9 @@ void ega_poll(void *p)
|
||||||
|
|
||||||
video_blit_memtoscreen(32, 0, ega->firstline, ega->lastline, xsize, ega->lastline - ega->firstline);
|
video_blit_memtoscreen(32, 0, ega->firstline, ega->lastline, xsize, ega->lastline - ega->firstline);
|
||||||
|
|
||||||
frames++;
|
ega->frames++;
|
||||||
|
ega->video_res_x = xsize;
|
||||||
ega->video_res_x = wx;
|
ega->video_res_y = ysize+1;
|
||||||
ega->video_res_y = wy + 1;
|
|
||||||
if (!(ega->gdcreg[6] & 1)) /*Text mode*/
|
if (!(ega->gdcreg[6] & 1)) /*Text mode*/
|
||||||
{
|
{
|
||||||
ega->video_res_x /= (ega->seqregs[1] & 1) ? 8 : 9;
|
ega->video_res_x /= (ega->seqregs[1] & 1) ? 8 : 9;
|
||||||
|
|
@ -879,6 +877,23 @@ void ega_speed_changed(void *p)
|
||||||
ega_recalctimings(ega);
|
ega_recalctimings(ega);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ega_add_status_info(char *s, int max_len, void *p)
|
||||||
|
{
|
||||||
|
ega_t *ega = (ega_t *)p;
|
||||||
|
char temps[128];
|
||||||
|
|
||||||
|
if (!ega->video_bpp) strcpy(temps, "EGA in text mode\n");
|
||||||
|
else sprintf(temps, "EGA colour depth : %i bpp\n", ega->video_bpp);
|
||||||
|
strncat(s, temps, max_len);
|
||||||
|
|
||||||
|
sprintf(temps, "EGA resolution : %i x %i\n", ega->video_res_x, ega->video_res_y);
|
||||||
|
strncat(s, temps, max_len);
|
||||||
|
|
||||||
|
sprintf(temps, "EGA refresh rate : %i Hz\n\n", ega->frames);
|
||||||
|
ega->frames = 0;
|
||||||
|
strncat(s, temps, max_len);
|
||||||
|
}
|
||||||
|
|
||||||
device_t ega_device =
|
device_t ega_device =
|
||||||
{
|
{
|
||||||
"EGA",
|
"EGA",
|
||||||
|
|
@ -888,5 +903,5 @@ device_t ega_device =
|
||||||
ega_standalone_available,
|
ega_standalone_available,
|
||||||
ega_speed_changed,
|
ega_speed_changed,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
ega_add_status_info
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue