Fixed CD-ROM ATAPI DMA and made ATAPI PIO much less of a mess;
Fixed MCA write bugs for the AHA-1640 and BT-640; Fixed a warning in the PC87306 Super I/O chip emulation; Each renderer now only has a 32-bit blitter - video_blit_memtoscreen_8() now only converts buffer to buffer32 and then calls video_blit_memtoscreen(), 8-bit blitters are now gone.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Emulation of the old and new IBM CGA graphics cards.
|
||||
*
|
||||
* Version: @(#)vid_cga.c 1.0.7 2017/10/18
|
||||
* Version: @(#)vid_cga.c 1.0.8 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -411,7 +411,7 @@ void cga_poll(void *p)
|
||||
if (cga->composite)
|
||||
video_blit_memtoscreen(0, cga->firstline - 4, 0, (cga->lastline - cga->firstline) + 8, xsize, (cga->lastline - cga->firstline) + 8);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, cga->firstline - 4, xsize, (cga->lastline - cga->firstline) + 8);
|
||||
video_blit_memtoscreen_8(0, cga->firstline - 4, 0, (cga->lastline - cga->firstline) + 8, xsize, (cga->lastline - cga->firstline) + 8);
|
||||
frames++;
|
||||
|
||||
video_res_x = xsize - 16;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Plantronics ColorPlus emulation.
|
||||
*
|
||||
* Version: @(#)vid_colorplus.c 1.0.3 2017/10/18
|
||||
* Version: @(#)vid_colorplus.c 1.0.4 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -327,7 +327,7 @@ void colorplus_poll(void *p)
|
||||
if (colorplus->cga.composite)
|
||||
video_blit_memtoscreen(0, colorplus->cga.firstline - 4, 0, (colorplus->cga.lastline - colorplus->cga.firstline) + 8, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, colorplus->cga.firstline - 4, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8);
|
||||
video_blit_memtoscreen_8(0, colorplus->cga.firstline - 4, 0, (colorplus->cga.lastline - colorplus->cga.firstline) + 8, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8);
|
||||
frames++;
|
||||
|
||||
video_res_x = xsize - 16;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* MDSI Genius VHR emulation.
|
||||
*
|
||||
* Version: @(#)vid_genius.c 1.0.3 2017/10/18
|
||||
* Version: @(#)vid_genius.c 1.0.4 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -562,7 +562,7 @@ void genius_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen_8(0, 0, xsize, ysize);
|
||||
video_blit_memtoscreen_8(0, 0, 0, ysize, xsize, ysize);
|
||||
|
||||
frames++;
|
||||
/* Fixed 728x1008 resolution */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Hercules emulation.
|
||||
*
|
||||
* Version: @(#)vid_hercules.c 1.0.4 2017/10/18
|
||||
* Version: @(#)vid_hercules.c 1.0.5 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -295,7 +295,7 @@ void hercules_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen_8(0, hercules->firstline, xsize, ysize);
|
||||
video_blit_memtoscreen_8(0, hercules->firstline, 0, ysize, xsize, ysize);
|
||||
frames++;
|
||||
if ((hercules->ctrl & 2) && (hercules->ctrl2 & 1))
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* MDA emulation.
|
||||
*
|
||||
* Version: @(#)vid_mda.c 1.0.4 2017/10/18
|
||||
* Version: @(#)vid_mda.c 1.0.5 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -254,7 +254,7 @@ void mda_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen_8(0, mda->firstline, xsize, mda->lastline - mda->firstline);
|
||||
video_blit_memtoscreen_8(0, mda->firstline, 0, ysize, xsize, ysize);
|
||||
frames++;
|
||||
video_res_x = mda->crtc[1];
|
||||
video_res_y = mda->crtc[6];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Olivetti M24 video emulation- essentially double-res CGA.
|
||||
*
|
||||
* Version: @(#)vid_olivetti_m24.c 1.0.3 2017/10/18
|
||||
* Version: @(#)vid_olivetti_m24.c 1.0.4 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -416,7 +416,7 @@ void m24_poll(void *p)
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
|
||||
video_blit_memtoscreen_8(0, m24->firstline - 8, xsize, (m24->lastline - m24->firstline) + 16);
|
||||
video_blit_memtoscreen_8(0, m24->firstline - 8, 0, (m24->lastline - m24->firstline) + 16, xsize, (m24->lastline - m24->firstline) + 16);
|
||||
frames++;
|
||||
|
||||
video_res_x = xsize - 16;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* time as between 12 and 46 cycles. We currently always use
|
||||
* the lower number.
|
||||
*
|
||||
* Version: @(#)vid_pc1512.c 1.0.3 2017/10/18
|
||||
* Version: @(#)vid_pc1512.c 1.0.4 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -425,7 +425,7 @@ static void pc1512_poll(void *p)
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
|
||||
video_blit_memtoscreen_8(0, pc1512->firstline - 4, xsize, (pc1512->lastline - pc1512->firstline) + 8);
|
||||
video_blit_memtoscreen_8(0, pc1512->firstline - 4, 0, (pc1512->lastline - pc1512->firstline) + 8, xsize, (pc1512->lastline - pc1512->firstline) + 8);
|
||||
|
||||
video_res_x = xsize - 16;
|
||||
video_res_y = ysize;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Video emulation for IBM PCjr.
|
||||
*
|
||||
* Version: @(#)vid_pcjr.c 1.0.3 2017/10/18
|
||||
* Version: @(#)vid_pcjr.c 1.0.4 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -518,7 +518,7 @@ void pcjr_poll(void *p)
|
||||
if (pcjr->composite)
|
||||
video_blit_memtoscreen(0, pcjr->firstline-4, 0, (pcjr->lastline - pcjr->firstline) + 8, xsize, (pcjr->lastline - pcjr->firstline) + 8);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, pcjr->firstline-4, xsize, (pcjr->lastline - pcjr->firstline) + 8);
|
||||
video_blit_memtoscreen_8(0, pcjr->firstline-4, 0, (pcjr->lastline - pcjr->firstline) + 8, xsize, (pcjr->lastline - pcjr->firstline) + 8);
|
||||
|
||||
frames++;
|
||||
video_res_x = xsize - 16;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Emulation of the Tandy Model 1000 video.
|
||||
*
|
||||
* Version: @(#)vid_tandy.c 1.0.2 2017/10/18
|
||||
* Version: @(#)vid_tandy.c 1.0.3 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -555,7 +555,7 @@ void tandy_poll(void *p)
|
||||
if (tandy->composite)
|
||||
video_blit_memtoscreen(0, tandy->firstline-4, 0, (tandy->lastline - tandy->firstline) + 8, xsize, (tandy->lastline - tandy->firstline) + 8);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, tandy->firstline-4, xsize, (tandy->lastline - tandy->firstline) + 8);
|
||||
video_blit_memtoscreen_8(0, tandy->firstline-4, 0, (tandy->lastline - tandy->firstline) + 8, xsize, (tandy->lastline - tandy->firstline) + 8);
|
||||
|
||||
frames++;
|
||||
video_res_x = xsize - 16;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Emulation of the Tandy Model 1000/SL video.
|
||||
*
|
||||
* Version: @(#)vid_tandysl.c 1.0.3 2017/10/18
|
||||
* Version: @(#)vid_tandysl.c 1.0.4 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -621,7 +621,7 @@ static void tandysl_poll(void *p)
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
|
||||
video_blit_memtoscreen_8(0, tandy->firstline-4, xsize, (tandy->lastline - tandy->firstline) + 8);
|
||||
video_blit_memtoscreen_8(0, tandy->firstline-4, 0, (tandy->lastline - tandy->firstline) + 8, xsize, (tandy->lastline - tandy->firstline) + 8);
|
||||
|
||||
frames++;
|
||||
video_res_x = xsize - 16;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Wyse-700 emulation.
|
||||
*
|
||||
* Version: @(#)vid_wy700.c 1.0.3 2017/10/18
|
||||
* Version: @(#)vid_wy700.c 1.0.4 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -871,7 +871,7 @@ void wy700_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen_8(0, 0, xsize, ysize);
|
||||
video_blit_memtoscreen_8(0, 0, 0, ysize, xsize, ysize);
|
||||
|
||||
frames++;
|
||||
/* Fixed 1280x800 resolution */
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
* W = 3 bus clocks
|
||||
* L = 4 bus clocks
|
||||
*
|
||||
* Version: @(#)video.c 1.0.4 2017/10/18
|
||||
* Version: @(#)video.c 1.0.5 2017/10/22
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -179,7 +179,7 @@ PALETTE cgapal_mono[6] = {
|
||||
|
||||
|
||||
static struct {
|
||||
int x, y, y1, y2, w, h, blit8;
|
||||
int x, y, y1, y2, w, h;
|
||||
int busy;
|
||||
int buffer_in_use;
|
||||
|
||||
@@ -191,7 +191,6 @@ static struct {
|
||||
|
||||
|
||||
static void (*blit_func)(int x, int y, int y1, int y2, int w, int h);
|
||||
static void (*blit8_func)(int x, int y, int w, int h);
|
||||
|
||||
|
||||
static
|
||||
@@ -201,10 +200,7 @@ void blit_thread(void *param)
|
||||
thread_wait_event(blit_data.wake_blit_thread, -1);
|
||||
thread_reset_event(blit_data.wake_blit_thread);
|
||||
|
||||
if (blit_data.blit8)
|
||||
blit8_func(blit_data.x, blit_data.y, blit_data.w, blit_data.h);
|
||||
else
|
||||
blit_func(blit_data.x, blit_data.y, blit_data.y1, blit_data.y2, blit_data.w, blit_data.h);
|
||||
blit_func(blit_data.x, blit_data.y, blit_data.y1, blit_data.y2, blit_data.w, blit_data.h);
|
||||
|
||||
blit_data.busy = 0;
|
||||
thread_set_event(blit_data.blit_complete);
|
||||
@@ -213,10 +209,9 @@ void blit_thread(void *param)
|
||||
|
||||
|
||||
void
|
||||
video_setblit(void(*blit8)(int,int,int,int),void(*blit)(int,int,int,int,int,int))
|
||||
video_setblit(void(*blit)(int,int,int,int,int,int))
|
||||
{
|
||||
blit_func = blit;
|
||||
blit8_func = blit8;
|
||||
}
|
||||
|
||||
|
||||
@@ -262,27 +257,28 @@ video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
|
||||
blit_data.y2 = y2;
|
||||
blit_data.w = w;
|
||||
blit_data.h = h;
|
||||
blit_data.blit8 = 0;
|
||||
|
||||
thread_set_event(blit_data.wake_blit_thread);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
video_blit_memtoscreen_8(int x, int y, int w, int h)
|
||||
video_blit_memtoscreen_8(int x, int y, int y1, int y2, int w, int h)
|
||||
{
|
||||
int yy, xx;
|
||||
|
||||
if (h <= 0) return;
|
||||
|
||||
video_wait_for_blit();
|
||||
for (yy = 0; yy < h; yy++)
|
||||
{
|
||||
if ((y + yy) >= 0 && (y + yy) < buffer->h)
|
||||
{
|
||||
for (xx = 0; xx < w; xx++)
|
||||
*(uint32_t *) &(buffer32->line[y + yy][(x + xx) << 2]) = pal_lookup[buffer->line[y + yy][x + xx]];
|
||||
}
|
||||
}
|
||||
|
||||
blit_data.busy = 1;
|
||||
blit_data.x = x;
|
||||
blit_data.y = y;
|
||||
blit_data.w = w;
|
||||
blit_data.h = h;
|
||||
blit_data.blit8 = 1;
|
||||
|
||||
thread_set_event(blit_data.wake_blit_thread);
|
||||
video_blit_memtoscreen(x, y, y1, y2, w, h);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -90,10 +90,9 @@ extern char *video_get_internal_name(int card);
|
||||
extern int video_get_video_from_internal_name(char *s);
|
||||
|
||||
|
||||
extern void video_setblit(void(*blit8)(int,int,int,int),
|
||||
void(*blit)(int,int,int,int,int,int));
|
||||
extern void video_setblit(void(*blit)(int,int,int,int,int,int));
|
||||
extern void video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h);
|
||||
extern void video_blit_memtoscreen_8(int x, int y, int w, int h);
|
||||
extern void video_blit_memtoscreen_8(int x, int y, int y1, int y2, int w, int h);
|
||||
extern void video_blit_complete(void);
|
||||
extern void video_wait_for_blit(void);
|
||||
extern void video_wait_for_buffer(void);
|
||||
|
||||
Reference in New Issue
Block a user