mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-08 04:01:51 +09:00
added missing codes
This commit is contained in:
@@ -116,6 +116,8 @@ class IOSpace(val vm: VM) : PeriBase("io"), InputProcessor {
|
||||
89L -> ((acpiShutoff.toInt(7)) or (bmsIsBatteryOperated.toInt(3)) or (bmsHasBattery.toInt(1))
|
||||
or bmsIsCharging.toInt()).toByte()
|
||||
|
||||
in 92L..127L -> hyveArea[addr.toInt()]
|
||||
|
||||
in 1024..2047 -> peripheralFast[addr - 1024]
|
||||
|
||||
4076L -> blockTransferPorts[0].statusCode.toByte()
|
||||
@@ -158,6 +160,8 @@ class IOSpace(val vm: VM) : PeriBase("io"), InputProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
private val hyveArea = ByteArray(128)
|
||||
|
||||
override fun mmio_write(addr: Long, byte: Byte) {
|
||||
val adi = addr.toInt()
|
||||
val bi = byte.toInt().and(255)
|
||||
@@ -186,6 +190,8 @@ class IOSpace(val vm: VM) : PeriBase("io"), InputProcessor {
|
||||
acpiShutoff = byte.and(-128).isNonZero()
|
||||
}
|
||||
|
||||
in 92L..127L -> hyveArea[addr.toInt()] = byte
|
||||
|
||||
in 1024..2047 -> peripheralFast[addr - 1024] = byte
|
||||
|
||||
4076L -> blockTransferPorts[0].statusCode.set(bi)
|
||||
|
||||
Reference in New Issue
Block a user