mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-19 07:31:15 +00:00
Switches to partial decoding for paging registers; permits video address changes after paging is locked.
This commit is contained in:
parent
064667c0c3
commit
9ce1dbaebb
@ -70,6 +70,7 @@ template<Model model> class ConcreteMachine:
|
|||||||
|
|
||||||
// Set up initial memory map.
|
// Set up initial memory map.
|
||||||
update_memory_map();
|
update_memory_map();
|
||||||
|
set_video_address();
|
||||||
Memory::Fuzz(ram_);
|
Memory::Fuzz(ram_);
|
||||||
|
|
||||||
// Insert media.
|
// Insert media.
|
||||||
@ -186,30 +187,26 @@ template<Model model> class ConcreteMachine:
|
|||||||
// b4: tape and speaker output
|
// b4: tape and speaker output
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test for classic 128kb paging.
|
// Test for classic 128kb paging register.
|
||||||
// if(!(address&0x8002)) {
|
if((address & 0xc002) == 0x4000) {
|
||||||
// }
|
disable_paging_ |= *cycle.value & 0x20;
|
||||||
|
|
||||||
|
// Set the proper video base pointer.
|
||||||
|
set_video_address();
|
||||||
|
|
||||||
|
port7ffd_ = *cycle.value;
|
||||||
|
update_memory_map();
|
||||||
|
}
|
||||||
|
|
||||||
// Test for +2a/+3 paging.
|
// Test for +2a/+3 paging.
|
||||||
// if((address & 0xc002) == 0x4000) {
|
if((address & 0xf002) == 0x1000) {
|
||||||
// }
|
port1ffd_ = *cycle.value;
|
||||||
|
update_memory_map();
|
||||||
|
}
|
||||||
|
|
||||||
switch(address) {
|
switch(address) {
|
||||||
default: break;
|
default: break;
|
||||||
|
|
||||||
case 0x1ffd:
|
|
||||||
// Write to +2a/+3 paging register.
|
|
||||||
port1ffd_ = *cycle.value;
|
|
||||||
update_memory_map();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x7ffd:
|
|
||||||
// Write to classic 128kb paging register.
|
|
||||||
disable_paging_ |= *cycle.value & 0x20;
|
|
||||||
port7ffd_ = *cycle.value;
|
|
||||||
update_memory_map();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0xfffd:
|
case 0xfffd:
|
||||||
// Select AY register.
|
// Select AY register.
|
||||||
update_audio();
|
update_audio();
|
||||||
@ -391,14 +388,11 @@ template<Model model> class ConcreteMachine:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the proper video base pointer.
|
if(port1ffd_ & 0x01) {
|
||||||
video_->set_video_source(&ram_[((port7ffd_ & 0x08) ? 7 : 5) * 16384]);
|
|
||||||
|
|
||||||
if(port1ffd_ & 1) {
|
|
||||||
// "Special paging mode", i.e. one of four fixed
|
// "Special paging mode", i.e. one of four fixed
|
||||||
// RAM configurations, port 7ffd doesn't matter.
|
// RAM configurations, port 7ffd doesn't matter.
|
||||||
|
|
||||||
switch(port1ffd_ & 0x6) {
|
switch(port1ffd_ & 0x06) {
|
||||||
default:
|
default:
|
||||||
case 0x00:
|
case 0x00:
|
||||||
set_memory(0, &ram_[0 * 16384], &ram_[0 * 16384], false);
|
set_memory(0, &ram_[0 * 16384], &ram_[0 * 16384], false);
|
||||||
@ -449,6 +443,10 @@ template<Model model> class ConcreteMachine:
|
|||||||
write_pointers_[bank] = (write ? write : scratch_.data()) - bank*16384;
|
write_pointers_[bank] = (write ? write : scratch_.data()) - bank*16384;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_video_address() {
|
||||||
|
video_->set_video_source(&ram_[((port7ffd_ & 0x08) ? 7 : 5) * 16384]);
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - Audio.
|
// MARK: - Audio.
|
||||||
Concurrency::DeferringAsyncTaskQueue audio_queue_;
|
Concurrency::DeferringAsyncTaskQueue audio_queue_;
|
||||||
GI::AY38910::AY38910<false> ay_;
|
GI::AY38910::AY38910<false> ay_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user