2013-04-05 06:13:26 +00:00
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
2014-04-05 02:57:00 +00:00
|
|
|
|
2014-11-28 06:49:52 +00:00
|
|
|
#include <string>
|
2014-04-05 02:57:00 +00:00
|
|
|
#include "Types.h"
|
|
|
|
|
2018-06-09 11:37:32 +00:00
|
|
|
#define CONFIG_WITH_PROFILES 23U
|
2020-03-28 10:24:35 +00:00
|
|
|
#define CONFIG_VERSION_CURRENT 29U
|
2015-03-06 06:20:25 +00:00
|
|
|
|
|
|
|
#define BILINEAR_3POINT 0
|
|
|
|
#define BILINEAR_STANDARD 1
|
2019-02-03 12:29:23 +00:00
|
|
|
#define BILINEAR_3POINT_WITH_COLOR_BLEEDING 2
|
|
|
|
#define BILINEAR_STANDARD_WITH_COLOR_BLEEDING_AND_PREMULTIPLIED_ALPHA 3
|
2015-02-04 11:49:22 +00:00
|
|
|
|
|
|
|
const u32 gc_uMegabyte = 1024U * 1024U;
|
|
|
|
|
2014-04-05 02:57:00 +00:00
|
|
|
struct Config
|
|
|
|
{
|
|
|
|
u32 version;
|
|
|
|
|
2015-04-29 09:50:38 +00:00
|
|
|
std::string translationFile;
|
|
|
|
|
2014-04-05 02:57:00 +00:00
|
|
|
struct
|
|
|
|
{
|
2014-09-30 15:14:25 +00:00
|
|
|
u32 fullscreen;
|
2015-02-04 15:29:52 +00:00
|
|
|
u32 windowedWidth, windowedHeight;
|
|
|
|
u32 fullscreenWidth, fullscreenHeight, fullscreenRefresh;
|
2018-08-26 10:03:02 +00:00
|
|
|
u32 fxaa;
|
2015-02-04 11:47:41 +00:00
|
|
|
u32 multisampling;
|
2015-02-03 08:41:38 +00:00
|
|
|
u32 verticalSync;
|
2019-02-23 00:40:58 +00:00
|
|
|
u32 threadedVideo;
|
2014-04-05 02:57:00 +00:00
|
|
|
} video;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
u32 maxAnisotropy;
|
2015-02-05 16:05:47 +00:00
|
|
|
f32 maxAnisotropyF;
|
2015-03-06 06:20:25 +00:00
|
|
|
u32 bilinearMode;
|
2019-02-07 10:22:14 +00:00
|
|
|
u32 enableHalosRemoval;
|
2015-02-03 13:09:59 +00:00
|
|
|
u32 screenShotFormat;
|
2014-04-05 02:57:00 +00:00
|
|
|
} texture;
|
|
|
|
|
2016-09-09 10:02:31 +00:00
|
|
|
enum TexrectCorrectionMode {
|
|
|
|
tcDisable = 0,
|
|
|
|
tcSmart,
|
|
|
|
tcForce
|
|
|
|
};
|
2016-04-16 06:28:39 +00:00
|
|
|
|
2020-03-28 10:01:18 +00:00
|
|
|
enum BufferDitheringMode {
|
|
|
|
bdmDisable = 0,
|
|
|
|
bdmBayer,
|
|
|
|
bdmMagicSquare,
|
|
|
|
bdmBlueNoise
|
|
|
|
};
|
|
|
|
|
2016-09-09 10:02:31 +00:00
|
|
|
struct {
|
2020-03-28 11:42:50 +00:00
|
|
|
u32 enableDitheringPattern;
|
|
|
|
u32 enableDitheringQuantization;
|
2020-04-02 07:53:48 +00:00
|
|
|
u32 enableHiresNoiseDithering;
|
2020-03-28 11:42:50 +00:00
|
|
|
u32 rdramImageDitheringMode;
|
2015-02-03 05:09:02 +00:00
|
|
|
u32 enableLOD;
|
|
|
|
u32 enableHWLighting;
|
2015-03-21 16:10:51 +00:00
|
|
|
u32 enableCustomSettings;
|
2015-10-03 13:16:14 +00:00
|
|
|
u32 enableShadersStorage;
|
2016-07-17 05:15:02 +00:00
|
|
|
u32 enableLegacyBlending;
|
2020-02-08 20:53:50 +00:00
|
|
|
u32 enableHybridFilter;
|
2016-08-12 21:54:36 +00:00
|
|
|
u32 enableFragmentDepthWrite;
|
2016-10-29 17:33:05 +00:00
|
|
|
u32 enableBlitScreenWorkaround;
|
2015-02-03 05:09:02 +00:00
|
|
|
u32 hacks;
|
2018-03-30 12:26:18 +00:00
|
|
|
#if defined(OS_ANDROID) || defined(OS_IOS)
|
2015-07-06 11:58:51 +00:00
|
|
|
u32 forcePolygonOffset;
|
|
|
|
f32 polygonOffsetFactor;
|
|
|
|
f32 polygonOffsetUnits;
|
|
|
|
#endif
|
2015-02-03 05:09:02 +00:00
|
|
|
} generalEmulation;
|
|
|
|
|
2019-01-26 08:08:55 +00:00
|
|
|
enum BGMode {
|
|
|
|
bgOnePiece = 0,
|
|
|
|
bgStripped = 1
|
|
|
|
};
|
|
|
|
|
2019-11-27 10:08:17 +00:00
|
|
|
enum NativeResTexrectsMode {
|
|
|
|
ntDisable = 0,
|
|
|
|
ntOptimized,
|
|
|
|
ntUnptimized
|
|
|
|
};
|
|
|
|
|
2019-01-26 08:08:55 +00:00
|
|
|
struct {
|
|
|
|
u32 correctTexrectCoords;
|
|
|
|
u32 enableNativeResTexrects;
|
|
|
|
u32 bgMode;
|
|
|
|
} graphics2D;
|
|
|
|
|
2015-03-25 11:08:55 +00:00
|
|
|
enum Aspect {
|
|
|
|
aStretch = 0,
|
|
|
|
a43 = 1,
|
|
|
|
a169 = 2,
|
|
|
|
aAdjust = 3,
|
|
|
|
aTotal = 4
|
|
|
|
};
|
|
|
|
|
2015-10-03 17:55:09 +00:00
|
|
|
enum CopyToRDRAM {
|
|
|
|
ctDisable = 0,
|
2018-02-21 06:29:10 +00:00
|
|
|
ctSync = 1,
|
|
|
|
ctDoubleBuffer = 2,
|
|
|
|
ctTripleBuffer = 3
|
2015-10-03 17:55:09 +00:00
|
|
|
};
|
|
|
|
|
2015-11-15 09:58:30 +00:00
|
|
|
enum BufferSwapMode {
|
2015-12-14 15:36:07 +00:00
|
|
|
bsOnVerticalInterrupt = 0,
|
2015-11-15 09:58:30 +00:00
|
|
|
bsOnVIOriginChange,
|
|
|
|
bsOnColorImageChange
|
|
|
|
};
|
|
|
|
|
2016-06-09 16:43:33 +00:00
|
|
|
enum CopyDepthMode {
|
|
|
|
cdDisable = 0,
|
|
|
|
cdCopyFromVRam = 1,
|
|
|
|
cdSoftwareRender = 2
|
|
|
|
};
|
|
|
|
|
2020-02-09 06:02:55 +00:00
|
|
|
enum N64DepthCompareMode {
|
|
|
|
dcDisable = 0,
|
|
|
|
dcFast,
|
|
|
|
dcCompatible
|
|
|
|
};
|
|
|
|
|
2015-02-03 05:09:02 +00:00
|
|
|
struct {
|
|
|
|
u32 enable;
|
2016-02-03 16:18:40 +00:00
|
|
|
u32 aspect; // 0: stretch ; 1: 4/3 ; 2: 16/9; 3: adjust
|
|
|
|
u32 bufferSwapMode; // 0: on VI update call; 1: on VI origin change; 2: on main frame buffer update
|
2016-02-09 17:33:31 +00:00
|
|
|
u32 nativeResFactor;
|
2016-02-03 16:18:40 +00:00
|
|
|
u32 N64DepthCompare;
|
2018-05-01 12:21:30 +00:00
|
|
|
u32 forceDepthBufferClear;
|
2015-10-31 02:21:09 +00:00
|
|
|
u32 copyAuxToRDRAM;
|
2016-02-03 16:18:40 +00:00
|
|
|
// Buffer read/write
|
2015-02-03 05:09:02 +00:00
|
|
|
u32 copyToRDRAM;
|
|
|
|
u32 copyDepthToRDRAM;
|
|
|
|
u32 copyFromRDRAM;
|
2016-02-09 17:33:31 +00:00
|
|
|
|
2016-02-03 16:18:40 +00:00
|
|
|
// FBInfo
|
|
|
|
u32 fbInfoSupported;
|
|
|
|
u32 fbInfoDisabled;
|
|
|
|
u32 fbInfoReadColorChunk;
|
|
|
|
u32 fbInfoReadDepthChunk;
|
2018-05-05 07:45:18 +00:00
|
|
|
|
2019-06-27 09:21:51 +00:00
|
|
|
// Depth buffer copy. For Reshade.
|
|
|
|
u32 copyDepthToMainDepthBuffer;
|
|
|
|
|
2018-05-05 07:45:18 +00:00
|
|
|
// Overscan
|
|
|
|
u32 enableOverscan;
|
|
|
|
struct {
|
2018-12-18 09:53:32 +00:00
|
|
|
s32 left = 0;
|
|
|
|
s32 right = 0;
|
|
|
|
s32 top = 0;
|
|
|
|
s32 bottom = 0;
|
2018-05-05 07:45:18 +00:00
|
|
|
} overscanPAL, overscanNTSC;
|
2015-02-03 05:09:02 +00:00
|
|
|
} frameBufferEmulation;
|
|
|
|
|
2014-11-15 07:32:08 +00:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
u32 txFilterMode; // Texture filtering mode, eg Sharpen
|
|
|
|
u32 txEnhancementMode; // Texture enhancement mode, eg 2xSAI
|
2016-04-14 15:42:18 +00:00
|
|
|
u32 txDeposterize; // Deposterize texture before enhancement
|
2014-11-15 07:32:08 +00:00
|
|
|
u32 txFilterIgnoreBG; // Do not apply filtering to backgrounds textures
|
|
|
|
u32 txCacheSize; // Cache size in Mbytes
|
|
|
|
|
|
|
|
u32 txHiresEnable; // Use high-resolution texture packs
|
|
|
|
u32 txHiresFullAlphaChannel; // Use alpha channel fully
|
|
|
|
u32 txHresAltCRC; // Use alternative method of paletted textures CRC calculation
|
|
|
|
u32 txDump; // Dump textures
|
2020-06-14 06:39:42 +00:00
|
|
|
u32 txReloadHiresTex; // Reload hires textures
|
2015-02-05 15:20:40 +00:00
|
|
|
|
|
|
|
u32 txForce16bpp; // Force use 16bit color textures
|
|
|
|
u32 txCacheCompression; // Zip textures cache
|
|
|
|
u32 txSaveCache; // Save texture cache to hard disk
|
2015-02-28 13:09:24 +00:00
|
|
|
|
2019-05-23 12:44:28 +00:00
|
|
|
u32 txEnhancedTextureFileStorage; // Use file storage instead of memory cache for enhanced textures.
|
|
|
|
u32 txHiresTextureFileStorage; // Use file storage instead of memory cache for hires textures.
|
|
|
|
|
2017-11-17 08:26:33 +00:00
|
|
|
wchar_t txPath[PLUGIN_PATH_SIZE]; // Path to texture packs
|
|
|
|
wchar_t txCachePath[PLUGIN_PATH_SIZE]; // Path to store texture cache, that is .htc files
|
|
|
|
wchar_t txDumpPath[PLUGIN_PATH_SIZE]; // Path to store texture dumps
|
2014-11-15 07:32:08 +00:00
|
|
|
} textureFilter;
|
|
|
|
|
2015-02-03 05:09:02 +00:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
std::string name;
|
|
|
|
u32 size;
|
2015-02-03 05:23:08 +00:00
|
|
|
u8 color[4];
|
|
|
|
float colorf[4];
|
2015-02-03 05:09:02 +00:00
|
|
|
} font;
|
2014-04-05 15:36:20 +00:00
|
|
|
|
2015-12-23 10:22:30 +00:00
|
|
|
struct {
|
|
|
|
u32 force;
|
|
|
|
f32 level;
|
|
|
|
} gammaCorrection;
|
|
|
|
|
2016-12-04 05:37:28 +00:00
|
|
|
enum CountersPosition {
|
|
|
|
posTopLeft = 1,
|
|
|
|
posTopCenter = 2,
|
|
|
|
posTopRight = 4,
|
|
|
|
posTop = posTopLeft | posTopCenter | posTopRight,
|
|
|
|
posBottomLeft = 8,
|
|
|
|
posBottomCenter = 16,
|
|
|
|
posBottomRight = 32,
|
|
|
|
posBottom = posBottomLeft | posBottomCenter | posBottomRight
|
2016-09-25 13:21:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct {
|
|
|
|
u32 vis;
|
|
|
|
u32 fps;
|
|
|
|
u32 percent;
|
2018-03-05 15:35:10 +00:00
|
|
|
u32 internalResolution;
|
|
|
|
u32 renderingResolution;
|
2016-12-04 05:37:28 +00:00
|
|
|
u32 pos;
|
2016-09-25 13:21:54 +00:00
|
|
|
} onScreenDisplay;
|
|
|
|
|
2017-06-25 05:53:37 +00:00
|
|
|
struct {
|
|
|
|
u32 dumpMode;
|
|
|
|
} debug;
|
|
|
|
|
2015-03-06 09:16:25 +00:00
|
|
|
void resetToDefaults();
|
2018-06-28 09:18:16 +00:00
|
|
|
void validate();
|
2014-04-05 02:57:00 +00:00
|
|
|
};
|
|
|
|
|
2015-03-15 05:31:43 +00:00
|
|
|
#define hack_Ogre64 (1<<0) //Ogre Battle 64 background copy
|
|
|
|
#define hack_noDepthFrameBuffers (1<<1) //Do not use depth buffers as texture
|
|
|
|
#define hack_blurPauseScreen (1<<2) //Game copies frame buffer to depth buffer area, CPU blurs it. That image is used as background for pause screen.
|
2019-02-04 13:04:48 +00:00
|
|
|
#define hack_clearAloneDepthBuffer (1<<3) //Force clear depth buffer if there is no frame buffer for it. Multiplayer in GE and PD.
|
2019-03-23 05:33:04 +00:00
|
|
|
#define hack_StarCraftBackgrounds (1<<4) //StarCraft special check for frame buffer usage.
|
2017-09-26 15:57:37 +00:00
|
|
|
#define hack_texrect_shade_alpha (1<<5) //Set vertex alpha to 1 when texrect alpha combiner uses shade. Pokemon Stadium 2
|
2015-07-14 17:02:40 +00:00
|
|
|
#define hack_subscreen (1<<6) //Fix subscreen delay in Zelda OOT and Doubutsu no Mori
|
2016-03-13 11:53:08 +00:00
|
|
|
#define hack_blastCorps (1<<7) //Blast Corps black polygons
|
2017-12-14 13:18:57 +00:00
|
|
|
#define hack_rectDepthBufferCopyPD (1<<8) //Copy depth buffer only when game need it. Optimized for PD
|
|
|
|
#define hack_rectDepthBufferCopyCBFD (1<<9) //Copy depth buffer only when game need it. Optimized for CBFD
|
|
|
|
#define hack_WinBack (1<<10) //Hack for WinBack to remove gray rectangle in HLE mode
|
|
|
|
#define hack_ZeldaMM (1<<11) //Special hacks for Zelda MM
|
|
|
|
#define hack_ModifyVertexXyInShader (1<<12) //Pass screen coordinates provided in gSPModifyVertex to vertes shader.
|
2019-01-12 16:28:52 +00:00
|
|
|
#define hack_LodeRunner (1<<13) //Hack for Lode runner VI issues.
|
2017-12-14 13:18:57 +00:00
|
|
|
#define hack_doNotResetOtherModeH (1<<14) //Don't reset othermode.h after dlist end. Quake and Quake 2
|
|
|
|
#define hack_doNotResetOtherModeL (1<<15) //Don't reset othermode.l after dlist end. Quake
|
|
|
|
#define hack_LoadDepthTextures (1<<16) //Load textures for depth buffer
|
|
|
|
#define hack_Snap (1<<17) //Frame buffer settings for camera detection in Pokemon Snap. Copy aux buffers at fullsync
|
|
|
|
#define hack_MK64 (1<<18) //Hack for load MK64 HD textures properly.
|
|
|
|
#define hack_RE2 (1<<19) //RE2 hacks.
|
|
|
|
#define hack_ZeldaMonochrome (1<<20) //Hack for Zeldas monochrome effects.
|
2018-02-18 13:44:11 +00:00
|
|
|
#define hack_TonyHawk (1<<21) //Hack for Tony Hawk blend mode.
|
2019-01-12 10:36:01 +00:00
|
|
|
#define hack_WCWNitro (1<<22) //Hack for WCW Nitro backgrounds.
|
2014-10-28 10:04:08 +00:00
|
|
|
|
2014-04-05 02:57:00 +00:00
|
|
|
extern Config config;
|
|
|
|
|
2013-04-05 06:13:26 +00:00
|
|
|
void Config_LoadConfig();
|
2014-09-18 16:36:44 +00:00
|
|
|
#ifndef MUPENPLUSAPI
|
2015-04-17 15:27:37 +00:00
|
|
|
void Config_DoConfig(/*HWND hParent*/);
|
2013-04-05 06:13:26 +00:00
|
|
|
#endif
|
|
|
|
|
2017-10-31 10:42:48 +00:00
|
|
|
bool isHWLightingAllowed();
|
|
|
|
|
2014-09-18 16:36:44 +00:00
|
|
|
#endif // CONFIG_H
|