MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / getVideoScannerAddressHGR

Function getVideoScannerAddressHGR

source/NTSC.cpp:867–889  ·  view source on GitHub ↗

===========================================================================

Source from the content-addressed store, hash-verified

865
866//===========================================================================
867INLINE uint16_t getVideoScannerAddressHGR()
868{
869 // NOTE: Keep in sync: _ViewOutput() getVideoScannerAddressHGR()
870 const uint16_t aPageAddr[9] =
871 {
872 0x0000 // [0]
873 , 0x2000 // [1]
874 , 0x4000 // [2]
875 , 0x6000 // [3]
876 , 0x8000 // [4]
877 , 0xA000 // [5]
878 , 0xC000 // [6] LC Bank 1
879 , 0xD000 // [7] LC Bank 2
880 , 0xE000 // [8] LC RAM
881 };
882
883 // NB. For both A2 and //e use APPLE_IIE_HORZ_CLOCK_OFFSET - see VideoGetScannerAddress() where only TEXT mode adds $1000
884 uint16_t nAddress = (g_aClockVertOffsetsHGR[g_nVideoClockVert ]
885 + APPLE_IIE_HORZ_CLOCK_OFFSET[g_nVideoClockVert/64][g_nVideoClockHorz]
886 + aPageAddr[g_nHiresPage]); // We can view oddball addresses like LC Bank 1/2/$E000 for VF_PAGE_6, VF_PAGE_7, VF_PAGE_8
887
888 return nAddress;
889}
890
891//===========================================================================
892INLINE uint16_t getVideoScannerAddressTXTorHGR()

Calls

no outgoing calls

Tested by

no test coverage detected