fixed williams-z80 import, removed coleco.mame, fixed _MAIN_ presets, xhr ontimeout, update chromedriver

This commit is contained in:
Steven Hugg 2019-12-24 08:29:46 -06:00
parent 363fbee4a9
commit 7a7c3d7255
13 changed files with 36 additions and 56 deletions

View File

@ -160,7 +160,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
<!-- PLATFORMS menu -->
<span class="dropdown">
<a class="btn dropdown-toggle hidden-xs toolbarMenuButton" id="platformsMenuButton" style="min-width:90px" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<a class="btn dropdown-toggle toolbarMenuButton" id="platformsMenuButton" style="min-width:90px" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="platform_name">PLATFORMS</span> <span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="platformsMenuButton">
@ -208,7 +208,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="?platform=vcs.mame">Atari 2600 (MAME)</a></li>
<li><a class="dropdown-item" href="?platform=nes.mame">NES (MAME)</a></li>
<li><a class="dropdown-item" href="?platform=coleco.mame">ColecoVision (MAME)</a></li>
<!--<li><a class="dropdown-item" href="?platform=coleco.mame">ColecoVision (MAME)</a></li>-->
<li><a class="dropdown-item" href="?platform=vector-ataricolor">Atari Color Vector (6502)</a></li>
<li><a class="dropdown-item" href="?platform=markdown">Markdown</a></li>
</ul>

52
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "8bitworkshop",
"version": "3.4.1",
"version": "3.5.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -61,9 +61,9 @@
"dev": true
},
"@types/node": {
"version": "8.10.53",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.53.tgz",
"integrity": "sha512-aOmXdv1a1/vYUn1OT1CED8ftbkmmYbKhKGSyMDeJiidLvKRKvZUQOdXwG/wcNY7T1Qb0XTlVdiYjIq00U7pLrQ==",
"version": "13.1.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.1.tgz",
"integrity": "sha512-hx6zWtudh3Arsbl3cXay+JnkvVgCKzCWKv42C9J01N2T2np4h8w5X8u6Tpz5mj38kE3M9FM0Pazx8vKFFMnjLQ==",
"dev": true
},
"@types/sizzle": {
@ -340,9 +340,9 @@
}
},
"chromedriver": {
"version": "76.0.1",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-76.0.1.tgz",
"integrity": "sha512-+8BCemJLKPF2w/UpzA1uNgLWQrg1IgIO4ZYcsAjYYgqD8zUcvQ+RfwA/0TR1Zwv9Mkd8fdzTe21eZ2FyZ83DAg==",
"version": "79.0.0",
"resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-79.0.0.tgz",
"integrity": "sha512-DO29C7ntJfzu6q1vuoWwCON8E9x5xzopt7Q41A7Dr7hBKcdNpGw1l9DTt9b+l1qviOWiJLGsD+jHw21ptEHubA==",
"dev": true,
"requires": {
"del": "^4.1.1",
@ -496,38 +496,6 @@
"inherits": "^2.0.3",
"readable-stream": "^2.2.2",
"typedarray": "^0.0.6"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"core-util-is": {
@ -1052,9 +1020,9 @@
}
},
"glob": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "8bitworkshop",
"version": "3.4.1",
"version": "3.5.0",
"author": "Steven Hugg",
"description": "8bitworkshop.com",
"repository": {
@ -18,7 +18,7 @@
"@types/jquery": "^3.3.31",
"atob": "^2.1.x",
"btoa": "^1.2.x",
"chromedriver": "^76.0.1",
"chromedriver": "^79.0.0",
"clipboard": "^2.0.4",
"jsdom": "^12.2.0",
"lzg": "^1.0.x",

View File

@ -60,7 +60,7 @@ void draw_line(int x0, int y0, int x1, int y1, byte color) {
}
}
#ifdef _MAIN_
#ifdef __MAIN__
void main() {
setup_mode2();

View File

@ -62,7 +62,7 @@ void draw_line(int x0, int y0, int x1, int y1, byte color) {
}
}
#ifdef _MAIN_
#ifdef __MAIN__
void main() {
setup_multicolor();

View File

@ -42,7 +42,7 @@ CodeMirror.defineMode('bataribasic', function(_config, parserConfig) {
"kernel","multisprite","multisprite_no_include","debug",
"cyclescore","cycles","legacy"
];
var directives = {};
var directives = new Map();
directives_list.forEach(function(s) { directives.set(s, 'keyword'); });
var numbers = /^([$][0-9a-f]+|[%][01]+|[0-9.]+)/i;

View File

@ -32,8 +32,8 @@ function require(modname) {
else { console.log("Unknown require()", modname); return exports; }
}
importScripts("../../gen/emu.js");
importScripts("../../gen/cpu/ZilogZ80.js");
importScripts("../../../gen/common/emu.js");
importScripts("../../../gen/common/cpu/ZilogZ80.js");
var cpu, ram, rom, membus, iobus;
var audio;

View File

@ -755,6 +755,9 @@ export abstract class BaseMAMEPlatform {
console.log("loaded " + opts.biosfile); // + " (" + oEvent.total + " bytes)");
fetch_bios.resolve();
};
oReq1.ontimeout = function (oEvent) {
throw Error("Timeout loading " + opts.biosfile);
}
oReq1.send();
} else {
fetch_bios.resolve();
@ -774,6 +777,9 @@ export abstract class BaseMAMEPlatform {
window['Module'].wasmBinary = new Uint8Array(oReq2.response);
fetch_wasm.resolve();
};
oReq2.ontimeout = function (oEvent) {
throw Error("Timeout loading " + opts.jsfile);
}
oReq2.send();
}
// start loading script

View File

@ -464,6 +464,9 @@ export function getWithBinary(url:string, success:(text:string|Uint8Array)=>void
throw Error("Error " + oReq.status + " loading " + url);
}
}
oReq.ontimeout = function (oEvent) {
throw Error("Timeout loading " + url);
}
oReq.send(null);
}

View File

@ -7,9 +7,9 @@ import { PLATFORMS } from "../common/emu";
// http://metopal.com/projects/ballybook/doku.php
const ASTROCADE_PRESETS = [
{ id: '01-helloworlds.asm', name: 'Hello World' },
{ id: '02-telephone.asm', name: 'Telephone' },
{ id: '03-horcbpal.asm', name: 'Paddle Demo' },
{ id: '01-helloworlds.asm', name: 'Hello World (ASM)' },
{ id: '02-telephone.asm', name: 'Telephone (ASM)' },
{ id: '03-horcbpal.asm', name: 'Paddle Demo (ASM)' },
{ id: 'hello.c', name: 'Hello Graphics' },
{ id: 'lines.c', name: 'Lines' },
{ id: 'sprites.c', name: 'Sprites' },

View File

@ -276,6 +276,7 @@ var WilliamsPlatform = function(mainElement, proto) {
this.start = function() {
ram = new RAM(0xc000);
nvram = new RAM(0x400);
rom = new Uint8Array(0xc000);
// TODO: save in browser storage?
//displayPCs = new Uint16Array(new ArrayBuffer(0x9800*2));
//rom = padBytes(new lzgmini().decode(ROBOTRON_ROM).slice(0), 0xc001);
@ -291,7 +292,7 @@ var WilliamsPlatform = function(mainElement, proto) {
cpu = self.newCPU(membus, iobus);
audio = new MasterAudio();
worker = new Worker("./src/audio/z80worker.js");
worker = new Worker("./src/common/audio/z80worker.js");
workerchannel = new WorkerSoundChannel(worker);
audio.master.addChannel(workerchannel);

View File

@ -1110,7 +1110,7 @@ function compileCC65(step:BuildStep) {
];
if (params.define) params.define.forEach((x) => args.push('-D'+x));
args.push(step.path);
console.log(args);
//console.log(args);
execMain(step, CC65, args);
if (errors.length)
return {errors:errors};

View File

@ -74,12 +74,14 @@ function testPlatform(exports, platform_id, platform_name, numPresets) {
///
/*
testPlatform(this, 'vcs', 'Atari 2600', 35);
testPlatform(this, 'nes', 'NES', 30);
testPlatform(this, 'vicdual', 'VIC Dual', 7);
testPlatform(this, 'mw8080bw', 'Midway 8080', 3);
testPlatform(this, 'galaxian-scramble', 'Galaxian/Scramble', 3);
testPlatform(this, 'vector-z80color', 'Atari Color Vector (Z80)', 3);
*/
testPlatform(this, 'williams-z80', 'Williams (Z80)', 3);
// TODO testPlatform(this, 'sound_williams-z80', 'Williams Sound (Z80)', 1);
testPlatform(this, 'coleco', 'ColecoVision', 12);