2013-04-05 06:13:26 +00:00
|
|
|
#ifndef VI_H
|
|
|
|
#define VI_H
|
|
|
|
#include "Types.h"
|
|
|
|
|
2020-10-21 17:34:08 +00:00
|
|
|
// VI status register
|
|
|
|
#define VI_STATUS_TYPE_16 0x000002 /* 16 bit 5/5/5/3 */
|
|
|
|
#define VI_STATUS_TYPE_32 0x000003 /* 32 bit 8/8/8/8 */
|
|
|
|
#define VI_STATUS_GAMMA_DITHER_ENABLED 0x000004
|
|
|
|
#define VI_STATUS_GAMMA_ENABLED 0x000008
|
|
|
|
#define VI_STATUS_DIVOT_ENABLED 0x000010
|
|
|
|
#define VI_STATUS_SERRATE_ENABLED 0x000040
|
|
|
|
#define VI_STATUS_AA_MASK 0x000300 /* see AA modes */
|
|
|
|
#define VI_STATUS_DITHER_FILTER_ENABLED 0x010000
|
|
|
|
|
|
|
|
// AA modes
|
|
|
|
#define AA_MODE_AA_RESAMPLE_ALWAYS_FETCH 0x000000 /* Always fetch lines */
|
|
|
|
#define AA_MODE_AA_RESAMPLE 0x000100 /* Fetch extra line if needed */
|
|
|
|
#define AA_MODE_RESAMPLE_ONLY 0x000200
|
|
|
|
#define AA_MODE_NEITHER 0x000300 /* Replicate pixels, no interpolation */
|
|
|
|
|
2013-04-05 06:13:26 +00:00
|
|
|
struct VIInfo
|
|
|
|
{
|
2015-04-02 09:47:05 +00:00
|
|
|
u32 width, widthPrev, height, real_height;
|
2014-03-21 05:42:37 +00:00
|
|
|
f32 rwidth, rheight;
|
2013-04-05 06:13:26 +00:00
|
|
|
u32 lastOrigin;
|
2014-09-26 12:28:15 +00:00
|
|
|
bool interlaced;
|
2015-04-27 10:40:32 +00:00
|
|
|
bool PAL;
|
2013-09-29 15:02:50 +00:00
|
|
|
|
2014-09-26 12:28:15 +00:00
|
|
|
VIInfo() :
|
2016-11-21 09:44:10 +00:00
|
|
|
width(0), widthPrev(0), height(0), real_height(0), rwidth(0), rheight(0),
|
2015-04-27 10:40:32 +00:00
|
|
|
lastOrigin(-1), interlaced(false), PAL(false)
|
2014-09-26 12:28:15 +00:00
|
|
|
{}
|
2013-04-05 06:13:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern VIInfo VI;
|
|
|
|
|
|
|
|
void VI_UpdateSize();
|
|
|
|
void VI_UpdateScreen();
|
2017-03-02 15:09:08 +00:00
|
|
|
u16 VI_GetMaxBufferHeight(u16 _width);
|
2013-04-05 06:13:26 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|