2018-11-16 00:42:29 +01:00
|
|
|
/*****************************************************************************\
|
|
|
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
|
|
|
This file is licensed under the Snes9x License.
|
|
|
|
For further information, consult the LICENSE file in the root directory.
|
|
|
|
\*****************************************************************************/
|
|
|
|
|
2010-09-25 17:46:12 +02:00
|
|
|
#ifndef __GTK_DISPLAY_H
|
|
|
|
#define __GTK_DISPLAY_H
|
|
|
|
|
|
|
|
#include "gtk_s9x.h"
|
2018-05-12 22:07:07 +02:00
|
|
|
#include "gtk_display_driver.h"
|
2010-09-25 17:46:12 +02:00
|
|
|
#include "filter/2xsai.h"
|
2010-09-26 11:19:15 +02:00
|
|
|
#ifdef USE_HQ2X
|
2010-09-25 17:46:12 +02:00
|
|
|
#include "filter/hq2x.h"
|
2010-09-26 11:19:15 +02:00
|
|
|
#endif
|
2015-01-28 15:24:35 +01:00
|
|
|
#ifdef USE_XBRZ
|
|
|
|
#include "filter_xbrz.h"
|
|
|
|
#endif
|
2010-09-25 17:46:12 +02:00
|
|
|
#include "filter/epx.h"
|
|
|
|
#include "filter_epx_unsafe.h"
|
2018-11-12 23:51:21 +01:00
|
|
|
#include "filter/snes_ntsc.h"
|
2010-09-25 17:46:12 +02:00
|
|
|
|
2018-11-02 21:47:31 +01:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
FILTER_NONE = 0,
|
|
|
|
FILTER_SUPEREAGLE = 1,
|
|
|
|
FILTER_2XSAI = 2,
|
|
|
|
FILTER_SUPER2XSAI = 3,
|
|
|
|
FILTER_EPX = 4,
|
|
|
|
FILTER_EPX_SMOOTH = 5,
|
|
|
|
FILTER_NTSC = 6,
|
|
|
|
FILTER_SCANLINES = 7,
|
|
|
|
FILTER_SIMPLE2X = 8,
|
|
|
|
FILTER_SIMPLE3X = 9,
|
|
|
|
FILTER_SIMPLE4X = 10,
|
|
|
|
FILTER_HQ2X = 11,
|
|
|
|
FILTER_HQ3X = 12,
|
|
|
|
FILTER_HQ4X = 13,
|
|
|
|
FILTER_2XBRZ = 14,
|
|
|
|
FILTER_3XBRZ = 15,
|
|
|
|
FILTER_4XBRZ = 16,
|
|
|
|
NUM_FILTERS = 17
|
|
|
|
};
|
2010-09-25 17:46:12 +02:00
|
|
|
|
2018-11-02 21:47:31 +01:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
NTSC_COMPOSITE = 0,
|
|
|
|
NTSC_SVIDEO = 1,
|
|
|
|
NTSC_RGB = 2
|
|
|
|
};
|
2010-09-25 17:46:12 +02:00
|
|
|
|
2018-11-02 21:47:31 +01:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
ENDIAN_NORMAL = 0,
|
|
|
|
ENDIAN_SWAPPED = 1
|
|
|
|
};
|
2010-09-25 17:46:12 +02:00
|
|
|
|
2018-11-02 21:47:31 +01:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
JOB_FILTER = 0,
|
|
|
|
JOB_CONVERT = 1,
|
|
|
|
JOB_SCALE_AND_CONVERT = 2,
|
|
|
|
JOB_CONVERT_YUV = 3,
|
|
|
|
JOB_CONVERT_MASK = 4
|
|
|
|
};
|
2010-09-25 17:46:12 +02:00
|
|
|
|
|
|
|
typedef struct thread_job_t
|
|
|
|
{
|
|
|
|
int operation_type;
|
|
|
|
uint8 *src_buffer;
|
|
|
|
int src_pitch;
|
|
|
|
uint8 *dst_buffer;
|
|
|
|
int dst_pitch;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int bpp;
|
|
|
|
int inv_rmask;
|
|
|
|
int inv_gmask;
|
|
|
|
int inv_bmask;
|
|
|
|
|
2018-12-28 23:32:32 +01:00
|
|
|
volatile bool complete;
|
2019-01-07 23:39:35 +01:00
|
|
|
} thread_job_t;
|
2010-09-25 17:46:12 +02:00
|
|
|
|
2019-05-14 21:59:51 +02:00
|
|
|
struct S9xRect {
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
};
|
|
|
|
|
2010-09-25 17:46:12 +02:00
|
|
|
void S9xRegisterYUVTables (uint8 *y, uint8 *u, uint8 *v);
|
|
|
|
void S9xSetEndianess (int type);
|
2018-11-02 21:52:26 +01:00
|
|
|
double S9xGetAspect ();
|
2019-05-14 21:59:51 +02:00
|
|
|
S9xRect S9xApplyAspect (int, int, int, int);
|
2010-09-25 17:46:12 +02:00
|
|
|
void S9xConvertYUV (void *src_buffer,
|
|
|
|
void *dst_buffer,
|
|
|
|
int src_pitch,
|
|
|
|
int dst_pitch,
|
|
|
|
int width,
|
|
|
|
int height);
|
|
|
|
void S9xConvert (void *src,
|
|
|
|
void *dst,
|
|
|
|
int src_pitch,
|
|
|
|
int dst_pitch,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
int bpp);
|
|
|
|
void S9xConvertMask (void *src,
|
|
|
|
void *dst,
|
|
|
|
int src_pitch,
|
|
|
|
int dst_pitch,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
int rshift,
|
|
|
|
int gshift,
|
|
|
|
int bshift,
|
|
|
|
int bpp);
|
|
|
|
void S9xFilter (uint8 *src_buffer,
|
|
|
|
int src_pitch,
|
|
|
|
uint8 *dst_buffer,
|
|
|
|
int dst_pitch,
|
|
|
|
int& width,
|
|
|
|
int& height);
|
|
|
|
void get_filter_scale (int& width, int& height);
|
|
|
|
void S9xDisplayRefresh (int width, int height);
|
2018-11-02 21:52:26 +01:00
|
|
|
void S9xDisplayClearBuffers ();
|
|
|
|
void S9xReinitDisplay ();
|
|
|
|
void S9xDisplayReconfigure ();
|
|
|
|
void S9xQueryDrivers ();
|
|
|
|
S9xDisplayDriver *S9xDisplayGetDriver ();
|
2018-12-04 01:21:09 +01:00
|
|
|
bool S9xDisplayDriverIsReady ();
|
2018-05-12 22:07:07 +02:00
|
|
|
|
2010-09-25 17:46:12 +02:00
|
|
|
#endif /* __GTK_DISPLAY_H */
|