mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-14 15:06:05 +09:00
mock splash screen for the portable
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user