1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Fix Apple II inverse text errors.

This commit is contained in:
Thomas Harte 2024-01-01 22:08:06 -05:00
parent afa2dad2e2
commit 344fec0683

View File

@ -39,7 +39,7 @@ template <typename TimeUnit> class VideoSwitches {
set of potential flashing characters and alternate video modes.
*/
VideoSwitches(bool is_iie, TimeUnit delay, std::function<void(TimeUnit)> &&target) : delay_(delay), deferrer_(std::move(target)) {
character_zones_[0].xor_mask = 0;
character_zones_[0].xor_mask = 0xff;
character_zones_[0].address_mask = 0x3f;
character_zones_[1].xor_mask = 0;
character_zones_[1].address_mask = 0x3f;
@ -49,7 +49,7 @@ template <typename TimeUnit> class VideoSwitches {
character_zones_[3].address_mask = 0x3f;
if(is_iie) {
character_zones_[0].xor_mask =
character_zones_[1].xor_mask =
character_zones_[2].xor_mask =
character_zones_[3].xor_mask = 0xff;
character_zones_[2].address_mask =
@ -88,7 +88,7 @@ template <typename TimeUnit> class VideoSwitches {
if(alternative_character_set) {
character_zones_[1].address_mask = 0xff;
character_zones_[1].xor_mask = 0;
character_zones_[1].xor_mask = 0xff;
} else {
character_zones_[1].address_mask = 0x3f;
character_zones_[1].xor_mask = flash_mask();
@ -286,7 +286,9 @@ template <typename TimeUnit> class VideoSwitches {
// Update character set flashing; flashing is applied only when the alternative
// character set is not selected.
flash_ = (flash_ + 1) % (2 * flash_length);
character_zones_[1].xor_mask = flash_mask() * !internal_.alternative_character_set;
if(!internal_.alternative_character_set) {
character_zones_[1].xor_mask = flash_mask();
}
}
private: