mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-22 01:31:25 +00:00
NTSC: only use accessors to get internal video clock vert/horz values
This commit is contained in:
parent
1effb64226
commit
d63a31a043
@ -1350,7 +1350,7 @@ int CheckBreakpointsVideo()
|
||||
if (pBP->eSource != BP_SRC_VIDEO_SCANNER)
|
||||
continue;
|
||||
|
||||
uint16_t vert = NTSC_GetVideoVForDebugger(); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164)
|
||||
uint16_t vert = NTSC_GetVideoVertForDebugger(); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164)
|
||||
if (_CheckBreakpointValue(pBP, vert))
|
||||
{
|
||||
bBreakpointHit = BP_HIT_VIDEO_POS;
|
||||
@ -7893,7 +7893,7 @@ void OutputTraceLine ()
|
||||
if (g_bTraceFileWithVideoScanner)
|
||||
{
|
||||
uint16_t vert, horz;
|
||||
NTSC_GetVideoHVForDebugger(vert, horz); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164)
|
||||
NTSC_GetVideoVertHorzForDebugger(vert, horz); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164)
|
||||
|
||||
uint32_t data;
|
||||
int dataSize;
|
||||
@ -8519,7 +8519,7 @@ void DebugContinueStepping(const bool bCallerWillUpdateDisplay/*=false*/)
|
||||
stopReason = (g_LBR == LBR_UNDEFINED) ? StrFormat("Interrupt occurred (LBR unknown)")
|
||||
: StrFormat("Interrupt occurred at $%04X", g_LBR);
|
||||
else if (g_bDebugBreakpointHit & BP_HIT_VIDEO_POS)
|
||||
stopReason = StrFormat("Video scanner position matches at vpos=$%04X", NTSC_GetVideoVForDebugger());
|
||||
stopReason = StrFormat("Video scanner position matches at vpos=$%04X", NTSC_GetVideoVertForDebugger());
|
||||
else if (g_bDebugBreakpointHit & BP_DMA_TO_IO_MEM)
|
||||
stopReason = StrFormat("HDD DMA to I/O memory or ROM at $%04X", g_DebugBreakOnDMAIO.memoryAddr);
|
||||
else if (g_bDebugBreakpointHit & BP_DMA_FROM_IO_MEM)
|
||||
|
@ -3232,7 +3232,7 @@ static void DrawVideoScannerValue(int line, int vert, int horz, bool isVisible)
|
||||
static void DrawVideoScannerInfo(int line)
|
||||
{
|
||||
uint16_t v, h;
|
||||
NTSC_GetVideoHVForDebugger(v, h); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164)
|
||||
NTSC_GetVideoVertHorzForDebugger(v, h); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164)
|
||||
|
||||
if (g_videoScannerDisplayInfo.isHorzReal)
|
||||
{
|
||||
|
@ -69,8 +69,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
// Globals (Public) ___________________________________________________
|
||||
uint16_t g_nVideoClockVert = 0; // 9-bit: VC VB VA V5 V4 V3 V2 V1 V0 = 0 .. 262
|
||||
uint16_t g_nVideoClockHorz = 0; // 6-bit: H5 H4 H3 H2 H1 H0 = 0 .. 64, 25 >= visible (NB. final hpos is 2 cycles long, so a line is 65 cycles)
|
||||
static uint16_t g_nVideoClockVert = 0; // 9-bit: VC VB VA V5 V4 V3 V2 V1 V0 = 0 .. 262
|
||||
static uint16_t g_nVideoClockHorz = 0; // 6-bit: H5 H4 H3 H2 H1 H0 = 0 .. 64, 25 >= visible (NB. final hpos is 2 cycles long, so a line is 65 cycles)
|
||||
|
||||
// Globals (Private) __________________________________________________
|
||||
static int g_nVideoCharSet = 0;
|
||||
@ -1940,7 +1940,12 @@ uint16_t NTSC_VideoGetScannerAddress ( const ULONG uExecutedCycles )
|
||||
return addr;
|
||||
}
|
||||
|
||||
void NTSC_GetVideoHVForDebugger(uint16_t& vert, uint16_t& horz)
|
||||
uint16_t NTSC_GetVideoVert(void)
|
||||
{
|
||||
return g_nVideoClockVert;
|
||||
}
|
||||
|
||||
void NTSC_GetVideoVertHorzForDebugger(uint16_t& vert, uint16_t& horz)
|
||||
{
|
||||
ResetCyclesExecutedForDebugger(); // if in full-speed, then reset cycles so that CpuCalcCycles() doesn't ASSERT
|
||||
NTSC_VideoGetScannerAddress(0);
|
||||
@ -1948,10 +1953,10 @@ void NTSC_GetVideoHVForDebugger(uint16_t& vert, uint16_t& horz)
|
||||
horz = g_nVideoClockHorz;
|
||||
}
|
||||
|
||||
uint16_t NTSC_GetVideoVForDebugger(void)
|
||||
uint16_t NTSC_GetVideoVertForDebugger(void)
|
||||
{
|
||||
uint16_t vert, horz;
|
||||
NTSC_GetVideoHVForDebugger(vert, horz);
|
||||
NTSC_GetVideoVertHorzForDebugger(vert, horz);
|
||||
return vert;
|
||||
}
|
||||
|
||||
|
@ -3,8 +3,6 @@
|
||||
#include "Video.h" // NB. needed by GCC (for fwd enum declaration)
|
||||
|
||||
// Globals (Public)
|
||||
extern uint16_t g_nVideoClockVert;
|
||||
extern uint16_t g_nVideoClockHorz;
|
||||
extern uint32_t g_nChromaSize;
|
||||
|
||||
// Prototypes (Public) ________________________________________________
|
||||
@ -14,8 +12,9 @@ void NTSC_SetVideoTextMode(int cols);
|
||||
uint32_t* NTSC_VideoGetChromaTable(bool bHueTypeMonochrome, bool bMonitorTypeColorTV);
|
||||
void NTSC_VideoClockResync(const DWORD dwCyclesThisFrame);
|
||||
uint16_t NTSC_VideoGetScannerAddress(const ULONG uExecutedCycles);
|
||||
void NTSC_GetVideoHVForDebugger(uint16_t& vert, uint16_t& horz);
|
||||
uint16_t NTSC_GetVideoVForDebugger(void);
|
||||
uint16_t NTSC_GetVideoVert(void);
|
||||
void NTSC_GetVideoVertHorzForDebugger(uint16_t& vert, uint16_t& horz);
|
||||
uint16_t NTSC_GetVideoVertForDebugger(void);
|
||||
void NTSC_Destroy(void);
|
||||
void NTSC_VideoInit(uint8_t *pFramebuffer);
|
||||
void NTSC_VideoReinitialize(DWORD cyclesThisFrame, bool bInitVideoScannerAddress);
|
||||
|
@ -156,7 +156,7 @@ void Video::VideoReinitialize(bool bInitVideoScannerAddress)
|
||||
NTSC_VideoInitAppleType();
|
||||
NTSC_SetVideoStyle();
|
||||
NTSC_SetVideoTextMode( g_uVideoMode & VF_80COL ? 80 : 40 );
|
||||
NTSC_SetVideoMode( g_uVideoMode ); // Pre-condition: g_nVideoClockHorz (derived from g_dwCyclesThisFrame)
|
||||
NTSC_SetVideoMode( g_uVideoMode );
|
||||
VideoSwitchVideocardPalette(RGB_GetVideocard(), GetVideoType());
|
||||
}
|
||||
|
||||
@ -455,7 +455,7 @@ bool Video::VideoGetVblBarEx(const DWORD dwCyclesThisFrame)
|
||||
NTSC_VideoClockResync(dwCyclesThisFrame);
|
||||
}
|
||||
|
||||
return g_nVideoClockVert < kVDisplayableScanLines;
|
||||
return NTSC_GetVideoVert() < kVDisplayableScanLines;
|
||||
}
|
||||
|
||||
// Called when *inside* CpuExecute()
|
||||
@ -467,7 +467,7 @@ bool Video::VideoGetVblBar(const DWORD uExecutedCycles)
|
||||
NTSC_VideoClockResync(CpuGetCyclesThisVideoFrame(uExecutedCycles));
|
||||
}
|
||||
|
||||
return g_nVideoClockVert < kVDisplayableScanLines;
|
||||
return NTSC_GetVideoVert() < kVDisplayableScanLines;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user