mock splash screen for the portable

This commit is contained in:
minjaesong
2021-04-22 20:21:05 +09:00
parent c331397619
commit 82b021edd7
3 changed files with 88 additions and 1 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(64 << 10, new TheRealWorld(), new VMProgramRom[]{QuickBios.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[]{TBASRelBios.INSTANCE});
EmulInstance reference = new EmulInstance(appConfig, vm, "net.torvald.tsvm.peripheral.ReferenceGraphicsAdapter", "assets/disk0");

View File

@@ -68,6 +68,25 @@ object BasicBios : VMProgramRom {
override fun get(addr: Int): Byte = contents[addr]
}
object TandemBios : VMProgramRom {
private val contents: ByteArray
init {
val bytes = File("./assets/bios/tandemport.js").readBytes()
contents = bytes.sliceArray(0 until minOf(65536, bytes.size))
}
override fun readAll(): String {
// check if bios is compressed in gzip
return if (contents.startsWith(GZIP_HEADER))
CompressorDelegate.decomp(contents).toString(VM.CHARSET)
else
contents.toString(VM.CHARSET)
}
override fun get(addr: Int): Byte = contents[addr]
}
object BasicRom : VMProgramRom {
private val contents: ByteArray