mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-10 13:29:56 +00:00
parent
62b8b5ac14
commit
2c8f5ce864
@ -8066,7 +8066,7 @@ void OutputTraceLine ()
|
|||||||
|
|
||||||
if (g_bTraceFileWithVideoScanner)
|
if (g_bTraceFileWithVideoScanner)
|
||||||
{
|
{
|
||||||
uint16_t addr = NTSC_VideoGetScannerAddress();
|
uint16_t addr = NTSC_VideoGetScannerAddress(0);
|
||||||
BYTE data = mem[addr];
|
BYTE data = mem[addr];
|
||||||
|
|
||||||
fprintf( g_hTraceFile,
|
fprintf( g_hTraceFile,
|
||||||
|
@ -1625,7 +1625,7 @@ void MemReset()
|
|||||||
BYTE MemReadFloatingBus(const ULONG uExecutedCycles)
|
BYTE MemReadFloatingBus(const ULONG uExecutedCycles)
|
||||||
{
|
{
|
||||||
// return mem[ VideoGetScannerAddress(NULL, uExecutedCycles) ]; // NG: ANSI STORY (End Credits) - repro by running from "Turn the disk over"
|
// return mem[ VideoGetScannerAddress(NULL, uExecutedCycles) ]; // NG: ANSI STORY (End Credits) - repro by running from "Turn the disk over"
|
||||||
return mem[ NTSC_VideoGetScannerAddress() ]; // OK: This does the 2-cycle adjust for ANSI STORY (End Credits)
|
return mem[ NTSC_VideoGetScannerAddress(uExecutedCycles) ]; // OK: This does the 2-cycle adjust for ANSI STORY (End Credits)
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -1430,10 +1430,21 @@ uint32_t*NTSC_VideoGetChromaTable( bool bHueTypeMonochrome, bool bMonitorTypeCol
|
|||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
void NTSC_VideoClockResync(const DWORD dwCyclesThisFrame)
|
||||||
// NB. NTSC video-scanner doesn't get updated during full-speed, so video-dependent Apple II code can hang
|
|
||||||
uint16_t NTSC_VideoGetScannerAddress ( void )
|
|
||||||
{
|
{
|
||||||
|
g_nVideoClockVert = (uint16_t) (dwCyclesThisFrame / VIDEO_SCANNER_MAX_HORZ) % VIDEO_SCANNER_MAX_VERT;
|
||||||
|
g_nVideoClockHorz = (uint16_t) (dwCyclesThisFrame % VIDEO_SCANNER_MAX_HORZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
uint16_t NTSC_VideoGetScannerAddress ( const ULONG uExecutedCycles )
|
||||||
|
{
|
||||||
|
if (g_bFullSpeed)
|
||||||
|
{
|
||||||
|
// Ensure that NTSC video-scanner gets updated during full-speed, so video-dependent Apple II code doesn't hang
|
||||||
|
NTSC_VideoClockResync( CpuGetCyclesThisVideoFrame(uExecutedCycles) );
|
||||||
|
}
|
||||||
|
|
||||||
const uint16_t currVideoClockVert = g_nVideoClockVert;
|
const uint16_t currVideoClockVert = g_nVideoClockVert;
|
||||||
const uint16_t currVideoClockHorz = g_nVideoClockHorz;
|
const uint16_t currVideoClockHorz = g_nVideoClockHorz;
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
extern void NTSC_SetVideoStyle();
|
extern void NTSC_SetVideoStyle();
|
||||||
extern void NTSC_SetVideoTextMode( int cols );
|
extern void NTSC_SetVideoTextMode( int cols );
|
||||||
extern uint32_t*NTSC_VideoGetChromaTable( bool bHueTypeMonochrome, bool bMonitorTypeColorTV );
|
extern uint32_t*NTSC_VideoGetChromaTable( bool bHueTypeMonochrome, bool bMonitorTypeColorTV );
|
||||||
extern uint16_t NTSC_VideoGetScannerAddress( void );
|
extern void NTSC_VideoClockResync( const DWORD dwCyclesThisFrame );
|
||||||
|
extern uint16_t NTSC_VideoGetScannerAddress( const ULONG uExecutedCycles );
|
||||||
extern void NTSC_VideoInit( uint8_t *pFramebuffer );
|
extern void NTSC_VideoInit( uint8_t *pFramebuffer );
|
||||||
extern void NTSC_VideoReinitialize( DWORD cyclesThisFrame );
|
extern void NTSC_VideoReinitialize( DWORD cyclesThisFrame );
|
||||||
extern void NTSC_VideoInitAppleType();
|
extern void NTSC_VideoInitAppleType();
|
||||||
|
@ -567,10 +567,16 @@ void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInit /*=fal
|
|||||||
|
|
||||||
void VideoRedrawScreenAfterFullSpeed(DWORD dwCyclesThisFrame)
|
void VideoRedrawScreenAfterFullSpeed(DWORD dwCyclesThisFrame)
|
||||||
{
|
{
|
||||||
const int nScanLines = bVideoScannerNTSC ? kNTSCScanLines : kPALScanLines;
|
if (bVideoScannerNTSC)
|
||||||
|
{
|
||||||
g_nVideoClockVert = (uint16_t) (dwCyclesThisFrame / kHClocks) % nScanLines;
|
NTSC_VideoClockResync(dwCyclesThisFrame);
|
||||||
|
}
|
||||||
|
else // PAL
|
||||||
|
{
|
||||||
|
_ASSERT(0);
|
||||||
|
g_nVideoClockVert = (uint16_t) (dwCyclesThisFrame / kHClocks) % kPALScanLines;
|
||||||
g_nVideoClockHorz = (uint16_t) (dwCyclesThisFrame % kHClocks);
|
g_nVideoClockHorz = (uint16_t) (dwCyclesThisFrame % kHClocks);
|
||||||
|
}
|
||||||
|
|
||||||
VideoRedrawScreen(); // Better (no flicker) than using: NTSC_VideoReinitialize() or VideoReinitialize()
|
VideoRedrawScreen(); // Better (no flicker) than using: NTSC_VideoReinitialize() or VideoReinitialize()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user