This commit is contained in:
Irmen de Jong 2020-02-17 02:17:34 +01:00
parent 5d9c54eaf6
commit a8874fd05a
4 changed files with 9 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import javax.swing.JPanel
* It supports: Character mode,
* High res bitmap mode (320*200), Multicolor bitmap mode (160*200).
* TODO: Multicolor character mode. Extended background color mode.
* TODO: Horizontal smooth scrolling (+38 col mode). Vertical smooth scrolling (+24 row mode).
*/
internal class Screen(private val chargen: Rom, val ram: MemoryComponent) : JPanel() {

View File

@ -232,6 +232,7 @@ open class Cpu6502 : BusComponent() {
* Reset the cpu
*/
override fun reset() {
// TODO don't perform all of the reset logic immediately, handle the reset 'pin' in the regular clock() instead (much like a NMI)
regP.I = true
regP.C = false
regP.Z = false
@ -1074,6 +1075,8 @@ open class Cpu6502 : BusComponent() {
regP.I = true // interrupts are now disabled
// NMOS 6502 doesn't clear the D flag (CMOS 65C02 version does...)
regPC = readWord(IRQ_vector)
// TODO prevent NMI from triggering immediately after IRQ/BRK... how does that work exactly?
}
protected open fun handleInterrupt() {
@ -1094,6 +1097,8 @@ open class Cpu6502 : BusComponent() {
regPC = readWord(IRQ_vector)
irqAsserted = false
}
// TODO prevent NMI from triggering immediately after IRQ/BRK... how does that work exactly?
}
protected fun iBvc() {

View File

@ -633,6 +633,8 @@ class Cpu65C02 : Cpu6502() {
regP.I = true // interrupts are now disabled
regP.D = false // this is different from NMOS 6502
regPC = readWord(IRQ_vector)
// TODO prevent NMI from triggering immediately after IRQ/BRK... how does that work exactly?
}
override fun handleInterrupt() {

View File

@ -1 +1 @@
version=1.7
version=1.8-SNAPSHOT