From 234292f163ecf4edf7ba49e1c7392daedbe43633 Mon Sep 17 00:00:00 2001 From: Ryan Carsten Schmidt Date: Mon, 13 Nov 2023 00:50:13 -0600 Subject: [PATCH] Fix Apple II/II+/IIe first eight non-hbl vbl bytes Closes #1196 --- Machines/Apple/AppleII/Video.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Machines/Apple/AppleII/Video.hpp b/Machines/Apple/AppleII/Video.hpp index 1af8620ad..9cd75093c 100644 --- a/Machines/Apple/AppleII/Video.hpp +++ b/Machines/Apple/AppleII/Video.hpp @@ -215,16 +215,16 @@ template class Video: public VideoBase { // Calculate the address. uint16_t read_address = uint16_t(get_row_address(mapped_row) + mapped_column - 25); - if(hbl) { - // Wraparound addressing within 128 byte sections. - if(mapped_row < 64) { - read_address += 128; - } + // Wraparound addressing within 128 byte sections. + if(mapped_row < 64 && mapped_column < 25) { + read_address += 128; + } + if(hbl && !is_iie_) { // On Apple II and II+ (not IIe or later) in text/lores mode (not hires), horizontal // blanking bytes read from $1000 higher. const GraphicsMode pixel_mode = graphics_mode(mapped_row); - if(!is_iie_ && ((pixel_mode == GraphicsMode::Text) || (pixel_mode == GraphicsMode::LowRes))) { + if((pixel_mode == GraphicsMode::Text) || (pixel_mode == GraphicsMode::LowRes)) { read_address += 0x1000; } }