mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-12-22 12:30:01 +00:00
split up z80 opcodes into fns for Firefox
This commit is contained in:
parent
a237f0d279
commit
136b1ad175
8
Makefile
8
Makefile
@ -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
12
src/cpu/buildz80.js
Normal 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 + '');
|
||||
|
@ -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
4855
src/cpu/z80fast.js
4855
src/cpu/z80fast.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user