Skip to content

Commit

Permalink
Cleanup: getVideoScannerAddressTXT() and getVideoScannerAddressHGR() …
Browse files Browse the repository at this point in the history
…to make it easier to debug
  • Loading branch information
Michaelangel007 committed Jan 5, 2022
1 parent 98a4481 commit 8d864c2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/NTSC.cpp
Expand Up @@ -780,16 +780,20 @@ inline void updateVideoScannerAddress()
//===========================================================================
INLINE uint16_t getVideoScannerAddressTXT()
{
return (g_aClockVertOffsetsTXT[g_nVideoClockVert/8] +
g_pHorzClockOffset [g_nVideoClockVert/64][g_nVideoClockHorz] + (g_nTextPage * 0x400));
uint16_t nAddress = (g_aClockVertOffsetsTXT[g_nVideoClockVert/8]
+ g_pHorzClockOffset [g_nVideoClockVert/64][g_nVideoClockHorz]
+ (g_nTextPage * 0x400));
return nAddress;
}

//===========================================================================
INLINE uint16_t getVideoScannerAddressHGR()
{
// NB. For both A2 and //e use APPLE_IIE_HORZ_CLOCK_OFFSET - see VideoGetScannerAddress() where only TEXT mode adds $1000
return (g_aClockVertOffsetsHGR[g_nVideoClockVert ] +
APPLE_IIE_HORZ_CLOCK_OFFSET[g_nVideoClockVert/64][g_nVideoClockHorz] + (g_nHiresPage * 0x2000));
uint16_t nAddress = (g_aClockVertOffsetsHGR[g_nVideoClockVert ]
+ APPLE_IIE_HORZ_CLOCK_OFFSET[g_nVideoClockVert/64][g_nVideoClockHorz]
+ (g_nHiresPage * 0x2000));
return nAddress;
}

// Non-Inline _________________________________________________________
Expand Down

0 comments on commit 8d864c2

Please sign in to comment.