mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-09 22:54:03 +09:00
more meaningful init() of the vm
This commit is contained in:
@@ -75,8 +75,6 @@ class VM(
|
|||||||
// MMIO_SIZE.toInt() - 256,
|
// MMIO_SIZE.toInt() - 256,
|
||||||
// 64
|
// 64
|
||||||
)
|
)
|
||||||
|
|
||||||
init()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun killAllContexts() {
|
fun killAllContexts() {
|
||||||
|
|||||||
Binary file not shown.
@@ -52,8 +52,8 @@ class ProfilesMenu(parent: VMEmuExecutable, x: Int, y: Int, w: Int, h: Int) : Em
|
|||||||
val isVMrunning = if (theVM != null) !theVM.disposed && theVM.startTime >= 0 else false
|
val isVMrunning = if (theVM != null) !theVM.disposed && theVM.startTime >= 0 else false
|
||||||
val vmViewport = parent.getViewportForTheVM(theVM)
|
val vmViewport = parent.getViewportForTheVM(theVM)
|
||||||
|
|
||||||
val vmRunStatusText = if (isVMrunning) "Running" else "Idle"
|
val vmRunStatusText = if (isVMrunning) "\u00D2\u00D3" else "\u00D0\u00D1"
|
||||||
val vmViewportText = if (vmViewport != null) "on viewport #${vmViewport+1}" else "hidden"
|
val vmViewportText = if (vmViewport != null) "on viewport #${vmViewport+1}" else "and hidden"
|
||||||
|
|
||||||
batch.color = colBack
|
batch.color = colBack
|
||||||
it.fillRect(10, 11 + i*2*FONT.H, 228, 26)
|
it.fillRect(10, 11 + i*2*FONT.H, 228, 26)
|
||||||
@@ -61,7 +61,7 @@ class ProfilesMenu(parent: VMEmuExecutable, x: Int, y: Int, w: Int, h: Int) : Em
|
|||||||
batch.color = colFore
|
batch.color = colFore
|
||||||
FONT.draw(batch, profileNames[index], 12f, 11f + i*2*FONT.H)
|
FONT.draw(batch, profileNames[index], 12f, 11f + i*2*FONT.H)
|
||||||
batch.color = EmulatorGuiToolkit.Theme.COL_ACTIVE3
|
batch.color = EmulatorGuiToolkit.Theme.COL_ACTIVE3
|
||||||
FONT.draw(batch, "$vmRunStatusText, $vmViewportText", 12f, 11f+FONT.H + i*2*FONT.H)
|
FONT.draw(batch, "$vmRunStatusText $vmViewportText", 12f, 11f+FONT.H + i*2*FONT.H)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,6 +189,8 @@ class VMEmuExecutable(val windowWidth: Int, val windowHeight: Int, var panelsX:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initVMenv(vm: VM) {
|
private fun initVMenv(vm: VM) {
|
||||||
|
vm.init()
|
||||||
|
|
||||||
vm.peripheralTable.getOrNull(1)?.peripheral?.dispose()
|
vm.peripheralTable.getOrNull(1)?.peripheral?.dispose()
|
||||||
|
|
||||||
val gpu = ReferenceGraphicsAdapter2("./assets", vm)
|
val gpu = ReferenceGraphicsAdapter2("./assets", vm)
|
||||||
|
|||||||
Reference in New Issue
Block a user