fix(memory): ignore emulated writes to mapped BIOS
This commit is contained in:
parent
86f8663904
commit
a0516de748
16 changed files with 462 additions and 34 deletions
|
|
@ -357,7 +357,8 @@ fn dma_and_irq_each_consume_a_budget_step_and_dma_errors_fail() {
|
|||
assert_eq!(stats.irq_entries, 1);
|
||||
assert_eq!(stats.instructions, 0);
|
||||
let bus = machine.memory_mut();
|
||||
bus.write32(DMA_BASE + 4, ROM_START).unwrap();
|
||||
// DMA0 masks cartridge addresses to BIOS; use an actually unmapped destination.
|
||||
bus.write32(DMA_BASE + 4, 0x0000_4000).unwrap();
|
||||
bus.write32(DMA_BASE + 8, 0x8000_0001).unwrap();
|
||||
let (stats, outcome) = run_to_checkpoint(&mut machine, &config);
|
||||
assert_eq!(stats.steps, 0);
|
||||
|
|
|
|||
|
|
@ -322,7 +322,8 @@ fn dma_errors_return_a_diagnostic_without_consuming_a_step() {
|
|||
let mut machine = boot(&[0xeaff_fffe]);
|
||||
let bus = machine.memory_mut();
|
||||
bus.write32(DMA_BASE, 0x0200_0000).unwrap();
|
||||
bus.write32(DMA_BASE + 4, ROM_START).unwrap();
|
||||
// DMA0 masks cartridge addresses to BIOS; use an actually unmapped destination.
|
||||
bus.write32(DMA_BASE + 4, 0x0000_4000).unwrap();
|
||||
bus.write32(DMA_BASE + 8, 0x8000_0001).unwrap();
|
||||
let report = run_bounded(&mut machine, 100);
|
||||
assert!(matches!(
|
||||
|
|
|
|||
|
|
@ -266,7 +266,8 @@ fn dma_and_irq_consume_slice_budget_and_dma_failure_preserves_progress() {
|
|||
.unwrap();
|
||||
assert_eq!(session.stats.irq_entries, 1);
|
||||
let bus = session.machine.memory_mut();
|
||||
bus.write32(DMA_BASE + 4, ROM_START).unwrap();
|
||||
// DMA0 masks cartridge addresses to BIOS; use an actually unmapped destination.
|
||||
bus.write32(DMA_BASE + 4, 0x0000_4000).unwrap();
|
||||
bus.write32(DMA_BASE + 8, 0x8000_0001).unwrap();
|
||||
let cycles = session.machine.cycles();
|
||||
assert!(session.update(Buttons::default()).is_err());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue