1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-21 21:29:17 +00:00

split up z80 opcodes into fns for Firefox

This commit is contained in:
Steven Hugg 2017-05-11 08:23:17 -04:00
parent a237f0d279
commit 136b1ad175
5 changed files with 3258 additions and 1624 deletions

View File

@ -1,4 +1,12 @@
all: src/cpu/z80fast.js
src/cpu/z80.js: src/cpu/z80.coffee
coffee -c $<
src/cpu/z80fast.js: src/cpu/buildz80.js src/cpu/z80.js
node $< > $@
check:
closure-compiler src/*.js src/cpu/*.js src/platform/*.js > /dev/null

12
src/cpu/buildz80.js Normal file
View File

@ -0,0 +1,12 @@
"use strict";
global.window = global;
require('./z80.js');
var _global = window;
_global.buildZ80({
applyContention: false
});
console.log('var Z80_fast = ' + _global.Z80 + '');

View File

@ -1248,9 +1248,10 @@ window.buildZ80 = (opts) ->
"if (regPairs[#{rpPC}] == #{(address + 1) & 0xffff} && !(#{action})) break;" for [address, action] in relevantTraps
)
clauses.push """
case #{i}:
case #{i}: { var fn#{i} = function() {
#{trapCode.join("\n")}
#{runString}
}; fn#{i}(); }
break;
"""
"""

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff