mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-08 04:01:51 +09:00
a working internet modem that only reads
This commit is contained in:
@@ -7,6 +7,8 @@ import kotlin.Pair;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import net.torvald.tsvm.peripheral.*;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class AppLoader {
|
||||
|
||||
public static String appTitle = "tsvm";
|
||||
@@ -28,28 +30,37 @@ public class AppLoader {
|
||||
appConfig.setWindowedMode(WIDTH, HEIGHT);
|
||||
|
||||
|
||||
|
||||
String diskPath = "assets/disk0";
|
||||
|
||||
|
||||
// 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("./assets", 64 << 10, new TheRealWorld(), new VMProgramRom[]{TandemBios.INSTANCE, BasicRom.INSTANCE}, 2);
|
||||
// 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});
|
||||
// VM vm = new VM("./assets", 8192 << 10, new TheRealWorld(), new VMProgramRom[]{OpenBios.INSTANCE}, 8);
|
||||
VM pipvm = new VM("./assets", 4096, new TheRealWorld(), new VMProgramRom[]{PipBios.INSTANCE, PipROM.INSTANCE}, 8);
|
||||
// VM pipvm = new VM("./assets", 4096, new TheRealWorld(), new VMProgramRom[]{PipBios.INSTANCE, PipROM.INSTANCE}, 8);
|
||||
|
||||
vm.getIO().getBlockTransferPorts()[0].attachDevice(new TestDiskDrive(vm, 0, new File(diskPath)));
|
||||
vm.getIO().getBlockTransferPorts()[1].attachDevice(new HttpModem(vm));
|
||||
|
||||
|
||||
String diskPath = "assets/disk0";
|
||||
|
||||
EmulInstance reference = new EmulInstance(vm, "net.torvald.tsvm.peripheral.ReferenceGraphicsAdapter2", diskPath, 560, 448);
|
||||
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(
|
||||
|
||||
|
||||
/*EmulInstance pip = new EmulInstance(pipvm, null, diskPath, 640, 480, CollectionsKt.listOf(new Pair(1, new PeripheralEntry2(
|
||||
32768L,
|
||||
1,
|
||||
0,
|
||||
"net.torvald.tsvm.peripheral.ExtDisp",
|
||||
pipvm, 160, 140
|
||||
))));
|
||||
))));*/
|
||||
|
||||
new Lwjgl3Application(new VMGUI(portable, WIDTH, HEIGHT), appConfig);
|
||||
}
|
||||
|
||||
@@ -76,8 +76,6 @@ class VMGUI(val loaderInfo: EmulInstance, val viewportWidth: Int, val viewportHe
|
||||
val loadedClassInstance = loadedClassConstructor.newInstance("./assets", vm, )
|
||||
gpu = (loadedClassInstance as GraphicsAdapter)
|
||||
|
||||
vm.getIO().blockTransferPorts[0].attachDevice(TestDiskDrive(vm, 0, File(loaderInfo.diskPath)))
|
||||
|
||||
vm.peripheralTable[1] = PeripheralEntry(
|
||||
gpu,
|
||||
GraphicsAdapter.VRAM_SIZE,
|
||||
@@ -95,14 +93,6 @@ class VMGUI(val loaderInfo: EmulInstance, val viewportWidth: Int, val viewportHe
|
||||
vm.getInputStream = { System.`in` }
|
||||
}
|
||||
|
||||
vm.getIO().blockTransferPorts[1].attachDevice(
|
||||
WorldRadar(
|
||||
Gdx.files.internal(
|
||||
"test_assets/test_terrain.png"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
loaderInfo.extraPeripherals.forEach { (port, peri) ->
|
||||
val typeargs = peri.args.map { it.javaClass }.toTypedArray()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user