From 898a82cded7a1f6ec76aa79f872a7a602cb5f195 Mon Sep 17 00:00:00 2001 From: michaelangel007 Date: Sat, 3 Jan 2015 18:28:47 -0800 Subject: [PATCH] Replace NTSC_VideoGetByte() with NTSC_VideoGetScannerAddress() --- source/NTSC.cpp | 7 ++++--- source/NTSC.h | 17 ++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/source/NTSC.cpp b/source/NTSC.cpp index db65daeb..495be1f7 100644 --- a/source/NTSC.cpp +++ b/source/NTSC.cpp @@ -1529,10 +1529,11 @@ _mono: } //=========================================================================== -uint8_t NTSC_VideoGetByte (unsigned long cycles6502) +uint16_t NTSC_VideoGetScannerAddress ( unsigned long cycles6502 ) { - uint8_t *pMain = MemGetMainPtr( g_aHorzClockMemAddress[ g_nVideoClockHorz ] ); - return pMain[0]; + (void)cycles6502; // TODO: Do we need to offset based on the clock cycles? + // uint8_t h = (g_nVideoClockHorz + cycles6502) % VIDEO_SCANNER_MAX_HORZ + return g_aHorzClockMemAddress[ g_nVideoClockHorz ]; } //=========================================================================== diff --git a/source/NTSC.h b/source/NTSC.h index 5b98d53d..4a050284 100644 --- a/source/NTSC.h +++ b/source/NTSC.h @@ -6,13 +6,12 @@ extern uint16_t g_nVideoClockHorz; // Prototypes (Public) ________________________________________________ - extern void NTSC_SetVideoTextMode( int cols ); - extern void NTSC_SetVideoMode( int flags ); - extern void NTSC_SetVideoStyle(); - - extern uint8_t NTSC_VideoGetByte(unsigned long); - extern void NTSC_VideoInit( uint8_t *pFramebuffer ); - extern void NTSC_VideoInitAppleType (); - extern bool NTSC_VideoIsVbl(); - extern void NTSC_VideoUpdateCycles( long cycles ); + extern void NTSC_SetVideoMode( int bVideoModeFlags ); + extern void NTSC_SetVideoStyle(); + extern void NTSC_SetVideoTextMode( int cols ); + extern uint16_t NTSC_VideoGetScannerAddress( unsigned long cycles6502 ); + extern void NTSC_VideoInit( uint8_t *pFramebuffer ); + extern void NTSC_VideoInitAppleType (); + extern bool NTSC_VideoIsVbl(); + extern void NTSC_VideoUpdateCycles( long cycles6502 );