apple2-go/system/system.go
Will Angenent d89c7babf0 Refactored memory read/write to MMU
This required moving some common things in a new package to resolve a circular
dependency between cpu <=> mmu.
2018-05-09 19:31:15 +01:00

28 lines
579 B
Go

package system
var (
PendingInterrupt bool
PendingNMI bool
RunningTests bool
RunningFunctionalTests bool
RunningInterruptTests bool
)
// Handle a write to a magic test address that triggers an interrupt and/or an NMI
func WriteInterruptTestOpenCollector(address uint16, oldValue uint8, value uint8) {
oldInterrupt := (oldValue & 0x1) == 0x1
oldNMI := (oldValue & 0x2) == 0x2
interrupt := (value & 0x1) == 0x1
NMI := (value & 0x2) == 0x2
if oldInterrupt != interrupt {
PendingInterrupt = interrupt
}
if oldNMI != NMI {
PendingNMI = NMI
}
}