diff --git a/core/macros.h b/core/macros.h
index 6e5f4f7d..6f8969f2 100644
--- a/core/macros.h
+++ b/core/macros.h
@@ -46,4 +46,11 @@
#define INLINE static __inline__
#endif /* INLINE */
+/* Alignment macros for cross compiler compatibility */
+#if defined(_MSC_VER)
+#define ALIGNED_(x) __declspec(align(x))
+#elif defined(__GNUC__)
+#define ALIGNED_(x) __attribute__ ((aligned(x)))
+#endif
+
#endif /* _MACROS_H_ */
diff --git a/core/vdp_ctrl.c b/core/vdp_ctrl.c
index ce8b1a18..9b123476 100644
--- a/core/vdp_ctrl.c
+++ b/core/vdp_ctrl.c
@@ -54,10 +54,10 @@
}
/* VDP context */
-uint8 sat[0x400] __attribute__((aligned(4))); /* Internal copy of sprite attribute table */
-uint8 vram[0x10000] __attribute__((aligned(4))); /* Video RAM (64K x 8-bit) */
-uint8 cram[0x80] __attribute__((aligned(4))); /* On-chip color RAM (64 x 9-bit) */
-uint8 vsram[0x80] __attribute__((aligned(4))); /* On-chip vertical scroll RAM (40 x 11-bit) */
+uint8 ALIGNED_(4) sat[0x400]; /* Internal copy of sprite attribute table */
+uint8 ALIGNED_(4) vram[0x10000]; /* Video RAM (64K x 8-bit) */
+uint8 ALIGNED_(4) cram[0x80]; /* On-chip color RAM (64 x 9-bit) */
+uint8 ALIGNED_(4) vsram[0x80]; /* On-chip vertical scroll RAM (40 x 11-bit) */
uint8 reg[0x20]; /* Internal VDP registers (23 x 8-bit) */
uint8 hint_pending; /* 0= Line interrupt is pending */
uint8 vint_pending; /* 1= Frame interrupt is pending */
diff --git a/core/vdp_render.c b/core/vdp_render.c
index c9493b3b..c4a18765 100644
--- a/core/vdp_render.c
+++ b/core/vdp_render.c
@@ -553,7 +553,7 @@ static const uint32 tms_palette[16] =
#endif
/* Cached and flipped patterns */
-static uint8 bg_pattern_cache[0x80000] __attribute__((aligned(4)));
+static uint8 ALIGNED_(4) bg_pattern_cache[0x80000];
/* Sprite pattern name offset look-up table (Mode 5) */
static uint8 name_lut[0x400];
diff --git a/libretro/msvc/msvc-2017/libretro.def b/libretro/msvc/msvc-2017/libretro.def
index 70f6699a..5bd0bf52 100644
--- a/libretro/msvc/msvc-2017/libretro.def
+++ b/libretro/msvc/msvc-2017/libretro.def
@@ -1,4 +1,4 @@
-LIBRARY "msvc-2010"
+LIBRARY "msvc-2017"
EXPORTS
retro_set_environment
retro_set_video_refresh
diff --git a/libretro/msvc/msvc-2017/msvc-2017.vcxproj b/libretro/msvc/msvc-2017/msvc-2017.vcxproj
index 9d34b886..4adcd753 100644
--- a/libretro/msvc/msvc-2017/msvc-2017.vcxproj
+++ b/libretro/msvc/msvc-2017/msvc-2017.vcxproj
@@ -30,6 +30,7 @@
+
@@ -37,7 +38,7 @@
-
+
diff --git a/libretro/msvc/msvc-2017/msvc-2017.vcxproj.user b/libretro/msvc/msvc-2017/msvc-2017.vcxproj.user
new file mode 100644
index 00000000..0b0f24d5
--- /dev/null
+++ b/libretro/msvc/msvc-2017/msvc-2017.vcxproj.user
@@ -0,0 +1,6 @@
+
+
+
+ true
+
+
\ No newline at end of file