Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible copypast issue #18

Open
mitallast opened this issue Jan 11, 2021 · 0 comments
Open

Possible copypast issue #18

mitallast opened this issue Jan 11, 2021 · 0 comments

Comments

@mitallast
Copy link

I found possible copypast issue in CIA::process_irq(&mut self) function (see link below).
Perhaps timer B is needed to check after timer A?

rust64/src/c64/cia.rs

Lines 479 to 504 in 3e9d295

pub fn process_irq(&mut self) {
if self.timer_a.irq_next_cycle {
if self.trigger_irq(1) {
if self.is_cia1 {
as_mut!(self.cpu_ref).set_cia_irq(true);
}
else {
as_mut!(self.cpu_ref).set_nmi(true);
}
}
self.timer_a.irq_next_cycle = false
}
if self.timer_a.irq_next_cycle {
if self.trigger_irq(2) {
if self.is_cia1 {
as_mut!(self.cpu_ref).set_cia_irq(true);
}
else {
as_mut!(self.cpu_ref).set_nmi(true);
}
}
self.timer_a.irq_next_cycle = false
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant