diff --git a/doc/notes.txt b/doc/notes.txt
index 1f3b449e..5bc55501 100644
--- a/doc/notes.txt
+++ b/doc/notes.txt
@@ -412,3 +412,27 @@ cc65 headers
example headers (presets/*/*.h)
libcv headers (src/worker/lib)
ASM includes
+
+
+NETPLAY
+
+runs alongside of emulator, doesn't modify controls (just state)
+when controls change: player sends control inputs + frame#
+add latency so clients more often are in sync
+if miss latency window, client syncs state (moves forward a few frames?)
+state checksum?
+socket.io
+
+
+X86
+
+https://github.com/freebasic/fbc
+GW-BASIC
+http://www.grifo.com/SOFT/Pacific/uk_pacific.html
+http://www.cpm.z80.de/small_c.html
+https://github.com/open-watcom
+Free Pascal
+https://bellard.org/tcc/
+https://wiki.osdev.org/Smaller_C
+https://yasm.tortall.net/
+https://wiki.osdev.org/Tool_Comparison
diff --git a/index.html b/index.html
index 0e6c0127..b8cefa6b 100644
--- a/index.html
+++ b/index.html
@@ -530,8 +530,8 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
-
diff --git a/src/ide/embedui.ts b/src/ide/embedui.ts
index e5624fd8..ebd1ce3a 100644
--- a/src/ide/embedui.ts
+++ b/src/ide/embedui.ts
@@ -130,11 +130,10 @@ function recordVideo(intervalMsec, maxFrames, callback) {
});
}
-
-function startPlatform(qs) {
+async function startPlatform(qs) {
if (!PLATFORMS[platform_id]) throw Error("Invalid platform '" + platform_id + "'.");
platform = new PLATFORMS[platform_id]($("#emuscreen")[0]);
- platform.start();
+ await platform.start();
// start recorder when click on canvas (TODO?)
if (qs['rec']) {
findPrimaryCanvas().on('focus', () => {
@@ -164,21 +163,32 @@ function startPlatform(qs) {
return true;
}
-function loadPlatform(qs) {
+// TODO: merge with ui
+async function loadPlatform(qs) {
if (qs.data) qs = qs.data;
platform_id = qs['p'];
if (!platform_id) throw('No platform variable!');
var platformfn = 'gen/platform/' + platform_id.split(/[.-]/)[0] + '.js'; // required file
var machinefn = platformfn.replace('/platform/', '/machine/'); // optional file
- loadScript(platformfn).then( () => {
- return loadScript(machinefn).catch(() => { console.log('skipped',machinefn); }); // optional file skipped
- }).then( () => {
+ try {
+ await loadScript(platformfn); // load platform file
+ } catch (e) {
+ console.log(e);
+ throw('Platform "' + platform_id + '" not supported.');
+ return;
+ }
+ try {
+ await loadScript(machinefn); // load machine file
+ } catch (e) {
+ console.log('skipped',machinefn); // optional file skipped
+ }
+ try {
console.log("starting platform", platform_id); // loaded required .js file
- startPlatform(qs);
- }).catch( (e) => {
+ await startPlatform(qs);
+ } catch (e) {
console.log(e);
alert('Platform "' + platform_id + '" not supported.');
- });
+ }
}
export function loadScript(scriptfn:string) : Promise {