diff --git a/Components/9918/9918.cpp b/Components/9918/9918.cpp index 2bd417f6f..14397b054 100644 --- a/Components/9918/9918.cpp +++ b/Components/9918/9918.cpp @@ -138,7 +138,7 @@ void Base::posit_sprite(LineBuffer &buffer, int sprite_number, int sprite_positi return; // A sprite Y of 208 means "don't scan the list any further". - if(mode_timing_.allow_sprite_terminator && sprite_position == 208) { + if(mode_timing_.allow_sprite_terminator && sprite_position == mode_timing_.sprite_terminator) { buffer.sprites_stopped = true; return; } diff --git a/Components/9918/Implementation/9918Base.hpp b/Components/9918/Implementation/9918Base.hpp index 6a5f8fa02..da688d908 100644 --- a/Components/9918/Implementation/9918Base.hpp +++ b/Components/9918/Implementation/9918Base.hpp @@ -155,9 +155,10 @@ class Base { } end_of_frame_interrupt_position; int line_interrupt_position = -1; - // Enables or disabled the recognition of 0xd0 as a sprite - // list terminator. + // Enables or disabled the recognition of the sprite + // list terminator, and sets the terminator value. bool allow_sprite_terminator = true; + uint8_t sprite_terminator = 0xd0; } mode_timing_; uint8_t line_interrupt_target = 0xff;