mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-01-11 08:30:02 +00:00
minor changes
This commit is contained in:
parent
d575cda583
commit
13a48c34c6
@ -19,7 +19,7 @@ TODO:
|
|||||||
- breakpoints
|
- breakpoints
|
||||||
- debug inspector
|
- debug inspector
|
||||||
- MAME single step (?)
|
- MAME single step (?)
|
||||||
- step over
|
- step over (line, instruction)
|
||||||
- slowdown beam for all platforms?
|
- slowdown beam for all platforms?
|
||||||
- PC x86 support
|
- PC x86 support
|
||||||
- show errors in list (maybe window list?)
|
- show errors in list (maybe window list?)
|
||||||
@ -76,14 +76,15 @@ TODO:
|
|||||||
- workermain: split build functions, better msg types
|
- workermain: split build functions, better msg types
|
||||||
- vcs: INPTx needs to be added to control state
|
- vcs: INPTx needs to be added to control state
|
||||||
- rename, delete, save as
|
- rename, delete, save as
|
||||||
- sdcc: can't link asm files before c files
|
- sdcc: can't link asm files before c files (e.g. acheader.s must be last)
|
||||||
- what if >1 file with same name? (local/nonlocal/directory)
|
- what if >1 file with same name? (local/nonlocal/directory)
|
||||||
- what if .c and .s names collide?
|
- what if .c and .s names collide?
|
||||||
- live coding URL
|
- live coding URL
|
||||||
- memory viewer: ROM/RAM/VRAM/etc
|
- memory viewer: ROM/RAM/VRAM/etc
|
||||||
- resize memory browser when split resize
|
- resize memory browser when split resize (any div resize)
|
||||||
- preroll the emulator so optimizer does its thing before loading rom
|
- preroll the emulator so optimizer does its thing before loading rom
|
||||||
- wasm dynamic linking of emulators (https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md)
|
- wasm dynamic linking of emulators (https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md)
|
||||||
|
- z80 HALT works?
|
||||||
|
|
||||||
|
|
||||||
WEB WORKER FORMAT
|
WEB WORKER FORMAT
|
||||||
|
File diff suppressed because one or more lines are too long
@ -228,13 +228,14 @@ export class AnimationTimer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
scheduleFrame(msec:number) {
|
scheduleFrame(msec:number) {
|
||||||
|
var fn = () => { this.nextFrame(); }
|
||||||
if (this.useReqAnimFrame)
|
if (this.useReqAnimFrame)
|
||||||
window.requestAnimationFrame(this.nextFrame.bind(this));
|
window.requestAnimationFrame(fn);
|
||||||
else
|
else
|
||||||
setTimeout(this.nextFrame.bind(this), msec);
|
setTimeout(fn, msec);
|
||||||
}
|
}
|
||||||
|
|
||||||
nextFrame(ts:number) {
|
nextFrame(ts?:number) {
|
||||||
if (!ts) ts = Date.now();
|
if (!ts) ts = Date.now();
|
||||||
if (ts - this.lastts < this.intervalMsec*10) {
|
if (ts - this.lastts < this.intervalMsec*10) {
|
||||||
this.lastts += this.intervalMsec;
|
this.lastts += this.intervalMsec;
|
||||||
|
@ -70,6 +70,10 @@ export var Assembler = function(spec : AssemblerSpec) {
|
|||||||
|
|
||||||
function rule2regex(rule : AssemblerRule, vars : AssemblerVarList) {
|
function rule2regex(rule : AssemblerRule, vars : AssemblerVarList) {
|
||||||
var s = rule.fmt;
|
var s = rule.fmt;
|
||||||
|
if (!s || !(typeof s === 'string'))
|
||||||
|
throw Error('Each rule must have a "fmt" string field');
|
||||||
|
if (!rule.bits || !(rule.bits instanceof Array))
|
||||||
|
throw Error('Each rule must have a "bits" array field');
|
||||||
var varlist = [];
|
var varlist = [];
|
||||||
rule.prefix = s.split(/\s+/)[0];
|
rule.prefix = s.split(/\s+/)[0];
|
||||||
s = s.replace(/\+/g, '\\+');
|
s = s.replace(/\+/g, '\\+');
|
||||||
@ -84,13 +88,17 @@ export var Assembler = function(spec : AssemblerSpec) {
|
|||||||
var v = vars[varname];
|
var v = vars[varname];
|
||||||
varlist.push(varname);
|
varlist.push(varname);
|
||||||
if (!v)
|
if (!v)
|
||||||
throw Error("Could not find rule for ~" + varname);
|
throw Error('Could not find variable definition for "~' + varname + '"');
|
||||||
else if (v.toks)
|
else if (v.toks)
|
||||||
return '(\\w+)';
|
return '(\\w+)';
|
||||||
else
|
else
|
||||||
return '([0-9]+|[$][0-9a-f]+|\\w+)';
|
return '([0-9]+|[$][0-9a-f]+|\\w+)';
|
||||||
});
|
});
|
||||||
rule.re = new RegExp('^'+s+'$', 'i');
|
try {
|
||||||
|
rule.re = new RegExp('^'+s+'$', 'i');
|
||||||
|
} catch (e) {
|
||||||
|
throw Error("Bad regex for rule \"" + rule.fmt + "\": /" + s + "/ -- " + e);
|
||||||
|
}
|
||||||
rule.varlist = varlist;
|
rule.varlist = varlist;
|
||||||
// TODO: check rule constraints
|
// TODO: check rule constraints
|
||||||
return rule;
|
return rule;
|
||||||
|
@ -1775,7 +1775,7 @@ function executeBuildSteps() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMessage(data) {
|
function handleMessage(data : WorkerMessage) : WorkerResult {
|
||||||
// preload file system
|
// preload file system
|
||||||
if (data.preload) {
|
if (data.preload) {
|
||||||
var fs = TOOL_PRELOADFS[data.preload];
|
var fs = TOOL_PRELOADFS[data.preload];
|
||||||
|
@ -60,7 +60,10 @@ export interface WorkerBuildStep {
|
|||||||
mainfile?:boolean
|
mainfile?:boolean
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface WorkerMessage {
|
export interface WorkerMessage extends WorkerBuildStep {
|
||||||
|
preload:string,
|
||||||
|
reset:boolean,
|
||||||
|
code:string,
|
||||||
updates:WorkerFileUpdate[],
|
updates:WorkerFileUpdate[],
|
||||||
buildsteps:WorkerBuildStep[]
|
buildsteps:WorkerBuildStep[]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user