that's one shitty way of injecting a code...

This commit is contained in:
minjaesong
2021-04-23 19:31:49 +09:00
parent 48fd10aeed
commit 1626c5f5e2
5 changed files with 34 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ public class AppLoader {
// val vm = VM(64.kB(), TheRealWorld(), arrayOf(GenericBios))
//VM vm = new VM(64 << 10, new TheRealWorld(), new VMProgramRom[]{BasicBios.INSTANCE, BasicRom.INSTANCE});
//VM vm = new VM(64 << 10, new TheRealWorld(), new VMProgramRom[]{OEMBios.INSTANCE, BasicRom.INSTANCE});
VM vm = new VM(32 << 10, new TheRealWorld(), new VMProgramRom[]{TandemBios.INSTANCE, BasicRom.INSTANCE});
VM vm = new VM(64 << 10, new TheRealWorld(), new VMProgramRom[]{TandemBios.INSTANCE, BasicRom.INSTANCE});
//VM vm = new VM(64 << 10, new TheRealWorld(), new VMProgramRom[]{TBASRelBios.INSTANCE});
EmulInstance reference = new EmulInstance(appConfig, vm, "net.torvald.tsvm.peripheral.ReferenceGraphicsAdapter", "assets/disk0");

View File

@@ -47,6 +47,9 @@ class VM(
val startTime: Long
var resetDown = false
var stopDown = false
var romMapping = 255
internal set

View File

@@ -94,6 +94,7 @@ class IOSpace(val vm: VM) : PeriBase, InputProcessor {
38L -> keyboardInputRequested.toInt().toByte()
39L -> rawInputFunctionLatched.toInt().toByte()
in 40..47 -> keyEventBuffers[adi - 40]
48L -> ((vm.resetDown.toInt() shl 7) or (vm.stopDown.toInt())).toByte()
in 64..67 -> vm.memsize.shr((adi - 64) * 8).toByte()
68L -> (uptimeCounterLatched.toInt() or RTClatched.toInt().shl(1)).toByte()