more meaningful init() of the vm

This commit is contained in:
minjaesong
2022-10-29 01:50:34 +09:00
parent d576382567
commit 889df7a593
4 changed files with 6 additions and 6 deletions

View File

@@ -75,8 +75,6 @@ class VM(
// MMIO_SIZE.toInt() - 256,
// 64
)
init()
}
fun killAllContexts() {

View File

@@ -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 vmViewport = parent.getViewportForTheVM(theVM)
val vmRunStatusText = if (isVMrunning) "Running" else "Idle"
val vmViewportText = if (vmViewport != null) "on viewport #${vmViewport+1}" else "hidden"
val vmRunStatusText = if (isVMrunning) "\u00D2\u00D3" else "\u00D0\u00D1"
val vmViewportText = if (vmViewport != null) "on viewport #${vmViewport+1}" else "and hidden"
batch.color = colBack
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
FONT.draw(batch, profileNames[index], 12f, 11f + i*2*FONT.H)
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)
}

View File

@@ -189,6 +189,8 @@ class VMEmuExecutable(val windowWidth: Int, val windowHeight: Int, var panelsX:
}
private fun initVMenv(vm: VM) {
vm.init()
vm.peripheralTable.getOrNull(1)?.peripheral?.dispose()
val gpu = ReferenceGraphicsAdapter2("./assets", vm)