From e6c75a7f1abd4859c495d44e46e332f94c5f9777 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Sun, 19 Jan 2020 01:19:40 +0100 Subject: [PATCH] Fixed some fatal's that turned out to be missing parts of the blt and the width bpp. --- src/video/vid_mga.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index 5da087e12..966e7f7ee 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -234,6 +234,7 @@ #define DWGCTRL_OPCODE_MASK (0xf << 0) #define DWGCTRL_OPCODE_LINE_OPEN (0x0 << 0) #define DWGCTRL_OPCODE_AUTOLINE_OPEN (0x1 << 0) +#define DWGCTRL_OPCODE_LINE_CLOSE (0x2 << 0) #define DWGCTRL_OPCODE_AUTOLINE_CLOSE (0x3 << 0) #define DWGCTRL_OPCODE_TRAP (0x4 << 0) #define DWGCTRL_OPCODE_TEXTURE_TRAP (0x6 << 0) @@ -4111,6 +4112,15 @@ blit_bitblt(mystique_t *mystique) svga->changedvram[(((mystique->dwgreg.ydst_lin + x) * 3) & mystique->vram_mask) >> 12] = changeframecount; break; + case MACCESS_PWIDTH_32: + dst = ((uint32_t *)svga->vram)[(mystique->dwgreg.ydst_lin + x) & mystique->vram_mask_l]; + + dst = bitop(src, dst, mystique->dwgreg.dwgctrl_running); + + ((uint32_t *)svga->vram)[(mystique->dwgreg.ydst_lin + x) & mystique->vram_mask_l] = dst; + svga->changedvram[((mystique->dwgreg.ydst_lin + x) & mystique->vram_mask_l) >> 10] = changeframecount; + break; + default: fatal("BITBLT RPL BMONOLEF PWIDTH %x %08x\n", mystique->maccess_running & MACCESS_PWIDTH_MASK, mystique->dwgreg.dwgctrl_running); } @@ -4436,6 +4446,10 @@ mystique_start_blit(mystique_t *mystique) case DWGCTRL_OPCODE_AUTOLINE_OPEN: blit_autoline(mystique, 0); break; + + case DWGCTRL_OPCODE_LINE_CLOSE: + blit_line(mystique, 1); + break; case DWGCTRL_OPCODE_AUTOLINE_CLOSE: blit_autoline(mystique, 1); @@ -4478,7 +4492,8 @@ mystique_start_blit(mystique_t *mystique) break; default: - fatal("mystique_start_blit: unknown blit %08x\n", mystique->dwgreg.dwgctrl_running); + fatal("mystique_start_blit: unknown blit %08x\n", mystique->dwgreg.dwgctrl_running & DWGCTRL_OPCODE_MASK); + break; } end_time = plat_timer_read();