mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +09:00
more default peripherals for "reference" instance
This commit is contained in:
@@ -271,9 +271,6 @@ class PeripheralEntry(
|
||||
}
|
||||
|
||||
class PeripheralEntry2(
|
||||
val memsize: Long = 0,
|
||||
val mmioSize: Int = 0,
|
||||
val interruptCount: Int = 0, // max: 4
|
||||
val peripheralClassname: String,
|
||||
vararg val args: Any
|
||||
)
|
||||
|
||||
@@ -3,8 +3,10 @@ package net.torvald.tsvm;
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
|
||||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
|
||||
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
|
||||
import kotlin.Pair;
|
||||
import net.torvald.tsvm.peripheral.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class AppLoader {
|
||||
@@ -40,22 +42,25 @@ public class AppLoader {
|
||||
// VM vm = new VM(64 << 10, new TheRealWorld(), new VMProgramRom[]{OEMBios.INSTANCE, BasicRom.INSTANCE});
|
||||
// VM vm = new VM("./assets", 64 << 10, new TheRealWorld(), new VMProgramRom[]{TandemBios.INSTANCE, BasicRom.INSTANCE}, 2, watchdogs);
|
||||
// VM vm = new VM(128 << 10, new TheRealWorld(), new VMProgramRom[]{BasicBios.INSTANCE, WPBios.INSTANCE});
|
||||
// VM vm = new VM("./assets", 8192 << 10, new TheRealWorld(), new VMProgramRom[]{TsvmBios.INSTANCE}, 8, watchdogs);
|
||||
VM vm = new VM("./assets", 8192 << 10, new TheRealWorld(), new VMProgramRom[]{OpenBios.INSTANCE}, 8, watchdogs);
|
||||
VM vm = new VM("./assets", 8192 << 10, new TheRealWorld(), new VMProgramRom[]{TsvmBios.INSTANCE}, 8, watchdogs);
|
||||
// VM vm = new VM("./assets", 8192 << 10, new TheRealWorld(), new VMProgramRom[]{OpenBios.INSTANCE}, 8, watchdogs);
|
||||
// VM pipvm = new VM("./assets", 4096, new TheRealWorld(), new VMProgramRom[]{PipBios.INSTANCE, PipROM.INSTANCE}, 8, watchdogs);
|
||||
|
||||
vm.getIO().getBlockTransferPorts()[0].attachDevice(new TestDiskDrive(vm, 0, diskPath));
|
||||
vm.getIO().getBlockTransferPorts()[1].attachDevice(new HttpModem(vm, 1024, -1));
|
||||
vm.getIO().getBlockTransferPorts()[2].attachDevice(new TestDiskDrive(vm, 0, "assets/diskMediabin"));
|
||||
|
||||
|
||||
ArrayList defaultPeripherals = new ArrayList();
|
||||
defaultPeripherals.add(new Pair(3, new PeripheralEntry2("net.torvald.tsvm.peripheral.AudioAdapter", vm)));
|
||||
|
||||
EmulInstance reference = new EmulInstance(vm, "net.torvald.tsvm.peripheral.ReferenceGraphicsAdapter2", diskPath, 560, 448);
|
||||
|
||||
EmulInstance reference = new EmulInstance(vm, "net.torvald.tsvm.peripheral.ReferenceGraphicsAdapter2", diskPath, 560, 448, defaultPeripherals);
|
||||
EmulInstance reference2 = new EmulInstance(vm, "net.torvald.tsvm.peripheral.ReferenceLikeLCD", diskPath, 560, 448);
|
||||
EmulInstance term = new EmulInstance(vm, "net.torvald.tsvm.peripheral.Term", diskPath, 720, 480);
|
||||
EmulInstance portable = new EmulInstance(vm, "net.torvald.tsvm.peripheral.CLCDDisplay", diskPath, 1080, 436);
|
||||
EmulInstance wp = new EmulInstance(vm, "net.torvald.tsvm.peripheral.WpTerm", "assets/wpdisk", 810, 360);
|
||||
|
||||
|
||||
/*EmulInstance pip = new EmulInstance(pipvm, null, diskPath, 640, 480, CollectionsKt.listOf(new Pair(1, new PeripheralEntry2(
|
||||
32768L,
|
||||
1,
|
||||
@@ -64,6 +69,6 @@ public class AppLoader {
|
||||
pipvm, 160, 140
|
||||
))));*/
|
||||
|
||||
new Lwjgl3Application(new VMGUI(term, WIDTH, HEIGHT), appConfig);
|
||||
new Lwjgl3Application(new VMGUI(reference, WIDTH, HEIGHT), appConfig);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,6 +559,7 @@ class VMEmuExecutable(val windowWidth: Int, val windowHeight: Int, var panelsX:
|
||||
"roms":["./assets/bios/tsvmbios.bin"],
|
||||
"com1":{"cls":"net.torvald.tsvm.peripheral.TestDiskDrive", "args":[0, "./assets/disk0/"]},
|
||||
"com2":{"cls":"net.torvald.tsvm.peripheral.HttpModem", "args":[1024, -1]},
|
||||
"card3":{"cls":"net.torvald.tsvm.peripheral.AudioAdapter", "args":[]}
|
||||
"card4":{"cls":"net.torvald.tsvm.peripheral.RamBank", "args":[256]}
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
Reference in New Issue
Block a user