From d61c3a9442058ea2a62600286ca3376b8c137d9f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 24 Oct 2018 19:53:46 -0400 Subject: [PATCH] Fixes sprite list termination in 224- and 240-line modes. --- Components/9918/9918.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Components/9918/9918.cpp b/Components/9918/9918.cpp index d7988de60..abf9745c4 100644 --- a/Components/9918/9918.cpp +++ b/Components/9918/9918.cpp @@ -202,10 +202,7 @@ void TMS9918::run_for(const HalfCycles cycles) { if(mode2_enable_ && mode1_enable_) mode_timing_.pixel_lines = 224; if(mode2_enable_ && mode3_enable_) mode_timing_.pixel_lines = 240; - mode_timing_.sprite_terminator = 0xd0; - if(mode_timing_.pixel_lines != 192) { - mode_timing_.sprite_terminator = 0xf0; - } + mode_timing_.allow_sprite_terminator = mode_timing_.pixel_lines == 192; mode_timing_.first_vsync_line = (mode_timing_.total_lines + mode_timing_.pixel_lines) >> 1; mode_timing_.end_of_frame_interrupt_position.row = mode_timing_.pixel_lines + 1;