Fixed SVGA 15bpp and 16bpp low resolution renderers;
IDE WIN_DRIVE_DIAGNOSTICS fix per patch by greatpsycho; The two Laser XT boards now allow using up to 1152 kB RAM per report from greatpsycho.
This commit is contained in:
@@ -696,17 +696,31 @@ void svga_render_15bpp_lowres(svga_t *svga)
|
|||||||
svga->firstline_draw = svga->displine;
|
svga->firstline_draw = svga->displine;
|
||||||
svga->lastline_draw = svga->displine;
|
svga->lastline_draw = svga->displine;
|
||||||
|
|
||||||
for (x = 0; x <= svga->hdisp; x += 4)
|
for (x = 0; x <= svga->hdisp; x += 16)
|
||||||
{
|
{
|
||||||
uint32_t dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + (x << 1), svga)]);
|
uint32_t dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + x, svga)]);
|
||||||
|
|
||||||
p[x] = svga_color_transform(video_15to32[dat & 0xffff]);
|
p[x] = svga_color_transform(video_15to32[dat & 0xffff]);
|
||||||
p[x + 1] = svga_color_transform(video_15to32[dat >> 16]);
|
p[x + 1] = svga_color_transform(video_15to32[dat & 0xffff]);
|
||||||
|
p[x + 2] = svga_color_transform(video_15to32[dat >> 16]);
|
||||||
|
p[x + 3] = svga_color_transform(video_15to32[dat >> 16]);
|
||||||
|
|
||||||
dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + (x << 1) + 4, svga)]);
|
dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + x + 4, svga)]);
|
||||||
|
p[x + 4] = svga_color_transform(video_15to32[dat & 0xffff]);
|
||||||
|
p[x + 5] = svga_color_transform(video_15to32[dat & 0xffff]);
|
||||||
|
p[x + 6] = svga_color_transform(video_15to32[dat >> 16]);
|
||||||
|
p[x + 7] = svga_color_transform(video_15to32[dat >> 16]);
|
||||||
|
|
||||||
p[x] = svga_color_transform(video_15to32[dat & 0xffff]);
|
dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + x + 8, svga)]);
|
||||||
p[x + 1] = svga_color_transform(video_15to32[dat >> 16]);
|
p[x + 8] = svga_color_transform(video_15to32[dat & 0xffff]);
|
||||||
|
p[x + 9] = svga_color_transform(video_15to32[dat & 0xffff]);
|
||||||
|
p[x + 10] = svga_color_transform(video_15to32[dat >> 16]);
|
||||||
|
p[x + 11] = svga_color_transform(video_15to32[dat >> 16]);
|
||||||
|
|
||||||
|
dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + x + 12, svga)]);
|
||||||
|
p[x + 12] = svga_color_transform(video_15to32[dat & 0xffff]);
|
||||||
|
p[x + 13] = svga_color_transform(video_15to32[dat & 0xffff]);
|
||||||
|
p[x + 14] = svga_color_transform(video_15to32[dat >> 16]);
|
||||||
|
p[x + 15] = svga_color_transform(video_15to32[dat >> 16]);
|
||||||
}
|
}
|
||||||
svga->ma += x << 1;
|
svga->ma += x << 1;
|
||||||
svga->ma = svga_mask_addr(svga->ma, svga);
|
svga->ma = svga_mask_addr(svga->ma, svga);
|
||||||
@@ -768,17 +782,31 @@ void svga_render_16bpp_lowres(svga_t *svga)
|
|||||||
svga->firstline_draw = svga->displine;
|
svga->firstline_draw = svga->displine;
|
||||||
svga->lastline_draw = svga->displine;
|
svga->lastline_draw = svga->displine;
|
||||||
|
|
||||||
for (x = 0; x <= svga->hdisp; x += 4)
|
for (x = 0; x <= svga->hdisp; x += 16)
|
||||||
{
|
{
|
||||||
uint32_t dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + (x << 1), svga)]);
|
uint32_t dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + x, svga)]);
|
||||||
|
|
||||||
p[x] = svga_color_transform(video_16to32[dat & 0xffff]);
|
p[x] = svga_color_transform(video_16to32[dat & 0xffff]);
|
||||||
p[x + 1] = svga_color_transform(video_16to32[dat >> 16]);
|
p[x + 1] = svga_color_transform(video_16to32[dat & 0xffff]);
|
||||||
|
p[x + 2] = svga_color_transform(video_16to32[dat >> 16]);
|
||||||
|
p[x + 3] = svga_color_transform(video_16to32[dat >> 16]);
|
||||||
|
|
||||||
dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + (x << 1) + 4, svga)]);
|
dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + x + 4, svga)]);
|
||||||
|
p[x + 4] = svga_color_transform(video_16to32[dat & 0xffff]);
|
||||||
|
p[x + 5] = svga_color_transform(video_16to32[dat & 0xffff]);
|
||||||
|
p[x + 6] = svga_color_transform(video_16to32[dat >> 16]);
|
||||||
|
p[x + 7] = svga_color_transform(video_16to32[dat >> 16]);
|
||||||
|
|
||||||
p[x] = svga_color_transform(video_16to32[dat & 0xffff]);
|
dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + x + 8, svga)]);
|
||||||
p[x + 1] = svga_color_transform(video_16to32[dat >> 16]);
|
p[x + 8] = svga_color_transform(video_16to32[dat & 0xffff]);
|
||||||
|
p[x + 9] = svga_color_transform(video_16to32[dat & 0xffff]);
|
||||||
|
p[x + 10] = svga_color_transform(video_16to32[dat >> 16]);
|
||||||
|
p[x + 11] = svga_color_transform(video_16to32[dat >> 16]);
|
||||||
|
|
||||||
|
dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + x + 12, svga)]);
|
||||||
|
p[x + 12] = svga_color_transform(video_16to32[dat & 0xffff]);
|
||||||
|
p[x + 13] = svga_color_transform(video_16to32[dat & 0xffff]);
|
||||||
|
p[x + 14] = svga_color_transform(video_16to32[dat >> 16]);
|
||||||
|
p[x + 15] = svga_color_transform(video_16to32[dat >> 16]);
|
||||||
}
|
}
|
||||||
svga->ma += x << 1;
|
svga->ma += x << 1;
|
||||||
svga->ma = svga_mask_addr(svga->ma, svga);
|
svga->ma = svga_mask_addr(svga->ma, svga);
|
||||||
@@ -940,6 +968,32 @@ void svga_render_32bpp_highres(svga_t *svga)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void svga_render_ABGR8888_lowres(svga_t *svga)
|
||||||
|
{
|
||||||
|
int y_add = (enable_overscan) ? 16 : 0;
|
||||||
|
int x_add = y_add >> 1;
|
||||||
|
int dl = svga_display_line(svga);
|
||||||
|
|
||||||
|
if (svga->changedvram[svga->ma >> 12] || svga->changedvram[svga_mask_changedaddr((svga->ma >> 12) + 1, svga)] || svga->changedvram[svga_mask_changedaddr((svga->ma >> 12) + 2, svga)] || svga->fullchange)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int offset = (8 - ((svga->scrollcache & 6) >> 1)) + 24;
|
||||||
|
uint32_t *p = &((uint32_t *)buffer32->line[dl])[offset + x_add];
|
||||||
|
|
||||||
|
if (svga->firstline_draw == 2000)
|
||||||
|
svga->firstline_draw = svga->displine;
|
||||||
|
svga->lastline_draw = svga->displine;
|
||||||
|
|
||||||
|
for (x = 0; x <= svga->hdisp; x++)
|
||||||
|
{
|
||||||
|
uint32_t dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + (x << 2), svga)]);
|
||||||
|
p[x << 1] = p[(x << 1) + 1] = svga_color_transform(((dat & 0xff0000) >> 16) | (dat & 0x00ff00) | ((dat & 0x0000ff) << 16));
|
||||||
|
}
|
||||||
|
svga->ma += 4;
|
||||||
|
svga->ma = svga_mask_addr(svga->ma, svga);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void svga_render_ABGR8888_highres(svga_t *svga)
|
void svga_render_ABGR8888_highres(svga_t *svga)
|
||||||
{
|
{
|
||||||
int y_add = (enable_overscan) ? 16 : 0;
|
int y_add = (enable_overscan) ? 16 : 0;
|
||||||
@@ -966,6 +1020,32 @@ void svga_render_ABGR8888_highres(svga_t *svga)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void svga_render_RGBA8888_lowres(svga_t *svga)
|
||||||
|
{
|
||||||
|
int y_add = (enable_overscan) ? 16 : 0;
|
||||||
|
int x_add = y_add >> 1;
|
||||||
|
int dl = svga_display_line(svga);
|
||||||
|
|
||||||
|
if (svga->changedvram[svga->ma >> 12] || svga->changedvram[svga_mask_changedaddr((svga->ma >> 12) + 1, svga)] || svga->changedvram[svga_mask_changedaddr((svga->ma >> 12) + 2, svga)] || svga->fullchange)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int offset = (8 - ((svga->scrollcache & 6) >> 1)) + 24;
|
||||||
|
uint32_t *p = &((uint32_t *)buffer32->line[dl])[offset + x_add];
|
||||||
|
|
||||||
|
if (svga->firstline_draw == 2000)
|
||||||
|
svga->firstline_draw = svga->displine;
|
||||||
|
svga->lastline_draw = svga->displine;
|
||||||
|
|
||||||
|
for (x = 0; x <= svga->hdisp; x++)
|
||||||
|
{
|
||||||
|
uint32_t dat = *(uint32_t *)(&svga->vram[svga_mask_addr(svga->ma + (x << 2), svga)]);
|
||||||
|
p[x << 1] = p[(x << 1) + 1] = svga_color_transform(dat >> 8);
|
||||||
|
}
|
||||||
|
svga->ma += 4;
|
||||||
|
svga->ma = svga_mask_addr(svga->ma, svga);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void svga_render_RGBA8888_highres(svga_t *svga)
|
void svga_render_RGBA8888_highres(svga_t *svga)
|
||||||
{
|
{
|
||||||
int y_add = (enable_overscan) ? 16 : 0;
|
int y_add = (enable_overscan) ? 16 : 0;
|
||||||
|
|||||||
@@ -47,7 +47,9 @@ void svga_render_24bpp_lowres(svga_t *svga);
|
|||||||
void svga_render_24bpp_highres(svga_t *svga);
|
void svga_render_24bpp_highres(svga_t *svga);
|
||||||
void svga_render_32bpp_lowres(svga_t *svga);
|
void svga_render_32bpp_lowres(svga_t *svga);
|
||||||
void svga_render_32bpp_highres(svga_t *svga);
|
void svga_render_32bpp_highres(svga_t *svga);
|
||||||
|
void svga_render_ABGR8888_lowres(svga_t *svga);
|
||||||
void svga_render_ABGR8888_highres(svga_t *svga);
|
void svga_render_ABGR8888_highres(svga_t *svga);
|
||||||
|
void svga_render_RGBA8888_lowres(svga_t *svga);
|
||||||
void svga_render_RGBA8888_highres(svga_t *svga);
|
void svga_render_RGBA8888_highres(svga_t *svga);
|
||||||
|
|
||||||
extern void (*svga_render)(svga_t *svga);
|
extern void (*svga_render)(svga_t *svga);
|
||||||
|
|||||||
27
src/ide.c
27
src/ide.c
@@ -1252,21 +1252,28 @@ void writeide(int ide_board, uint16_t addr, uint8_t val)
|
|||||||
case WIN_SETIDLE1: /* Idle */
|
case WIN_SETIDLE1: /* Idle */
|
||||||
case WIN_CHECKPOWERMODE1:
|
case WIN_CHECKPOWERMODE1:
|
||||||
case WIN_SLEEP1:
|
case WIN_SLEEP1:
|
||||||
if (ide_drive_is_cdrom(ide))
|
if (val == WIN_DRIVE_DIAGNOSTICS)
|
||||||
{
|
{
|
||||||
cdrom[atapi_cdrom_drives[ide->channel]].status = BUSY_STAT;
|
callbackide(ide_board);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ide->atastat = BUSY_STAT;
|
if (ide_drive_is_cdrom(ide))
|
||||||
|
{
|
||||||
|
cdrom[atapi_cdrom_drives[ide->channel]].status = BUSY_STAT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ide->atastat = BUSY_STAT;
|
||||||
|
}
|
||||||
|
timer_process();
|
||||||
|
if (ide_drive_is_cdrom(ide))
|
||||||
|
{
|
||||||
|
cdrom[atapi_cdrom_drives[ide->channel]].callback = ((val == WIN_DRIVE_DIAGNOSTICS) ? 200 : 30) * IDE_TIME;
|
||||||
|
}
|
||||||
|
idecallback[ide_board] = ((val == WIN_DRIVE_DIAGNOSTICS) ? 200 : 30) * IDE_TIME;
|
||||||
|
timer_update_outstanding();
|
||||||
}
|
}
|
||||||
timer_process();
|
|
||||||
if (ide_drive_is_cdrom(ide))
|
|
||||||
{
|
|
||||||
cdrom[atapi_cdrom_drives[ide->channel]].callback = 30*IDE_TIME;
|
|
||||||
}
|
|
||||||
idecallback[ide_board]=30*IDE_TIME;
|
|
||||||
timer_update_outstanding();
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case WIN_IDENTIFY: /* Identify Device */
|
case WIN_IDENTIFY: /* Identify Device */
|
||||||
|
|||||||
@@ -158,8 +158,8 @@ MODEL models[] =
|
|||||||
{"Generic XT clone", ROM_GENXT, "genxt", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
{"Generic XT clone", ROM_GENXT, "genxt", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
||||||
{"AMI XT clone", ROM_AMIXT, "amixt", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
{"AMI XT clone", ROM_AMIXT, "amixt", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
||||||
{"DTK XT clone", ROM_DTKXT, "dtk", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
{"DTK XT clone", ROM_DTKXT, "dtk", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
||||||
{"VTech Laser Turbo XT", ROM_LTXT, "ltxt", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_laserxt_init, NULL},
|
{"VTech Laser Turbo XT", ROM_LTXT, "ltxt", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 1152, 64, 0, xt_laserxt_init, NULL},
|
||||||
{"VTech Laser XT3", ROM_LXT3, "lxt3", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_laserxt_init, NULL},
|
{"VTech Laser XT3", ROM_LXT3, "lxt3", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 1152, 64, 0, xt_laserxt_init, NULL},
|
||||||
{"Phoenix XT clone", ROM_PXXT, "pxxt", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
{"Phoenix XT clone", ROM_PXXT, "pxxt", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
||||||
{"Juko XT clone", ROM_JUKOPC, "jukopc", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
{"Juko XT clone", ROM_JUKOPC, "jukopc", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 0, 0, 64, 640, 64, 0, xt_init, NULL},
|
||||||
{"Tandy 1000", ROM_TANDY, "tandy", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 1, 0, 128, 640, 128, 0, tandy1k_init, &tandy1000_device},
|
{"Tandy 1000", ROM_TANDY, "tandy", { "", cpus_8088, "", NULL, "", NULL, "", NULL, "", NULL}, 1, 0, 128, 640, 128, 0, tandy1k_init, &tandy1000_device},
|
||||||
|
|||||||
Reference in New Issue
Block a user