Use correct resource BMP for each model's character set (Apple ][, original //e and Pravets)
Also resized the Pravets BMPs to be either 256 or 512 pixels in height.
This commit is contained in:
parent
8033455706
commit
749e1514bd
11 changed files with 91 additions and 52 deletions
|
@ -1078,6 +1078,10 @@
|
|||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource\ApplewinLogo.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="RESOURCE\CAPSOFF.BMP"
|
||||
>
|
||||
|
@ -1106,6 +1110,10 @@
|
|||
RelativePath=".\resource\CHARSET8C.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource\CHARSET8M.BMP"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="RESOURCE\COLOR.BMP"
|
||||
>
|
||||
|
|
|
@ -69,7 +69,7 @@ LED_CAPSON_P8_BITMAP BITMAP "LED_CAPS_ON_P8.BMP"
|
|||
LED_LATOFF_BITMAP BITMAP "LED_CAPS_OFF_LAT.BMP"
|
||||
LED_LATON_BITMAP BITMAP "LED_CAPS_ON_LAT.BMP"
|
||||
CHARSET82 BITMAP "CHARSET82.BMP"
|
||||
CHARSET8M BITMAP "CHARSET8C.BMP"
|
||||
CHARSET8M BITMAP "CHARSET8M.BMP"
|
||||
CHARSET8C BITMAP "CHARSET8C.BMP"
|
||||
HELP_BUTTON BITMAP "HELP.BMP"
|
||||
DRIVESWAP_BUTTON BITMAP "DRIVESWAP.BMP"
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.1 KiB |
|
@ -391,13 +391,13 @@ void SetCharsetType(void)
|
|||
{
|
||||
switch ( GetApple2Type() )
|
||||
{
|
||||
case A2TYPE_APPLE2: g_nCharsetType = 0; break;
|
||||
case A2TYPE_APPLE2PLUS: g_nCharsetType = 0; break;
|
||||
case A2TYPE_APPLE2E: g_nCharsetType = 0; break;
|
||||
case A2TYPE_APPLE2EENHANCED:g_nCharsetType = 0; break;
|
||||
case A2TYPE_PRAVETS82: g_nCharsetType = 1; break;
|
||||
case A2TYPE_PRAVETS8A: g_nCharsetType = 2; break;
|
||||
case A2TYPE_PRAVETS8M: g_nCharsetType = 3; break; //This charset has a very small difference with the PRAVETS82 one an probably has some misplaced characters. Still the Pravets82 charset is used, because setting charset to 3 results in some problems.
|
||||
case A2TYPE_APPLE2: g_nCharsetType = 0; break;
|
||||
case A2TYPE_APPLE2PLUS: g_nCharsetType = 0; break;
|
||||
case A2TYPE_APPLE2E: g_nCharsetType = 0; break;
|
||||
case A2TYPE_APPLE2EENHANCED:g_nCharsetType = 0; break;
|
||||
case A2TYPE_PRAVETS82: g_nCharsetType = 1; break;
|
||||
case A2TYPE_PRAVETS8M: g_nCharsetType = 2; break; //This charset has a very small difference with the PRAVETS82 one, and probably has some misplaced characters.
|
||||
case A2TYPE_PRAVETS8A: g_nCharsetType = 3; break;
|
||||
default:
|
||||
_ASSERT(0);
|
||||
g_nCharsetType = 0;
|
||||
|
@ -415,6 +415,10 @@ void LoadConfiguration(void)
|
|||
if ((dwComputerType >= A2TYPE_MAX) || (dwComputerType >= A2TYPE_UNDEFINED && dwComputerType < A2TYPE_CLONE))
|
||||
dwComputerType = A2TYPE_APPLE2EENHANCED;
|
||||
|
||||
// Remap the bad Pravets models (before AppleWin v1.26)
|
||||
if (dwComputerType == A2TYPE_BAD_PRAVETS82) dwComputerType = A2TYPE_PRAVETS82;
|
||||
if (dwComputerType == A2TYPE_BAD_PRAVETS8M) dwComputerType = A2TYPE_PRAVETS8M;
|
||||
|
||||
apple2Type = (eApple2Type) dwComputerType;
|
||||
}
|
||||
else // Support older AppleWin registry entries
|
||||
|
|
|
@ -166,7 +166,7 @@ enum eIRQSRC {IS_6522=0, IS_SPEECH, IS_SSC, IS_MOUSE};
|
|||
#define IS_APPLE2C (g_Apple2Type & APPLE2C_MASK)
|
||||
#define IS_CLONE() (g_Apple2Type & APPLECLONE_MASK)
|
||||
|
||||
// NB. These get persisted to the Registry & save-state file, so don't change the values for these enums!
|
||||
// NB. These get persisted to the Registry, so don't change the values for these enums!
|
||||
enum eApple2Type {
|
||||
A2TYPE_APPLE2=0,
|
||||
A2TYPE_APPLE2PLUS,
|
||||
|
@ -178,10 +178,12 @@ enum eApple2Type {
|
|||
//
|
||||
// Clones start here:
|
||||
A2TYPE_CLONE=APPLECLONE_MASK,
|
||||
A2TYPE_PRAVETS=APPLECLONE_MASK|APPLE2E_MASK,
|
||||
A2TYPE_PRAVETS82=A2TYPE_PRAVETS,
|
||||
A2TYPE_PRAVETS8M,
|
||||
A2TYPE_PRAVETS8A,
|
||||
A2TYPE_PRAVETS=APPLECLONE_MASK,
|
||||
A2TYPE_PRAVETS82=A2TYPE_PRAVETS, // Apple ][ clone
|
||||
A2TYPE_PRAVETS8M, // Apple ][ clone
|
||||
A2TYPE_BAD_PRAVETS82=A2TYPE_PRAVETS|APPLE2E_MASK, // Wrongly tagged as Apple //e clone (< AppleWin 1.26)
|
||||
A2TYPE_BAD_PRAVETS8M, // Wrongly tagged as Apple //e clone (< AppleWin 1.26)
|
||||
A2TYPE_PRAVETS8A, // Apple //e clone
|
||||
A2TYPE_MAX
|
||||
};
|
||||
|
||||
|
|
|
@ -379,6 +379,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
,{ 255, 255, 255 } // 15
|
||||
};
|
||||
|
||||
static csbits_t csbits; // charset, optionally followed by alt charset
|
||||
|
||||
// Prototypes
|
||||
// prototype from CPU.h
|
||||
|
@ -433,6 +434,22 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
static void updateScreenText40 ( long cycles6502 );
|
||||
static void updateScreenText80 ( long cycles6502 );
|
||||
|
||||
//===========================================================================
|
||||
static void set_csbits()
|
||||
{
|
||||
// NB. For models that don't have an alt charset then set /g_nVideoCharSet/ to zero
|
||||
switch ( GetApple2Type() )
|
||||
{
|
||||
case A2TYPE_APPLE2: csbits = &csbits_a2[0]; g_nVideoCharSet = 0; break;
|
||||
case A2TYPE_APPLE2PLUS: csbits = &csbits_a2[0]; g_nVideoCharSet = 0; break;
|
||||
case A2TYPE_APPLE2E: csbits = &csbits_2e[0]; break;
|
||||
case A2TYPE_APPLE2EENHANCED:csbits = &csbits_enhanced2e[0]; break;
|
||||
case A2TYPE_PRAVETS82: csbits = &csbits_pravets82[0]; g_nVideoCharSet = 0; break; // Apple ][ clone
|
||||
case A2TYPE_PRAVETS8M: csbits = &csbits_pravets8M[0]; g_nVideoCharSet = 0; break; // Apple ][ clone
|
||||
case A2TYPE_PRAVETS8A: csbits = &csbits_pravets8C[0]; break; // Apple //e clone
|
||||
default: csbits = &csbits_enhanced2e[0]; break;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
inline float clampZeroOne( const float & x )
|
||||
|
@ -1685,13 +1702,15 @@ void NTSC_VideoReinitialize( DWORD cyclesThisFrame )
|
|||
//===========================================================================
|
||||
void NTSC_VideoInitAppleType ()
|
||||
{
|
||||
int model = g_Apple2Type;
|
||||
int model = GetApple2Type();
|
||||
|
||||
// anything other than low bit set means not II/II+ (TC: include Pravets machines too?)
|
||||
if (model & 0xFFFE)
|
||||
g_pHorzClockOffset = APPLE_IIE_HORZ_CLOCK_OFFSET;
|
||||
else
|
||||
g_pHorzClockOffset = APPLE_IIP_HORZ_CLOCK_OFFSET;
|
||||
|
||||
set_csbits();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -21,7 +21,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#include "StdAfx.h"
|
||||
#include "NTSC_CharSet.h"
|
||||
|
||||
unsigned char csbits[2][256][8];
|
||||
unsigned char csbits_enhanced2e[2][256][8]; // Enhanced //e
|
||||
unsigned char csbits_2e[2][256][8]; // Original //e (no mousetext)
|
||||
unsigned char csbits_a2[1][256][8]; // ][ and ][+
|
||||
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
|
||||
|
||||
|
@ -33,9 +38,8 @@ static const UINT charWidth = 16;
|
|||
static const UINT charWidthBytes = 16/8;
|
||||
static const UINT charHeight = 16;
|
||||
|
||||
void get_csbits_xy (UINT charset, UINT ch, UINT cx, UINT cy, const BYTE* pBitmap)
|
||||
void get_csbits_xy (csbits_t csbits, UINT ch, UINT cx, UINT cy, const BYTE* pBitmap)
|
||||
{
|
||||
_ASSERT(charset < 2);
|
||||
_ASSERT(ch < 256);
|
||||
_ASSERT((cx < bitmapWidth/charWidth) && (cy < bitmapHeight/charHeight));
|
||||
|
||||
|
@ -53,56 +57,50 @@ void get_csbits_xy (UINT charset, UINT ch, UINT cx, UINT cy, const BYTE* pBitmap
|
|||
n >>= 1;
|
||||
}
|
||||
|
||||
csbits[charset][ch][y] = n;
|
||||
csbits[0][ch][y] = n;
|
||||
pBitmap += bitmapWidthBytes*2;
|
||||
}
|
||||
}
|
||||
|
||||
void make_csbits (void)
|
||||
void get_csbits (csbits_t csbits, const char* resourceName, const UINT cy0)
|
||||
{
|
||||
HBITMAP hCharBitmap = LoadBitmap(g_hInstance, TEXT("CHARSET40"));
|
||||
|
||||
const UINT bufferSize = bitmapWidthBytes*bitmapHeight;
|
||||
BYTE* pBuffer = new BYTE [bufferSize];
|
||||
|
||||
HBITMAP hCharBitmap = LoadBitmap(g_hInstance, resourceName);
|
||||
GetBitmapBits(hCharBitmap, bufferSize, pBuffer);
|
||||
|
||||
// Enhanced //e: Alt char set off
|
||||
for (UINT cy=0, ch=0; cy<16; cy++)
|
||||
for (UINT cy=cy0, ch=0; cy<cy0+16; cy++)
|
||||
{
|
||||
for (UINT cx=0; cx<16; cx++)
|
||||
{
|
||||
get_csbits_xy(0, ch++, cx, cy, pBuffer);
|
||||
get_csbits_xy(csbits, ch++, cx, cy, pBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
// Enhanced //e: Alt char set on (mouse-text)
|
||||
for (UINT cy=16, ch=0; cy<32; cy++)
|
||||
{
|
||||
for (UINT cx=0; cx<16; cx++)
|
||||
{
|
||||
get_csbits_xy(1, ch++, cx, cy, pBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Apple ][, ][+
|
||||
// . TODO: Original //e - which had no mouse-text
|
||||
// . TODO: Pravets
|
||||
for (UINT cy=32, ch=0; cy<48; cy++)
|
||||
{
|
||||
for (UINT cx=0; cx<16; cx++)
|
||||
{
|
||||
get_csbits_xy(2, ch++, cx, cy, pBuffer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
DeleteObject(hCharBitmap);
|
||||
|
||||
delete [] pBuffer;
|
||||
DeleteObject(hCharBitmap);
|
||||
}
|
||||
|
||||
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)
|
||||
get_csbits(&csbits_a2[0], TEXT("CHARSET40"), 32); // Apple ][, ][+
|
||||
get_csbits(&csbits_pravets82[0], TEXT("CHARSET82"), 0); // Pravets 82
|
||||
get_csbits(&csbits_pravets8M[0], TEXT("CHARSET8M"), 0); // Pravets 8M
|
||||
get_csbits(&csbits_pravets8C[0], TEXT("CHARSET8C"), 0); // Pravets 8A / 8C: Alt char set off
|
||||
get_csbits(&csbits_pravets8C[1], TEXT("CHARSET8C"), 16); // Pravets 8A / 8C: Alt char set on
|
||||
|
||||
// Original //e is just Enhanced //e with the 32 mousetext chars [0x40..0x5F] replaced by the non-alt charset chars [0x40..0x5F]
|
||||
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[] = {
|
||||
" ### "," # "," #### "," ### "," #### "," ##### "," ##### "," #### ",
|
||||
" # # "," # # "," # # "," # # "," # # "," # "," # "," # ",
|
||||
|
|
|
@ -21,7 +21,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#ifndef INCLUDED_CS_H
|
||||
#define INCLUDED_CS_H
|
||||
|
||||
extern unsigned char csbits[2][256][8];
|
||||
typedef unsigned char (*csbits_t)[256][8];
|
||||
|
||||
extern unsigned char csbits_enhanced2e[2][256][8]; // Enhanced //e
|
||||
extern unsigned char csbits_2e[2][256][8]; // Original //e (no mousetext)
|
||||
extern unsigned char csbits_a2[1][256][8]; // ][ and ][+
|
||||
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
|
||||
|
|
|
@ -567,9 +567,9 @@ static void CreateLookup_TextCommon(HDC hDstDC, DWORD rop)
|
|||
HDC hSrcDC = CreateCompatibleDC(hDstDC);
|
||||
|
||||
hCharBitmap[0] = LoadBitmap(g_hInstance,TEXT("CHARSET40"));
|
||||
hCharBitmap[1] = LoadBitmap(g_hInstance,TEXT("CHARSET82"));
|
||||
hCharBitmap[2] = LoadBitmap(g_hInstance,TEXT("CHARSET8C")); // FIXME: Pravets 8M probably has the same charset as Pravets 8C
|
||||
hCharBitmap[3] = LoadBitmap(g_hInstance,TEXT("CHARSET8C"));
|
||||
hCharBitmap[1] = LoadBitmap(g_hInstance,TEXT("CHARSET82")); //82
|
||||
hCharBitmap[2] = LoadBitmap(g_hInstance,TEXT("CHARSET82")); //8M
|
||||
hCharBitmap[3] = LoadBitmap(g_hInstance,TEXT("CHARSET8C")); //8A
|
||||
SelectObject(hSrcDC, hCharBitmap[g_nCharsetType]);
|
||||
|
||||
// TODO: Update with APPLE_FONT_Y_ values
|
||||
|
@ -1251,7 +1251,7 @@ BYTE VideoSetMode (WORD, WORD address, BYTE write, BYTE, ULONG uExecutedCycles)
|
|||
case 0x5F: if (!IS_APPLE2) g_uVideoMode &= ~VF_DHIRES; break;
|
||||
}
|
||||
|
||||
// Apple IIe, Techical Notes, #3: Double High-Resolution Graphics
|
||||
// Apple IIe, Technical Notes, #3: Double High-Resolution Graphics
|
||||
// 80STORE must be OFF to display page 2
|
||||
if (SW_80STORE)
|
||||
g_uVideoMode &= ~VF_PAGE2;
|
||||
|
@ -1796,7 +1796,7 @@ void Config_Save_Video()
|
|||
// ____________________________________________________________________
|
||||
|
||||
//===========================================================================
|
||||
void videoCreateDIBSection()
|
||||
static void videoCreateDIBSection()
|
||||
{
|
||||
// CREATE THE DEVICE CONTEXT
|
||||
HWND window = GetDesktopWindow();
|
||||
|
|
Loading…
Add table
Reference in a new issue