diff --git a/src/cpu/codegen_ops_fpu.h b/src/cpu/codegen_ops_fpu.h
index d1e6195e7..b2519e5ea 100644
--- a/src/cpu/codegen_ops_fpu.h
+++ b/src/cpu/codegen_ops_fpu.h
@@ -146,7 +146,7 @@ static uint32_t ropFSTs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint3
static uint32_t ropFSTd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
{
x86seg *target_seg;
- int host_reg1 = 0, host_reg2 = 0;
+ int host_reg1, host_reg2;
FP_ENTER();
op_pc--;
@@ -556,7 +556,7 @@ static uint32_t ropFISTPl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uin
static uint32_t ropFISTPq(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
{
x86seg *target_seg;
- int host_reg1 = 0, host_reg2 = 0;
+ int host_reg1, host_reg2;
FP_ENTER();
op_pc--;
@@ -621,12 +621,10 @@ static uint32_t ropFCHS(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint3
#define opFLDimm(name, v) \
static uint32_t ropFLD ## name(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
- uint64_t *q; \
static double fp_imm = v; \
\
FP_ENTER(); \
- q = (uint64_t *)&fp_imm; \
- FP_LOAD_IMM_Q(*q); \
+ FP_LOAD_IMM_Q(*(uint64_t *)&fp_imm); \
\
return op_pc; \
}
diff --git a/src/cpu/codegen_ops_mmx.h b/src/cpu/codegen_ops_mmx.h
index 2f2570e81..14730cb93 100644
--- a/src/cpu/codegen_ops_mmx.h
+++ b/src/cpu/codegen_ops_mmx.h
@@ -1,6 +1,6 @@
static uint32_t ropMOVQ_q_mm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
{
- int host_reg1 = 0, host_reg2 = 0;
+ int host_reg1, host_reg2;
MMX_ENTER();
diff --git a/src/cpu/codegen_x86-64.c b/src/cpu/codegen_x86-64.c
index 07fa3817c..72e115331 100644
--- a/src/cpu/codegen_x86-64.c
+++ b/src/cpu/codegen_x86-64.c
@@ -586,7 +586,7 @@ int opcode_0f_modrm[256] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*80*/
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*90*/
- 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, /*a0*/
+ 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, /*a0*/
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, /*b0*/
1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, /*c0*/
diff --git a/src/video/vid_ati18800.c b/src/video/vid_ati18800.c
index 24564154d..9d72f8aa4 100644
--- a/src/video/vid_ati18800.c
+++ b/src/video/vid_ati18800.c
@@ -8,13 +8,13 @@
*
* ATI 18800 emulation (VGA Edge-16)
*
- * Version: @(#)vid_ati18800.c 1.0.3 2017/11/04
+ * Version: @(#)vid_ati18800.c 1.0.4 2018/02/03
*
* Authors: Sarah Walker,
* Miran Grca,
*
- * Copyright 2008-2017 Sarah Walker.
- * Copyright 2016,2017 Miran Grca.
+ * Copyright 2008-2018 Sarah Walker.
+ * Copyright 2016-2018 Miran Grca.
*/
#include
#include
@@ -89,8 +89,6 @@ static void ati18800_out(uint16_t addr, uint8_t val, void *p)
svga->crtcreg = val & 0x3f;
return;
case 0x3D5:
- if (svga->crtcreg <= 0x18)
- val &= mask_crtc[svga->crtcreg];
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80) && !(ati18800->regs[0xb4] & 0x80))
return;
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80) && !(ati18800->regs[0xb4] & 0x80))
diff --git a/src/video/vid_ati28800.c b/src/video/vid_ati28800.c
index 63e91d0d4..b1d22519e 100644
--- a/src/video/vid_ati28800.c
+++ b/src/video/vid_ati28800.c
@@ -8,13 +8,13 @@
*
* ATI 28800 emulation (VGA Charger)
*
- * Version: @(#)vid_ati28800.c 1.0.4 2017/11/04
+ * Version: @(#)vid_ati28800.c 1.0.5 2018/02/03
*
* Authors: Sarah Walker,
* Miran Grca,
*
- * Copyright 2008-2017 Sarah Walker.
- * Copyright 2016,2017 Miran Grca.
+ * Copyright 2008-2018 Sarah Walker.
+ * Copyright 2016-2018 Miran Grca.
*/
#include
#include
@@ -107,8 +107,6 @@ static void ati28800_out(uint16_t addr, uint8_t val, void *p)
svga->crtcreg = val & 0x3f;
return;
case 0x3D5:
- if (svga->crtcreg <= 0x18)
- val &= mask_crtc[svga->crtcreg];
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
return;
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
diff --git a/src/video/vid_oti067.c b/src/video/vid_oti067.c
index b0067ece6..70e6c6f5c 100644
--- a/src/video/vid_oti067.c
+++ b/src/video/vid_oti067.c
@@ -8,13 +8,13 @@
*
* Oak OTI067/077 emulation.
*
- * Version: @(#)vid_oti067.c 1.0.3 2017/11/04
+ * Version: @(#)vid_oti067.c 1.0.4 2018/02/03
*
* Authors: Sarah Walker,
* Miran Grca,
*
- * Copyright 2008-2017 Sarah Walker.
- * Copyright 2016,2017 Miran Grca.
+ * Copyright 2008-2018 Sarah Walker.
+ * Copyright 2016-2018 Miran Grca.
*/
#include
#include
@@ -68,8 +68,6 @@ oti_out(uint16_t addr, uint8_t val, void *p)
return;
case 0x3D5:
- if (svga->crtcreg <= 0x18)
- val &= mask_crtc[svga->crtcreg];
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
return;
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
diff --git a/src/video/vid_paradise.c b/src/video/vid_paradise.c
index 17ea8e7af..dd96b1884 100644
--- a/src/video/vid_paradise.c
+++ b/src/video/vid_paradise.c
@@ -10,7 +10,7 @@
* PC2086, PC3086 use PVGA1A
* MegaPC uses W90C11A
*
- * Version: @(#)vid_paradise.c 1.0.4 2018/01/31
+ * Version: @(#)vid_paradise.c 1.0.5 2018/02/03
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -130,8 +130,6 @@ void paradise_out(uint16_t addr, uint8_t val, void *p)
svga->crtcreg = val & 0x3f;
return;
case 0x3D5:
- if (svga->crtcreg <= 0x18)
- val &= mask_crtc[svga->crtcreg];
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
return;
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))
diff --git a/src/video/vid_svga.c b/src/video/vid_svga.c
index 737671c8c..218f9b305 100644
--- a/src/video/vid_svga.c
+++ b/src/video/vid_svga.c
@@ -11,7 +11,7 @@
* This is intended to be used by another SVGA driver,
* and not as a card in it's own right.
*
- * Version: @(#)vid_svga.c 1.0.18 2018/02/01
+ * Version: @(#)vid_svga.c 1.0.19 2018/02/03
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -50,8 +50,6 @@ extern uint8_t edatlookup[4][4];
uint8_t svga_rotate[8][256];
-uint8_t mask_crtc[0x19] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x7F, 0xEF, 0xFF};
-
/*Primary SVGA device. As multiple video cards are not yet supported this is the
only SVGA device.*/
static svga_t *svga_pri;
diff --git a/src/video/vid_svga.h b/src/video/vid_svga.h
index 5358abee1..f3df68a9d 100644
--- a/src/video/vid_svga.h
+++ b/src/video/vid_svga.h
@@ -8,7 +8,7 @@
*
* Generic SVGA handling.
*
- * Version: @(#)vid_svga.h 1.0.4 2018/01/25
+ * Version: @(#)vid_svga.h 1.0.5 2018/02/03
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -190,8 +190,6 @@ void svga_set_override(svga_t *svga, int val);
#define RAMDAC_8BIT 1
void svga_set_ramdac_type(svga_t *svga, int type);
-extern uint8_t mask_crtc[0x19];
-
void svga_close(svga_t *svga);
uint32_t svga_mask_addr(uint32_t addr, svga_t *svga);
diff --git a/src/video/vid_vga.c b/src/video/vid_vga.c
index 02c6255af..233ab0755 100644
--- a/src/video/vid_vga.c
+++ b/src/video/vid_vga.c
@@ -8,13 +8,13 @@
*
* IBM VGA emulation.
*
- * Version: @(#)vid_vga.c 1.0.2 2017/11/04
+ * Version: @(#)vid_vga.c 1.0.3 2018/02/03
*
* Authors: Sarah Walker,
* Miran Grca,
*
- * Copyright 2008-2017 Sarah Walker.
- * Copyright 2016,2017 Miran Grca.
+ * Copyright 2008-2018 Sarah Walker.
+ * Copyright 2016-2018 Miran Grca.
*/
#include
#include
@@ -53,8 +53,6 @@ void vga_out(uint16_t addr, uint8_t val, void *p)
svga->crtcreg = val & 0x1f;
return;
case 0x3D5:
- if (svga->crtcreg <= 0x18)
- val &= mask_crtc[svga->crtcreg];
if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80))
return;
if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80))