mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-09-11 01:03:15 +02:00
fixed pixels input & output for NTSC filters
This commit is contained in:
parent
67bed12429
commit
cca17c642f
@ -137,11 +137,11 @@ struct md_ntsc_t {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* x is always zero except in snes_ntsc library */
|
/* x is always zero except in snes_ntsc library */
|
||||||
#ifdef USE_15BPP_RENDERING
|
#if MD_NTSC_OUT_DEPTH == 15
|
||||||
#define MD_NTSC_RGB_OUT_( rgb_out, x ) {\
|
#define MD_NTSC_RGB_OUT_( rgb_out, x ) {\
|
||||||
rgb_out = (raw_>>(14-x)& 0x7C00)|(raw_>>(9-x)&0x03E0)|(raw_>>(4-x)&0x001F);\
|
rgb_out = (raw_>>(14-x)& 0x7C00)|(raw_>>(9-x)&0x03E0)|(raw_>>(4-x)&0x001F);\
|
||||||
}
|
}
|
||||||
#else
|
#elif MD_NTSC_OUT_DEPTH == 16
|
||||||
#define MD_NTSC_RGB_OUT_( rgb_out, x ) {\
|
#define MD_NTSC_RGB_OUT_( rgb_out, x ) {\
|
||||||
rgb_out = (raw_>>(13-x)& 0xF800)|(raw_>>(8-x)&0x07E0)|(raw_>>(4-x)&0x001F);\
|
rgb_out = (raw_>>(13-x)& 0xF800)|(raw_>>(8-x)&0x07E0)|(raw_>>(4-x)&0x001F);\
|
||||||
}
|
}
|
||||||
|
@ -3,18 +3,22 @@
|
|||||||
#ifndef MD_NTSC_CONFIG_H
|
#ifndef MD_NTSC_CONFIG_H
|
||||||
#define MD_NTSC_CONFIG_H
|
#define MD_NTSC_CONFIG_H
|
||||||
|
|
||||||
/* Format of source pixels */
|
/* Format of source & output pixels (RGB555 or RGB565 only)*/
|
||||||
#ifdef USE_15BPP_RENDERING
|
#ifdef USE_15BPP_RENDERING
|
||||||
#define MD_NTSC_IN_FORMAT MD_NTSC_RGB15
|
#define MD_NTSC_IN_FORMAT MD_NTSC_RGB15
|
||||||
|
#define MD_NTSC_OUT_DEPTH 15
|
||||||
#else
|
#else
|
||||||
#define MD_NTSC_IN_FORMAT MD_NTSC_RGB16
|
#define MD_NTSC_IN_FORMAT MD_NTSC_RGB16
|
||||||
|
#define MD_NTSC_OUT_DEPTH 16
|
||||||
#endif
|
#endif
|
||||||
#define MD_NTSC_IN_FORMAT MD_NTSC_RGB16
|
|
||||||
|
|
||||||
/* Original CRAM format */
|
/* Original CRAM format (not used) */
|
||||||
/* #define MD_NTSC_IN_FORMAT MD_NTSC_BGR9 */
|
/* #define MD_NTSC_IN_FORMAT MD_NTSC_BGR9 */
|
||||||
|
|
||||||
/* Type of input pixel values */
|
/* The following affect the built-in blitter only; a custom blitter can
|
||||||
|
handle things however it wants. */
|
||||||
|
|
||||||
|
/* Type of input pixel values (fixed to 16-bit) */
|
||||||
#define MD_NTSC_IN_T unsigned short
|
#define MD_NTSC_IN_T unsigned short
|
||||||
|
|
||||||
/* Each raw pixel input value is passed through this. You might want to mask
|
/* Each raw pixel input value is passed through this. You might want to mask
|
||||||
|
@ -137,11 +137,11 @@ struct sms_ntsc_t {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* x is always zero except in snes_ntsc library */
|
/* x is always zero except in snes_ntsc library */
|
||||||
#ifdef USE_15BPP_RENDERING
|
#if SMS_NTSC_OUT_DEPTH == 15
|
||||||
#define SMS_NTSC_RGB_OUT_( rgb_out, x ) {\
|
#define SMS_NTSC_RGB_OUT_( rgb_out, x ) {\
|
||||||
rgb_out = (raw_>>(14-x)& 0x7C00)|(raw_>>(9-x)&0x03E0)|(raw_>>(4-x)&0x001F);\
|
rgb_out = (raw_>>(14-x)& 0x7C00)|(raw_>>(9-x)&0x03E0)|(raw_>>(4-x)&0x001F);\
|
||||||
}
|
}
|
||||||
#else
|
#elif SMS_NTSC_OUT_DEPTH == 16
|
||||||
#define SMS_NTSC_RGB_OUT_( rgb_out, x) {\
|
#define SMS_NTSC_RGB_OUT_( rgb_out, x) {\
|
||||||
rgb_out = (raw_>>(13-x)& 0xF800)|(raw_>>(8-x)&0x07E0)|(raw_>>(4-x)&0x001F);\
|
rgb_out = (raw_>>(13-x)& 0xF800)|(raw_>>(8-x)&0x07E0)|(raw_>>(4-x)&0x001F);\
|
||||||
}
|
}
|
||||||
|
@ -3,20 +3,22 @@
|
|||||||
#ifndef SMS_NTSC_CONFIG_H
|
#ifndef SMS_NTSC_CONFIG_H
|
||||||
#define SMS_NTSC_CONFIG_H
|
#define SMS_NTSC_CONFIG_H
|
||||||
|
|
||||||
/* Format of source pixels */
|
/* Format of source & output pixels (RGB555 or RGB565 only) */
|
||||||
#ifdef USE_15BPP_RENDERING
|
#ifdef USE_15BPP_RENDERING
|
||||||
#define SMS_NTSC_IN_FORMAT SMS_NTSC_RGB15
|
#define SMS_NTSC_IN_FORMAT SMS_NTSC_RGB15
|
||||||
|
#define SMS_NTSC_OUT_DEPTH 15
|
||||||
#else
|
#else
|
||||||
#define SMS_NTSC_IN_FORMAT SMS_NTSC_RGB16
|
#define SMS_NTSC_IN_FORMAT SMS_NTSC_RGB16
|
||||||
|
#define SMS_NTSC_OUT_DEPTH 16
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Original CRAM format */
|
/* Original CRAM format (not used) */
|
||||||
/* #define SMS_NTSC_IN_FORMAT SMS_NTSC_BGR12 */
|
/* #define SMS_NTSC_IN_FORMAT SMS_NTSC_BGR12 */
|
||||||
|
|
||||||
/* The following affect the built-in blitter only; a custom blitter can
|
/* The following affect the built-in blitter only; a custom blitter can
|
||||||
handle things however it wants. */
|
handle things however it wants. */
|
||||||
|
|
||||||
/* Type of input pixel values */
|
/* Type of input pixel values (fixed to 16-bit)*/
|
||||||
#define SMS_NTSC_IN_T unsigned short
|
#define SMS_NTSC_IN_T unsigned short
|
||||||
|
|
||||||
/* Each raw pixel input value is passed through this. You might want to mask
|
/* Each raw pixel input value is passed through this. You might want to mask
|
||||||
|
Loading…
Reference in New Issue
Block a user