diff --git a/index.html b/index.html index 5360660..8113ef0 100644 --- a/index.html +++ b/index.html @@ -7,5 +7,6 @@ video, canvas { border: 2px dotted black; }
+ diff --git a/res/SPLASH.PIC.BIN b/res/SPLASH.PIC.BIN new file mode 100644 index 0000000..49916a3 Binary files /dev/null and b/res/SPLASH.PIC.BIN differ diff --git a/res/icon128.png b/res/icon128.png new file mode 100644 index 0000000..9b78f47 Binary files /dev/null and b/res/icon128.png differ diff --git a/server.js b/server.js index 0b112a9..bf2ea84 100644 --- a/server.js +++ b/server.js @@ -237,4 +237,35 @@ } } } + + $('#bootstrap').addEventListener('click', async e => { + + const CLIENT_ADDR = 0x6000; + const CLIENT_FILE = 'client/client.bin'; + + function send(str) { + // TODO: Send this over serial, obviously... + console.log(str); + } + + send('CALL -151'); // Enter Monitor + + const response = await fetch(CLIENT_FILE); + if (!response.ok) + throw new Error(response.statusText); + const bytes = new Uint8Array(await response.arrayBuffer()); + let addr = CLIENT_ADDR; + for (let offset = 0; offset < bytes.length; offset += 8) { + const str = addr.toString(16).toUpperCase() + ': ' + + [...bytes.slice(offset, offset + 8)] + .map(b => ('00' + b.toString(16).toUpperCase()).substr(-2)) + .join(' '); + + send(str); + } + + send('\x03'); // Ctrl+C - Exit Monitor + send(`CALL ${CLIENT_ADDR}`); // Execute client + }); + })();