feat(cpu): account for source fetches in branch and IRQ refills
This commit is contained in:
parent
0650b60908
commit
2d7eb6e4eb
27 changed files with 638 additions and 87 deletions
|
|
@ -3,6 +3,8 @@ use std::{cell::Cell, error::Error, fmt};
|
|||
mod fetch;
|
||||
#[cfg(test)]
|
||||
mod fetch_tests;
|
||||
#[cfg(test)]
|
||||
mod irq_fetch_tests;
|
||||
mod iwram_bus;
|
||||
#[cfg(test)]
|
||||
mod iwram_history_tests;
|
||||
|
|
@ -432,6 +434,14 @@ impl Memory {
|
|||
}
|
||||
}
|
||||
|
||||
/// IRQ's discarded source fetch drives only its actual IWRAM lanes.
|
||||
/// Do not invent cold fills or commit a BIOS instruction snapshot: none executed.
|
||||
pub(crate) fn discarded_cpu_fetch(&mut self, fetch: &InstructionFetch) {
|
||||
self.iwram_bus.begin();
|
||||
self.drive_iwram_fetch(fetch);
|
||||
self.iwram_bus.finish(true);
|
||||
}
|
||||
|
||||
/// Successful IWRAM target fetches drive their lanes in order, in either CPU state.
|
||||
/// Other-region and unavailable target fetches leave the local latch unchanged.
|
||||
pub(crate) fn refill_cpu_bus_history(&mut self, fetches: &[InstructionFetch; 2]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue