mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-15 07:26:05 +09:00
gpu: reading existence of other banks using mmio
This commit is contained in:
@@ -15,6 +15,10 @@ class GraphicsJSR223Delegate(val vm: VM) {
|
||||
return vm.findPeribyType(VM.PERITYPE_GPU_AND_TERM)?.peripheral as? GraphicsAdapter
|
||||
}
|
||||
|
||||
fun getVramSize() {
|
||||
getFirstGPU()?.mmio_read(11)
|
||||
}
|
||||
|
||||
fun resetPalette() {
|
||||
getFirstGPU()?.poke(250883L, 1)
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ data class AdapterConfig(
|
||||
)
|
||||
|
||||
data class SuperGraphicsAddonConfig(
|
||||
val hasSecondBank: Boolean = false
|
||||
val bankCount: Int = 1
|
||||
)
|
||||
|
||||
class ReferenceGraphicsAdapter(assetsRoot: String, vm: VM) : GraphicsAdapter(assetsRoot, vm, GraphicsAdapter.DEFAULT_CONFIG_COLOR_CRT)
|
||||
@@ -268,7 +268,7 @@ open class GraphicsAdapter(private val assetsRoot: String, val vm: VM, val confi
|
||||
8L -> lastUsedColour
|
||||
9L -> ttyFore.toByte()
|
||||
10L -> ttyBack.toByte()
|
||||
11L -> 1
|
||||
11L -> sgr.bankCount.toByte()
|
||||
|
||||
in 0 until VM.MMIO_SIZE -> -1
|
||||
else -> null
|
||||
|
||||
Reference in New Issue
Block a user