--- hatari/src/includes/vdi.h 2019/04/01 07:10:22 1.1.1.2 +++ hatari/src/includes/vdi.h 2019/04/09 08:55:46 1.1.1.11 @@ -1,38 +1,57 @@ /* - Hatari + Hatari - vdi.h + + This file is distributed under the GNU General Public License, version 2 + or at your option any later version. Read the file gpl.txt for details. */ -#ifndef VDI_H -#define VDI_H +#ifndef HATARI_VDI_H +#define HATARI_VDI_H -#define MAX_VDI_WIDTH 1024 -#define MAX_VDI_HEIGHT 768 #define MAX_VDI_PLANES 4 +/* TOS needs screen width to be aligned to 128/planes and height to VDI text + * height (16, larger of these, is used in calculating the limits in Hatari). + * Max. screen size supported by EmuTOS (and TOS v3.x?) is 300kB. + * + * Below MAX_VDI_* values are reasonable limits for monochrome resolutions. + * 300kB limits screen size to max. resolution of 2048x1200 or 1920x1280, + * which allows FHD (1920×1080), WUXGA (1920x1200) and QWXGA (2048x1152) + * standard resolutions. + * + * On 4-color mode, 300kB limits screen size to 1280x960 or 1200x1024 + * which allows HD (1280x720), WXGA (1280x768) and XGA+ (1152x864) + * standard resolutions. + * + * On 16-color mode, 300kB limits screen size to 1024x576 or 800x768, + * which fills nicely qHD (960x540), DVGA (960x640) and WSVGA (1024x600) + * standard resolution displays. + */ +#define MAX_VDI_BYTES 300*1024 +#define MAX_VDI_WIDTH 2048 +#define MAX_VDI_HEIGHT 1280 +/* smaller doesn't make sense even for testing */ +#define MIN_VDI_WIDTH 320 +#define MIN_VDI_HEIGHT 208 -enum -{ - GEMRES_640x480, - GEMRES_800x600, - GEMRES_1024x768 -}; enum { - GEMCOLOUR_2, - GEMCOLOUR_4, - GEMCOLOUR_16 + GEMCOLOR_2, + GEMCOLOR_4, + GEMCOLOR_16 }; -extern int LineABase,FontBase; -extern unsigned int VDI_OldPC; -extern BOOL bUseVDIRes; -extern int VDIWidth,VDIHeight,VDIRes; -extern int VDIPlanes,VDIColours,VDICharHeight; - -extern void VDI_SetResolution(int GEMRes, int GEMColour); -extern BOOL VDI(void); -extern void VDI_FixDesktopInf(void); -extern void VDI_LineA(void); +extern Uint32 VDI_OldPC; +extern bool bUseVDIRes, bVdiAesIntercept; +extern int VDIWidth,VDIHeight; +extern int VDIRes,VDIPlanes; + +extern void VDI_SetResolution(int GEMColor, int WidthRequest, int HeightRequest); +extern void AES_Info(FILE *fp, Uint32 bShowOpcodes); +extern void VDI_Info(FILE *fp, Uint32 bShowOpcodes); +extern bool VDI_AES_Entry(void); +extern void VDI_LineA(Uint32 LineABase, Uint32 FontBase); extern void VDI_Complete(void); +extern void VDI_Reset(void); -#endif /* VDI_H */ +#endif /* HATARI_VDI_H */