Merge remote-tracking branch 'upstream/master'
# Conflicts: # source/RGBMonitor.cpp
This commit is contained in:
commit
00df2f93a5
7 changed files with 29 additions and 22 deletions
|
@ -630,7 +630,7 @@ void LoadConfiguration(void)
|
|||
LoadConfigOldJoystick_v1(JN_JOYSTICK1);
|
||||
|
||||
DWORD dwSoundType;
|
||||
REGLOAD_DEFAULT(TEXT("Sound Emulation"), &dwSoundType, REG_SOUNDTYPE_NONE);
|
||||
REGLOAD_DEFAULT(TEXT(REGVALUE_SOUND_EMULATION), &dwSoundType, REG_SOUNDTYPE_WAVE);
|
||||
switch (dwSoundType)
|
||||
{
|
||||
case REG_SOUNDTYPE_NONE:
|
||||
|
|
|
@ -67,6 +67,7 @@ enum AppMode_e
|
|||
#define REGVALUE_OLD_APPLE2_TYPE "Computer Emulation" // Deprecated
|
||||
#define REGVALUE_CONFIRM_REBOOT "Confirm Reboot" // Added at 1.24.1 PageConfig
|
||||
#define REGVALUE_FS_SHOW_SUBUNIT_STATUS "Full-screen show subunit status"
|
||||
#define REGVALUE_SOUND_EMULATION "Sound Emulation"
|
||||
#define REGVALUE_SPKR_VOLUME "Speaker Volume"
|
||||
#define REGVALUE_MB_VOLUME "Mockingboard Volume"
|
||||
#define REGVALUE_SAVESTATE_FILENAME "Save State Filename"
|
||||
|
|
|
@ -140,7 +140,7 @@ void CPageSound::DlgOK(HWND hWnd)
|
|||
if (SpkrSetEmulationType(hWnd, newSoundType))
|
||||
{
|
||||
DWORD dwSoundType = (soundtype == SOUND_NONE) ? REG_SOUNDTYPE_NONE : REG_SOUNDTYPE_WAVE;
|
||||
REGSAVE(TEXT("Sound Emulation"), dwSoundType);
|
||||
REGSAVE(TEXT(REGVALUE_SOUND_EMULATION), dwSoundType);
|
||||
}
|
||||
|
||||
// NB. Volume: 0=Loudest, VOLUME_MAX=Silence
|
||||
|
|
|
@ -1127,7 +1127,10 @@ int CheckBreakpointsIO ()
|
|||
int iTarget;
|
||||
int nAddress;
|
||||
|
||||
_6502_GetTargets( regs.pc, &aTarget[0], &aTarget[1], &aTarget[2], &nBytes, false );
|
||||
// bIgnoreNextOpcodeAddress = true:
|
||||
// . JSR addr16: ignore addr16 as a target
|
||||
// . RTS/RTI : ignore return as a target
|
||||
_6502_GetTargets( regs.pc, &aTarget[0], &aTarget[1], &aTarget[2], &nBytes, true, true, true );
|
||||
|
||||
if (nBytes)
|
||||
{
|
||||
|
|
|
@ -583,7 +583,8 @@ bool _6502_GetStackReturnAddress ( WORD & nAddress_ )
|
|||
|
||||
|
||||
//===========================================================================
|
||||
bool _6502_GetTargets ( WORD nAddress, int *pTargetPartial_, int *pTargetPartial2_, int *pTargetPointer_, int * pTargetBytes_, bool bIgnoreJSRJMP, bool bIgnoreBranch )
|
||||
bool _6502_GetTargets ( WORD nAddress, int *pTargetPartial_, int *pTargetPartial2_, int *pTargetPointer_, int * pTargetBytes_,
|
||||
bool bIgnoreJSRJMP /*= true*/, bool bIgnoreBranch /*= true*/, bool bIgnoreNextOpcodeAddress /*= false*/ )
|
||||
{
|
||||
bool bStatus = false;
|
||||
|
||||
|
@ -782,6 +783,13 @@ bool _6502_GetTargets ( WORD nAddress, int *pTargetPartial_, int *pTargetPartial
|
|||
*pTargetBytes_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (bIgnoreNextOpcodeAddress)
|
||||
{
|
||||
*pTargetPointer_ = NO_6502_TARGET;
|
||||
if (pTargetBytes_)
|
||||
*pTargetBytes_ = 0;
|
||||
}
|
||||
|
||||
return bStatus;
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ extern int g_aAssemblerFirstDirective[ NUM_ASSEMBLERS ];
|
|||
void _6502_GetOpcodeOpmodeOpbyte( int & iOpcode_, int & iOpmode_, int & nOpbytes_ );
|
||||
bool _6502_GetStackReturnAddress( WORD & nAddress_ );
|
||||
bool _6502_GetTargets( WORD nAddress, int *pTargetPartial_, int *pTargetPartial2_, int *pTargetPointer_, int * pBytes_
|
||||
, const bool bIgnoreJSRJMP = true, bool bIgnoreBranch = true );
|
||||
, const bool bIgnoreJSRJMP = true, bool bIgnoreBranch = true, bool bIgnoreNextOpcodeAddress = false );
|
||||
bool _6502_GetTargetAddress( const WORD & nAddress, WORD & nTarget_ );
|
||||
bool _6502_IsOpcodeBranch( int nOpcode );
|
||||
bool _6502_IsOpcodeValid( int nOpcode );
|
||||
|
|
|
@ -495,8 +495,7 @@ static void CopyMixedSource(int x, int y, int sx, int sy, bgra_t *pVideoAddress)
|
|||
{
|
||||
_ASSERT( colormixbuffer[h] < (sizeof(PalIndex2RGB)/sizeof(PalIndex2RGB[0])) );
|
||||
const RGBQUAD& rRGB = PalIndex2RGB[ colormixbuffer[h] ];
|
||||
const UINT32 rgb = (((UINT32)rRGB.rgbRed)<<16) | (((UINT32)rRGB.rgbGreen)<<8) | ((UINT32)rRGB.rgbBlue);
|
||||
*(pDst+nBytes) = rgb;
|
||||
*(pDst+nBytes) = *reinterpret_cast<const UINT32 *>(&rRGB);
|
||||
}
|
||||
|
||||
pDst -= frameBufferWidth;
|
||||
|
@ -509,30 +508,26 @@ static void CopyMixedSource(int x, int y, int sx, int sy, bgra_t *pVideoAddress)
|
|||
// Pre: nSrcAdjustment: for 160-color images, src is +1 compared to dst
|
||||
static void CopySource(int w, int h, int sx, int sy, bgra_t *pVideoAddress, const int nSrcAdjustment = 0)
|
||||
{
|
||||
const bool bIsHalfScanLines = IsVideoStyle(VS_HALF_SCANLINES);
|
||||
const UINT frameBufferWidth = GetFrameBufferWidth();
|
||||
|
||||
UINT32* pDst = (UINT32*) pVideoAddress;
|
||||
const BYTE* const pSrc = g_aSourceStartofLine[ sy ] + sx;
|
||||
|
||||
const bool bIsHalfScanLines = IsVideoStyle(VS_HALF_SCANLINES);
|
||||
const UINT frameBufferWidth = GetFrameBufferWidth();
|
||||
|
||||
while (h--)
|
||||
{
|
||||
int nBytes = w;
|
||||
while (nBytes)
|
||||
if (bIsHalfScanLines && !(h & 1))
|
||||
{
|
||||
--nBytes;
|
||||
|
||||
if (bIsHalfScanLines && !(h & 1))
|
||||
{
|
||||
// 50% Half Scan Line clears every odd scanline (and SHIFT+PrintScreen saves only the even rows)
|
||||
*(pDst+nBytes) = 0;
|
||||
}
|
||||
else
|
||||
// 50% Half Scan Line clears every odd scanline (and SHIFT+PrintScreen saves only the even rows)
|
||||
std::fill(pDst, pDst + w, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int nBytes=0; nBytes<w; ++nBytes)
|
||||
{
|
||||
_ASSERT( *(pSrc+nBytes+nSrcAdjustment) < (sizeof(PalIndex2RGB)/sizeof(PalIndex2RGB[0])) );
|
||||
const RGBQUAD& rRGB = PalIndex2RGB[ *(pSrc+nBytes+nSrcAdjustment) ];
|
||||
const UINT32 rgb = (((UINT32)rRGB.rgbRed)<<16) | (((UINT32)rRGB.rgbGreen)<<8) | ((UINT32)rRGB.rgbBlue);
|
||||
*(pDst+nBytes) = rgb;
|
||||
*(pDst+nBytes) = *reinterpret_cast<const UINT32 *>(&rRGB);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue