Misc tiny changes
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import ch.qos.logback.classic.LoggerContext
|
||||
import com.thequux.mcpdp.core.CPU
|
||||
import com.thequux.mcpdp.loadAbs
|
||||
import com.thequux.mcpdp.peripheral.DL11
|
||||
import com.thequux.mcpdp.peripheral.MemBus
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.io.File
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -19,7 +21,7 @@ fun main(args: Array<String>) {
|
||||
cpu.runState = CPU.RunState.RUNNING
|
||||
cpu.pc = 0x80u
|
||||
val start = System.nanoTime()
|
||||
val ninsn = cpu.run(600000000)
|
||||
val ninsn = cpu.run(200000000)
|
||||
val end = System.nanoTime()
|
||||
|
||||
System.err.println("Halted at 0${cpu.pc.toString(8)}")
|
||||
@@ -29,5 +31,7 @@ fun main(args: Array<String>) {
|
||||
println("Exiting")
|
||||
console.stop()
|
||||
}
|
||||
val loggerContext = LoggerFactory.getILoggerFactory() as LoggerContext
|
||||
loggerContext.stop()
|
||||
System.exit(0)
|
||||
}
|
||||
|
@@ -865,6 +865,7 @@ class CPU(val mbus: MemBus) {
|
||||
} else {
|
||||
val pirqLvl = pirq.toInt() shr 1 and 7;
|
||||
if (pirqLvl > psw_priority) {
|
||||
logger.debug("PIRQ{} trap to 0xA0", pirqLvl)
|
||||
trap(0xA0u)
|
||||
}
|
||||
}
|
||||
@@ -906,7 +907,7 @@ class CPU(val mbus: MemBus) {
|
||||
}
|
||||
|
||||
fun trap(vector: UShort) {
|
||||
// logger.debug("Trap to {}", vector.toString(8))
|
||||
logger.info("Trap to {}", vector.toString(8))
|
||||
val old_psw = psw
|
||||
// update PSW first so that this gets pushed to the
|
||||
psw = core.getw((vector + 2u).toUShort())
|
||||
|
@@ -108,7 +108,7 @@ class Disassembler(val core: VAddressSpace) {
|
||||
0x0000 -> when (opcode) {
|
||||
0x0000 -> fmt("HALT") // HALT
|
||||
0x0001 -> fmt("WAIT")
|
||||
0x0002 -> fmt("WTI")
|
||||
0x0002 -> fmt("RTI")
|
||||
0x0003 -> fmt("BPT")
|
||||
0x0004 -> fmt("IOT")
|
||||
0x0005 -> fmt("RESET")
|
||||
|
Reference in New Issue
Block a user