mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +09:00
Terran BASIC stuffs
This commit is contained in:
@@ -29,8 +29,6 @@ public class TerranBASIC {
|
|||||||
appConfig.setWindowedMode(WIDTH, HEIGHT);
|
appConfig.setWindowedMode(WIDTH, HEIGHT);
|
||||||
|
|
||||||
HashMap<String, VMWatchdog> watchdogs = new HashMap<>();
|
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);
|
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);
|
EmulInstance tbasrunner = new EmulInstance(tbasvm, "net.torvald.tsvm.peripheral.ReferenceGraphicsAdapter", "assets/disk0", 560, 448);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
println("TSVM - Copyright 2020 CuriousTorvald");
|
println("TSVM - Copyright 2020-2023 CuriousTorvald");
|
||||||
|
|
||||||
var _BIOS = {};
|
var _BIOS = {};
|
||||||
|
|
||||||
@@ -26,6 +26,12 @@ if (r == 0){
|
|||||||
println("Reading basic.js...");
|
println("Reading basic.js...");
|
||||||
let g=com.pullMessage(0);
|
let g=com.pullMessage(0);
|
||||||
let execAppPrg = eval("var _appStub=function(exec_args){"+g+"};_appStub;"); // making 'exec_args' a app-level global
|
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();
|
execAppPrg();
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user