Merge branch 'master' into memory

# Conflicts:
#	source/Debugger/Debugger_Disassembler.cpp
This commit is contained in:
Andrea Odetti 2021-03-18 18:55:27 +00:00
commit d029befe6a
4 changed files with 49 additions and 10 deletions

View file

@ -269,7 +269,8 @@ static __forceinline void DoIrqProfiling(DWORD uCycles)
#ifdef USE_SPEECH_API
const USHORT COUT = 0xFDED;
const USHORT COUT1 = 0xFDF0; // GH#934 - ProDOS: COUT1 better than using COUT/$FDED
const USHORT BASICOUT = 0xC307; // GH#934 - 80COL: use BASICOUT
const UINT OUTPUT_BUFFER_SIZE = 256;
char g_OutputBuffer[OUTPUT_BUFFER_SIZE+1+1]; // +1 for EOL, +1 for NULL
@ -370,7 +371,7 @@ static __forceinline void Fetch(BYTE& iOpcode, ULONG uExecutedCycles)
: *(mem+PC);
#ifdef USE_SPEECH_API
if (PC == COUT && g_Speech.IsEnabled() && !g_bFullSpeed)
if ((PC == COUT1 || PC == BASICOUT) && g_Speech.IsEnabled() && !g_bFullSpeed)
CaptureCOUT();
#endif

View file

@ -1,3 +1,26 @@
/*
AppleWin : An Apple //e emulator for Windows
Copyright (C) 1994-1996, Michael O'Brien
Copyright (C) 1999-2001, Oliver Schmidt
Copyright (C) 2002-2005, Tom Charlesworth
Copyright (C) 2006-2021, Tom Charlesworth, Michael Pohoreski, Nick Westgate
AppleWin is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
AppleWin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with AppleWin; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "StdAfx.h"
#include "Debug.h"

View file

@ -2013,10 +2013,10 @@ void DrawMemory ( int line, int iMemDump )
nCols = MAX_MEM_VIEW_TXT;
}
if( (eDevice == DEV_SY6522) || (eDevice == DEV_AY8910) )
if (eDevice == DEV_SY6522 || eDevice == DEV_AY8910)
{
iAddress = 0;
nCols = 6;
nCols = 4;
}
rect.right = DISPLAY_WIDTH - 1;
@ -2050,7 +2050,7 @@ void DrawMemory ( int line, int iMemDump )
// else
if (eDevice == DEV_SY6522)
{
sprintf( sText, "%02X", (unsigned) ((BYTE*)&SS_MB.Unit[nAddr & 1].RegsSY6522)[iAddress] );
sprintf( sText, "%02X ", (unsigned) ((BYTE*)&SS_MB.Unit[nAddr & 1].RegsSY6522)[iAddress] );
if (iCol & 1)
DebuggerSetColorFG( DebuggerGetColor( iForeground ));
else
@ -2059,7 +2059,7 @@ void DrawMemory ( int line, int iMemDump )
else
if (eDevice == DEV_AY8910)
{
sprintf( sText, "%02X", (unsigned)SS_MB.Unit[nAddr & 1].RegsAY8910[iAddress] );
sprintf( sText, "%02X ", (unsigned)SS_MB.Unit[nAddr & 1].RegsAY8910[iAddress] );
if (iCol & 1)
DebuggerSetColorFG( DebuggerGetColor( iForeground ));
else
@ -2842,7 +2842,7 @@ void DrawWatches (int line)
else
DebuggerSetColorBG( DebuggerGetColor( BG_DATA_2 ));
BYTE nValue8 = (unsigned)*(LPBYTE)(mem + nTarget16 + iByte );
BYTE nValue8 = mem[ (nTarget16 + iByte) & 0xffff ];
sprintf(sText,"%02X", nValue8 );
PrintTextCursorX( sText, rect2 );
}

View file

@ -2351,10 +2351,25 @@ void MB_GetSnapshot_v1(SS_CARD_MOCKINGBOARD_v1* const pSS, const DWORD dwSlot)
UINT nDeviceNum = nMbCardNum*2;
SY6522_AY8910* pMB = &g_MB[nDeviceNum];
for(UINT i=0; i<MB_UNITS_PER_CARD_v1; i++)
for (UINT i=0; i<MB_UNITS_PER_CARD_v1; i++)
{
memcpy(&pSS->Unit[i].RegsSY6522, &pMB->sy6522, sizeof(SY6522));
memcpy(&pSS->Unit[i].RegsAY8910, AY8910_GetRegsPtr(nDeviceNum), 16);
// 6522
{
BYTE* d = (BYTE*) &pSS->Unit[i].RegsSY6522;
BYTE* s = (BYTE*) &pMB->sy6522;
for (UINT j=0; j<=9; j++) // regs $00-$09
*d++ = *s++;
s = &pMB->sy6522.SERIAL_SHIFT;
for (UINT j=0; j<=6; j++) // regs $0A-$0F
*d++ = *s++;
}
// AY8913
for (UINT j=0; j<16; j++)
{
pSS->Unit[i].RegsAY8910[j] = AYReadReg(nDeviceNum, j);
}
memcpy(&pSS->Unit[i].RegsSSI263, &pMB->SpeechChip, sizeof(SSI263A));
pSS->Unit[i].nAYCurrentRegister = pMB->nAYCurrentRegister;
pSS->Unit[i].bTimer1IrqPending = false;