add options for virtualboy to only show left or right screen (#2842)

This commit is contained in:
mooware 2021-09-02 03:41:02 +02:00 committed by GitHub
parent 24f69eb5a6
commit 55a8936a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 2 deletions

Binary file not shown.

View File

@ -149,7 +149,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.VB
SideBySide = 2,
//OverUnder,
VerticalInterlaced = 4,
HorizontalInterlaced = 5
HorizontalInterlaced = 5,
OnlyLeft = 6,
OnlyRight = 7
}
[DefaultValue(ThreeDeeModes.Anaglyph)]

View File

@ -87,7 +87,9 @@ enum
VB3DMODE_SIDEBYSIDE = 2,
VB3DMODE_OVERUNDER = 3,
VB3DMODE_VLI,
VB3DMODE_HLI
VB3DMODE_HLI,
VB3DMODE_ONLYLEFT,
VB3DMODE_ONLYRIGHT
};
#define VB_MASTER_CLOCK 20000000.0

View File

@ -57,6 +57,7 @@ static void CopyFBColumnToTarget_CScope(void) NO_INLINE;
static void CopyFBColumnToTarget_SideBySide(void) NO_INLINE;
static void CopyFBColumnToTarget_VLI(void) NO_INLINE;
static void CopyFBColumnToTarget_HLI(void) NO_INLINE;
static void CopyFBColumnToTarget_OnlyLeftRight(void) NO_INLINE;
static void (*CopyFBColumnToTarget)(void) = NULL;
static float VBLEDOnScale;
static uint32 VB3DMode;
@ -231,6 +232,11 @@ static void Recalc3DModeStuff(bool non_rgb_output = false)
case VB3DMODE_HLI:
CopyFBColumnToTarget = CopyFBColumnToTarget_HLI;
break;
case VB3DMODE_ONLYLEFT:
case VB3DMODE_ONLYRIGHT:
CopyFBColumnToTarget = CopyFBColumnToTarget_OnlyLeftRight;
break;
}
RecalcBrightnessCache();
}
@ -1262,6 +1268,26 @@ static void CopyFBColumnToTarget_HLI(void)
}
}
static void CopyFBColumnToTarget_OnlyLeftRight(void)
{
const int lr = (VB3DMode == VB3DMODE_ONLYLEFT ? 0 : 1);
if (!DisplayActive)
{
if (!lr)
CopyFBColumnToTarget_SideBySide_BASE(0, 0, 0);
else
CopyFBColumnToTarget_SideBySide_BASE(0, 1, 0);
}
else
{
if (!lr)
CopyFBColumnToTarget_SideBySide_BASE(1, 0, 0);
else
CopyFBColumnToTarget_SideBySide_BASE(1, 1, 0);
}
}
v810_timestamp_t MDFN_FASTCALL VIP_Update(const v810_timestamp_t timestamp)
{
int32 clocks = timestamp - last_ts;