peripheral tabs on emu gui

This commit is contained in:
minjaesong
2023-03-25 12:01:04 +09:00
parent fd8a30f5fe
commit f1ceac0451
3 changed files with 30 additions and 7 deletions

View File

@@ -111,7 +111,7 @@ object VMSetupBroker {
try {
val argTypes = argTypess[k].parameterTypes
println("loadedClass = $className")
println("COM${index+1} loadedClass = $className")
println("trying constructor args[${k}/${argTypess.lastIndex}]: ${argTypes.joinToString { it.canonicalName }}")
val args = deviceInfo.get("args").allIntoJavaType(argTypes.tail())
@@ -140,6 +140,8 @@ object VMSetupBroker {
jsonValue?.let { deviceInfo ->
val className = deviceInfo.getString("cls")
println("CARD${index} loadedClass = $className")
val loadedClass = Class.forName(className)
val argTypes = loadedClass.declaredConstructors[0].parameterTypes
val args = deviceInfo.get("args").allIntoJavaType(argTypes.tail())

View File

@@ -8,7 +8,9 @@ import java.io.File
/**
* Created by minjaesong on 2022-07-20.
*/
open class RamBank(val vm: VM, bankCount: Int, val writable: Boolean = true) : PeriBase("ramb") {
open class RamBank(val vm: VM, bankCount: Int) : PeriBase("ramb") {
open val writable = true
val bankSize = 524288L
@@ -283,12 +285,13 @@ open class RamBank(val vm: VM, bankCount: Int, val writable: Boolean = true) : P
override fun getVM() = vm
}
open class RomBank(vm: VM, romfile: File, bankCount: Int) : RamBank(vm, bankCount, false) {
open class RomBank(vm: VM, romfile: File, bankCount: Int) : RamBank(vm, bankCount) {
init {
val bytes = romfile.readBytes()
UnsafeHelper.memcpyRaw(bytes, 0, null, mem.ptr, bytes.size.toLong())
}
override val typestring = "romb"
override val writable = false
override fun poke(addr: Long, byte: Byte) {
}