mirror of
https://github.com/TomHarte/CLK.git
synced 2024-09-08 03:54:27 +00:00
Removed some minor duplicity and ensured that hsync/NMI ends on the nominated cycle, not one afterwards.
This commit is contained in:
parent
15f6c51062
commit
a6810fc3ef
@ -41,7 +41,7 @@ int Machine::perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
video_->run_for_cycles(horizontal_counter_ - vsync_start_cycle_);
|
video_->run_for_cycles(horizontal_counter_ - vsync_start_cycle_);
|
||||||
} else if(previous_counter <= vsync_end_cycle_ && horizontal_counter_ > vsync_end_cycle_) {
|
} else if(previous_counter < vsync_end_cycle_ && horizontal_counter_ >= vsync_end_cycle_) {
|
||||||
video_->run_for_cycles(vsync_end_cycle_ - previous_counter);
|
video_->run_for_cycles(vsync_end_cycle_ - previous_counter);
|
||||||
set_hsync(false);
|
set_hsync(false);
|
||||||
if(nmi_is_enabled_) {
|
if(nmi_is_enabled_) {
|
||||||
@ -54,8 +54,7 @@ int Machine::perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(is_zx81_) horizontal_counter_ %= 207;
|
if(is_zx81_) horizontal_counter_ %= 207;
|
||||||
|
// tape_player_.run_for_cycles(cycle.length);
|
||||||
// tape_player_.run_for_cycles(cycle.length + wait_cycles);
|
|
||||||
|
|
||||||
if(!cycle.is_terminal()) {
|
if(!cycle.is_terminal()) {
|
||||||
return 0;
|
return 0;
|
||||||
@ -188,8 +187,6 @@ void Machine::configure_as_target(const StaticAnalyser::Target &target) {
|
|||||||
rom_ = zx81_rom_;
|
rom_ = zx81_rom_;
|
||||||
tape_trap_address_ = 0x37c;
|
tape_trap_address_ = 0x37c;
|
||||||
tape_return_address_ = 0x380;
|
tape_return_address_ = 0x380;
|
||||||
vsync_start_cycle_ = 13;
|
|
||||||
vsync_end_cycle_ = 33;
|
|
||||||
vsync_start_cycle_ = 16;
|
vsync_start_cycle_ = 16;
|
||||||
vsync_end_cycle_ = 32;
|
vsync_end_cycle_ = 32;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user