mirror of
https://github.com/notaz/pcsx_rearmed.git
synced 2026-10-12 02:20:06 +00:00
@@ -169,6 +169,9 @@ void plugin_call_rearmed_cbs(void)
|
||||
Config.hacks.gpu_centering ? C_INGAME : C_AUTO;
|
||||
pl_rearmed_cbs.alt_flip = Config.AlternativeFlip > 0 ||
|
||||
(Config.AlternativeFlip < 0 && Config.hacks.alt_flip);
|
||||
pl_rearmed_cbs.gpu_hacks = 0;
|
||||
if (Config.hacks.needs_interlace)
|
||||
pl_rearmed_cbs.gpu_hacks |= GPU_HACK_NEEDS_INTERLACE;
|
||||
|
||||
rearmed_set_cbs = SysLoadSym(hGPUDriver, "GPUrearmedCallbacks");
|
||||
if (rearmed_set_cbs != NULL)
|
||||
|
||||
+10
-4
@@ -77,12 +77,15 @@ struct rearmed_cbs {
|
||||
unsigned int *gpu_hcnt;
|
||||
unsigned int flip_cnt; // increment manually if not using pl_vout_flip
|
||||
unsigned char only_16bpp; // platform is 16bpp-only
|
||||
unsigned char dithering; // 0 off, 1 on, 2 force
|
||||
unsigned char dithering; // 0 off, 1 on, 2 force
|
||||
unsigned char scale_hires;
|
||||
unsigned char alt_flip;
|
||||
int thread_rendering; // -1 auto, 0 off, 1 on
|
||||
unsigned char gpu_caps; // gpu_plugin_caps
|
||||
unsigned char gpu_hacks; // gpu_plugin_hacks
|
||||
unsigned char pad[2];
|
||||
int thread_rendering; // -1 auto, 0 off, 1 on
|
||||
struct {
|
||||
int allow_interlace; // 0 off, 1 on, 2 guess
|
||||
int allow_interlace; // 0 off, 1 on, 2 guess, 3 on_db
|
||||
int enhancement_enable;
|
||||
int enhancement_no_main;
|
||||
int enhancement_tex_adj;
|
||||
@@ -106,7 +109,6 @@ struct rearmed_cbs {
|
||||
int iVRamSize, iTexGarbageCollection;
|
||||
} gpu_peopsgl;
|
||||
// misc
|
||||
int gpu_caps;
|
||||
int screen_centering_type;
|
||||
int screen_centering_type_default;
|
||||
int screen_centering_x;
|
||||
@@ -124,6 +126,10 @@ enum gpu_plugin_caps {
|
||||
GPU_CAP_SUPPORTS_2X = (1 << 1),
|
||||
};
|
||||
|
||||
enum gpu_plugin_hacks {
|
||||
GPU_HACK_NEEDS_INTERLACE = (1 << 0),
|
||||
};
|
||||
|
||||
// platform hooks
|
||||
extern void (*pl_plat_clear)(void);
|
||||
extern void (*pl_plat_blit)(int doffs, const void *src,
|
||||
|
||||
@@ -114,6 +114,13 @@ static const char * const drc_no_thread_db[] =
|
||||
"SLUS01414",
|
||||
};
|
||||
|
||||
static const char * const needs_interlace_db[] =
|
||||
{
|
||||
/* Worms Pinball */
|
||||
"SLES00483",
|
||||
/* Pro Pinball series games have a different hack... */
|
||||
};
|
||||
|
||||
#define HACK_ENTRY(var, list) \
|
||||
{ #var, &Config.hacks.var, list, ARRAY_SIZE(list) }
|
||||
|
||||
@@ -134,6 +141,7 @@ hack_db[] =
|
||||
HACK_ENTRY(f1, f1_hack_db),
|
||||
HACK_ENTRY(alt_flip, alt_flip_db),
|
||||
HACK_ENTRY(drc_no_thread, drc_no_thread_db),
|
||||
HACK_ENTRY(needs_interlace, needs_interlace_db),
|
||||
};
|
||||
|
||||
static const struct
|
||||
|
||||
@@ -148,6 +148,7 @@ typedef struct {
|
||||
boolean f1;
|
||||
boolean alt_flip;
|
||||
boolean drc_no_thread;
|
||||
boolean needs_interlace;
|
||||
} hacks;
|
||||
} PcsxConfig;
|
||||
|
||||
|
||||
@@ -1227,6 +1227,8 @@ void GPUrearmedCallbacks(const struct rearmed_cbs *cbs)
|
||||
gpu.state.hcnt = (uint32_t *)cbs->gpu_hcnt;
|
||||
gpu.state.frame_count = (uint32_t *)cbs->gpu_frame_count;
|
||||
gpu.state.allow_interlace = cbs->gpu_neon.allow_interlace;
|
||||
if (gpu.state.allow_interlace > 1)
|
||||
gpu.state.allow_interlace = (cbs->gpu_hacks & GPU_HACK_NEEDS_INTERLACE) ? 3 : 2;
|
||||
gpu.state.enhancement_enable = cbs->gpu_neon.enhancement_enable;
|
||||
gpu.state.enhancement_active = 0;
|
||||
gpu.state.downscale_enable = cbs->scale_hires;
|
||||
|
||||
@@ -84,7 +84,7 @@ struct psx_gpu {
|
||||
uint32_t fb_dirty_display_area:1;
|
||||
uint32_t draw_display_intersect:1;
|
||||
uint32_t old_interlace:1;
|
||||
uint32_t allow_interlace:2;
|
||||
uint32_t allow_interlace:2; // 0 off, 1 on, 2 guess, 3 on_db
|
||||
uint32_t blanked:1;
|
||||
uint32_t use_alternative_flip:1;
|
||||
uint32_t enhancement_enable:1;
|
||||
|
||||
Reference in New Issue
Block a user