2006-02-25 20:50:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
2006-07-02 22:58:12 +00:00
|
|
|
// Types ____________________________________________________________
|
2009-02-16 19:27:07 +00:00
|
|
|
enum VideoType_e
|
2006-03-01 00:23:42 +00:00
|
|
|
{
|
|
|
|
VT_MONO_CUSTOM
|
|
|
|
, VT_COLOR_STANDARD
|
|
|
|
, VT_COLOR_TEXT_OPTIMIZED
|
|
|
|
, VT_COLOR_TVEMU
|
|
|
|
, VT_COLOR_HALF_SHIFT_DIM
|
|
|
|
, VT_MONO_AMBER
|
|
|
|
, VT_MONO_GREEN
|
|
|
|
, VT_MONO_WHITE
|
2009-02-14 03:49:22 +00:00
|
|
|
// , VT_MONO_AUTHENTIC
|
2009-02-18 16:06:12 +00:00
|
|
|
, NUM_VIDEO_MODES
|
2006-03-01 00:23:42 +00:00
|
|
|
};
|
2006-02-25 20:50:29 +00:00
|
|
|
|
2006-07-02 09:56:50 +00:00
|
|
|
enum AppleFont_e
|
|
|
|
{
|
2006-07-03 15:27:19 +00:00
|
|
|
// 40-Column mode is 1x Zoom (default)
|
|
|
|
// 80-Column mode is ~0.75x Zoom (7 x 16)
|
|
|
|
// Tiny mode is 0.5 zoom (7x8) for debugger
|
2006-07-02 09:56:50 +00:00
|
|
|
APPLE_FONT_WIDTH = 14, // in pixels
|
|
|
|
APPLE_FONT_HEIGHT = 16, // in pixels
|
|
|
|
|
2006-07-03 15:27:19 +00:00
|
|
|
// Each cell has a reserved aligned pixel area (grid spacing)
|
2006-07-02 09:56:50 +00:00
|
|
|
APPLE_FONT_CELL_WIDTH = 16,
|
|
|
|
APPLE_FONT_CELL_HEIGHT = 16,
|
|
|
|
|
|
|
|
// The bitmap contains 3 regions
|
|
|
|
// Each region is 256x256 pixels = 16x16 chars
|
|
|
|
APPLE_FONT_X_REGIONSIZE = 256, // in pixelx
|
|
|
|
APPLE_FONT_Y_REGIONSIZE = 256, // in pixels
|
|
|
|
|
|
|
|
// Starting Y offsets (pixels) for the regions
|
|
|
|
APPLE_FONT_Y_APPLE_2PLUS = 0, // ][+
|
|
|
|
APPLE_FONT_Y_APPLE_80COL = 256, // //e (inc. Mouse Text)
|
|
|
|
APPLE_FONT_Y_APPLE_40COL = 512, // ][
|
|
|
|
};
|
|
|
|
|
2006-07-02 22:58:12 +00:00
|
|
|
// Globals __________________________________________________________
|
|
|
|
|
|
|
|
extern HBITMAP g_hLogoBitmap;
|
|
|
|
|
|
|
|
extern BOOL graphicsmode;
|
2009-02-14 03:49:22 +00:00
|
|
|
extern COLORREF monochrome; // saved
|
2009-02-16 19:27:07 +00:00
|
|
|
extern DWORD g_eVideoType; // saved
|
2009-02-14 03:49:22 +00:00
|
|
|
extern DWORD g_uHalfScanLines; // saved
|
2009-02-16 19:27:07 +00:00
|
|
|
extern LPBYTE g_pFramebufferbits;
|
2006-07-02 22:58:12 +00:00
|
|
|
|
|
|
|
// Prototypes _______________________________________________________
|
|
|
|
|
2006-02-25 20:50:29 +00:00
|
|
|
void CreateColorMixMap();
|
|
|
|
|
|
|
|
BOOL VideoApparentlyDirty ();
|
|
|
|
void VideoBenchmark ();
|
|
|
|
void VideoCheckPage (BOOL);
|
|
|
|
void VideoChooseColor ();
|
|
|
|
void VideoDestroy ();
|
2006-07-02 22:58:12 +00:00
|
|
|
void VideoDrawLogoBitmap( HDC hDstDC );
|
2006-02-25 20:50:29 +00:00
|
|
|
void VideoDisplayLogo ();
|
|
|
|
BOOL VideoHasRefreshed ();
|
|
|
|
void VideoInitialize ();
|
|
|
|
void VideoRealizePalette (HDC);
|
|
|
|
void VideoRedrawScreen ();
|
|
|
|
void VideoRefreshScreen ();
|
|
|
|
void VideoReinitialize ();
|
|
|
|
void VideoResetState ();
|
2007-08-06 21:38:35 +00:00
|
|
|
WORD VideoGetScannerAddress(bool* pbVblBar_OUT, const DWORD uExecutedCycles);
|
|
|
|
bool VideoGetVbl(DWORD uExecutedCycles);
|
2006-02-25 20:50:29 +00:00
|
|
|
void VideoUpdateFlash();
|
|
|
|
bool VideoGetSW80COL();
|
|
|
|
DWORD VideoGetSnapshot(SS_IO_Video* pSS);
|
|
|
|
DWORD VideoSetSnapshot(SS_IO_Video* pSS);
|
|
|
|
|
2008-08-25 05:25:27 +00:00
|
|
|
typedef bool (*VideoUpdateFuncPtr_t)(int,int,int,int,int);
|
|
|
|
|
|
|
|
extern bool g_bVideoDisplayPage2;
|
|
|
|
extern bool g_VideoForceFullRedraw;
|
|
|
|
|
|
|
|
void _Video_Dirty();
|
|
|
|
void _Video_RedrawScreen( VideoUpdateFuncPtr_t update, bool bMixed = false );
|
|
|
|
void _Video_SetupBanks( bool bBank2 );
|
|
|
|
bool Update40ColCell (int x, int y, int xpixel, int ypixel, int offset);
|
|
|
|
bool Update80ColCell (int x, int y, int xpixel, int ypixel, int offset);
|
|
|
|
bool UpdateLoResCell (int x, int y, int xpixel, int ypixel, int offset);
|
|
|
|
bool UpdateDLoResCell (int x, int y, int xpixel, int ypixel, int offset);
|
|
|
|
bool UpdateHiResCell (int x, int y, int xpixel, int ypixel, int offset);
|
|
|
|
bool UpdateDHiResCell (int x, int y, int xpixel, int ypixel, int offset);
|
|
|
|
|
2008-08-25 01:10:37 +00:00
|
|
|
extern bool g_bDisplayPrintScreenFileName;
|
2008-08-31 04:31:35 +00:00
|
|
|
void Video_ResetScreenshotCounter( char *pDiskImageFileName );
|
|
|
|
enum VideoScreenShot_e
|
|
|
|
{
|
|
|
|
SCREENSHOT_560x384 = 0,
|
|
|
|
SCREENSHOT_280x192
|
|
|
|
};
|
|
|
|
void Video_TakeScreenShot( int iScreenShotType );
|
2008-07-14 16:02:44 +00:00
|
|
|
|
2010-08-17 07:52:23 +00:00
|
|
|
BYTE __stdcall VideoCheckMode (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles);
|
|
|
|
BYTE __stdcall VideoCheckVbl (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles);
|
|
|
|
BYTE __stdcall VideoSetMode (WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG uExecutedCycles);
|