1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 01:31:42 +00:00

Reduces number of Apple II video flushes, to reduce processing cost.

This commit is contained in:
Thomas Harte 2018-05-10 20:48:57 -04:00
parent 578a5b3e69
commit d16ae84d0b

View File

@ -173,7 +173,11 @@ class ConcreteMachine:
*/ */
MemoryBlock *block = nullptr; MemoryBlock *block = nullptr;
if(address < 0x200) block = &memory_blocks_[0]; if(address < 0x200) block = &memory_blocks_[0];
else if(address < 0xc000) {update_video(); block = &memory_blocks_[1]; address -= 0x200; } else if(address < 0xc000) {
if(address < 0x6000 && !isReadOperation(operation)) update_video();
block = &memory_blocks_[1];
address -= 0x200;
}
else if(address < 0xd000) block = nullptr; else if(address < 0xd000) block = nullptr;
else if(address < 0xe000) {block = &memory_blocks_[2]; address -= 0xd000; } else if(address < 0xe000) {block = &memory_blocks_[2]; address -= 0xd000; }
else {block = &memory_blocks_[3]; address -= 0xe000; } else {block = &memory_blocks_[3]; address -= 0xe000; }