fix: vmemu not reading bios due to changes for BASIC not being ported

This commit is contained in:
minjaesong
2023-04-20 23:10:58 +09:00
parent e2c0f13019
commit 7c36495c57
4 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View File

@@ -63,3 +63,4 @@ tsvmman.pdf
assets/disk0/home/basic/* assets/disk0/home/basic/*
assets/disk0/movtestimg/*.jpg assets/disk0/movtestimg/*.jpg
assets/disk0/*.mov assets/disk0/*.mov
assets/diskMediabin/*

View File

@@ -56,6 +56,10 @@ Terrarum.*.app
Hide the `.jar` within the subdirectory; users will think this file is the main executable and will try to execute it using whatever JVM they may (or may not) have. Hide the `.jar` within the subdirectory; users will think this file is the main executable and will try to execute it using whatever JVM they may (or may not) have.
#### Some Notes
- Windows EXE creation is not there yet. Maybe use one of [these?](https://sourceforge.net/projects/batch-compiler/)
### Notes to Terrarum Programmers ### Notes to Terrarum Programmers
By self-containing everything in one file, it is not possible to modify the base game easily. Modloading scheme must be extended to load from mutable directory such as `%APPDATA%/Terrarum/mods`. By self-containing everything in one file, it is not possible to modify the base game easily. Modloading scheme must be extended to load from mutable directory such as `%APPDATA%/Terrarum/mods`.

View File

@@ -45,7 +45,7 @@ object VMSetupBroker {
vmRunners[vm.id] = VMRunnerFactory(vm.assetsDir, vm, "js") vmRunners[vm.id] = VMRunnerFactory(vm.assetsDir, vm, "js")
coroutineJobs[vm.id] = GlobalScope.launch { coroutineJobs[vm.id] = GlobalScope.launch {
try { try {
vmRunners[vm.id]?.executeCommand(vm.roms[0]!!.readAll()) vmRunners[vm.id]?.executeCommand(vm.roms[0].readAll())
} }
catch (e: Throwable) { catch (e: Throwable) {
whatToDoOnVmException(e) whatToDoOnVmException(e)

View File

@@ -17,6 +17,7 @@ import net.torvald.terrarum.utils.JsonFetcher
import net.torvald.tsvm.VMEmuExecutableWrapper.Companion.FONT import net.torvald.tsvm.VMEmuExecutableWrapper.Companion.FONT
import net.torvald.tsvm.VMEmuExecutableWrapper.Companion.SQTEX import net.torvald.tsvm.VMEmuExecutableWrapper.Companion.SQTEX
import net.torvald.tsvm.peripheral.* import net.torvald.tsvm.peripheral.*
import java.io.File
import kotlin.system.exitProcess import kotlin.system.exitProcess
class VMEmuExecutableWrapper(val windowWidth: Int, val windowHeight: Int, var panelsX: Int, var panelsY: Int, val diskPathRoot: String) : ApplicationAdapter() { class VMEmuExecutableWrapper(val windowWidth: Int, val windowHeight: Int, var panelsX: Int, var panelsY: Int, val diskPathRoot: String) : ApplicationAdapter() {
@@ -580,7 +581,7 @@ class VMEmuExecutable(val windowWidth: Int, val windowHeight: Int, var panelsX:
val assetsDir = json.getString("assetsdir") val assetsDir = json.getString("assetsdir")
val ramsize = json.getLong("ramsize") val ramsize = json.getLong("ramsize")
val cardslots = json.getInt("cardslots") val cardslots = json.getInt("cardslots")
val roms = json.get("roms").iterator().map { VMProgramRom(it.asString()) }.toTypedArray() val roms = json.get("roms").iterator().map { VMProgramRom(File(it.asString())) }.toTypedArray()
val vm = VM(assetsDir, ramsize, TheRealWorld(), roms, cardslots, watchdogs) val vm = VM(assetsDir, ramsize, TheRealWorld(), roms, cardslots, watchdogs)