Terran BASIC stuffs

This commit is contained in:
minjaesong
2023-04-14 22:48:40 +09:00
parent cfe284f201
commit 9a4e28caa7
2 changed files with 7 additions and 3 deletions

View File

@@ -29,8 +29,6 @@ public class TerranBASIC {
appConfig.setWindowedMode(WIDTH, HEIGHT);
HashMap<String, VMWatchdog> watchdogs = new HashMap<>();
watchdogs.put("TEVD_COMMIT", TevdPartialDomCommitWatchdog.INSTANCE);
watchdogs.put("TEVD_SYNC", TevdPartialDomSyncWatchdog.INSTANCE);
VM tbasvm = new VM("./assets", 64 << 10, new TheRealWorld(), new VMProgramRom[]{TBASRelBios.INSTANCE}, 2, watchdogs);
EmulInstance tbasrunner = new EmulInstance(tbasvm, "net.torvald.tsvm.peripheral.ReferenceGraphicsAdapter", "assets/disk0", 560, 448);

View File

@@ -1,4 +1,4 @@
println("TSVM - Copyright 2020 CuriousTorvald");
println("TSVM - Copyright 2020-2023 CuriousTorvald");
var _BIOS = {};
@@ -26,6 +26,12 @@ if (r == 0){
println("Reading basic.js...");
let g=com.pullMessage(0);
let execAppPrg = eval("var _appStub=function(exec_args){"+g+"};_appStub;"); // making 'exec_args' a app-level global
// show TerranBASIC on the character LCD (aka the window title)
[..."TerranBASIC"].map(s=>s.charCodeAt(0)).forEach((c,i)=>{
sys.poke(-1025 - i, c)
})
execAppPrg();
}
catch (e) {