mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-12 06:01:50 +09:00
peripheral tabs on emu gui
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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) {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user