random minor stuff

This commit is contained in:
Karol Stasiak 2023-01-27 18:16:25 +01:00
parent ca7166d1ae
commit 9229092309
3 changed files with 4 additions and 3 deletions

View File

@ -953,7 +953,7 @@ case class ZLine(opcode: ZOpcode.Value, registers: ZRegisters, parameter: Consta
if (result.contains("???")) s" ??? (${this.toString.stripPrefix(" ")})" else result
}
def readsRegister(r: ZRegister.Value): Boolean = {
def readsRegister(r: ZRegister.Value): Boolean = { // TODO: optimize
import ZOpcode._
import ZRegister._
r match {

View File

@ -240,8 +240,8 @@ object MosNiceFunctionProperty {
case object DoesntConcernD extends NiceFunctionProperty("D")
case object DoesntChangeZpRegister extends NiceFunctionProperty("reg")
case class SetsSourceOfNZ(sourceOfNZ: SourceOfNZ) extends NiceFunctionProperty(sourceOfNZ + "NZ")
case class SetsXTo(value: Int) extends NiceFunctionProperty("Y=" + value)
case class SetsYTo(value: Int) extends NiceFunctionProperty("Z=" + value)
case class SetsXTo(value: Int) extends NiceFunctionProperty("X=" + value)
case class SetsYTo(value: Int) extends NiceFunctionProperty("Y=" + value)
case class SetsATo(value: Int) extends NiceFunctionProperty("A=" + value)
case class Bit0OfA(value: Boolean) extends NiceFunctionProperty("A0=" + value)
case class Bit7OfA(value: Boolean) extends NiceFunctionProperty("A7=" + value)

View File

@ -51,6 +51,7 @@ class MemoryBank(val index: Int, val isBigEndian: Boolean) {
def readWord(addrHi: Int, addrLo: Int): Int = readByte(addrLo) + (readByte(addrHi) << 8)
// TODO: use new:
val output: Array[Byte] = Array.fill[Byte](1 << 16)(0)
val occupied: Array[Boolean] = Array.fill(1 << 16)(false)
val initialized: Array[Boolean] = Array.fill(1 << 16)(false)