diff --git a/AppleWinExpress2013.vcxproj b/AppleWinExpress2013.vcxproj
index 6d0c6dba..8c96fb9c 100644
--- a/AppleWinExpress2013.vcxproj
+++ b/AppleWinExpress2013.vcxproj
@@ -75,6 +75,7 @@
+
@@ -130,6 +131,7 @@
+
diff --git a/AppleWinExpress2013.vcxproj.filters b/AppleWinExpress2013.vcxproj.filters
index c9b778eb..d35fad61 100644
--- a/AppleWinExpress2013.vcxproj.filters
+++ b/AppleWinExpress2013.vcxproj.filters
@@ -181,6 +181,9 @@
Source Files\Emulator
+
+ Source Files\Video
+
@@ -444,6 +447,9 @@
Source Files\_Headers
+
+ Source Files\Video
+
diff --git a/AppleWinExpress2015.vcxproj b/AppleWinExpress2015.vcxproj
index 4f171f93..b47e1470 100644
--- a/AppleWinExpress2015.vcxproj
+++ b/AppleWinExpress2015.vcxproj
@@ -75,6 +75,7 @@
+
@@ -130,6 +131,7 @@
+
@@ -459,4 +461,4 @@
-
+
\ No newline at end of file
diff --git a/AppleWinExpress2015.vcxproj.filters b/AppleWinExpress2015.vcxproj.filters
index c9b778eb..d35fad61 100644
--- a/AppleWinExpress2015.vcxproj.filters
+++ b/AppleWinExpress2015.vcxproj.filters
@@ -181,6 +181,9 @@
Source Files\Emulator
+
+ Source Files\Video
+
@@ -444,6 +447,9 @@
Source Files\_Headers
+
+ Source Files\Video
+
diff --git a/ApplewinExpress9.00.vcproj b/ApplewinExpress9.00.vcproj
index c46b645f..aa4af152 100644
--- a/ApplewinExpress9.00.vcproj
+++ b/ApplewinExpress9.00.vcproj
@@ -878,6 +878,10 @@
RelativePath=".\source\NTSC.h"
>
+
+
diff --git a/source/NTSC.cpp b/source/NTSC.cpp
index 6bcaeb97..09c19f9d 100644
--- a/source/NTSC.cpp
+++ b/source/NTSC.cpp
@@ -2,7 +2,7 @@
AppleWin : An Apple //e emulator for Windows
Copyright (C) 2010-2011, William S Simms
-Copyright (C) 2014-2015 Michael Pohoreski
+Copyright (C) 2014-2016, Michael Pohoreski, Tom Charlesworth
AppleWin is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Video.h" // g_pFramebufferbits
#include "NTSC.h"
- #include "NTSC_CharSet.cpp"
+ #include "NTSC_CharSet.h"
#define NTSC_REMOVE_WHITE_RINGING 1 // 0 = theoritical dimmed white has chroma, 1 = pure white without chroma tinting
#define NTSC_REMOVE_BLACK_GHOSTING 1 // 1 = remove black smear/smudges carrying over
diff --git a/source/NTSC_CharSet.cpp b/source/NTSC_CharSet.cpp
index 93a670f7..ce940e51 100644
--- a/source/NTSC_CharSet.cpp
+++ b/source/NTSC_CharSet.cpp
@@ -2,6 +2,7 @@
AppleWin : An Apple //e emulator for Windows
Copyright (C) 2010-2011, William S Simms
+Copyright (C) 2016, Tom Charlesworth
AppleWin is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,6 +20,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
+#include "AppleWin.h"
+
#include "NTSC_CharSet.h"
unsigned char csbits_enhanced2e[2][256][8]; // Enhanced //e
@@ -28,7 +31,7 @@ unsigned char csbits_pravets82[1][256][8]; // Pravets 82
unsigned char csbits_pravets8M[1][256][8]; // Pravets 8M
unsigned char csbits_pravets8C[2][256][8]; // Pravets 8A & 8C
-#if 1
+//
static const UINT bitmapWidth = 256;
static const UINT bitmapWidthBytes = bitmapWidth/8;
@@ -38,7 +41,7 @@ static const UINT charWidth = 16;
static const UINT charWidthBytes = 16/8;
static const UINT charHeight = 16;
-void get_csbits_xy (csbits_t csbits, UINT ch, UINT cx, UINT cy, const BYTE* pBitmap)
+static void get_csbits_xy(csbits_t csbits, UINT ch, UINT cx, UINT cy, const BYTE* pBitmap)
{
_ASSERT(ch < 256);
_ASSERT((cx < bitmapWidth/charWidth) && (cy < bitmapHeight/charHeight));
@@ -62,7 +65,7 @@ void get_csbits_xy (csbits_t csbits, UINT ch, UINT cx, UINT cy, const BYTE* pBit
}
}
-void get_csbits (csbits_t csbits, const char* resourceName, const UINT cy0)
+static void get_csbits(csbits_t csbits, const char* resourceName, const UINT cy0)
{
const UINT bufferSize = bitmapWidthBytes*bitmapHeight;
BYTE* pBuffer = new BYTE [bufferSize];
@@ -83,7 +86,7 @@ void get_csbits (csbits_t csbits, const char* resourceName, const UINT cy0)
delete [] pBuffer;
}
-void make_csbits (void)
+void make_csbits(void)
{
get_csbits(&csbits_enhanced2e[0], TEXT("CHARSET40"), 0); // Enhanced //e: Alt char set off
get_csbits(&csbits_enhanced2e[1], TEXT("CHARSET40"), 16); // Enhanced //e: Alt char set on (mousetext)
@@ -97,199 +100,3 @@ void make_csbits (void)
memcpy(csbits_2e, csbits_enhanced2e, sizeof(csbits_enhanced2e));
memcpy(&csbits_2e[1][64], &csbits_2e[0][64], 32*8);
}
-
-#else
-
-// NB. '(', ')' are 1 bit out of alignment
-static const char *csstrs[] = {
- " ### "," # "," #### "," ### "," #### "," ##### "," ##### "," #### ",
- " # # "," # # "," # # "," # # "," # # "," # "," # "," # ",
- " # # # "," # # "," # # "," # "," # # "," # "," # "," # ",
- " # ### "," # # "," #### "," # "," # # "," #### "," #### "," # ",
- " # ## "," ##### "," # # "," # "," # # "," # "," # "," # ## ",
- " # "," # # "," # # "," # # "," # # "," # "," # "," # # ",
- " #### "," # # "," #### "," ### "," #### "," ##### "," # "," #### ",
- " "," "," "," "," "," "," "," ",
- " # # "," ### "," # "," # # "," # "," # # "," # # "," ### ",
- " # # "," # "," # "," # # "," # "," ## ## "," # # "," # # ",
- " # # "," # "," # "," # # "," # "," # # # "," ## # "," # # ",
- " ##### "," # "," # "," ## "," # "," # # # "," # # # "," # # ",
- " # # "," # "," # "," # # "," # "," # # "," # ## "," # # ",
- " # # "," # "," # # "," # # "," # "," # # "," # # "," # # ",
- " # # "," ### "," ### "," # # "," ##### "," # # "," # # "," ### ",
- " "," "," "," "," "," "," "," ",
- " #### "," ### "," #### "," ### "," ##### "," # # "," # # "," # # ",
- " # # "," # # "," # # "," # # "," # "," # # "," # # "," # # ",
- " # # "," # # "," # # "," # "," # "," # # "," # # "," # # ",
- " #### "," # # "," #### "," ### "," # "," # # "," # # "," # # # ",
- " # "," # # # "," # # "," # "," # "," # # "," # # "," # # # ",
- " # "," # # "," # # "," # # "," # "," # # "," # # "," ## ## ",
- " # "," ## # "," # # "," ### "," # "," ### "," # "," # # ",
- " "," "," "," "," "," "," "," ",
- " # # "," # # "," ##### "," ##### "," "," ##### "," "," ",
- " # # "," # # "," # "," ## "," # "," ## "," "," ",
- " # # "," # # "," # "," ## "," # "," ## "," # "," ",
- " # "," # "," # "," ## "," # "," ## "," # # "," ",
- " # # "," # "," # "," ## "," # "," ## "," # # "," ",
- " # # "," # "," # "," ## "," # "," ## "," "," ",
- " # # "," # "," ##### "," ##### "," "," ##### "," "," ",
- " "," "," "," "," "," "," "," #######",
- " "," # "," # # "," # # "," # "," ## "," # "," # ",
- " "," # "," # # "," # # "," #### "," ## # "," # # "," # ",
- " "," # "," # # "," ##### "," # # "," # "," # # "," # ",
- " "," # "," "," # # "," ### "," # "," # "," ",
- " "," # "," "," ##### "," # # "," # "," # # # "," ",
- " "," "," "," # # "," #### "," # ## "," # # "," ",
- " "," # "," "," # # "," # "," ## "," ## # "," ",
- " "," "," "," "," "," "," "," ",
- " # "," # "," # "," "," "," "," "," ",
- " # "," # "," # # # "," # "," "," "," "," # ",
- " # "," # "," ### "," # "," "," "," "," # ",
- " # "," # "," # "," ##### "," "," ##### "," "," # ",
- " # "," # "," ### "," # "," # "," "," "," # ",
- " # "," # "," # # # "," # "," # "," "," "," # ",
- " # "," # "," # "," "," # "," "," # "," ",
- " "," "," "," "," "," "," "," ",
- " ### "," # "," ### "," ##### "," # "," ##### "," ### "," ##### ",
- " # # "," ## "," # # "," # "," ## "," # "," # "," # ",
- " # ## "," # "," # "," # "," # # "," #### "," # "," # ",
- " # # # "," # "," ## "," ## "," # # "," # "," #### "," # ",
- " ## # "," # "," # "," # "," ##### "," # "," # # "," # ",
- " # # "," # "," # "," # # "," # "," # # "," # # "," # ",
- " ### "," ### "," ##### "," ### "," # "," ### "," ### "," # ",
- " "," "," "," "," "," "," "," ",
- " ### "," ### "," "," "," # "," "," # "," ### ",
- " # # "," # # "," "," "," # "," "," # "," # # ",
- " # # "," # # "," # "," # "," # "," ##### "," # "," # ",
- " ### "," #### "," "," "," # "," "," # "," # ",
- " # # "," # "," # "," # "," # "," ##### "," # "," # ",
- " # # "," # "," "," # "," # "," "," # "," ",
- " ### "," ### "," "," # "," # "," "," # "," # ",
- " "," "," "," "," "," "," "," ",
- " # "," "," # "," "," # "," "," ## "," ",
- " # "," "," # "," "," # "," "," # # "," ",
- " # "," ### "," #### "," #### "," #### "," ### "," # "," #### ",
- " "," # "," # # "," # "," # # "," # # "," #### "," # # ",
- " "," #### "," # # "," # "," # # "," ##### "," # "," # # ",
- " "," # # "," # # "," # "," # # "," # "," # "," #### ",
- " "," #### "," #### "," #### "," #### "," #### "," # "," # ",
- " "," "," "," "," "," "," "," ### ",
- " # "," # "," # "," # "," ## "," "," "," ",
- " # "," "," "," # "," # "," "," "," ",
- " #### "," ## "," ## "," # # "," # "," ## ## "," #### "," ### ",
- " # # "," # "," # "," # # "," # "," # # # "," # # "," # # ",
- " # # "," # "," # "," ### "," # "," # # # "," # # "," # # ",
- " # # "," # "," # "," # # "," # "," # # # "," # # "," # # ",
- " # # "," ### "," # # "," # # "," ### "," # # "," # # "," ### ",
- " "," "," ## "," "," "," "," "," ",
- " "," "," "," "," # "," "," "," ",
- " "," "," "," "," # "," "," "," ",
- " #### "," #### "," # ### "," #### "," #### "," # # "," # # "," # # ",
- " # # "," # # "," ## "," # "," # "," # # "," # # "," # # ",
- " # # "," # # "," # "," ### "," # "," # # "," # # "," # # # ",
- " #### "," #### "," # "," # "," # # "," # ## "," # # "," # # # ",
- " # "," # "," # "," #### "," ## "," ## # "," # "," ## ## ",
- " # "," # "," "," "," "," "," "," ",
- " "," "," "," ### "," # "," ### "," ## # "," ",
- " "," "," "," ## "," # "," ## "," # ## "," # # # ",
- " # # "," # # "," ##### "," ## "," # "," ## "," "," # # ",
- " # # "," # # "," # "," ## "," # "," ## "," "," # # # ",
- " # "," # # "," # "," ## "," # "," ## "," "," # # ",
- " # # "," #### "," # "," ## "," # "," ## "," "," # # # ",
- " # # "," # "," ##### "," ### "," # "," ### "," "," ",
- " "," ### "," "," "," # "," "," "," ",
- " # "," # "," "," #######"," "," #######"," ###"," ",
- " # "," # "," "," # # "," #"," ###### "," ##"," ## ",
- " ## ## "," ## ## "," # "," # # "," # "," ##### #"," ######"," ### ",
- " #######"," # #"," ## "," # "," # # "," ## ##"," # ## "," ",
- " ###### "," # # "," ### "," # "," # # "," # # ###"," # ####"," ### ",
- " ###### "," # # "," #### "," # # "," # "," ## ####"," ## "," ## ",
- " ######"," # # #"," ## ## "," # # # "," # "," ## ####"," ###### "," # ",
- " ## ## "," ## ## "," # #"," #######"," "," #######"," # "," ###",
- " # "," "," # "," # "," #######"," #"," ###### "," ## # ",
- " # "," "," # "," ### "," "," #"," ###### "," ## ",
- " # "," "," # "," # # # "," "," # #"," ###### "," ### ",
- " #######"," "," # "," # # #"," "," ## #"," ###### "," ######",
- " # "," "," # # #"," # "," "," #######"," ###### "," ### ",
- " # "," "," # # # "," # "," "," ## "," ###### "," ## ",
- " # "," "," ### "," # "," "," # "," ###### "," # ",
- " "," # # # "," # "," # "," "," "," ###### "," #### ##",
- " # ##"," #"," #"," "," # "," # "," # # # "," # # # #",
- " ## "," # #"," # #"," "," # "," # "," # # # #"," # # # ",
- " ### "," # "," ### "," "," # "," # "," # # # "," # # # #",
- " ###### "," #######"," ##### "," #######"," # "," #######"," # # # #"," # # # ",
- " ### "," ##### "," #######"," "," # "," # "," # # # "," # # # #",
- " ## "," ### "," # "," "," # "," # "," # # # #"," # # # ",
- " # "," # #"," # #"," "," # "," # "," # # # "," # # # #",
- " ## ####"," #"," #"," "," #######"," "," # # # #"," # # # ",
- " "," "," #"," # "," #######"," # # "," #######"," # ",
- " ##### "," "," #"," ### "," "," # # "," #"," # ",
- " # #","####### "," #"," ##### "," "," ### ###"," #"," # ",
- " # "," #"," #"," #######"," "," "," ## #"," # ",
- " # "," #"," #"," ##### "," "," ### ###"," ## #"," # ",
- " # "," #"," #"," ### "," "," # # "," #"," # ",
- " #######","########"," #"," # "," "," # # "," #"," # ",
- " "," "," #"," "," #######"," "," #######"," # ",
-};
-
-#define STRINGS_PER_CHAR 8
-#define CHARS_PER_ROW 8
-#define STRINGS_PER_CHAR_ROW (STRINGS_PER_CHAR * CHARS_PER_ROW)
-
-void make_csbits (void) {
- int i,j;
- int szstrs = sizeof csstrs / sizeof csstrs[0];
- int numchars = szstrs / STRINGS_PER_CHAR;
-
- for (i = 0; i < numchars; ++i) {
- int si = ((i / STRINGS_PER_CHAR) * STRINGS_PER_CHAR_ROW) + (i % CHARS_PER_ROW);
- for (j = 0; j < STRINGS_PER_CHAR; ++j)
- {
- const char *sp = csstrs[si];
- unsigned char cb = 0;
-
- si += CHARS_PER_ROW;
-
- while (*sp) {
- if (*sp++ != ' ') cb |= 0x80;
- cb >>= 1;
- }
-
- csbits[0][i][j] = cb;
- }
- }
-
- /* move mousetext */
- for (i = 96; i < 128; ++i)
- for (j = 0; j < 8; ++j)
- csbits[1][i-32][j] = csbits[0][i][j];
-
- /* move lowercase */
- for (i = 64; i < 96; ++i)
- for (j = 0; j < 8; ++j)
- csbits[1][i+32][j] = csbits[1][i+160][j] =
- csbits[0][i+160][j] = csbits[0][i][j];
-
- /* move numbers */
- for (i = 32; i < 64; ++i)
- for (j = 0; j < 8; ++j)
- csbits[1][i][j] = csbits[1][i+128][j] =
- csbits[0][i+64][j] = csbits[0][i+128][j] = csbits[0][i][j];
-
- /* move uppercase */
- for (i = 0; i < 32; ++i)
- for (j = 0; j < 8; ++j)
- csbits[1][i][j] = csbits[1][i+128][j] = csbits[1][i+192][j] =
- csbits[0][i+64][j] = csbits[0][i+128][j] = csbits[0][i+192][j] = csbits[0][i][j];
-
- /* invert (skip mousetext) */
- for (i = 0; i < 128; ++i)
- for (j = 0; j < 8; ++j)
- {
- csbits[0][i][j] ^= 0xFF;
- if (i < 64 || i >= 96)
- csbits[1][i][j] ^= 0xFF;
- }
-}
-
-#endif
diff --git a/source/NTSC_CharSet.h b/source/NTSC_CharSet.h
index faa3b1bb..3f549059 100644
--- a/source/NTSC_CharSet.h
+++ b/source/NTSC_CharSet.h
@@ -1,25 +1,4 @@
-/*
-AppleWin : An Apple //e emulator for Windows
-
-Copyright (C) 2010-2011, William S Simms
-
-AppleWin is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-AppleWin is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with AppleWin; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#ifndef INCLUDED_CS_H
-#define INCLUDED_CS_H
+#pragma once
typedef unsigned char (*csbits_t)[256][8];
@@ -30,6 +9,4 @@ extern unsigned char csbits_pravets82[1][256][8]; // Pravets 82
extern unsigned char csbits_pravets8M[1][256][8]; // Pravets 8M
extern unsigned char csbits_pravets8C[2][256][8]; // Pravets 8A & 8C
-void make_csbits (void);
-
-#endif
+void make_csbits(void);