diff --git a/min/jssms.concat.js b/min/jssms.concat.js index 636d378..0fa659d 100644 --- a/min/jssms.concat.js +++ b/min/jssms.concat.js @@ -43,19 +43,19 @@ var CLOCK_NTSC = 3579545; var CLOCK_PAL = 3546893; function JSSMS(opts) { this.opts = {"ui":JSSMS.DummyUI, "swfPath":"lib/"}; - if(opts != undefined) { + if (opts !== undefined) { var key; - for(key in this.opts) { - if(opts[key] != undefined) { - this.opts[key] = opts[key] + for (key in this.opts) { + if (opts[key] !== undefined) { + this.opts[key] = opts[key]; } } } - if(opts.DEBUG != undefined) { - DEBUG = opts.DEBUG + if (opts["DEBUG"] !== undefined) { + DEBUG = opts["DEBUG"]; } - if(opts.ENABLE_COMPILER != undefined) { - ENABLE_COMPILER = opts.ENABLE_COMPILER + if (opts["ENABLE_COMPILER"] !== undefined) { + ENABLE_COMPILER = opts["ENABLE_COMPILER"]; } this.keyboard = new JSSMS.Keyboard(this); this.ui = new this.opts["ui"](this); @@ -64,7 +64,7 @@ function JSSMS(opts) { this.ports = new JSSMS.Ports(this); this.cpu = new JSSMS.Z80(this); this.ui.updateStatus("Ready to load a ROM."); - this["ui"] = this.ui + this["ui"] = this.ui; } JSSMS.prototype = {isRunning:false, cyclesPerLine:0, no_of_scanlines:0, frameSkip:0, throttle:true, fps:0, frameskip_counter:0, pause_button:false, is_sms:true, is_gg:false, soundEnabled:false, audioBuffer:[], audioBufferOffset:0, samplesPerFrame:0, samplesPerLine:[], emuWidth:0, emuHeight:0, fpsFrameCount:0, z80Time:0, drawTime:0, z80TimeCounter:0, drawTimeCounter:0, frameCount:0, romData:"", romFileName:"", lineno:0, reset:function() { this.setVideoTiming(this.vdp.videoMode); @@ -75,315 +75,315 @@ JSSMS.prototype = {isRunning:false, cyclesPerLine:0, no_of_scanlines:0, frameSki this.vdp.reset(); this.ports.reset(); this.cpu.reset(); - if(ENABLE_DEBUGGER) { - this.cpu.resetDebug() + if (ENABLE_DEBUGGER) { + this.cpu.resetDebug(); } - if(DEBUG) { - clearInterval(this.fpsInterval) + if (DEBUG) { + clearInterval(this.fpsInterval); } }, start:function() { var self = this; - if(!this.isRunning) { + if (!this.isRunning) { this.isRunning = true; this.ui.requestAnimationFrame(this.frame.bind(this), this.ui.screen); - if(DEBUG) { + if (DEBUG) { this.resetFps(); this.fpsInterval = setInterval(function() { - self.printFps() - }, fpsInterval) + self.printFps(); + }, fpsInterval); } } - this.ui.updateStatus("Running") + this.ui.updateStatus("Running"); }, stop:function() { - if(DEBUG) { - clearInterval(this.fpsInterval) + if (DEBUG) { + clearInterval(this.fpsInterval); } - this.isRunning = false + this.isRunning = false; }, frame:function() { - if(this.isRunning) { + if (this.isRunning) { this.cpu.frame(); this.fpsFrameCount++; - this.ui.requestAnimationFrame(this.frame.bind(this), this.ui.screen) + this.ui.requestAnimationFrame(this.frame.bind(this), this.ui.screen); } }, nextStep:function() { - this.cpu.frame() + this.cpu.frame(); }, setSMS:function() { this.is_sms = true; this.is_gg = false; this.vdp.h_start = 0; this.vdp.h_end = 32; this.emuWidth = SMS_WIDTH; - this.emuHeight = SMS_HEIGHT + this.emuHeight = SMS_HEIGHT; }, setGG:function() { this.is_gg = true; this.is_sms = false; this.vdp.h_start = 5; this.vdp.h_end = 27; this.emuWidth = GG_WIDTH; - this.emuHeight = GG_HEIGHT + this.emuHeight = GG_HEIGHT; }, setVideoTiming:function(mode) { var clockSpeedHz = 0, i, v; - if(mode == NTSC || this.is_gg) { + if (mode == NTSC || this.is_gg) { this.fps = 60; this.no_of_scanlines = SMS_Y_PIXELS_NTSC; - clockSpeedHz = CLOCK_NTSC - }else { + clockSpeedHz = CLOCK_NTSC; + } else { this.fps = 50; this.no_of_scanlines = SMS_Y_PIXELS_PAL; - clockSpeedHz = CLOCK_PAL + clockSpeedHz = CLOCK_PAL; } this.cyclesPerLine = Math.round(clockSpeedHz / this.fps / this.no_of_scanlines + 1); this.vdp.videoMode = mode; - if(this.soundEnabled) { + if (this.soundEnabled) { this.psg.init(clockSpeedHz, SAMPLE_RATE); this.samplesPerFrame = Math.round(SAMPLE_RATE / this.fps); - if(this.audioBuffer.length == 0 || this.audioBuffer.length != this.samplesPerFrame) { - this.audioBuffer = new Array(this.samplesPerFrame) + if (this.audioBuffer.length === 0 || this.audioBuffer.length != this.samplesPerFrame) { + this.audioBuffer = new Array(this.samplesPerFrame); } - if(this.samplesPerLine.length == 0 || this.samplesPerLine.length != this.no_of_scanlines) { + if (this.samplesPerLine.length === 0 || this.samplesPerLine.length != this.no_of_scanlines) { this.samplesPerLine = new Array(this.no_of_scanlines); var fractional = 0; - for(i = 0;i < this.no_of_scanlines;i++) { + for (i = 0;i < this.no_of_scanlines;i++) { v = (this.samplesPerFrame << 16) / this.no_of_scanlines + fractional; fractional = v - (v >> 16 << 16); - this.samplesPerLine[i] = v >> 16 + this.samplesPerLine[i] = v >> 16; } } } }, audioOutput:function(buffer) { - this.ui.writeAudio(buffer) + this.ui.writeAudio(buffer); }, doRepaint:function() { - this.ui.writeFrame() + this.ui.writeFrame(); }, printFps:function() { var now = JSSMS.Utils.getTimestamp(); var s = "Running: " + (this.fpsFrameCount / ((now - this.lastFpsTime) / 1E3)).toFixed(2) + " FPS"; this.ui.updateStatus(s); this.fpsFrameCount = 0; - this.lastFpsTime = now + this.lastFpsTime = now; }, resetFps:function() { this.lastFpsTime = JSSMS.Utils.getTimestamp(); - this.fpsFrameCount = 0 + this.fpsFrameCount = 0; }, updateSound:function(line) { - if(line == 0) { - this.audioBufferOffset = 0 + if (line === 0) { + this.audioBufferOffset = 0; } var samplesToGenerate = this.samplesPerLine[line]; this.audioBuffer = this.psg.update(this.audioBufferOffset, samplesToGenerate); - this.audioBufferOffset += samplesToGenerate + this.audioBufferOffset += samplesToGenerate; }, readRomDirectly:function(data, fileName) { var pages; var mode = fileName.substr(-3).toLowerCase() == ".gg" ? 2 : 1; var size = data.length; - if(mode == 1) { - this.setSMS() - }else { - if(mode == 2) { - this.setGG() + if (mode == 1) { + this.setSMS(); + } else { + if (mode == 2) { + this.setGG(); } } - if(size <= PAGE_SIZE) { - return false + if (size <= PAGE_SIZE) { + return false; } pages = this.loadROM(data, size); - if(pages == null) { - return false + if (pages === null) { + return false; } this.cpu.resetMemory(pages); this.romData = data; this.romFileName = fileName; - return true + return true; }, loadROM:function(data, size) { - if(size % 1024 != 0) { + if (size % 1024 !== 0) { data = data.substr(512); - size -= 512 + size -= 512; } var i, j; var number_of_pages = Math.round(size / PAGE_SIZE); var pages = new Array(number_of_pages); - for(i = 0;i < number_of_pages;i++) { + for (i = 0;i < number_of_pages;i++) { pages[i] = JSSMS.Utils.Array(PAGE_SIZE); - if(SUPPORT_DATAVIEW) { - for(j = 0;j < PAGE_SIZE;j++) { - pages[i].setUint8(j, data.charCodeAt(i * PAGE_SIZE + j)) + if (SUPPORT_DATAVIEW) { + for (j = 0;j < PAGE_SIZE;j++) { + pages[i].setUint8(j, data.charCodeAt(i * PAGE_SIZE + j)); } - }else { - for(j = 0;j < PAGE_SIZE;j++) { - pages[i][j] = data.charCodeAt(i * PAGE_SIZE + j) & 255 + } else { + for (j = 0;j < PAGE_SIZE;j++) { + pages[i][j] = data.charCodeAt(i * PAGE_SIZE + j) & 255; } } } - return pages + return pages; }, reloadRom:function() { - if(this.romData != "" && this.romFileName != "") { - return this.readRomDirectly(this.romData, this.romFileName) - }else { - return false + if (this.romData !== "" && this.romFileName !== "") { + return this.readRomDirectly(this.romData, this.romFileName); + } else { + return false; } }}; (function() { - if(!("console" in window)) { + if (!("console" in window)) { window.console = {log:function() { }, error:function() { - }} - }else { - if(!("bind" in window.console.log)) { + }}; + } else { + if (!("bind" in window.console.log)) { window.console.log = function(fn) { return function(msg) { - return fn(msg) - } + return fn(msg); + }; }(window.console.log); window.console.error = function(fn) { return function(msg) { - return fn(msg) - } - }(window.console.error) + return fn(msg); + }; + }(window.console.error); } } })(); JSSMS.Utils = {rndInt:function(range) { - return Math.round(Math.random() * range) + return Math.round(Math.random() * range); }, Uint8Array:function() { - if(SUPPORT_TYPED_ARRAYS) { - return Uint8Array - }else { - return Array + if (SUPPORT_TYPED_ARRAYS) { + return Uint8Array; + } else { + return Array; } }(), Array:function() { - if(SUPPORT_DATAVIEW) { + if (SUPPORT_DATAVIEW) { return function(length) { - return new DataView(new ArrayBuffer(length)) - } - }else { - return Array + return new DataView(new ArrayBuffer(length)); + }; + } else { + return Array; } }(), copyArrayElements:function() { - if(SUPPORT_DATAVIEW) { + if (SUPPORT_DATAVIEW) { return function(src, srcPos, dest, destPos, length) { - while(length--) { - dest.setInt8(destPos + length, src.getInt8(srcPos + length)) + while (length--) { + dest.setInt8(destPos + length, src.getInt8(srcPos + length)); } - } - }else { + }; + } else { return function(src, srcPos, dest, destPos, length) { - while(length--) { - dest[destPos + length] = src[srcPos + length] + while (length--) { + dest[destPos + length] = src[srcPos + length]; } - } + }; } }(), console:{log:function() { - if(DEBUG) { - return window.console.log.bind(window.console) + if (DEBUG) { + return window.console.log.bind(window.console); } return function(var_args) { - } + }; }(), error:function() { - if(DEBUG) { - return window.console.error.bind(window.console) + if (DEBUG) { + return window.console.error.bind(window.console); } return function(var_args) { - } + }; }(), time:function() { - if(DEBUG && window.console.time) { - return window.console.time.bind(window.console) + if (DEBUG && window.console.time) { + return window.console.time.bind(window.console); } return function(label) { - } + }; }(), timeEnd:function() { - if(DEBUG && window.console.timeEnd) { - return window.console.timeEnd.bind(window.console) + if (DEBUG && window.console.timeEnd) { + return window.console.timeEnd.bind(window.console); } return function(label) { - } + }; }()}, traverse:function(object, fn) { var key, child; fn.call(null, object); - for(key in object) { - if(object.hasOwnProperty(key)) { + for (key in object) { + if (object.hasOwnProperty(key)) { child = object[key]; - if(Object(child) === child) { - object[key] = JSSMS.Utils.traverse(child, fn) + if (Object(child) === child) { + object[key] = JSSMS.Utils.traverse(child, fn); } } } - return object + return object; }, getTimestamp:function() { - if(window.performance && window.performance.now) { - return window.performance.now.bind(window.performance) - }else { + if (window.performance && window.performance.now) { + return window.performance.now.bind(window.performance); + } else { return function() { - return(new Date).getTime() - } + return(new Date).getTime(); + }; } }(), toHex:function(dec) { var hex = dec.toString(16).toUpperCase(); - if(hex.length % 2) { - hex = "0" + hex + if (hex.length % 2) { + hex = "0" + hex; } - return"0x" + hex + return "0x" + hex; }, getPrefix:function(arr, obj) { var prefix = false; - if(obj == undefined) { - obj = document + if (obj === undefined) { + obj = document; } arr.some(function(prop) { - if(prop in obj) { + if (prop in obj) { prefix = prop; - return true + return true; } - return false + return false; }); - return prefix + return prefix; }, isIE:function() { - return/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) + return/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent); }}; function BinaryRequest(method, url, args, data, cb) { method = method || "GET"; var alwaysCallbacks = []; - if(args) { + if (args) { var arg_str = []; var i; - for(i in args) { - var arg = escape(i); - if(args[i] != undefined) { - arg += "=" + escape(args[i]) + for (i in args) { + var arg = encodeURI(i); + if (args[i] !== undefined) { + arg += "=" + encodeURI(args[i]); } - arg_str.push(arg) + arg_str.push(arg); } - url += "?" + arg_str.join("&") + url += "?" + arg_str.join("&"); } function invokeAlways() { var i; - for(i = 0;i < alwaysCallbacks.length;++i) { - alwaysCallbacks[i]() + for (i = 0;i < alwaysCallbacks.length;++i) { + alwaysCallbacks[i](); } } var xhr = new XMLHttpRequest; xhr.open(method, url, true); try { - xhr.responseType = "arraybuffer" - }catch(e) { - console.error("responseType arrayBuffer not supported!") + xhr.responseType = "arraybuffer"; + } catch (e) { + console.error("responseType arrayBuffer not supported!"); } xhr.onreadystatechange = function onreadystatechange() { - if(xhr.readyState == 4) { - invokeAlways() + if (xhr.readyState == 4) { + invokeAlways(); } }; xhr.onload = function onload() { - if(this.response instanceof ArrayBuffer) { - cb(this.response) - }else { - console.error("Bad response type: " + typeof this.response + " for " + JSON.stringify(this.response)) + if (this.response instanceof ArrayBuffer) { + cb(this.response); + } else { + console.error("Bad response type: " + typeof this.response + " for " + JSON.stringify(this.response)); } }; xhr.send(data); this.always = function(cb) { - if(xhr.readyState == 4) { - cb() + if (xhr.readyState == 4) { + cb(); } alwaysCallbacks.push(cb); - return this - } + return this; + }; } function SyncWriter() { this.kBufferLength = 1024 * 1024 / 2; @@ -391,51 +391,51 @@ function SyncWriter() { this.syncBufferIdx = 0; this.fileOffset = 0; this.curRequest = null; - this.buffers = [] + this.buffers = []; } SyncWriter.prototype = {flushBuffer:function() { - if(this.syncBufferIdx >= this.syncBuffer.length) { + if (this.syncBufferIdx >= this.syncBuffer.length) { this.buffers.push(this.syncBuffer); this.syncBuffer = new Uint16Array(this.kBufferLength); - this.syncBufferIdx = 0 + this.syncBufferIdx = 0; } }, tick:function() { - if(!this.curRequest && this.syncBufferIdx > 0) { + if (!this.curRequest && this.syncBufferIdx > 0) { var b = new Uint16Array(this.syncBufferIdx); - for(var i = 0;i < this.syncBufferIdx;++i) { - b[i] = this.syncBuffer[i] + for (var i = 0;i < this.syncBufferIdx;++i) { + b[i] = this.syncBuffer[i]; } this.buffers.push(b); this.syncBuffer = new Uint16Array(this.kBufferLength); - this.syncBufferIdx = 0 + this.syncBufferIdx = 0; } - if(!this.curRequest && this.buffers.length > 0) { + if (!this.curRequest && this.buffers.length > 0) { var self = this; var buffer = this.buffers[0]; this.buffers.splice(0, 1); var bytes = buffer.length * 2; this.curRequest = (new BinaryRequest("POST", "/wsynclog", {o:this.fileOffset, l:bytes}, buffer, function() { - self.fileOffset += bytes + self.fileOffset += bytes; })).always(function() { - self.curRequest = null - }) + self.curRequest = null; + }); } - return this.buffers.length == 0 + return this.buffers.length === 0; }, getAvailableBytes:function() { - return 1E9 + return 1E9; }, sync16:function(val, name) { - if(this.syncBufferIdx >= this.syncBuffer.length) { - this.flushBuffer() + if (this.syncBufferIdx >= this.syncBuffer.length) { + this.flushBuffer(); } this.syncBuffer[this.syncBufferIdx] = val; - this.syncBufferIdx++ + this.syncBufferIdx++; }, reflect16:function(val) { - if(this.syncBufferIdx >= this.syncBuffer.length) { - this.flushBuffer() + if (this.syncBufferIdx >= this.syncBuffer.length) { + this.flushBuffer(); } this.syncBuffer[this.syncBufferIdx] = val; this.syncBufferIdx++; - return val + return val; }}; function SyncReader() { this.kBufferLength = 1024 * 1024; @@ -444,67 +444,67 @@ function SyncReader() { this.fileOffset = 0; this.curRequest = null; this.oos = false; - this.nextBuffer = null + this.nextBuffer = null; } SyncReader.prototype = {refill:function() { - if(!this.syncBuffer || this.syncBufferIdx >= this.syncBuffer.length) { + if (!this.syncBuffer || this.syncBufferIdx >= this.syncBuffer.length) { this.syncBuffer = this.nextBuffer; this.syncBufferIdx = 0; - this.nextBuffer = null + this.nextBuffer = null; } }, tick:function() { this.refill(); - if(!this.nextBuffer && !this.curRequest) { + if (!this.nextBuffer && !this.curRequest) { var self = this; this.curRequest = (new BinaryRequest("GET", "/rsynclog", {o:this.fileOffset, l:this.kBufferLength}, undefined, function(result) { self.nextBuffer = new Uint16Array(result); - self.fileOffset += result.byteLength + self.fileOffset += result.byteLength; })).always(function() { - self.curRequest = null + self.curRequest = null; }); - return false + return false; } - return true + return true; }, getAvailableBytes:function() { var ops = 0; - if(this.syncBuffer) { - ops += this.syncBuffer.length - this.syncBufferIdx + if (this.syncBuffer) { + ops += this.syncBuffer.length - this.syncBufferIdx; } - if(this.nextBuffer) { - ops += this.nextBuffer.length + if (this.nextBuffer) { + ops += this.nextBuffer.length; } - return ops * 2 + return ops * 2; }, pop:function() { - if(!this.syncBuffer || this.syncBufferIdx >= this.syncBuffer.length) { - this.refill() + if (!this.syncBuffer || this.syncBufferIdx >= this.syncBuffer.length) { + this.refill(); } - if(this.syncBuffer && this.syncBufferIdx < this.syncBuffer.length) { + if (this.syncBuffer && this.syncBufferIdx < this.syncBuffer.length) { var r = this.syncBuffer[this.syncBufferIdx]; this.syncBufferIdx++; - return r + return r; } - return-1 + return-1; }, sync16:function(val, name) { - if(this.oos) { - return false + if (this.oos) { + return false; } var toHex = JSSMS.Utils.toHex; var writtenVal = this.pop(); - if(val == writtenVal) { - console.log(name, toHex(val), toHex(writtenVal)) - }else { + if (val == writtenVal) { + console.log(name, toHex(val), toHex(writtenVal)); + } else { console.log("%c" + name, "color: red;", toHex(val), toHex(writtenVal)); - if(name == "pc") { + if (name == "pc") { debugger; - return false + return false; } } - return true + return true; }, reflect16:function(val) { - if(this.oos) { - return val + if (this.oos) { + return val; } - return this.pop() + return this.pop(); }}; var HALT_SPEEDUP = true; var F_CARRY = 1; @@ -591,24 +591,24 @@ JSSMS.Z80 = function(sms) { this.generateFlagTables(); this.generateDAATable(); this.generateMemory(); - if(ENABLE_DEBUGGER) { - for(var method in JSSMS.Debugger.prototype) { - this[method] = JSSMS.Debugger.prototype[method] + if (ENABLE_DEBUGGER) { + for (var method in JSSMS.Debugger.prototype) { + this[method] = JSSMS.Debugger.prototype[method]; } } - if(ENABLE_COMPILER) { - this.recompiler = new Recompiler(this) + if (ENABLE_COMPILER) { + this.recompiler = new Recompiler(this); } - if(ENABLE_SERVER_LOGGER) { - if(SYNC_MODE == WRITE_MODE) { - this.syncServer = new SyncWriter - }else { - this.syncServer = new SyncReader + if (ENABLE_SERVER_LOGGER) { + if (SYNC_MODE == WRITE_MODE) { + this.syncServer = new SyncWriter; + } else { + this.syncServer = new SyncReader; } this.syncServer.tick(); this.sync = function() { - this.syncServer.sync16(this.pc, "pc") - } + this.syncServer.sync16(this.pc, "pc"); + }; } }; JSSMS.Z80.prototype = {reset:function() { @@ -632,111 +632,110 @@ JSSMS.Z80.prototype = {reset:function() { this.EI_inst = false; this.interruptVector = 0; this.halt = false; - if(ENABLE_COMPILER) { - this.recompiler.reset() + if (ENABLE_COMPILER) { + this.recompiler.reset(); } }, frame:function() { this.lineno = 0; this.tstates += this.main.cyclesPerLine; this.totalCycles = this.main.cyclesPerLine; - if(ACCURATE_INTERRUPT_EMULATION) { - if(this.interruptLine) { - this.interrupt() + if (ACCURATE_INTERRUPT_EMULATION) { + if (this.interruptLine) { + this.interrupt(); } } - while(true) { - if(ENABLE_DEBUGGER) { - this.main.ui.updateDisassembly(this.pc) + while (true) { + if (ENABLE_DEBUGGER) { + this.main.ui.updateDisassembly(this.pc); } - if(ENABLE_COMPILER) { - this.recompile() - }else { - if(ENABLE_SERVER_LOGGER) { - this.sync() + if (ENABLE_COMPILER) { + this.recompile(); + } else { + if (ENABLE_SERVER_LOGGER) { + this.sync(); } - this.interpret() + this.interpret(); } - if(this.tstates <= 0) { - if(this.eol()) { - break + if (this.tstates <= 0) { + if (this.eol()) { + break; } } } - if(ENABLE_SERVER_LOGGER) { - this.syncServer.tick() + if (ENABLE_SERVER_LOGGER) { + this.syncServer.tick(); } }, recompile:function() { - if(this.pc < 1024) { - if(!this.branches[0][this.pc]) { - this.recompiler.recompileFromAddress(this.pc, 0, 0) + if (this.pc < 1024) { + if (!this.branches[0][this.pc]) { + this.recompiler.recompileFromAddress(this.pc, 0, 0); } this.branches[0][this.pc].call(this, 0); - return - }else { - if(this.pc < 16384) { - if(!this.branches[this.frameReg[0]][this.pc]) { - this.recompiler.recompileFromAddress(this.pc, this.frameReg[0], 0) + return; + } else { + if (this.pc < 16384) { + if (!this.branches[this.frameReg[0]][this.pc]) { + this.recompiler.recompileFromAddress(this.pc, this.frameReg[0], 0); } this.branches[this.frameReg[0]][this.pc].call(this, 0); - return - }else { - if(this.pc < 32768) { - if(!this.branches[this.frameReg[1]][this.pc - 16384]) { - this.recompiler.recompileFromAddress(this.pc, this.frameReg[1], 1) + return; + } else { + if (this.pc < 32768) { + if (!this.branches[this.frameReg[1]][this.pc - 16384]) { + this.recompiler.recompileFromAddress(this.pc, this.frameReg[1], 1); } this.branches[this.frameReg[1]][this.pc - 16384].call(this, 1); - return - }else { - if(this.pc < 49152) { - if(!this.branches[this.frameReg[2]][this.pc - 32768]) { - this.recompiler.recompileFromAddress(this.pc, this.frameReg[2], 2) + return; + } else { + if (this.pc < 49152) { + if (!this.branches[this.frameReg[2]][this.pc - 32768]) { + this.recompiler.recompileFromAddress(this.pc, this.frameReg[2], 2); } this.branches[this.frameReg[2]][this.pc - 32768].call(this, 2); - return + return; } } } } - this.interpret() + this.interpret(); }, eol:function() { - if(this.main.soundEnabled) { - this.main.updateSound(this.lineno) + if (this.main.soundEnabled) { + this.main.updateSound(this.lineno); } this.vdp.line = this.lineno; - if(this.lineno < 192) { - this.vdp.drawLine(this.lineno) + if (this.lineno < 192) { + this.vdp.drawLine(this.lineno); } this.vdp.interrupts(this.lineno); - if(this.interruptLine) { - this.interrupt() + if (this.interruptLine) { + this.interrupt(); } this.lineno++; - if(this.lineno >= this.main.no_of_scanlines) { + if (this.lineno >= this.main.no_of_scanlines) { this.eof(); - return true + return true; } this.tstates += this.main.cyclesPerLine; this.totalCycles = this.main.cyclesPerLine; - return false + return false; }, eof:function() { - if(this.main.soundEnabled) { - this.main.audioOutput(this.main.audioBuffer) + if (this.main.soundEnabled) { + this.main.audioOutput(this.main.audioBuffer); } - if(this.main.pause_button) { + if (this.main.pause_button) { this.nmi(); - this.main.pause_button = false + this.main.pause_button = false; } - this.main.doRepaint() + this.main.doRepaint(); }, branches:[Object.create(null), Object.create(null), Object.create(null)], interpret:function() { - var location = 0; var temp = 0; var opcode = this.readMem(this.pc++); - if(ACCURATE_INTERRUPT_EMULATION) { - this.EI_inst = false + if (ACCURATE_INTERRUPT_EMULATION) { + this.EI_inst = false; } this.tstates -= OP_STATES[opcode]; - if(REFRESH_EMULATION) { - this.incR() + if (REFRESH_EMULATION) { + this.incR(); } switch(opcode) { case 0: @@ -789,7 +788,7 @@ JSSMS.Z80.prototype = {reset:function() { break; case 16: this.b = this.b - 1 & 255; - this.jr(this.b != 0); + this.jr(this.b !== 0); break; case 17: this.setDE(this.readMemWord(this.pc++)); @@ -838,7 +837,7 @@ JSSMS.Z80.prototype = {reset:function() { this.rra_a(); break; case 32: - this.jr(!((this.f & F_ZERO) != 0)); + this.jr(!((this.f & F_ZERO) !== 0)); break; case 33: this.setHL(this.readMemWord(this.pc++)); @@ -864,7 +863,7 @@ JSSMS.Z80.prototype = {reset:function() { this.daa(); break; case 40: - this.jr((this.f & F_ZERO) != 0); + this.jr((this.f & F_ZERO) !== 0); break; case 41: this.setHL(this.add16(this.getHL(), this.getHL())); @@ -889,7 +888,7 @@ JSSMS.Z80.prototype = {reset:function() { this.cpl_a(); break; case 48: - this.jr(!((this.f & F_CARRY) != 0)); + this.jr(!((this.f & F_CARRY) !== 0)); break; case 49: this.sp = this.readMemWord(this.pc++); @@ -917,7 +916,7 @@ JSSMS.Z80.prototype = {reset:function() { this.f &= ~F_HALFCARRY; break; case 56: - this.jr((this.f & F_CARRY) != 0); + this.jr((this.f & F_CARRY) !== 0); break; case 57: this.setHL(this.add16(this.getHL(), this.sp)); @@ -1098,8 +1097,8 @@ JSSMS.Z80.prototype = {reset:function() { this.writeMem(this.getHL(), this.l); break; case 118: - if(HALT_SPEEDUP) { - this.tstates = 0 + if (HALT_SPEEDUP) { + this.tstates = 0; } this.halt = true; this.pc--; @@ -1323,20 +1322,20 @@ JSSMS.Z80.prototype = {reset:function() { this.cp_a(this.a); break; case 192: - this.ret((this.f & F_ZERO) == 0); + this.ret((this.f & F_ZERO) === 0); break; case 193: this.setBC(this.readMemWord(this.sp)); this.sp += 2; break; case 194: - this.jp((this.f & F_ZERO) == 0); + this.jp((this.f & F_ZERO) === 0); break; case 195: this.pc = this.readMemWord(this.pc); break; case 196: - this.call((this.f & F_ZERO) == 0); + this.call((this.f & F_ZERO) === 0); break; case 197: this.push(this.getBC()); @@ -1349,20 +1348,20 @@ JSSMS.Z80.prototype = {reset:function() { this.pc = 0; break; case 200: - this.ret((this.f & F_ZERO) != 0); + this.ret((this.f & F_ZERO) !== 0); break; case 201: this.pc = this.readMemWord(this.sp); this.sp += 2; break; case 202: - this.jp((this.f & F_ZERO) != 0); + this.jp((this.f & F_ZERO) !== 0); break; case 203: this.doCB(this.readMem(this.pc++)); break; case 204: - this.call((this.f & F_ZERO) != 0); + this.call((this.f & F_ZERO) !== 0); break; case 205: this.push(this.pc + 2); @@ -1376,20 +1375,20 @@ JSSMS.Z80.prototype = {reset:function() { this.pc = 8; break; case 208: - this.ret((this.f & F_CARRY) == 0); + this.ret((this.f & F_CARRY) === 0); break; case 209: this.setDE(this.readMemWord(this.sp)); this.sp += 2; break; case 210: - this.jp((this.f & F_CARRY) == 0); + this.jp((this.f & F_CARRY) === 0); break; case 211: this.port.out(this.readMem(this.pc++), this.a); break; case 212: - this.call((this.f & F_CARRY) == 0); + this.call((this.f & F_CARRY) === 0); break; case 213: this.push(this.getDE()); @@ -1402,7 +1401,7 @@ JSSMS.Z80.prototype = {reset:function() { this.pc = 16; break; case 216: - this.ret((this.f & F_CARRY) != 0); + this.ret((this.f & F_CARRY) !== 0); break; case 217: this.exBC(); @@ -1410,13 +1409,13 @@ JSSMS.Z80.prototype = {reset:function() { this.exHL(); break; case 218: - this.jp((this.f & F_CARRY) != 0); + this.jp((this.f & F_CARRY) !== 0); break; case 219: this.a = this.port.in_(this.readMem(this.pc++)); break; case 220: - this.call((this.f & F_CARRY) != 0); + this.call((this.f & F_CARRY) !== 0); break; case 221: this.doIndexOpIX(this.readMem(this.pc++)); @@ -1429,14 +1428,14 @@ JSSMS.Z80.prototype = {reset:function() { this.pc = 24; break; case 224: - this.ret((this.f & F_PARITY) == 0); + this.ret((this.f & F_PARITY) === 0); break; case 225: this.setHL(this.readMemWord(this.sp)); this.sp += 2; break; case 226: - this.jp((this.f & F_PARITY) == 0); + this.jp((this.f & F_PARITY) === 0); break; case 227: temp = this.getHL(); @@ -1444,7 +1443,7 @@ JSSMS.Z80.prototype = {reset:function() { this.writeMemWord(this.sp, temp); break; case 228: - this.call((this.f & F_PARITY) == 0); + this.call((this.f & F_PARITY) === 0); break; case 229: this.push(this.getHL()); @@ -1457,13 +1456,13 @@ JSSMS.Z80.prototype = {reset:function() { this.pc = 32; break; case 232: - this.ret((this.f & F_PARITY) != 0); + this.ret((this.f & F_PARITY) !== 0); break; case 233: this.pc = this.getHL(); break; case 234: - this.jp((this.f & F_PARITY) != 0); + this.jp((this.f & F_PARITY) !== 0); break; case 235: temp = this.d; @@ -1474,7 +1473,7 @@ JSSMS.Z80.prototype = {reset:function() { this.l = temp; break; case 236: - this.call((this.f & F_PARITY) != 0); + this.call((this.f & F_PARITY) !== 0); break; case 237: this.doED(this.readMem(this.pc)); @@ -1487,21 +1486,21 @@ JSSMS.Z80.prototype = {reset:function() { this.pc = 40; break; case 240: - this.ret((this.f & F_SIGN) == 0); + this.ret((this.f & F_SIGN) === 0); break; case 241: this.setAF(this.readMemWord(this.sp)); this.sp += 2; break; case 242: - this.jp((this.f & F_SIGN) == 0); + this.jp((this.f & F_SIGN) === 0); break; case 243: this.iff1 = this.iff2 = false; this.EI_inst = true; break; case 244: - this.call((this.f & F_SIGN) == 0); + this.call((this.f & F_SIGN) === 0); break; case 245: this.push(this.getAF()); @@ -1514,19 +1513,19 @@ JSSMS.Z80.prototype = {reset:function() { this.pc = 48; break; case 248: - this.ret((this.f & F_SIGN) != 0); + this.ret((this.f & F_SIGN) !== 0); break; case 249: this.sp = this.getHL(); break; case 250: - this.jp((this.f & F_SIGN) != 0); + this.jp((this.f & F_SIGN) !== 0); break; case 251: this.iff1 = this.iff2 = this.EI_inst = true; break; case 252: - this.call((this.f & F_SIGN) != 0); + this.call((this.f & F_SIGN) !== 0); break; case 253: this.doIndexOpIY(this.readMem(this.pc++)); @@ -1537,108 +1536,108 @@ JSSMS.Z80.prototype = {reset:function() { case 255: this.push(this.pc); this.pc = 56; - break + break; } }, getCycle:function() { - return this.totalCycles - this.tstates + return this.totalCycles - this.tstates; }, nmi:function() { this.iff2 = this.iff1; this.iff1 = false; - if(REFRESH_EMULATION) { - this.incR() + if (REFRESH_EMULATION) { + this.incR(); } - if(this.halt) { + if (this.halt) { this.pc++; - this.halt = false + this.halt = false; } this.push(this.pc); this.pc = 102; - this.tstates -= 11 + this.tstates -= 11; }, interrupt:function() { - if(!this.iff1 || ACCURATE_INTERRUPT_EMULATION && this.EI_inst) { - return + if (!this.iff1 || ACCURATE_INTERRUPT_EMULATION && this.EI_inst) { + return; } - if(this.halt) { + if (this.halt) { this.pc++; - this.halt = false + this.halt = false; } - if(REFRESH_EMULATION) { - this.incR() + if (REFRESH_EMULATION) { + this.incR(); } this.iff1 = this.iff2 = false; this.interruptLine = false; this.push(this.pc); - if(this.im == 0) { - this.pc = this.interruptVector == 0 || this.interruptVector == 255 ? 56 : this.interruptVector; - this.tstates -= 13 - }else { - if(this.im == 1) { + if (this.im === 0) { + this.pc = this.interruptVector === 0 || this.interruptVector === 255 ? 56 : this.interruptVector; + this.tstates -= 13; + } else { + if (this.im == 1) { this.pc = 56; - this.tstates -= 13 - }else { + this.tstates -= 13; + } else { this.pc = this.readMemWord((this.i << 8) + this.interruptVector); - this.tstates -= 19 + this.tstates -= 19; } } }, jp:function(condition) { - if(condition) { - this.pc = this.readMemWord(this.pc) - }else { - this.pc += 2 + if (condition) { + this.pc = this.readMemWord(this.pc); + } else { + this.pc += 2; } }, jr:function(condition) { - if(condition) { + if (condition) { this.pc += this.signExtend(this.d_() + 1); - this.tstates -= 5 - }else { - this.pc++ + this.tstates -= 5; + } else { + this.pc++; } }, signExtend:function(d) { - if(d >= 128) { - d = d - 256 + if (d >= 128) { + d = d - 256; } - return d + return d; }, call:function(condition) { - if(condition) { + if (condition) { this.push(this.pc + 2); this.pc = this.readMemWord(this.pc); - this.tstates -= 7 - }else { - this.pc += 2 + this.tstates -= 7; + } else { + this.pc += 2; } }, ret:function(condition) { - if(condition) { + if (condition) { this.pc = this.readMemWord(this.sp); this.sp += 2; - this.tstates -= 6 + this.tstates -= 6; } }, push:function(value) { this.sp -= 2; - this.writeMemWord(this.sp, value) + this.writeMemWord(this.sp, value); }, pushUint8:function(hi, lo) { this.sp -= 2; - this.writeMemWord(this.sp, hi << 8 | lo) + this.writeMemWord(this.sp, hi << 8 | lo); }, incMem:function(offset) { - this.writeMem(offset, this.inc8(this.readMem(offset))) + this.writeMem(offset, this.inc8(this.readMem(offset))); }, decMem:function(offset) { - this.writeMem(offset, this.dec8(this.readMem(offset))) + this.writeMem(offset, this.dec8(this.readMem(offset))); }, ccf:function() { - if((this.f & F_CARRY) != 0) { + if ((this.f & F_CARRY) !== 0) { this.f &= ~F_CARRY; - this.f |= F_HALFCARRY - }else { + this.f |= F_HALFCARRY; + } else { this.f |= F_CARRY; - this.f &= ~F_HALFCARRY + this.f &= ~F_HALFCARRY; } - this.f &= ~F_NEGATIVE + this.f &= ~F_NEGATIVE; }, daa:function() { var temp = this.DAA_TABLE[this.a | (this.f & F_CARRY) << 8 | (this.f & F_NEGATIVE) << 8 | (this.f & F_HALFCARRY) << 6]; this.a = temp & 255; - this.f = this.f & F_NEGATIVE | temp >> 8 + this.f = this.f & F_NEGATIVE | temp >> 8; }, doCB:function(opcode) { this.tstates -= OP_CB_STATES[opcode]; - if(REFRESH_EMULATION) { - this.incR() + if (REFRESH_EMULATION) { + this.incR(); } switch(opcode) { case 0: @@ -2411,56 +2410,55 @@ JSSMS.Z80.prototype = {reset:function() { break; default: JSSMS.Utils.console.log("Unimplemented CB Opcode: " + JSSMS.Utils.toHex(opcode)); - break + break; } }, rlc:function(value) { var carry = (value & 128) >> 7; value = (value << 1 | value >> 7) & 255; this.f = carry | this.SZP_TABLE[value]; - return value + return value; }, rrc:function(value) { var carry = value & 1; value = (value >> 1 | value << 7) & 255; this.f = carry | this.SZP_TABLE[value]; - return value + return value; }, rl:function(value) { var carry = (value & 128) >> 7; value = (value << 1 | this.f & F_CARRY) & 255; this.f = carry | this.SZP_TABLE[value]; - return value + return value; }, rr:function(value) { var carry = value & 1; value = (value >> 1 | this.f << 7) & 255; this.f = carry | this.SZP_TABLE[value]; - return value + return value; }, sla:function(value) { var carry = (value & 128) >> 7; value = value << 1 & 255; this.f = carry | this.SZP_TABLE[value]; - return value + return value; }, sll:function(value) { var carry = (value & 128) >> 7; value = (value << 1 | 1) & 255; this.f = carry | this.SZP_TABLE[value]; - return value + return value; }, sra:function(value) { var carry = value & 1; value = value >> 1 | value & 128; this.f = carry | this.SZP_TABLE[value]; - return value + return value; }, srl:function(value) { var carry = value & 1; value = value >> 1 & 255; this.f = carry | this.SZP_TABLE[value]; - return value + return value; }, bit:function(mask) { - this.f = this.f & F_CARRY | this.SZ_BIT_TABLE[mask] + this.f = this.f & F_CARRY | this.SZ_BIT_TABLE[mask]; }, doIndexOpIX:function(opcode) { - var location = 0; var temp = 0; this.tstates -= OP_DD_STATES[opcode]; - if(REFRESH_EMULATION) { - this.incR() + if (REFRESH_EMULATION) { + this.incR(); } switch(opcode) { case 9: @@ -2753,14 +2751,13 @@ JSSMS.Z80.prototype = {reset:function() { default: JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: " + JSSMS.Utils.toHex(opcode)); this.pc--; - break + break; } }, doIndexOpIY:function(opcode) { - var location; var temp; this.tstates -= OP_DD_STATES[opcode]; - if(REFRESH_EMULATION) { - this.incR() + if (REFRESH_EMULATION) { + this.incR(); } switch(opcode) { case 9: @@ -3053,7 +3050,7 @@ JSSMS.Z80.prototype = {reset:function() { default: JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: " + JSSMS.Utils.toHex(opcode)); this.pc--; - break + break; } }, doIndexCB:function(index) { var location = index + this.readMem(this.pc) & 65535; @@ -3718,15 +3715,15 @@ JSSMS.Z80.prototype = {reset:function() { break; default: JSSMS.Utils.console.log("Unimplemented DDCB/FDCB Opcode: " + JSSMS.Utils.toHex(opcode)); - break + break; } - this.pc++ + this.pc++; }, doED:function(opcode) { var temp = 0; var location = 0; this.tstates -= OP_ED_STATES[opcode]; - if(REFRESH_EMULATION) { - this.incR() + if (REFRESH_EMULATION) { + this.incR(); } switch(opcode) { case 64: @@ -3964,7 +3961,7 @@ JSSMS.Z80.prototype = {reset:function() { this.cp_a(this.readMem(this.getHL())); this.decBC(); this.incHL(); - temp |= this.getBC() == 0 ? 0 : F_PARITY; + temp |= this.getBC() === 0 ? 0 : F_PARITY; this.f = this.f & 248 | temp; this.pc++; break; @@ -3973,10 +3970,10 @@ JSSMS.Z80.prototype = {reset:function() { this.writeMem(this.getHL(), temp); this.b = this.dec8(this.b); this.incHL(); - if((temp & 128) == 128) { - this.f |= F_NEGATIVE - }else { - this.f &= ~F_NEGATIVE + if ((temp & 128) === 128) { + this.f |= F_NEGATIVE; + } else { + this.f &= ~F_NEGATIVE; } this.pc++; break; @@ -3985,17 +3982,17 @@ JSSMS.Z80.prototype = {reset:function() { this.port.out(this.c, temp); this.b = this.dec8(this.b); this.incHL(); - if(this.l + temp > 255) { + if (this.l + temp > 255) { this.f |= F_CARRY; - this.f |= F_HALFCARRY - }else { + this.f |= F_HALFCARRY; + } else { this.f &= ~F_CARRY; - this.f &= ~F_HALFCARRY + this.f &= ~F_HALFCARRY; } - if((temp & 128) == 128) { - this.f |= F_NEGATIVE - }else { - this.f &= ~F_NEGATIVE + if ((temp & 128) === 128) { + this.f |= F_NEGATIVE; + } else { + this.f &= ~F_NEGATIVE; } this.pc++; break; @@ -4014,7 +4011,7 @@ JSSMS.Z80.prototype = {reset:function() { this.cp_a(this.readMem(this.getHL())); this.decBC(); this.decHL(); - temp |= this.getBC() == 0 ? 0 : F_PARITY; + temp |= this.getBC() === 0 ? 0 : F_PARITY; this.f = this.f & 248 | temp; this.pc++; break; @@ -4023,10 +4020,10 @@ JSSMS.Z80.prototype = {reset:function() { this.writeMem(this.getHL(), temp); this.b = this.dec8(this.b); this.decHL(); - if((temp & 128) != 0) { - this.f |= F_NEGATIVE - }else { - this.f &= ~F_NEGATIVE + if ((temp & 128) !== 0) { + this.f |= F_NEGATIVE; + } else { + this.f &= ~F_NEGATIVE; } this.pc++; break; @@ -4035,17 +4032,17 @@ JSSMS.Z80.prototype = {reset:function() { this.port.out(this.c, temp); this.b = this.dec8(this.b); this.decHL(); - if(this.l + temp > 255) { + if (this.l + temp > 255) { this.f |= F_CARRY; - this.f |= F_HALFCARRY - }else { + this.f |= F_HALFCARRY; + } else { this.f &= ~F_CARRY; - this.f &= ~F_HALFCARRY + this.f &= ~F_HALFCARRY; } - if((temp & 128) == 128) { - this.f |= F_NEGATIVE - }else { - this.f &= ~F_NEGATIVE + if ((temp & 128) === 128) { + this.f |= F_NEGATIVE; + } else { + this.f &= ~F_NEGATIVE; } this.pc++; break; @@ -4057,11 +4054,11 @@ JSSMS.Z80.prototype = {reset:function() { this.incHL(); temp = temp + this.a & 255; this.f = this.f & 193 | (this.getBC() ? F_PARITY : 0) | temp & 8 | (temp & 2 ? 32 : 0); - if(this.getBC() != 0) { + if (this.getBC() !== 0) { this.tstates -= 5; - this.pc-- - }else { - this.pc++ + this.pc--; + } else { + this.pc++; } break; case 177: @@ -4069,12 +4066,12 @@ JSSMS.Z80.prototype = {reset:function() { this.cp_a(this.readMem(this.getHL())); this.decBC(); this.incHL(); - temp |= this.getBC() == 0 ? 0 : F_PARITY; - if((temp & F_PARITY) != 0 && (this.f & F_ZERO) == 0) { + temp |= this.getBC() === 0 ? 0 : F_PARITY; + if ((temp & F_PARITY) !== 0 && (this.f & F_ZERO) === 0) { this.tstates -= 5; - this.pc-- - }else { - this.pc++ + this.pc--; + } else { + this.pc++; } this.f = this.f & 248 | temp; break; @@ -4083,16 +4080,16 @@ JSSMS.Z80.prototype = {reset:function() { this.writeMem(this.getHL(), temp); this.b = this.dec8(this.b); this.incHL(); - if(this.b != 0) { + if (this.b !== 0) { this.tstates -= 5; - this.pc-- - }else { - this.pc++ + this.pc--; + } else { + this.pc++; } - if((temp & 128) == 128) { - this.f |= F_NEGATIVE - }else { - this.f &= ~F_NEGATIVE + if ((temp & 128) === 128) { + this.f |= F_NEGATIVE; + } else { + this.f &= ~F_NEGATIVE; } break; case 179: @@ -4100,23 +4097,23 @@ JSSMS.Z80.prototype = {reset:function() { this.port.out(this.c, temp); this.b = this.dec8(this.b); this.incHL(); - if(this.b != 0) { + if (this.b !== 0) { this.tstates -= 5; - this.pc-- - }else { - this.pc++ + this.pc--; + } else { + this.pc++; } - if(this.l + temp > 255) { + if (this.l + temp > 255) { this.f |= F_CARRY; - this.f |= F_HALFCARRY - }else { + this.f |= F_HALFCARRY; + } else { this.f &= ~F_CARRY; - this.f &= ~F_HALFCARRY + this.f &= ~F_HALFCARRY; } - if((temp & 128) != 0) { - this.f |= F_NEGATIVE - }else { - this.f &= ~F_NEGATIVE + if ((temp & 128) !== 0) { + this.f |= F_NEGATIVE; + } else { + this.f &= ~F_NEGATIVE; } break; case 184: @@ -4127,11 +4124,11 @@ JSSMS.Z80.prototype = {reset:function() { this.decHL(); temp = temp + this.a & 255; this.f = this.f & 193 | (this.getBC() ? F_PARITY : 0) | temp & F_BIT3 | (temp & F_NEGATIVE ? 32 : 0); - if(this.getBC() != 0) { + if (this.getBC() !== 0) { this.tstates -= 5; - this.pc-- - }else { - this.pc++ + this.pc--; + } else { + this.pc++; } break; case 185: @@ -4139,12 +4136,12 @@ JSSMS.Z80.prototype = {reset:function() { this.cp_a(this.readMem(this.getHL())); this.decBC(); this.decHL(); - temp |= this.getBC() == 0 ? 0 : F_PARITY; - if((temp & F_PARITY) != 0 && (this.f & F_ZERO) == 0) { + temp |= this.getBC() === 0 ? 0 : F_PARITY; + if ((temp & F_PARITY) !== 0 && (this.f & F_ZERO) === 0) { this.tstates -= 5; - this.pc-- - }else { - this.pc++ + this.pc--; + } else { + this.pc++; } this.f = this.f & 248 | temp; break; @@ -4153,16 +4150,16 @@ JSSMS.Z80.prototype = {reset:function() { this.writeMem(this.getHL(), temp); this.b = this.dec8(this.b); this.decHL(); - if(this.b != 0) { + if (this.b !== 0) { this.tstates -= 5; - this.pc-- - }else { - this.pc++ + this.pc--; + } else { + this.pc++; } - if((temp & 128) != 0) { - this.f |= F_NEGATIVE - }else { - this.f &= ~F_NEGATIVE + if ((temp & 128) !== 0) { + this.f |= F_NEGATIVE; + } else { + this.f &= ~F_NEGATIVE; } break; case 187: @@ -4170,43 +4167,43 @@ JSSMS.Z80.prototype = {reset:function() { this.port.out(this.c, temp); this.b = this.dec8(this.b); this.decHL(); - if(this.b != 0) { + if (this.b !== 0) { this.tstates -= 5; - this.pc-- - }else { - this.pc++ + this.pc--; + } else { + this.pc++; } - if(this.l + temp > 255) { + if (this.l + temp > 255) { this.f |= F_CARRY; - this.f |= F_HALFCARRY - }else { + this.f |= F_HALFCARRY; + } else { this.f &= ~F_CARRY; - this.f &= ~F_HALFCARRY + this.f &= ~F_HALFCARRY; } - if((temp & 128) != 0) { - this.f |= F_NEGATIVE - }else { - this.f &= ~F_NEGATIVE + if ((temp & 128) !== 0) { + this.f |= F_NEGATIVE; + } else { + this.f &= ~F_NEGATIVE; } break; default: JSSMS.Utils.console.log("Unimplemented ED Opcode: " + JSSMS.Utils.toHex(opcode)); this.pc++; - break + break; } }, generateDAATable:function() { var i, c, h, n; i = 256; - while(i--) { - for(c = 0;c <= 1;c++) { - for(h = 0;h <= 1;h++) { - for(n = 0;n <= 1;n++) { - this.DAA_TABLE[c << 8 | n << 9 | h << 10 | i] = this.getDAAResult(i, c | n << 1 | h << 4) + while (i--) { + for (c = 0;c <= 1;c++) { + for (h = 0;h <= 1;h++) { + for (n = 0;n <= 1;n++) { + this.DAA_TABLE[c << 8 | n << 9 | h << 10 | i] = this.getDAAResult(i, c | n << 1 | h << 4); } } } } - this.a = this.f = 0 + this.a = this.f = 0; }, getDAAResult:function(value, flags) { this.a = value; this.f = flags; @@ -4214,529 +4211,514 @@ JSSMS.Z80.prototype = {reset:function() { var correction = 0; var carry = flags & F_CARRY; var carry_copy = carry; - if((flags & F_HALFCARRY) != 0 || (a_copy & 15) > 9) { - correction |= 6 + if ((flags & F_HALFCARRY) !== 0 || (a_copy & 15) > 9) { + correction |= 6; } - if(carry == 1 || a_copy > 159 || a_copy > 143 && (a_copy & 15) > 9) { + if (carry == 1 || (a_copy > 159 || a_copy > 143 && (a_copy & 15) > 9)) { correction |= 96; - carry_copy = 1 + carry_copy = 1; } - if(a_copy > 153) { - carry_copy = 1 + if (a_copy > 153) { + carry_copy = 1; } - if((flags & F_NEGATIVE) != 0) { - this.sub_a(correction) - }else { - this.add_a(correction) + if ((flags & F_NEGATIVE) !== 0) { + this.sub_a(correction); + } else { + this.add_a(correction); } flags = this.f & 254 | carry_copy; - if(this.getParity(this.a)) { - flags = flags & 251 | F_PARITY - }else { - flags = flags & 251 + if (this.getParity(this.a)) { + flags = flags & 251 | F_PARITY; + } else { + flags = flags & 251; } - return this.a | flags << 8 + return this.a | flags << 8; }, add_a:function(value) { var temp = this.a + value & 255; this.f = this.SZHVC_ADD_TABLE[this.a << 8 | temp]; - this.a = temp + this.a = temp; }, adc_a:function(value) { var carry = this.f & F_CARRY; var temp = this.a + value + carry & 255; this.f = this.SZHVC_ADD_TABLE[carry << 16 | this.a << 8 | temp]; - this.a = temp + this.a = temp; }, sub_a:function(value) { var temp = this.a - value & 255; this.f = this.SZHVC_SUB_TABLE[this.a << 8 | temp]; - this.a = temp + this.a = temp; }, sbc_a:function(value) { var carry = this.f & F_CARRY; var temp = this.a - value - carry & 255; this.f = this.SZHVC_SUB_TABLE[carry << 16 | this.a << 8 | temp]; - this.a = temp + this.a = temp; }, cp_a:function(value) { - this.f = this.SZHVC_SUB_TABLE[this.a << 8 | this.a - value & 255] + this.f = this.SZHVC_SUB_TABLE[this.a << 8 | this.a - value & 255]; }, cpl_a:function() { this.a ^= 255; - this.f |= F_NEGATIVE | F_HALFCARRY + this.f |= F_NEGATIVE | F_HALFCARRY; }, rra_a:function() { var carry = this.a & 1; this.a = (this.a >> 1 | (this.f & F_CARRY) << 7) & 255; - this.f = this.f & 236 | carry + this.f = this.f & 236 | carry; }, rla_a:function() { var carry = this.a >> 7; this.a = (this.a << 1 | this.f & F_CARRY) & 255; - this.f = this.f & 236 | carry + this.f = this.f & 236 | carry; }, rlca_a:function() { var carry = this.a >> 7; this.a = this.a << 1 & 255 | carry; - this.f = this.f & 236 | carry + this.f = this.f & 236 | carry; }, rrca_a:function() { var carry = this.a & 1; this.a = this.a >> 1 | carry << 7; - this.f = this.f & 236 | carry + this.f = this.f & 236 | carry; }, getBC:function() { - return this.b << 8 | this.c + return this.b << 8 | this.c; }, getDE:function() { - return this.d << 8 | this.e + return this.d << 8 | this.e; }, getHL:function() { - return this.h << 8 | this.l + return this.h << 8 | this.l; }, getAF:function() { - return this.a << 8 | this.f + return this.a << 8 | this.f; }, getIXHIXL:function() { - return this.ixH << 8 | this.ixL + return this.ixH << 8 | this.ixL; }, getIYHIYL:function() { - return this.iyH << 8 | this.iyL + return this.iyH << 8 | this.iyL; }, setBC:function(value) { this.b = value >> 8; - this.c = value & 255 + this.c = value & 255; }, setDE:function(value) { this.d = value >> 8; - this.e = value & 255 + this.e = value & 255; }, setHL:function(value) { this.h = value >> 8; - this.l = value & 255 + this.l = value & 255; }, setAF:function(value) { this.a = value >> 8; - this.f = value & 255 + this.f = value & 255; }, setIXHIXL:function(value) { this.ixH = value >> 8; - this.ixL = value & 255 + this.ixL = value & 255; }, setIYHIYL:function(value) { this.iyH = value >> 8; - this.iyL = value & 255 + this.iyL = value & 255; }, incBC:function() { this.c = this.c + 1 & 255; - if(this.c == 0) { - this.b = this.b + 1 & 255 + if (this.c === 0) { + this.b = this.b + 1 & 255; } }, incDE:function() { this.e = this.e + 1 & 255; - if(this.e == 0) { - this.d = this.d + 1 & 255 + if (this.e === 0) { + this.d = this.d + 1 & 255; } }, incHL:function() { this.l = this.l + 1 & 255; - if(this.l == 0) { - this.h = this.h + 1 & 255 + if (this.l === 0) { + this.h = this.h + 1 & 255; } }, incIXHIXL:function() { this.ixL = this.ixL + 1 & 255; - if(this.ixL == 0) { - this.ixH = this.ixH + 1 & 255 + if (this.ixL === 0) { + this.ixH = this.ixH + 1 & 255; } }, incIYHIYL:function() { this.iyL = this.iyL + 1 & 255; - if(this.iyL == 0) { - this.iyH = this.iyH + 1 & 255 + if (this.iyL === 0) { + this.iyH = this.iyH + 1 & 255; } }, decBC:function() { this.c = this.c - 1 & 255; - if(this.c == 255) { - this.b = this.b - 1 & 255 + if (this.c == 255) { + this.b = this.b - 1 & 255; } }, decDE:function() { this.e = this.e - 1 & 255; - if(this.e == 255) { - this.d = this.d - 1 & 255 + if (this.e == 255) { + this.d = this.d - 1 & 255; } }, decHL:function() { this.l = this.l - 1 & 255; - if(this.l == 255) { - this.h = this.h - 1 & 255 + if (this.l == 255) { + this.h = this.h - 1 & 255; } }, decIXHIXL:function() { this.ixL = this.ixL - 1 & 255; - if(this.ixL == 255) { - this.ixH = this.ixH - 1 & 255 + if (this.ixL == 255) { + this.ixH = this.ixH - 1 & 255; } }, decIYHIYL:function() { this.iyL = this.iyL - 1 & 255; - if(this.iyL == 255) { - this.iyH = this.iyH - 1 & 255 + if (this.iyL == 255) { + this.iyH = this.iyH - 1 & 255; } }, inc8:function(value) { value = value + 1 & 255; this.f = this.f & F_CARRY | this.SZHV_INC_TABLE[value]; - return value + return value; }, dec8:function(value) { value = value - 1 & 255; this.f = this.f & F_CARRY | this.SZHV_DEC_TABLE[value]; - return value + return value; }, exAF:function() { var temp = this.a; this.a = this.a2; this.a2 = temp; temp = this.f; this.f = this.f2; - this.f2 = temp + this.f2 = temp; }, exBC:function() { var temp = this.b; this.b = this.b2; this.b2 = temp; temp = this.c; this.c = this.c2; - this.c2 = temp + this.c2 = temp; }, exDE:function() { var temp = this.d; this.d = this.d2; this.d2 = temp; temp = this.e; this.e = this.e2; - this.e2 = temp + this.e2 = temp; }, exHL:function() { var temp = this.h; this.h = this.h2; this.h2 = temp; temp = this.l; this.l = this.l2; - this.l2 = temp + this.l2 = temp; }, add16:function(reg, value) { var result = reg + value; this.f = this.f & 196 | (reg ^ result ^ value) >> 8 & 16 | result >> 16 & 1; - return result & 65535 + return result & 65535; }, adc16:function(value) { var hl = this.getHL(); var result = hl + value + (this.f & F_CARRY); - this.f = (hl ^ result ^ value) >> 8 & 16 | result >> 16 & 1 | result >> 8 & 128 | ((result & 65535) != 0 ? 0 : 64) | ((value ^ hl ^ 32768) & (value ^ result) & 32768) >> 13; + this.f = (hl ^ result ^ value) >> 8 & 16 | result >> 16 & 1 | result >> 8 & 128 | ((result & 65535) !== 0 ? 0 : 64) | ((value ^ hl ^ 32768) & (value ^ result) & 32768) >> 13; this.h = result >> 8 & 255; - this.l = result & 255 + this.l = result & 255; }, sbc16:function(value) { var hl = this.getHL(); var result = hl - value - (this.f & F_CARRY); - this.f = (hl ^ result ^ value) >> 8 & 16 | 2 | result >> 16 & 1 | result >> 8 & 128 | ((result & 65535) != 0 ? 0 : 64) | ((value ^ hl) & (hl ^ result) & 32768) >> 13; + this.f = (hl ^ result ^ value) >> 8 & 16 | 2 | result >> 16 & 1 | result >> 8 & 128 | ((result & 65535) !== 0 ? 0 : 64) | ((value ^ hl) & (hl ^ result) & 32768) >> 13; this.h = result >> 8 & 255; - this.l = result & 255 + this.l = result & 255; }, incR:function() { - this.r = this.r & 128 | this.r + 1 & 127 + this.r = this.r & 128 | this.r + 1 & 127; }, generateFlagTables:function() { var i, sf, zf, yf, xf, pf; var padd, padc, psub, psbc; var val, oldval, newval; - for(i = 0;i < 256;i++) { - sf = (i & 128) != 0 ? F_SIGN : 0; - zf = i == 0 ? F_ZERO : 0; + for (i = 0;i < 256;i++) { + sf = (i & 128) !== 0 ? F_SIGN : 0; + zf = i === 0 ? F_ZERO : 0; yf = i & 32; xf = i & 8; pf = this.getParity(i) ? F_PARITY : 0; this.SZ_TABLE[i] = sf | zf | yf | xf; this.SZP_TABLE[i] = sf | zf | yf | xf | pf; this.SZHV_INC_TABLE[i] = sf | zf | yf | xf; - this.SZHV_INC_TABLE[i] |= i == 128 ? F_OVERFLOW : 0; - this.SZHV_INC_TABLE[i] |= (i & 15) == 0 ? F_HALFCARRY : 0; + this.SZHV_INC_TABLE[i] |= i === 128 ? F_OVERFLOW : 0; + this.SZHV_INC_TABLE[i] |= (i & 15) === 0 ? F_HALFCARRY : 0; this.SZHV_DEC_TABLE[i] = sf | zf | yf | xf | F_NEGATIVE; - this.SZHV_DEC_TABLE[i] |= i == 127 ? F_OVERFLOW : 0; - this.SZHV_DEC_TABLE[i] |= (i & 15) == 15 ? F_HALFCARRY : 0; - this.SZ_BIT_TABLE[i] = i != 0 ? i & 128 : F_ZERO | F_PARITY; - this.SZ_BIT_TABLE[i] |= yf | xf | F_HALFCARRY + this.SZHV_DEC_TABLE[i] |= i === 127 ? F_OVERFLOW : 0; + this.SZHV_DEC_TABLE[i] |= (i & 15) === 15 ? F_HALFCARRY : 0; + this.SZ_BIT_TABLE[i] = i !== 0 ? i & 128 : F_ZERO | F_PARITY; + this.SZ_BIT_TABLE[i] |= yf | xf | F_HALFCARRY; } padd = 0 * 256; padc = 256 * 256; psub = 0 * 256; psbc = 256 * 256; - for(oldval = 0;oldval < 256;oldval++) { - for(newval = 0;newval < 256;newval++) { + for (oldval = 0;oldval < 256;oldval++) { + for (newval = 0;newval < 256;newval++) { val = newval - oldval; - if(newval != 0) { - if((newval & 128) != 0) { - this.SZHVC_ADD_TABLE[padd] = F_SIGN - }else { - this.SZHVC_ADD_TABLE[padd] = 0 + if (newval !== 0) { + if ((newval & 128) !== 0) { + this.SZHVC_ADD_TABLE[padd] = F_SIGN; + } else { + this.SZHVC_ADD_TABLE[padd] = 0; } - }else { - this.SZHVC_ADD_TABLE[padd] = F_ZERO + } else { + this.SZHVC_ADD_TABLE[padd] = F_ZERO; } this.SZHVC_ADD_TABLE[padd] |= newval & (F_BIT5 | F_BIT3); - if((newval & 15) < (oldval & 15)) { - this.SZHVC_ADD_TABLE[padd] |= F_HALFCARRY + if ((newval & 15) < (oldval & 15)) { + this.SZHVC_ADD_TABLE[padd] |= F_HALFCARRY; } - if(newval < oldval) { - this.SZHVC_ADD_TABLE[padd] |= F_CARRY + if (newval < oldval) { + this.SZHVC_ADD_TABLE[padd] |= F_CARRY; } - if(((val ^ oldval ^ 128) & (val ^ newval) & 128) != 0) { - this.SZHVC_ADD_TABLE[padd] |= F_OVERFLOW + if (((val ^ oldval ^ 128) & (val ^ newval) & 128) !== 0) { + this.SZHVC_ADD_TABLE[padd] |= F_OVERFLOW; } padd++; val = newval - oldval - 1; - if(newval != 0) { - if((newval & 128) != 0) { - this.SZHVC_ADD_TABLE[padc] = F_SIGN - }else { - this.SZHVC_ADD_TABLE[padc] = 0 + if (newval !== 0) { + if ((newval & 128) !== 0) { + this.SZHVC_ADD_TABLE[padc] = F_SIGN; + } else { + this.SZHVC_ADD_TABLE[padc] = 0; } - }else { - this.SZHVC_ADD_TABLE[padc] = F_ZERO + } else { + this.SZHVC_ADD_TABLE[padc] = F_ZERO; } this.SZHVC_ADD_TABLE[padc] |= newval & (F_BIT5 | F_BIT3); - if((newval & 15) <= (oldval & 15)) { - this.SZHVC_ADD_TABLE[padc] |= F_HALFCARRY + if ((newval & 15) <= (oldval & 15)) { + this.SZHVC_ADD_TABLE[padc] |= F_HALFCARRY; } - if(newval <= oldval) { - this.SZHVC_ADD_TABLE[padc] |= F_CARRY + if (newval <= oldval) { + this.SZHVC_ADD_TABLE[padc] |= F_CARRY; } - if(((val ^ oldval ^ 128) & (val ^ newval) & 128) != 0) { - this.SZHVC_ADD_TABLE[padc] |= F_OVERFLOW + if (((val ^ oldval ^ 128) & (val ^ newval) & 128) !== 0) { + this.SZHVC_ADD_TABLE[padc] |= F_OVERFLOW; } padc++; val = oldval - newval; - if(newval != 0) { - if((newval & 128) != 0) { - this.SZHVC_SUB_TABLE[psub] = F_NEGATIVE | F_SIGN - }else { - this.SZHVC_SUB_TABLE[psub] = F_NEGATIVE + if (newval !== 0) { + if ((newval & 128) !== 0) { + this.SZHVC_SUB_TABLE[psub] = F_NEGATIVE | F_SIGN; + } else { + this.SZHVC_SUB_TABLE[psub] = F_NEGATIVE; } - }else { - this.SZHVC_SUB_TABLE[psub] = F_NEGATIVE | F_ZERO + } else { + this.SZHVC_SUB_TABLE[psub] = F_NEGATIVE | F_ZERO; } this.SZHVC_SUB_TABLE[psub] |= newval & (F_BIT5 | F_BIT3); - if((newval & 15) > (oldval & 15)) { - this.SZHVC_SUB_TABLE[psub] |= F_HALFCARRY + if ((newval & 15) > (oldval & 15)) { + this.SZHVC_SUB_TABLE[psub] |= F_HALFCARRY; } - if(newval > oldval) { - this.SZHVC_SUB_TABLE[psub] |= F_CARRY + if (newval > oldval) { + this.SZHVC_SUB_TABLE[psub] |= F_CARRY; } - if(((val ^ oldval) & (oldval ^ newval) & 128) != 0) { - this.SZHVC_SUB_TABLE[psub] |= F_OVERFLOW + if (((val ^ oldval) & (oldval ^ newval) & 128) !== 0) { + this.SZHVC_SUB_TABLE[psub] |= F_OVERFLOW; } psub++; val = oldval - newval - 1; - if(newval != 0) { - if((newval & 128) != 0) { - this.SZHVC_SUB_TABLE[psbc] = F_NEGATIVE | F_SIGN - }else { - this.SZHVC_SUB_TABLE[psbc] = F_NEGATIVE + if (newval !== 0) { + if ((newval & 128) !== 0) { + this.SZHVC_SUB_TABLE[psbc] = F_NEGATIVE | F_SIGN; + } else { + this.SZHVC_SUB_TABLE[psbc] = F_NEGATIVE; } - }else { - this.SZHVC_SUB_TABLE[psbc] = F_NEGATIVE | F_ZERO + } else { + this.SZHVC_SUB_TABLE[psbc] = F_NEGATIVE | F_ZERO; } this.SZHVC_SUB_TABLE[psbc] |= newval & (F_BIT5 | F_BIT3); - if((newval & 15) >= (oldval & 15)) { - this.SZHVC_SUB_TABLE[psbc] |= F_HALFCARRY + if ((newval & 15) >= (oldval & 15)) { + this.SZHVC_SUB_TABLE[psbc] |= F_HALFCARRY; } - if(newval >= oldval) { - this.SZHVC_SUB_TABLE[psbc] |= F_CARRY + if (newval >= oldval) { + this.SZHVC_SUB_TABLE[psbc] |= F_CARRY; } - if(((val ^ oldval) & (oldval ^ newval) & 128) != 0) { - this.SZHVC_SUB_TABLE[psbc] |= F_OVERFLOW + if (((val ^ oldval) & (oldval ^ newval) & 128) !== 0) { + this.SZHVC_SUB_TABLE[psbc] |= F_OVERFLOW; } - psbc++ + psbc++; } } }, getParity:function(value) { var parity = true; var j; - for(j = 0;j < 8;j++) { - if((value & 1 << j) != 0) { - parity = !parity + for (j = 0;j < 8;j++) { + if ((value & 1 << j) !== 0) { + parity = !parity; } } - return parity + return parity; }, generateMemory:function() { - if(SUPPORT_DATAVIEW) { - for(var i = 0;i < 8192;i++) { - this.memWriteMap.setUint8(i, 0) + if (SUPPORT_DATAVIEW) { + for (var i = 0;i < 8192;i++) { + this.memWriteMap.setUint8(i, 0); } - }else { - for(var i = 0;i < 8192;i++) { - this.memWriteMap[i] = 0 + } else { + for (i = 0;i < 8192;i++) { + this.memWriteMap[i] = 0; } } - if(SUPPORT_DATAVIEW) { - for(i = 0;i < 32768;i++) { - this.sram.setUint8(i, 0) + if (SUPPORT_DATAVIEW) { + for (i = 0;i < 32768;i++) { + this.sram.setUint8(i, 0); } - }else { - for(i = 0;i < 32768;i++) { - this.sram[i] = 0 + } else { + for (i = 0;i < 32768;i++) { + this.sram[i] = 0; } } this.useSRAM = false; this.number_of_pages = 2; - for(i = 0;i < 4;i++) { - this.frameReg[i] = i % 3 + for (i = 0;i < 4;i++) { + this.frameReg[i] = i % 3; } }, resetMemory:function(pages) { var i = 0; - if(pages) { - this.rom = pages + if (pages) { + this.rom = pages; } - if(this.rom.length) { + if (this.rom.length) { this.number_of_pages = this.rom.length; this.romPageMask = this.number_of_pages - 1; - for(i = 0;i < 3;i++) { - this.frameReg[i] = i % this.number_of_pages + for (i = 0;i < 3;i++) { + this.frameReg[i] = i % this.number_of_pages; } this.frameReg[3] = 0; - if(ENABLE_COMPILER) { + if (ENABLE_COMPILER) { this.branches = Array(this.number_of_pages); - for(i = 0;i < this.number_of_pages;i++) { - this.branches[i] = Object.create(null) + for (i = 0;i < this.number_of_pages;i++) { + this.branches[i] = Object.create(null); } - this.recompiler.setRom(this.rom) + this.recompiler.setRom(this.rom); } - }else { + } else { this.number_of_pages = 0; - this.romPageMask = 0 + this.romPageMask = 0; } }, d_:function() { - return this.readMem(this.pc) + return this.readMem(this.pc); }, writeMem:function() { - if(SUPPORT_DATAVIEW) { - return function(address, value) { - if(address <= 65535) { + if (SUPPORT_DATAVIEW) { + return function writeMem(address, value) { + if (address <= 65535) { this.memWriteMap.setUint8(address & 8191, value); - if(address == 65532) { - this.frameReg[3] = value - }else { - if(address == 65533) { - this.frameReg[0] = value & this.romPageMask - }else { - if(address == 65534) { - this.frameReg[1] = value & this.romPageMask - }else { - if(address == 65535) { - this.frameReg[2] = value & this.romPageMask + if (address === 65532) { + this.frameReg[3] = value; + } else { + if (address === 65533) { + this.frameReg[0] = value & this.romPageMask; + } else { + if (address === 65534) { + this.frameReg[1] = value & this.romPageMask; + } else { + if (address === 65535) { + this.frameReg[2] = value & this.romPageMask; } } } } - }else { + } else { JSSMS.Utils.console.error(JSSMS.Utils.toHex(address)); - if(DEBUG) { - debugger - } } - } - }else { - return function(address, value) { - if(address <= 65535) { + }; + } else { + return function writeMem(address, value) { + if (address <= 65535) { this.memWriteMap[address & 8191] = value; - if(address == 65532) { - this.frameReg[3] = value - }else { - if(address == 65533) { - this.frameReg[0] = value & this.romPageMask - }else { - if(address == 65534) { - this.frameReg[1] = value & this.romPageMask - }else { - if(address == 65535) { - this.frameReg[2] = value & this.romPageMask + if (address === 65532) { + this.frameReg[3] = value; + } else { + if (address === 65533) { + this.frameReg[0] = value & this.romPageMask; + } else { + if (address === 65534) { + this.frameReg[1] = value & this.romPageMask; + } else { + if (address === 65535) { + this.frameReg[2] = value & this.romPageMask; } } } } - }else { + } else { JSSMS.Utils.console.error(JSSMS.Utils.toHex(address)); - if(DEBUG) { - debugger - } } - } + }; } }(), writeMemWord:function() { - if(SUPPORT_DATAVIEW) { - return function(address, value) { - if(address < 65532) { - this.memWriteMap.setUint16(address & 8191, value, LITTLE_ENDIAN) - }else { - if(address == 65532) { + if (SUPPORT_DATAVIEW) { + return function writeMemWord(address, value) { + if (address < 65532) { + this.memWriteMap.setUint16(address & 8191, value, LITTLE_ENDIAN); + } else { + if (address === 65532) { this.frameReg[3] = value & 255; - this.frameReg[0] = value >> 8 & this.romPageMask - }else { - if(address == 65533) { + this.frameReg[0] = value >> 8 & this.romPageMask; + } else { + if (address === 65533) { this.frameReg[0] = value & 255 & this.romPageMask; - this.frameReg[1] = value >> 8 & this.romPageMask - }else { - if(address == 65534) { + this.frameReg[1] = value >> 8 & this.romPageMask; + } else { + if (address === 65534) { this.frameReg[1] = value & 255 & this.romPageMask; - this.frameReg[2] = value >> 8 & this.romPageMask - }else { + this.frameReg[2] = value >> 8 & this.romPageMask; + } else { JSSMS.Utils.console.error(JSSMS.Utils.toHex(address)); - if(DEBUG) { - debugger - } } } } } - } - }else { - return function(address, value) { - if(address < 65532) { + }; + } else { + return function writeMemWord(address, value) { + if (address < 65532) { address &= 8191; this.memWriteMap[address++] = value & 255; - this.memWriteMap[address] = value >> 8 - }else { - if(address == 65532) { + this.memWriteMap[address] = value >> 8; + } else { + if (address === 65532) { this.frameReg[3] = value & 255; - this.frameReg[0] = value >> 8 & this.romPageMask - }else { - if(address == 65533) { + this.frameReg[0] = value >> 8 & this.romPageMask; + } else { + if (address === 65533) { this.frameReg[0] = value & 255 & this.romPageMask; - this.frameReg[1] = value >> 8 & this.romPageMask - }else { - if(address == 65534) { + this.frameReg[1] = value >> 8 & this.romPageMask; + } else { + if (address === 65534) { this.frameReg[1] = value & 255 & this.romPageMask; - this.frameReg[2] = value >> 8 & this.romPageMask - }else { + this.frameReg[2] = value >> 8 & this.romPageMask; + } else { JSSMS.Utils.console.error(JSSMS.Utils.toHex(address)); - if(DEBUG) { - debugger - } } } } } - } + }; } }(), readMem:function() { - if(SUPPORT_DATAVIEW) { - return function(address) { - if(address < 1024) { - return this.rom[0].getUint8(address) - }else { - if(address < 16384) { - return this.rom[this.frameReg[0]].getUint8(address) - }else { - if(address < 32768) { - return this.rom[this.frameReg[1]].getUint8(address - 16384) - }else { - if(address < 49152) { - if((this.frameReg[3] & 12) == 8) { + if (SUPPORT_DATAVIEW) { + return function readMem(address) { + if (address < 1024) { + return this.rom[0].getUint8(address); + } else { + if (address < 16384) { + return this.rom[this.frameReg[0]].getUint8(address); + } else { + if (address < 32768) { + return this.rom[this.frameReg[1]].getUint8(address - 16384); + } else { + if (address < 49152) { + if ((this.frameReg[3] & 12) == 8) { this.useSRAM = true; - return this.sram.getUint8(address - 32768) - }else { - if((this.frameReg[3] & 12) == 12) { + return this.sram.getUint8(address - 32768); + } else { + if ((this.frameReg[3] & 12) == 12) { this.useSRAM = true; - return this.sram.getUint8(address - 16384) - }else { - return this.rom[this.frameReg[2]].getUint8(address - 32768) + return this.sram.getUint8(address - 16384); + } else { + return this.rom[this.frameReg[2]].getUint8(address - 32768); } } - }else { - if(address < 57344) { - return this.memWriteMap.getUint8(address - 49152) - }else { - if(address < 65532) { - return this.memWriteMap.getUint8(address - 57344) - }else { - if(address == 65532) { - return this.frameReg[3] - }else { - if(address == 65533) { - return this.frameReg[0] - }else { - if(address == 65534) { - return this.frameReg[1] - }else { - if(address == 65535) { - return this.frameReg[2] - }else { + } else { + if (address < 57344) { + return this.memWriteMap.getUint8(address - 49152); + } else { + if (address < 65532) { + return this.memWriteMap.getUint8(address - 57344); + } else { + if (address === 65532) { + return this.frameReg[3]; + } else { + if (address === 65533) { + return this.frameReg[0]; + } else { + if (address === 65534) { + return this.frameReg[1]; + } else { + if (address === 65535) { + return this.frameReg[2]; + } else { JSSMS.Utils.console.error(JSSMS.Utils.toHex(address)); - if(DEBUG) { - debugger - } } } } @@ -4747,54 +4729,51 @@ JSSMS.Z80.prototype = {reset:function() { } } } - return 0 - } - }else { - return function(address) { - if(address < 1024) { - return this.rom[0][address] - }else { - if(address < 16384) { - return this.rom[this.frameReg[0]][address] - }else { - if(address < 32768) { - return this.rom[this.frameReg[1]][address - 16384] - }else { - if(address < 49152) { - if((this.frameReg[3] & 12) == 8) { + return 0; + }; + } else { + return function readMem(address) { + if (address < 1024) { + return this.rom[0][address]; + } else { + if (address < 16384) { + return this.rom[this.frameReg[0]][address]; + } else { + if (address < 32768) { + return this.rom[this.frameReg[1]][address - 16384]; + } else { + if (address < 49152) { + if ((this.frameReg[3] & 12) == 8) { this.useSRAM = true; - return this.sram[address - 32768] - }else { - if((this.frameReg[3] & 12) == 12) { + return this.sram[address - 32768]; + } else { + if ((this.frameReg[3] & 12) == 12) { this.useSRAM = true; - return this.sram[address - 16384] - }else { - return this.rom[this.frameReg[2]][address - 32768] + return this.sram[address - 16384]; + } else { + return this.rom[this.frameReg[2]][address - 32768]; } } - }else { - if(address < 57344) { - return this.memWriteMap[address - 49152] - }else { - if(address < 65532) { - return this.memWriteMap[address - 57344] - }else { - if(address == 65532) { - return this.frameReg[3] - }else { - if(address == 65533) { - return this.frameReg[0] - }else { - if(address == 65534) { - return this.frameReg[1] - }else { - if(address == 65535) { - return this.frameReg[2] - }else { + } else { + if (address < 57344) { + return this.memWriteMap[address - 49152]; + } else { + if (address < 65532) { + return this.memWriteMap[address - 57344]; + } else { + if (address === 65532) { + return this.frameReg[3]; + } else { + if (address === 65533) { + return this.frameReg[0]; + } else { + if (address === 65534) { + return this.frameReg[1]; + } else { + if (address === 65535) { + return this.frameReg[2]; + } else { JSSMS.Utils.console.error(JSSMS.Utils.toHex(address)); - if(DEBUG) { - debugger - } } } } @@ -4805,56 +4784,53 @@ JSSMS.Z80.prototype = {reset:function() { } } } - return 0 - } + return 0; + }; } }(), readMemWord:function() { - if(SUPPORT_DATAVIEW) { - return function(address) { - if(address < 1024) { - return this.rom[0].getUint16(address, LITTLE_ENDIAN) - }else { - if(address < 16384) { - return this.rom[this.frameReg[0]].getUint16(address, LITTLE_ENDIAN) - }else { - if(address < 32768) { - return this.rom[this.frameReg[1]].getUint16(address - 16384, LITTLE_ENDIAN) - }else { - if(address < 49152) { - if((this.frameReg[3] & 12) == 8) { + if (SUPPORT_DATAVIEW) { + return function readMemWord(address) { + if (address < 1024) { + return this.rom[0].getUint16(address, LITTLE_ENDIAN); + } else { + if (address < 16384) { + return this.rom[this.frameReg[0]].getUint16(address, LITTLE_ENDIAN); + } else { + if (address < 32768) { + return this.rom[this.frameReg[1]].getUint16(address - 16384, LITTLE_ENDIAN); + } else { + if (address < 49152) { + if ((this.frameReg[3] & 12) == 8) { this.useSRAM = true; - return this.sram[address - 32768] - }else { - if((this.frameReg[3] & 12) == 12) { + return this.sram[address - 32768]; + } else { + if ((this.frameReg[3] & 12) == 12) { this.useSRAM = true; - return this.sram[address - 16384] - }else { - return this.rom[this.frameReg[2]].getUint16(address - 32768, LITTLE_ENDIAN) + return this.sram[address - 16384]; + } else { + return this.rom[this.frameReg[2]].getUint16(address - 32768, LITTLE_ENDIAN); } } - }else { - if(address < 57344) { - return this.memWriteMap.getUint16(address - 49152, LITTLE_ENDIAN) - }else { - if(address < 65532) { - return this.memWriteMap.getUint16(address - 57344, LITTLE_ENDIAN) - }else { - if(address == 65532) { - return this.frameReg[3] - }else { - if(address == 65533) { - return this.frameReg[0] - }else { - if(address == 65534) { - return this.frameReg[1] - }else { - if(address == 65535) { - return this.frameReg[2] - }else { + } else { + if (address < 57344) { + return this.memWriteMap.getUint16(address - 49152, LITTLE_ENDIAN); + } else { + if (address < 65532) { + return this.memWriteMap.getUint16(address - 57344, LITTLE_ENDIAN); + } else { + if (address === 65532) { + return this.frameReg[3]; + } else { + if (address === 65533) { + return this.frameReg[0]; + } else { + if (address === 65534) { + return this.frameReg[1]; + } else { + if (address === 65535) { + return this.frameReg[2]; + } else { JSSMS.Utils.console.error(JSSMS.Utils.toHex(address)); - if(DEBUG) { - debugger - } } } } @@ -4865,54 +4841,51 @@ JSSMS.Z80.prototype = {reset:function() { } } } - return 0 - } - }else { - return function(address) { - if(address < 1024) { - return this.rom[0][address++] | this.rom[0][address] << 8 - }else { - if(address < 16384) { - return this.rom[this.frameReg[0]][address++] | this.rom[this.frameReg[0]][address] << 8 - }else { - if(address < 32768) { - return this.rom[this.frameReg[1]][address++ - 16384] | this.rom[this.frameReg[1]][address - 16384] << 8 - }else { - if(address < 49152) { - if((this.frameReg[3] & 12) == 8) { + return 0; + }; + } else { + return function readMemWord(address) { + if (address < 1024) { + return this.rom[0][address++] | this.rom[0][address] << 8; + } else { + if (address < 16384) { + return this.rom[this.frameReg[0]][address++] | this.rom[this.frameReg[0]][address] << 8; + } else { + if (address < 32768) { + return this.rom[this.frameReg[1]][address++ - 16384] | this.rom[this.frameReg[1]][address - 16384] << 8; + } else { + if (address < 49152) { + if ((this.frameReg[3] & 12) == 8) { this.useSRAM = true; - return this.sram[address++ - 32768] | this.sram[address - 32768] << 8 - }else { - if((this.frameReg[3] & 12) == 12) { + return this.sram[address++ - 32768] | this.sram[address - 32768] << 8; + } else { + if ((this.frameReg[3] & 12) == 12) { this.useSRAM = true; - return this.sram[address++ - 16384] | this.sram[address - 16384] << 8 - }else { - return this.rom[this.frameReg[2]][address++ - 32768] | this.rom[this.frameReg[2]][address - 32768] << 8 + return this.sram[address++ - 16384] | this.sram[address - 16384] << 8; + } else { + return this.rom[this.frameReg[2]][address++ - 32768] | this.rom[this.frameReg[2]][address - 32768] << 8; } } - }else { - if(address < 57344) { - return this.memWriteMap[address++ - 49152] | this.memWriteMap[address - 49152] << 8 - }else { - if(address < 65532) { - return this.memWriteMap[address++ - 57344] | this.memWriteMap[address - 57344] << 8 - }else { - if(address == 65532) { - return this.frameReg[3] - }else { - if(address == 65533) { - return this.frameReg[0] - }else { - if(address == 65534) { - return this.frameReg[1] - }else { - if(address == 65535) { - return this.frameReg[2] - }else { + } else { + if (address < 57344) { + return this.memWriteMap[address++ - 49152] | this.memWriteMap[address - 49152] << 8; + } else { + if (address < 65532) { + return this.memWriteMap[address++ - 57344] | this.memWriteMap[address - 57344] << 8; + } else { + if (address === 65532) { + return this.frameReg[3]; + } else { + if (address === 65533) { + return this.frameReg[0]; + } else { + if (address === 65534) { + return this.frameReg[1]; + } else { + if (address === 65535) { + return this.frameReg[2]; + } else { JSSMS.Utils.console.error(JSSMS.Utils.toHex(address)); - if(DEBUG) { - debugger - } } } } @@ -4923,19 +4896,19 @@ JSSMS.Z80.prototype = {reset:function() { } } } - return 0 - } + return 0; + }; } }(), hasUsedSRAM:function() { - return this.useSRAM + return this.useSRAM; }, setSRAM:function(bytes) { var length = bytes.length / PAGE_SIZE; var i; - for(i = 0;i < length;i++) { - JSSMS.Utils.copyArrayElements(bytes, i * PAGE_SIZE, this.sram[i], 0, PAGE_SIZE) + for (i = 0;i < length;i++) { + JSSMS.Utils.copyArrayElements(bytes, i * PAGE_SIZE, this.sram[i], 0, PAGE_SIZE); } }, setStateMem:function(state) { - this.frameReg = state + this.frameReg = state; }, getState:function() { var STATE_LENGTH = 8; var state = new Array(STATE_LENGTH); @@ -4953,17 +4926,17 @@ JSSMS.Z80.prototype = {reset:function() { this.exBC(); this.exDE(); this.exHL(); - return state + return state; }, setState:function(state) { var temp = state[0]; this.pc = temp & 65535; this.sp = temp >> 16 & 65535; temp = state[1]; - this.iff1 = (temp & 1) != 0; - this.iff2 = (temp & 2) != 0; - this.halt = (temp & 4) != 0; - this.EI_inst = (temp & 8) != 0; - this.interruptLine = (temp & 16) != 0; + this.iff1 = (temp & 1) !== 0; + this.iff2 = (temp & 2) !== 0; + this.halt = (temp & 4) !== 0; + this.EI_inst = (temp & 8) !== 0; + this.interruptLine = (temp & 16) !== 0; temp = state[2]; this.a = temp & 255; this.a2 = temp >> 8 & 255; @@ -4991,7 +4964,7 @@ JSSMS.Z80.prototype = {reset:function() { this.interruptVector = temp >> 24 & 255; this.exBC(); this.exDE(); - this.exHL() + this.exHL(); }}; JSSMS.Debugger = function() { }; @@ -4999,7 +4972,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { this.instructions = []; this.main.ui.updateStatus("Parsing instructions..."); this.parseInstructions(); - this.main.ui.updateStatus("Instructions parsed") + this.main.ui.updateStatus("Instructions parsed"); }, parseInstructions:function() { JSSMS.Utils.console.time("Instructions parsing"); var romSize = PAGE_SIZE * this.rom.length; @@ -5009,71 +4982,71 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { var addresses = []; var entryPoints = [0, 56, 102]; entryPoints.forEach(function(entryPoint) { - addresses.push(entryPoint) + addresses.push(entryPoint); }); - while(addresses.length) { + while (addresses.length) { currentAddress = addresses.shift(); - if(this.instructions[currentAddress]) { - continue + if (this.instructions[currentAddress]) { + continue; } - if(currentAddress >= romSize || currentAddress >> 10 >= 65) { + if (currentAddress >= romSize || currentAddress >> 10 >= 65) { JSSMS.Utils.console.log("Invalid address", JSSMS.Utils.toHex(currentAddress)); - continue + continue; } instruction = this.disassemble(currentAddress); this.instructions[currentAddress] = instruction; - if(instruction.nextAddress != null) { - addresses.push(instruction.nextAddress) + if (instruction.nextAddress !== null) { + addresses.push(instruction.nextAddress); } - if(instruction.target != null) { - addresses.push(instruction.target) + if (instruction.target !== null) { + addresses.push(instruction.target); } } entryPoints.forEach(function(entryPoint) { - if(!this.instructions[entryPoint]) { - return + if (!this.instructions[entryPoint]) { + return; } - this.instructions[entryPoint].isJumpTarget = true + this.instructions[entryPoint].isJumpTarget = true; }, this); - for(;i < romSize;i++) { - if(!this.instructions[i]) { - continue + for (;i < romSize;i++) { + if (!this.instructions[i]) { + continue; } - if(this.instructions[i].nextAddress != null && this.instructions[this.instructions[i].nextAddress]) { - this.instructions[this.instructions[i].nextAddress].jumpTargetNb++ + if (this.instructions[i].nextAddress !== null && this.instructions[this.instructions[i].nextAddress]) { + this.instructions[this.instructions[i].nextAddress].jumpTargetNb++; } - if(this.instructions[i].target != null) { - if(this.instructions[this.instructions[i].target]) { + if (this.instructions[i].target !== null) { + if (this.instructions[this.instructions[i].target]) { this.instructions[this.instructions[i].target].isJumpTarget = true; - this.instructions[this.instructions[i].target].jumpTargetNb++ - }else { - JSSMS.Utils.console.log("Invalid target address", JSSMS.Utils.toHex(this.instructions[i].target)) + this.instructions[this.instructions[i].target].jumpTargetNb++; + } else { + JSSMS.Utils.console.log("Invalid target address", JSSMS.Utils.toHex(this.instructions[i].target)); } } } - JSSMS.Utils.console.timeEnd("Instructions parsing") + JSSMS.Utils.console.timeEnd("Instructions parsing"); }, writeGraphViz:function() { JSSMS.Utils.console.time("DOT generation"); var tree = this.instructions; var INDENT = " "; var content = ["digraph G {"]; - for(var i = 0, length = tree.length;i < length;i++) { - if(!tree[i]) { - continue + for (var i = 0, length = tree.length;i < length;i++) { + if (!tree[i]) { + continue; } content.push(INDENT + i + ' [label="' + tree[i].label + '"];'); - if(tree[i].target != null) { - content.push(INDENT + i + " -> " + tree[i].target + ";") + if (tree[i].target !== null) { + content.push(INDENT + i + " -> " + tree[i].target + ";"); } - if(tree[i].nextAddress != null) { - content.push(INDENT + i + " -> " + tree[i].nextAddress + ";") + if (tree[i].nextAddress !== null) { + content.push(INDENT + i + " -> " + tree[i].nextAddress + ";"); } } content.push("}"); content = content.join("\n"); content = content.replace(/ 0 \[label="/, ' 0 [style=filled,color="#CC0000",label="'); JSSMS.Utils.console.timeEnd("DOT generation"); - return content + return content; }, writeJavaScript:function() { JSSMS.Utils.console.time("JavaScript generation"); var tree = this.instructions; @@ -5086,11 +5059,11 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { var pageNumber = 0; var i = 0, length = 0; var code = ['"": {', '"": function() {', 'throw "Bad address: " + JSSMS.Utils.toHex(this.pc);']; - for(i = 0, length = tree.length;i < length;i++) { - if(!tree[i]) { - continue + for (i = 0, length = tree.length;i < length;i++) { + if (!tree[i]) { + continue; } - if(prevAddress <= pageBreakPoint && tree[i].address >= pageBreakPoint) { + if (prevAddress <= pageBreakPoint && tree[i].address >= pageBreakPoint) { code.push("this.pc = " + toHex(tree[i].address) + ";"); code.push("}"); code.push("},"); @@ -5099,27 +5072,27 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { code.push('throw "Bad address: " + JSSMS.Utils.toHex(this.pc);'); breakNeeded = true; pageNumber++; - pageBreakPoint = pageNumber * PAGE_SIZE + pageBreakPoint = pageNumber * PAGE_SIZE; } - if(tree[i].isJumpTarget || prevNextAddress != tree[i].address || breakNeeded) { + if (tree[i].isJumpTarget || (prevNextAddress != tree[i].address || breakNeeded)) { insertTStates(); - if(prevNextAddress && !breakNeeded) { - code.push("this.pc = " + toHex(prevNextAddress) + ";") + if (prevNextAddress && !breakNeeded) { + code.push("this.pc = " + toHex(prevNextAddress) + ";"); } code.push("},"); - code.push("" + toHex(tree[i].address) + ": function(temp, location) {") + code.push("" + toHex(tree[i].address) + ": function(temp, location) {"); } code.push("// " + tree[i].label); breakNeeded = tree[i].code.substr(-7) == "return;"; tstates += getTotalTStates(tree[i].opcodes); - if(/return;/.test(tree[i].code) || /this\.tstates/.test(tree[i].code)) { - insertTStates() + if (/return;/.test(tree[i].code) || /this\.tstates/.test(tree[i].code)) { + insertTStates(); } - if(tree[i].code != "") { - code.push(tree[i].code) + if (tree[i].code !== "") { + code.push(tree[i].code); } prevAddress = tree[i].address; - prevNextAddress = tree[i].nextAddress + prevNextAddress = tree[i].nextAddress; } code.push("}"); code.push("}"); @@ -5135,10 +5108,10 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 221: ; case 253: - if(opcodes.length == 2) { - tstates = OP_DD_STATES[opcodes[1]] - }else { - tstates = OP_INDEX_CB_STATES[opcodes[2]] + if (opcodes.length == 2) { + tstates = OP_DD_STATES[opcodes[1]]; + } else { + tstates = OP_INDEX_CB_STATES[opcodes[2]]; } break; case 237: @@ -5146,15 +5119,15 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { break; default: tstates = OP_STATES[opcodes[0]]; - break + break; } - return tstates + return tstates; } function insertTStates() { - if(tstates) { - code.push("this.tstates -= " + toHex(tstates) + ";") + if (tstates) { + code.push("this.tstates -= " + toHex(tstates) + ";"); } - tstates = 0 + tstates = 0; } }, disassemble:function(address) { var toHex = JSSMS.Utils.toHex; @@ -5688,10 +5661,10 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { break; case 118: inst = "HALT"; - if(HALT_SPEEDUP) { - code = "this.tstates = 0x00;" - }else { - code = "" + if (HALT_SPEEDUP) { + code = "this.tstates = 0x00;"; + } else { + code = ""; } code += "this.halt = true; this.pc = " + toHex(address - 1) + "; return;"; break; @@ -5989,7 +5962,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { break; case 192: inst = "RET NZ"; - code = "if ((this.f & F_ZERO) == 0x00) {" + "this.tstates -= 0x06;" + "this.pc = this.readMemWord(this.sp);" + "this.sp += 0x02;" + "return;" + "}"; + code = "if ((this.f & F_ZERO) === 0x00) {" + "this.tstates -= 0x06;" + "this.pc = this.readMemWord(this.sp);" + "this.sp += 0x02;" + "return;" + "}"; break; case 193: inst = "POP BC"; @@ -5998,7 +5971,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 194: target = this.readRom16bit(address); inst = "JP NZ,(" + toHex(target) + ")"; - code = "if ((this.f & F_ZERO) == 0x00) {" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; + code = "if ((this.f & F_ZERO) === 0x00) {" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; address += 2; break; case 195: @@ -6010,7 +5983,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 196: target = this.readRom16bit(address); inst = "CALL NZ (" + toHex(target) + ")"; - code = "if ((this.f & F_ZERO) == 0x00) {" + "this.tstates -= 0x07;" + "this.push1(" + toHex(address + 2) + ");" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; + code = "if ((this.f & F_ZERO) === 0x00) {" + "this.tstates -= 0x07;" + "this.push1(" + toHex(address + 2) + ");" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; address += 2; break; case 197: @@ -6075,7 +6048,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { break; case 208: inst = "RET NC"; - code = "if ((this.f & F_CARRY) == 0x00) {" + "this.tstates -= 0x06;" + "this.pc = this.readMemWord(this.sp);" + "this.sp += 0x02;" + "return;" + "}"; + code = "if ((this.f & F_CARRY) === 0x00) {" + "this.tstates -= 0x06;" + "this.pc = this.readMemWord(this.sp);" + "this.sp += 0x02;" + "return;" + "}"; break; case 209: inst = "POP DE"; @@ -6084,7 +6057,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 210: target = this.readRom16bit(address); inst = "JP NC,(" + toHex(target) + ")"; - code = "if ((this.f & F_CARRY) == 0x00) {" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; + code = "if ((this.f & F_CARRY) === 0x00) {" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; address += 2; break; case 211: @@ -6096,7 +6069,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 212: target = this.readRom16bit(address); inst = "CALL NC (" + toHex(target) + ")"; - code = "if ((this.f & F_CARRY) == 0x00) {" + "this.tstates -= 0x07;" + "this.push1(" + toHex(address + 2) + ");" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; + code = "if ((this.f & F_CARRY) === 0x00) {" + "this.tstates -= 0x07;" + "this.push1(" + toHex(address + 2) + ");" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; address += 2; break; case 213: @@ -6160,7 +6133,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { break; case 224: inst = "RET PO"; - code = "if ((this.f & F_PARITY) == 0x00) {" + "this.tstates -= 0x06;" + "this.pc = this.readMemWord(this.sp);" + "this.sp += 0x02;" + "return;" + "}"; + code = "if ((this.f & F_PARITY) === 0x00) {" + "this.tstates -= 0x06;" + "this.pc = this.readMemWord(this.sp);" + "this.sp += 0x02;" + "return;" + "}"; break; case 225: inst = "POP HL"; @@ -6169,7 +6142,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 226: target = this.readRom16bit(address); inst = "JP PO,(" + toHex(target) + ")"; - code = "if ((this.f & F_PARITY) == 0x00) {" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; + code = "if ((this.f & F_PARITY) === 0x00) {" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; address += 2; break; case 227: @@ -6179,7 +6152,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 228: target = this.readRom16bit(address); inst = "CALL PO (" + toHex(target) + ")"; - code = "if ((this.f & F_PARITY) == 0x00) {" + "this.tstates -= 0x07;" + "this.push1(" + toHex(address + 2) + ");" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; + code = "if ((this.f & F_PARITY) === 0x00) {" + "this.tstates -= 0x07;" + "this.push1(" + toHex(address + 2) + ");" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; address += 2; break; case 229: @@ -6243,7 +6216,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { break; case 240: inst = "RET P"; - code = "if ((this.f & F_SIGN) == 0x00) {" + "this.tstates -= 0x06;" + "this.pc = this.readMemWord(this.sp);" + "this.sp += 0x02;" + "return;" + "}"; + code = "if ((this.f & F_SIGN) === 0x00) {" + "this.tstates -= 0x06;" + "this.pc = this.readMemWord(this.sp);" + "this.sp += 0x02;" + "return;" + "}"; break; case 241: inst = "POP AF"; @@ -6252,7 +6225,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 242: target = this.readRom16bit(address); inst = "JP P,(" + toHex(target) + ")"; - code = "if ((this.f & F_SIGN) == 0x00) {" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; + code = "if ((this.f & F_SIGN) === 0x00) {" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; address += 2; break; case 243: @@ -6262,7 +6235,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 244: target = this.readRom16bit(address); inst = "CALL P (" + toHex(target) + ")"; - code = "if ((this.f & F_SIGN) == 0x00) {" + "this.tstates -= 0x07;" + "this.push1(" + toHex(address + 2) + ");" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; + code = "if ((this.f & F_SIGN) === 0x00) {" + "this.tstates -= 0x07;" + "this.push1(" + toHex(address + 2) + ");" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; address += 2; break; case 245: @@ -6321,9 +6294,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { target = 56; inst = "RST " + toHex(target); code = "this.push1(" + toHex(address) + "); this.pc = " + toHex(target) + "; return;"; - break + break; } - return Instruction({opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address, target:target}) + return Instruction({opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address, target:target}); }, getCB:function(address) { var opcode = this.readRom8bit(address); var opcodesArray = [opcode]; @@ -7283,9 +7256,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 255: inst = "SET 7,A"; code = "this.a |= BIT_7;"; - break + break; } - return{opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address} + return{opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address}; }, getED:function(address) { var toHex = JSSMS.Utils.toHex; var opcode = this.readRom8bit(address); @@ -7439,10 +7412,10 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { break; case 95: inst = "LD A,R"; - if(REFRESH_EMULATION) { - code = "this.a = this.r;" - }else { - code = "this.a = JSSMS.Utils.rndInt(0xFF);" + if (REFRESH_EMULATION) { + code = "this.a = this.r;"; + } else { + code = "this.a = JSSMS.Utils.rndInt(0xFF);"; } code += "this.f = this.f & F_CARRY | this.SZ_TABLE[this.a] | (this.iff2 ? F_PARITY : 0x00);"; break; @@ -7530,15 +7503,15 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { break; case 161: inst = "CPI"; - code = "temp = (this.f & F_CARRY) | F_NEGATIVE;" + "this.cp_a(this.readMem(this.getHL()));" + "this.incHL();" + "this.decBC();" + "temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);" + "this.f = (this.f & 0xF8) | temp;"; + code = "temp = (this.f & F_CARRY) | F_NEGATIVE;" + "this.cp_a(this.readMem(this.getHL()));" + "this.incHL();" + "this.decBC();" + "temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);" + "this.f = (this.f & 0xF8) | temp;"; break; case 162: inst = "INI"; - code = "temp = this.port.in_(this.c);" + "this.writeMem(this.getHL(), temp);" + "this.b = this.dec8(this.b);" + "this.incHL();" + "if ((temp & 0x80) == 0x80) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; + code = "temp = this.port.in_(this.c);" + "this.writeMem(this.getHL(), temp);" + "this.b = this.dec8(this.b);" + "this.incHL();" + "if ((temp & 0x80) === 0x80) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; break; case 163: inst = "OUTI"; - code = "temp = this.readMem(this.getHL());" + "this.port.out(this.c, temp);" + "this.incHL();" + "this.b = this.dec8(this.b);" + "if (this.l + temp > 0xFF) {" + "this.f |= F_CARRY; this.f |= F_HALFCARRY;" + "} else {" + "this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;" + "}" + "if ((temp & 0x80) == 0x80) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; + code = "temp = this.readMem(this.getHL());" + "this.port.out(this.c, temp);" + "this.incHL();" + "this.b = this.dec8(this.b);" + "if (this.l + temp > 0xFF) {" + "this.f |= F_CARRY; this.f |= F_HALFCARRY;" + "} else {" + "this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;" + "}" + "if ((temp & 0x80) === 0x80) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; break; case 168: inst = "LDD"; @@ -7552,43 +7525,43 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { break; case 171: inst = "OUTD"; - code = "temp = this.readMem(this.getHL());" + "this.port.out(this.c, temp);" + "this.decHL();" + "this.b = this.dec8(this.b);" + "if (this.l + temp > 0xFF) {" + "this.f |= F_CARRY; this.f |= F_HALFCARRY;" + "} else {" + "this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;" + "}" + "if ((temp & 0x80) == 0x80) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; + code = "temp = this.readMem(this.getHL());" + "this.port.out(this.c, temp);" + "this.decHL();" + "this.b = this.dec8(this.b);" + "if (this.l + temp > 0xFF) {" + "this.f |= F_CARRY; this.f |= F_HALFCARRY;" + "} else {" + "this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;" + "}" + "if ((temp & 0x80) === 0x80) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; break; case 176: inst = "LDIR"; code = "this.writeMem(this.getDE(), this.readMem(this.getHL()));" + "this.incDE();" + "this.incHL();" + "this.decBC();"; - if(ACCURATE_INTERRUPT_EMULATION) { + if (ACCURATE_INTERRUPT_EMULATION) { target = address - 2; - code += "if (this.getBC() != 0x00) {" + "this.tstates -= 0x05;" + "this.f |= F_PARITY;" + "return;" + "} else {" - }else { - code += "for (;this.getBC() != 0x00; this.f |= F_PARITY, this.tstates -= 5) {" + "this.writeMem(this.getDE(), this.readMem(this.getHL()));" + "this.incDE();this.incHL();this.decBC();" + "}" + "if (!(this.getBC() != 0x00)) {" + code += "if (this.getBC() != 0x00) {" + "this.tstates -= 0x05;" + "this.f |= F_PARITY;" + "return;" + "} else {"; + } else { + code += "for (;this.getBC() != 0x00; this.f |= F_PARITY, this.tstates -= 5) {" + "this.writeMem(this.getDE(), this.readMem(this.getHL()));" + "this.incDE();this.incHL();this.decBC();" + "}" + "if (!(this.getBC() != 0x00)) {"; } code += "this.f &= ~ F_PARITY;" + "}" + "this.f &= ~ F_NEGATIVE; this.f &= ~ F_HALFCARRY;"; break; case 177: inst = "CPIR"; - code = "temp = (this.f & F_CARRY) | F_NEGATIVE;" + "this.cp_a(this.readMem(this.getHL()));" + "this.incHL();" + "this.decBC();" + "temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);"; - if(ACCURATE_INTERRUPT_EMULATION) { + code = "temp = (this.f & F_CARRY) | F_NEGATIVE;" + "this.cp_a(this.readMem(this.getHL()));" + "this.incHL();" + "this.decBC();" + "temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);"; + if (ACCURATE_INTERRUPT_EMULATION) { target = address - 2; - code += "if ((temp & F_PARITY) != 0x00 && (this.f & F_ZERO) == 0x00) {" + "this.tstates -= 0x05;" + "this.pc = " + toHex(target) + ";" + "return;" + "}" - }else { - code += "for (;(temp & F_PARITY) != 0x00 && (this.f & F_ZERO) == 0x00; this.tstates -= 5) {" + "temp = (this.f & F_CARRY) | F_NEGATIVE;" + "this.cp_a(this.readMem(this.getHL()));" + "this.incHL();" + "this.decBC();" + "temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);" + "}" + code += "if ((temp & F_PARITY) != 0x00 && (this.f & F_ZERO) === 0x00) {" + "this.tstates -= 0x05;" + "this.pc = " + toHex(target) + ";" + "return;" + "}"; + } else { + code += "for (;(temp & F_PARITY) != 0x00 && (this.f & F_ZERO) === 0x00; this.tstates -= 5) {" + "temp = (this.f & F_CARRY) | F_NEGATIVE;" + "this.cp_a(this.readMem(this.getHL()));" + "this.incHL();" + "this.decBC();" + "temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);" + "}"; } code += "this.f = (this.f & 0xF8) | temp;"; break; case 178: target = address - 2; inst = "INIR"; - code = "temp = this.port.in_(this.c);" + "this.writeMem(this.getHL(), temp);" + "this.b = this.dec8(this.b);" + "this.incHL();" + "if (this.b != 0x00) {" + "this.tstates -= 0x05;" + "return;" + "}" + "if ((temp & 0x80) == 0x80) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; + code = "temp = this.port.in_(this.c);" + "this.writeMem(this.getHL(), temp);" + "this.b = this.dec8(this.b);" + "this.incHL();" + "if (this.b != 0x00) {" + "this.tstates -= 0x05;" + "return;" + "}" + "if ((temp & 0x80) === 0x80) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; break; case 179: inst = "OTIR"; code = "temp = this.readMem(this.getHL());" + "this.port.out(this.c, temp);" + "this.b = this.dec8(this.b);" + "this.incHL();"; - if(ACCURATE_INTERRUPT_EMULATION) { + if (ACCURATE_INTERRUPT_EMULATION) { target = address - 2; - code += "if (this.b != 0x00) {" + "this.tstates -= 0x05;" + "return;" + "}" - }else { - code += "for (;this.b != 0x00; this.tstates -= 5) {" + "temp = this.readMem(this.getHL());" + "this.port.out(this.c, temp);" + "this.b = this.dec8(this.b);" + "this.incHL();" + "}" + code += "if (this.b != 0x00) {" + "this.tstates -= 0x05;" + "return;" + "}"; + } else { + code += "for (;this.b != 0x00; this.tstates -= 5) {" + "temp = this.readMem(this.getHL());" + "this.port.out(this.c, temp);" + "this.b = this.dec8(this.b);" + "this.incHL();" + "}"; } code += "if (this.l + temp > 0xFF) {" + "this.f |= F_CARRY; this.f |= F_HALFCARRY;" + "} else {" + "this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;" + "}" + "if ((temp & 0x80) != 0x00) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; break; @@ -7607,9 +7580,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { target = address - 2; inst = "OTDR"; code = "temp = this.readMem(this.getHL());" + "this.port.out(this.c, temp);" + "this.b = this.dec8(this.b);" + "this.decHL();" + "if (this.b != 0x00) {" + "this.tstates -= 0x05;" + "return;" + "}" + "if (this.l + temp > 0xFF) {" + "this.f |= F_CARRY; this.f |= F_HALFCARRY;" + "} else {" + "this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;" + "}" + "if ((temp & 0x80) != 0x00) {" + "this.f |= F_NEGATIVE;" + "} else {" + "this.f &= ~ F_NEGATIVE;" + "}"; - break + break; } - return{opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address, target:target} + return{opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address, target:target}; }, getIndex:function(index, address) { var toHex = JSSMS.Utils.toHex; var opcode = this.readRom8bit(address); @@ -7993,9 +7966,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 249: inst = "LD SP," + index; code = "this.sp = this.get" + index + "();"; - break + break; } - return{opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address} + return{opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address}; }, getIndexCB:function(index, address) { var toHex = JSSMS.Utils.toHex; var currAddr = address; @@ -8612,68 +8585,64 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { ; case 255: inst = "SET 7,(" + index + ")"; - break + break; } address++; - return{opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address} + return{opcode:opcode, opcodes:opcodesArray, inst:inst, code:code, address:currAddr, nextAddress:address}; }, getIndexOpIX:function(opcode) { - return this.getIndex("IX", opcode) + return this.getIndex("IX", opcode); }, getIndexOpIY:function(opcode) { - return this.getIndex("IY", opcode) + return this.getIndex("IY", opcode); }, readRom8bit:function(address) { - if(SUPPORT_DATAVIEW) { - return this.rom[address >> 14].getUint8(address & 16383) - }else { - return this.rom[address >> 14][address & 16383] & 255 + if (SUPPORT_DATAVIEW) { + return this.rom[address >> 14].getUint8(address & 16383); + } else { + return this.rom[address >> 14][address & 16383] & 255; } }, readRom16bit:function(address) { - if(SUPPORT_DATAVIEW) { - if((address & 16383) < 16383) { - return this.rom[address >> 14].getUint16(address & 16383, LITTLE_ENDIAN) - }else { - return this.rom[address >> 14].getUint8(address & 16383) | this.rom[++address >> 14].getUint8(address & 16383) << 8 + if (SUPPORT_DATAVIEW) { + if ((address & 16383) < 16383) { + return this.rom[address >> 14].getUint16(address & 16383, LITTLE_ENDIAN); + } else { + return this.rom[address >> 14].getUint8(address & 16383) | this.rom[++address >> 14].getUint8(address & 16383) << 8; } - }else { - return this.rom[address >> 14][address & 16383] & 255 | (this.rom[++address >> 14][address & 16383] & 255) << 8 + } else { + return this.rom[address >> 14][address & 16383] & 255 | (this.rom[++address >> 14][address & 16383] & 255) << 8; } }, peepholePortOut:function(port) { - return"this.port.out(" + JSSMS.Utils.toHex(port) + ", this.a);"; - if(this.main.is_gg && port < 7) { - return"" + if (this.main.is_gg && port < 7) { + return ""; } switch(port & 193) { case 1: - if(LIGHTGUN) { - return"var value = this.a;" + "this.port.oldTH = (this.port.getTH(PORT_A) != 0x00 || this.port.getTH(PORT_B) != 0x00);" + "this.port.writePort(PORT_A, value);" + "this.port.writePort(PORT_B, value >> 2);" + "if (!this.port.oldTH && (this.port.getTH(PORT_A) != 0x00 || this.port.getTH(PORT_B) != 0x00)) {" + "this.port.hCounter = this.port.getHCount();" + "}" - }else { + if (LIGHTGUN) { + return "var value = this.a;" + "this.port.oldTH = (this.port.getTH(PORT_A) != 0x00 || this.port.getTH(PORT_B) != 0x00);" + "this.port.writePort(PORT_A, value);" + "this.port.writePort(PORT_B, value >> 2);" + "if (!this.port.oldTH && (this.port.getTH(PORT_A) != 0x00 || this.port.getTH(PORT_B) != 0x00)) {" + "this.port.hCounter = this.port.getHCount();" + "}"; + } else { var code = "var value = this.a;" + "this.port.ioPorts[0] = (value & 0x20) << 1;" + "this.port.ioPorts[1] = (value & 0x80);"; - if(this.port.europe == 0) { - code += "this.port.ioPorts[0] = ~this.port.ioPorts[0];" + "this.port.ioPorts[1] = ~this.port.ioPorts[1];" + if (this.port.europe === 0) { + code += "this.port.ioPorts[0] = ~this.port.ioPorts[0];" + "this.port.ioPorts[1] = ~this.port.ioPorts[1];"; } - return code + return code; } break; case 128: - return"this.vdp.dataWrite(this.a);"; - break; + return "this.vdp.dataWrite(this.a);"; case 129: - return"this.vdp.controlWrite(this.a);"; - break; + return "this.vdp.controlWrite(this.a);"; case 64: ; case 65: - if(this.main.soundEnabled) { - return"this.psg.write(this.a);" + if (this.main.soundEnabled) { + return "this.psg.write(this.a);"; } - break + break; } - return"" + return ""; }, peepholePortIn:function(port) { - return"this.a = this.port.in_(" + JSSMS.Utils.toHex(port) + ");"; - if(this.main.is_gg && port < 7) { + if (this.main.is_gg && port < 7) { switch(port) { case 0: - return"this.a = (this.port.keyboard.ggstart & 0xBF) | this.port.europe;"; + return "this.a = (this.port.keyboard.ggstart & 0xBF) | this.port.europe;"; case 1: ; case 2: @@ -8683,47 +8652,48 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function() { case 4: ; case 5: - return"this.a = 0x00;"; + return "this.a = 0x00;"; case 6: - return"this.a = 0xFF;" + return "this.a = 0xFF;"; } } switch(port & 193) { case 64: - return"this.a = this.vdp.getVCount();"; + return "this.a = this.vdp.getVCount();"; case 65: - return"this.a = this.port.hCounter;"; + return "this.a = this.port.hCounter;"; case 128: - return"this.a = this.vdp.dataRead();"; + return "this.a = this.vdp.dataRead();"; case 129: - return"this.a = this.vdp.controlRead();"; + return "this.a = this.vdp.controlRead();"; case 192: - return"this.a = this.port.keyboard.controller1;"; + return "this.a = this.port.keyboard.controller1;"; case 193: - if(LIGHTGUN) { - return"if (this.port.keyboard.lightgunClick)" + "this.port.lightPhaserSync();" + "this.a = (this.port.keyboard.controller2 & 0x3F) | (this.port.getTH(PORT_A) != 0x00 ? 0x40 : 0x00) | (this.port.getTH(PORT_B) != 0x00 ? 0x80 : 0x00);" - }else { - return"this.a = (this.port.keyboard.controller2 & 0x3F) | this.port.ioPorts[0] | this.port.ioPorts[1];" + if (LIGHTGUN) { + return "if (this.port.keyboard.lightgunClick)" + "this.port.lightPhaserSync();" + "this.a = (this.port.keyboard.controller2 & 0x3F) | (this.port.getTH(PORT_A) != 0x00 ? 0x40 : 0x00) | (this.port.getTH(PORT_B) != 0x00 ? 0x80 : 0x00);"; + } else { + return "this.a = (this.port.keyboard.controller2 & 0x3F) | this.port.ioPorts[0] | this.port.ioPorts[1];"; } + ; } - return"this.a = 0xFF;" + return "this.a = 0xFF;"; }}; function Instruction(options) { var toHex = JSSMS.Utils.toHex; var defaultInstruction = {address:0, hexAddress:"", opcode:0, opcodes:[], inst:"", code:"", nextAddress:null, target:null, isJumpTarget:false, jumpTargetNb:0, label:""}; var prop; var hexOpcodes = ""; - for(prop in defaultInstruction) { - if(options[prop] != undefined) { - defaultInstruction[prop] = options[prop] + for (prop in defaultInstruction) { + if (options[prop] !== undefined) { + defaultInstruction[prop] = options[prop]; } } defaultInstruction.hexAddress = toHex(defaultInstruction.address); - if(defaultInstruction.opcodes.length) { - hexOpcodes = defaultInstruction.opcodes.map(toHex).join(" ") + " " + if (defaultInstruction.opcodes.length) { + hexOpcodes = defaultInstruction.opcodes.map(toHex).join(" ") + " "; } defaultInstruction.label = defaultInstruction.hexAddress + " " + hexOpcodes + defaultInstruction.inst; - return defaultInstruction + return defaultInstruction; } ;var KEY_UP = 1; var KEY_DOWN = 2; @@ -8740,16 +8710,16 @@ JSSMS.Keyboard = function(sms) { this.lightgunX = 0; this.lightgunY = 0; this.lightgunClick = false; - this.lightgunEnabled = false + this.lightgunEnabled = false; }; JSSMS.Keyboard.prototype = {reset:function() { this.controller1 = 255; this.controller2 = 255; this.ggstart = 255; - if(LIGHTGUN) { - this.lightgunClick = false + if (LIGHTGUN) { + this.lightgunClick = false; } - this.pause_button = false + this.pause_button = false; }, keydown:function(evt) { switch(evt.keyCode) { case 38: @@ -8771,10 +8741,10 @@ JSSMS.Keyboard.prototype = {reset:function() { this.controller1 &= ~KEY_FIRE2; break; case 13: - if(this.main.is_sms) { - this.main.pause_button = true - }else { - this.ggstart &= ~128 + if (this.main.is_sms) { + this.main.pause_button = true; + } else { + this.ggstart &= ~128; } break; case 104: @@ -8799,9 +8769,9 @@ JSSMS.Keyboard.prototype = {reset:function() { this.controller2 &= ~KEY_START; break; default: - return + return; } - evt.preventDefault() + evt.preventDefault(); }, keyup:function(evt) { switch(evt.keyCode) { case 38: @@ -8823,8 +8793,8 @@ JSSMS.Keyboard.prototype = {reset:function() { this.controller1 |= KEY_FIRE2; break; case 13: - if(!this.main.is_sms) { - this.ggstart |= 128 + if (!this.main.is_sms) { + this.ggstart |= 128; } break; case 104: @@ -8849,9 +8819,9 @@ JSSMS.Keyboard.prototype = {reset:function() { this.controller2 |= KEY_START; break; default: - return + return; } - evt.preventDefault() + evt.preventDefault(); }}; var SCALE = 8; var NO_ANTIALIAS = Number.MIN_VALUE; @@ -8871,7 +8841,7 @@ JSSMS.SN76489 = function(sms) { this.freqPos = new Array(3); this.noiseFreq = 16; this.noiseShiftReg = SHIFT_RESET; - this.outputChannel = new Array(4) + this.outputChannel = new Array(4); }; JSSMS.SN76489.prototype = {init:function(clockSpeed, sampleRate) { this.clock = (clockSpeed << SCALE) / 16 / sampleRate; @@ -8879,24 +8849,24 @@ JSSMS.SN76489.prototype = {init:function(clockSpeed, sampleRate) { this.regLatch = 0; this.noiseFreq = 16; this.noiseShiftReg = SHIFT_RESET; - for(var i = 0;i < 4;i++) { + for (var i = 0;i < 4;i++) { this.reg[i << 1] = 1; this.reg[(i << 1) + 1] = 15; this.freqCounter[i] = 0; this.freqPolarity[i] = 1; - if(i != 3) { - this.freqPos[i] = NO_ANTIALIAS + if (i != 3) { + this.freqPos[i] = NO_ANTIALIAS; } } }, write:function(value) { - if((value & 128) != 0) { + if ((value & 128) !== 0) { this.regLatch = value >> 4 & 7; - this.reg[this.regLatch] = this.reg[this.regLatch] & 1008 | value & 15 - }else { - if(this.regLatch == 0 || this.regLatch == 2 || this.regLatch == 4) { - this.reg[this.regLatch] = this.reg[this.regLatch] & 15 | (value & 63) << 4 - }else { - this.reg[this.regLatch] = value & 15 + this.reg[this.regLatch] = this.reg[this.regLatch] & 1008 | value & 15; + } else { + if (this.regLatch === 0 || (this.regLatch == 2 || this.regLatch == 4)) { + this.reg[this.regLatch] = this.reg[this.regLatch] & 15 | (value & 63) << 4; + } else { + this.reg[this.regLatch] = value & 15; } } switch(this.regLatch) { @@ -8905,34 +8875,34 @@ JSSMS.SN76489.prototype = {init:function(clockSpeed, sampleRate) { case 2: ; case 4: - if(this.reg[this.regLatch] == 0) { - this.reg[this.regLatch] = 1 + if (this.reg[this.regLatch] === 0) { + this.reg[this.regLatch] = 1; } break; case 6: this.noiseFreq = 16 << (this.reg[6] & 3); this.noiseShiftReg = SHIFT_RESET; - break + break; } }, update:function(offset, samplesToGenerate) { var buffer = []; var sample = 0; var i = 0; - for(;sample < samplesToGenerate;sample++) { - for(i = 0;i < 3;i++) { - if(this.freqPos[i] != NO_ANTIALIAS) { - this.outputChannel[i] = PSG_VOLUME[this.reg[(i << 1) + 1]] * this.freqPos[i] >> SCALE - }else { - this.outputChannel[i] = PSG_VOLUME[this.reg[(i << 1) + 1]] * this.freqPolarity[i] + for (;sample < samplesToGenerate;sample++) { + for (i = 0;i < 3;i++) { + if (this.freqPos[i] != NO_ANTIALIAS) { + this.outputChannel[i] = PSG_VOLUME[this.reg[(i << 1) + 1]] * this.freqPos[i] >> SCALE; + } else { + this.outputChannel[i] = PSG_VOLUME[this.reg[(i << 1) + 1]] * this.freqPolarity[i]; } } this.outputChannel[3] = PSG_VOLUME[this.reg[7]] * (this.noiseShiftReg & 1) << 1; var output = this.outputChannel[0] + this.outputChannel[1] + this.outputChannel[2] + this.outputChannel[3]; - if(output > HI_BOUNDARY) { - output = HI_BOUNDARY - }else { - if(output < LO_BOUNDARY) { - output = LO_BOUNDARY + if (output > HI_BOUNDARY) { + output = HI_BOUNDARY; + } else { + if (output < LO_BOUNDARY) { + output = LO_BOUNDARY; } } buffer[offset + sample] = output; @@ -8943,44 +8913,44 @@ JSSMS.SN76489.prototype = {init:function(clockSpeed, sampleRate) { this.freqCounter[0] -= clockCycles; this.freqCounter[1] -= clockCycles; this.freqCounter[2] -= clockCycles; - if(this.noiseFreq == 128) { - this.freqCounter[3] = this.freqCounter[2] - }else { - this.freqCounter[3] -= clockCycles + if (this.noiseFreq == 128) { + this.freqCounter[3] = this.freqCounter[2]; + } else { + this.freqCounter[3] -= clockCycles; } - for(i = 0;i < 3;i++) { + for (i = 0;i < 3;i++) { var counter = this.freqCounter[i]; - if(counter <= 0) { + if (counter <= 0) { var tone = this.reg[i << 1]; - if(tone > 6) { + if (tone > 6) { this.freqPos[i] = (clockCyclesScaled - this.clockFrac + (2 << SCALE) * counter << SCALE) * this.freqPolarity[i] / (clockCyclesScaled + this.clockFrac); - this.freqPolarity[i] = -this.freqPolarity[i] - }else { + this.freqPolarity[i] = -this.freqPolarity[i]; + } else { this.freqPolarity[i] = 1; - this.freqPos[i] = NO_ANTIALIAS + this.freqPos[i] = NO_ANTIALIAS; } - this.freqCounter[i] += tone * (clockCycles / tone + 1) - }else { - this.freqPos[i] = NO_ANTIALIAS + this.freqCounter[i] += tone * (clockCycles / tone + 1); + } else { + this.freqPos[i] = NO_ANTIALIAS; } } - if(this.freqCounter[3] <= 0) { + if (this.freqCounter[3] <= 0) { this.freqPolarity[3] = -this.freqPolarity[3]; - if(this.noiseFreq != 128) { - this.freqCounter[3] += this.noiseFreq * (clockCycles / this.noiseFreq + 1) + if (this.noiseFreq != 128) { + this.freqCounter[3] += this.noiseFreq * (clockCycles / this.noiseFreq + 1); } - if(this.freqPolarity[3] == 1) { + if (this.freqPolarity[3] == 1) { var feedback = 0; - if((this.reg[6] & 4) != 0) { - feedback = (this.noiseShiftReg & FEEDBACK_PATTERN) != 0 && (this.noiseShiftReg & FEEDBACK_PATTERN ^ FEEDBACK_PATTERN) != 0 ? 1 : 0 - }else { - feedback = this.noiseShiftReg & 1 + if ((this.reg[6] & 4) !== 0) { + feedback = (this.noiseShiftReg & FEEDBACK_PATTERN) !== 0 && (this.noiseShiftReg & FEEDBACK_PATTERN ^ FEEDBACK_PATTERN) !== 0 ? 1 : 0; + } else { + feedback = this.noiseShiftReg & 1; } - this.noiseShiftReg = this.noiseShiftReg >> 1 | feedback << 15 + this.noiseShiftReg = this.noiseShiftReg >> 1 | feedback << 15; } } } - return buffer + return buffer; }}; var NTSC = 0; var PAL = 1; @@ -9011,8 +8981,8 @@ JSSMS.Vdp = function(sms) { this.videoMode = NTSC; this.VRAM = new JSSMS.Utils.Uint8Array(16384); this.CRAM = new JSSMS.Utils.Uint8Array(32 * 3); - for(i = 0;i < 32 * 3;i++) { - this.CRAM[i] = 255 + for (i = 0;i < 32 * 3;i++) { + this.CRAM[i] = 255; } this.vdpreg = new JSSMS.Utils.Uint8Array(16); this.status = 0; @@ -9024,8 +8994,8 @@ JSSMS.Vdp = function(sms) { this.line = 0; this.counter = 0; this.bgPriority = new JSSMS.Utils.Uint8Array(SMS_WIDTH); - if(VDP_SPRITE_COLLISIONS) { - this.spriteCol = new JSSMS.Utils.Uint8Array(SMS_WIDTH) + if (VDP_SPRITE_COLLISIONS) { + this.spriteCol = new JSSMS.Utils.Uint8Array(SMS_WIDTH); } this.bgt = 0; this.vScrollLatch = 0; @@ -9041,15 +9011,15 @@ JSSMS.Vdp = function(sms) { this.sat = 0; this.isSatDirty = false; this.lineSprites = new Array(SMS_HEIGHT); - for(i = 0;i < SMS_HEIGHT;i++) { - this.lineSprites[i] = new JSSMS.Utils.Uint8Array(1 + 3 * SPRITES_PER_LINE) + for (i = 0;i < SMS_HEIGHT;i++) { + this.lineSprites[i] = new JSSMS.Utils.Uint8Array(1 + 3 * SPRITES_PER_LINE); } this.tiles = new Array(TOTAL_TILES); this.isTileDirty = new JSSMS.Utils.Uint8Array(TOTAL_TILES); this.minDirty = 0; this.maxDirty = 0; this.createCachedImages(); - this.generateConvertedPals() + this.generateConvertedPals(); }; JSSMS.Vdp.prototype = {reset:function() { var i; @@ -9058,8 +9028,8 @@ JSSMS.Vdp.prototype = {reset:function() { this.counter = 0; this.status = 0; this.operation = 0; - for(i = 0;i < 16;i++) { - this.vdpreg[i] = 0 + for (i = 0;i < 16;i++) { + this.vdpreg[i] = 0; } this.vdpreg[2] = 14; this.vdpreg[5] = 126; @@ -9068,67 +9038,67 @@ JSSMS.Vdp.prototype = {reset:function() { this.isSatDirty = true; this.minDirty = TOTAL_TILES; this.maxDirty = -1; - for(i = 0;i < 16384;i++) { - this.VRAM[i] = 0 + for (i = 0;i < 16384;i++) { + this.VRAM[i] = 0; } - for(i = 0;i < SMS_WIDTH * SMS_HEIGHT * 4;i = i + 4) { + for (i = 0;i < SMS_WIDTH * SMS_HEIGHT * 4;i = i + 4) { this.display[i] = 0; this.display[i + 1] = 0; this.display[i + 2] = 0; - this.display[i + 3] = 255 + this.display[i + 3] = 255; } }, forceFullRedraw:function() { this.bgt = (this.vdpreg[2] & 15 & ~1) << 10; this.minDirty = 0; this.maxDirty = TOTAL_TILES - 1; - for(var i = 0;i < TOTAL_TILES;i++) { - this.isTileDirty[i] = 1 + for (var i = 0;i < TOTAL_TILES;i++) { + this.isTileDirty[i] = 1; } this.sat = (this.vdpreg[5] & ~1 & ~128) << 7; - this.isSatDirty = true + this.isSatDirty = true; }, getVCount:function() { - if(this.videoMode == NTSC) { - if(this.line > 218) { - return this.line - 6 + if (this.videoMode == NTSC) { + if (this.line > 218) { + return this.line - 6; } - }else { - if(this.line > 242) { - return this.line - 57 + } else { + if (this.line > 242) { + return this.line - 57; } } - return this.line + return this.line; }, controlRead:function() { this.firstByte = true; var statuscopy = this.status; this.status = 0; this.main.cpu.interruptLine = false; - return statuscopy + return statuscopy; }, controlWrite:function(value) { - if(this.firstByte) { + if (this.firstByte) { this.firstByte = false; this.commandByte = value; - this.location = this.location & 16128 | value - }else { + this.location = this.location & 16128 | value; + } else { this.firstByte = true; this.operation = value >> 6 & 3; this.location = this.commandByte | value << 8; - if(this.operation == 0) { - this.readBuffer = this.VRAM[this.location++ & 16383] & 255 - }else { - if(this.operation == 2) { + if (this.operation === 0) { + this.readBuffer = this.VRAM[this.location++ & 16383] & 255; + } else { + if (this.operation == 2) { var reg = value & 15; switch(reg) { case 0: - if(ACCURATE_INTERRUPT_EMULATION && (this.status & STATUS_HINT) != 0) { - this.main.cpu.interruptLine = (this.commandByte & 16) != 0 + if (ACCURATE_INTERRUPT_EMULATION && (this.status & STATUS_HINT) !== 0) { + this.main.cpu.interruptLine = (this.commandByte & 16) !== 0; } break; case 1: - if((this.status & STATUS_VINT) != 0 && (this.commandByte & 32) != 0) { - this.main.cpu.interruptLine = true + if ((this.status & STATUS_VINT) !== 0 && (this.commandByte & 32) !== 0) { + this.main.cpu.interruptLine = true; } - if((this.commandByte & 3) != (this.vdpreg[reg] & 3)) { - this.isSatDirty = true + if ((this.commandByte & 3) != (this.vdpreg[reg] & 3)) { + this.isSatDirty = true; } break; case 2: @@ -9137,12 +9107,12 @@ JSSMS.Vdp.prototype = {reset:function() { case 5: var old = this.sat; this.sat = (this.commandByte & ~1 & ~128) << 7; - if(old != this.sat) { - this.isSatDirty = true + if (old != this.sat) { + this.isSatDirty = true; } - break + break; } - this.vdpreg[reg] = this.commandByte + this.vdpreg[reg] = this.commandByte; } } } @@ -9150,7 +9120,7 @@ JSSMS.Vdp.prototype = {reset:function() { this.firstByte = true; var value = this.readBuffer; this.readBuffer = this.VRAM[this.location++ & 16383] & 255; - return value + return value; }, dataWrite:function(value) { var temp = 0; this.firstByte = true; @@ -9161,109 +9131,109 @@ JSSMS.Vdp.prototype = {reset:function() { ; case 2: var address = this.location & 16383; - if(value != (this.VRAM[address] & 255)) { - if(address >= this.sat && address < this.sat + 64) { - this.isSatDirty = true - }else { - if(address >= this.sat + 128 && address < this.sat + 256) { - this.isSatDirty = true - }else { + if (value != (this.VRAM[address] & 255)) { + if (address >= this.sat && address < this.sat + 64) { + this.isSatDirty = true; + } else { + if (address >= this.sat + 128 && address < this.sat + 256) { + this.isSatDirty = true; + } else { var tileIndex = address >> 5; this.isTileDirty[tileIndex] = 1; - if(tileIndex < this.minDirty) { - this.minDirty = tileIndex + if (tileIndex < this.minDirty) { + this.minDirty = tileIndex; } - if(tileIndex > this.maxDirty) { - this.maxDirty = tileIndex + if (tileIndex > this.maxDirty) { + this.maxDirty = tileIndex; } } } - this.VRAM[address] = value + this.VRAM[address] = value; } break; case 3: - if(this.main.is_sms) { + if (this.main.is_sms) { temp = (this.location & 31) * 3; this.CRAM[temp] = this.main_JAVA_R[value]; this.CRAM[temp + 1] = this.main_JAVA_G[value]; - this.CRAM[temp + 2] = this.main_JAVA_B[value] - }else { + this.CRAM[temp + 2] = this.main_JAVA_B[value]; + } else { temp = ((this.location & 63) >> 1) * 3; - if((this.location & 1) == 0) { + if ((this.location & 1) === 0) { this.CRAM[temp] = this.GG_JAVA_R[value]; - this.CRAM[temp + 1] = this.GG_JAVA_G[value] - }else { - this.CRAM[temp + 2] = this.GG_JAVA_B[value] + this.CRAM[temp + 1] = this.GG_JAVA_G[value]; + } else { + this.CRAM[temp + 2] = this.GG_JAVA_B[value]; } } - break + break; } - if(ACCURATE) { - this.readBuffer = value + if (ACCURATE) { + this.readBuffer = value; } - this.location++ + this.location++; }, interrupts:function(lineno) { - if(lineno <= 192) { - if(!ACCURATE_INTERRUPT_EMULATION && lineno == 192) { - this.status |= STATUS_VINT + if (lineno <= 192) { + if (!ACCURATE_INTERRUPT_EMULATION && lineno == 192) { + this.status |= STATUS_VINT; } - if(this.counter == 0) { + if (this.counter === 0) { this.counter = this.vdpreg[10]; - this.status |= STATUS_HINT - }else { - this.counter-- + this.status |= STATUS_HINT; + } else { + this.counter--; } - if((this.status & STATUS_HINT) != 0 && (this.vdpreg[0] & 16) != 0) { - this.main.cpu.interruptLine = true + if ((this.status & STATUS_HINT) !== 0 && (this.vdpreg[0] & 16) !== 0) { + this.main.cpu.interruptLine = true; } - }else { + } else { this.counter = this.vdpreg[10]; - if((this.status & STATUS_VINT) != 0 && (this.vdpreg[1] & 32) != 0 && lineno < 224) { - this.main.cpu.interruptLine = true + if ((this.status & STATUS_VINT) !== 0 && ((this.vdpreg[1] & 32) !== 0 && lineno < 224)) { + this.main.cpu.interruptLine = true; } - if(ACCURATE && lineno == this.main.no_of_scanlines - 1) { - this.vScrollLatch = this.vdpreg[9] + if (ACCURATE && lineno == this.main.no_of_scanlines - 1) { + this.vScrollLatch = this.vdpreg[9]; } } }, setVBlankFlag:function() { - this.status |= STATUS_VINT + this.status |= STATUS_VINT; }, drawLine:function(lineno) { var i = 0; var temp = 0; var temp2 = 0; - if(this.main.is_gg) { - if(lineno < GG_Y_OFFSET || lineno >= GG_Y_OFFSET + GG_HEIGHT) { - return + if (this.main.is_gg) { + if (lineno < GG_Y_OFFSET || lineno >= GG_Y_OFFSET + GG_HEIGHT) { + return; } } - if(VDP_SPRITE_COLLISIONS) { - for(i = 0;i < SMS_WIDTH;i++) { - this.spriteCol[i] = false + if (VDP_SPRITE_COLLISIONS) { + for (i = 0;i < SMS_WIDTH;i++) { + this.spriteCol[i] = false; } } - if((this.vdpreg[1] & 64) != 0) { - if(this.maxDirty != -1) { - this.decodeTiles() + if ((this.vdpreg[1] & 64) !== 0) { + if (this.maxDirty != -1) { + this.decodeTiles(); } this.drawBg(lineno); - if(this.isSatDirty) { - this.decodeSat() + if (this.isSatDirty) { + this.decodeSat(); } - if(this.lineSprites[lineno][SPRITE_COUNT] != 0) { - this.drawSprite(lineno) + if (this.lineSprites[lineno][SPRITE_COUNT] !== 0) { + this.drawSprite(lineno); } - if(this.main.is_sms && (this.vdpreg[0] & 32) != 0) { + if (this.main.is_sms && (this.vdpreg[0] & 32) !== 0) { var location = lineno << 8; temp = location * 4; temp2 = ((this.vdpreg[7] & 15) + 16) * 3; - for(i = 0;i < 8;i++) { + for (i = 0;i < 8;i++) { this.display[temp + i] = this.CRAM[temp2]; this.display[temp + i + 1] = this.CRAM[temp2 + 1]; - this.display[temp + i + 2] = this.CRAM[temp2 + 2] + this.display[temp + i + 2] = this.CRAM[temp2 + 2]; } } - }else { - this.drawBGColour(lineno) + } else { + this.drawBGColour(lineno); } }, drawBg:function(lineno) { var pixX = 0; @@ -9272,49 +9242,49 @@ JSSMS.Vdp.prototype = {reset:function() { var temp2 = 0; var hscroll = this.vdpreg[8]; var vscroll = ACCURATE ? this.vScrollLatch : this.vdpreg[9]; - if(lineno < 16 && (this.vdpreg[0] & 64) != 0) { - hscroll = 0 + if (lineno < 16 && (this.vdpreg[0] & 64) !== 0) { + hscroll = 0; } var lock = this.vdpreg[0] & 128; var tile_column = 32 - (hscroll >> 3) + this.h_start; var tile_row = lineno + vscroll >> 3; - if(tile_row > 27) { - tile_row -= 28 + if (tile_row > 27) { + tile_row -= 28; } var tile_y = (lineno + (vscroll & 7) & 7) << 3; var row_precal = lineno << 8; - for(var tx = this.h_start;tx < this.h_end;tx++) { + for (var tx = this.h_start;tx < this.h_end;tx++) { var tile_props = this.bgt + ((tile_column & 31) << 1) + (tile_row << 6); var secondbyte = this.VRAM[tile_props + 1]; var pal = (secondbyte & 8) << 1; var sx = (tx << 3) + (hscroll & 7); - var pixY = (secondbyte & 4) == 0 ? tile_y : (7 << 3) - tile_y; + var pixY = (secondbyte & 4) === 0 ? tile_y : (7 << 3) - tile_y; var tile = this.tiles[(this.VRAM[tile_props] & 255) + ((secondbyte & 1) << 8)]; - if((secondbyte & 2) == 0) { - for(pixX = 0;pixX < 8 && sx < SMS_WIDTH;pixX++, sx++) { + if ((secondbyte & 2) === 0) { + for (pixX = 0;pixX < 8 && sx < SMS_WIDTH;pixX++, sx++) { colour = tile[pixX + pixY]; temp = (sx + row_precal) * 4; temp2 = (colour + pal) * 3; - this.bgPriority[sx] = (secondbyte & 16) != 0 && colour != 0; + this.bgPriority[sx] = (secondbyte & 16) !== 0 && colour !== 0; this.display[temp] = this.CRAM[temp2]; this.display[temp + 1] = this.CRAM[temp2 + 1]; - this.display[temp + 2] = this.CRAM[temp2 + 2] + this.display[temp + 2] = this.CRAM[temp2 + 2]; } - }else { - for(pixX = 7;pixX >= 0 && sx < SMS_WIDTH;pixX--, sx++) { + } else { + for (pixX = 7;pixX >= 0 && sx < SMS_WIDTH;pixX--, sx++) { colour = tile[pixX + pixY]; temp = (sx + row_precal) * 4; temp2 = (colour + pal) * 3; - this.bgPriority[sx] = (secondbyte & 16) != 0 && colour != 0; + this.bgPriority[sx] = (secondbyte & 16) !== 0 && colour !== 0; this.display[temp] = this.CRAM[temp2]; this.display[temp + 1] = this.CRAM[temp2 + 1]; - this.display[temp + 2] = this.CRAM[temp2 + 2] + this.display[temp + 2] = this.CRAM[temp2 + 2]; } } tile_column++; - if(lock != 0 && tx == 23) { + if (lock !== 0 && tx == 23) { tile_row = lineno >> 3; - tile_y = (lineno & 7) << 3 + tile_y = (lineno & 7) << 3; } } }, drawSprite:function(lineno) { @@ -9327,175 +9297,175 @@ JSSMS.Vdp.prototype = {reset:function() { var zoomed = this.vdpreg[1] & 1; var row_precal = lineno << 8; var off = count * 3; - for(;i < count;i++) { + for (;i < count;i++) { var n = sprites[off--] | (this.vdpreg[6] & 4) << 6; var y = sprites[off--]; var x = sprites[off--] - (this.vdpreg[0] & 8); var tileRow = lineno - y >> zoomed; - if((this.vdpreg[1] & 2) != 0) { - n &= ~1 + if ((this.vdpreg[1] & 2) !== 0) { + n &= ~1; } var tile = this.tiles[n + ((tileRow & 8) >> 3)]; var pix = 0; - if(x < 0) { + if (x < 0) { pix = -x; - x = 0 + x = 0; } var offset = pix + ((tileRow & 7) << 3); - if(zoomed == 0) { - for(;pix < 8 && x < SMS_WIDTH;pix++, x++) { + if (zoomed === 0) { + for (;pix < 8 && x < SMS_WIDTH;pix++, x++) { colour = tile[offset++]; - if(colour != 0 && !this.bgPriority[x]) { + if (colour !== 0 && !this.bgPriority[x]) { temp = (x + row_precal) * 4; temp2 = (colour + 16) * 3; this.display[temp] = this.CRAM[temp2]; this.display[temp + 1] = this.CRAM[temp2 + 1]; this.display[temp + 2] = this.CRAM[temp2 + 2]; - if(VDP_SPRITE_COLLISIONS) { - if(!this.spriteCol[x]) { - this.spriteCol[x] = true - }else { - this.status |= STATUS_COLLISION + if (VDP_SPRITE_COLLISIONS) { + if (!this.spriteCol[x]) { + this.spriteCol[x] = true; + } else { + this.status |= STATUS_COLLISION; } } } } - }else { - for(;pix < 8 && x < SMS_WIDTH;pix++, x += 2) { + } else { + for (;pix < 8 && x < SMS_WIDTH;pix++, x += 2) { colour = tile[offset++]; - if(colour != 0 && !this.bgPriority[x]) { + if (colour !== 0 && !this.bgPriority[x]) { temp = (x + row_precal) * 4; temp2 = (colour + 16) * 3; this.display[temp] = this.CRAM[temp2]; this.display[temp + 1] = this.CRAM[temp2 + 1]; this.display[temp + 2] = this.CRAM[temp2 + 2]; - if(VDP_SPRITE_COLLISIONS) { - if(!this.spriteCol[x]) { - this.spriteCol[x] = true - }else { - this.status |= STATUS_COLLISION + if (VDP_SPRITE_COLLISIONS) { + if (!this.spriteCol[x]) { + this.spriteCol[x] = true; + } else { + this.status |= STATUS_COLLISION; } } } - if(colour != 0 && !this.bgPriority[x + 1]) { + if (colour !== 0 && !this.bgPriority[x + 1]) { temp = (x + row_precal + 1) * 4; temp2 = (colour + 16) * 3; this.display[temp] = this.CRAM[temp2]; this.display[temp + 1] = this.CRAM[temp2 + 1]; this.display[temp + 2] = this.CRAM[temp2 + 2]; - if(VDP_SPRITE_COLLISIONS) { - if(!this.spriteCol[x + 1]) { - this.spriteCol[x + 1] = true - }else { - this.status |= STATUS_COLLISION + if (VDP_SPRITE_COLLISIONS) { + if (!this.spriteCol[x + 1]) { + this.spriteCol[x + 1] = true; + } else { + this.status |= STATUS_COLLISION; } } } } } } - if(sprites[SPRITE_COUNT] >= SPRITES_PER_LINE) { - this.status |= STATUS_OVERFLOW + if (sprites[SPRITE_COUNT] >= SPRITES_PER_LINE) { + this.status |= STATUS_OVERFLOW; } }, drawBGColour:function(lineno) { var row_precal = lineno << 8; var length = (row_precal + SMS_WIDTH * 4) * 4; var temp = ((this.vdpreg[7] & 15) + 16) * 3; - for(row_precal = row_precal * 4;row_precal < length;row_precal = row_precal + 4) { + for (row_precal = row_precal * 4;row_precal < length;row_precal = row_precal + 4) { this.display[row_precal] = this.CRAM[temp]; this.display[row_precal + 1] = this.CRAM[temp + 1]; - this.display[row_precal + 2] = this.CRAM[temp + 2] + this.display[row_precal + 2] = this.CRAM[temp + 2]; } }, decodeTiles:function() { - for(var i = this.minDirty;i <= this.maxDirty;i++) { - if(!this.isTileDirty[i]) { - continue + for (var i = this.minDirty;i <= this.maxDirty;i++) { + if (!this.isTileDirty[i]) { + continue; } this.isTileDirty[i] = 0; var tile = this.tiles[i]; var pixel_index = 0; var address = i << 5; - for(var y = 0;y < TILE_SIZE;y++) { + for (var y = 0;y < TILE_SIZE;y++) { var address0 = this.VRAM[address++]; var address1 = this.VRAM[address++]; var address2 = this.VRAM[address++]; var address3 = this.VRAM[address++]; - for(var bit = 128;bit != 0;bit >>= 1) { + for (var bit = 128;bit !== 0;bit >>= 1) { var colour = 0; - if((address0 & bit) != 0) { - colour |= 1 + if ((address0 & bit) !== 0) { + colour |= 1; } - if((address1 & bit) != 0) { - colour |= 2 + if ((address1 & bit) !== 0) { + colour |= 2; } - if((address2 & bit) != 0) { - colour |= 4 + if ((address2 & bit) !== 0) { + colour |= 4; } - if((address3 & bit) != 0) { - colour |= 8 + if ((address3 & bit) !== 0) { + colour |= 8; } - tile[pixel_index++] = colour + tile[pixel_index++] = colour; } } } this.minDirty = TOTAL_TILES; - this.maxDirty = -1 + this.maxDirty = -1; }, decodeSat:function() { this.isSatDirty = false; - for(var i = 0;i < this.lineSprites.length;i++) { - this.lineSprites[i][SPRITE_COUNT] = 0 + for (var i = 0;i < this.lineSprites.length;i++) { + this.lineSprites[i][SPRITE_COUNT] = 0; } - var height = (this.vdpreg[1] & 2) == 0 ? 8 : 16; - if((this.vdpreg[1] & 1) == 1) { - height <<= 1 + var height = (this.vdpreg[1] & 2) === 0 ? 8 : 16; + if ((this.vdpreg[1] & 1) == 1) { + height <<= 1; } - for(var spriteno = 0;spriteno < 64;spriteno++) { + for (var spriteno = 0;spriteno < 64;spriteno++) { var y = this.VRAM[this.sat + spriteno] & 255; - if(y == 208) { - return + if (y == 208) { + return; } y++; - if(y > 240) { - y -= 256 + if (y > 240) { + y -= 256; } - for(var lineno = y;lineno < SMS_HEIGHT;lineno++) { - if(lineno - y < height) { + for (var lineno = y;lineno < SMS_HEIGHT;lineno++) { + if (lineno - y < height) { var sprites = this.lineSprites[lineno]; - if(!sprites || sprites[SPRITE_COUNT] >= SPRITES_PER_LINE) { - break + if (!sprites || sprites[SPRITE_COUNT] >= SPRITES_PER_LINE) { + break; } var off = sprites[SPRITE_COUNT] * 3 + SPRITE_X; var address = this.sat + (spriteno << 1) + 128; sprites[off++] = this.VRAM[address++] & 255; sprites[off++] = y; sprites[off++] = this.VRAM[address] & 255; - sprites[SPRITE_COUNT]++ + sprites[SPRITE_COUNT]++; } } } }, createCachedImages:function() { - for(var i = 0;i < TOTAL_TILES;i++) { - this.tiles[i] = new JSSMS.Utils.Uint8Array(TILE_SIZE * TILE_SIZE) + for (var i = 0;i < TOTAL_TILES;i++) { + this.tiles[i] = new JSSMS.Utils.Uint8Array(TILE_SIZE * TILE_SIZE); } }, generateConvertedPals:function() { var i; var r, g, b; - for(i = 0;i < 64;i++) { + for (i = 0;i < 64;i++) { r = i & 3; g = i >> 2 & 3; b = i >> 4 & 3; this.main_JAVA_R[i] = r * 85 & 255; this.main_JAVA_G[i] = g * 85 & 255; - this.main_JAVA_B[i] = b * 85 & 255 + this.main_JAVA_B[i] = b * 85 & 255; } - for(i = 0;i < 256;i++) { + for (i = 0;i < 256;i++) { g = i & 15; b = i >> 4 & 15; this.GG_JAVA_R[i] = (g << 4 | g) & 255; - this.GG_JAVA_G[i] = (b << 4 | b) & 255 + this.GG_JAVA_G[i] = (b << 4 | b) & 255; } - for(i = 0;i < 16;i++) { - this.GG_JAVA_B[i] = (i << 4 | i) & 255 + for (i = 0;i < 16;i++) { + this.GG_JAVA_B[i] = (i << 4 | i) & 255; } }, getState:function() { var state = new Array(3 + 16 + 32); @@ -9504,12 +9474,12 @@ JSSMS.Vdp.prototype = {reset:function() { state[2] = this.counter | this.vScrollLatch << 8 | this.line << 16; JSSMS.Utils.copyArrayElements(this.vdpreg, 0, state, 3, 16); JSSMS.Utils.copyArrayElements(this.CRAM, 0, state, 3 + 16, 32 * 3); - return state + return state; }, setState:function(state) { var temp = state[0]; this.videoMode = temp & 255; this.status = temp >> 8 & 255; - this.firstByte = (temp >> 16 & 255) != 0; + this.firstByte = (temp >> 16 & 255) !== 0; this.commandByte = temp >> 24 & 255; temp = state[1]; this.location = temp & 65535; @@ -9521,7 +9491,7 @@ JSSMS.Vdp.prototype = {reset:function() { this.line = temp >> 16 & 65535; JSSMS.Utils.copyArrayElements(state, 3, this.vdpreg, 0, 16); JSSMS.Utils.copyArrayElements(state, 3 + 16, this.CRAM, 0, 32 * 3); - this.forceFullRedraw() + this.forceFullRedraw(); }}; JSSMS.DummyUI = function(sms) { this.main = sms; @@ -9533,16 +9503,16 @@ JSSMS.DummyUI = function(sms) { }; this.updateDisassembly = function() { }; - this.canvasImageData = {data:[]} + this.canvasImageData = {data:[]}; }; -if(window["$"]) { +if (window["$"]) { $.fn["JSSMSUI"] = function(roms) { var parent = this; var UI = function(sms) { this.main = sms; - if(Object.prototype.toString.call(window["operamini"]) == "[object OperaMini]") { + if (Object.prototype.toString.call(window["operamini"]) == "[object OperaMini]") { $(parent).html('
Oh no! Your browser can\'t run this emulator. Try the latest version of Firefox, Google Chrome, Opera or Safari!
'); - return + return; } var self = this; var root = $("
"); @@ -9552,103 +9522,103 @@ if(window["$"]) { var fullscreenSupport = JSSMS.Utils.getPrefix(["fullscreenEnabled", "mozFullScreenEnabled", "webkitCancelFullScreen"]); var requestAnimationFramePrefix = JSSMS.Utils.getPrefix(["requestAnimationFrame", "msRequestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame"], window); var i; - if(requestAnimationFramePrefix) { - this.requestAnimationFrame = window[requestAnimationFramePrefix].bind(window) - }else { + if (requestAnimationFramePrefix) { + this.requestAnimationFrame = window[requestAnimationFramePrefix].bind(window); + } else { var lastTime = 0; this.requestAnimationFrame = function(callback) { var currTime = JSSMS.Utils.getTimestamp(); var timeToCall = Math.max(0, 1E3 / 60 - (currTime - lastTime)); window.setTimeout(function() { lastTime = JSSMS.Utils.getTimestamp(); - callback() - }, timeToCall) - } + callback(); + }, timeToCall); + }; } this.screen = $(""); this.canvasContext = this.screen[0].getContext("2d"); this.canvasContext["webkitImageSmoothingEnabled"] = false; this.canvasContext["mozImageSmoothingEnabled"] = false; this.canvasContext["imageSmoothingEnabled"] = false; - if(!this.canvasContext.getImageData) { + if (!this.canvasContext.getImageData) { $(parent).html('
Oh no! Your browser doesn\'t support writing pixels directly to the <canvas> tag. Try the latest version of Firefox, Google Chrome, Opera or Safari!
'); - return + return; } this.canvasImageData = this.canvasContext.getImageData(0, 0, SMS_WIDTH, SMS_HEIGHT); this.gamepad = {u:{e:$(".up", gamepadContainer), k:KEY_UP}, r:{e:$(".right", gamepadContainer), k:KEY_RIGHT}, d:{e:$(".down", gamepadContainer), k:KEY_DOWN}, l:{e:$(".left", gamepadContainer), k:KEY_LEFT}, 1:{e:$(".fire1", gamepadContainer), k:KEY_FIRE1}, 2:{e:$(".fire2", gamepadContainer), k:KEY_FIRE2}}; var startButton = $(".start", gamepadContainer); this.romContainer = $('
'); this.romSelect = $("").change(function() { - self.loadROM() + self.loadROM(); }); this.buttons = Object.create(null); this.buttons.start = $('').click(function() { - if(!self.main.isRunning) { + if (!self.main.isRunning) { self.main.start(); - self.buttons.start.attr("value", "Pause") - }else { + self.buttons.start.attr("value", "Pause"); + } else { self.main.stop(); self.updateStatus("Paused"); - self.buttons.start.attr("value", "Start") + self.buttons.start.attr("value", "Start"); } }); this.buttons.reset = $('').click(function() { - if(!self.main.reloadRom()) { + if (!self.main.reloadRom()) { $(this).attr("disabled", "disabled"); - return + return; } self.main.reset(); self.main.vdp.forceFullRedraw(); - self.main.start() + self.main.start(); }); - if(ENABLE_DEBUGGER) { + if (ENABLE_DEBUGGER) { this.dissambler = $('
'); $(parent).after(this.dissambler); this.buttons.nextStep = $('').click(function() { - self.main.nextStep() - }) + self.main.nextStep(); + }); } - if(this.main.soundEnabled) { + if (this.main.soundEnabled) { this.buttons.sound = $('').click(function() { - if(self.main.soundEnabled) { + if (self.main.soundEnabled) { self.main.soundEnabled = false; - self.buttons.sound.attr("value", "Enable sound") - }else { + self.buttons.sound.attr("value", "Enable sound"); + } else { self.main.soundEnabled = true; - self.buttons.sound.attr("value", "Disable sound") + self.buttons.sound.attr("value", "Disable sound"); } - }) + }); } - if(fullscreenSupport) { + if (fullscreenSupport) { this.buttons.fullscreen = $('').click(function() { var screen = (screenContainer[0]); - if(screen.requestFullscreen) { - screen.requestFullscreen() - }else { - if(screen.mozRequestFullScreen) { - screen.mozRequestFullScreen() - }else { - screen.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT) + if (screen.requestFullscreen) { + screen.requestFullscreen(); + } else { + if (screen.mozRequestFullScreen) { + screen.mozRequestFullScreen(); + } else { + screen.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); } } - }) - }else { + }); + } else { this.zoomed = false; this.buttons.zoom = $('').click(function() { - if(self.zoomed) { + if (self.zoomed) { self.screen.animate({width:SMS_WIDTH + "px", height:SMS_HEIGHT + "px"}, function() { - $(this).removeAttr("style") + $(this).removeAttr("style"); }); - self.buttons.zoom.attr("value", "Zoom in") - }else { + self.buttons.zoom.attr("value", "Zoom in"); + } else { self.screen.animate({width:SMS_WIDTH * 2 + "px", height:SMS_HEIGHT * 2 + "px"}); - self.buttons.zoom.attr("value", "Zoom out") + self.buttons.zoom.attr("value", "Zoom out"); } - self.zoomed = !self.zoomed - }) + self.zoomed = !self.zoomed; + }); } - for(i in this.buttons) { - this.buttons[i].appendTo(controls) + for (i in this.buttons) { + this.buttons[i].appendTo(controls); } this.log = $('
'); this.screen.appendTo(screenContainer); @@ -9658,120 +9628,122 @@ if(window["$"]) { controls.appendTo(root); this.log.appendTo(root); root.appendTo($(parent)); - if(roms != undefined) { - this.setRoms(roms) + if (roms !== undefined) { + this.setRoms(roms); } $(document).bind("keydown", function(evt) { - self.main.keyboard.keydown(evt) + self.main.keyboard.keydown(evt); }).bind("keyup", function(evt) { - self.main.keyboard.keyup(evt) + self.main.keyboard.keyup(evt); }); - for(i in this.gamepad) { - this.gamepad[i].e.on("mousedown touchstart", function(key) { - return function(evt) { - self.main.keyboard.controller1 &= ~key; - evt.preventDefault() - } - }(this.gamepad[i].k)).on("mouseup touchend", function(key) { - return function(evt) { - self.main.keyboard.controller1 |= key; - evt.preventDefault() - } - }(this.gamepad[i].k)) + function touchStart(key) { + return function(evt) { + self.main.keyboard.controller1 &= ~key; + evt.preventDefault(); + }; + } + function touchEnd(key) { + return function(evt) { + self.main.keyboard.controller1 |= key; + evt.preventDefault(); + }; + } + for (i in this.gamepad) { + this.gamepad[i].e.on("mousedown touchstart", touchStart(this.gamepad[i].k)).on("mouseup touchend", touchEnd(this.gamepad[i].k)); } startButton.on("mousedown touchstart", function(evt) { - if(self.main.is_sms) { - self.main.pause_button = true - }else { - self.main.keyboard.ggstart &= ~128 + if (self.main.is_sms) { + self.main.pause_button = true; + } else { + self.main.keyboard.ggstart &= ~128; } - evt.preventDefault() + evt.preventDefault(); }).on("mouseup touchend", function(evt) { - if(!self.main.is_sms) { - self.main.keyboard.ggstart |= 128 + if (!self.main.is_sms) { + self.main.keyboard.ggstart |= 128; } - evt.preventDefault() - }) + evt.preventDefault(); + }); }; UI.prototype = {reset:function() { this.screen[0].width = SMS_WIDTH; this.screen[0].height = SMS_HEIGHT; this.log.empty(); - if(ENABLE_DEBUGGER) { - this.dissambler.empty() + if (ENABLE_DEBUGGER) { + this.dissambler.empty(); } }, setRoms:function(roms) { var groupName, optgroup, length, i, count = 0; this.romSelect.children().remove(); $("").appendTo(this.romSelect); - for(groupName in roms) { - if(roms.hasOwnProperty(groupName)) { + for (groupName in roms) { + if (roms.hasOwnProperty(groupName)) { optgroup = $("").attr("label", groupName); length = roms[groupName].length; i = 0; - for(;i < length;i++) { - $("").attr("value", roms[groupName][i][1]).appendTo(optgroup) + for (;i < length;i++) { + $("").attr("value", roms[groupName][i][1]).appendTo(optgroup); } - optgroup.appendTo(this.romSelect) + optgroup.appendTo(this.romSelect); } - count++ + count++; } - if(count) { - this.romSelect.appendTo(this.romContainer) + if (count) { + this.romSelect.appendTo(this.romContainer); } }, loadROM:function() { var self = this; this.updateStatus("Downloading..."); - $.ajax({url:escape(this.romSelect.val()), xhr:function() { + $.ajax({url:encodeURI(this.romSelect.val()), xhr:function() { var xhr = $.ajaxSettings.xhr(); - if(xhr.overrideMimeType != undefined) { - xhr.overrideMimeType("text/plain; charset=x-user-defined") + if (xhr.overrideMimeType !== undefined) { + xhr.overrideMimeType("text/plain; charset=x-user-defined"); } self.xhr = xhr; - return xhr + return xhr; }, complete:function(xhr, status) { var data; - if(status == "error") { + if (status == "error") { self.updateStatus("The selected ROM file could not be loaded."); - return + return; } data = xhr.responseText; self.main.stop(); self.main.readRomDirectly(data, self.romSelect.val()); self.main.reset(); self.main.vdp.forceFullRedraw(); - self.enable() - }}) + self.enable(); + }}); }, enable:function() { this.buttons.start.removeAttr("disabled"); this.buttons.start.attr("value", "Start"); this.buttons.reset.removeAttr("disabled"); - if(ENABLE_DEBUGGER) { - this.buttons.nextStep.removeAttr("disabled") - } - if(this.main.soundEnabled) { - if(this.buttons.sound) { - this.buttons.sound.attr("value", "Disable sound") - }else { - this.buttons.sound.attr("value", "Enable sound") + if (ENABLE_DEBUGGER) { + this.buttons.nextStep.removeAttr("disabled"); + } + if (this.main.soundEnabled) { + if (this.buttons.sound) { + this.buttons.sound.attr("value", "Disable sound"); + } else { + this.buttons.sound.attr("value", "Enable sound"); } } }, updateStatus:function(s) { - this.log.text(s) + this.log.text(s); }, writeAudio:function(buffer) { }, writeFrame:function() { var hiddenPrefix = JSSMS.Utils.getPrefix(["hidden", "mozHidden", "webkitHidden", "msHidden"]); - if(hiddenPrefix) { + if (hiddenPrefix) { return function() { - if(document[hiddenPrefix]) { - return + if (document[hiddenPrefix]) { + return; } - this.canvasContext.putImageData(this.canvasImageData, 0, 0) - } - }else { + this.canvasContext.putImageData(this.canvasImageData, 0, 0); + }; + } else { return function() { - this.canvasContext.putImageData(this.canvasImageData, 0, 0) - } + this.canvasContext.putImageData(this.canvasImageData, 0, 0); + }; } }(), updateDisassembly:function(currentAddress) { var startAddress = currentAddress < 8 ? 0 : currentAddress - 8; @@ -9780,16 +9752,16 @@ if(window["$"]) { var html = ""; var i = startAddress; var num = 0; - for(;num < 16 && i <= length;i++) { - if(instructions[i]) { + for (;num < 16 && i <= length;i++) { + if (instructions[i]) { html += "" + instructions[i].hexAddress + (instructions[i].isJumpTarget ? ":" : " ") + "" + instructions[i].inst + ""; - num++ + num++; } } - this.dissambler.html(html) + this.dissambler.html(html); }}; - return UI - } + return UI; + }; } ;var IO_TR_DIRECTION = 0; var IO_TH_DIRECTION = 1; @@ -9805,35 +9777,35 @@ JSSMS.Ports = function(sms) { this.keyboard = sms.keyboard; this.europe = 64; this.hCounter = 0; - this.ioPorts = [] + this.ioPorts = []; }; JSSMS.Ports.prototype = {reset:function() { - if(LIGHTGUN) { + if (LIGHTGUN) { this.ioPorts = new Array(10); this.ioPorts[PORT_A + IO_TH_INPUT] = 1; - this.ioPorts[PORT_B + IO_TH_INPUT] = 1 - }else { - this.ioPorts = new Array(2) + this.ioPorts[PORT_B + IO_TH_INPUT] = 1; + } else { + this.ioPorts = new Array(2); } }, out:function(port, value) { - if(this.main.is_gg && port < 7) { - return + if (this.main.is_gg && port < 7) { + return; } switch(port & 193) { case 1: - if(LIGHTGUN) { - this.oldTH = this.getTH(PORT_A) != 0 || this.getTH(PORT_B) != 0; + if (LIGHTGUN) { + this.oldTH = this.getTH(PORT_A) !== 0 || this.getTH(PORT_B) !== 0; this.writePort(PORT_A, value); this.writePort(PORT_B, value >> 2); - if(!this.oldTH && (this.getTH(PORT_A) != 0 || this.getTH(PORT_B) != 0)) { - this.hCounter = this.getHCount() + if (!this.oldTH && (this.getTH(PORT_A) !== 0 || this.getTH(PORT_B) !== 0)) { + this.hCounter = this.getHCount(); } - }else { + } else { this.ioPorts[0] = (value & 32) << 1; this.ioPorts[1] = value & 128; - if(this.europe == 0) { + if (this.europe === 0) { this.ioPorts[0] = ~this.ioPorts[0]; - this.ioPorts[1] = ~this.ioPorts[1] + this.ioPorts[1] = ~this.ioPorts[1]; } } break; @@ -9846,13 +9818,13 @@ JSSMS.Ports.prototype = {reset:function() { case 64: ; case 65: - if(this.main.soundEnabled) { - this.psg.write(value) + if (this.main.soundEnabled) { + this.psg.write(value); } - break + break; } }, in_:function(port) { - if(this.main.is_gg && port < 7) { + if (this.main.is_gg && port < 7) { switch(port) { case 0: return this.keyboard.ggstart & 191 | this.europe; @@ -9867,7 +9839,7 @@ JSSMS.Ports.prototype = {reset:function() { case 5: return 0; case 6: - return 255 + return 255; } } switch(port & 193) { @@ -9882,53 +9854,54 @@ JSSMS.Ports.prototype = {reset:function() { case 192: return this.keyboard.controller1; case 193: - if(LIGHTGUN) { - if(this.keyboard.lightgunClick) { - this.lightPhaserSync() + if (LIGHTGUN) { + if (this.keyboard.lightgunClick) { + this.lightPhaserSync(); } - return this.keyboard.controller2 & 63 | (this.getTH(PORT_A) != 0 ? 64 : 0) | (this.getTH(PORT_B) != 0 ? 128 : 0) - }else { - return this.keyboard.controller2 & 63 | this.ioPorts[0] | this.ioPorts[1] + return this.keyboard.controller2 & 63 | (this.getTH(PORT_A) !== 0 ? 64 : 0) | (this.getTH(PORT_B) !== 0 ? 128 : 0); + } else { + return this.keyboard.controller2 & 63 | this.ioPorts[0] | this.ioPorts[1]; } + ; } - return 255 + return 255; }, writePort:function(index, value) { this.ioPorts[index + IO_TR_DIRECTION] = value & 1; this.ioPorts[index + IO_TH_DIRECTION] = value & 2; this.ioPorts[index + IO_TR_OUTPUT] = value & 16; - this.ioPorts[index + IO_TH_OUTPUT] = this.europe == 0 ? ~value & 32 : value & 32 + this.ioPorts[index + IO_TH_OUTPUT] = this.europe === 0 ? ~value & 32 : value & 32; }, getTH:function(index) { - return this.ioPorts[index + IO_TH_DIRECTION] == 0 ? this.ioPorts[index + IO_TH_OUTPUT] : this.ioPorts[index + IO_TH_INPUT] + return this.ioPorts[index + IO_TH_DIRECTION] === 0 ? this.ioPorts[index + IO_TH_OUTPUT] : this.ioPorts[index + IO_TH_INPUT]; }, setTH:function(index, on) { this.ioPorts[index + IO_TH_DIRECTION] = 1; - this.ioPorts[index + IO_TH_INPUT] = on ? 1 : 0 + this.ioPorts[index + IO_TH_INPUT] = on ? 1 : 0; }, getHCount:function() { var pixels = Math.round(this.main.cpu.getCycle() * SMS_X_PIXELS / this.main.cyclesPerLine); var v = pixels - 8 >> 1; - if(v > 147) { - v += 233 - 148 + if (v > 147) { + v += 233 - 148; } - return v & 255 + return v & 255; }, X_RANGE:48, Y_RANGE:4, lightPhaserSync:function() { var oldTH = this.getTH(PORT_A); var hc = this.getHCount(); var dx = this.keyboard.lightgunX - (hc << 1); var dy = this.keyboard.lightgunY - this.vdp.line; - if(dy > -this.Y_RANGE && dy < this.Y_RANGE && dx > -this.X_RANGE && dx < this.X_RANGE) { + if (dy > -this.Y_RANGE && dy < this.Y_RANGE && (dx > -this.X_RANGE && dx < this.X_RANGE)) { this.setTH(PORT_A, false); - if(oldTH != this.getTH(PORT_A)) { - this.hCounter = 20 + (this.keyboard.lightgunX >> 1) + if (oldTH != this.getTH(PORT_A)) { + this.hCounter = 20 + (this.keyboard.lightgunX >> 1); } - }else { + } else { this.setTH(PORT_A, true); - if(oldTH != this.getTH(PORT_A)) { - this.hCounter = hc + if (oldTH != this.getTH(PORT_A)) { + this.hCounter = hc; } } }, setDomestic:function(value) { - this.europe = value ? 64 : 0 + this.europe = value ? 64 : 0; }, isDomestic:function() { - return this.europe != 0 + return this.europe !== 0; }}; var Bytecode = function() { var toHex = JSSMS.Utils.toHex; @@ -9943,18 +9916,18 @@ var Bytecode = function() { this.canEnd = false; this.isJumpTarget = false; this.jumpTargetNb = 0; - this.ast = null + this.ast = null; } Bytecode.prototype = {get hexOpcode() { - if(this.opcode.length) { - return this.opcode.map(toHex).join(" ") + if (this.opcode.length) { + return this.opcode.map(toHex).join(" "); } - return"" + return ""; }, get label() { - var name = this.name ? this.name.replace(/(nn|n|PC\+e|d)/, toHex(this.target || this.operand || 0)) : ""; - return toHex(this.address + this.page * PAGE_SIZE) + " " + this.hexOpcode + " " + name + var name = this.name ? this.name.replace(/(nn|n|PC\+e|d)/, toHex(this.target || (this.operand || 0))) : ""; + return toHex(this.address + this.page * PAGE_SIZE) + " " + this.hexOpcode + " " + name; }}; - return Bytecode + return Bytecode; }(); var Parser = function() { var ACCURATE_INTERRUPT_EMULATION = true; @@ -9965,83 +9938,83 @@ var Parser = function() { this.addresses = Array(rom.length); this.entryPoints = []; this.bytecodes = Array(rom.length); - for(var i = 0;i < rom.length;i++) { + for (var i = 0;i < rom.length;i++) { this.addresses[i] = []; - this.bytecodes[i] = [] + this.bytecodes[i] = []; } }; parser.prototype = {addEntryPoint:function(obj) { this.entryPoints.push(obj); - this.addAddress(obj.address) + this.addAddress(obj.address); }, parse:function(page) { JSSMS.Utils.console.time("Parsing"); var currentPage; var pageStart; var pageEnd; - if(page == undefined) { + if (page === undefined) { pageStart = 0; - pageEnd = this.stream.length - 1 - }else { + pageEnd = this.stream.length - 1; + } else { pageStart = 0; - pageEnd = 16384 - 1 + pageEnd = 16384 - 1; } - for(currentPage = 0;currentPage < this.addresses.length;currentPage++) { - while(this.addresses[currentPage].length) { + for (currentPage = 0;currentPage < this.addresses.length;currentPage++) { + while (this.addresses[currentPage].length) { var currentObj = this.addresses[currentPage].shift(); var currentAddress = currentObj.address % 16384; - if(currentAddress < pageStart || currentAddress > pageEnd) { + if (currentAddress < pageStart || currentAddress > pageEnd) { JSSMS.Utils.console.error("Address out of bound", toHex(currentAddress)); - continue + continue; } - if(this.bytecodes[currentPage][currentAddress]) { - continue + if (this.bytecodes[currentPage][currentAddress]) { + continue; } var bytecode = new Bytecode(currentAddress, currentPage); this.bytecodes[currentPage][currentAddress] = disassemble(bytecode, this.stream); - if(this.bytecodes[currentPage][currentAddress].nextAddress != null && this.bytecodes[currentPage][currentAddress].nextAddress >= pageStart && this.bytecodes[currentPage][currentAddress].nextAddress <= pageEnd) { - this.addAddress(this.bytecodes[currentPage][currentAddress].nextAddress) + if (this.bytecodes[currentPage][currentAddress].nextAddress !== null && (this.bytecodes[currentPage][currentAddress].nextAddress >= pageStart && this.bytecodes[currentPage][currentAddress].nextAddress <= pageEnd)) { + this.addAddress(this.bytecodes[currentPage][currentAddress].nextAddress); } - if(this.bytecodes[currentPage][currentAddress].target != null && this.bytecodes[currentPage][currentAddress].target >= pageStart && this.bytecodes[currentPage][currentAddress].target <= pageEnd) { - this.addAddress(this.bytecodes[currentPage][currentAddress].target) + if (this.bytecodes[currentPage][currentAddress].target !== null && (this.bytecodes[currentPage][currentAddress].target >= pageStart && this.bytecodes[currentPage][currentAddress].target <= pageEnd)) { + this.addAddress(this.bytecodes[currentPage][currentAddress].target); } } } - if(this.bytecodes[0][1023]) { - this.bytecodes[0][1023].isFunctionEnder = true - }else { - if(this.bytecodes[0][1022]) { - this.bytecodes[0][1022].isFunctionEnder = true + if (this.bytecodes[0][1023]) { + this.bytecodes[0][1023].isFunctionEnder = true; + } else { + if (this.bytecodes[0][1022]) { + this.bytecodes[0][1022].isFunctionEnder = true; } } var i = 0; var length = 0; - for(i = 0, length = this.entryPoints.length;i < length;i++) { + for (i = 0, length = this.entryPoints.length;i < length;i++) { var entryPoint = this.entryPoints[i].address; var romPage = this.entryPoints[i].romPage; this.bytecodes[romPage][entryPoint].isJumpTarget = true; - this.bytecodes[romPage][entryPoint].jumpTargetNb++ + this.bytecodes[romPage][entryPoint].jumpTargetNb++; } - for(currentPage = 0;currentPage < this.bytecodes.length;currentPage++) { - for(i = 0, length = this.bytecodes[currentPage].length;i < length;i++) { - if(!this.bytecodes[currentPage][i]) { - continue + for (currentPage = 0;currentPage < this.bytecodes.length;currentPage++) { + for (i = 0, length = this.bytecodes[currentPage].length;i < length;i++) { + if (!this.bytecodes[currentPage][i]) { + continue; } - if(this.bytecodes[currentPage][i].nextAddress != null && this.bytecodes[currentPage][this.bytecodes[currentPage][i].nextAddress]) { - this.bytecodes[currentPage][this.bytecodes[currentPage][i].nextAddress].jumpTargetNb++ + if (this.bytecodes[currentPage][i].nextAddress !== null && this.bytecodes[currentPage][this.bytecodes[currentPage][i].nextAddress]) { + this.bytecodes[currentPage][this.bytecodes[currentPage][i].nextAddress].jumpTargetNb++; } - if(this.bytecodes[currentPage][i].target != null) { + if (this.bytecodes[currentPage][i].target !== null) { var targetPage = ~~(this.bytecodes[currentPage][i].target / 16384); var targetAddress = this.bytecodes[currentPage][i].target % 16384; - if(this.bytecodes[targetPage] && this.bytecodes[targetPage][targetAddress]) { + if (this.bytecodes[targetPage] && this.bytecodes[targetPage][targetAddress]) { this.bytecodes[targetPage][targetAddress].isJumpTarget = true; - this.bytecodes[targetPage][targetAddress].jumpTargetNb++ - }else { - JSSMS.Utils.console.log("Invalid target address", toHex(this.bytecodes[currentPage][i].target)) + this.bytecodes[targetPage][targetAddress].jumpTargetNb++; + } else { + JSSMS.Utils.console.log("Invalid target address", toHex(this.bytecodes[currentPage][i].target)); } } } } - JSSMS.Utils.console.timeEnd("Parsing") + JSSMS.Utils.console.timeEnd("Parsing"); }, parseFromAddress:function(obj) { var address = obj.address % 16384; var romPage = obj.romPage; @@ -10051,53 +10024,53 @@ var Parser = function() { var bytecode; var startingBytecode = true; var absoluteAddress = 0; - if(address < 1024 && romPage == 0) { + if (address < 1024 && romPage === 0) { pageStart = 0; - pageEnd = 1024 + pageEnd = 1024; } do { - if(this.bytecodes[romPage][address]) { - bytecode = this.bytecodes[romPage][address] - }else { + if (this.bytecodes[romPage][address]) { + bytecode = this.bytecodes[romPage][address]; + } else { bytecode = new Bytecode(address, romPage); - this.bytecodes[romPage][address] = disassemble(bytecode, this.stream) + this.bytecodes[romPage][address] = disassemble(bytecode, this.stream); } - if(bytecode.canEnd && !startingBytecode) { - break + if (bytecode.canEnd && !startingBytecode) { + break; } address = bytecode.nextAddress % 16384; branch.push(bytecode); startingBytecode = false; - absoluteAddress = address + romPage * 16384 - }while(address != null && absoluteAddress >= pageStart && absoluteAddress < pageEnd && !bytecode.isFunctionEnder); - return branch + absoluteAddress = address + romPage * 16384; + } while (address !== null && (absoluteAddress >= pageStart && (absoluteAddress < pageEnd && !bytecode.isFunctionEnder))); + return branch; }, writeGraphViz:function() { JSSMS.Utils.console.time("DOT generation"); var tree = this.bytecodes; var INDENT = " "; var content = ["digraph G {"]; - for(var i = 0, length = tree.length;i < length;i++) { - if(!tree[i]) { - continue + for (var i = 0, length = tree.length;i < length;i++) { + if (!tree[i]) { + continue; } content.push(INDENT + i + ' [label="' + tree[i].label + '"];'); - if(tree[i].target != null) { - content.push(INDENT + i + " -> " + tree[i].target + ";") + if (tree[i].target !== null) { + content.push(INDENT + i + " -> " + tree[i].target + ";"); } - if(tree[i].nextAddress != null) { - content.push(INDENT + i + " -> " + tree[i].nextAddress + ";") + if (tree[i].nextAddress !== null) { + content.push(INDENT + i + " -> " + tree[i].nextAddress + ";"); } } content.push("}"); content = content.join("\n"); content = content.replace(/ 0 \[label="/, ' 0 [style=filled,color="#CC0000",label="'); JSSMS.Utils.console.timeEnd("DOT generation"); - return content + return content; }, addAddress:function(address) { var memPage = ~~(address / 16384); var romPage = this.frameReg[memPage]; address = address % 16384; - this.addresses[romPage].push({address:address, romPage:romPage, memPage:memPage}) + this.addresses[romPage].push({address:address, romPage:romPage, memPage:memPage}); }}; function disassemble(bytecode, stream) { stream.page = bytecode.page; @@ -10563,7 +10536,6 @@ var Parser = function() { break; case 203: return getCB(bytecode, stream); - break; case 204: target = stream.getUint16(); canEnd = true; @@ -10622,7 +10594,6 @@ var Parser = function() { break; case 221: return getIndex(bytecode, stream); - break; case 222: operand = stream.getUint8(); break; @@ -10673,7 +10644,6 @@ var Parser = function() { break; case 237: return getED(bytecode, stream); - break; case 238: operand = stream.getUint8(); break; @@ -10722,7 +10692,6 @@ var Parser = function() { break; case 253: return getIndex(bytecode, stream); - break; case 254: operand = stream.getUint8(); break; @@ -10731,20 +10700,20 @@ var Parser = function() { isFunctionEnder = true; break; default: - JSSMS.Utils.console.error("Unexpected opcode", toHex(opcode)) + JSSMS.Utils.console.error("Unexpected opcode", toHex(opcode)); } bytecode.nextAddress = stream.position; bytecode.operand = operand; bytecode.target = target; bytecode.isFunctionEnder = isFunctionEnder; bytecode.canEnd = canEnd; - return bytecode + return bytecode; } function getCB(bytecode, stream) { var opcode = stream.getUint8(); bytecode.opcode.push(opcode); bytecode.nextAddress = stream.position; - return bytecode + return bytecode; } function getED(bytecode, stream) { var opcode = stream.getUint8(); @@ -10899,27 +10868,27 @@ var Parser = function() { case 171: break; case 176: - if(ACCURATE_INTERRUPT_EMULATION) { + if (ACCURATE_INTERRUPT_EMULATION) { target = stream.position - 2; - canEnd = true + canEnd = true; } break; case 177: - if(ACCURATE_INTERRUPT_EMULATION) { + if (ACCURATE_INTERRUPT_EMULATION) { target = stream.position - 2; - canEnd = true + canEnd = true; } break; case 178: - if(ACCURATE_INTERRUPT_EMULATION) { + if (ACCURATE_INTERRUPT_EMULATION) { target = stream.position - 2; - canEnd = true + canEnd = true; } break; case 179: - if(ACCURATE_INTERRUPT_EMULATION) { + if (ACCURATE_INTERRUPT_EMULATION) { target = stream.position - 2; - canEnd = true + canEnd = true; } break; case 184: @@ -10927,26 +10896,26 @@ var Parser = function() { case 185: break; case 186: - if(ACCURATE_INTERRUPT_EMULATION) { + if (ACCURATE_INTERRUPT_EMULATION) { target = stream.position - 2; - canEnd = true + canEnd = true; } break; case 187: - if(ACCURATE_INTERRUPT_EMULATION) { + if (ACCURATE_INTERRUPT_EMULATION) { target = stream.position - 2; - canEnd = true + canEnd = true; } break; default: - JSSMS.Utils.console.error("Unexpected opcode", "0xED " + toHex(opcode)) + JSSMS.Utils.console.error("Unexpected opcode", "0xED " + toHex(opcode)); } bytecode.nextAddress = stream.position; bytecode.operand = operand; bytecode.target = target; bytecode.isFunctionEnder = isFunctionEnder; bytecode.canEnd = canEnd; - return bytecode + return bytecode; } function getIndex(bytecode, stream) { var opcode = stream.getUint8(); @@ -11146,7 +11115,6 @@ var Parser = function() { break; case 203: return getIndexCB(bytecode, stream); - break; case 225: break; case 227: @@ -11160,12 +11128,12 @@ var Parser = function() { case 249: break; default: - JSSMS.Utils.console.error("Unexpected opcode", "0xDD/0xFD " + toHex(opcode)) + JSSMS.Utils.console.error("Unexpected opcode", "0xDD/0xFD " + toHex(opcode)); } bytecode.nextAddress = stream.position; bytecode.operand = operand; bytecode.isFunctionEnder = isFunctionEnder; - return bytecode + return bytecode; } function getIndexCB(bytecode, stream) { var operand = stream.getUint8(); @@ -11173,850 +11141,827 @@ var Parser = function() { bytecode.opcode.push(opcode); bytecode.nextAddress = stream.position; bytecode.operand = operand; - return bytecode + return bytecode; } function RomStream(rom) { this.rom = rom; this.pos = null; - this.page = 0 + this.page = 0; } RomStream.prototype = {get position() { - return this.pos + return this.pos; }, get length() { - return this.rom.length * PAGE_SIZE + return this.rom.length * PAGE_SIZE; }, seek:function(pos) { - this.pos = pos + this.pos = pos; }, getUint8:function() { var value = 0; var page = this.page; var address = this.pos & 16383; - if(SUPPORT_DATAVIEW) { + if (SUPPORT_DATAVIEW) { value = this.rom[page].getUint8(address); this.pos++; - return value - }else { + return value; + } else { value = this.rom[page][address] & 255; this.pos++; - return value + return value; } }, getInt8:function() { var value = 0; var page = this.page; var address = this.pos & 16383; - if(SUPPORT_DATAVIEW) { + if (SUPPORT_DATAVIEW) { value = this.rom[page].getInt8(address); this.pos++; - return value + 1 - }else { + return value + 1; + } else { value = this.rom[page][address] & 255; - if(value >= 128) { - value = value - 256 + if (value >= 128) { + value = value - 256; } this.pos++; - return value + 1 + return value + 1; } }, getUint16:function() { var value = 0; var page = this.page; var address = this.pos & 16383; - if(SUPPORT_DATAVIEW) { - if((address & 16383) < 16383) { + if (SUPPORT_DATAVIEW) { + if ((address & 16383) < 16383) { value = this.rom[page].getUint16(address, LITTLE_ENDIAN); this.pos += 2; - return value - }else { + return value; + } else { value = this.rom[page].getUint8(address) | this.rom[++page].getUint8(address) << 8; this.pos += 2; - return value + return value; } - }else { + } else { value = this.rom[page][address] & 255 | (this.rom[++page][address] & 255) << 8; this.pos += 2; - return value + return value; } }}; - return parser + return parser; }(); -var UINT8 = 1; -var INT8 = 2; -var UINT16 = 3; var BIT_TABLE = [1, 2, 4, 8, 16, 32, 64, 128]; var n = {IfStatement:function(test, consequent, alternate) { - if(alternate == undefined) { - alternate = null + if (alternate === undefined) { + alternate = null; } - return{"type":"IfStatement", "test":test, "consequent":consequent, "alternate":alternate} + return{"type":"IfStatement", "test":test, "consequent":consequent, "alternate":alternate}; }, BlockStatement:function(body) { - if(body == undefined) { - body = [] + if (body === undefined) { + body = []; } - if(!Array.isArray(body)) { - body = [body] + if (!Array.isArray(body)) { + body = [body]; } - return{"type":"BlockStatement", "body":body} + return{"type":"BlockStatement", "body":body}; }, ExpressionStatement:function(expression) { - return{"type":"ExpressionStatement", "expression":expression} + return{"type":"ExpressionStatement", "expression":expression}; }, ReturnStatement:function(argument) { - if(argument == undefined) { - argument = null + if (argument === undefined) { + argument = null; } - return{"type":"ReturnStatement", "argument":argument} + return{"type":"ReturnStatement", "argument":argument}; }, VariableDeclaration:function(name, init) { - return{"type":"VariableDeclaration", "declarations":[{"type":"VariableDeclarator", "id":{"type":"Identifier", "name":name}, "init":init}], "kind":"var"} + return{"type":"VariableDeclaration", "declarations":[{"type":"VariableDeclarator", "id":{"type":"Identifier", "name":name}, "init":init}], "kind":"var"}; }, Identifier:function(name) { - return{"type":"Identifier", "name":name} + return{"type":"Identifier", "name":name}; }, Literal:function(value) { - if(typeof value == "number") { - return{"type":"Literal", "value":value, "raw":DEBUG ? JSSMS.Utils.toHex(value) : "" + value} - }else { - return{"type":"Literal", "value":value, "raw":"" + value} + if (typeof value == "number") { + return{"type":"Literal", "value":value, "raw":DEBUG ? JSSMS.Utils.toHex(value) : "" + value}; + } else { + return{"type":"Literal", "value":value, "raw":"" + value}; } }, CallExpression:function(callee, args) { - if(args == undefined) { - args = [] + if (args === undefined) { + args = []; } - if(!Array.isArray(args)) { - args = [args] + if (!Array.isArray(args)) { + args = [args]; } - return{"type":"CallExpression", "callee":n.Identifier(callee), "arguments":args} + return{"type":"CallExpression", "callee":n.Identifier(callee), "arguments":args}; }, AssignmentExpression:function(operator, left, right) { - return{"type":"AssignmentExpression", "operator":operator, "left":left, "right":right} + return{"type":"AssignmentExpression", "operator":operator, "left":left, "right":right}; }, BinaryExpression:function(operator, left, right) { - return{"type":"BinaryExpression", "operator":operator, "left":left, "right":right} + return{"type":"BinaryExpression", "operator":operator, "left":left, "right":right}; }, UnaryExpression:function(operator, argument) { - return{"type":"UnaryExpression", "operator":operator, "argument":argument} + return{"type":"UnaryExpression", "operator":operator, "argument":argument}; }, MemberExpression:function(object, property) { - return{"type":"MemberExpression", "computed":true, "object":object, "property":property} + return{"type":"MemberExpression", "computed":true, "object":object, "property":property}; }, ArrayExpression:function(elements) { - return{"type":"ArrayExpression", "elements":elements} + return{"type":"ArrayExpression", "elements":elements}; }, ConditionalExpression:function(test, consequent, alternate) { - return{"type":"ConditionalExpression", "test":test, "consequent":consequent, "alternate":alternate} + return{"type":"ConditionalExpression", "test":test, "consequent":consequent, "alternate":alternate}; }, LogicalExpression:function(operator, left, right) { - return{"type":"LogicalExpression", "operator":operator, "left":left, "right":right} + return{"type":"LogicalExpression", "operator":operator, "left":left, "right":right}; }, Register:function(name) { - return{"type":"Register", "name":name} + return{"type":"Register", "name":name}; }, Bit:function(bitNumber) { - return n.Literal(BIT_TABLE[bitNumber]) + return n.Literal(BIT_TABLE[bitNumber]); }}; var o = {SET16:function(register1, register2, value) { - if(value.type == "Literal") { - var hi = evaluate(n.BinaryExpression(">>", value, n.Literal(8))); - var lo = evaluate(n.BinaryExpression("&", value, n.Literal(255))); - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), hi)), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), lo))] - }else { - return[n.VariableDeclaration("val", value), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.BinaryExpression(">>", n.Identifier("val"), n.Literal(8)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), n.BinaryExpression("&", n.Identifier("val"), n.Literal(255))))] + if (value.type == "Literal") { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.BinaryExpression(">>", value, n.Literal(8)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), n.BinaryExpression("&", value, n.Literal(255))))]; + } else { + return[n.VariableDeclaration("val", value), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.BinaryExpression(">>", n.Identifier("val"), n.Literal(8)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), n.BinaryExpression("&", n.Identifier("val"), n.Literal(255))))]; } }, EX:function(register1, register2) { - if(SUPPORT_DESTRUCTURING) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.ArrayExpression([n.Register(register1), n.Register(register2)]), n.ArrayExpression([n.Register(register2), n.Register(register1)])))] - }else { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register(register1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.Register(register2))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), n.Identifier("temp")))] + if (SUPPORT_DESTRUCTURING) { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.ArrayExpression([n.Register(register1), n.Register(register2)]), n.ArrayExpression([n.Register(register2), n.Register(register1)])))]; + } else { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register(register1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.Register(register2))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), n.Identifier("temp")))]; } }, NOOP:function() { return function() { - return - } + }; }, LD8:function(srcRegister, dstRegister1, dstRegister2) { - if(dstRegister1 == undefined && dstRegister2 == undefined) { + if (dstRegister1 === undefined && dstRegister2 === undefined) { return function(value) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), n.Literal(value))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), n.Literal(value))); + }; } - if(dstRegister1 == "i" && dstRegister2 == undefined) { + if (dstRegister1 == "i" && dstRegister2 === undefined) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), n.Register("i"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZ_TABLE"), n.Register(srcRegister))), n.ConditionalExpression(n.Identifier("iff2"), n.Literal(F_PARITY), n.Literal(0)))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), n.Register("i"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZ_TABLE"), n.Register(srcRegister))), n.ConditionalExpression(n.Identifier("iff2"), n.Literal(F_PARITY), n.Literal(0)))))]; + }; } - if(dstRegister1 == "r" && dstRegister2 == undefined) { + if (dstRegister1 == "r" && dstRegister2 === undefined) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), REFRESH_EMULATION ? n.Register("r") : n.CallExpression("JSSMS.Utils.rndInt", n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZ_TABLE"), n.Register(srcRegister))), n.ConditionalExpression(n.Identifier("iff2"), n.Literal(F_PARITY), n.Literal(0)))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), REFRESH_EMULATION ? n.Register("r") : n.CallExpression("JSSMS.Utils.rndInt", n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZ_TABLE"), n.Register(srcRegister))), n.ConditionalExpression(n.Identifier("iff2"), n.Literal(F_PARITY), n.Literal(0)))))]; + }; } - if(dstRegister2 == undefined) { + if (dstRegister2 === undefined) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), n.Register(dstRegister1))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), n.Register(dstRegister1))); + }; } - if(dstRegister1 == "n" && dstRegister2 == "n") { + if (dstRegister1 == "n" && dstRegister2 == "n") { return function(value) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), o.READ_MEM8(n.Literal(value)))) - } - }else { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), o.READ_MEM8(n.Literal(value)))); + }; + } else { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), o.READ_MEM8(n.CallExpression("get" + (dstRegister1 + dstRegister2).toUpperCase())))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), o.READ_MEM8(n.CallExpression("get" + (dstRegister1 + dstRegister2).toUpperCase())))); + }; } }, LD8_D:function(srcRegister, dstRegister1, dstRegister2) { return function(value) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (dstRegister1 + dstRegister2).toUpperCase()), n.Literal(value))))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(srcRegister), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (dstRegister1 + dstRegister2).toUpperCase()), n.Literal(value))))); + }; }, LD16:function(srcRegister1, srcRegister2, dstRegister1, dstRegister2) { - if(dstRegister1 == undefined && dstRegister2 == undefined) { + if (dstRegister1 === undefined && dstRegister2 === undefined) { return function(value) { - return o.SET16(srcRegister1, srcRegister2, n.Literal(value)) - } + return o.SET16(srcRegister1, srcRegister2, n.Literal(value)); + }; } - if(dstRegister1 == "n" && dstRegister2 == "n") { + if (dstRegister1 == "n" && dstRegister2 == "n") { return function(value) { - return o.SET16(srcRegister1, srcRegister2, o.READ_MEM16(n.Literal(value))) - } - }else { - JSSMS.Utils.console.error("Wrong parameters number") + return o.SET16(srcRegister1, srcRegister2, o.READ_MEM16(n.Literal(value))); + }; } + JSSMS.Utils.console.error("Wrong parameters number"); }, LD_WRITE_MEM:function(srcRegister1, srcRegister2, dstRegister1, dstRegister2) { - if(dstRegister1 == undefined && dstRegister2 == undefined) { + if (dstRegister1 === undefined && dstRegister2 === undefined) { return function(value) { - return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + (srcRegister1 + srcRegister2).toUpperCase()), n.Literal(value)])) - } + return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + (srcRegister1 + srcRegister2).toUpperCase()), n.Literal(value)])); + }; } - if(srcRegister1 == "n" && srcRegister2 == "n" && dstRegister2 == undefined) { + if (srcRegister1 == "n" && (srcRegister2 == "n" && dstRegister2 === undefined)) { return function(value) { - return n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value), n.Register(dstRegister1)])) - } + return n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value), n.Register(dstRegister1)])); + }; } - if(srcRegister1 == "n" && srcRegister2 == "n") { + if (srcRegister1 == "n" && srcRegister2 == "n") { return function(value) { - return[n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value), n.Register(dstRegister2)])), n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value + 1), n.Register(dstRegister1)]))] - } - }else { + return[n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value), n.Register(dstRegister2)])), n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value + 1), n.Register(dstRegister1)]))]; + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + (srcRegister1 + srcRegister2).toUpperCase()), n.Register(dstRegister1)])) - } + return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + (srcRegister1 + srcRegister2).toUpperCase()), n.Register(dstRegister1)])); + }; } }, LD_SP:function(register1, register2) { - if(register1 == undefined && register2 == undefined) { + if (register1 === undefined && register2 === undefined) { return function(value) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.Literal(value))) - } - }else { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.Literal(value))); + }; + } else { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.CallExpression("get" + (register1 + register2).toUpperCase()))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.CallExpression("get" + (register1 + register2).toUpperCase()))); + }; } }, LD_NN:function(register1, register2) { - if(register2 == undefined) { + if (register2 === undefined) { return function(value) { - return[n.ExpressionStatement(n.CallExpression("writeMem", n.Literal(value), n.BinaryExpression("&", n.Identifier(register1), n.Literal(255)))), n.ExpressionStatement(n.CallExpression("writeMem", n.Literal(value + 1), n.BinaryExpression(">>", n.Identifier(register1), n.Literal(8))))] - } - }else { + return[n.ExpressionStatement(n.CallExpression("writeMem", n.Literal(value), n.BinaryExpression("&", n.Identifier(register1), n.Literal(255)))), n.ExpressionStatement(n.CallExpression("writeMem", n.Literal(value + 1), n.BinaryExpression(">>", n.Identifier(register1), n.Literal(8))))]; + }; + } else { return function(value) { - return[n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value), n.Register(register2)])), n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value + 1), n.Register(register1)]))] - } + return[n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value), n.Register(register2)])), n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal(value + 1), n.Register(register1)]))]; + }; } }, INC8:function(register1, register2) { - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression("inc8", n.Register(register1)))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression("inc8", n.Register(register1)))); + }; } - if(register1 == "s" && register2 == "p") { + if (register1 == "s" && register2 == "p") { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1)))) - } - }else { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1)))); + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("incMem", n.CallExpression("getHL"))) - } + return n.ExpressionStatement(n.CallExpression("incMem", n.CallExpression("getHL"))); + }; } }, INC16:function(register1, register2) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), n.BinaryExpression("&", n.BinaryExpression("+", n.Register(register2), n.Literal(1)), n.Literal(255)))), n.IfStatement(n.BinaryExpression("==", n.Register(register2), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.BinaryExpression("&", n.BinaryExpression("+", n.Register(register1), n.Literal(1)), n.Literal(255))))]))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), n.BinaryExpression("&", n.BinaryExpression("+", n.Register(register2), n.Literal(1)), n.Literal(255)))), n.IfStatement(n.BinaryExpression("==", n.Register(register2), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.BinaryExpression("&", n.BinaryExpression("+", n.Register(register1), n.Literal(1)), n.Literal(255))))]))]; + }; }, DEC8:function(register1, register2) { - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression("dec8", n.Register(register1)))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression("dec8", n.Register(register1)))); + }; } - if(register1 == "s" && register2 == "p") { + if (register1 == "s" && register2 == "p") { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.BinaryExpression("-", n.Identifier("sp"), n.Literal(1)))) - } - }else { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.BinaryExpression("-", n.Identifier("sp"), n.Literal(1)))); + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("decMem", n.CallExpression("getHL"))) - } + return n.ExpressionStatement(n.CallExpression("decMem", n.CallExpression("getHL"))); + }; } }, DEC16:function(register1, register2) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), n.BinaryExpression("&", n.BinaryExpression("-", n.Register(register2), n.Literal(1)), n.Literal(255)))), n.IfStatement(n.BinaryExpression("==", n.Register(register2), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.BinaryExpression("&", n.BinaryExpression("-", n.Register(register1), n.Literal(1)), n.Literal(255))))]))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register2), n.BinaryExpression("&", n.BinaryExpression("-", n.Register(register2), n.Literal(1)), n.Literal(255)))), n.IfStatement(n.BinaryExpression("==", n.Register(register2), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.BinaryExpression("&", n.BinaryExpression("-", n.Register(register1), n.Literal(1)), n.Literal(255))))]))]; + }; }, ADD16:function(register1, register2, register3, register4) { - if(register4 == undefined) { + if (register4 === undefined) { return function() { - return o.SET16(register1, register2, n.CallExpression("add16", [n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Register(register3)])) - } - }else { + return o.SET16(register1, register2, n.CallExpression("add16", [n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Register(register3)])); + }; + } else { return function() { - return o.SET16(register1, register2, n.CallExpression("add16", [n.CallExpression("get" + (register1 + register2).toUpperCase()), n.CallExpression("get" + (register3 + register4).toUpperCase())])) - } + return o.SET16(register1, register2, n.CallExpression("add16", [n.CallExpression("get" + (register1 + register2).toUpperCase()), n.CallExpression("get" + (register3 + register4).toUpperCase())])); + }; } }, RLCA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("rlca_a")) - } + return n.ExpressionStatement(n.CallExpression("rlca_a")); + }; }, RRCA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("rrca_a")) - } + return n.ExpressionStatement(n.CallExpression("rrca_a")); + }; }, RLA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("rla_a")) - } + return n.ExpressionStatement(n.CallExpression("rla_a")); + }; }, RRA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("rra_a")) - } + return n.ExpressionStatement(n.CallExpression("rra_a")); + }; }, DAA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("daa")) - } + return n.ExpressionStatement(n.CallExpression("daa")); + }; }, CPL:function() { return function() { - return n.ExpressionStatement(n.CallExpression("cpl_a")) - } + return n.ExpressionStatement(n.CallExpression("cpl_a")); + }; }, SCF:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))]; + }; }, CCF:function() { return function() { - return n.ExpressionStatement(n.CallExpression("ccf")) - } + return n.ExpressionStatement(n.CallExpression("ccf")); + }; }, ADD:function(register1, register2) { - if(register1 == undefined && register2 == undefined) { + if (register1 === undefined && register2 === undefined) { return function(value) { - return n.ExpressionStatement(n.CallExpression("add_a", n.Literal(value))) - } + return n.ExpressionStatement(n.CallExpression("add_a", n.Literal(value))); + }; } - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.CallExpression("add_a", n.Register(register1))) - } - }else { + return n.ExpressionStatement(n.CallExpression("add_a", n.Register(register1))); + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("add_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("add_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))); + }; } }, ADC:function(register1, register2) { - if(register1 == undefined && register2 == undefined) { + if (register1 === undefined && register2 === undefined) { return function(value) { - return n.ExpressionStatement(n.CallExpression("adc_a", n.Literal(value))) - } + return n.ExpressionStatement(n.CallExpression("adc_a", n.Literal(value))); + }; } - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.CallExpression("adc_a", n.Register(register1))) - } - }else { + return n.ExpressionStatement(n.CallExpression("adc_a", n.Register(register1))); + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("adc_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("adc_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))); + }; } }, SUB:function(register1, register2) { - if(register1 == undefined && register2 == undefined) { + if (register1 === undefined && register2 === undefined) { return function(value, target, nextAddress) { - return n.ExpressionStatement(n.CallExpression("sub_a", n.Literal(value))) - } + return n.ExpressionStatement(n.CallExpression("sub_a", n.Literal(value))); + }; } - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.CallExpression("sub_a", n.Register(register1))) - } - }else { + return n.ExpressionStatement(n.CallExpression("sub_a", n.Register(register1))); + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("sub_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("sub_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))); + }; } }, SBC:function(register1, register2) { - if(register1 == undefined && register2 == undefined) { + if (register1 === undefined && register2 === undefined) { return function(value, target, nextAddress) { - return n.ExpressionStatement(n.CallExpression("sbc_a", n.Literal(value))) - } + return n.ExpressionStatement(n.CallExpression("sbc_a", n.Literal(value))); + }; } - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.CallExpression("sbc_a", n.Register(register1))) - } - }else { + return n.ExpressionStatement(n.CallExpression("sbc_a", n.Register(register1))); + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("sbc_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("sbc_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))); + }; } }, AND:function(register1, register2) { - if(register1 == undefined && register2 == undefined) { + if (register1 === undefined && register2 === undefined) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), n.Literal(value))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), n.Literal(value))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))]; + }; } - if(register1 != "a" && register2 == undefined) { + if (register1 != "a" && register2 === undefined) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), n.Register(register1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), n.Register(register1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))]; + }; } - if(register1 == "a" && register2 == undefined) { + if (register1 == "a" && register2 === undefined) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY)))) - } - }else { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY)))); + }; + } else { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))]; + }; } }, XOR:function(register1, register2) { - if(register1 == undefined && register2 == undefined) { + if (register1 === undefined && register2 === undefined) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), n.Literal(value))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), n.Literal(value))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; } - if(register1 != "a" && register2 == undefined) { + if (register1 != "a" && register2 === undefined) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), n.Register(register1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), n.Register(register1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; } - if(register1 == "a" && register2 == undefined) { + if (register1 == "a" && register2 === undefined) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register("a"), n.Literal(0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Literal(0))))] - } - }else { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register("a"), n.Literal(0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Literal(0))))]; + }; + } else { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; } }, OR:function(register1, register2) { - if(register1 == undefined && register2 == undefined) { + if (register1 === undefined && register2 === undefined) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), n.Literal(value))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), n.Literal(value))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; } - if(register1 != "a" && register2 == undefined) { + if (register1 != "a" && register2 === undefined) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), n.Register(register1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), n.Register(register1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; } - if(register1 == "a" && register2 == undefined) { + if (register1 == "a" && register2 === undefined) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")))) - } - }else { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")))); + }; + } else { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; } }, CP:function(register1, register2) { - if(register1 == undefined && register2 == undefined) { + if (register1 === undefined && register2 === undefined) { return function(value) { - return n.ExpressionStatement(n.CallExpression("cp_a", n.Literal(value))) - } + return n.ExpressionStatement(n.CallExpression("cp_a", n.Literal(value))); + }; } - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.CallExpression("cp_a", n.Register(register1))) - } - }else { + return n.ExpressionStatement(n.CallExpression("cp_a", n.Register(register1))); + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("cp_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("cp_a", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())))); + }; } }, POP:function(register1, register2) { return function() { - return[].concat(o.SET16(register1, register2, o.READ_MEM16(n.Identifier("sp"))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2)))) - } + return[].concat(o.SET16(register1, register2, o.READ_MEM16(n.Identifier("sp"))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2)))); + }; }, PUSH:function(register1, register2) { return function() { - return n.ExpressionStatement(n.CallExpression("pushUint8", [n.Register(register1), n.Register(register2)])) - } + return n.ExpressionStatement(n.CallExpression("pushUint8", [n.Register(register1), n.Register(register2)])); + }; }, JR:function(test) { return function(value, target) { - return n.IfStatement(test, n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.BinaryExpression("+", n.Literal(target % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ReturnStatement()])) - } + return n.IfStatement(test, n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.BinaryExpression("+", n.Literal(target % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ReturnStatement()])); + }; }, DJNZ:function() { return function(value, target) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register("b"), n.BinaryExpression("&", n.BinaryExpression("-", n.Register("b"), n.Literal(1)), n.Literal(255)))), o.JR(n.BinaryExpression("!=", n.Register("b"), n.Literal(0)))(undefined, target)] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register("b"), n.BinaryExpression("&", n.BinaryExpression("-", n.Register("b"), n.Literal(1)), n.Literal(255)))), o.JR(n.BinaryExpression("!=", n.Register("b"), n.Literal(0)))(undefined, target)]; + }; }, JRNZ:function() { return function(value, target) { - return o.JR(n.UnaryExpression("!", n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0))))(undefined, target) - } + return o.JR(n.UnaryExpression("!", n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0))))(undefined, target); + }; }, JRZ:function() { return function(value, target) { - return o.JR(n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0)))(undefined, target) - } + return o.JR(n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0)))(undefined, target); + }; }, JRNC:function() { return function(value, target) { - return o.JR(n.UnaryExpression("!", n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(0))))(undefined, target) - } + return o.JR(n.UnaryExpression("!", n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(0))))(undefined, target); + }; }, JRC:function() { return function(value, target) { - return o.JR(n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(0)))(undefined, target) - } + return o.JR(n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(0)))(undefined, target); + }; }, RET:function(operator, bitMask) { - if(operator == undefined && bitMask == undefined) { + if (operator === undefined && bitMask === undefined) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ReturnStatement()] - } - }else { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2)))]; + }; + } else { return function(value, target, nextAddress) { - return n.IfStatement(n.BinaryExpression(operator, n.BinaryExpression("&", n.Register("f"), n.Literal(bitMask)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(6))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ReturnStatement()])) - } + return n.IfStatement(n.BinaryExpression(operator, n.BinaryExpression("&", n.Register("f"), n.Literal(bitMask)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(6))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ReturnStatement()])); + }; } }, JP:function(operator, bitMask) { - if(operator == undefined && bitMask == undefined) { + if (operator === undefined && bitMask === undefined) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal(target))), n.ReturnStatement()] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal(target)))]; + }; } - if(operator == "h" && bitMask == "l") { + if (operator == "h" && bitMask == "l") { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.CallExpression("get" + ("h" + "l").toUpperCase()))), n.ReturnStatement()] - } - }else { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.CallExpression("get" + ("h" + "l").toUpperCase())))]; + }; + } else { return function(value, target) { - return n.IfStatement(n.BinaryExpression(operator, n.BinaryExpression("&", n.Register("f"), n.Literal(bitMask)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal(target))), n.ReturnStatement()])) - } + return n.IfStatement(n.BinaryExpression(operator, n.BinaryExpression("&", n.Register("f"), n.Literal(bitMask)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal(target))), n.ReturnStatement()])); + }; } }, CALL:function(operator, bitMask) { - if(operator == undefined && bitMask == undefined) { + if (operator === undefined && bitMask === undefined) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal(nextAddress % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal(target))), n.ReturnStatement()] - } - }else { + return[n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal(nextAddress % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal(target))), n.ReturnStatement()]; + }; + } else { return function(value, target, nextAddress) { return n.IfStatement(n.BinaryExpression(operator, n.BinaryExpression("&", n.Register("f"), n.Literal(bitMask)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(7))), n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal(nextAddress % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal(target))), - n.ReturnStatement()])) - } + n.ReturnStatement()])); + }; } }, RST:function(targetAddress) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal(nextAddress % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal(targetAddress))), n.ReturnStatement()] - } + return[n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal(nextAddress % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal(targetAddress))), n.ReturnStatement()]; + }; }, DI:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Literal(false))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff2"), n.Literal(false))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("EI_inst"), n.Literal(true)))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Literal(false))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff2"), n.Literal(false))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("EI_inst"), n.Literal(true)))]; + }; }, EI:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Literal(true))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff2"), n.Literal(true))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("EI_inst"), n.Literal(true)))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Literal(true))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff2"), n.Literal(true))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("EI_inst"), n.Literal(true)))]; + }; }, OUT:function(register1, register2) { - if(register2 == undefined) { + if (register2 === undefined) { return function(value, target, nextAddress) { - return n.ExpressionStatement(n.CallExpression("port.out", [n.Literal(value), n.Register(register1)])) - } - }else { + return n.ExpressionStatement(n.CallExpression("port.out", [n.Literal(value), n.Register(register1)])); + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("port.out", [n.Register(register1), n.Register(register2)])) - } + return n.ExpressionStatement(n.CallExpression("port.out", [n.Register(register1), n.Register(register2)])); + }; } }, IN:function(register1, register2) { - if(register2 == undefined) { + if (register2 === undefined) { return function(value, target, nextAddress) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression("port.in_", n.Literal(value)))) - } - }else { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression("port.in_", n.Literal(value)))); + }; + } else { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression("port.in_", n.Register(register2)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register(register1)))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression("port.in_", n.Register(register2)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register(register1)))))]; + }; } }, EX_AF:function() { return function() { - return[].concat(o.EX("a", "a2"), o.EX("f", "f2")) - } + return[].concat(o.EX("a", "a2"), o.EX("f", "f2")); + }; }, EXX:function() { return function() { - return[].concat(o.EX("b", "b2"), o.EX("c", "c2"), o.EX("d", "d2"), o.EX("e", "e2"), o.EX("h", "h2"), o.EX("l", "l2")) - } + return[].concat(o.EX("b", "b2"), o.EX("c", "c2"), o.EX("d", "d2"), o.EX("e", "e2"), o.EX("h", "h2"), o.EX("l", "l2")); + }; }, EX_DE_HL:function() { return function() { - return[].concat(o.EX("d", "h"), o.EX("e", "l")) - } + return[].concat(o.EX("d", "h"), o.EX("e", "l")); + }; }, EX_SP_HL:function() { return function() { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register("h"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("h"), o.READ_MEM8(n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1))))), n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1)), n.Identifier("temp")])), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register("l"))), n.ExpressionStatement(n.AssignmentExpression("=", - n.Register("l"), o.READ_MEM8(n.Identifier("sp")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("sp"), n.Identifier("temp")]))] - } + n.Register("l"), o.READ_MEM8(n.Identifier("sp")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("sp"), n.Identifier("temp")]))]; + }; }, HALT:function() { return function(value, target, nextAddress) { var ret = []; - if(HALT_SPEEDUP) { - ret.push(n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("tstates"), n.Literal(0)))) + if (HALT_SPEEDUP) { + ret.push(n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("tstates"), n.Literal(0)))); } - return ret.concat([n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("halt"), n.Literal(true))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.BinaryExpression("+", n.Literal((nextAddress - 1) % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ReturnStatement()]) - } + return ret.concat([n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("halt"), n.Literal(true))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.BinaryExpression("+", n.Literal((nextAddress - 1) % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ReturnStatement()]); + }; }, RLC:generateCBFunctions("rlc"), RRC:generateCBFunctions("rrc"), RL:generateCBFunctions("rl"), RR:generateCBFunctions("rr"), SLA:generateCBFunctions("sla"), SRA:generateCBFunctions("sra"), SLL:generateCBFunctions("sll"), SRL:generateCBFunctions("srl"), BIT:function(bit, register1, register2) { - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", n.Register(register1), n.Bit(bit)))) - } - }else { - if(register1 == "h" && register2 == "l") { + return n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", n.Register(register1), n.Bit(bit)))); + }; + } else { + if (register1 == "h" && register2 == "l") { return function() { - return n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())), n.Bit(bit)))) - } - }else { + return n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())), n.Bit(bit)))); + }; + } else { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", o.READ_MEM8(n.Identifier("location")), n.Bit(bit))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", o.READ_MEM8(n.Identifier("location")), n.Bit(bit))))]; + }; } } }, RES:function(bit, register1, register2) { - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("&=", n.Register(register1), n.UnaryExpression("~", n.Bit(bit)))) - } - }else { - if(register1 == "h" && register2 == "l") { + return n.ExpressionStatement(n.AssignmentExpression("&=", n.Register(register1), n.UnaryExpression("~", n.Bit(bit)))); + }; + } else { + if (register1 == "h" && register2 == "l") { return function() { - return n.ExpressionStatement(n.CallExpression("writeMem", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.BinaryExpression("&", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())), n.UnaryExpression("~", n.Bit(bit))))) - } - }else { + return n.ExpressionStatement(n.CallExpression("writeMem", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.BinaryExpression("&", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())), n.UnaryExpression("~", n.Bit(bit))))); + }; + } else { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.BinaryExpression("&", o.READ_MEM8(n.Identifier("location")), n.UnaryExpression("~", n.Bit(bit)))]))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.BinaryExpression("&", o.READ_MEM8(n.Identifier("location")), n.UnaryExpression("~", n.Bit(bit)))]))]; + }; } } }, SET:function(bit, register1, register2) { - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("|=", n.Register(register1), n.Bit(bit))) - } - }else { - if(register1 == "h" && register2 == "l") { + return n.ExpressionStatement(n.AssignmentExpression("|=", n.Register(register1), n.Bit(bit))); + }; + } else { + if (register1 == "h" && register2 == "l") { return function() { - return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + (register1 + register2).toUpperCase()), n.BinaryExpression("|", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())), n.Bit(bit))])) - } - }else { + return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + (register1 + register2).toUpperCase()), n.BinaryExpression("|", o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase())), n.Bit(bit))])); + }; + } else { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.BinaryExpression("|", o.READ_MEM8(n.Identifier("location")), n.Bit(bit))]))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.BinaryExpression("|", o.READ_MEM8(n.Identifier("location")), n.Bit(bit))]))]; + }; } } }, LD_X:function(register1, register2, register3) { - if(register3 == undefined) { + if (register3 === undefined) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value & 255)), n.Literal(value >> 8)]))] - } - }else { + return[n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value & 255)), n.Literal(value >> 8)]))]; + }; + } else { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.CallExpression("get" + (register2 + register3).toUpperCase()), n.Literal(value)), n.Register(register1)]))] - } + return[n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.CallExpression("get" + (register2 + register3).toUpperCase()), n.Literal(value)), n.Register(register1)]))]; + }; } }, INC_X:function(register1, register2) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.CallExpression("incMem", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))] - } + return[n.ExpressionStatement(n.CallExpression("incMem", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))]; + }; }, DEC_X:function(register1, register2) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.CallExpression("decMem", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))] - } + return[n.ExpressionStatement(n.CallExpression("decMem", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))]; + }; }, ADD_X:function(register1, register2) { return function(value, target, nextAddress) { - return n.ExpressionStatement(n.CallExpression("add_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))) - } + return n.ExpressionStatement(n.CallExpression("add_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))); + }; }, ADC_X:function(register1, register2) { return function(value, target, nextAddress) { - return n.ExpressionStatement(n.CallExpression("adc_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))) - } + return n.ExpressionStatement(n.CallExpression("adc_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))); + }; }, SUB_X:function(register1, register2) { return function(value, target, nextAddress) { - return n.ExpressionStatement(n.CallExpression("sub_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))) - } + return n.ExpressionStatement(n.CallExpression("sub_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))); + }; }, SBC_X:function(register1, register2) { return function(value, target, nextAddress) { - return n.ExpressionStatement(n.CallExpression("sbc_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))) - } + return n.ExpressionStatement(n.CallExpression("sbc_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))); + }; }, AND_X:function(register1, register2) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))]; + }; }, XOR_X:function(register1, register2) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; }, OR_X:function(register1, register2) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; }, CP_X:function(register1, register2) { return function(value) { - return n.ExpressionStatement(n.CallExpression("cp_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))) - } + return n.ExpressionStatement(n.CallExpression("cp_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value))))); + }; }, EX_SP_X:function(register1, register2) { return function() { return[].concat(n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.CallExpression("get" + (register1 + register2).toUpperCase()))), o.SET16(register1, register2, o.READ_MEM16(n.Identifier("sp"))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("sp"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))])), n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1)), n.BinaryExpression(">>", n.Identifier("sp"), - n.Literal(8))]))) - } + n.Literal(8))]))); + }; }, JP_X:function(register1, register2) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.CallExpression("get" + (register1 + register2).toUpperCase()))), n.ReturnStatement()] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.CallExpression("get" + (register1 + register2).toUpperCase())))]; + }; }, ADC16:function(register1, register2) { return function(value, target, nextAddress) { - if(register2 == undefined) { - var valueAST = n.VariableDeclaration("value", n.Identifier(register1)) - }else { - var valueAST = n.VariableDeclaration("value", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register(register1), n.Literal(8)), n.Register(register2))) + var valueAST; + if (register2 === undefined) { + valueAST = n.VariableDeclaration("value", n.Identifier(register1)); + } else { + valueAST = n.VariableDeclaration("value", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register(register1), n.Literal(8)), n.Register(register2))); } return[valueAST, n.VariableDeclaration("val", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register("h"), n.Literal(8)), n.Register("l"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("+", n.BinaryExpression("+", n.Identifier("val"), n.Identifier("value")), n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.BinaryExpression(">>", n.BinaryExpression("^", n.BinaryExpression("^", n.Identifier("val"), n.Identifier("temp")), n.Identifier("value")), n.Literal(8)), n.Literal(16)), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(16)), n.Literal(1))), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(8)), n.Literal(128))), n.ConditionalExpression(n.BinaryExpression("!=", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(65535)), n.Literal(0)), n.Literal(0), n.Literal(64))), n.BinaryExpression(">>", n.BinaryExpression("&", n.BinaryExpression("&", n.BinaryExpression("^", n.BinaryExpression("^", n.Identifier("value"), n.Identifier("val")), n.Literal(32768)), n.BinaryExpression("^", n.Identifier("value"), n.Identifier("temp"))), n.Literal(32768)), n.Literal(13))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("h"), n.BinaryExpression("&", n.BinaryExpression(">>", - n.Identifier("temp"), n.Literal(8)), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("l"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))))] - } + n.Identifier("temp"), n.Literal(8)), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("l"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))))]; + }; }, SBC16:function(register1, register2) { return function(value, target, nextAddress) { - if(register2 == undefined) { - var valueAST = n.VariableDeclaration("value", n.Identifier(register1)) - }else { - var valueAST = n.VariableDeclaration("value", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register(register1), n.Literal(8)), n.Register(register2))) + var valueAST; + if (register2 === undefined) { + valueAST = n.VariableDeclaration("value", n.Identifier(register1)); + } else { + valueAST = n.VariableDeclaration("value", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register(register1), n.Literal(8)), n.Register(register2))); } return[valueAST, n.VariableDeclaration("val", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register("h"), n.Literal(8)), n.Register("l"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("-", n.BinaryExpression("-", n.Identifier("val"), n.Identifier("value")), n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.BinaryExpression(">>", n.BinaryExpression("^", n.BinaryExpression("^", n.Identifier("val"), n.Identifier("temp")), n.Identifier("value")), n.Literal(8)), n.Literal(16)), n.Literal(2)), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(16)), n.Literal(1))), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(8)), n.Literal(128))), n.ConditionalExpression(n.BinaryExpression("!=", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(65535)), n.Literal(0)), n.Literal(0), n.Literal(64))), n.BinaryExpression(">>", n.BinaryExpression("&", n.BinaryExpression("&", n.BinaryExpression("^", n.Identifier("value"), n.Identifier("val")), n.BinaryExpression("^", n.Identifier("val"), n.Identifier("temp"))), n.Literal(32768)), n.Literal(13))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("h"), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), - n.Literal(8)), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("l"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))))] - } + n.Literal(8)), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("l"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))))]; + }; }, NEG:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register("a"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("a"), n.Literal(0))), n.ExpressionStatement(n.CallExpression("sub_a", n.Identifier("temp")))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register("a"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("a"), n.Literal(0))), n.ExpressionStatement(n.CallExpression("sub_a", n.Identifier("temp")))]; + }; }, RETN_RETI:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Identifier("iff2")))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Identifier("iff2")))]; + }; }, IM:function(value) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("im"), n.Literal(value))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("im"), n.Literal(value))); + }; }, INI:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.CallExpression("port.in_", n.Register("c")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ("h" + "l").toUpperCase()), n.Identifier("temp")])), o.DEC8("b")(), n.ExpressionStatement(n.CallExpression("incHL")), n.IfStatement(n.BinaryExpression("==", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(128)), n.Literal(128)), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=", - n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))] - } + n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))]; + }; }, OUTI:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("get" + ("h" + "l").toUpperCase())))), n.ExpressionStatement(n.CallExpression("port.out", [n.Register("c"), n.Identifier("temp")])), o.DEC8("b")(), n.ExpressionStatement(n.CallExpression("incHL")), n.IfStatement(n.BinaryExpression(">", n.BinaryExpression("+", n.Register("l"), n.Identifier("temp")), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_HALFCARRY)))]), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_CARRY)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))])), n.IfStatement(n.BinaryExpression("==", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(128)), n.Literal(128)), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=", - n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))] - } + n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))]; + }; }, OUTD:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("get" + ("h" + "l").toUpperCase())))), n.ExpressionStatement(n.CallExpression("port.out", [n.Register("c"), n.Identifier("temp")])), o.DEC8("b")(), n.ExpressionStatement(n.CallExpression("decHL")), n.IfStatement(n.BinaryExpression(">", n.BinaryExpression("+", n.Register("l"), n.Identifier("temp")), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_HALFCARRY)))]), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_CARRY)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))])), n.IfStatement(n.BinaryExpression("==", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(128)), n.Literal(128)), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=", - n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))] - } + n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))]; + }; }, LDI:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("get" + ("h" + "l").toUpperCase())))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ("d" + "e").toUpperCase()), n.Identifier("temp")])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("incDE")), n.ExpressionStatement(n.CallExpression("incHL")), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("&", n.BinaryExpression("+", n.Identifier("temp"), n.Register("a")), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(193)), n.ConditionalExpression(n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(F_PARITY), n.Literal(0))), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_BIT3))), n.ConditionalExpression(n.BinaryExpression("&", - n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), n.Literal(0)))))] - } + n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), n.Literal(0)))))]; + }; }, CPI:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(F_NEGATIVE)))), n.ExpressionStatement(n.CallExpression("cp_a", [o.READ_MEM8(n.CallExpression("get" + ("h" + "l").toUpperCase()))])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("incHL")), n.ExpressionStatement(n.AssignmentExpression("|=", n.Identifier("temp"), n.ConditionalExpression(n.BinaryExpression("==", - n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(0)), n.Literal(0), n.Literal(F_PARITY)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp"))))] - } + n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(0)), n.Literal(0), n.Literal(F_PARITY)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp"))))]; + }; }, LDD:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("get" + ("h" + "l").toUpperCase())))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ("d" + "e").toUpperCase()), n.Identifier("temp")])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("decDE")), n.ExpressionStatement(n.CallExpression("decHL")), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("&", n.BinaryExpression("+", n.Identifier("temp"), n.Register("a")), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(193)), n.ConditionalExpression(n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(F_PARITY), n.Literal(0))), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_BIT3))), n.ConditionalExpression(n.BinaryExpression("&", - n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), n.Literal(0)))))] - } + n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), n.Literal(0)))))]; + }; }, LDIR:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("get" + ("h" + "l").toUpperCase())))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ("d" + "e").toUpperCase()), n.Identifier("temp")])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("incDE")), n.ExpressionStatement(n.CallExpression("incHL")), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("&", n.BinaryExpression("+", n.Identifier("temp"), n.Register("a")), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(193)), n.ConditionalExpression(n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(F_PARITY), n.Literal(0))), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_BIT3))), n.ConditionalExpression(n.BinaryExpression("&", - n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), n.Literal(0))))), n.IfStatement(n.BinaryExpression("!=", n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))] - } + n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), n.Literal(0))))), n.IfStatement(n.BinaryExpression("!=", n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))]; + }; }, CPIR:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(F_NEGATIVE)))), n.ExpressionStatement(n.CallExpression("cp_a", [o.READ_MEM8(n.CallExpression("get" + ("h" + "l").toUpperCase()))])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("incHL")), n.ExpressionStatement(n.AssignmentExpression("|=", n.Identifier("temp"), n.ConditionalExpression(n.BinaryExpression("==", n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(0)), n.Literal(0), n.Literal(F_PARITY)))), n.IfStatement(n.LogicalExpression("&&", n.BinaryExpression("!=", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_PARITY)), n.Literal(0)), n.BinaryExpression("==", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0))), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ExpressionStatement(n.AssignmentExpression("=", - n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp")))), n.ReturnStatement()])), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp"))))] - } + n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp")))), n.ReturnStatement()])), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp"))))]; + }; }, OTIR:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("get" + ("h" + "l").toUpperCase())))), n.ExpressionStatement(n.CallExpression("port.out", [n.Register("c"), n.Identifier("temp")])), o.DEC8("b")(), n.ExpressionStatement(n.CallExpression("incHL")), n.IfStatement(n.BinaryExpression(">", n.BinaryExpression("+", n.Register("l"), n.Identifier("temp")), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_HALFCARRY)))]), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_CARRY)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))])), n.IfStatement(n.BinaryExpression("!=", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(128)), n.Literal(0)), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=", - n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE)))))), n.IfStatement(n.BinaryExpression("!=", n.Register("b"), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))] - } + n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE)))))), n.IfStatement(n.BinaryExpression("!=", n.Register("b"), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))]; + }; }, LDDR:function() { return function(value, target, nextAddress) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("get" + ("h" + "l").toUpperCase())))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ("d" + "e").toUpperCase()), n.Identifier("temp")])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("decDE")), n.ExpressionStatement(n.CallExpression("decHL")), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("&", n.BinaryExpression("+", n.Identifier("temp"), n.Register("a")), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(193)), n.ConditionalExpression(n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(F_PARITY), n.Literal(0))), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_BIT3))), n.ConditionalExpression(n.BinaryExpression("&", - n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), n.Literal(0))))), n.IfStatement(n.BinaryExpression("!=", n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))] - } + n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), n.Literal(0))))), n.IfStatement(n.BinaryExpression("!=", n.CallExpression("get" + ("b" + "c").toUpperCase()), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))]; + }; }, LD_RLC:generateIndexCBFunctions("rlc"), LD_RRC:generateIndexCBFunctions("rrc"), LD_RL:generateIndexCBFunctions("rl"), LD_RR:generateIndexCBFunctions("rr"), LD_SLA:generateIndexCBFunctions("sla"), LD_SRA:generateIndexCBFunctions("sra"), LD_SLL:generateIndexCBFunctions("sll"), LD_SRL:generateIndexCBFunctions("srl"), READ_MEM8:function(value) { - return n.CallExpression("readMem", value) + return n.CallExpression("readMem", value); }, READ_MEM16:function(value) { - return n.CallExpression("readMemWord", value) + return n.CallExpression("readMemWord", value); }}; function generateCBFunctions(fn) { return function(register1, register2) { - if(register2 == undefined) { + if (register2 === undefined) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression(fn, n.Register(register1)))) - } - }else { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register1), n.CallExpression(fn, n.Register(register1)))); + }; + } else { return function() { - return n.ExpressionStatement(n.CallExpression("writeMem", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.CallExpression(fn, o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase()))))) - } + return n.ExpressionStatement(n.CallExpression("writeMem", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.CallExpression(fn, o.READ_MEM8(n.CallExpression("get" + (register1 + register2).toUpperCase()))))); + }; } - } + }; } function generateIndexCBFunctions(fn) { return function(register1, register2, register3) { - if(register3 == undefined) { + if (register3 === undefined) { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.CallExpression(fn, o.READ_MEM8(n.Identifier("location")))]))] - } - }else { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.CallExpression(fn, o.READ_MEM8(n.Identifier("location")))]))]; + }; + } else { return function(value, target, nextAddress) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register3), n.CallExpression(fn, o.READ_MEM8(n.Identifier("location"))))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.Register(register3)]))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + (register1 + register2).toUpperCase()), n.Literal(value)), n.Literal(65535)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register(register3), n.CallExpression(fn, o.READ_MEM8(n.Identifier("location"))))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.Register(register3)]))]; + }; } - } -} -function evaluate(expression) { - switch(expression.type) { - case "BinaryExpression": - if(expression.left.type != "Literal" && expression.right.type != "Literal") { - break - } - switch(expression.operator) { - case ">>": - return n.Literal(expression.left.value >> expression.right.value); - break; - case "&": - return n.Literal(expression.left.value & expression.right.value); - break - } - break - } - return expression + }; } ;var opcodeTableCB = []; var opcodeTableDDCB = []; var opcodeTableFDCB = []; var regs = {"B":["b"], "C":["c"], "D":["d"], "E":["e"], "H":["h"], "L":["l"], "(HL)":["h", "l"], "A":["a"]}; ["RLC", "RRC", "RL", "RR", "SLA", "SRA", "SLL", "SRL"].forEach(function(op) { - for(var reg in regs) { + for (var reg in regs) { opcodeTableCB.push({name:op + " " + reg, ast:o[op].apply(null, regs[reg])}); - if(reg != "(HL)") { + if (reg != "(HL)") { opcodeTableDDCB.push({name:"LD " + reg + "," + op + " (IX)", ast:o["LD_" + op].apply(null, ["ixH", "ixL"].concat(regs[reg]))}); - opcodeTableFDCB.push({name:"LD " + reg + "," + op + " (IY)", ast:o["LD_" + op].apply(null, ["iyH", "iyL"].concat(regs[reg]))}) - }else { + opcodeTableFDCB.push({name:"LD " + reg + "," + op + " (IY)", ast:o["LD_" + op].apply(null, ["iyH", "iyL"].concat(regs[reg]))}); + } else { opcodeTableDDCB.push({name:op + " (IX)", ast:o["LD_" + op]("ixH", "ixL")}); - opcodeTableFDCB.push({name:op + " (IY)", ast:o["LD_" + op]("iyH", "iyL")}) + opcodeTableFDCB.push({name:op + " (IY)", ast:o["LD_" + op]("iyH", "iyL")}); } } }); ["BIT", "RES", "SET"].forEach(function(op) { - for(var i = 0;i < 8;i++) { - for(var reg in regs) { - opcodeTableCB.push({name:op + " " + i + "," + reg, ast:o[op].apply(null, [i].concat(regs[reg]))}) + for (var i = 0;i < 8;i++) { + for (var reg in regs) { + opcodeTableCB.push({name:op + " " + i + "," + reg, ast:o[op].apply(null, [i].concat(regs[reg]))}); } - for(var j = 0;j < 8;j++) { + for (var j = 0;j < 8;j++) { opcodeTableDDCB.push({name:op + " " + i + " (IX)", ast:o[op].apply(null, [i].concat(["ixH", "ixL"]))}); - opcodeTableFDCB.push({name:op + " " + i + " (IY)", ast:o[op].apply(null, [i].concat(["iyH", "iyL"]))}) + opcodeTableFDCB.push({name:op + " " + i + " (IY)", ast:o[op].apply(null, [i].concat(["iyH", "iyL"]))}); } } }); @@ -12024,59 +11969,58 @@ function generateIndexTable(index) { var register = index.substring(1, 2).toLowerCase(); var registerH = "i" + register + "H"; var registerL = "i" + register + "L"; - return{9:{name:"ADD " + index + ",BC", ast:o.ADD16(registerH, registerL, "b", "c")}, 25:{name:"ADD " + index + ",DE", ast:o.ADD16(registerH, registerL, "d", "e")}, 33:{name:"LD " + index + ",nn", ast:o.LD16(registerH, registerL)}, 34:{name:"LD (nn)," + index, ast:o.LD_NN(registerH, registerL)}, 35:{name:"INC " + index, ast:o.INC16(registerH, registerL)}, 42:{name:"LD " + index + ",(nn)", ast:o.LD16(registerH, registerL, "n", "n"), operand:UINT16}, 43:{name:"DEC " + index, ast:o.DEC16(registerH, - registerL)}, 52:{name:"INC (" + index + "+d)", ast:o.INC_X(registerH, registerL)}, 53:{name:"DEC (" + index + "+d)", ast:o.DEC_X(registerH, registerL)}, 54:{name:"LD (" + index + "+d),n", ast:o.LD_X(registerH, registerL)}, 57:{name:"ADD " + index + ",SP", ast:o.ADD16(registerH, registerL, "sp")}, 70:{name:"LD B,(" + index + "+d)", ast:o.LD8_D("b", registerH, registerL)}, 78:{name:"LD C,(" + index + "+d)", ast:o.LD8_D("c", registerH, registerL)}, 84:{name:" LD D," + index + "H *", ast:o.LD8("d", - registerH)}, 86:{name:"LD D,(" + index + "+d)", ast:o.LD8_D("d", registerH, registerL)}, 93:{name:"LD E," + index + "L *", ast:o.LD8("e", registerL)}, 94:{name:"LD E,(" + index + "+d)", ast:o.LD8_D("e", registerH, registerL)}, 96:{name:"LD " + index + "H,B", ast:o.LD8(registerH, "b")}, 97:{name:"LD " + index + "H,C", ast:o.LD8(registerH, "c")}, 98:{name:"LD " + index + "H,D", ast:o.LD8(registerH, "d")}, 99:{name:"LD " + index + "H,E", ast:o.LD8(registerH, "e")}, 100:{name:"LD " + index + "H," + - index + "H", ast:o.NOOP()}, 101:{name:"LD " + index + "H," + index + "L *", ast:o.LD8_D(registerH, registerL)}, 102:{name:"LD H,(" + index + "+d)", ast:o.LD8_D("h", registerH, registerL)}, 103:{name:"LD " + index + "H,A", ast:o.LD8(registerH, "a")}, 104:{name:"LD " + index + "L,B", ast:o.LD8(registerL, "b")}, 105:{name:"LD " + index + "L,C", ast:o.LD8(registerL, "c")}, 106:{name:"LD " + index + "L,D", ast:o.LD8(registerL, "d")}, 107:{name:"LD " + index + "L,E", ast:o.LD8(registerL, "e")}, 108:{name:"LD " + - index + "L," + index + "H", ast:o.LD8_D(registerL, registerH)}, 109:{name:"LD " + index + "L," + index + "L *", ast:o.NOOP()}, 110:{name:"LD L,(" + index + "+d)", ast:o.LD8_D("l", registerH, registerL)}, 111:{name:"LD " + index + "L,A *", ast:o.LD8(registerL, "a")}, 112:{name:"LD (" + index + "+d),B", ast:o.LD_X("b", registerH, registerL)}, 113:{name:"LD (" + index + "+d),C", ast:o.LD_X("c", registerH, registerL)}, 114:{name:"LD (" + index + "+d),D", ast:o.LD_X("d", registerH, registerL)}, 115:{name:"LD (" + - index + "+d),E", ast:o.LD_X("e", registerH, registerL)}, 116:{name:"LD (" + index + "+d),H", ast:o.LD_X("h", registerH, registerL)}, 117:{name:"LD (" + index + "+d),L", ast:o.LD_X("l", registerH, registerL)}, 118:{name:"LD (" + index + "+d),B", ast:o.LD_X("b", registerH, registerL)}, 119:{name:"LD (" + index + "+d),A", ast:o.LD_X("a", registerH, registerL)}, 126:{name:"LD A,(" + index + "+d)", ast:o.LD8_D("a", registerH, registerL)}, 124:{name:"LD A," + index + "H", ast:o.LD8("a", registerH)}, - 125:{name:"LD A," + index + "L", ast:o.LD8("a", registerL)}, 132:{name:"ADD A," + index + "H", ast:o.ADD(registerL)}, 133:{name:"ADD A," + index + "L", ast:o.ADD(registerL)}, 134:{name:"ADD A,(" + index + "+d)", ast:o.ADD_X(registerH, registerL)}, 140:{name:"ADC A," + index + "H", ast:o.ADC(registerL)}, 141:{name:"ADC A," + index + "L", ast:o.ADC(registerL)}, 142:{name:"ADC A,(" + index + "+d)", ast:o.ADC_X(registerH, registerL)}, 148:{name:"SUB A," + index + "H", ast:o.SUB(registerL)}, 149:{name:"SUB A," + - index + "L", ast:o.SUB(registerL)}, 150:{name:"SUB A,(" + index + "+d)", ast:o.SUB_X(registerH, registerL)}, 156:{name:"SBC A," + index + "H", ast:o.SBC(registerL)}, 157:{name:"SBC A," + index + "L", ast:o.SBC(registerL)}, 158:{name:"SBC A,(" + index + "+d)", ast:o.SBC_X(registerH, registerL)}, 166:{name:"AND A,(" + index + "+d)", ast:o.AND_X(registerH, registerL)}, 174:{name:"XOR A,(" + index + "+d)", ast:o.XOR_X(registerH, registerL)}, 182:{name:"OR A,(" + index + "+d)", ast:o.OR_X(registerH, - registerL)}, 190:{name:"CP (" + index + "+d)", ast:o.CP_X(registerH, registerL)}, 203:index == "IX" ? opcodeTableDDCB : opcodeTableFDCB, 225:{name:"POP " + index, ast:o.POP(registerH, registerL)}, 227:{name:"EX SP,(" + index + ")", ast:o.EX_SP_X(registerH, registerL)}, 229:{name:"PUSH " + index, ast:o.PUSH(registerH, registerL)}, 233:{name:"JP (" + index + ")", ast:o.JP_X(registerH, registerL)}, 249:{name:"LD SP," + index, ast:o.LD_SP(registerH, registerL)}} + return{9:{name:"ADD " + index + ",BC", ast:o.ADD16(registerH, registerL, "b", "c")}, 25:{name:"ADD " + index + ",DE", ast:o.ADD16(registerH, registerL, "d", "e")}, 33:{name:"LD " + index + ",nn", ast:o.LD16(registerH, registerL)}, 34:{name:"LD (nn)," + index, ast:o.LD_NN(registerH, registerL)}, 35:{name:"INC " + index, ast:o.INC16(registerH, registerL)}, 42:{name:"LD " + index + ",(nn)", ast:o.LD16(registerH, registerL, "n", "n")}, 43:{name:"DEC " + index, ast:o.DEC16(registerH, registerL)}, 52:{name:"INC (" + + index + "+d)", ast:o.INC_X(registerH, registerL)}, 53:{name:"DEC (" + index + "+d)", ast:o.DEC_X(registerH, registerL)}, 54:{name:"LD (" + index + "+d),n", ast:o.LD_X(registerH, registerL)}, 57:{name:"ADD " + index + ",SP", ast:o.ADD16(registerH, registerL, "sp")}, 70:{name:"LD B,(" + index + "+d)", ast:o.LD8_D("b", registerH, registerL)}, 78:{name:"LD C,(" + index + "+d)", ast:o.LD8_D("c", registerH, registerL)}, 84:{name:" LD D," + index + "H *", ast:o.LD8("d", registerH)}, 86:{name:"LD D,(" + + index + "+d)", ast:o.LD8_D("d", registerH, registerL)}, 93:{name:"LD E," + index + "L *", ast:o.LD8("e", registerL)}, 94:{name:"LD E,(" + index + "+d)", ast:o.LD8_D("e", registerH, registerL)}, 96:{name:"LD " + index + "H,B", ast:o.LD8(registerH, "b")}, 97:{name:"LD " + index + "H,C", ast:o.LD8(registerH, "c")}, 98:{name:"LD " + index + "H,D", ast:o.LD8(registerH, "d")}, 99:{name:"LD " + index + "H,E", ast:o.LD8(registerH, "e")}, 100:{name:"LD " + index + "H," + index + "H", ast:o.NOOP()}, 101:{name:"LD " + + index + "H," + index + "L *", ast:o.LD8_D(registerH, registerL)}, 102:{name:"LD H,(" + index + "+d)", ast:o.LD8_D("h", registerH, registerL)}, 103:{name:"LD " + index + "H,A", ast:o.LD8(registerH, "a")}, 104:{name:"LD " + index + "L,B", ast:o.LD8(registerL, "b")}, 105:{name:"LD " + index + "L,C", ast:o.LD8(registerL, "c")}, 106:{name:"LD " + index + "L,D", ast:o.LD8(registerL, "d")}, 107:{name:"LD " + index + "L,E", ast:o.LD8(registerL, "e")}, 108:{name:"LD " + index + "L," + index + "H", ast:o.LD8_D(registerL, + registerH)}, 109:{name:"LD " + index + "L," + index + "L *", ast:o.NOOP()}, 110:{name:"LD L,(" + index + "+d)", ast:o.LD8_D("l", registerH, registerL)}, 111:{name:"LD " + index + "L,A *", ast:o.LD8(registerL, "a")}, 112:{name:"LD (" + index + "+d),B", ast:o.LD_X("b", registerH, registerL)}, 113:{name:"LD (" + index + "+d),C", ast:o.LD_X("c", registerH, registerL)}, 114:{name:"LD (" + index + "+d),D", ast:o.LD_X("d", registerH, registerL)}, 115:{name:"LD (" + index + "+d),E", ast:o.LD_X("e", registerH, + registerL)}, 116:{name:"LD (" + index + "+d),H", ast:o.LD_X("h", registerH, registerL)}, 117:{name:"LD (" + index + "+d),L", ast:o.LD_X("l", registerH, registerL)}, 118:{name:"LD (" + index + "+d),B", ast:o.LD_X("b", registerH, registerL)}, 119:{name:"LD (" + index + "+d),A", ast:o.LD_X("a", registerH, registerL)}, 126:{name:"LD A,(" + index + "+d)", ast:o.LD8_D("a", registerH, registerL)}, 124:{name:"LD A," + index + "H", ast:o.LD8("a", registerH)}, 125:{name:"LD A," + index + "L", ast:o.LD8("a", + registerL)}, 132:{name:"ADD A," + index + "H", ast:o.ADD(registerL)}, 133:{name:"ADD A," + index + "L", ast:o.ADD(registerL)}, 134:{name:"ADD A,(" + index + "+d)", ast:o.ADD_X(registerH, registerL)}, 140:{name:"ADC A," + index + "H", ast:o.ADC(registerL)}, 141:{name:"ADC A," + index + "L", ast:o.ADC(registerL)}, 142:{name:"ADC A,(" + index + "+d)", ast:o.ADC_X(registerH, registerL)}, 148:{name:"SUB A," + index + "H", ast:o.SUB(registerL)}, 149:{name:"SUB A," + index + "L", ast:o.SUB(registerL)}, + 150:{name:"SUB A,(" + index + "+d)", ast:o.SUB_X(registerH, registerL)}, 156:{name:"SBC A," + index + "H", ast:o.SBC(registerL)}, 157:{name:"SBC A," + index + "L", ast:o.SBC(registerL)}, 158:{name:"SBC A,(" + index + "+d)", ast:o.SBC_X(registerH, registerL)}, 166:{name:"AND A,(" + index + "+d)", ast:o.AND_X(registerH, registerL)}, 174:{name:"XOR A,(" + index + "+d)", ast:o.XOR_X(registerH, registerL)}, 182:{name:"OR A,(" + index + "+d)", ast:o.OR_X(registerH, registerL)}, 190:{name:"CP (" + index + + "+d)", ast:o.CP_X(registerH, registerL)}, 203:index == "IX" ? opcodeTableDDCB : opcodeTableFDCB, 225:{name:"POP " + index, ast:o.POP(registerH, registerL)}, 227:{name:"EX SP,(" + index + ")", ast:o.EX_SP_X(registerH, registerL)}, 229:{name:"PUSH " + index, ast:o.PUSH(registerH, registerL)}, 233:{name:"JP (" + index + ")", ast:o.JP_X(registerH, registerL)}, 249:{name:"LD SP," + index, ast:o.LD_SP(registerH, registerL)}}; } -;var opcodeTableED = {64:{name:"IN B,(C)", ast:o.IN("b", "c")}, 66:{name:"SBC HL,BC", ast:o.SBC16("b", "c")}, 65:{name:"OUT (C),B", ast:o.OUT("c", "b")}, 67:{name:"LD (nn),BC", ast:o.LD_NN("b", "c")}, 68:{name:"NEG", ast:o.NEG()}, 69:{name:"RETN / RETI", ast:o.RETN_RETI()}, 70:{name:"IM 0", ast:o.IM(0)}, 72:{name:"IN C,(C)", ast:o.IN("c", "c")}, 73:{name:"OUT (C),C", ast:o.OUT("c", "c")}, 74:{name:"ADC HL,BC", ast:o.ADC16("b", "c")}, 75:{name:"LD BC,(nn)", ast:o.LD16("b", "c", "n", "n"), operand:UINT16}, -76:{name:"NEG", ast:o.NEG()}, 77:{name:"RETN / RETI", ast:o.RETN_RETI()}, 78:{name:"IM 0", ast:o.IM(0)}, 79:{name:"LD R,A", ast:o.LD8("r", "a")}, 80:{name:"IN D,(C)", ast:o.IN("d", "c")}, 81:{name:"OUT (C),D", ast:o.OUT("c", "d")}, 82:{name:"SBC HL,DE", ast:o.SBC16("d", "e")}, 83:{name:"LD (nn),DE", ast:o.LD_NN("d", "e")}, 84:{name:"NEG", ast:o.NEG()}, 85:{name:"RETN / RETI", ast:o.RETN_RETI()}, 86:{name:"IM 1", ast:o.IM(1)}, 87:{name:"LD A,I", ast:o.LD8("a", "i")}, 88:{name:"IN E,(C)", ast:o.IN("e", -"c")}, 89:{name:"OUT (C),E", ast:o.OUT("c", "e")}, 90:{name:"ADC HL,DE", ast:o.ADC16("d", "e")}, 91:{name:"LD DE,(nn)", ast:o.LD16("d", "e", "n", "n"), operand:UINT16}, 92:{name:"NEG", ast:o.NEG()}, 95:{name:"LD A,R", ast:o.LD8("a", "r")}, 96:{name:"IN H,(C)", ast:o.IN("h", "c")}, 97:{name:"OUT (C),H", ast:o.OUT("c", "h")}, 98:{name:"SBC HL,HL", ast:o.SBC16("h", "l")}, 99:{name:"LD (nn),HL", ast:o.LD_NN("h", "l")}, 100:{name:"NEG", ast:o.NEG()}, 102:{name:"IM 0", ast:o.IM(0)}, 104:{name:"IN L,(C)", -ast:o.IN("l", "c")}, 105:{name:"OUT (C),L", ast:o.OUT("c", "l")}, 106:{name:"ADC HL,HL", ast:o.ADC16("h", "l")}, 107:{name:"LD HL,(nn)", ast:o.LD16("h", "l", "n", "n"), operand:UINT16}, 108:{name:"NEG", ast:o.NEG()}, 110:{name:"IM 0", ast:o.IM(0)}, 115:{name:"LD (nn),SP", ast:o.LD_NN("sp")}, 116:{name:"NEG", ast:o.NEG()}, 118:{name:"IM 1", ast:o.IM(1)}, 120:{name:"IN A,(C)", ast:o.IN("a", "c")}, 121:{name:"OUT (C),A", ast:o.OUT("c", "a")}, 122:{name:"ADC HL,SP", ast:o.ADC16("sp")}, 124:{name:"NEG", -ast:o.NEG()}, 160:{name:"LDI", ast:o.LDI()}, 161:{name:"CPI", ast:o.CPI()}, 162:{name:"INI", ast:o.INI()}, 163:{name:"OUTI", ast:o.OUTI()}, 168:{name:"LDD", ast:o.LDD()}, 171:{name:"OUTD", ast:o.OUTD()}, 176:{name:"LDIR", ast:o.LDIR()}, 177:{name:"CPIR", ast:o.CPIR()}, 179:{name:"OTIR", ast:o.OTIR()}, 184:{name:"LDDR", ast:o.LDDR()}}; -var opcodeTable = [{name:"NOP", ast:o.NOOP()}, {name:"LD BC,nn", ast:o.LD16("b", "c"), operand:UINT16}, {name:"LD (BC),A", ast:o.LD_WRITE_MEM("b", "c", "a")}, {name:"INC BC", ast:o.INC16("b", "c")}, {name:"INC B", ast:o.INC8("b")}, {name:"DEC B", ast:o.DEC8("b")}, {name:"LD B,n", ast:o.LD8("b"), operand:UINT8}, {name:"RLCA", ast:o.RLCA()}, {name:"EX AF AF'", ast:o.EX_AF()}, {name:"ADD HL,BC", ast:o.ADD16("h", "l", "b", "c")}, {name:"LD A,(BC)", ast:o.LD8("a", "b", "c")}, {name:"DEC BC", ast:o.DEC16("b", -"c")}, {name:"INC C", ast:o.INC8("c")}, {name:"DEC C", ast:o.DEC8("c")}, {name:"LD C,n", ast:o.LD8("c"), operand:UINT8}, {name:"RRCA", ast:o.RRCA()}, {name:"DJNZ (PC+e)", ast:o.DJNZ(), operand:INT8}, {name:"LD DE,nn", ast:o.LD16("d", "e"), operand:UINT16}, {name:"LD (DE),A", ast:o.LD_WRITE_MEM("d", "e", "a")}, {name:"INC DE", ast:o.INC16("d", "e")}, {name:"INC D", ast:o.INC8("d")}, {name:"DEC D", ast:o.DEC8("d")}, {name:"LD D,n", ast:o.LD8("d"), operand:UINT8}, {name:"RLA", ast:o.RLA()}, {name:"JR (PC+e)", -ast:o.JP(), operand:INT8}, {name:"ADD HL,DE", ast:o.ADD16("h", "l", "d", "e")}, {name:"LD A,(DE)", ast:o.LD8("a", "d", "e")}, {name:"DEC DE", ast:o.DEC16("d", "e")}, {name:"INC E", ast:o.INC8("e")}, {name:"DEC E", ast:o.DEC8("e")}, {name:"LD E,n", ast:o.LD8("e"), operand:UINT8}, {name:"RRA", ast:o.RRA()}, {name:"JR NZ,(PC+e)", ast:o.JRNZ(), operand:INT8}, {name:"LD HL,nn", ast:o.LD16("h", "l"), operand:UINT16}, {name:"LD (nn),HL", ast:o.LD_NN("h", "l"), operand:UINT16}, {name:"INC HL", ast:o.INC16("h", -"l")}, {name:"INC H", ast:o.INC8("h")}, {name:"DEC H", ast:o.DEC8("h")}, {name:"LD H,n", ast:o.LD8("h"), operand:UINT8}, {name:"DAA", ast:o.DAA()}, {name:"JR Z,(PC+e)", ast:o.JRZ(), operand:INT8}, {name:"ADD HL,HL", ast:o.ADD16("h", "l", "h", "l")}, {name:"LD HL,(nn)", ast:o.LD16("h", "l", "n", "n"), operand:UINT16}, {name:"DEC HL", ast:o.DEC16("h", "l")}, {name:"INC L", ast:o.INC8("l")}, {name:"DEC L", ast:o.DEC8("l")}, {name:"LD L,n", ast:o.LD8("l"), operand:UINT8}, {name:"CPL", ast:o.CPL()}, {name:"JR NC,(PC+e)", -ast:o.JRNC(), operand:INT8}, {name:"LD SP,nn", ast:o.LD_SP(), operand:UINT16}, {name:"LD (nn),A", ast:o.LD_WRITE_MEM("n", "n", "a"), operand:UINT16}, {name:"INC SP", ast:o.INC8("s", "p")}, {name:"INC (HL)", ast:o.INC8("h", "l")}, {name:"DEC (HL)", ast:o.DEC8("h", "l")}, {name:"LD (HL),n", ast:o.LD_WRITE_MEM("h", "l"), operand:UINT8}, {name:"SCF", ast:o.SCF()}, {name:"JR C,(PC+e)", ast:o.JRC(), operand:INT8}, {name:"ADD HL,SP", ast:o.ADD16("h", "l", "sp")}, {name:"LD A,(nn)", ast:o.LD8("a", "n", "n"), -operand:UINT16}, {name:"DEC SP", ast:o.DEC8("s", "p")}, {name:"INC A", ast:o.INC8("a")}, {name:"DEC A", ast:o.DEC8("a")}, {name:"LD A,n", ast:o.LD8("a"), operand:UINT8}, {name:"CCF", ast:o.CCF()}, {name:"LD B,B", ast:o.NOOP(), operand:UINT8}, {name:"LD B,C", ast:o.LD8("b", "c")}, {name:"LD B,D", ast:o.LD8("b", "d")}, {name:"LD B,E", ast:o.LD8("b", "e")}, {name:"LD B,H", ast:o.LD8("b", "h")}, {name:"LD B,L", ast:o.LD8("b", "l")}, {name:"LD B,(HL)", ast:o.LD8("b", "h", "l")}, {name:"LD B,A", ast:o.LD8("b", -"a")}, {name:"LD C,B", ast:o.LD8("c", "b")}, {name:"LD C,C", ast:o.NOOP()}, {name:"LD C,D", ast:o.LD8("c", "d")}, {name:"LD C,E", ast:o.LD8("c", "e")}, {name:"LD C,H", ast:o.LD8("c", "h")}, {name:"LD C,L", ast:o.LD8("c", "l")}, {name:"LD C,(HL)", ast:o.LD8("c", "h", "l")}, {name:"LD C,A", ast:o.LD8("c", "a")}, {name:"LD D,B", ast:o.LD8("d", "b")}, {name:"LD D,C", ast:o.LD8("d", "c")}, {name:"LD D,D", ast:o.NOOP()}, {name:"LD D,E", ast:o.LD8("d", "e")}, {name:"LD D,H", ast:o.LD8("d", "h")}, {name:"LD D,L", -ast:o.LD8("d", "l")}, {name:"LD D,(HL)", ast:o.LD8("d", "h", "l")}, {name:"LD D,A", ast:o.LD8("d", "a")}, {name:"LD E,B", ast:o.LD8("e", "b")}, {name:"LD E,C", ast:o.LD8("e", "c")}, {name:"LD E,D", ast:o.LD8("e", "d")}, {name:"LD E,E", ast:o.NOOP()}, {name:"LD E,H", ast:o.LD8("e", "h")}, {name:"LD E,L", ast:o.LD8("e", "l")}, {name:"LD E,(HL)", ast:o.LD8("e", "h", "l")}, {name:"LD E,A", ast:o.LD8("e", "a")}, {name:"LD H,B", ast:o.LD8("h", "b")}, {name:"LD H,C", ast:o.LD8("h", "c")}, {name:"LD H,D", -ast:o.LD8("h", "d")}, {name:"LD H,E", ast:o.LD8("h", "e")}, {name:"LD H,H", ast:o.NOOP()}, {name:"LD H,L", ast:o.LD8("h", "l")}, {name:"LD H,(HL)", ast:o.LD8("h", "h", "l")}, {name:"LD H,A", ast:o.LD8("h", "a")}, {name:"LD L,B", ast:o.LD8("l", "b")}, {name:"LD L,C", ast:o.LD8("l", "c")}, {name:"LD L,D", ast:o.LD8("l", "d")}, {name:"LD L,E", ast:o.LD8("l", "e")}, {name:"LD L,H", ast:o.LD8("l", "h")}, {name:"LD L,L", ast:o.NOOP()}, {name:"LD L,(HL)", ast:o.LD8("l", "h", "l")}, {name:"LD L,A", ast:o.LD8("l", -"a")}, {name:"LD (HL),B", ast:o.LD_WRITE_MEM("h", "l", "b")}, {name:"LD (HL),C", ast:o.LD_WRITE_MEM("h", "l", "c")}, {name:"LD (HL),D", ast:o.LD_WRITE_MEM("h", "l", "d")}, {name:"LD (HL),E", ast:o.LD_WRITE_MEM("h", "l", "e")}, {name:"LD (HL),H", ast:o.LD_WRITE_MEM("h", "l", "h")}, {name:"LD (HL),L", ast:o.LD_WRITE_MEM("h", "l", "l")}, {name:"HALT", ast:o.HALT()}, {name:"LD (HL),A", ast:o.LD_WRITE_MEM("h", "l", "a")}, {name:"LD A,B", ast:o.LD8("a", "b")}, {name:"LD A,C", ast:o.LD8("a", "c")}, {name:"LD A,D", -ast:o.LD8("a", "d")}, {name:"LD A,E", ast:o.LD8("a", "e")}, {name:"LD A,H", ast:o.LD8("a", "h")}, {name:"LD A,L", ast:o.LD8("a", "l")}, {name:"LD A,(HL)", ast:o.LD8("a", "h", "l")}, {name:"LD A,A", ast:o.NOOP()}, {name:"ADD A,B", ast:o.ADD("b")}, {name:"ADD A,C", ast:o.ADD("c")}, {name:"ADD A,D", ast:o.ADD("d")}, {name:"ADD A,E", ast:o.ADD("e")}, {name:"ADD A,H", ast:o.ADD("h")}, {name:"ADD A,L", ast:o.ADD("l")}, {name:"ADD A,(HL)", ast:o.ADD("h", "l")}, {name:"ADD A,A", ast:o.ADD("a")}, {name:"ADC A,B", -ast:o.ADC("b")}, {name:"ADC A,C", ast:o.ADC("c")}, {name:"ADC A,D", ast:o.ADC("d")}, {name:"ADC A,E", ast:o.ADC("e")}, {name:"ADC A,H", ast:o.ADC("h")}, {name:"ADC A,L", ast:o.ADC("l")}, {name:"ADC A,(HL)", ast:o.ADC("h", "l")}, {name:"ADC A,A", ast:o.ADC("a")}, {name:"SUB A,B", ast:o.SUB("b")}, {name:"SUB A,C", ast:o.SUB("c")}, {name:"SUB A,D", ast:o.SUB("d")}, {name:"SUB A,E", ast:o.SUB("e")}, {name:"SUB A,H", ast:o.SUB("h")}, {name:"SUB A,L", ast:o.SUB("l")}, {name:"SUB A,(HL)", ast:o.SUB("h", -"l")}, {name:"SUB A,A", ast:o.SUB("a")}, {name:"SBC A,B", ast:o.SBC("b")}, {name:"SBC A,C", ast:o.SBC("c")}, {name:"SBC A,D", ast:o.SBC("d")}, {name:"SBC A,E", ast:o.SBC("e")}, {name:"SBC A,H", ast:o.SBC("h")}, {name:"SBC A,L", ast:o.SBC("l")}, {name:"SBC A,(HL)", ast:o.SBC("h", "l")}, {name:"SBC A,A", ast:o.SBC("a")}, {name:"AND A,B", ast:o.AND("b")}, {name:"AND A,C", ast:o.AND("c")}, {name:"AND A,D", ast:o.AND("d")}, {name:"AND A,E", ast:o.AND("e")}, {name:"AND A,H", ast:o.AND("h")}, {name:"AND A,L", -ast:o.AND("l")}, {name:"AND A,(HL)", ast:o.AND("h", "l")}, {name:"AND A,A", ast:o.AND("a")}, {name:"XOR A,B", ast:o.XOR("b")}, {name:"XOR A,C", ast:o.XOR("c")}, {name:"XOR A,D", ast:o.XOR("d")}, {name:"XOR A,E", ast:o.XOR("e")}, {name:"XOR A,H", ast:o.XOR("h")}, {name:"XOR A,L", ast:o.XOR("l")}, {name:"XOR A,(HL)", ast:o.XOR("h", "l")}, {name:"XOR A,A", ast:o.XOR("a")}, {name:"OR A,B", ast:o.OR("b")}, {name:"OR A,C", ast:o.OR("c")}, {name:"OR A,D", ast:o.OR("d")}, {name:"OR A,E", ast:o.OR("e")}, -{name:"OR A,H", ast:o.OR("h")}, {name:"OR A,L", ast:o.OR("l")}, {name:"OR A,(HL)", ast:o.OR("h", "l")}, {name:"OR A,A", ast:o.OR("a")}, {name:"CP A,B", ast:o.CP("b")}, {name:"CP A,C", ast:o.CP("c")}, {name:"CP A,D", ast:o.CP("d")}, {name:"CP A,E", ast:o.CP("e")}, {name:"CP A,H", ast:o.CP("h")}, {name:"CP A,L", ast:o.CP("l")}, {name:"CP A,(HL)", ast:o.CP("h", "l")}, {name:"CP A,A", ast:o.CP("a")}, {name:"RET NZ", ast:o.RET("==", F_ZERO)}, {name:"POP BC", ast:o.POP("b", "c")}, {name:"JP NZ,(nn)", ast:o.JP("==", -F_ZERO)}, {name:"JP (nn)", ast:o.JP()}, {name:"CALL NZ (nn)", ast:o.CALL("==", F_ZERO)}, {name:"PUSH BC", ast:o.PUSH("b", "c")}, {name:"ADD A,n", ast:o.ADD()}, {name:"RST 0x00", ast:o.RST(0)}, {name:"RET Z", ast:o.RET("!=", F_ZERO)}, {name:"RET", ast:o.RET()}, {name:"JP Z,(nn)", ast:o.JP("!=", F_ZERO)}, opcodeTableCB, {name:"CALL Z (nn)", ast:o.CALL("!=", F_ZERO)}, {name:"CALL (nn)", ast:o.CALL()}, {name:"ADC A,n", ast:o.ADC()}, {name:"RST 0x08", ast:o.RST(8)}, {name:"RET NC", ast:o.RET("==", F_CARRY)}, -{name:"POP DE", ast:o.POP("d", "e")}, {name:"JP NC,(nn)", ast:o.JP("==", F_CARRY)}, {name:"OUT (n),A", ast:o.OUT("a")}, {name:"CALL NC (nn)", ast:o.CALL("==", F_CARRY)}, {name:"PUSH DE", ast:o.PUSH("d", "e")}, {name:"SUB n", ast:o.SUB()}, {name:"RST 0x10", ast:o.RST(16)}, {name:"RET C", ast:o.RET("!=", F_CARRY)}, {name:"EXX", ast:o.EXX()}, {name:"JP C,(nn)", ast:o.JP("!=", F_CARRY)}, {name:"IN A,(n)", ast:o.IN("a")}, {name:"CALL C (nn)", ast:o.CALL("!=", F_CARRY)}, generateIndexTable("IX"), {name:"SBC A,n", -ast:o.SBC()}, {name:"RST 0x18", ast:o.RST(24)}, {name:"RET PO", ast:o.RET("==", F_PARITY)}, {name:"POP HL", ast:o.POP("h", "l")}, {name:"JP PO,(nn)", ast:o.JP("==", F_PARITY)}, {name:"EX (SP),HL", ast:o.EX_SP_HL()}, {name:"CALL PO (nn)", ast:o.CALL("==", F_PARITY)}, {name:"PUSH HL", ast:o.PUSH("h", "l")}, {name:"AND (n)", ast:o.AND()}, {name:"RST 0x20", ast:o.RST(32)}, {name:"RET PE", ast:o.RET("!=", F_PARITY)}, {name:"JP (HL)", ast:o.JP("h", "l")}, {name:"JP PE,(nn)", ast:o.JP("!=", F_PARITY)}, -{name:"EX DE,HL", ast:o.EX_DE_HL()}, {name:"CALL PE (nn)", ast:o.CALL("!=", F_PARITY)}, opcodeTableED, {name:"XOR n", ast:o.XOR()}, {name:"RST 0x28", ast:o.RST(40)}, {name:"RET P", ast:o.RET("==", F_SIGN)}, {name:"POP AF", ast:o.POP("a", "f")}, {name:"JP P,(nn)", ast:o.JP("==", F_SIGN)}, {name:"DI", ast:o.DI()}, {name:"CALL P (nn)", ast:o.CALL("==", F_SIGN)}, {name:"PUSH AF", ast:o.PUSH("a", "f")}, {name:"OR n", ast:o.OR()}, {name:"RST 0x30", ast:o.RST(48)}, {name:"RET M", ast:o.RET("!=", F_SIGN)}, -{name:"LD SP,HL", ast:o.LD_SP("h", "l")}, {name:"JP M,(nn)", ast:o.JP("!=", F_SIGN)}, {name:"EI", ast:o.EI()}, {name:"CALL M (nn)", ast:o.CALL("!=", F_SIGN)}, generateIndexTable("IY"), {name:"CP n", ast:o.CP()}, {name:"RST 0x38", ast:o.RST(56)}]; +;var opcodeTableED = {64:{name:"IN B,(C)", ast:o.IN("b", "c")}, 66:{name:"SBC HL,BC", ast:o.SBC16("b", "c")}, 65:{name:"OUT (C),B", ast:o.OUT("c", "b")}, 67:{name:"LD (nn),BC", ast:o.LD_NN("b", "c")}, 68:{name:"NEG", ast:o.NEG()}, 69:{name:"RETN / RETI", ast:o.RETN_RETI()}, 70:{name:"IM 0", ast:o.IM(0)}, 72:{name:"IN C,(C)", ast:o.IN("c", "c")}, 73:{name:"OUT (C),C", ast:o.OUT("c", "c")}, 74:{name:"ADC HL,BC", ast:o.ADC16("b", "c")}, 75:{name:"LD BC,(nn)", ast:o.LD16("b", "c", "n", "n")}, 76:{name:"NEG", +ast:o.NEG()}, 77:{name:"RETN / RETI", ast:o.RETN_RETI()}, 78:{name:"IM 0", ast:o.IM(0)}, 79:{name:"LD R,A", ast:o.LD8("r", "a")}, 80:{name:"IN D,(C)", ast:o.IN("d", "c")}, 81:{name:"OUT (C),D", ast:o.OUT("c", "d")}, 82:{name:"SBC HL,DE", ast:o.SBC16("d", "e")}, 83:{name:"LD (nn),DE", ast:o.LD_NN("d", "e")}, 84:{name:"NEG", ast:o.NEG()}, 85:{name:"RETN / RETI", ast:o.RETN_RETI()}, 86:{name:"IM 1", ast:o.IM(1)}, 87:{name:"LD A,I", ast:o.LD8("a", "i")}, 88:{name:"IN E,(C)", ast:o.IN("e", "c")}, 89:{name:"OUT (C),E", +ast:o.OUT("c", "e")}, 90:{name:"ADC HL,DE", ast:o.ADC16("d", "e")}, 91:{name:"LD DE,(nn)", ast:o.LD16("d", "e", "n", "n")}, 92:{name:"NEG", ast:o.NEG()}, 95:{name:"LD A,R", ast:o.LD8("a", "r")}, 96:{name:"IN H,(C)", ast:o.IN("h", "c")}, 97:{name:"OUT (C),H", ast:o.OUT("c", "h")}, 98:{name:"SBC HL,HL", ast:o.SBC16("h", "l")}, 99:{name:"LD (nn),HL", ast:o.LD_NN("h", "l")}, 100:{name:"NEG", ast:o.NEG()}, 102:{name:"IM 0", ast:o.IM(0)}, 104:{name:"IN L,(C)", ast:o.IN("l", "c")}, 105:{name:"OUT (C),L", +ast:o.OUT("c", "l")}, 106:{name:"ADC HL,HL", ast:o.ADC16("h", "l")}, 107:{name:"LD HL,(nn)", ast:o.LD16("h", "l", "n", "n")}, 108:{name:"NEG", ast:o.NEG()}, 110:{name:"IM 0", ast:o.IM(0)}, 115:{name:"LD (nn),SP", ast:o.LD_NN("sp")}, 116:{name:"NEG", ast:o.NEG()}, 118:{name:"IM 1", ast:o.IM(1)}, 120:{name:"IN A,(C)", ast:o.IN("a", "c")}, 121:{name:"OUT (C),A", ast:o.OUT("c", "a")}, 122:{name:"ADC HL,SP", ast:o.ADC16("sp")}, 124:{name:"NEG", ast:o.NEG()}, 160:{name:"LDI", ast:o.LDI()}, 161:{name:"CPI", +ast:o.CPI()}, 162:{name:"INI", ast:o.INI()}, 163:{name:"OUTI", ast:o.OUTI()}, 168:{name:"LDD", ast:o.LDD()}, 171:{name:"OUTD", ast:o.OUTD()}, 176:{name:"LDIR", ast:o.LDIR()}, 177:{name:"CPIR", ast:o.CPIR()}, 179:{name:"OTIR", ast:o.OTIR()}, 184:{name:"LDDR", ast:o.LDDR()}}; +var opcodeTable = [{name:"NOP", ast:o.NOOP()}, {name:"LD BC,nn", ast:o.LD16("b", "c")}, {name:"LD (BC),A", ast:o.LD_WRITE_MEM("b", "c", "a")}, {name:"INC BC", ast:o.INC16("b", "c")}, {name:"INC B", ast:o.INC8("b")}, {name:"DEC B", ast:o.DEC8("b")}, {name:"LD B,n", ast:o.LD8("b")}, {name:"RLCA", ast:o.RLCA()}, {name:"EX AF AF'", ast:o.EX_AF()}, {name:"ADD HL,BC", ast:o.ADD16("h", "l", "b", "c")}, {name:"LD A,(BC)", ast:o.LD8("a", "b", "c")}, {name:"DEC BC", ast:o.DEC16("b", "c")}, {name:"INC C", ast:o.INC8("c")}, +{name:"DEC C", ast:o.DEC8("c")}, {name:"LD C,n", ast:o.LD8("c")}, {name:"RRCA", ast:o.RRCA()}, {name:"DJNZ (PC+e)", ast:o.DJNZ()}, {name:"LD DE,nn", ast:o.LD16("d", "e")}, {name:"LD (DE),A", ast:o.LD_WRITE_MEM("d", "e", "a")}, {name:"INC DE", ast:o.INC16("d", "e")}, {name:"INC D", ast:o.INC8("d")}, {name:"DEC D", ast:o.DEC8("d")}, {name:"LD D,n", ast:o.LD8("d")}, {name:"RLA", ast:o.RLA()}, {name:"JR (PC+e)", ast:o.JP()}, {name:"ADD HL,DE", ast:o.ADD16("h", "l", "d", "e")}, {name:"LD A,(DE)", ast:o.LD8("a", +"d", "e")}, {name:"DEC DE", ast:o.DEC16("d", "e")}, {name:"INC E", ast:o.INC8("e")}, {name:"DEC E", ast:o.DEC8("e")}, {name:"LD E,n", ast:o.LD8("e")}, {name:"RRA", ast:o.RRA()}, {name:"JR NZ,(PC+e)", ast:o.JRNZ()}, {name:"LD HL,nn", ast:o.LD16("h", "l")}, {name:"LD (nn),HL", ast:o.LD_NN("h", "l")}, {name:"INC HL", ast:o.INC16("h", "l")}, {name:"INC H", ast:o.INC8("h")}, {name:"DEC H", ast:o.DEC8("h")}, {name:"LD H,n", ast:o.LD8("h")}, {name:"DAA", ast:o.DAA()}, {name:"JR Z,(PC+e)", ast:o.JRZ()}, +{name:"ADD HL,HL", ast:o.ADD16("h", "l", "h", "l")}, {name:"LD HL,(nn)", ast:o.LD16("h", "l", "n", "n")}, {name:"DEC HL", ast:o.DEC16("h", "l")}, {name:"INC L", ast:o.INC8("l")}, {name:"DEC L", ast:o.DEC8("l")}, {name:"LD L,n", ast:o.LD8("l")}, {name:"CPL", ast:o.CPL()}, {name:"JR NC,(PC+e)", ast:o.JRNC()}, {name:"LD SP,nn", ast:o.LD_SP()}, {name:"LD (nn),A", ast:o.LD_WRITE_MEM("n", "n", "a")}, {name:"INC SP", ast:o.INC8("s", "p")}, {name:"INC (HL)", ast:o.INC8("h", "l")}, {name:"DEC (HL)", ast:o.DEC8("h", +"l")}, {name:"LD (HL),n", ast:o.LD_WRITE_MEM("h", "l")}, {name:"SCF", ast:o.SCF()}, {name:"JR C,(PC+e)", ast:o.JRC()}, {name:"ADD HL,SP", ast:o.ADD16("h", "l", "sp")}, {name:"LD A,(nn)", ast:o.LD8("a", "n", "n")}, {name:"DEC SP", ast:o.DEC8("s", "p")}, {name:"INC A", ast:o.INC8("a")}, {name:"DEC A", ast:o.DEC8("a")}, {name:"LD A,n", ast:o.LD8("a")}, {name:"CCF", ast:o.CCF()}, {name:"LD B,B", ast:o.NOOP()}, {name:"LD B,C", ast:o.LD8("b", "c")}, {name:"LD B,D", ast:o.LD8("b", "d")}, {name:"LD B,E", +ast:o.LD8("b", "e")}, {name:"LD B,H", ast:o.LD8("b", "h")}, {name:"LD B,L", ast:o.LD8("b", "l")}, {name:"LD B,(HL)", ast:o.LD8("b", "h", "l")}, {name:"LD B,A", ast:o.LD8("b", "a")}, {name:"LD C,B", ast:o.LD8("c", "b")}, {name:"LD C,C", ast:o.NOOP()}, {name:"LD C,D", ast:o.LD8("c", "d")}, {name:"LD C,E", ast:o.LD8("c", "e")}, {name:"LD C,H", ast:o.LD8("c", "h")}, {name:"LD C,L", ast:o.LD8("c", "l")}, {name:"LD C,(HL)", ast:o.LD8("c", "h", "l")}, {name:"LD C,A", ast:o.LD8("c", "a")}, {name:"LD D,B", +ast:o.LD8("d", "b")}, {name:"LD D,C", ast:o.LD8("d", "c")}, {name:"LD D,D", ast:o.NOOP()}, {name:"LD D,E", ast:o.LD8("d", "e")}, {name:"LD D,H", ast:o.LD8("d", "h")}, {name:"LD D,L", ast:o.LD8("d", "l")}, {name:"LD D,(HL)", ast:o.LD8("d", "h", "l")}, {name:"LD D,A", ast:o.LD8("d", "a")}, {name:"LD E,B", ast:o.LD8("e", "b")}, {name:"LD E,C", ast:o.LD8("e", "c")}, {name:"LD E,D", ast:o.LD8("e", "d")}, {name:"LD E,E", ast:o.NOOP()}, {name:"LD E,H", ast:o.LD8("e", "h")}, {name:"LD E,L", ast:o.LD8("e", +"l")}, {name:"LD E,(HL)", ast:o.LD8("e", "h", "l")}, {name:"LD E,A", ast:o.LD8("e", "a")}, {name:"LD H,B", ast:o.LD8("h", "b")}, {name:"LD H,C", ast:o.LD8("h", "c")}, {name:"LD H,D", ast:o.LD8("h", "d")}, {name:"LD H,E", ast:o.LD8("h", "e")}, {name:"LD H,H", ast:o.NOOP()}, {name:"LD H,L", ast:o.LD8("h", "l")}, {name:"LD H,(HL)", ast:o.LD8("h", "h", "l")}, {name:"LD H,A", ast:o.LD8("h", "a")}, {name:"LD L,B", ast:o.LD8("l", "b")}, {name:"LD L,C", ast:o.LD8("l", "c")}, {name:"LD L,D", ast:o.LD8("l", +"d")}, {name:"LD L,E", ast:o.LD8("l", "e")}, {name:"LD L,H", ast:o.LD8("l", "h")}, {name:"LD L,L", ast:o.NOOP()}, {name:"LD L,(HL)", ast:o.LD8("l", "h", "l")}, {name:"LD L,A", ast:o.LD8("l", "a")}, {name:"LD (HL),B", ast:o.LD_WRITE_MEM("h", "l", "b")}, {name:"LD (HL),C", ast:o.LD_WRITE_MEM("h", "l", "c")}, {name:"LD (HL),D", ast:o.LD_WRITE_MEM("h", "l", "d")}, {name:"LD (HL),E", ast:o.LD_WRITE_MEM("h", "l", "e")}, {name:"LD (HL),H", ast:o.LD_WRITE_MEM("h", "l", "h")}, {name:"LD (HL),L", ast:o.LD_WRITE_MEM("h", +"l", "l")}, {name:"HALT", ast:o.HALT()}, {name:"LD (HL),A", ast:o.LD_WRITE_MEM("h", "l", "a")}, {name:"LD A,B", ast:o.LD8("a", "b")}, {name:"LD A,C", ast:o.LD8("a", "c")}, {name:"LD A,D", ast:o.LD8("a", "d")}, {name:"LD A,E", ast:o.LD8("a", "e")}, {name:"LD A,H", ast:o.LD8("a", "h")}, {name:"LD A,L", ast:o.LD8("a", "l")}, {name:"LD A,(HL)", ast:o.LD8("a", "h", "l")}, {name:"LD A,A", ast:o.NOOP()}, {name:"ADD A,B", ast:o.ADD("b")}, {name:"ADD A,C", ast:o.ADD("c")}, {name:"ADD A,D", ast:o.ADD("d")}, +{name:"ADD A,E", ast:o.ADD("e")}, {name:"ADD A,H", ast:o.ADD("h")}, {name:"ADD A,L", ast:o.ADD("l")}, {name:"ADD A,(HL)", ast:o.ADD("h", "l")}, {name:"ADD A,A", ast:o.ADD("a")}, {name:"ADC A,B", ast:o.ADC("b")}, {name:"ADC A,C", ast:o.ADC("c")}, {name:"ADC A,D", ast:o.ADC("d")}, {name:"ADC A,E", ast:o.ADC("e")}, {name:"ADC A,H", ast:o.ADC("h")}, {name:"ADC A,L", ast:o.ADC("l")}, {name:"ADC A,(HL)", ast:o.ADC("h", "l")}, {name:"ADC A,A", ast:o.ADC("a")}, {name:"SUB A,B", ast:o.SUB("b")}, {name:"SUB A,C", +ast:o.SUB("c")}, {name:"SUB A,D", ast:o.SUB("d")}, {name:"SUB A,E", ast:o.SUB("e")}, {name:"SUB A,H", ast:o.SUB("h")}, {name:"SUB A,L", ast:o.SUB("l")}, {name:"SUB A,(HL)", ast:o.SUB("h", "l")}, {name:"SUB A,A", ast:o.SUB("a")}, {name:"SBC A,B", ast:o.SBC("b")}, {name:"SBC A,C", ast:o.SBC("c")}, {name:"SBC A,D", ast:o.SBC("d")}, {name:"SBC A,E", ast:o.SBC("e")}, {name:"SBC A,H", ast:o.SBC("h")}, {name:"SBC A,L", ast:o.SBC("l")}, {name:"SBC A,(HL)", ast:o.SBC("h", "l")}, {name:"SBC A,A", ast:o.SBC("a")}, +{name:"AND A,B", ast:o.AND("b")}, {name:"AND A,C", ast:o.AND("c")}, {name:"AND A,D", ast:o.AND("d")}, {name:"AND A,E", ast:o.AND("e")}, {name:"AND A,H", ast:o.AND("h")}, {name:"AND A,L", ast:o.AND("l")}, {name:"AND A,(HL)", ast:o.AND("h", "l")}, {name:"AND A,A", ast:o.AND("a")}, {name:"XOR A,B", ast:o.XOR("b")}, {name:"XOR A,C", ast:o.XOR("c")}, {name:"XOR A,D", ast:o.XOR("d")}, {name:"XOR A,E", ast:o.XOR("e")}, {name:"XOR A,H", ast:o.XOR("h")}, {name:"XOR A,L", ast:o.XOR("l")}, {name:"XOR A,(HL)", +ast:o.XOR("h", "l")}, {name:"XOR A,A", ast:o.XOR("a")}, {name:"OR A,B", ast:o.OR("b")}, {name:"OR A,C", ast:o.OR("c")}, {name:"OR A,D", ast:o.OR("d")}, {name:"OR A,E", ast:o.OR("e")}, {name:"OR A,H", ast:o.OR("h")}, {name:"OR A,L", ast:o.OR("l")}, {name:"OR A,(HL)", ast:o.OR("h", "l")}, {name:"OR A,A", ast:o.OR("a")}, {name:"CP A,B", ast:o.CP("b")}, {name:"CP A,C", ast:o.CP("c")}, {name:"CP A,D", ast:o.CP("d")}, {name:"CP A,E", ast:o.CP("e")}, {name:"CP A,H", ast:o.CP("h")}, {name:"CP A,L", ast:o.CP("l")}, +{name:"CP A,(HL)", ast:o.CP("h", "l")}, {name:"CP A,A", ast:o.CP("a")}, {name:"RET NZ", ast:o.RET("==", F_ZERO)}, {name:"POP BC", ast:o.POP("b", "c")}, {name:"JP NZ,(nn)", ast:o.JP("==", F_ZERO)}, {name:"JP (nn)", ast:o.JP()}, {name:"CALL NZ (nn)", ast:o.CALL("==", F_ZERO)}, {name:"PUSH BC", ast:o.PUSH("b", "c")}, {name:"ADD A,n", ast:o.ADD()}, {name:"RST 0x00", ast:o.RST(0)}, {name:"RET Z", ast:o.RET("!=", F_ZERO)}, {name:"RET", ast:o.RET()}, {name:"JP Z,(nn)", ast:o.JP("!=", F_ZERO)}, opcodeTableCB, +{name:"CALL Z (nn)", ast:o.CALL("!=", F_ZERO)}, {name:"CALL (nn)", ast:o.CALL()}, {name:"ADC A,n", ast:o.ADC()}, {name:"RST 0x08", ast:o.RST(8)}, {name:"RET NC", ast:o.RET("==", F_CARRY)}, {name:"POP DE", ast:o.POP("d", "e")}, {name:"JP NC,(nn)", ast:o.JP("==", F_CARRY)}, {name:"OUT (n),A", ast:o.OUT("a")}, {name:"CALL NC (nn)", ast:o.CALL("==", F_CARRY)}, {name:"PUSH DE", ast:o.PUSH("d", "e")}, {name:"SUB n", ast:o.SUB()}, {name:"RST 0x10", ast:o.RST(16)}, {name:"RET C", ast:o.RET("!=", F_CARRY)}, +{name:"EXX", ast:o.EXX()}, {name:"JP C,(nn)", ast:o.JP("!=", F_CARRY)}, {name:"IN A,(n)", ast:o.IN("a")}, {name:"CALL C (nn)", ast:o.CALL("!=", F_CARRY)}, generateIndexTable("IX"), {name:"SBC A,n", ast:o.SBC()}, {name:"RST 0x18", ast:o.RST(24)}, {name:"RET PO", ast:o.RET("==", F_PARITY)}, {name:"POP HL", ast:o.POP("h", "l")}, {name:"JP PO,(nn)", ast:o.JP("==", F_PARITY)}, {name:"EX (SP),HL", ast:o.EX_SP_HL()}, {name:"CALL PO (nn)", ast:o.CALL("==", F_PARITY)}, {name:"PUSH HL", ast:o.PUSH("h", "l")}, +{name:"AND (n)", ast:o.AND()}, {name:"RST 0x20", ast:o.RST(32)}, {name:"RET PE", ast:o.RET("!=", F_PARITY)}, {name:"JP (HL)", ast:o.JP("h", "l")}, {name:"JP PE,(nn)", ast:o.JP("!=", F_PARITY)}, {name:"EX DE,HL", ast:o.EX_DE_HL()}, {name:"CALL PE (nn)", ast:o.CALL("!=", F_PARITY)}, opcodeTableED, {name:"XOR n", ast:o.XOR()}, {name:"RST 0x28", ast:o.RST(40)}, {name:"RET P", ast:o.RET("==", F_SIGN)}, {name:"POP AF", ast:o.POP("a", "f")}, {name:"JP P,(nn)", ast:o.JP("==", F_SIGN)}, {name:"DI", ast:o.DI()}, +{name:"CALL P (nn)", ast:o.CALL("==", F_SIGN)}, {name:"PUSH AF", ast:o.PUSH("a", "f")}, {name:"OR n", ast:o.OR()}, {name:"RST 0x30", ast:o.RST(48)}, {name:"RET M", ast:o.RET("!=", F_SIGN)}, {name:"LD SP,HL", ast:o.LD_SP("h", "l")}, {name:"JP M,(nn)", ast:o.JP("!=", F_SIGN)}, {name:"EI", ast:o.EI()}, {name:"CALL M (nn)", ast:o.CALL("!=", F_SIGN)}, generateIndexTable("IY"), {name:"CP n", ast:o.CP()}, {name:"RST 0x38", ast:o.RST(56)}]; var Analyzer = function() { var Analyzer = function() { this.bytecodes = {}; this.ast = []; - this.missingOpcodes = {} + this.missingOpcodes = {}; }; Analyzer.prototype = {analyze:function(bytecodes) { var i = 0; this.bytecodes = bytecodes; this.ast = Array(this.bytecodes.length); JSSMS.Utils.console.time("Analyzing"); - for(i = 0;i < this.bytecodes.length;i++) { + for (i = 0;i < this.bytecodes.length;i++) { this.normalizeBytecode(i); - this.restructure(i) + this.restructure(i); } JSSMS.Utils.console.timeEnd("Analyzing"); - for(i in this.missingOpcodes) { - console.error("Missing opcode", i, this.missingOpcodes[i]) + for (i in this.missingOpcodes) { + console.error("Missing opcode", i, this.missingOpcodes[i]); } }, analyzeFromAddress:function(bytecodes) { this.bytecodes = [bytecodes]; @@ -12085,43 +12029,44 @@ var Analyzer = function() { this.normalizeBytecode(0); this.bytecodes[0][this.bytecodes[0].length - 1].isFunctionEnder = true; this.ast = [this.bytecodes]; - for(var i in this.missingOpcodes) { - console.error("Missing opcode", i, this.missingOpcodes[i]) + for (var i in this.missingOpcodes) { + console.error("Missing opcode", i, this.missingOpcodes[i]); } }, normalizeBytecode:function(page) { var self = this; this.bytecodes[page] = this.bytecodes[page].map(function(bytecode) { + var opcode; switch(bytecode.opcode.length) { case 1: - var opcode = opcodeTable[bytecode.opcode[0]]; + opcode = opcodeTable[bytecode.opcode[0]]; break; case 2: - var opcode = opcodeTable[bytecode.opcode[0]][bytecode.opcode[1]]; + opcode = opcodeTable[bytecode.opcode[0]][bytecode.opcode[1]]; break; case 3: - var opcode = opcodeTable[bytecode.opcode[0]][bytecode.opcode[1]][bytecode.opcode[2]]; + opcode = opcodeTable[bytecode.opcode[0]][bytecode.opcode[1]][bytecode.opcode[2]]; break; default: - JSSMS.Utils.console.error("Something went wrong in parsing. Opcode: [" + bytecode.opcode.join(" ") + "]") + JSSMS.Utils.console.error("Something went wrong in parsing. Opcode: [" + bytecode.opcode.join(" ") + "]"); } - if(opcode && opcode.ast) { + if (opcode && opcode.ast) { var ast = opcode.ast(bytecode.operand, bytecode.target, bytecode.nextAddress); - if(!Array.isArray(ast) && ast != undefined) { - ast = [ast] + if (!Array.isArray(ast) && ast !== undefined) { + ast = [ast]; } bytecode.ast = ast; - if(DEBUG) { + if (DEBUG) { bytecode.name = opcode.name; - if(opcode.opcode) { - bytecode.opcode = opcode.opcode(bytecode.operand, bytecode.target, bytecode.nextAddress) + if (opcode.opcode) { + bytecode.opcode = opcode.opcode(bytecode.operand, bytecode.target, bytecode.nextAddress); } } - }else { + } else { var i = bytecode.hexOpcode; - self.missingOpcodes[i] = self.missingOpcodes[i] != undefined ? self.missingOpcodes[i] + 1 : 1 + self.missingOpcodes[i] = self.missingOpcodes[i] !== undefined ? self.missingOpcodes[i] + 1 : 1; } - return bytecode - }) + return bytecode; + }); }, restructure:function(page) { this.ast[page] = []; var self = this; @@ -12129,171 +12074,191 @@ var Analyzer = function() { var startNewFunction = true; var prevBytecode = {}; this.bytecodes[page].forEach(function(bytecode) { - if(bytecode.isJumpTarget || startNewFunction) { + if (bytecode.isJumpTarget || startNewFunction) { pointer++; self.ast[page][pointer] = []; startNewFunction = false; - prevBytecode.isFunctionEnder = true + prevBytecode.isFunctionEnder = true; } self.ast[page][pointer].push(bytecode); - if(bytecode.isFunctionEnder) { - startNewFunction = true + if (bytecode.isFunctionEnder) { + startNewFunction = true; } - prevBytecode = bytecode - }) + prevBytecode = bytecode; + }); }}; - return Analyzer + return Analyzer; }(); var Optimizer = function() { var Optimizer = function() { - this.ast = [] + this.ast = []; }; Optimizer.prototype = {optimize:function(functions) { this.ast = functions; - for(var i = 0;i < this.ast.length;i++) { - this.localOptimization(i) + for (var i = 0;i < this.ast.length;i++) { + this.localOptimization(i); } }, localOptimization:function(page) { - this.ast[page] = this.ast[page].map(this.inlineRegisters) + this.ast[page] = this.ast[page].map(this.evaluateBinaryExpressions); + this.ast[page] = this.ast[page].map(this.inlineRegisters); + }, evaluateBinaryExpressions:function(fn) { + return fn.map(function(bytecodes) { + var ast = bytecodes.ast; + if (!ast) { + return bytecodes; + } + bytecodes.ast = JSSMS.Utils.traverse(ast, function(ast) { + if (ast.type == "BinaryExpression" && (ast.left.type == "Literal" && ast.right.type == "Literal")) { + var value = 0; + switch(ast.operator) { + case ">>": + value = ast.left.value >> ast.right.value; + break; + case "&": + value = ast.left.value & ast.right.value; + break; + default: + JSSMS.Utils.console.log("Unimplemented evaluation optimization for operator", ast.operator); + return ast; + } + ast.type = "Literal"; + ast.value = value; + ast.raw = DEBUG ? JSSMS.Utils.toHex(value) : "" + value; + delete ast.right; + delete ast.left; + } + return ast; + }); + return bytecodes; + }); }, inlineRegisters:function(fn) { var definedReg = {b:false, c:false, d:false, e:false, h:false, l:false}; var definedRegValue = {b:{}, c:{}, d:{}, e:{}, h:{}, l:{}}; return fn.map(function(bytecodes) { var ast = bytecodes.ast; - if(!ast) { - return bytecodes + if (!ast) { + return bytecodes; } bytecodes.ast = JSSMS.Utils.traverse(ast, function(ast) { - if(ast.type == "AssignmentExpression" && ast.operator == "=" && ast.left.type == "Register" && ast.right.type == "Literal" && ast.left.name != "a" && ast.left.name != "f") { + if (ast.type == "AssignmentExpression" && (ast.operator == "=" && (ast.left.type == "Register" && (ast.right.type == "Literal" && (ast.left.name != "a" && ast.left.name != "f"))))) { definedReg[ast.left.name] = true; - definedRegValue[ast.left.name] = ast.right + definedRegValue[ast.left.name] = ast.right; } - if(ast.type == "AssignmentExpression" && ast.left.type == "Register" && ast.right.type != "Literal" && ast.left.name != "a" && ast.left.name != "f") { + if (ast.type == "AssignmentExpression" && (ast.left.type == "Register" && (ast.right.type != "Literal" && (ast.left.name != "a" && ast.left.name != "f")))) { definedReg[ast.left.name] = false; definedRegValue[ast.left.name] = {}; - return ast + return ast; } - if(ast.type == "CallExpression") { - if(ast.arguments[0] && ast.arguments[0].type == "Register" && definedReg[ast.arguments[0].name] && ast.arguments[0].name != "a" && ast.arguments[0].name != "f") { - ast.arguments[0] = definedRegValue[ast.arguments[0].name] + if (ast.type == "CallExpression") { + if (ast["arguments"][0] && (ast["arguments"][0].type == "Register" && (definedReg[ast["arguments"][0].name] && (ast["arguments"][0].name != "a" && ast["arguments"][0].name != "f")))) { + ast["arguments"][0] = definedRegValue[ast["arguments"][0].name]; } - if(ast.arguments[1] && ast.arguments[1].type == "Register" && definedReg[ast.arguments[1].name] && ast.arguments[1].name != "a" && ast.arguments[1].name != "f") { - ast.arguments[1] = definedRegValue[ast.arguments[1].name] + if (ast["arguments"][1] && (ast["arguments"][1].type == "Register" && (definedReg[ast["arguments"][1].name] && (ast["arguments"][1].name != "a" && ast["arguments"][1].name != "f")))) { + ast["arguments"][1] = definedRegValue[ast["arguments"][1].name]; } - return ast + return ast; } - if(ast.type == "MemberExpression" && ast.property.type == "Register" && definedReg[ast.property.name] && ast.property.name != "a" && ast.property.name != "f") { + if (ast.type == "MemberExpression" && (ast.property.type == "Register" && (definedReg[ast.property.name] && (ast.property.name != "a" && ast.property.name != "f")))) { ast.property = definedRegValue[ast.property.name]; - return ast + return ast; } - if(ast.type == "BinaryExpression") { - if(ast.right.type == "Register" && definedReg[ast.right.name] && ast.right.name != "a" && ast.right.name != "f") { - ast.right = definedRegValue[ast.right.name] + if (ast.type == "BinaryExpression") { + if (ast.right.type == "Register" && (definedReg[ast.right.name] && (ast.right.name != "a" && ast.right.name != "f"))) { + ast.right = definedRegValue[ast.right.name]; } - if(ast.left.type == "Register" && definedReg[ast.left.name] && ast.left.name != "a" && ast.left.name != "f") { - ast.left = definedRegValue[ast.left.name] + if (ast.left.type == "Register" && (definedReg[ast.left.name] && (ast.left.name != "a" && ast.left.name != "f"))) { + ast.left = definedRegValue[ast.left.name]; } - return ast + return ast; } - return ast + return ast; }); - return bytecodes - }) + return bytecodes; + }); }}; - return Optimizer + return Optimizer; }(); var Generator = function() { var toHex = JSSMS.Utils.toHex; var whitelist = ["page", "temp", "location", "val", "value", "JSSMS.Utils.rndInt"]; function getTotalTStates(opcodes) { - var tstates = 0; switch(opcodes[0]) { case 203: - tstates = OP_CB_STATES[opcodes[1]]; - break; + return OP_CB_STATES[opcodes[1]]; case 221: ; case 253: - if(opcodes.length == 2) { - tstates = OP_DD_STATES[opcodes[1]] - }else { - tstates = OP_INDEX_CB_STATES[opcodes[2]] + if (opcodes.length == 2) { + return OP_DD_STATES[opcodes[1]]; } - break; + return OP_INDEX_CB_STATES[opcodes[2]]; case 237: - tstates = OP_ED_STATES[opcodes[1]]; - break; + return OP_ED_STATES[opcodes[1]]; default: - tstates = OP_STATES[opcodes[0]]; - break + return OP_STATES[opcodes[0]]; } - return tstates } function convertRegisters(ast) { - var convertRegisters = function(node) { - if(node.type == "Register") { - node.type = "Identifier" + var convertRegistersFunc = function(node) { + if (node.type == "Register") { + node.type = "Identifier"; } - return node + return node; }; - return JSSMS.Utils.traverse(ast, convertRegisters) + return JSSMS.Utils.traverse(ast, convertRegistersFunc); } var Generator = function() { - this.ast = [] + this.ast = []; }; Generator.prototype = {generate:function(functions) { - for(var page = 0;page < functions.length;page++) { + for (var page = 0;page < functions.length;page++) { functions[page] = functions[page].map(function(fn) { var body = [{"type":"ExpressionStatement", "expression":{"type":"Literal", "value":"use strict", "raw":'"use strict"'}}]; var name = fn[0].address; var jumpTargetNb = fn[0].jumpTargetNb; var tstates = 0; fn = fn.map(function(bytecode) { - if(bytecode.ast == null) { - bytecode.ast = [] + if (bytecode.ast === undefined) { + bytecode.ast = []; } - if(ENABLE_SERVER_LOGGER) { + if (ENABLE_SERVER_LOGGER) { var syncServerStmt = {"type":"ExpressionStatement", "expression":{"type":"CallExpression", "callee":n.Identifier("sync"), "arguments":[]}} } tstates += getTotalTStates(bytecode.opcode); var decreaseTStateStmt = [{"type":"ExpressionStatement", "expression":{"type":"AssignmentExpression", "operator":"-=", "left":{"type":"Identifier", "name":"tstates"}, "right":{"type":"Literal", "value":tstates, "raw":DEBUG ? toHex(tstates) : "" + tstates}}}]; tstates = 0; - if(ENABLE_SERVER_LOGGER) { - decreaseTStateStmt = [].concat(syncServerStmt, decreaseTStateStmt) + if (ENABLE_SERVER_LOGGER) { + decreaseTStateStmt = [].concat(syncServerStmt, decreaseTStateStmt); } bytecode.ast = [].concat(decreaseTStateStmt, bytecode.ast); - if((ENABLE_SERVER_LOGGER || bytecode.isFunctionEnder) && bytecode.nextAddress != null) { + if ((ENABLE_SERVER_LOGGER || bytecode.isFunctionEnder) && bytecode.nextAddress !== null) { var nextAddress = bytecode.nextAddress % 16384; var updatePcStmt = {"type":"ExpressionStatement", "expression":{"type":"AssignmentExpression", "operator":"=", "left":{"type":"Identifier", "name":"pc"}, "right":{"type":"BinaryExpression", "operator":"+", "left":{"type":"Literal", "value":nextAddress, "raw":DEBUG ? toHex(nextAddress) : "" + nextAddress}, "right":{"type":"BinaryExpression", "operator":"*", "left":{"type":"Identifier", "name":"page"}, "right":{"type":"Literal", "value":16384, "raw":"0x4000"}}}}}; - bytecode.ast.push(updatePcStmt) + bytecode.ast.push(updatePcStmt); } - if(DEBUG) { - if(bytecode.ast[0]) { - bytecode.ast[0].leadingComments = [{type:"Line", value:" " + bytecode.label}] + if (DEBUG) { + if (bytecode.ast[0]) { + bytecode.ast[0].leadingComments = [{type:"Line", value:" " + bytecode.label}]; } } - return bytecode.ast + return bytecode.ast; }); fn.forEach(function(ast) { - body = body.concat(ast) + body = body.concat(ast); }); body = convertRegisters(body); body = JSSMS.Utils.traverse(body, function(obj) { - if(obj.type && obj.type == "Identifier" && whitelist.indexOf(obj.name) == -1) { - obj.name = "this." + obj.name + if (obj.type && (obj.type == "Identifier" && whitelist.indexOf(obj.name) == -1)) { + obj.name = "this." + obj.name; } - return obj + return obj; }); - if(DEBUG) { - return{"type":"Program", "body":[{"type":"FunctionDeclaration", "id":{"type":"Identifier", "name":name}, "params":[{"type":"Identifier", "name":"page"}, {"type":"Identifier", "name":"temp"}, {"type":"Identifier", "name":"location"}], "defaults":[], "body":{"type":"BlockStatement", "body":body}, "rest":null, "generator":false, "expression":false}]} - }else { - return{"type":"Program", "body":body, "comments":[{"type":"Line", "value":name}]} - } - }) + return{"type":"Program", "body":[{"type":"FunctionDeclaration", "id":{"type":"Identifier", "name":name}, "params":[{"type":"Identifier", "name":"page"}, {"type":"Identifier", "name":"temp"}, {"type":"Identifier", "name":"location"}], "defaults":[], "body":{"type":"BlockStatement", "body":body}, "rest":null, "generator":false, "expression":false}]}; + }); } - this.ast = functions + this.ast = functions; }}; - return Generator + return Generator; }(); var Recompiler = function() { var toHex = JSSMS.Utils.toHex; @@ -12305,83 +12270,79 @@ var Recompiler = function() { this.analyzer = new Analyzer; this.optimizer = new Optimizer; this.generator = new Generator; - this.bytecodes = {} + this.bytecodes = {}; }; Recompiler.prototype = {setRom:function(rom) { this.rom = rom; - this.parser = new Parser(rom, this.cpu.frameReg) + this.parser = new Parser(rom, this.cpu.frameReg); }, reset:function() { var self = this; this.options.entryPoints = [{address:0, romPage:0, memPage:0}, {address:56, romPage:0, memPage:0}, {address:102, romPage:0, memPage:0}]; - if(this.rom.length <= 2) { - JSSMS.Utils.console.log("Parsing full ROM") - }else { + if (this.rom.length <= 2) { + JSSMS.Utils.console.log("Parsing full ROM"); + } else { this.options.pageLimit = 0; - JSSMS.Utils.console.log("Parsing initial memory page of ROM") + JSSMS.Utils.console.log("Parsing initial memory page of ROM"); } var fns = this.parse().analyze().optimize().generate(); - for(var page = 0;page < this.rom.length;page++) { + for (var page = 0;page < this.rom.length;page++) { fns[page].forEach(function(fn) { - if(DEBUG) { - var funcName = fn.body[0].id.name; + var funcName = fn.body[0].id.name; + if (DEBUG) { fn.body[0].id.name = "_" + toHex(funcName); - self.cpu.branches[page][funcName] = (new Function("return " + self.generateCodeFromAst(fn)))() - }else { - var funcName = fn.comments[0].value; - self.cpu.branches[page][funcName] = new Function("page", "temp", "location", self.generateCodeFromAst(fn)) } - }) + self.cpu.branches[page][funcName] = (new Function("return " + self.generateCodeFromAst(fn)))(); + }); } }, parse:function() { var self = this; this.options.entryPoints.forEach(function(entryPoint) { - self.parser.addEntryPoint(entryPoint) + self.parser.addEntryPoint(entryPoint); }); this.parser.parse(this.options.pageLimit); - return this + return this; }, analyze:function() { this.analyzer.analyze(this.parser.bytecodes); - return this + return this; }, optimize:function() { this.optimizer.optimize(this.analyzer.ast); - return this + return this; }, generate:function() { this.generator.generate(this.optimizer.ast); - return this.generator.ast + return this.generator.ast; }, recompileFromAddress:function(address, romPage, memPage) { var self = this; var fns = this.parseFromAddress(address, romPage, memPage).analyzeFromAddress().optimize().generate(); fns[0].forEach(function(fn) { - if(DEBUG) { - var funcName = fn.body[0].id.name; - fn.body[0].id.name = "_" + toHex(funcName); - self.cpu.branches[romPage][address % 16384] = (new Function("return " + self.generateCodeFromAst(fn)))() - }else { - self.cpu.branches[romPage][address % 16384] = new Function("page", "temp", "location", self.generateCodeFromAst(fn)) + if (DEBUG) { + fn.body[0].id.name = "_" + toHex(fn.body[0].id.name); } - }) + self.cpu.branches[romPage][address % 16384] = (new Function("return " + self.generateCodeFromAst(fn)))(); + }); }, parseFromAddress:function(address, romPage, memPage) { var obj = {address:address, romPage:romPage, memPage:memPage}; this.parser.entryPoints.push(obj); this.bytecodes = this.parser.parseFromAddress(obj); - return this + return this; }, analyzeFromAddress:function() { this.analyzer.analyzeFromAddress(this.bytecodes); - return this + return this; }, generateCodeFromAst:function(fn) { - return window["escodegen"]["generate"](fn, {comment:true, renumber:true, hexadecimal:true, parse:DEBUG ? window["esprima"]["parse"] : null}) + return window["escodegen"]["generate"](fn, {comment:true, renumber:true, hexadecimal:true, parse:DEBUG ? window["esprima"]["parse"] : function(c) { + return{"type":"Program", "body":[{"type":"ExpressionStatement", "expression":{"type":"Literal", "value":c, "raw":c}}]}; + }}); }, dump:function() { var output = []; - for(var i in this.cpu.branches) { + for (var i in this.cpu.branches) { output.push("// Page " + i); - for(var j in this.cpu.branches[i]) { - output.push(this.cpu.branches[i][j]) + for (var j in this.cpu.branches[i]) { + output.push(this.cpu.branches[i][j]); } } output = output.join("\n"); - console.log(output) + console.log(output); }}; - return Recompiler + return Recompiler; }(); window["JSSMS"] = JSSMS; diff --git a/min/jssms.debug.js b/min/jssms.debug.js index 9c2ca7a..baec331 100644 --- a/min/jssms.debug.js +++ b/min/jssms.debug.js @@ -21,13 +21,13 @@ along with this program. If not, see . var fpsInterval = 500, CLOCK_NTSC = 3579545, CLOCK_PAL = 3546893; function JSSMS($opts$$) { this.opts = {ui:JSSMS.DummyUI, swfPath:"lib/"}; - if(void 0 != $opts$$) { - for(var $key$$ in this.opts) { - void 0 != $opts$$[$key$$] && (this.opts[$key$$] = $opts$$[$key$$]) + if (void 0 !== $opts$$) { + for (var $key$$ in this.opts) { + void 0 !== $opts$$[$key$$] && (this.opts[$key$$] = $opts$$[$key$$]); } } - void 0 != $opts$$.DEBUG && (DEBUG = $opts$$.DEBUG); - void 0 != $opts$$.ENABLE_COMPILER && (ENABLE_COMPILER = $opts$$.ENABLE_COMPILER); + void 0 !== $opts$$.DEBUG && (DEBUG = $opts$$.DEBUG); + void 0 !== $opts$$.ENABLE_COMPILER && (ENABLE_COMPILER = $opts$$.ENABLE_COMPILER); this.keyboard = new JSSMS.Keyboard(this); this.ui = new this.opts.ui(this); this.vdp = new JSSMS.Vdp(this); @@ -35,7 +35,7 @@ function JSSMS($opts$$) { this.ports = new JSSMS.Ports(this); this.cpu = new JSSMS.Z80(this); this.ui.updateStatus("Ready to load a ROM."); - this.ui = this.ui + this.ui = this.ui; } JSSMS.prototype = {isRunning:!1, cyclesPerLine:0, no_of_scanlines:0, frameSkip:0, throttle:!0, fps:0, frameskip_counter:0, pause_button:!1, is_sms:!0, is_gg:!1, soundEnabled:!1, audioBuffer:[], audioBufferOffset:0, samplesPerFrame:0, samplesPerLine:[], emuWidth:0, emuHeight:0, fpsFrameCount:0, z80Time:0, drawTime:0, z80TimeCounter:0, drawTimeCounter:0, frameCount:0, romData:"", romFileName:"", lineno:0, reset:function $JSSMS$$reset$() { this.setVideoTiming(this.vdp.videoMode); @@ -47,249 +47,249 @@ JSSMS.prototype = {isRunning:!1, cyclesPerLine:0, no_of_scanlines:0, frameSkip:0 this.ports.reset(); this.cpu.reset(); ENABLE_DEBUGGER && this.cpu.resetDebug(); - DEBUG && clearInterval(this.fpsInterval) + DEBUG && clearInterval(this.fpsInterval); }, start:function $JSSMS$$start$() { var $self$$ = this; this.isRunning || (this.isRunning = !0, this.ui.requestAnimationFrame(this.frame.bind(this), this.ui.screen), DEBUG && (this.resetFps(), this.fpsInterval = setInterval(function() { - $self$$.printFps() + $self$$.printFps(); }, fpsInterval))); - this.ui.updateStatus("Running") + this.ui.updateStatus("Running"); }, stop:function $JSSMS$$stop$() { DEBUG && clearInterval(this.fpsInterval); - this.isRunning = !1 + this.isRunning = !1; }, frame:function $JSSMS$$frame$() { - this.isRunning && (this.cpu.frame(), this.fpsFrameCount++, this.ui.requestAnimationFrame(this.frame.bind(this), this.ui.screen)) + this.isRunning && (this.cpu.frame(), this.fpsFrameCount++, this.ui.requestAnimationFrame(this.frame.bind(this), this.ui.screen)); }, nextStep:function $JSSMS$$nextStep$() { - this.cpu.frame() + this.cpu.frame(); }, setSMS:function $JSSMS$$setSMS$() { this.is_sms = !0; this.is_gg = !1; this.vdp.h_start = 0; this.vdp.h_end = 32; this.emuWidth = SMS_WIDTH; - this.emuHeight = SMS_HEIGHT + this.emuHeight = SMS_HEIGHT; }, setGG:function $JSSMS$$setGG$() { this.is_gg = !0; this.is_sms = !1; this.vdp.h_start = 5; this.vdp.h_end = 27; this.emuWidth = GG_WIDTH; - this.emuHeight = GG_HEIGHT -}, setVideoTiming:function $JSSMS$$setVideoTiming$($i$$1_mode$$) { + this.emuHeight = GG_HEIGHT; +}, setVideoTiming:function $JSSMS$$setVideoTiming$($i$$3_mode$$) { var $clockSpeedHz_v$$ = 0; - $i$$1_mode$$ == NTSC || this.is_gg ? (this.fps = 60, this.no_of_scanlines = SMS_Y_PIXELS_NTSC, $clockSpeedHz_v$$ = CLOCK_NTSC) : (this.fps = 50, this.no_of_scanlines = SMS_Y_PIXELS_PAL, $clockSpeedHz_v$$ = CLOCK_PAL); + $i$$3_mode$$ == NTSC || this.is_gg ? (this.fps = 60, this.no_of_scanlines = SMS_Y_PIXELS_NTSC, $clockSpeedHz_v$$ = CLOCK_NTSC) : (this.fps = 50, this.no_of_scanlines = SMS_Y_PIXELS_PAL, $clockSpeedHz_v$$ = CLOCK_PAL); this.cyclesPerLine = Math.round($clockSpeedHz_v$$ / this.fps / this.no_of_scanlines + 1); - this.vdp.videoMode = $i$$1_mode$$; - if(this.soundEnabled) { + this.vdp.videoMode = $i$$3_mode$$; + if (this.soundEnabled) { this.psg.init($clockSpeedHz_v$$, SAMPLE_RATE); this.samplesPerFrame = Math.round(SAMPLE_RATE / this.fps); - if(0 == this.audioBuffer.length || this.audioBuffer.length != this.samplesPerFrame) { - this.audioBuffer = Array(this.samplesPerFrame) + if (0 === this.audioBuffer.length || this.audioBuffer.length != this.samplesPerFrame) { + this.audioBuffer = Array(this.samplesPerFrame); } - if(0 == this.samplesPerLine.length || this.samplesPerLine.length != this.no_of_scanlines) { + if (0 === this.samplesPerLine.length || this.samplesPerLine.length != this.no_of_scanlines) { this.samplesPerLine = Array(this.no_of_scanlines); var $fractional$$ = 0; - for($i$$1_mode$$ = 0;$i$$1_mode$$ < this.no_of_scanlines;$i$$1_mode$$++) { - $clockSpeedHz_v$$ = (this.samplesPerFrame << 16) / this.no_of_scanlines + $fractional$$, $fractional$$ = $clockSpeedHz_v$$ - ($clockSpeedHz_v$$ >> 16 << 16), this.samplesPerLine[$i$$1_mode$$] = $clockSpeedHz_v$$ >> 16 + for ($i$$3_mode$$ = 0;$i$$3_mode$$ < this.no_of_scanlines;$i$$3_mode$$++) { + $clockSpeedHz_v$$ = (this.samplesPerFrame << 16) / this.no_of_scanlines + $fractional$$, $fractional$$ = $clockSpeedHz_v$$ - ($clockSpeedHz_v$$ >> 16 << 16), this.samplesPerLine[$i$$3_mode$$] = $clockSpeedHz_v$$ >> 16; } } } }, audioOutput:function $JSSMS$$audioOutput$($buffer$$) { - this.ui.writeAudio($buffer$$) + this.ui.writeAudio($buffer$$); }, doRepaint:function $JSSMS$$doRepaint$() { - this.ui.writeFrame() + this.ui.writeFrame(); }, printFps:function $JSSMS$$printFps$() { var $now$$ = JSSMS.Utils.getTimestamp(), $s$$ = "Running: " + (this.fpsFrameCount / (($now$$ - this.lastFpsTime) / 1E3)).toFixed(2) + " FPS"; this.ui.updateStatus($s$$); this.fpsFrameCount = 0; - this.lastFpsTime = $now$$ + this.lastFpsTime = $now$$; }, resetFps:function $JSSMS$$resetFps$() { this.lastFpsTime = JSSMS.Utils.getTimestamp(); - this.fpsFrameCount = 0 + this.fpsFrameCount = 0; }, updateSound:function $JSSMS$$updateSound$($line_samplesToGenerate$$) { - 0 == $line_samplesToGenerate$$ && (this.audioBufferOffset = 0); + 0 === $line_samplesToGenerate$$ && (this.audioBufferOffset = 0); $line_samplesToGenerate$$ = this.samplesPerLine[$line_samplesToGenerate$$]; this.audioBuffer = this.psg.update(this.audioBufferOffset, $line_samplesToGenerate$$); - this.audioBufferOffset += $line_samplesToGenerate$$ + this.audioBufferOffset += $line_samplesToGenerate$$; }, readRomDirectly:function $JSSMS$$readRomDirectly$($data$$, $fileName$$) { var $mode$$; $mode$$ = ".gg" == $fileName$$.substr(-3).toLowerCase() ? 2 : 1; var $size$$ = $data$$.length; 1 == $mode$$ ? this.setSMS() : 2 == $mode$$ && this.setGG(); - if($size$$ <= PAGE_SIZE) { - return!1 + if ($size$$ <= PAGE_SIZE) { + return!1; } $mode$$ = this.loadROM($data$$, $size$$); - if(null == $mode$$) { - return!1 + if (null === $mode$$) { + return!1; } this.cpu.resetMemory($mode$$); this.romData = $data$$; this.romFileName = $fileName$$; - return!0 + return!0; }, loadROM:function $JSSMS$$loadROM$($data$$, $size$$) { - 0 != $size$$ % 1024 && ($data$$ = $data$$.substr(512), $size$$ -= 512); + 0 !== $size$$ % 1024 && ($data$$ = $data$$.substr(512), $size$$ -= 512); var $i$$, $j$$, $number_of_pages$$ = Math.round($size$$ / PAGE_SIZE), $pages$$ = Array($number_of_pages$$); - for($i$$ = 0;$i$$ < $number_of_pages$$;$i$$++) { - if($pages$$[$i$$] = JSSMS.Utils.Array(PAGE_SIZE), SUPPORT_DATAVIEW) { - for($j$$ = 0;$j$$ < PAGE_SIZE;$j$$++) { - $pages$$[$i$$].setUint8($j$$, $data$$.charCodeAt($i$$ * PAGE_SIZE + $j$$)) + for ($i$$ = 0;$i$$ < $number_of_pages$$;$i$$++) { + if ($pages$$[$i$$] = JSSMS.Utils.Array(PAGE_SIZE), SUPPORT_DATAVIEW) { + for ($j$$ = 0;$j$$ < PAGE_SIZE;$j$$++) { + $pages$$[$i$$].setUint8($j$$, $data$$.charCodeAt($i$$ * PAGE_SIZE + $j$$)); } - }else { - for($j$$ = 0;$j$$ < PAGE_SIZE;$j$$++) { - $pages$$[$i$$][$j$$] = $data$$.charCodeAt($i$$ * PAGE_SIZE + $j$$) & 255 + } else { + for ($j$$ = 0;$j$$ < PAGE_SIZE;$j$$++) { + $pages$$[$i$$][$j$$] = $data$$.charCodeAt($i$$ * PAGE_SIZE + $j$$) & 255; } } } - return $pages$$ + return $pages$$; }, reloadRom:function $JSSMS$$reloadRom$() { - return"" != this.romData && "" != this.romFileName ? this.readRomDirectly(this.romData, this.romFileName) : !1 + return "" !== this.romData && "" !== this.romFileName ? this.readRomDirectly(this.romData, this.romFileName) : !1; }}; (function() { "console" in window ? "bind" in window.console.log || (window.console.log = function($fn$$) { return function($msg$$) { - return $fn$$($msg$$) - } + return $fn$$($msg$$); + }; }(window.console.log), window.console.error = function($fn$$) { return function($msg$$) { - return $fn$$($msg$$) - } + return $fn$$($msg$$); + }; }(window.console.error)) : window.console = {log:function $window$console$log$() { }, error:function $window$console$error$() { - }} + }}; })(); JSSMS.Utils = {rndInt:function $JSSMS$Utils$rndInt$($range$$) { - return Math.round(Math.random() * $range$$) + return Math.round(Math.random() * $range$$); }, Uint8Array:function() { - return SUPPORT_TYPED_ARRAYS ? Uint8Array : Array + return SUPPORT_TYPED_ARRAYS ? Uint8Array : Array; }(), Array:function() { return SUPPORT_DATAVIEW ? function($length$$) { - return new DataView(new ArrayBuffer($length$$)) - } : Array + return new DataView(new ArrayBuffer($length$$)); + } : Array; }(), copyArrayElements:function() { return SUPPORT_DATAVIEW ? function($src$$, $srcPos$$, $dest$$, $destPos$$, $length$$) { - for(;$length$$--;) { - $dest$$.setInt8($destPos$$ + $length$$, $src$$.getInt8($srcPos$$ + $length$$)) + for (;$length$$--;) { + $dest$$.setInt8($destPos$$ + $length$$, $src$$.getInt8($srcPos$$ + $length$$)); } } : function($src$$, $srcPos$$, $dest$$, $destPos$$, $length$$) { - for(;$length$$--;) { - $dest$$[$destPos$$ + $length$$] = $src$$[$srcPos$$ + $length$$] + for (;$length$$--;) { + $dest$$[$destPos$$ + $length$$] = $src$$[$srcPos$$ + $length$$]; } - } + }; }(), console:{log:function() { return DEBUG ? window.console.log.bind(window.console) : function($var_args$$) { - } + }; }(), error:function() { return DEBUG ? window.console.error.bind(window.console) : function($var_args$$) { - } + }; }(), time:function() { return DEBUG && window.console.time ? window.console.time.bind(window.console) : function($label$$) { - } + }; }(), timeEnd:function() { return DEBUG && window.console.timeEnd ? window.console.timeEnd.bind(window.console) : function($label$$) { - } + }; }()}, traverse:function $JSSMS$Utils$traverse$($object$$, $fn$$) { var $key$$, $child$$; $fn$$.call(null, $object$$); - for($key$$ in $object$$) { - $object$$.hasOwnProperty($key$$) && ($child$$ = $object$$[$key$$], Object($child$$) === $child$$ && ($object$$[$key$$] = JSSMS.Utils.traverse($child$$, $fn$$))) + for ($key$$ in $object$$) { + $object$$.hasOwnProperty($key$$) && ($child$$ = $object$$[$key$$], Object($child$$) === $child$$ && ($object$$[$key$$] = JSSMS.Utils.traverse($child$$, $fn$$))); } - return $object$$ + return $object$$; }, getTimestamp:function() { return window.performance && window.performance.now ? window.performance.now.bind(window.performance) : function() { - return(new Date).getTime() - } + return(new Date).getTime(); + }; }(), toHex:function $JSSMS$Utils$toHex$($dec_hex$$) { $dec_hex$$ = $dec_hex$$.toString(16).toUpperCase(); $dec_hex$$.length % 2 && ($dec_hex$$ = "0" + $dec_hex$$); - return"0x" + $dec_hex$$ + return "0x" + $dec_hex$$; }, getPrefix:function $JSSMS$Utils$getPrefix$($arr$$, $obj$$) { var $prefix$$ = !1; - void 0 == $obj$$ && ($obj$$ = document); + void 0 === $obj$$ && ($obj$$ = document); $arr$$.some(function($prop$$) { - return $prop$$ in $obj$$ ? ($prefix$$ = $prop$$, !0) : !1 + return $prop$$ in $obj$$ ? ($prefix$$ = $prop$$, !0) : !1; }); - return $prefix$$ + return $prefix$$; }, isIE:function $JSSMS$Utils$isIE$() { - return/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) + return/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent); }}; function BinaryRequest($method$$, $url$$, $args$$, $data$$, $cb$$) { $method$$ = $method$$ || "GET"; var $alwaysCallbacks$$ = []; - if($args$$) { + if ($args$$) { var $arg_str$$ = [], $i$$0$$; - for($i$$0$$ in $args$$) { - var $arg$$ = escape($i$$0$$); - void 0 != $args$$[$i$$0$$] && ($arg$$ += "=" + escape($args$$[$i$$0$$])); - $arg_str$$.push($arg$$) + for ($i$$0$$ in $args$$) { + var $arg$$ = encodeURI($i$$0$$); + void 0 !== $args$$[$i$$0$$] && ($arg$$ += "=" + encodeURI($args$$[$i$$0$$])); + $arg_str$$.push($arg$$); } - $url$$ += "?" + $arg_str$$.join("&") + $url$$ += "?" + $arg_str$$.join("&"); } var $xhr$$ = new XMLHttpRequest; $xhr$$.open($method$$, $url$$, !0); try { - $xhr$$.responseType = "arraybuffer" - }catch($e$$) { - console.error("responseType arrayBuffer not supported!") + $xhr$$.responseType = "arraybuffer"; + } catch ($e$$) { + console.error("responseType arrayBuffer not supported!"); } $xhr$$.onreadystatechange = function onreadystatechange() { - if(4 == $xhr$$.readyState) { + if (4 == $xhr$$.readyState) { var $i$$; - for($i$$ = 0;$i$$ < $alwaysCallbacks$$.length;++$i$$) { - $alwaysCallbacks$$[$i$$]() + for ($i$$ = 0;$i$$ < $alwaysCallbacks$$.length;++$i$$) { + $alwaysCallbacks$$[$i$$](); } } }; $xhr$$.onload = function onload() { - this.response instanceof ArrayBuffer ? $cb$$(this.response) : console.error("Bad response type: " + typeof this.response + " for " + JSON.stringify(this.response)) + this.response instanceof ArrayBuffer ? $cb$$(this.response) : console.error("Bad response type: " + typeof this.response + " for " + JSON.stringify(this.response)); }; $xhr$$.send($data$$); this.always = function $this$always$($cb$$) { 4 == $xhr$$.readyState && $cb$$(); $alwaysCallbacks$$.push($cb$$); - return this - } + return this; + }; } function SyncWriter() { this.kBufferLength = 524288; this.syncBuffer = new Uint16Array(this.kBufferLength); this.fileOffset = this.syncBufferIdx = 0; this.curRequest = null; - this.buffers = [] + this.buffers = []; } SyncWriter.prototype = {flushBuffer:function $SyncWriter$$flushBuffer$() { - this.syncBufferIdx >= this.syncBuffer.length && (this.buffers.push(this.syncBuffer), this.syncBuffer = new Uint16Array(this.kBufferLength), this.syncBufferIdx = 0) + this.syncBufferIdx >= this.syncBuffer.length && (this.buffers.push(this.syncBuffer), this.syncBuffer = new Uint16Array(this.kBufferLength), this.syncBufferIdx = 0); }, tick:function $SyncWriter$$tick$() { - if(!this.curRequest && 0 < this.syncBufferIdx) { - for(var $b_buffer$$ = new Uint16Array(this.syncBufferIdx), $i$$ = 0;$i$$ < this.syncBufferIdx;++$i$$) { - $b_buffer$$[$i$$] = this.syncBuffer[$i$$] + if (!this.curRequest && 0 < this.syncBufferIdx) { + for (var $b_buffer$$ = new Uint16Array(this.syncBufferIdx), $i$$ = 0;$i$$ < this.syncBufferIdx;++$i$$) { + $b_buffer$$[$i$$] = this.syncBuffer[$i$$]; } this.buffers.push($b_buffer$$); this.syncBuffer = new Uint16Array(this.kBufferLength); - this.syncBufferIdx = 0 + this.syncBufferIdx = 0; } - if(!this.curRequest && 0 < this.buffers.length) { + if (!this.curRequest && 0 < this.buffers.length) { var $self$$ = this, $b_buffer$$ = this.buffers[0]; this.buffers.splice(0, 1); var $bytes$$ = 2 * $b_buffer$$.length; this.curRequest = (new BinaryRequest("POST", "/wsynclog", {o:this.fileOffset, l:$bytes$$}, $b_buffer$$, function() { - $self$$.fileOffset += $bytes$$ + $self$$.fileOffset += $bytes$$; })).always(function() { - $self$$.curRequest = null - }) + $self$$.curRequest = null; + }); } - return 0 == this.buffers.length + return 0 === this.buffers.length; }, getAvailableBytes:function $SyncWriter$$getAvailableBytes$() { - return 1E9 + return 1E9; }, sync16:function $SyncWriter$$sync16$($val$$, $name$$) { this.syncBufferIdx >= this.syncBuffer.length && this.flushBuffer(); this.syncBuffer[this.syncBufferIdx] = $val$$; - this.syncBufferIdx++ + this.syncBufferIdx++; }, reflect16:function $SyncWriter$$reflect16$($val$$) { this.syncBufferIdx >= this.syncBuffer.length && this.flushBuffer(); this.syncBuffer[this.syncBufferIdx] = $val$$; this.syncBufferIdx++; - return $val$$ + return $val$$; }}; function SyncReader() { this.kBufferLength = 1048576; @@ -297,54 +297,54 @@ function SyncReader() { this.fileOffset = this.syncBufferIdx = 0; this.curRequest = null; this.oos = !1; - this.nextBuffer = null + this.nextBuffer = null; } SyncReader.prototype = {refill:function $SyncReader$$refill$() { - if(!this.syncBuffer || this.syncBufferIdx >= this.syncBuffer.length) { - this.syncBuffer = this.nextBuffer, this.syncBufferIdx = 0, this.nextBuffer = null + if (!this.syncBuffer || this.syncBufferIdx >= this.syncBuffer.length) { + this.syncBuffer = this.nextBuffer, this.syncBufferIdx = 0, this.nextBuffer = null; } }, tick:function $SyncReader$$tick$() { this.refill(); - if(!this.nextBuffer && !this.curRequest) { + if (!this.nextBuffer && !this.curRequest) { var $self$$ = this; this.curRequest = (new BinaryRequest("GET", "/rsynclog", {o:this.fileOffset, l:this.kBufferLength}, void 0, function($result$$) { $self$$.nextBuffer = new Uint16Array($result$$); - $self$$.fileOffset += $result$$.byteLength + $self$$.fileOffset += $result$$.byteLength; })).always(function() { - $self$$.curRequest = null + $self$$.curRequest = null; }); - return!1 + return!1; } - return!0 + return!0; }, getAvailableBytes:function $SyncReader$$getAvailableBytes$() { var $ops$$ = 0; this.syncBuffer && ($ops$$ += this.syncBuffer.length - this.syncBufferIdx); this.nextBuffer && ($ops$$ += this.nextBuffer.length); - return 2 * $ops$$ + return 2 * $ops$$; }, pop:function $SyncReader$$pop$() { (!this.syncBuffer || this.syncBufferIdx >= this.syncBuffer.length) && this.refill(); - if(this.syncBuffer && this.syncBufferIdx < this.syncBuffer.length) { + if (this.syncBuffer && this.syncBufferIdx < this.syncBuffer.length) { var $r$$ = this.syncBuffer[this.syncBufferIdx]; this.syncBufferIdx++; - return $r$$ + return $r$$; } - return-1 + return-1; }, sync16:function $SyncReader$$sync16$($val$$, $name$$) { - if(this.oos) { - return!1 + if (this.oos) { + return!1; } var $toHex$$ = JSSMS.Utils.toHex, $writtenVal$$ = this.pop(); - if($val$$ == $writtenVal$$) { - console.log($name$$, $toHex$$($val$$), $toHex$$($writtenVal$$)) - }else { - if(console.log("%c" + $name$$, "color: red;", $toHex$$($val$$), $toHex$$($writtenVal$$)), "pc" == $name$$) { + if ($val$$ == $writtenVal$$) { + console.log($name$$, $toHex$$($val$$), $toHex$$($writtenVal$$)); + } else { + if (console.log("%c" + $name$$, "color: red;", $toHex$$($val$$), $toHex$$($writtenVal$$)), "pc" == $name$$) { debugger; - return!1 + return!1; } } - return!0 + return!0; }, reflect16:function $SyncReader$$reflect16$($val$$) { - return this.oos ? $val$$ : this.pop() + return this.oos ? $val$$ : this.pop(); }}; var HALT_SPEEDUP = !0, F_CARRY = 1, F_NEGATIVE = 2, F_PARITY = 4, F_OVERFLOW = 4, F_BIT3 = 8, F_HALFCARRY = 16, F_BIT5 = 32, F_ZERO = 64, F_SIGN = 128, BIT_0 = 1, BIT_1 = 2, BIT_2 = 4, BIT_3 = 8, BIT_4 = 16, BIT_5 = 32, BIT_6 = 64, BIT_7 = 128, OP_STATES = [4, 10, 7, 6, 4, 4, 7, 4, 4, 11, 7, 6, 4, 4, 7, 4, 8, 10, 7, 6, 4, 4, 7, 4, 12, 11, 7, 6, 4, 4, 7, 4, 7, 10, 16, 6, 4, 4, 7, 4, 7, 11, 16, 6, 4, 4, 7, 4, 7, 10, 13, 6, 11, 11, 10, 4, 7, 11, 13, 6, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 7, 7, 7, 7, 7, 7, 4, 7, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 5, 10, 10, 10, 10, 11, 7, 11, 5, 10, 10, 0, 10, 17, 7, 11, 5, 10, 10, 11, 10, 11, 7, 11, 5, 4, 10, 11, 10, 0, 7, 11, 5, 10, 10, 19, 10, 11, 7, 11, 5, 4, @@ -381,15 +381,15 @@ JSSMS.Z80 = function $JSSMS$Z80$($sms$$) { this.generateFlagTables(); this.generateDAATable(); this.generateMemory(); - if(ENABLE_DEBUGGER) { - for(var $method$$ in JSSMS.Debugger.prototype) { - this[$method$$] = JSSMS.Debugger.prototype[$method$$] + if (ENABLE_DEBUGGER) { + for (var $method$$ in JSSMS.Debugger.prototype) { + this[$method$$] = JSSMS.Debugger.prototype[$method$$]; } } ENABLE_COMPILER && (this.recompiler = new Recompiler(this)); ENABLE_SERVER_LOGGER && (this.syncServer = SYNC_MODE == WRITE_MODE ? new SyncWriter : new SyncReader, this.syncServer.tick(), this.sync = function $this$sync$() { - this.syncServer.sync16(this.pc, "pc") - }) + this.syncServer.sync16(this.pc, "pc"); + }); }; JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.pc = this.f2 = this.f = this.i = this.r = this.iyL = this.iyH = this.ixL = this.ixH = this.h = this.l = this.h2 = this.l2 = this.d = this.e = this.d2 = this.e2 = this.b = this.c = this.b2 = this.c2 = this.a = this.a2 = 0; @@ -398,17 +398,17 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.EI_inst = this.iff2 = this.iff1 = !1; this.interruptVector = 0; this.halt = !1; - ENABLE_COMPILER && this.recompiler.reset() + ENABLE_COMPILER && this.recompiler.reset(); }, frame:function $JSSMS$Z80$$frame$() { this.lineno = 0; this.tstates += this.main.cyclesPerLine; this.totalCycles = this.main.cyclesPerLine; - for(ACCURATE_INTERRUPT_EMULATION && this.interruptLine && this.interrupt();!(ENABLE_DEBUGGER && this.main.ui.updateDisassembly(this.pc), ENABLE_COMPILER ? this.recompile() : (ENABLE_SERVER_LOGGER && this.sync(), this.interpret()), 0 >= this.tstates && this.eol());) { + for (ACCURATE_INTERRUPT_EMULATION && this.interruptLine && this.interrupt();!(ENABLE_DEBUGGER && this.main.ui.updateDisassembly(this.pc), ENABLE_COMPILER ? this.recompile() : (ENABLE_SERVER_LOGGER && this.sync(), this.interpret()), 0 >= this.tstates && this.eol());) { } - ENABLE_SERVER_LOGGER && this.syncServer.tick() + ENABLE_SERVER_LOGGER && this.syncServer.tick(); }, recompile:function $JSSMS$Z80$$recompile$() { 1024 > this.pc ? (this.branches[0][this.pc] || this.recompiler.recompileFromAddress(this.pc, 0, 0), this.branches[0][this.pc].call(this, 0)) : 16384 > this.pc ? (this.branches[this.frameReg[0]][this.pc] || this.recompiler.recompileFromAddress(this.pc, this.frameReg[0], 0), this.branches[this.frameReg[0]][this.pc].call(this, 0)) : 32768 > this.pc ? (this.branches[this.frameReg[1]][this.pc - 16384] || this.recompiler.recompileFromAddress(this.pc, this.frameReg[1], 1), this.branches[this.frameReg[1]][this.pc - - 16384].call(this, 1)) : 49152 > this.pc ? (this.branches[this.frameReg[2]][this.pc - 32768] || this.recompiler.recompileFromAddress(this.pc, this.frameReg[2], 2), this.branches[this.frameReg[2]][this.pc - 32768].call(this, 2)) : this.interpret() + 16384].call(this, 1)) : 49152 > this.pc ? (this.branches[this.frameReg[2]][this.pc - 32768] || this.recompiler.recompileFromAddress(this.pc, this.frameReg[2], 2), this.branches[this.frameReg[2]][this.pc - 32768].call(this, 2)) : this.interpret(); }, eol:function $JSSMS$Z80$$eol$() { this.main.soundEnabled && this.main.updateSound(this.lineno); this.vdp.line = this.lineno; @@ -416,16 +416,16 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.vdp.interrupts(this.lineno); this.interruptLine && this.interrupt(); this.lineno++; - if(this.lineno >= this.main.no_of_scanlines) { - return this.eof(), !0 + if (this.lineno >= this.main.no_of_scanlines) { + return this.eof(), !0; } this.tstates += this.main.cyclesPerLine; this.totalCycles = this.main.cyclesPerLine; - return!1 + return!1; }, eof:function $JSSMS$Z80$$eof$() { this.main.soundEnabled && this.main.audioOutput(this.main.audioBuffer); this.main.pause_button && (this.nmi(), this.main.pause_button = !1); - this.main.doRepaint() + this.main.doRepaint(); }, branches:[Object.create(null), Object.create(null), Object.create(null)], interpret:function $JSSMS$Z80$$interpret$() { var $opcode_temp$$ = 0, $opcode_temp$$ = this.readMem(this.pc++); ACCURATE_INTERRUPT_EMULATION && (this.EI_inst = !1); @@ -480,7 +480,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { break; case 16: this.b = this.b - 1 & 255; - this.jr(0 != this.b); + this.jr(0 !== this.b); break; case 17: this.setDE(this.readMemWord(this.pc++)); @@ -529,7 +529,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.rra_a(); break; case 32: - this.jr(0 == (this.f & F_ZERO)); + this.jr(0 === (this.f & F_ZERO)); break; case 33: this.setHL(this.readMemWord(this.pc++)); @@ -555,7 +555,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.daa(); break; case 40: - this.jr(0 != (this.f & F_ZERO)); + this.jr(0 !== (this.f & F_ZERO)); break; case 41: this.setHL(this.add16(this.getHL(), this.getHL())); @@ -580,7 +580,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.cpl_a(); break; case 48: - this.jr(0 == (this.f & F_CARRY)); + this.jr(0 === (this.f & F_CARRY)); break; case 49: this.sp = this.readMemWord(this.pc++); @@ -608,7 +608,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.f &= ~F_HALFCARRY; break; case 56: - this.jr(0 != (this.f & F_CARRY)); + this.jr(0 !== (this.f & F_CARRY)); break; case 57: this.setHL(this.add16(this.getHL(), this.sp)); @@ -998,20 +998,20 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.cp_a(this.a); break; case 192: - this.ret(0 == (this.f & F_ZERO)); + this.ret(0 === (this.f & F_ZERO)); break; case 193: this.setBC(this.readMemWord(this.sp)); this.sp += 2; break; case 194: - this.jp(0 == (this.f & F_ZERO)); + this.jp(0 === (this.f & F_ZERO)); break; case 195: this.pc = this.readMemWord(this.pc); break; case 196: - this.call(0 == (this.f & F_ZERO)); + this.call(0 === (this.f & F_ZERO)); break; case 197: this.push(this.getBC()); @@ -1024,20 +1024,20 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.pc = 0; break; case 200: - this.ret(0 != (this.f & F_ZERO)); + this.ret(0 !== (this.f & F_ZERO)); break; case 201: this.pc = this.readMemWord(this.sp); this.sp += 2; break; case 202: - this.jp(0 != (this.f & F_ZERO)); + this.jp(0 !== (this.f & F_ZERO)); break; case 203: this.doCB(this.readMem(this.pc++)); break; case 204: - this.call(0 != (this.f & F_ZERO)); + this.call(0 !== (this.f & F_ZERO)); break; case 205: this.push(this.pc + 2); @@ -1051,20 +1051,20 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.pc = 8; break; case 208: - this.ret(0 == (this.f & F_CARRY)); + this.ret(0 === (this.f & F_CARRY)); break; case 209: this.setDE(this.readMemWord(this.sp)); this.sp += 2; break; case 210: - this.jp(0 == (this.f & F_CARRY)); + this.jp(0 === (this.f & F_CARRY)); break; case 211: this.port.out(this.readMem(this.pc++), this.a); break; case 212: - this.call(0 == (this.f & F_CARRY)); + this.call(0 === (this.f & F_CARRY)); break; case 213: this.push(this.getDE()); @@ -1077,7 +1077,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.pc = 16; break; case 216: - this.ret(0 != (this.f & F_CARRY)); + this.ret(0 !== (this.f & F_CARRY)); break; case 217: this.exBC(); @@ -1085,13 +1085,13 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.exHL(); break; case 218: - this.jp(0 != (this.f & F_CARRY)); + this.jp(0 !== (this.f & F_CARRY)); break; case 219: this.a = this.port.in_(this.readMem(this.pc++)); break; case 220: - this.call(0 != (this.f & F_CARRY)); + this.call(0 !== (this.f & F_CARRY)); break; case 221: this.doIndexOpIX(this.readMem(this.pc++)); @@ -1104,14 +1104,14 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.pc = 24; break; case 224: - this.ret(0 == (this.f & F_PARITY)); + this.ret(0 === (this.f & F_PARITY)); break; case 225: this.setHL(this.readMemWord(this.sp)); this.sp += 2; break; case 226: - this.jp(0 == (this.f & F_PARITY)); + this.jp(0 === (this.f & F_PARITY)); break; case 227: $opcode_temp$$ = this.getHL(); @@ -1119,7 +1119,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.writeMemWord(this.sp, $opcode_temp$$); break; case 228: - this.call(0 == (this.f & F_PARITY)); + this.call(0 === (this.f & F_PARITY)); break; case 229: this.push(this.getHL()); @@ -1132,13 +1132,13 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.pc = 32; break; case 232: - this.ret(0 != (this.f & F_PARITY)); + this.ret(0 !== (this.f & F_PARITY)); break; case 233: this.pc = this.getHL(); break; case 234: - this.jp(0 != (this.f & F_PARITY)); + this.jp(0 !== (this.f & F_PARITY)); break; case 235: $opcode_temp$$ = this.d; @@ -1149,7 +1149,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.l = $opcode_temp$$; break; case 236: - this.call(0 != (this.f & F_PARITY)); + this.call(0 !== (this.f & F_PARITY)); break; case 237: this.doED(this.readMem(this.pc)); @@ -1162,21 +1162,21 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.pc = 40; break; case 240: - this.ret(0 == (this.f & F_SIGN)); + this.ret(0 === (this.f & F_SIGN)); break; case 241: this.setAF(this.readMemWord(this.sp)); this.sp += 2; break; case 242: - this.jp(0 == (this.f & F_SIGN)); + this.jp(0 === (this.f & F_SIGN)); break; case 243: this.iff1 = this.iff2 = !1; this.EI_inst = !0; break; case 244: - this.call(0 == (this.f & F_SIGN)); + this.call(0 === (this.f & F_SIGN)); break; case 245: this.push(this.getAF()); @@ -1189,19 +1189,19 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.pc = 48; break; case 248: - this.ret(0 != (this.f & F_SIGN)); + this.ret(0 !== (this.f & F_SIGN)); break; case 249: this.sp = this.getHL(); break; case 250: - this.jp(0 != (this.f & F_SIGN)); + this.jp(0 !== (this.f & F_SIGN)); break; case 251: this.iff1 = this.iff2 = this.EI_inst = !0; break; case 252: - this.call(0 != (this.f & F_SIGN)); + this.call(0 !== (this.f & F_SIGN)); break; case 253: this.doIndexOpIY(this.readMem(this.pc++)); @@ -1210,10 +1210,10 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.cp_a(this.readMem(this.pc++)); break; case 255: - this.push(this.pc), this.pc = 56 + this.push(this.pc), this.pc = 56; } }, getCycle:function $JSSMS$Z80$$getCycle$() { - return this.totalCycles - this.tstates + return this.totalCycles - this.tstates; }, nmi:function $JSSMS$Z80$$nmi$() { this.iff2 = this.iff1; this.iff1 = !1; @@ -1221,37 +1221,37 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.halt && (this.pc++, this.halt = !1); this.push(this.pc); this.pc = 102; - this.tstates -= 11 + this.tstates -= 11; }, interrupt:function $JSSMS$Z80$$interrupt$() { - !this.iff1 || ACCURATE_INTERRUPT_EMULATION && this.EI_inst || (this.halt && (this.pc++, this.halt = !1), REFRESH_EMULATION && this.incR(), this.interruptLine = this.iff1 = this.iff2 = !1, this.push(this.pc), 0 == this.im ? (this.pc = 0 == this.interruptVector || 255 == this.interruptVector ? 56 : this.interruptVector, this.tstates -= 13) : 1 == this.im ? (this.pc = 56, this.tstates -= 13) : (this.pc = this.readMemWord((this.i << 8) + this.interruptVector), this.tstates -= 19)) + !this.iff1 || ACCURATE_INTERRUPT_EMULATION && this.EI_inst || (this.halt && (this.pc++, this.halt = !1), REFRESH_EMULATION && this.incR(), this.interruptLine = this.iff1 = this.iff2 = !1, this.push(this.pc), 0 === this.im ? (this.pc = 0 === this.interruptVector || 255 === this.interruptVector ? 56 : this.interruptVector, this.tstates -= 13) : 1 == this.im ? (this.pc = 56, this.tstates -= 13) : (this.pc = this.readMemWord((this.i << 8) + this.interruptVector), this.tstates -= 19)); }, jp:function $JSSMS$Z80$$jp$($condition$$) { - this.pc = $condition$$ ? this.readMemWord(this.pc) : this.pc + 2 + this.pc = $condition$$ ? this.readMemWord(this.pc) : this.pc + 2; }, jr:function $JSSMS$Z80$$jr$($condition$$) { - $condition$$ ? (this.pc += this.signExtend(this.d_() + 1), this.tstates -= 5) : this.pc++ + $condition$$ ? (this.pc += this.signExtend(this.d_() + 1), this.tstates -= 5) : this.pc++; }, signExtend:function $JSSMS$Z80$$signExtend$($d$$) { 128 <= $d$$ && ($d$$ -= 256); - return $d$$ + return $d$$; }, call:function $JSSMS$Z80$$call$($condition$$) { - $condition$$ ? (this.push(this.pc + 2), this.pc = this.readMemWord(this.pc), this.tstates -= 7) : this.pc += 2 + $condition$$ ? (this.push(this.pc + 2), this.pc = this.readMemWord(this.pc), this.tstates -= 7) : this.pc += 2; }, ret:function $JSSMS$Z80$$ret$($condition$$) { - $condition$$ && (this.pc = this.readMemWord(this.sp), this.sp += 2, this.tstates -= 6) + $condition$$ && (this.pc = this.readMemWord(this.sp), this.sp += 2, this.tstates -= 6); }, push:function $JSSMS$Z80$$push$($value$$) { this.sp -= 2; - this.writeMemWord(this.sp, $value$$) + this.writeMemWord(this.sp, $value$$); }, pushUint8:function $JSSMS$Z80$$pushUint8$($hi$$, $lo$$) { this.sp -= 2; - this.writeMemWord(this.sp, $hi$$ << 8 | $lo$$) + this.writeMemWord(this.sp, $hi$$ << 8 | $lo$$); }, incMem:function $JSSMS$Z80$$incMem$($offset$$) { - this.writeMem($offset$$, this.inc8(this.readMem($offset$$))) + this.writeMem($offset$$, this.inc8(this.readMem($offset$$))); }, decMem:function $JSSMS$Z80$$decMem$($offset$$) { - this.writeMem($offset$$, this.dec8(this.readMem($offset$$))) + this.writeMem($offset$$, this.dec8(this.readMem($offset$$))); }, ccf:function $JSSMS$Z80$$ccf$() { - 0 != (this.f & F_CARRY) ? (this.f &= ~F_CARRY, this.f |= F_HALFCARRY) : (this.f |= F_CARRY, this.f &= ~F_HALFCARRY); - this.f &= ~F_NEGATIVE + 0 !== (this.f & F_CARRY) ? (this.f &= ~F_CARRY, this.f |= F_HALFCARRY) : (this.f |= F_CARRY, this.f &= ~F_HALFCARRY); + this.f &= ~F_NEGATIVE; }, daa:function $JSSMS$Z80$$daa$() { var $temp$$ = this.DAA_TABLE[this.a | (this.f & F_CARRY) << 8 | (this.f & F_NEGATIVE) << 8 | (this.f & F_HALFCARRY) << 6]; this.a = $temp$$ & 255; - this.f = this.f & F_NEGATIVE | $temp$$ >> 8 + this.f = this.f & F_NEGATIVE | $temp$$ >> 8; }, doCB:function $JSSMS$Z80$$doCB$($opcode$$) { this.tstates -= OP_CB_STATES[$opcode$$]; REFRESH_EMULATION && this.incR(); @@ -2025,50 +2025,50 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.a |= BIT_7; break; default: - JSSMS.Utils.console.log("Unimplemented CB Opcode: " + JSSMS.Utils.toHex($opcode$$)) + JSSMS.Utils.console.log("Unimplemented CB Opcode: " + JSSMS.Utils.toHex($opcode$$)); } }, rlc:function $JSSMS$Z80$$rlc$($value$$) { var $carry$$ = ($value$$ & 128) >> 7; $value$$ = ($value$$ << 1 | $value$$ >> 7) & 255; this.f = $carry$$ | this.SZP_TABLE[$value$$]; - return $value$$ + return $value$$; }, rrc:function $JSSMS$Z80$$rrc$($value$$) { var $carry$$ = $value$$ & 1; $value$$ = ($value$$ >> 1 | $value$$ << 7) & 255; this.f = $carry$$ | this.SZP_TABLE[$value$$]; - return $value$$ + return $value$$; }, rl:function $JSSMS$Z80$$rl$($value$$) { var $carry$$ = ($value$$ & 128) >> 7; $value$$ = ($value$$ << 1 | this.f & F_CARRY) & 255; this.f = $carry$$ | this.SZP_TABLE[$value$$]; - return $value$$ + return $value$$; }, rr:function $JSSMS$Z80$$rr$($value$$) { var $carry$$ = $value$$ & 1; $value$$ = ($value$$ >> 1 | this.f << 7) & 255; this.f = $carry$$ | this.SZP_TABLE[$value$$]; - return $value$$ + return $value$$; }, sla:function $JSSMS$Z80$$sla$($value$$) { var $carry$$ = ($value$$ & 128) >> 7; $value$$ = $value$$ << 1 & 255; this.f = $carry$$ | this.SZP_TABLE[$value$$]; - return $value$$ + return $value$$; }, sll:function $JSSMS$Z80$$sll$($value$$) { var $carry$$ = ($value$$ & 128) >> 7; $value$$ = ($value$$ << 1 | 1) & 255; this.f = $carry$$ | this.SZP_TABLE[$value$$]; - return $value$$ + return $value$$; }, sra:function $JSSMS$Z80$$sra$($value$$) { var $carry$$ = $value$$ & 1; $value$$ = $value$$ >> 1 | $value$$ & 128; this.f = $carry$$ | this.SZP_TABLE[$value$$]; - return $value$$ + return $value$$; }, srl:function $JSSMS$Z80$$srl$($value$$) { var $carry$$ = $value$$ & 1; $value$$ = $value$$ >> 1 & 255; this.f = $carry$$ | this.SZP_TABLE[$value$$]; - return $value$$ + return $value$$; }, bit:function $JSSMS$Z80$$bit$($mask$$) { - this.f = this.f & F_CARRY | this.SZ_BIT_TABLE[$mask$$] + this.f = this.f & F_CARRY | this.SZ_BIT_TABLE[$mask$$]; }, doIndexOpIX:function $JSSMS$Z80$$doIndexOpIX$($opcode$$) { var $temp$$ = 0; this.tstates -= OP_DD_STATES[$opcode$$]; @@ -2362,7 +2362,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.sp = this.getIXHIXL(); break; default: - JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: " + JSSMS.Utils.toHex($opcode$$)), this.pc-- + JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: " + JSSMS.Utils.toHex($opcode$$)), this.pc--; } }, doIndexOpIY:function $JSSMS$Z80$$doIndexOpIY$($opcode$$3_temp$$) { this.tstates -= OP_DD_STATES[$opcode$$3_temp$$]; @@ -2656,260 +2656,260 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.sp = this.getIYHIYL(); break; default: - JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: " + JSSMS.Utils.toHex($opcode$$3_temp$$)), this.pc-- + JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: " + JSSMS.Utils.toHex($opcode$$3_temp$$)), this.pc--; } -}, doIndexCB:function $JSSMS$Z80$$doIndexCB$($index$$45_location$$) { - $index$$45_location$$ = $index$$45_location$$ + this.readMem(this.pc) & 65535; +}, doIndexCB:function $JSSMS$Z80$$doIndexCB$($index$$46_location$$) { + $index$$46_location$$ = $index$$46_location$$ + this.readMem(this.pc) & 65535; var $opcode$$ = this.readMem(++this.pc); this.tstates -= OP_INDEX_CB_STATES[$opcode$$]; switch($opcode$$) { case 0: - this.b = this.rlc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.b); + this.b = this.rlc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.b); break; case 1: - this.c = this.rlc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.c); + this.c = this.rlc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.c); break; case 2: - this.d = this.rlc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.d); + this.d = this.rlc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.d); break; case 3: - this.e = this.rlc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.e); + this.e = this.rlc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.e); break; case 4: - this.h = this.rlc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.h); + this.h = this.rlc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.h); break; case 5: - this.l = this.rlc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.l); + this.l = this.rlc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.l); break; case 6: - this.writeMem($index$$45_location$$, this.rlc(this.readMem($index$$45_location$$))); + this.writeMem($index$$46_location$$, this.rlc(this.readMem($index$$46_location$$))); break; case 7: - this.a = this.rlc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.a); + this.a = this.rlc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.a); break; case 8: - this.b = this.rrc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.b); + this.b = this.rrc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.b); break; case 9: - this.c = this.rrc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.c); + this.c = this.rrc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.c); break; case 10: - this.d = this.rrc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.d); + this.d = this.rrc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.d); break; case 11: - this.e = this.rrc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.e); + this.e = this.rrc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.e); break; case 12: - this.h = this.rrc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.h); + this.h = this.rrc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.h); break; case 13: - this.l = this.rrc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.l); + this.l = this.rrc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.l); break; case 14: - this.writeMem($index$$45_location$$, this.rrc(this.readMem($index$$45_location$$))); + this.writeMem($index$$46_location$$, this.rrc(this.readMem($index$$46_location$$))); break; case 15: - this.a = this.rrc(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.a); + this.a = this.rrc(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.a); break; case 16: - this.b = this.rl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.b); + this.b = this.rl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.b); break; case 17: - this.c = this.rl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.c); + this.c = this.rl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.c); break; case 18: - this.d = this.rl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.d); + this.d = this.rl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.d); break; case 19: - this.e = this.rl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.e); + this.e = this.rl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.e); break; case 20: - this.h = this.rl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.h); + this.h = this.rl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.h); break; case 21: - this.l = this.rl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.l); + this.l = this.rl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.l); break; case 22: - this.writeMem($index$$45_location$$, this.rl(this.readMem($index$$45_location$$))); + this.writeMem($index$$46_location$$, this.rl(this.readMem($index$$46_location$$))); break; case 23: - this.a = this.rl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.a); + this.a = this.rl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.a); break; case 24: - this.b = this.rr(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.b); + this.b = this.rr(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.b); break; case 25: - this.c = this.rr(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.c); + this.c = this.rr(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.c); break; case 26: - this.d = this.rr(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.d); + this.d = this.rr(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.d); break; case 27: - this.e = this.rr(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.e); + this.e = this.rr(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.e); break; case 28: - this.h = this.rr(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.h); + this.h = this.rr(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.h); break; case 29: - this.l = this.rr(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.l); + this.l = this.rr(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.l); break; case 30: - this.writeMem($index$$45_location$$, this.rr(this.readMem($index$$45_location$$))); + this.writeMem($index$$46_location$$, this.rr(this.readMem($index$$46_location$$))); break; case 31: - this.a = this.rr(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.a); + this.a = this.rr(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.a); break; case 32: - this.b = this.sla(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.b); + this.b = this.sla(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.b); break; case 33: - this.c = this.sla(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.c); + this.c = this.sla(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.c); break; case 34: - this.d = this.sla(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.d); + this.d = this.sla(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.d); break; case 35: - this.e = this.sla(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.e); + this.e = this.sla(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.e); break; case 36: - this.h = this.sla(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.h); + this.h = this.sla(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.h); break; case 37: - this.l = this.sla(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.l); + this.l = this.sla(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.l); break; case 38: - this.writeMem($index$$45_location$$, this.sla(this.readMem($index$$45_location$$))); + this.writeMem($index$$46_location$$, this.sla(this.readMem($index$$46_location$$))); break; case 39: - this.a = this.sla(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.a); + this.a = this.sla(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.a); break; case 40: - this.b = this.sra(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.b); + this.b = this.sra(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.b); break; case 41: - this.c = this.sra(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.c); + this.c = this.sra(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.c); break; case 42: - this.d = this.sra(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.d); + this.d = this.sra(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.d); break; case 43: - this.e = this.sra(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.e); + this.e = this.sra(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.e); break; case 44: - this.h = this.sra(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.h); + this.h = this.sra(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.h); break; case 45: - this.l = this.sra(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.l); + this.l = this.sra(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.l); break; case 46: - this.writeMem($index$$45_location$$, this.sra(this.readMem($index$$45_location$$))); + this.writeMem($index$$46_location$$, this.sra(this.readMem($index$$46_location$$))); break; case 47: - this.a = this.sra(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.a); + this.a = this.sra(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.a); break; case 48: - this.b = this.sll(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.b); + this.b = this.sll(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.b); break; case 49: - this.c = this.sll(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.c); + this.c = this.sll(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.c); break; case 50: - this.d = this.sll(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.d); + this.d = this.sll(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.d); break; case 51: - this.e = this.sll(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.e); + this.e = this.sll(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.e); break; case 52: - this.h = this.sll(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.h); + this.h = this.sll(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.h); break; case 53: - this.l = this.sll(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.l); + this.l = this.sll(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.l); break; case 54: - this.writeMem($index$$45_location$$, this.sll(this.readMem($index$$45_location$$))); + this.writeMem($index$$46_location$$, this.sll(this.readMem($index$$46_location$$))); break; case 55: - this.a = this.sll(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.a); + this.a = this.sll(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.a); break; case 56: - this.b = this.srl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.b); + this.b = this.srl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.b); break; case 57: - this.c = this.srl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.c); + this.c = this.srl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.c); break; case 58: - this.d = this.srl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.d); + this.d = this.srl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.d); break; case 59: - this.e = this.srl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.e); + this.e = this.srl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.e); break; case 60: - this.h = this.srl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.h); + this.h = this.srl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.h); break; case 61: - this.l = this.srl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.l); + this.l = this.srl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.l); break; case 62: - this.writeMem($index$$45_location$$, this.srl(this.readMem($index$$45_location$$))); + this.writeMem($index$$46_location$$, this.srl(this.readMem($index$$46_location$$))); break; case 63: - this.a = this.srl(this.readMem($index$$45_location$$)); - this.writeMem($index$$45_location$$, this.a); + this.a = this.srl(this.readMem($index$$46_location$$)); + this.writeMem($index$$46_location$$, this.a); break; case 64: ; @@ -2926,7 +2926,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 70: ; case 71: - this.bit(this.readMem($index$$45_location$$) & BIT_0); + this.bit(this.readMem($index$$46_location$$) & BIT_0); break; case 72: ; @@ -2943,7 +2943,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 78: ; case 79: - this.bit(this.readMem($index$$45_location$$) & BIT_1); + this.bit(this.readMem($index$$46_location$$) & BIT_1); break; case 80: ; @@ -2960,7 +2960,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 86: ; case 87: - this.bit(this.readMem($index$$45_location$$) & BIT_2); + this.bit(this.readMem($index$$46_location$$) & BIT_2); break; case 88: ; @@ -2977,7 +2977,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 94: ; case 95: - this.bit(this.readMem($index$$45_location$$) & BIT_3); + this.bit(this.readMem($index$$46_location$$) & BIT_3); break; case 96: ; @@ -2994,7 +2994,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 102: ; case 103: - this.bit(this.readMem($index$$45_location$$) & BIT_4); + this.bit(this.readMem($index$$46_location$$) & BIT_4); break; case 104: ; @@ -3011,7 +3011,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 110: ; case 111: - this.bit(this.readMem($index$$45_location$$) & BIT_5); + this.bit(this.readMem($index$$46_location$$) & BIT_5); break; case 112: ; @@ -3028,7 +3028,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 118: ; case 119: - this.bit(this.readMem($index$$45_location$$) & BIT_6); + this.bit(this.readMem($index$$46_location$$) & BIT_6); break; case 120: ; @@ -3045,7 +3045,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 126: ; case 127: - this.bit(this.readMem($index$$45_location$$) & BIT_7); + this.bit(this.readMem($index$$46_location$$) & BIT_7); break; case 128: ; @@ -3062,7 +3062,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 134: ; case 135: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) & ~BIT_0); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) & ~BIT_0); break; case 136: ; @@ -3079,7 +3079,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 142: ; case 143: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) & ~BIT_1); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) & ~BIT_1); break; case 144: ; @@ -3096,7 +3096,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 150: ; case 151: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) & ~BIT_2); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) & ~BIT_2); break; case 152: ; @@ -3113,7 +3113,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 158: ; case 159: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) & ~BIT_3); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) & ~BIT_3); break; case 160: ; @@ -3130,7 +3130,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 166: ; case 167: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) & ~BIT_4); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) & ~BIT_4); break; case 168: ; @@ -3147,7 +3147,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 174: ; case 175: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) & ~BIT_5); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) & ~BIT_5); break; case 176: ; @@ -3164,7 +3164,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 182: ; case 183: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) & ~BIT_6); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) & ~BIT_6); break; case 184: ; @@ -3181,7 +3181,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 190: ; case 191: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) & ~BIT_7); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) & ~BIT_7); break; case 192: ; @@ -3198,7 +3198,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 198: ; case 199: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) | BIT_0); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) | BIT_0); break; case 200: ; @@ -3215,7 +3215,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 206: ; case 207: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) | BIT_1); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) | BIT_1); break; case 208: ; @@ -3232,7 +3232,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 214: ; case 215: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) | BIT_2); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) | BIT_2); break; case 216: ; @@ -3249,7 +3249,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 222: ; case 223: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) | BIT_3); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) | BIT_3); break; case 224: ; @@ -3266,7 +3266,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 230: ; case 231: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) | BIT_4); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) | BIT_4); break; case 232: ; @@ -3283,7 +3283,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 238: ; case 239: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) | BIT_5); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) | BIT_5); break; case 240: ; @@ -3300,7 +3300,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 246: ; case 247: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) | BIT_6); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) | BIT_6); break; case 248: ; @@ -3317,12 +3317,12 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { case 254: ; case 255: - this.writeMem($index$$45_location$$, this.readMem($index$$45_location$$) | BIT_7); + this.writeMem($index$$46_location$$, this.readMem($index$$46_location$$) | BIT_7); break; default: - JSSMS.Utils.console.log("Unimplemented DDCB/FDCB Opcode: " + JSSMS.Utils.toHex($opcode$$)) + JSSMS.Utils.console.log("Unimplemented DDCB/FDCB Opcode: " + JSSMS.Utils.toHex($opcode$$)); } - this.pc++ + this.pc++; }, doED:function $JSSMS$Z80$$doED$($opcode$$) { var $temp$$ = 0, $location$$ = 0; this.tstates -= OP_ED_STATES[$opcode$$]; @@ -3563,7 +3563,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.cp_a(this.readMem(this.getHL())); this.decBC(); this.incHL(); - $temp$$ |= 0 == this.getBC() ? 0 : F_PARITY; + $temp$$ |= 0 === this.getBC() ? 0 : F_PARITY; this.f = this.f & 248 | $temp$$; this.pc++; break; @@ -3572,7 +3572,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.writeMem(this.getHL(), $temp$$); this.b = this.dec8(this.b); this.incHL(); - this.f = 128 == ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; + this.f = 128 === ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; this.pc++; break; case 163: @@ -3581,7 +3581,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.b = this.dec8(this.b); this.incHL(); 255 < this.l + $temp$$ ? (this.f |= F_CARRY, this.f |= F_HALFCARRY) : (this.f &= ~F_CARRY, this.f &= ~F_HALFCARRY); - this.f = 128 == ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; + this.f = 128 === ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; this.pc++; break; case 168: @@ -3599,7 +3599,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.cp_a(this.readMem(this.getHL())); this.decBC(); this.decHL(); - $temp$$ |= 0 == this.getBC() ? 0 : F_PARITY; + $temp$$ |= 0 === this.getBC() ? 0 : F_PARITY; this.f = this.f & 248 | $temp$$; this.pc++; break; @@ -3608,7 +3608,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.writeMem(this.getHL(), $temp$$); this.b = this.dec8(this.b); this.decHL(); - this.f = 0 != ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; + this.f = 0 !== ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; this.pc++; break; case 171: @@ -3617,7 +3617,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.b = this.dec8(this.b); this.decHL(); 255 < this.l + $temp$$ ? (this.f |= F_CARRY, this.f |= F_HALFCARRY) : (this.f &= ~F_CARRY, this.f &= ~F_HALFCARRY); - this.f = 128 == ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; + this.f = 128 === ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; this.pc++; break; case 176: @@ -3628,15 +3628,15 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.incHL(); $temp$$ = $temp$$ + this.a & 255; this.f = this.f & 193 | (this.getBC() ? F_PARITY : 0) | $temp$$ & 8 | ($temp$$ & 2 ? 32 : 0); - 0 != this.getBC() ? (this.tstates -= 5, this.pc--) : this.pc++; + 0 !== this.getBC() ? (this.tstates -= 5, this.pc--) : this.pc++; break; case 177: $temp$$ = this.f & F_CARRY | F_NEGATIVE; this.cp_a(this.readMem(this.getHL())); this.decBC(); this.incHL(); - $temp$$ |= 0 == this.getBC() ? 0 : F_PARITY; - 0 != ($temp$$ & F_PARITY) && 0 == (this.f & F_ZERO) ? (this.tstates -= 5, this.pc--) : this.pc++; + $temp$$ |= 0 === this.getBC() ? 0 : F_PARITY; + 0 !== ($temp$$ & F_PARITY) && 0 === (this.f & F_ZERO) ? (this.tstates -= 5, this.pc--) : this.pc++; this.f = this.f & 248 | $temp$$; break; case 178: @@ -3644,17 +3644,17 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.writeMem(this.getHL(), $temp$$); this.b = this.dec8(this.b); this.incHL(); - 0 != this.b ? (this.tstates -= 5, this.pc--) : this.pc++; - this.f = 128 == ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; + 0 !== this.b ? (this.tstates -= 5, this.pc--) : this.pc++; + this.f = 128 === ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; break; case 179: $temp$$ = this.readMem(this.getHL()); this.port.out(this.c, $temp$$); this.b = this.dec8(this.b); this.incHL(); - 0 != this.b ? (this.tstates -= 5, this.pc--) : this.pc++; + 0 !== this.b ? (this.tstates -= 5, this.pc--) : this.pc++; 255 < this.l + $temp$$ ? (this.f |= F_CARRY, this.f |= F_HALFCARRY) : (this.f &= ~F_CARRY, this.f &= ~F_HALFCARRY); - this.f = 0 != ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; + this.f = 0 !== ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; break; case 184: $temp$$ = this.readMem(this.getHL()); @@ -3664,15 +3664,15 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.decHL(); $temp$$ = $temp$$ + this.a & 255; this.f = this.f & 193 | (this.getBC() ? F_PARITY : 0) | $temp$$ & F_BIT3 | ($temp$$ & F_NEGATIVE ? 32 : 0); - 0 != this.getBC() ? (this.tstates -= 5, this.pc--) : this.pc++; + 0 !== this.getBC() ? (this.tstates -= 5, this.pc--) : this.pc++; break; case 185: $temp$$ = this.f & F_CARRY | F_NEGATIVE; this.cp_a(this.readMem(this.getHL())); this.decBC(); this.decHL(); - $temp$$ |= 0 == this.getBC() ? 0 : F_PARITY; - 0 != ($temp$$ & F_PARITY) && 0 == (this.f & F_ZERO) ? (this.tstates -= 5, this.pc--) : this.pc++; + $temp$$ |= 0 === this.getBC() ? 0 : F_PARITY; + 0 !== ($temp$$ & F_PARITY) && 0 === (this.f & F_ZERO) ? (this.tstates -= 5, this.pc--) : this.pc++; this.f = this.f & 248 | $temp$$; break; case 186: @@ -3680,487 +3680,428 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.writeMem(this.getHL(), $temp$$); this.b = this.dec8(this.b); this.decHL(); - 0 != this.b ? (this.tstates -= 5, this.pc--) : this.pc++; - this.f = 0 != ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; + 0 !== this.b ? (this.tstates -= 5, this.pc--) : this.pc++; + this.f = 0 !== ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; break; case 187: $temp$$ = this.readMem(this.getHL()); this.port.out(this.c, $temp$$); this.b = this.dec8(this.b); this.decHL(); - 0 != this.b ? (this.tstates -= 5, this.pc--) : this.pc++; + 0 !== this.b ? (this.tstates -= 5, this.pc--) : this.pc++; 255 < this.l + $temp$$ ? (this.f |= F_CARRY, this.f |= F_HALFCARRY) : (this.f &= ~F_CARRY, this.f &= ~F_HALFCARRY); - this.f = 0 != ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; + this.f = 0 !== ($temp$$ & 128) ? this.f | F_NEGATIVE : this.f & ~F_NEGATIVE; break; default: - JSSMS.Utils.console.log("Unimplemented ED Opcode: " + JSSMS.Utils.toHex($opcode$$)), this.pc++ + JSSMS.Utils.console.log("Unimplemented ED Opcode: " + JSSMS.Utils.toHex($opcode$$)), this.pc++; } }, generateDAATable:function $JSSMS$Z80$$generateDAATable$() { var $i$$, $c$$, $h$$, $n$$; - for($i$$ = 256;$i$$--;) { - for($c$$ = 0;1 >= $c$$;$c$$++) { - for($h$$ = 0;1 >= $h$$;$h$$++) { - for($n$$ = 0;1 >= $n$$;$n$$++) { - this.DAA_TABLE[$c$$ << 8 | $n$$ << 9 | $h$$ << 10 | $i$$] = this.getDAAResult($i$$, $c$$ | $n$$ << 1 | $h$$ << 4) + for ($i$$ = 256;$i$$--;) { + for ($c$$ = 0;1 >= $c$$;$c$$++) { + for ($h$$ = 0;1 >= $h$$;$h$$++) { + for ($n$$ = 0;1 >= $n$$;$n$$++) { + this.DAA_TABLE[$c$$ << 8 | $n$$ << 9 | $h$$ << 10 | $i$$] = this.getDAAResult($i$$, $c$$ | $n$$ << 1 | $h$$ << 4); } } } } - this.a = this.f = 0 + this.a = this.f = 0; }, getDAAResult:function $JSSMS$Z80$$getDAAResult$($value$$, $flags$$) { this.a = $value$$; this.f = $flags$$; var $a_copy$$ = this.a, $correction$$ = 0, $carry$$ = $flags$$ & F_CARRY, $carry_copy$$ = $carry$$; - if(0 != ($flags$$ & F_HALFCARRY) || 9 < ($a_copy$$ & 15)) { - $correction$$ |= 6 + if (0 !== ($flags$$ & F_HALFCARRY) || 9 < ($a_copy$$ & 15)) { + $correction$$ |= 6; } - if(1 == $carry$$ || 159 < $a_copy$$ || 143 < $a_copy$$ && 9 < ($a_copy$$ & 15)) { - $correction$$ |= 96, $carry_copy$$ = 1 + if (1 == $carry$$ || 159 < $a_copy$$ || 143 < $a_copy$$ && 9 < ($a_copy$$ & 15)) { + $correction$$ |= 96, $carry_copy$$ = 1; } 153 < $a_copy$$ && ($carry_copy$$ = 1); - 0 != ($flags$$ & F_NEGATIVE) ? this.sub_a($correction$$) : this.add_a($correction$$); + 0 !== ($flags$$ & F_NEGATIVE) ? this.sub_a($correction$$) : this.add_a($correction$$); $flags$$ = this.f & 254 | $carry_copy$$; $flags$$ = this.getParity(this.a) ? $flags$$ & 251 | F_PARITY : $flags$$ & 251; - return this.a | $flags$$ << 8 + return this.a | $flags$$ << 8; }, add_a:function $JSSMS$Z80$$add_a$($temp$$5_value$$) { $temp$$5_value$$ = this.a + $temp$$5_value$$ & 255; this.f = this.SZHVC_ADD_TABLE[this.a << 8 | $temp$$5_value$$]; - this.a = $temp$$5_value$$ + this.a = $temp$$5_value$$; }, adc_a:function $JSSMS$Z80$$adc_a$($temp$$6_value$$) { var $carry$$ = this.f & F_CARRY; $temp$$6_value$$ = this.a + $temp$$6_value$$ + $carry$$ & 255; this.f = this.SZHVC_ADD_TABLE[$carry$$ << 16 | this.a << 8 | $temp$$6_value$$]; - this.a = $temp$$6_value$$ + this.a = $temp$$6_value$$; }, sub_a:function $JSSMS$Z80$$sub_a$($temp$$7_value$$) { $temp$$7_value$$ = this.a - $temp$$7_value$$ & 255; this.f = this.SZHVC_SUB_TABLE[this.a << 8 | $temp$$7_value$$]; - this.a = $temp$$7_value$$ + this.a = $temp$$7_value$$; }, sbc_a:function $JSSMS$Z80$$sbc_a$($temp$$8_value$$) { var $carry$$ = this.f & F_CARRY; $temp$$8_value$$ = this.a - $temp$$8_value$$ - $carry$$ & 255; this.f = this.SZHVC_SUB_TABLE[$carry$$ << 16 | this.a << 8 | $temp$$8_value$$]; - this.a = $temp$$8_value$$ + this.a = $temp$$8_value$$; }, cp_a:function $JSSMS$Z80$$cp_a$($value$$) { - this.f = this.SZHVC_SUB_TABLE[this.a << 8 | this.a - $value$$ & 255] + this.f = this.SZHVC_SUB_TABLE[this.a << 8 | this.a - $value$$ & 255]; }, cpl_a:function $JSSMS$Z80$$cpl_a$() { this.a ^= 255; - this.f |= F_NEGATIVE | F_HALFCARRY + this.f = this.f | F_NEGATIVE | F_HALFCARRY; }, rra_a:function $JSSMS$Z80$$rra_a$() { var $carry$$ = this.a & 1; this.a = (this.a >> 1 | (this.f & F_CARRY) << 7) & 255; - this.f = this.f & 236 | $carry$$ + this.f = this.f & 236 | $carry$$; }, rla_a:function $JSSMS$Z80$$rla_a$() { var $carry$$ = this.a >> 7; this.a = (this.a << 1 | this.f & F_CARRY) & 255; - this.f = this.f & 236 | $carry$$ + this.f = this.f & 236 | $carry$$; }, rlca_a:function $JSSMS$Z80$$rlca_a$() { var $carry$$ = this.a >> 7; this.a = this.a << 1 & 255 | $carry$$; - this.f = this.f & 236 | $carry$$ + this.f = this.f & 236 | $carry$$; }, rrca_a:function $JSSMS$Z80$$rrca_a$() { var $carry$$ = this.a & 1; this.a = this.a >> 1 | $carry$$ << 7; - this.f = this.f & 236 | $carry$$ + this.f = this.f & 236 | $carry$$; }, getBC:function $JSSMS$Z80$$getBC$() { - return this.b << 8 | this.c + return this.b << 8 | this.c; }, getDE:function $JSSMS$Z80$$getDE$() { - return this.d << 8 | this.e + return this.d << 8 | this.e; }, getHL:function $JSSMS$Z80$$getHL$() { - return this.h << 8 | this.l + return this.h << 8 | this.l; }, getAF:function $JSSMS$Z80$$getAF$() { - return this.a << 8 | this.f + return this.a << 8 | this.f; }, getIXHIXL:function $JSSMS$Z80$$getIXHIXL$() { - return this.ixH << 8 | this.ixL + return this.ixH << 8 | this.ixL; }, getIYHIYL:function $JSSMS$Z80$$getIYHIYL$() { - return this.iyH << 8 | this.iyL + return this.iyH << 8 | this.iyL; }, setBC:function $JSSMS$Z80$$setBC$($value$$) { this.b = $value$$ >> 8; - this.c = $value$$ & 255 + this.c = $value$$ & 255; }, setDE:function $JSSMS$Z80$$setDE$($value$$) { this.d = $value$$ >> 8; - this.e = $value$$ & 255 + this.e = $value$$ & 255; }, setHL:function $JSSMS$Z80$$setHL$($value$$) { this.h = $value$$ >> 8; - this.l = $value$$ & 255 + this.l = $value$$ & 255; }, setAF:function $JSSMS$Z80$$setAF$($value$$) { this.a = $value$$ >> 8; - this.f = $value$$ & 255 + this.f = $value$$ & 255; }, setIXHIXL:function $JSSMS$Z80$$setIXHIXL$($value$$) { this.ixH = $value$$ >> 8; - this.ixL = $value$$ & 255 + this.ixL = $value$$ & 255; }, setIYHIYL:function $JSSMS$Z80$$setIYHIYL$($value$$) { this.iyH = $value$$ >> 8; - this.iyL = $value$$ & 255 + this.iyL = $value$$ & 255; }, incBC:function $JSSMS$Z80$$incBC$() { this.c = this.c + 1 & 255; - 0 == this.c && (this.b = this.b + 1 & 255) + 0 === this.c && (this.b = this.b + 1 & 255); }, incDE:function $JSSMS$Z80$$incDE$() { this.e = this.e + 1 & 255; - 0 == this.e && (this.d = this.d + 1 & 255) + 0 === this.e && (this.d = this.d + 1 & 255); }, incHL:function $JSSMS$Z80$$incHL$() { this.l = this.l + 1 & 255; - 0 == this.l && (this.h = this.h + 1 & 255) + 0 === this.l && (this.h = this.h + 1 & 255); }, incIXHIXL:function $JSSMS$Z80$$incIXHIXL$() { this.ixL = this.ixL + 1 & 255; - 0 == this.ixL && (this.ixH = this.ixH + 1 & 255) + 0 === this.ixL && (this.ixH = this.ixH + 1 & 255); }, incIYHIYL:function $JSSMS$Z80$$incIYHIYL$() { this.iyL = this.iyL + 1 & 255; - 0 == this.iyL && (this.iyH = this.iyH + 1 & 255) + 0 === this.iyL && (this.iyH = this.iyH + 1 & 255); }, decBC:function $JSSMS$Z80$$decBC$() { this.c = this.c - 1 & 255; - 255 == this.c && (this.b = this.b - 1 & 255) + 255 == this.c && (this.b = this.b - 1 & 255); }, decDE:function $JSSMS$Z80$$decDE$() { this.e = this.e - 1 & 255; - 255 == this.e && (this.d = this.d - 1 & 255) + 255 == this.e && (this.d = this.d - 1 & 255); }, decHL:function $JSSMS$Z80$$decHL$() { this.l = this.l - 1 & 255; - 255 == this.l && (this.h = this.h - 1 & 255) + 255 == this.l && (this.h = this.h - 1 & 255); }, decIXHIXL:function $JSSMS$Z80$$decIXHIXL$() { this.ixL = this.ixL - 1 & 255; - 255 == this.ixL && (this.ixH = this.ixH - 1 & 255) + 255 == this.ixL && (this.ixH = this.ixH - 1 & 255); }, decIYHIYL:function $JSSMS$Z80$$decIYHIYL$() { this.iyL = this.iyL - 1 & 255; - 255 == this.iyL && (this.iyH = this.iyH - 1 & 255) + 255 == this.iyL && (this.iyH = this.iyH - 1 & 255); }, inc8:function $JSSMS$Z80$$inc8$($value$$) { $value$$ = $value$$ + 1 & 255; this.f = this.f & F_CARRY | this.SZHV_INC_TABLE[$value$$]; - return $value$$ + return $value$$; }, dec8:function $JSSMS$Z80$$dec8$($value$$) { $value$$ = $value$$ - 1 & 255; this.f = this.f & F_CARRY | this.SZHV_DEC_TABLE[$value$$]; - return $value$$ + return $value$$; }, exAF:function $JSSMS$Z80$$exAF$() { var $temp$$ = this.a; this.a = this.a2; this.a2 = $temp$$; $temp$$ = this.f; this.f = this.f2; - this.f2 = $temp$$ + this.f2 = $temp$$; }, exBC:function $JSSMS$Z80$$exBC$() { var $temp$$ = this.b; this.b = this.b2; this.b2 = $temp$$; $temp$$ = this.c; this.c = this.c2; - this.c2 = $temp$$ + this.c2 = $temp$$; }, exDE:function $JSSMS$Z80$$exDE$() { var $temp$$ = this.d; this.d = this.d2; this.d2 = $temp$$; $temp$$ = this.e; this.e = this.e2; - this.e2 = $temp$$ + this.e2 = $temp$$; }, exHL:function $JSSMS$Z80$$exHL$() { var $temp$$ = this.h; this.h = this.h2; this.h2 = $temp$$; $temp$$ = this.l; this.l = this.l2; - this.l2 = $temp$$ + this.l2 = $temp$$; }, add16:function $JSSMS$Z80$$add16$($reg$$, $value$$) { var $result$$ = $reg$$ + $value$$; this.f = this.f & 196 | ($reg$$ ^ $result$$ ^ $value$$) >> 8 & 16 | $result$$ >> 16 & 1; - return $result$$ & 65535 + return $result$$ & 65535; }, adc16:function $JSSMS$Z80$$adc16$($value$$) { var $hl$$ = this.getHL(), $result$$ = $hl$$ + $value$$ + (this.f & F_CARRY); - this.f = ($hl$$ ^ $result$$ ^ $value$$) >> 8 & 16 | $result$$ >> 16 & 1 | $result$$ >> 8 & 128 | (0 != ($result$$ & 65535) ? 0 : 64) | (($value$$ ^ $hl$$ ^ 32768) & ($value$$ ^ $result$$) & 32768) >> 13; + this.f = ($hl$$ ^ $result$$ ^ $value$$) >> 8 & 16 | $result$$ >> 16 & 1 | $result$$ >> 8 & 128 | (0 !== ($result$$ & 65535) ? 0 : 64) | (($value$$ ^ $hl$$ ^ 32768) & ($value$$ ^ $result$$) & 32768) >> 13; this.h = $result$$ >> 8 & 255; - this.l = $result$$ & 255 + this.l = $result$$ & 255; }, sbc16:function $JSSMS$Z80$$sbc16$($value$$) { var $hl$$ = this.getHL(), $result$$ = $hl$$ - $value$$ - (this.f & F_CARRY); - this.f = ($hl$$ ^ $result$$ ^ $value$$) >> 8 & 16 | 2 | $result$$ >> 16 & 1 | $result$$ >> 8 & 128 | (0 != ($result$$ & 65535) ? 0 : 64) | (($value$$ ^ $hl$$) & ($hl$$ ^ $result$$) & 32768) >> 13; + this.f = ($hl$$ ^ $result$$ ^ $value$$) >> 8 & 16 | 2 | $result$$ >> 16 & 1 | $result$$ >> 8 & 128 | (0 !== ($result$$ & 65535) ? 0 : 64) | (($value$$ ^ $hl$$) & ($hl$$ ^ $result$$) & 32768) >> 13; this.h = $result$$ >> 8 & 255; - this.l = $result$$ & 255 + this.l = $result$$ & 255; }, incR:function $JSSMS$Z80$$incR$() { - this.r = this.r & 128 | this.r + 1 & 127 + this.r = this.r & 128 | this.r + 1 & 127; }, generateFlagTables:function $JSSMS$Z80$$generateFlagTables$() { var $i$$, $padc_sf$$, $psub_zf$$, $psbc_yf$$, $val$$, $oldval_pf$$, $newval$$; - for($i$$ = 0;256 > $i$$;$i$$++) { - $padc_sf$$ = 0 != ($i$$ & 128) ? F_SIGN : 0, $psub_zf$$ = 0 == $i$$ ? F_ZERO : 0, $psbc_yf$$ = $i$$ & 32, $val$$ = $i$$ & 8, $oldval_pf$$ = this.getParity($i$$) ? F_PARITY : 0, this.SZ_TABLE[$i$$] = $padc_sf$$ | $psub_zf$$ | $psbc_yf$$ | $val$$, this.SZP_TABLE[$i$$] = $padc_sf$$ | $psub_zf$$ | $psbc_yf$$ | $val$$ | $oldval_pf$$, this.SZHV_INC_TABLE[$i$$] = $padc_sf$$ | $psub_zf$$ | $psbc_yf$$ | $val$$, this.SZHV_INC_TABLE[$i$$] |= 128 == $i$$ ? F_OVERFLOW : 0, this.SZHV_INC_TABLE[$i$$] |= 0 == - ($i$$ & 15) ? F_HALFCARRY : 0, this.SZHV_DEC_TABLE[$i$$] = $padc_sf$$ | $psub_zf$$ | $psbc_yf$$ | $val$$ | F_NEGATIVE, this.SZHV_DEC_TABLE[$i$$] |= 127 == $i$$ ? F_OVERFLOW : 0, this.SZHV_DEC_TABLE[$i$$] |= 15 == ($i$$ & 15) ? F_HALFCARRY : 0, this.SZ_BIT_TABLE[$i$$] = 0 != $i$$ ? $i$$ & 128 : F_ZERO | F_PARITY, this.SZ_BIT_TABLE[$i$$] |= $psbc_yf$$ | $val$$ | F_HALFCARRY + for ($i$$ = 0;256 > $i$$;$i$$++) { + $padc_sf$$ = 0 !== ($i$$ & 128) ? F_SIGN : 0, $psub_zf$$ = 0 === $i$$ ? F_ZERO : 0, $psbc_yf$$ = $i$$ & 32, $val$$ = $i$$ & 8, $oldval_pf$$ = this.getParity($i$$) ? F_PARITY : 0, this.SZ_TABLE[$i$$] = $padc_sf$$ | $psub_zf$$ | $psbc_yf$$ | $val$$, this.SZP_TABLE[$i$$] = $padc_sf$$ | $psub_zf$$ | $psbc_yf$$ | $val$$ | $oldval_pf$$, this.SZHV_INC_TABLE[$i$$] = $padc_sf$$ | $psub_zf$$ | $psbc_yf$$ | $val$$, this.SZHV_INC_TABLE[$i$$] |= 128 === $i$$ ? F_OVERFLOW : 0, this.SZHV_INC_TABLE[$i$$] |= + 0 === ($i$$ & 15) ? F_HALFCARRY : 0, this.SZHV_DEC_TABLE[$i$$] = $padc_sf$$ | $psub_zf$$ | $psbc_yf$$ | $val$$ | F_NEGATIVE, this.SZHV_DEC_TABLE[$i$$] |= 127 === $i$$ ? F_OVERFLOW : 0, this.SZHV_DEC_TABLE[$i$$] |= 15 === ($i$$ & 15) ? F_HALFCARRY : 0, this.SZ_BIT_TABLE[$i$$] = 0 !== $i$$ ? $i$$ & 128 : F_ZERO | F_PARITY, this.SZ_BIT_TABLE[$i$$] = this.SZ_BIT_TABLE[$i$$] | $psbc_yf$$ | $val$$ | F_HALFCARRY; } $i$$ = 0; $padc_sf$$ = 65536; $psub_zf$$ = 0; $psbc_yf$$ = 65536; - for($oldval_pf$$ = 0;256 > $oldval_pf$$;$oldval_pf$$++) { - for($newval$$ = 0;256 > $newval$$;$newval$$++) { - $val$$ = $newval$$ - $oldval_pf$$, this.SZHVC_ADD_TABLE[$i$$] = 0 != $newval$$ ? 0 != ($newval$$ & 128) ? F_SIGN : 0 : F_ZERO, this.SZHVC_ADD_TABLE[$i$$] |= $newval$$ & (F_BIT5 | F_BIT3), ($newval$$ & 15) < ($oldval_pf$$ & 15) && (this.SZHVC_ADD_TABLE[$i$$] |= F_HALFCARRY), $newval$$ < $oldval_pf$$ && (this.SZHVC_ADD_TABLE[$i$$] |= F_CARRY), 0 != (($val$$ ^ $oldval_pf$$ ^ 128) & ($val$$ ^ $newval$$) & 128) && (this.SZHVC_ADD_TABLE[$i$$] |= F_OVERFLOW), $i$$++, $val$$ = $newval$$ - $oldval_pf$$ - - 1, this.SZHVC_ADD_TABLE[$padc_sf$$] = 0 != $newval$$ ? 0 != ($newval$$ & 128) ? F_SIGN : 0 : F_ZERO, this.SZHVC_ADD_TABLE[$padc_sf$$] |= $newval$$ & (F_BIT5 | F_BIT3), ($newval$$ & 15) <= ($oldval_pf$$ & 15) && (this.SZHVC_ADD_TABLE[$padc_sf$$] |= F_HALFCARRY), $newval$$ <= $oldval_pf$$ && (this.SZHVC_ADD_TABLE[$padc_sf$$] |= F_CARRY), 0 != (($val$$ ^ $oldval_pf$$ ^ 128) & ($val$$ ^ $newval$$) & 128) && (this.SZHVC_ADD_TABLE[$padc_sf$$] |= F_OVERFLOW), $padc_sf$$++, $val$$ = $oldval_pf$$ - - $newval$$, this.SZHVC_SUB_TABLE[$psub_zf$$] = 0 != $newval$$ ? 0 != ($newval$$ & 128) ? F_NEGATIVE | F_SIGN : F_NEGATIVE : F_NEGATIVE | F_ZERO, this.SZHVC_SUB_TABLE[$psub_zf$$] |= $newval$$ & (F_BIT5 | F_BIT3), ($newval$$ & 15) > ($oldval_pf$$ & 15) && (this.SZHVC_SUB_TABLE[$psub_zf$$] |= F_HALFCARRY), $newval$$ > $oldval_pf$$ && (this.SZHVC_SUB_TABLE[$psub_zf$$] |= F_CARRY), 0 != (($val$$ ^ $oldval_pf$$) & ($oldval_pf$$ ^ $newval$$) & 128) && (this.SZHVC_SUB_TABLE[$psub_zf$$] |= F_OVERFLOW), - $psub_zf$$++, $val$$ = $oldval_pf$$ - $newval$$ - 1, this.SZHVC_SUB_TABLE[$psbc_yf$$] = 0 != $newval$$ ? 0 != ($newval$$ & 128) ? F_NEGATIVE | F_SIGN : F_NEGATIVE : F_NEGATIVE | F_ZERO, this.SZHVC_SUB_TABLE[$psbc_yf$$] |= $newval$$ & (F_BIT5 | F_BIT3), ($newval$$ & 15) >= ($oldval_pf$$ & 15) && (this.SZHVC_SUB_TABLE[$psbc_yf$$] |= F_HALFCARRY), $newval$$ >= $oldval_pf$$ && (this.SZHVC_SUB_TABLE[$psbc_yf$$] |= F_CARRY), 0 != (($val$$ ^ $oldval_pf$$) & ($oldval_pf$$ ^ $newval$$) & 128) && (this.SZHVC_SUB_TABLE[$psbc_yf$$] |= - F_OVERFLOW), $psbc_yf$$++ + for ($oldval_pf$$ = 0;256 > $oldval_pf$$;$oldval_pf$$++) { + for ($newval$$ = 0;256 > $newval$$;$newval$$++) { + $val$$ = $newval$$ - $oldval_pf$$, this.SZHVC_ADD_TABLE[$i$$] = 0 !== $newval$$ ? 0 !== ($newval$$ & 128) ? F_SIGN : 0 : F_ZERO, this.SZHVC_ADD_TABLE[$i$$] |= $newval$$ & (F_BIT5 | F_BIT3), ($newval$$ & 15) < ($oldval_pf$$ & 15) && (this.SZHVC_ADD_TABLE[$i$$] |= F_HALFCARRY), $newval$$ < $oldval_pf$$ && (this.SZHVC_ADD_TABLE[$i$$] |= F_CARRY), 0 !== (($val$$ ^ $oldval_pf$$ ^ 128) & ($val$$ ^ $newval$$) & 128) && (this.SZHVC_ADD_TABLE[$i$$] |= F_OVERFLOW), $i$$++, $val$$ = $newval$$ - $oldval_pf$$ - + 1, this.SZHVC_ADD_TABLE[$padc_sf$$] = 0 !== $newval$$ ? 0 !== ($newval$$ & 128) ? F_SIGN : 0 : F_ZERO, this.SZHVC_ADD_TABLE[$padc_sf$$] |= $newval$$ & (F_BIT5 | F_BIT3), ($newval$$ & 15) <= ($oldval_pf$$ & 15) && (this.SZHVC_ADD_TABLE[$padc_sf$$] |= F_HALFCARRY), $newval$$ <= $oldval_pf$$ && (this.SZHVC_ADD_TABLE[$padc_sf$$] |= F_CARRY), 0 !== (($val$$ ^ $oldval_pf$$ ^ 128) & ($val$$ ^ $newval$$) & 128) && (this.SZHVC_ADD_TABLE[$padc_sf$$] |= F_OVERFLOW), $padc_sf$$++, $val$$ = $oldval_pf$$ - + $newval$$, this.SZHVC_SUB_TABLE[$psub_zf$$] = 0 !== $newval$$ ? 0 !== ($newval$$ & 128) ? F_NEGATIVE | F_SIGN : F_NEGATIVE : F_NEGATIVE | F_ZERO, this.SZHVC_SUB_TABLE[$psub_zf$$] |= $newval$$ & (F_BIT5 | F_BIT3), ($newval$$ & 15) > ($oldval_pf$$ & 15) && (this.SZHVC_SUB_TABLE[$psub_zf$$] |= F_HALFCARRY), $newval$$ > $oldval_pf$$ && (this.SZHVC_SUB_TABLE[$psub_zf$$] |= F_CARRY), 0 !== (($val$$ ^ $oldval_pf$$) & ($oldval_pf$$ ^ $newval$$) & 128) && (this.SZHVC_SUB_TABLE[$psub_zf$$] |= F_OVERFLOW), + $psub_zf$$++, $val$$ = $oldval_pf$$ - $newval$$ - 1, this.SZHVC_SUB_TABLE[$psbc_yf$$] = 0 !== $newval$$ ? 0 !== ($newval$$ & 128) ? F_NEGATIVE | F_SIGN : F_NEGATIVE : F_NEGATIVE | F_ZERO, this.SZHVC_SUB_TABLE[$psbc_yf$$] |= $newval$$ & (F_BIT5 | F_BIT3), ($newval$$ & 15) >= ($oldval_pf$$ & 15) && (this.SZHVC_SUB_TABLE[$psbc_yf$$] |= F_HALFCARRY), $newval$$ >= $oldval_pf$$ && (this.SZHVC_SUB_TABLE[$psbc_yf$$] |= F_CARRY), 0 !== (($val$$ ^ $oldval_pf$$) & ($oldval_pf$$ ^ $newval$$) & 128) && + (this.SZHVC_SUB_TABLE[$psbc_yf$$] |= F_OVERFLOW), $psbc_yf$$++; } } }, getParity:function $JSSMS$Z80$$getParity$($value$$) { var $parity$$ = !0, $j$$; - for($j$$ = 0;8 > $j$$;$j$$++) { - 0 != ($value$$ & 1 << $j$$) && ($parity$$ = !$parity$$) + for ($j$$ = 0;8 > $j$$;$j$$++) { + 0 !== ($value$$ & 1 << $j$$) && ($parity$$ = !$parity$$); } - return $parity$$ + return $parity$$; }, generateMemory:function $JSSMS$Z80$$generateMemory$() { - if(SUPPORT_DATAVIEW) { - for(var $i$$ = 0;8192 > $i$$;$i$$++) { - this.memWriteMap.setUint8($i$$, 0) + if (SUPPORT_DATAVIEW) { + for (var $i$$ = 0;8192 > $i$$;$i$$++) { + this.memWriteMap.setUint8($i$$, 0); } - }else { - for($i$$ = 0;8192 > $i$$;$i$$++) { - this.memWriteMap[$i$$] = 0 + } else { + for ($i$$ = 0;8192 > $i$$;$i$$++) { + this.memWriteMap[$i$$] = 0; } } - if(SUPPORT_DATAVIEW) { - for($i$$ = 0;32768 > $i$$;$i$$++) { - this.sram.setUint8($i$$, 0) + if (SUPPORT_DATAVIEW) { + for ($i$$ = 0;32768 > $i$$;$i$$++) { + this.sram.setUint8($i$$, 0); } - }else { - for($i$$ = 0;32768 > $i$$;$i$$++) { - this.sram[$i$$] = 0 + } else { + for ($i$$ = 0;32768 > $i$$;$i$$++) { + this.sram[$i$$] = 0; } } this.useSRAM = !1; this.number_of_pages = 2; - for($i$$ = 0;4 > $i$$;$i$$++) { - this.frameReg[$i$$] = $i$$ % 3 + for ($i$$ = 0;4 > $i$$;$i$$++) { + this.frameReg[$i$$] = $i$$ % 3; } }, resetMemory:function $JSSMS$Z80$$resetMemory$($pages$$) { var $i$$ = 0; $pages$$ && (this.rom = $pages$$); - if(this.rom.length) { + if (this.rom.length) { this.number_of_pages = this.rom.length; this.romPageMask = this.number_of_pages - 1; - for($i$$ = 0;3 > $i$$;$i$$++) { - this.frameReg[$i$$] = $i$$ % this.number_of_pages + for ($i$$ = 0;3 > $i$$;$i$$++) { + this.frameReg[$i$$] = $i$$ % this.number_of_pages; } this.frameReg[3] = 0; - if(ENABLE_COMPILER) { + if (ENABLE_COMPILER) { this.branches = Array(this.number_of_pages); - for($i$$ = 0;$i$$ < this.number_of_pages;$i$$++) { - this.branches[$i$$] = Object.create(null) + for ($i$$ = 0;$i$$ < this.number_of_pages;$i$$++) { + this.branches[$i$$] = Object.create(null); } - this.recompiler.setRom(this.rom) + this.recompiler.setRom(this.rom); } - }else { - this.romPageMask = this.number_of_pages = 0 + } else { + this.romPageMask = this.number_of_pages = 0; } }, d_:function $JSSMS$Z80$$d_$() { - return this.readMem(this.pc) + return this.readMem(this.pc); }, writeMem:function() { - return SUPPORT_DATAVIEW ? function($address$$, $value$$) { - if(65535 >= $address$$) { - this.memWriteMap.setUint8($address$$ & 8191, $value$$), 65532 == $address$$ ? this.frameReg[3] = $value$$ : 65533 == $address$$ ? this.frameReg[0] = $value$$ & this.romPageMask : 65534 == $address$$ ? this.frameReg[1] = $value$$ & this.romPageMask : 65535 == $address$$ && (this.frameReg[2] = $value$$ & this.romPageMask) - }else { - if(JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)), DEBUG) { - debugger - } - } - } : function($address$$, $value$$) { - if(65535 >= $address$$) { - this.memWriteMap[$address$$ & 8191] = $value$$, 65532 == $address$$ ? this.frameReg[3] = $value$$ : 65533 == $address$$ ? this.frameReg[0] = $value$$ & this.romPageMask : 65534 == $address$$ ? this.frameReg[1] = $value$$ & this.romPageMask : 65535 == $address$$ && (this.frameReg[2] = $value$$ & this.romPageMask) - }else { - if(JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)), DEBUG) { - debugger - } - } - } + return SUPPORT_DATAVIEW ? function writeMem($address$$, $value$$) { + 65535 >= $address$$ ? (this.memWriteMap.setUint8($address$$ & 8191, $value$$), 65532 === $address$$ ? this.frameReg[3] = $value$$ : 65533 === $address$$ ? this.frameReg[0] = $value$$ & this.romPageMask : 65534 === $address$$ ? this.frameReg[1] = $value$$ & this.romPageMask : 65535 === $address$$ && (this.frameReg[2] = $value$$ & this.romPageMask)) : JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)); + } : function writeMem($address$$, $value$$) { + 65535 >= $address$$ ? (this.memWriteMap[$address$$ & 8191] = $value$$, 65532 === $address$$ ? this.frameReg[3] = $value$$ : 65533 === $address$$ ? this.frameReg[0] = $value$$ & this.romPageMask : 65534 === $address$$ ? this.frameReg[1] = $value$$ & this.romPageMask : 65535 === $address$$ && (this.frameReg[2] = $value$$ & this.romPageMask)) : JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)); + }; }(), writeMemWord:function() { - return SUPPORT_DATAVIEW ? function($address$$, $value$$) { - if(65532 > $address$$) { - this.memWriteMap.setUint16($address$$ & 8191, $value$$, LITTLE_ENDIAN) - }else { - if(65532 == $address$$) { - this.frameReg[3] = $value$$ & 255, this.frameReg[0] = $value$$ >> 8 & this.romPageMask - }else { - if(65533 == $address$$) { - this.frameReg[0] = $value$$ & 255 & this.romPageMask, this.frameReg[1] = $value$$ >> 8 & this.romPageMask - }else { - if(65534 == $address$$) { - this.frameReg[1] = $value$$ & 255 & this.romPageMask, this.frameReg[2] = $value$$ >> 8 & this.romPageMask - }else { - if(JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)), DEBUG) { - debugger - } - } - } - } - } - } : function($address$$, $value$$) { - if(65532 > $address$$) { - $address$$ &= 8191, this.memWriteMap[$address$$++] = $value$$ & 255, this.memWriteMap[$address$$] = $value$$ >> 8 - }else { - if(65532 == $address$$) { - this.frameReg[3] = $value$$ & 255, this.frameReg[0] = $value$$ >> 8 & this.romPageMask - }else { - if(65533 == $address$$) { - this.frameReg[0] = $value$$ & 255 & this.romPageMask, this.frameReg[1] = $value$$ >> 8 & this.romPageMask - }else { - if(65534 == $address$$) { - this.frameReg[1] = $value$$ & 255 & this.romPageMask, this.frameReg[2] = $value$$ >> 8 & this.romPageMask - }else { - if(JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)), DEBUG) { - debugger - } - } - } - } - } - } + return SUPPORT_DATAVIEW ? function writeMemWord($address$$, $value$$) { + 65532 > $address$$ ? this.memWriteMap.setUint16($address$$ & 8191, $value$$, LITTLE_ENDIAN) : 65532 === $address$$ ? (this.frameReg[3] = $value$$ & 255, this.frameReg[0] = $value$$ >> 8 & this.romPageMask) : 65533 === $address$$ ? (this.frameReg[0] = $value$$ & 255 & this.romPageMask, this.frameReg[1] = $value$$ >> 8 & this.romPageMask) : 65534 === $address$$ ? (this.frameReg[1] = $value$$ & 255 & this.romPageMask, this.frameReg[2] = $value$$ >> 8 & this.romPageMask) : JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)); + } : function writeMemWord($address$$, $value$$) { + 65532 > $address$$ ? ($address$$ &= 8191, this.memWriteMap[$address$$++] = $value$$ & 255, this.memWriteMap[$address$$] = $value$$ >> 8) : 65532 === $address$$ ? (this.frameReg[3] = $value$$ & 255, this.frameReg[0] = $value$$ >> 8 & this.romPageMask) : 65533 === $address$$ ? (this.frameReg[0] = $value$$ & 255 & this.romPageMask, this.frameReg[1] = $value$$ >> 8 & this.romPageMask) : 65534 === $address$$ ? (this.frameReg[1] = $value$$ & 255 & this.romPageMask, this.frameReg[2] = $value$$ >> 8 & + this.romPageMask) : JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)); + }; }(), readMem:function() { - return SUPPORT_DATAVIEW ? function($address$$) { - if(1024 > $address$$) { - return this.rom[0].getUint8($address$$) + return SUPPORT_DATAVIEW ? function readMem($address$$) { + if (1024 > $address$$) { + return this.rom[0].getUint8($address$$); } - if(16384 > $address$$) { - return this.rom[this.frameReg[0]].getUint8($address$$) + if (16384 > $address$$) { + return this.rom[this.frameReg[0]].getUint8($address$$); } - if(32768 > $address$$) { - return this.rom[this.frameReg[1]].getUint8($address$$ - 16384) + if (32768 > $address$$) { + return this.rom[this.frameReg[1]].getUint8($address$$ - 16384); } - if(49152 > $address$$) { - return 8 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram.getUint8($address$$ - 32768)) : 12 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram.getUint8($address$$ - 16384)) : this.rom[this.frameReg[2]].getUint8($address$$ - 32768) + if (49152 > $address$$) { + return 8 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram.getUint8($address$$ - 32768)) : 12 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram.getUint8($address$$ - 16384)) : this.rom[this.frameReg[2]].getUint8($address$$ - 32768); } - if(57344 > $address$$) { - return this.memWriteMap.getUint8($address$$ - 49152) + if (57344 > $address$$) { + return this.memWriteMap.getUint8($address$$ - 49152); } - if(65532 > $address$$) { - return this.memWriteMap.getUint8($address$$ - 57344) + if (65532 > $address$$) { + return this.memWriteMap.getUint8($address$$ - 57344); } - if(65532 == $address$$) { - return this.frameReg[3] + if (65532 === $address$$) { + return this.frameReg[3]; } - if(65533 == $address$$) { - return this.frameReg[0] + if (65533 === $address$$) { + return this.frameReg[0]; } - if(65534 == $address$$) { - return this.frameReg[1] + if (65534 === $address$$) { + return this.frameReg[1]; } - if(65535 == $address$$) { - return this.frameReg[2] + if (65535 === $address$$) { + return this.frameReg[2]; } JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)); - if(DEBUG) { - debugger + return 0; + } : function readMem($address$$) { + if (1024 > $address$$) { + return this.rom[0][$address$$]; } - return 0 - } : function($address$$) { - if(1024 > $address$$) { - return this.rom[0][$address$$] + if (16384 > $address$$) { + return this.rom[this.frameReg[0]][$address$$]; } - if(16384 > $address$$) { - return this.rom[this.frameReg[0]][$address$$] + if (32768 > $address$$) { + return this.rom[this.frameReg[1]][$address$$ - 16384]; } - if(32768 > $address$$) { - return this.rom[this.frameReg[1]][$address$$ - 16384] + if (49152 > $address$$) { + return 8 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$ - 32768]) : 12 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$ - 16384]) : this.rom[this.frameReg[2]][$address$$ - 32768]; } - if(49152 > $address$$) { - return 8 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$ - 32768]) : 12 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$ - 16384]) : this.rom[this.frameReg[2]][$address$$ - 32768] + if (57344 > $address$$) { + return this.memWriteMap[$address$$ - 49152]; } - if(57344 > $address$$) { - return this.memWriteMap[$address$$ - 49152] + if (65532 > $address$$) { + return this.memWriteMap[$address$$ - 57344]; } - if(65532 > $address$$) { - return this.memWriteMap[$address$$ - 57344] + if (65532 === $address$$) { + return this.frameReg[3]; } - if(65532 == $address$$) { - return this.frameReg[3] + if (65533 === $address$$) { + return this.frameReg[0]; } - if(65533 == $address$$) { - return this.frameReg[0] + if (65534 === $address$$) { + return this.frameReg[1]; } - if(65534 == $address$$) { - return this.frameReg[1] - } - if(65535 == $address$$) { - return this.frameReg[2] + if (65535 === $address$$) { + return this.frameReg[2]; } JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)); - if(DEBUG) { - debugger - } - return 0 - } + return 0; + }; }(), readMemWord:function() { - return SUPPORT_DATAVIEW ? function($address$$) { - if(1024 > $address$$) { - return this.rom[0].getUint16($address$$, LITTLE_ENDIAN) + return SUPPORT_DATAVIEW ? function readMemWord($address$$) { + if (1024 > $address$$) { + return this.rom[0].getUint16($address$$, LITTLE_ENDIAN); } - if(16384 > $address$$) { - return this.rom[this.frameReg[0]].getUint16($address$$, LITTLE_ENDIAN) + if (16384 > $address$$) { + return this.rom[this.frameReg[0]].getUint16($address$$, LITTLE_ENDIAN); } - if(32768 > $address$$) { - return this.rom[this.frameReg[1]].getUint16($address$$ - 16384, LITTLE_ENDIAN) + if (32768 > $address$$) { + return this.rom[this.frameReg[1]].getUint16($address$$ - 16384, LITTLE_ENDIAN); } - if(49152 > $address$$) { - return 8 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$ - 32768]) : 12 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$ - 16384]) : this.rom[this.frameReg[2]].getUint16($address$$ - 32768, LITTLE_ENDIAN) + if (49152 > $address$$) { + return 8 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$ - 32768]) : 12 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$ - 16384]) : this.rom[this.frameReg[2]].getUint16($address$$ - 32768, LITTLE_ENDIAN); } - if(57344 > $address$$) { - return this.memWriteMap.getUint16($address$$ - 49152, LITTLE_ENDIAN) + if (57344 > $address$$) { + return this.memWriteMap.getUint16($address$$ - 49152, LITTLE_ENDIAN); } - if(65532 > $address$$) { - return this.memWriteMap.getUint16($address$$ - 57344, LITTLE_ENDIAN) + if (65532 > $address$$) { + return this.memWriteMap.getUint16($address$$ - 57344, LITTLE_ENDIAN); } - if(65532 == $address$$) { - return this.frameReg[3] + if (65532 === $address$$) { + return this.frameReg[3]; } - if(65533 == $address$$) { - return this.frameReg[0] + if (65533 === $address$$) { + return this.frameReg[0]; } - if(65534 == $address$$) { - return this.frameReg[1] + if (65534 === $address$$) { + return this.frameReg[1]; } - if(65535 == $address$$) { - return this.frameReg[2] + if (65535 === $address$$) { + return this.frameReg[2]; } JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)); - if(DEBUG) { - debugger - } - return 0 - } : function($address$$) { - if(1024 > $address$$) { - return this.rom[0][$address$$++] | this.rom[0][$address$$] << 8 + return 0; + } : function readMemWord($address$$) { + if (1024 > $address$$) { + return this.rom[0][$address$$++] | this.rom[0][$address$$] << 8; } - if(16384 > $address$$) { - return this.rom[this.frameReg[0]][$address$$++] | this.rom[this.frameReg[0]][$address$$] << 8 + if (16384 > $address$$) { + return this.rom[this.frameReg[0]][$address$$++] | this.rom[this.frameReg[0]][$address$$] << 8; } - if(32768 > $address$$) { - return this.rom[this.frameReg[1]][$address$$++ - 16384] | this.rom[this.frameReg[1]][$address$$ - 16384] << 8 + if (32768 > $address$$) { + return this.rom[this.frameReg[1]][$address$$++ - 16384] | this.rom[this.frameReg[1]][$address$$ - 16384] << 8; } - if(49152 > $address$$) { - return 8 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$++ - 32768] | this.sram[$address$$ - 32768] << 8) : 12 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$++ - 16384] | this.sram[$address$$ - 16384] << 8) : this.rom[this.frameReg[2]][$address$$++ - 32768] | this.rom[this.frameReg[2]][$address$$ - 32768] << 8 + if (49152 > $address$$) { + return 8 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$++ - 32768] | this.sram[$address$$ - 32768] << 8) : 12 == (this.frameReg[3] & 12) ? (this.useSRAM = !0, this.sram[$address$$++ - 16384] | this.sram[$address$$ - 16384] << 8) : this.rom[this.frameReg[2]][$address$$++ - 32768] | this.rom[this.frameReg[2]][$address$$ - 32768] << 8; } - if(57344 > $address$$) { - return this.memWriteMap[$address$$++ - 49152] | this.memWriteMap[$address$$ - 49152] << 8 + if (57344 > $address$$) { + return this.memWriteMap[$address$$++ - 49152] | this.memWriteMap[$address$$ - 49152] << 8; } - if(65532 > $address$$) { - return this.memWriteMap[$address$$++ - 57344] | this.memWriteMap[$address$$ - 57344] << 8 + if (65532 > $address$$) { + return this.memWriteMap[$address$$++ - 57344] | this.memWriteMap[$address$$ - 57344] << 8; } - if(65532 == $address$$) { - return this.frameReg[3] + if (65532 === $address$$) { + return this.frameReg[3]; } - if(65533 == $address$$) { - return this.frameReg[0] + if (65533 === $address$$) { + return this.frameReg[0]; } - if(65534 == $address$$) { - return this.frameReg[1] + if (65534 === $address$$) { + return this.frameReg[1]; } - if(65535 == $address$$) { - return this.frameReg[2] + if (65535 === $address$$) { + return this.frameReg[2]; } JSSMS.Utils.console.error(JSSMS.Utils.toHex($address$$)); - if(DEBUG) { - debugger - } - return 0 - } + return 0; + }; }(), hasUsedSRAM:function $JSSMS$Z80$$hasUsedSRAM$() { - return this.useSRAM + return this.useSRAM; }, setSRAM:function $JSSMS$Z80$$setSRAM$($bytes$$) { var $length$$ = $bytes$$.length / PAGE_SIZE, $i$$; - for($i$$ = 0;$i$$ < $length$$;$i$$++) { - JSSMS.Utils.copyArrayElements($bytes$$, $i$$ * PAGE_SIZE, this.sram[$i$$], 0, PAGE_SIZE) + for ($i$$ = 0;$i$$ < $length$$;$i$$++) { + JSSMS.Utils.copyArrayElements($bytes$$, $i$$ * PAGE_SIZE, this.sram[$i$$], 0, PAGE_SIZE); } }, setStateMem:function $JSSMS$Z80$$setStateMem$($state$$) { - this.frameReg = $state$$ + this.frameReg = $state$$; }, getState:function $JSSMS$Z80$$getState$() { var $state$$ = Array(8); $state$$[0] = this.pc | this.sp << 16; @@ -4177,17 +4118,17 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.exBC(); this.exDE(); this.exHL(); - return $state$$ + return $state$$; }, setState:function $JSSMS$Z80$$setState$($state$$) { var $temp$$ = $state$$[0]; this.pc = $temp$$ & 65535; this.sp = $temp$$ >> 16 & 65535; $temp$$ = $state$$[1]; - this.iff1 = 0 != ($temp$$ & 1); - this.iff2 = 0 != ($temp$$ & 2); - this.halt = 0 != ($temp$$ & 4); - this.EI_inst = 0 != ($temp$$ & 8); - this.interruptLine = 0 != ($temp$$ & 16); + this.iff1 = 0 !== ($temp$$ & 1); + this.iff2 = 0 !== ($temp$$ & 2); + this.halt = 0 !== ($temp$$ & 4); + this.EI_inst = 0 !== ($temp$$ & 8); + this.interruptLine = 0 !== ($temp$$ & 16); $temp$$ = $state$$[2]; this.a = $temp$$ & 255; this.a2 = $temp$$ >> 8 & 255; @@ -4215,7 +4156,7 @@ JSSMS.Z80.prototype = {reset:function $JSSMS$Z80$$reset$() { this.interruptVector = $temp$$ >> 24 & 255; this.exBC(); this.exDE(); - this.exHL() + this.exHL(); }}; JSSMS.Debugger = function $JSSMS$Debugger$() { }; @@ -4223,31 +4164,33 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger this.instructions = []; this.main.ui.updateStatus("Parsing instructions..."); this.parseInstructions(); - this.main.ui.updateStatus("Instructions parsed") + this.main.ui.updateStatus("Instructions parsed"); }, parseInstructions:function $JSSMS$Debugger$$parseInstructions$() { JSSMS.Utils.console.time("Instructions parsing"); var $romSize$$ = PAGE_SIZE * this.rom.length, $instruction$$, $currentAddress$$, $i$$ = 0, $addresses$$ = [], $entryPoints$$ = [0, 56, 102]; - for($entryPoints$$.forEach(function($entryPoint$$) { - $addresses$$.push($entryPoint$$) + for ($entryPoints$$.forEach(function($entryPoint$$) { + $addresses$$.push($entryPoint$$); });$addresses$$.length;) { - $currentAddress$$ = $addresses$$.shift(), this.instructions[$currentAddress$$] || ($currentAddress$$ >= $romSize$$ || 65 <= $currentAddress$$ >> 10 ? JSSMS.Utils.console.log("Invalid address", JSSMS.Utils.toHex($currentAddress$$)) : ($instruction$$ = this.disassemble($currentAddress$$), this.instructions[$currentAddress$$] = $instruction$$, null != $instruction$$.nextAddress && $addresses$$.push($instruction$$.nextAddress), null != $instruction$$.target && $addresses$$.push($instruction$$.target))) + $currentAddress$$ = $addresses$$.shift(), this.instructions[$currentAddress$$] || ($currentAddress$$ >= $romSize$$ || 65 <= $currentAddress$$ >> 10 ? JSSMS.Utils.console.log("Invalid address", JSSMS.Utils.toHex($currentAddress$$)) : ($instruction$$ = this.disassemble($currentAddress$$), this.instructions[$currentAddress$$] = $instruction$$, null !== $instruction$$.nextAddress && $addresses$$.push($instruction$$.nextAddress), null !== $instruction$$.target && $addresses$$.push($instruction$$.target))) + ; } - for($entryPoints$$.forEach(function($entryPoint$$) { - this.instructions[$entryPoint$$] && (this.instructions[$entryPoint$$].isJumpTarget = !0) + for ($entryPoints$$.forEach(function($entryPoint$$) { + this.instructions[$entryPoint$$] && (this.instructions[$entryPoint$$].isJumpTarget = !0); }, this);$i$$ < $romSize$$;$i$$++) { - this.instructions[$i$$] && (null != this.instructions[$i$$].nextAddress && this.instructions[this.instructions[$i$$].nextAddress] && this.instructions[this.instructions[$i$$].nextAddress].jumpTargetNb++, null != this.instructions[$i$$].target && (this.instructions[this.instructions[$i$$].target] ? (this.instructions[this.instructions[$i$$].target].isJumpTarget = !0, this.instructions[this.instructions[$i$$].target].jumpTargetNb++) : JSSMS.Utils.console.log("Invalid target address", JSSMS.Utils.toHex(this.instructions[$i$$].target)))) + this.instructions[$i$$] && (null !== this.instructions[$i$$].nextAddress && this.instructions[this.instructions[$i$$].nextAddress] && this.instructions[this.instructions[$i$$].nextAddress].jumpTargetNb++, null !== this.instructions[$i$$].target && (this.instructions[this.instructions[$i$$].target] ? (this.instructions[this.instructions[$i$$].target].isJumpTarget = !0, this.instructions[this.instructions[$i$$].target].jumpTargetNb++) : JSSMS.Utils.console.log("Invalid target address", JSSMS.Utils.toHex(this.instructions[$i$$].target)))) + ; } - JSSMS.Utils.console.timeEnd("Instructions parsing") + JSSMS.Utils.console.timeEnd("Instructions parsing"); }, writeGraphViz:function $JSSMS$Debugger$$writeGraphViz$() { JSSMS.Utils.console.time("DOT generation"); - for(var $tree$$ = this.instructions, $content$$ = ["digraph G {"], $i$$ = 0, $length$$ = $tree$$.length;$i$$ < $length$$;$i$$++) { - $tree$$[$i$$] && ($content$$.push(" " + $i$$ + ' [label="' + $tree$$[$i$$].label + '"];'), null != $tree$$[$i$$].target && $content$$.push(" " + $i$$ + " -> " + $tree$$[$i$$].target + ";"), null != $tree$$[$i$$].nextAddress && $content$$.push(" " + $i$$ + " -> " + $tree$$[$i$$].nextAddress + ";")) + for (var $tree$$ = this.instructions, $content$$ = ["digraph G {"], $i$$ = 0, $length$$ = $tree$$.length;$i$$ < $length$$;$i$$++) { + $tree$$[$i$$] && ($content$$.push(" " + $i$$ + ' [label="' + $tree$$[$i$$].label + '"];'), null !== $tree$$[$i$$].target && $content$$.push(" " + $i$$ + " -> " + $tree$$[$i$$].target + ";"), null !== $tree$$[$i$$].nextAddress && $content$$.push(" " + $i$$ + " -> " + $tree$$[$i$$].nextAddress + ";")); } $content$$.push("}"); $content$$ = $content$$.join("\n"); $content$$ = $content$$.replace(/ 0 \[label="/, ' 0 [style=filled,color="#CC0000",label="'); JSSMS.Utils.console.timeEnd("DOT generation"); - return $content$$ + return $content$$; }, writeJavaScript:function $JSSMS$Debugger$$writeJavaScript$() { function $getTotalTStates$$($opcodes$$) { var $tstates$$ = 0; @@ -4264,35 +4207,35 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $tstates$$ = OP_ED_STATES[$opcodes$$[1]]; break; default: - $tstates$$ = OP_STATES[$opcodes$$[0]] + $tstates$$ = OP_STATES[$opcodes$$[0]]; } - return $tstates$$ + return $tstates$$; } function $insertTStates$$() { $tstates$$ && $code$$.push("this.tstates -= " + $toHex$$($tstates$$) + ";"); - $tstates$$ = 0 + $tstates$$ = 0; } JSSMS.Utils.console.time("JavaScript generation"); - for(var $tree$$ = this.instructions, $toHex$$ = JSSMS.Utils.toHex, $tstates$$ = 0, $prevAddress$$ = 0, $prevNextAddress$$ = 0, $breakNeeded$$ = !1, $pageBreakPoint$$ = 1024, $pageNumber$$ = 0, $i$$ = 0, $length$$ = 0, $code$$ = ['"": {', '"": function() {', 'throw "Bad address: " + JSSMS.Utils.toHex(this.pc);'], $i$$ = 0, $length$$ = $tree$$.length;$i$$ < $length$$;$i$$++) { - if($tree$$[$i$$]) { + for (var $tree$$ = this.instructions, $toHex$$ = JSSMS.Utils.toHex, $tstates$$ = 0, $prevAddress$$ = 0, $prevNextAddress$$ = 0, $breakNeeded$$ = !1, $pageBreakPoint$$ = 1024, $pageNumber$$ = 0, $i$$ = 0, $length$$ = 0, $code$$ = ['"": {', '"": function() {', 'throw "Bad address: " + JSSMS.Utils.toHex(this.pc);'], $i$$ = 0, $length$$ = $tree$$.length;$i$$ < $length$$;$i$$++) { + if ($tree$$[$i$$]) { $prevAddress$$ <= $pageBreakPoint$$ && $tree$$[$i$$].address >= $pageBreakPoint$$ && ($code$$.push("this.pc = " + $toHex$$($tree$$[$i$$].address) + ";"), $code$$.push("}"), $code$$.push("},"), $code$$.push("" + $pageNumber$$ + ": {"), $code$$.push('"": function() {'), $code$$.push('throw "Bad address: " + JSSMS.Utils.toHex(this.pc);'), $breakNeeded$$ = !0, $pageNumber$$++, $pageBreakPoint$$ = $pageNumber$$ * PAGE_SIZE); - if($tree$$[$i$$].isJumpTarget || $prevNextAddress$$ != $tree$$[$i$$].address || $breakNeeded$$) { - $insertTStates$$(), $prevNextAddress$$ && !$breakNeeded$$ && $code$$.push("this.pc = " + $toHex$$($prevNextAddress$$) + ";"), $code$$.push("},"), $code$$.push("" + $toHex$$($tree$$[$i$$].address) + ": function(temp, location) {") + if ($tree$$[$i$$].isJumpTarget || $prevNextAddress$$ != $tree$$[$i$$].address || $breakNeeded$$) { + $insertTStates$$(), $prevNextAddress$$ && !$breakNeeded$$ && $code$$.push("this.pc = " + $toHex$$($prevNextAddress$$) + ";"), $code$$.push("},"), $code$$.push("" + $toHex$$($tree$$[$i$$].address) + ": function(temp, location) {"); } $code$$.push("// " + $tree$$[$i$$].label); $breakNeeded$$ = "return;" == $tree$$[$i$$].code.substr(-7); $tstates$$ += $getTotalTStates$$($tree$$[$i$$].opcodes); (/return;/.test($tree$$[$i$$].code) || /this\.tstates/.test($tree$$[$i$$].code)) && $insertTStates$$(); - "" != $tree$$[$i$$].code && $code$$.push($tree$$[$i$$].code); + "" !== $tree$$[$i$$].code && $code$$.push($tree$$[$i$$].code); $prevAddress$$ = $tree$$[$i$$].address; - $prevNextAddress$$ = $tree$$[$i$$].nextAddress + $prevNextAddress$$ = $tree$$[$i$$].nextAddress; } } $code$$.push("}"); $code$$.push("}"); $code$$ = $code$$.join("\n"); JSSMS.Utils.console.timeEnd("JavaScript generation"); - return $code$$ + return $code$$; }, disassemble:function $JSSMS$Debugger$$disassemble$($address$$) { var $toHex$$ = JSSMS.Utils.toHex, $opcode$$ = this.readRom8bit($address$$), $opcodesArray$$ = [$opcode$$], $inst$$ = "Unknown Opcode", $currAddr$$ = $address$$, $target$$ = null, $code$$ = 'throw "Unimplemented opcode ' + $toHex$$($opcode$$) + '";', $_inst_operand$$ = "", $location$$ = 0; $address$$++; @@ -5114,7 +5057,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger break; case 192: $inst$$ = "RET NZ"; - $code$$ = "if ((this.f & F_ZERO) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $code$$ = "if ((this.f & F_ZERO) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 193: $inst$$ = "POP BC"; @@ -5123,7 +5066,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger case 194: $target$$ = this.readRom16bit($address$$); $inst$$ = "JP NZ,(" + $toHex$$($target$$) + ")"; - $code$$ = "if ((this.f & F_ZERO) == 0x00) {this.pc = " + $toHex$$($target$$) + ";return;}"; + $code$$ = "if ((this.f & F_ZERO) === 0x00) {this.pc = " + $toHex$$($target$$) + ";return;}"; $address$$ += 2; break; case 195: @@ -5135,7 +5078,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger case 196: $target$$ = this.readRom16bit($address$$); $inst$$ = "CALL NZ (" + $toHex$$($target$$) + ")"; - $code$$ = "if ((this.f & F_ZERO) == 0x00) {this.tstates -= 0x07;this.push1(" + $toHex$$($address$$ + 2) + ");this.pc = " + $toHex$$($target$$) + ";return;}"; + $code$$ = "if ((this.f & F_ZERO) === 0x00) {this.tstates -= 0x07;this.push1(" + $toHex$$($address$$ + 2) + ");this.pc = " + $toHex$$($target$$) + ";return;}"; $address$$ += 2; break; case 197: @@ -5200,7 +5143,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger break; case 208: $inst$$ = "RET NC"; - $code$$ = "if ((this.f & F_CARRY) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $code$$ = "if ((this.f & F_CARRY) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 209: $inst$$ = "POP DE"; @@ -5209,7 +5152,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger case 210: $target$$ = this.readRom16bit($address$$); $inst$$ = "JP NC,(" + $toHex$$($target$$) + ")"; - $code$$ = "if ((this.f & F_CARRY) == 0x00) {this.pc = " + $toHex$$($target$$) + ";return;}"; + $code$$ = "if ((this.f & F_CARRY) === 0x00) {this.pc = " + $toHex$$($target$$) + ";return;}"; $address$$ += 2; break; case 211: @@ -5221,7 +5164,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger case 212: $target$$ = this.readRom16bit($address$$); $inst$$ = "CALL NC (" + $toHex$$($target$$) + ")"; - $code$$ = "if ((this.f & F_CARRY) == 0x00) {this.tstates -= 0x07;this.push1(" + $toHex$$($address$$ + 2) + ");this.pc = " + $toHex$$($target$$) + ";return;}"; + $code$$ = "if ((this.f & F_CARRY) === 0x00) {this.tstates -= 0x07;this.push1(" + $toHex$$($address$$ + 2) + ");this.pc = " + $toHex$$($target$$) + ";return;}"; $address$$ += 2; break; case 213: @@ -5285,7 +5228,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger break; case 224: $inst$$ = "RET PO"; - $code$$ = "if ((this.f & F_PARITY) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $code$$ = "if ((this.f & F_PARITY) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 225: $inst$$ = "POP HL"; @@ -5294,7 +5237,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger case 226: $target$$ = this.readRom16bit($address$$); $inst$$ = "JP PO,(" + $toHex$$($target$$) + ")"; - $code$$ = "if ((this.f & F_PARITY) == 0x00) {this.pc = " + $toHex$$($target$$) + ";return;}"; + $code$$ = "if ((this.f & F_PARITY) === 0x00) {this.pc = " + $toHex$$($target$$) + ";return;}"; $address$$ += 2; break; case 227: @@ -5304,7 +5247,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger case 228: $target$$ = this.readRom16bit($address$$); $inst$$ = "CALL PO (" + $toHex$$($target$$) + ")"; - $code$$ = "if ((this.f & F_PARITY) == 0x00) {this.tstates -= 0x07;this.push1(" + $toHex$$($address$$ + 2) + ");this.pc = " + $toHex$$($target$$) + ";return;}"; + $code$$ = "if ((this.f & F_PARITY) === 0x00) {this.tstates -= 0x07;this.push1(" + $toHex$$($address$$ + 2) + ");this.pc = " + $toHex$$($target$$) + ";return;}"; $address$$ += 2; break; case 229: @@ -5368,7 +5311,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger break; case 240: $inst$$ = "RET P"; - $code$$ = "if ((this.f & F_SIGN) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $code$$ = "if ((this.f & F_SIGN) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 241: $inst$$ = "POP AF"; @@ -5377,7 +5320,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger case 242: $target$$ = this.readRom16bit($address$$); $inst$$ = "JP P,(" + $toHex$$($target$$) + ")"; - $code$$ = "if ((this.f & F_SIGN) == 0x00) {this.pc = " + $toHex$$($target$$) + ";return;}"; + $code$$ = "if ((this.f & F_SIGN) === 0x00) {this.pc = " + $toHex$$($target$$) + ";return;}"; $address$$ += 2; break; case 243: @@ -5387,7 +5330,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger case 244: $target$$ = this.readRom16bit($address$$); $inst$$ = "CALL P (" + $toHex$$($target$$) + ")"; - $code$$ = "if ((this.f & F_SIGN) == 0x00) {this.tstates -= 0x07;this.push1(" + $toHex$$($address$$ + 2) + ");this.pc = " + $toHex$$($target$$) + ";return;}"; + $code$$ = "if ((this.f & F_SIGN) === 0x00) {this.tstates -= 0x07;this.push1(" + $toHex$$($address$$ + 2) + ");this.pc = " + $toHex$$($target$$) + ";return;}"; $address$$ += 2; break; case 245: @@ -5443,9 +5386,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $address$$++; break; case 255: - $target$$ = 56, $inst$$ = "RST " + $toHex$$($target$$), $code$$ = "this.push1(" + $toHex$$($address$$) + "); this.pc = " + $toHex$$($target$$) + "; return;" + $target$$ = 56, $inst$$ = "RST " + $toHex$$($target$$), $code$$ = "this.push1(" + $toHex$$($address$$) + "); this.pc = " + $toHex$$($target$$) + "; return;"; } - return Instruction({opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$, target:$target$$}) + return Instruction({opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$, target:$target$$}); }, getCB:function $JSSMS$Debugger$$getCB$($address$$) { var $opcode$$ = this.readRom8bit($address$$), $opcodesArray$$ = [$opcode$$], $inst$$ = "Unimplemented 0xCB prefixed opcode", $currAddr$$ = $address$$, $code$$ = 'throw "Unimplemented 0xCB prefixed opcode";'; $address$$++; @@ -6399,9 +6342,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $code$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_7);"; break; case 255: - $inst$$ = "SET 7,A", $code$$ = "this.a |= BIT_7;" + $inst$$ = "SET 7,A", $code$$ = "this.a |= BIT_7;"; } - return{opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$} + return{opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$}; }, getED:function $JSSMS$Debugger$$getED$($address$$) { var $toHex$$ = JSSMS.Utils.toHex, $opcode$$ = this.readRom8bit($address$$), $opcodesArray$$ = [$opcode$$], $inst$$ = "Unimplemented 0xED prefixed opcode", $currAddr$$ = $address$$, $target$$ = null, $code$$ = 'throw "Unimplemented 0xED prefixed opcode";', $operand$$ = "", $location$$ = 0; $address$$++; @@ -6634,15 +6577,15 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger break; case 161: $inst$$ = "CPI"; - $code$$ = "temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);this.f = (this.f & 0xF8) | temp;"; + $code$$ = "temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);this.f = (this.f & 0xF8) | temp;"; break; case 162: $inst$$ = "INI"; - $code$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $code$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 163: $inst$$ = "OUTI"; - $code$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.incHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $code$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.incHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 168: $inst$$ = "LDD"; @@ -6656,7 +6599,7 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger break; case 171: $inst$$ = "OUTD"; - $code$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.decHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $code$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.decHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 176: $inst$$ = "LDIR"; @@ -6666,14 +6609,14 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger break; case 177: $inst$$ = "CPIR"; - $code$$ = "temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);"; - ACCURATE_INTERRUPT_EMULATION ? ($target$$ = $address$$ - 2, $code$$ += "if ((temp & F_PARITY) != 0x00 && (this.f & F_ZERO) == 0x00) {this.tstates -= 0x05;this.pc = " + $toHex$$($target$$) + ";return;}") : $code$$ += "for (;(temp & F_PARITY) != 0x00 && (this.f & F_ZERO) == 0x00; this.tstates -= 5) {temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);}"; + $code$$ = "temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);"; + ACCURATE_INTERRUPT_EMULATION ? ($target$$ = $address$$ - 2, $code$$ += "if ((temp & F_PARITY) != 0x00 && (this.f & F_ZERO) === 0x00) {this.tstates -= 0x05;this.pc = " + $toHex$$($target$$) + ";return;}") : $code$$ += "for (;(temp & F_PARITY) != 0x00 && (this.f & F_ZERO) === 0x00; this.tstates -= 5) {temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);}"; $code$$ += "this.f = (this.f & 0xF8) | temp;"; break; case 178: $target$$ = $address$$ - 2; $inst$$ = "INIR"; - $code$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $code$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 179: $inst$$ = "OTIR"; @@ -6693,13 +6636,13 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $code$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.decHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 187: - $target$$ = $address$$ - 2, $inst$$ = "OTDR", $code$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.decHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}" + $target$$ = $address$$ - 2, $inst$$ = "OTDR", $code$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.decHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; } - return{opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$, target:$target$$} + return{opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$, target:$target$$}; }, getIndex:function $JSSMS$Debugger$$getIndex$($index$$, $address$$) { - var $toHex$$ = JSSMS.Utils.toHex, $opcode$$ = this.readRom8bit($address$$), $opcodesArray$$ = [$opcode$$], $inst$$ = "Unimplemented 0xDD or 0xFD prefixed opcode", $currAddr$$ = $address$$, $code$$ = 'throw "Unimplemented 0xDD or 0xFD prefixed opcode";', $_inst$$1_operand$$ = "", $location$$28_offset$$ = 0; + var $toHex$$ = JSSMS.Utils.toHex, $opcode$$ = this.readRom8bit($address$$), $opcodesArray$$ = [$opcode$$], $inst$$ = "Unimplemented 0xDD or 0xFD prefixed opcode", $currAddr$$ = $address$$, $code$$ = 'throw "Unimplemented 0xDD or 0xFD prefixed opcode";', $_inst$$1_operand$$ = "", $location$$25_offset$$ = 0; $address$$++; - $location$$28_offset$$ = 0; + $location$$25_offset$$ = 0; $_inst$$1_operand$$ = {}; switch($opcode$$) { case 9: @@ -6717,10 +6660,10 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $address$$ += 2; break; case 34: - $location$$28_offset$$ = this.readRom16bit($address$$); - $_inst$$1_operand$$ = $toHex$$($location$$28_offset$$); + $location$$25_offset$$ = this.readRom16bit($address$$); + $_inst$$1_operand$$ = $toHex$$($location$$25_offset$$); $inst$$ = "LD (" + $_inst$$1_operand$$ + ")," + $index$$; - $code$$ = "this.writeMem(" + $_inst$$1_operand$$ + ", this." + $index$$.toLowerCase() + "L);this.writeMem(" + $toHex$$($location$$28_offset$$ + 1) + ", this." + $index$$.toLowerCase() + "H);"; + $code$$ = "this.writeMem(" + $_inst$$1_operand$$ + ", this." + $index$$.toLowerCase() + "L);this.writeMem(" + $toHex$$($location$$25_offset$$ + 1) + ", this." + $index$$.toLowerCase() + "H);"; $address$$ += 2; break; case 35: @@ -6741,9 +6684,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "ADD " + $index$$ + " " + $index$$; break; case 42: - $location$$28_offset$$ = this.readRom16bit($address$$); - $inst$$ = "LD " + $index$$ + " (" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.ixL = this.readMem(" + $toHex$$($location$$28_offset$$) + ");this.ixH = this.readMem(" + $toHex$$($location$$28_offset$$ + 1) + ");"; + $location$$25_offset$$ = this.readRom16bit($address$$); + $inst$$ = "LD " + $index$$ + " (" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.ixL = this.readMem(" + $toHex$$($location$$25_offset$$) + ");this.ixH = this.readMem(" + $toHex$$($location$$25_offset$$ + 1) + ");"; $address$$ += 2; break; case 43: @@ -6761,22 +6704,22 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $address$$++; break; case 52: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "INC (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.incMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ");"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "INC (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.incMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ");"; $address$$++; break; case 53: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "DEC (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.decMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ");"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "DEC (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.decMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ");"; $address$$++; break; case 54: - $location$$28_offset$$ = this.readRom8bit($address$$); + $location$$25_offset$$ = this.readRom8bit($address$$); $_inst$$1_operand$$ = $toHex$$(this.readRom8bit($address$$ + 1)); - $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")," + $_inst$$1_operand$$; - $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ", " + $_inst$$1_operand$$ + ");"; + $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")," + $_inst$$1_operand$$; + $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ", " + $_inst$$1_operand$$ + ");"; $address$$ += 2; break; case 57: @@ -6790,9 +6733,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "LD B," + $index$$ + "L *"; break; case 70: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD B,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.b = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ");"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD B,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.b = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ");"; $address$$++; break; case 76: @@ -6802,9 +6745,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "LD C," + $index$$ + "L *"; break; case 78: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD C,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.c = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ");"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD C,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.c = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ");"; $address$$++; break; case 84: @@ -6814,9 +6757,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "LD D," + $index$$ + "L *"; break; case 86: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD D,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.d = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ");"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD D,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.d = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ");"; $address$$++; break; case 92: @@ -6826,9 +6769,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "LD E," + $index$$ + "L *"; break; case 94: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD E,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.e = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ");"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD E,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.e = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ");"; $address$$++; break; case 96: @@ -6850,9 +6793,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "LD " + $index$$ + "H," + $index$$ + "L *"; break; case 102: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD H,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.h = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ");"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD H,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.h = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ");"; $address$$++; break; case 103: @@ -6878,9 +6821,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $code$$ = ""; break; case 110: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD L,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.l = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ");"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD L,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.l = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ");"; $address$$++; break; case 111: @@ -6888,45 +6831,45 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $code$$ = "this." + $index$$.toLowerCase() + "L = this.a;"; break; case 112: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + "),B"; - $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ", this.b);"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + "),B"; + $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ", this.b);"; $address$$++; break; case 113: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + "),C"; - $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ", this.c);"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + "),C"; + $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ", this.c);"; $address$$++; break; case 114: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + "),D"; - $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ", this.d);"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + "),D"; + $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ", this.d);"; $address$$++; break; case 115: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + "),E"; - $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ", this.e);"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + "),E"; + $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ", this.e);"; $address$$++; break; case 116: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + "),H"; - $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ", this.h);"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + "),H"; + $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ", this.h);"; $address$$++; break; case 117: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + "),L"; - $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ", this.l);"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + "),L"; + $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ", this.l);"; $address$$++; break; case 119: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + "),A"; - $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ", this.a);"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + "),A"; + $code$$ = "this.writeMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ", this.a);"; $address$$++; break; case 124: @@ -6936,9 +6879,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "LD A," + $index$$ + "L *"; break; case 126: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "LD A,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.a = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ");"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "LD A,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.a = this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ");"; $address$$++; break; case 132: @@ -6948,9 +6891,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "ADD A," + $index$$ + "L *"; break; case 134: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "ADD A,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.add_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + "));"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "ADD A,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.add_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + "));"; $address$$++; break; case 140: @@ -6960,9 +6903,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "ADC A," + $index$$ + "L *"; break; case 142: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "ADC A,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.adc_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + "));"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "ADC A,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.adc_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + "));"; $address$$++; break; case 148: @@ -6972,9 +6915,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "SUB " + $index$$ + "L *"; break; case 150: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "SUB A,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.sub_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + "));"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "SUB A,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.sub_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + "));"; $address$$++; break; case 156: @@ -6984,9 +6927,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $inst$$ = "SBC A," + $index$$ + "L *"; break; case 158: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "SBC A,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.sbc_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + "));"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "SBC A,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.sbc_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + "));"; $address$$++; break; case 164: @@ -6998,9 +6941,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $code$$ = "this.f = this.SZP_TABLE[this.a &= this." + $index$$.toLowerCase() + "L];"; break; case 166: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "AND A,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.f = this.SZP_TABLE[this.a &= this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ")] | F_HALFCARRY;"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "AND A,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.f = this.SZP_TABLE[this.a &= this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ")] | F_HALFCARRY;"; $address$$++; break; case 172: @@ -7012,9 +6955,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $code$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$.toLowerCase() + "L];"; break; case 174: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "XOR A,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.f = this.SZP_TABLE[this.a ^= this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ")];"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "XOR A,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.f = this.SZP_TABLE[this.a ^= this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ")];"; $address$$++; break; case 180: @@ -7026,9 +6969,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $code$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$.toLowerCase() + "L];"; break; case 182: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "OR A,(" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.f = this.SZP_TABLE[this.a |= this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + ")];"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "OR A,(" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.f = this.SZP_TABLE[this.a |= this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + ")];"; $address$$++; break; case 188: @@ -7040,9 +6983,9 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $code$$ = "this.cp_a(this." + $index$$.toLowerCase() + "L);"; break; case 190: - $location$$28_offset$$ = this.readRom8bit($address$$); - $inst$$ = "CP (" + $index$$ + "+" + $toHex$$($location$$28_offset$$) + ")"; - $code$$ = "this.cp_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$28_offset$$) + "));"; + $location$$25_offset$$ = this.readRom8bit($address$$); + $inst$$ = "CP (" + $index$$ + "+" + $toHex$$($location$$25_offset$$) + ")"; + $code$$ = "this.cp_a(this.readMem(this.get" + $index$$ + "() + " + $toHex$$($location$$25_offset$$) + "));"; $address$$++; break; case 203: @@ -7070,24 +7013,24 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger $address$$ = null; break; case 249: - $inst$$ = "LD SP," + $index$$, $code$$ = "this.sp = this.get" + $index$$ + "();" + $inst$$ = "LD SP," + $index$$, $code$$ = "this.sp = this.get" + $index$$ + "();"; } - return{opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$} + return{opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$}; }, getIndexCB:function $JSSMS$Debugger$$getIndexCB$($index$$, $address$$) { - var $location$$29_toHex$$ = JSSMS.Utils.toHex, $currAddr$$ = $address$$, $location$$29_toHex$$ = "location = this.get" + $index$$ + "() + " + $location$$29_toHex$$(this.readRom8bit($address$$++)) + " & 0xFFFF;", $opcode$$ = this.readRom8bit($address$$), $opcodesArray$$ = [$opcode$$], $inst$$ = "Unimplemented 0xDDCB or 0xFDCB prefixed opcode", $code$$ = 'throw "Unimplemented 0xDDCB or 0xFDCB prefixed opcode";'; + var $location$$26_toHex$$ = JSSMS.Utils.toHex, $currAddr$$ = $address$$, $location$$26_toHex$$ = "location = this.get" + $index$$ + "() + " + $location$$26_toHex$$(this.readRom8bit($address$$++)) + " & 0xFFFF;", $opcode$$ = this.readRom8bit($address$$), $opcodesArray$$ = [$opcode$$], $inst$$ = "Unimplemented 0xDDCB or 0xFDCB prefixed opcode", $code$$ = 'throw "Unimplemented 0xDDCB or 0xFDCB prefixed opcode";'; $address$$++; switch($opcode$$) { case 0: $inst$$ = "LD B,RLC (" + $index$$ + ")"; - $code$$ = $location$$29_toHex$$ + "this.b = this.rlc(this.readMem(location)); this.writeMem(location, this.b);"; + $code$$ = $location$$26_toHex$$ + "this.b = this.rlc(this.readMem(location)); this.writeMem(location, this.b);"; break; case 1: $inst$$ = "LD C,RLC (" + $index$$ + ")"; - $code$$ = $location$$29_toHex$$ + "this.c = this.rlc(this.readMem(location)); this.writeMem(location, this.c);"; + $code$$ = $location$$26_toHex$$ + "this.c = this.rlc(this.readMem(location)); this.writeMem(location, this.c);"; break; case 2: $inst$$ = "LD D,RLC (" + $index$$ + ")"; - $code$$ = $location$$29_toHex$$ + "this.d = this.rlc(this.readMem(location)); this.writeMem(location, this.d);"; + $code$$ = $location$$26_toHex$$ + "this.d = this.rlc(this.readMem(location)); this.writeMem(location, this.d);"; break; case 3: $inst$$ = "LD E,RLC (" + $index$$ + ")"; @@ -7100,11 +7043,11 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger break; case 6: $inst$$ = "RLC (" + $index$$ + ")"; - $code$$ = $location$$29_toHex$$ + "this.writeMem(location, this.rlc(this.readMem(location)));"; + $code$$ = $location$$26_toHex$$ + "this.writeMem(location, this.rlc(this.readMem(location)));"; break; case 7: $inst$$ = "LD A,RLC (" + $index$$ + ")"; - $code$$ = $location$$29_toHex$$ + "this.a = this.rlc(this.readMem(location)); this.writeMem(location, this.a);"; + $code$$ = $location$$26_toHex$$ + "this.a = this.rlc(this.readMem(location)); this.writeMem(location, this.a);"; break; case 8: $inst$$ = "LD B,RRC (" + $index$$ + ")"; @@ -7171,14 +7114,14 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger break; case 29: $inst$$ = "LD L,RR (" + $index$$ + ")"; - $code$$ = $location$$29_toHex$$ + "this.l = this.rr(this.readMem(location)); this.writeMem(location, this.l);"; + $code$$ = $location$$26_toHex$$ + "this.l = this.rr(this.readMem(location)); this.writeMem(location, this.l);"; break; case 30: $inst$$ = "RR (" + $index$$ + ")"; break; case 31: $inst$$ = "LD A,RR (" + $index$$ + ")"; - $code$$ = $location$$29_toHex$$ + "this.a = this.rr(this.readMem(location)); this.writeMem(location, this.a);"; + $code$$ = $location$$26_toHex$$ + "this.a = this.rr(this.readMem(location)); this.writeMem(location, this.a);"; break; case 32: $inst$$ = "LD B,SLA (" + $index$$ + ")"; @@ -7682,43 +7625,98 @@ JSSMS.Debugger.prototype = {instructions:[], resetDebug:function $JSSMS$Debugger case 254: ; case 255: - $inst$$ = "SET 7,(" + $index$$ + ")" + $inst$$ = "SET 7,(" + $index$$ + ")"; } $address$$++; - return{opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$} + return{opcode:$opcode$$, opcodes:$opcodesArray$$, inst:$inst$$, code:$code$$, address:$currAddr$$, nextAddress:$address$$}; }, getIndexOpIX:function $JSSMS$Debugger$$getIndexOpIX$($opcode$$) { - return this.getIndex("IX", $opcode$$) + return this.getIndex("IX", $opcode$$); }, getIndexOpIY:function $JSSMS$Debugger$$getIndexOpIY$($opcode$$) { - return this.getIndex("IY", $opcode$$) + return this.getIndex("IY", $opcode$$); }, readRom8bit:function $JSSMS$Debugger$$readRom8bit$($address$$) { - return SUPPORT_DATAVIEW ? this.rom[$address$$ >> 14].getUint8($address$$ & 16383) : this.rom[$address$$ >> 14][$address$$ & 16383] & 255 + return SUPPORT_DATAVIEW ? this.rom[$address$$ >> 14].getUint8($address$$ & 16383) : this.rom[$address$$ >> 14][$address$$ & 16383] & 255; }, readRom16bit:function $JSSMS$Debugger$$readRom16bit$($address$$) { - return SUPPORT_DATAVIEW ? 16383 > ($address$$ & 16383) ? this.rom[$address$$ >> 14].getUint16($address$$ & 16383, LITTLE_ENDIAN) : this.rom[$address$$ >> 14].getUint8($address$$ & 16383) | this.rom[++$address$$ >> 14].getUint8($address$$ & 16383) << 8 : this.rom[$address$$ >> 14][$address$$ & 16383] & 255 | (this.rom[++$address$$ >> 14][$address$$ & 16383] & 255) << 8 -}, peepholePortOut:function $JSSMS$Debugger$$peepholePortOut$($port$$) { - return"this.port.out(" + JSSMS.Utils.toHex($port$$) + ", this.a);" + return SUPPORT_DATAVIEW ? 16383 > ($address$$ & 16383) ? this.rom[$address$$ >> 14].getUint16($address$$ & 16383, LITTLE_ENDIAN) : this.rom[$address$$ >> 14].getUint8($address$$ & 16383) | this.rom[++$address$$ >> 14].getUint8($address$$ & 16383) << 8 : this.rom[$address$$ >> 14][$address$$ & 16383] & 255 | (this.rom[++$address$$ >> 14][$address$$ & 16383] & 255) << 8; +}, peepholePortOut:function $JSSMS$Debugger$$peepholePortOut$($code$$) { + if (this.main.is_gg && 7 > $code$$) { + return ""; + } + switch($code$$ & 193) { + case 1: + if (LIGHTGUN) { + return "var value = this.a;this.port.oldTH = (this.port.getTH(PORT_A) != 0x00 || this.port.getTH(PORT_B) != 0x00);this.port.writePort(PORT_A, value);this.port.writePort(PORT_B, value >> 2);if (!this.port.oldTH && (this.port.getTH(PORT_A) != 0x00 || this.port.getTH(PORT_B) != 0x00)) {this.port.hCounter = this.port.getHCount();}"; + } + $code$$ = "var value = this.a;this.port.ioPorts[0] = (value & 0x20) << 1;this.port.ioPorts[1] = (value & 0x80);"; + 0 === this.port.europe && ($code$$ += "this.port.ioPorts[0] = ~this.port.ioPorts[0];this.port.ioPorts[1] = ~this.port.ioPorts[1];"); + return $code$$; + case 128: + return "this.vdp.dataWrite(this.a);"; + case 129: + return "this.vdp.controlWrite(this.a);"; + case 64: + ; + case 65: + if (this.main.soundEnabled) { + return "this.psg.write(this.a);"; + } + ; + } + return ""; }, peepholePortIn:function $JSSMS$Debugger$$peepholePortIn$($port$$) { - return"this.a = this.port.in_(" + JSSMS.Utils.toHex($port$$) + ");" + if (this.main.is_gg && 7 > $port$$) { + switch($port$$) { + case 0: + return "this.a = (this.port.keyboard.ggstart & 0xBF) | this.port.europe;"; + case 1: + ; + case 2: + ; + case 3: + ; + case 4: + ; + case 5: + return "this.a = 0x00;"; + case 6: + return "this.a = 0xFF;"; + } + } + switch($port$$ & 193) { + case 64: + return "this.a = this.vdp.getVCount();"; + case 65: + return "this.a = this.port.hCounter;"; + case 128: + return "this.a = this.vdp.dataRead();"; + case 129: + return "this.a = this.vdp.controlRead();"; + case 192: + return "this.a = this.port.keyboard.controller1;"; + case 193: + return LIGHTGUN ? "if (this.port.keyboard.lightgunClick)this.port.lightPhaserSync();this.a = (this.port.keyboard.controller2 & 0x3F) | (this.port.getTH(PORT_A) != 0x00 ? 0x40 : 0x00) | (this.port.getTH(PORT_B) != 0x00 ? 0x80 : 0x00);" : "this.a = (this.port.keyboard.controller2 & 0x3F) | this.port.ioPorts[0] | this.port.ioPorts[1];"; + } + return "this.a = 0xFF;"; }}; function Instruction($options$$) { var $toHex$$ = JSSMS.Utils.toHex, $defaultInstruction$$ = {address:0, hexAddress:"", opcode:0, opcodes:[], inst:"", code:"", nextAddress:null, target:null, isJumpTarget:!1, jumpTargetNb:0, label:""}, $prop$$, $hexOpcodes$$ = ""; - for($prop$$ in $defaultInstruction$$) { - void 0 != $options$$[$prop$$] && ($defaultInstruction$$[$prop$$] = $options$$[$prop$$]) + for ($prop$$ in $defaultInstruction$$) { + void 0 !== $options$$[$prop$$] && ($defaultInstruction$$[$prop$$] = $options$$[$prop$$]); } $defaultInstruction$$.hexAddress = $toHex$$($defaultInstruction$$.address); $defaultInstruction$$.opcodes.length && ($hexOpcodes$$ = $defaultInstruction$$.opcodes.map($toHex$$).join(" ") + " "); $defaultInstruction$$.label = $defaultInstruction$$.hexAddress + " " + $hexOpcodes$$ + $defaultInstruction$$.inst; - return $defaultInstruction$$ + return $defaultInstruction$$; } ;var KEY_UP = 1, KEY_DOWN = 2, KEY_LEFT = 4, KEY_RIGHT = 8, KEY_FIRE1 = 16, KEY_FIRE2 = 32, KEY_START = 64; JSSMS.Keyboard = function $JSSMS$Keyboard$($sms$$) { this.main = $sms$$; this.lightgunY = this.lightgunX = this.ggstart = this.controller2 = this.controller1 = 0; - this.lightgunEnabled = this.lightgunClick = !1 + this.lightgunEnabled = this.lightgunClick = !1; }; JSSMS.Keyboard.prototype = {reset:function $JSSMS$Keyboard$$reset$() { this.ggstart = this.controller2 = this.controller1 = 255; LIGHTGUN && (this.lightgunClick = !1); - this.pause_button = !1 + this.pause_button = !1; }, keydown:function $JSSMS$Keyboard$$keydown$($evt$$) { switch($evt$$.keyCode) { case 38: @@ -7764,9 +7762,9 @@ JSSMS.Keyboard.prototype = {reset:function $JSSMS$Keyboard$$reset$() { this.controller2 &= ~KEY_START; break; default: - return + return; } - $evt$$.preventDefault() + $evt$$.preventDefault(); }, keyup:function $JSSMS$Keyboard$$keyup$($evt$$) { switch($evt$$.keyCode) { case 38: @@ -7812,9 +7810,9 @@ JSSMS.Keyboard.prototype = {reset:function $JSSMS$Keyboard$$reset$() { this.controller2 |= KEY_START; break; default: - return + return; } - $evt$$.preventDefault() + $evt$$.preventDefault(); }}; var SCALE = 8, NO_ANTIALIAS = Number.MIN_VALUE, SHIFT_RESET = 32768, FEEDBACK_PATTERN = 9, PSG_VOLUME = [25, 20, 16, 13, 10, 8, 6, 5, 4, 3, 3, 2, 2, 1, 1, 0], HI_BOUNDARY = 127, LO_BOUNDARY = -128; JSSMS.SN76489 = function $JSSMS$SN76489$($sms$$) { @@ -7827,33 +7825,33 @@ JSSMS.SN76489 = function $JSSMS$SN76489$($sms$$) { this.freqPos = Array(3); this.noiseFreq = 16; this.noiseShiftReg = SHIFT_RESET; - this.outputChannel = Array(4) + this.outputChannel = Array(4); }; JSSMS.SN76489.prototype = {init:function $JSSMS$SN76489$$init$($clockSpeed$$, $sampleRate$$) { this.clock = ($clockSpeed$$ << SCALE) / 16 / $sampleRate$$; this.regLatch = this.clockFrac = 0; this.noiseFreq = 16; this.noiseShiftReg = SHIFT_RESET; - for(var $i$$ = 0;4 > $i$$;$i$$++) { - this.reg[$i$$ << 1] = 1, this.reg[($i$$ << 1) + 1] = 15, this.freqCounter[$i$$] = 0, this.freqPolarity[$i$$] = 1, 3 != $i$$ && (this.freqPos[$i$$] = NO_ANTIALIAS) + for (var $i$$ = 0;4 > $i$$;$i$$++) { + this.reg[$i$$ << 1] = 1, this.reg[($i$$ << 1) + 1] = 15, this.freqCounter[$i$$] = 0, this.freqPolarity[$i$$] = 1, 3 != $i$$ && (this.freqPos[$i$$] = NO_ANTIALIAS); } }, write:function $JSSMS$SN76489$$write$($value$$) { - 0 != ($value$$ & 128) ? (this.regLatch = $value$$ >> 4 & 7, this.reg[this.regLatch] = this.reg[this.regLatch] & 1008 | $value$$ & 15) : this.reg[this.regLatch] = 0 == this.regLatch || 2 == this.regLatch || 4 == this.regLatch ? this.reg[this.regLatch] & 15 | ($value$$ & 63) << 4 : $value$$ & 15; + 0 !== ($value$$ & 128) ? (this.regLatch = $value$$ >> 4 & 7, this.reg[this.regLatch] = this.reg[this.regLatch] & 1008 | $value$$ & 15) : this.reg[this.regLatch] = 0 === this.regLatch || 2 == this.regLatch || 4 == this.regLatch ? this.reg[this.regLatch] & 15 | ($value$$ & 63) << 4 : $value$$ & 15; switch(this.regLatch) { case 0: ; case 2: ; case 4: - 0 == this.reg[this.regLatch] && (this.reg[this.regLatch] = 1); + 0 === this.reg[this.regLatch] && (this.reg[this.regLatch] = 1); break; case 6: - this.noiseFreq = 16 << (this.reg[6] & 3), this.noiseShiftReg = SHIFT_RESET + this.noiseFreq = 16 << (this.reg[6] & 3), this.noiseShiftReg = SHIFT_RESET; } }, update:function $JSSMS$SN76489$$update$($offset$$, $samplesToGenerate$$) { - for(var $buffer$$ = [], $sample$$ = 0, $feedback_i$$ = 0;$sample$$ < $samplesToGenerate$$;$sample$$++) { - for($feedback_i$$ = 0;3 > $feedback_i$$;$feedback_i$$++) { - this.outputChannel[$feedback_i$$] = this.freqPos[$feedback_i$$] != NO_ANTIALIAS ? PSG_VOLUME[this.reg[($feedback_i$$ << 1) + 1]] * this.freqPos[$feedback_i$$] >> SCALE : PSG_VOLUME[this.reg[($feedback_i$$ << 1) + 1]] * this.freqPolarity[$feedback_i$$] + for (var $buffer$$ = [], $sample$$ = 0, $feedback_i$$ = 0;$sample$$ < $samplesToGenerate$$;$sample$$++) { + for ($feedback_i$$ = 0;3 > $feedback_i$$;$feedback_i$$++) { + this.outputChannel[$feedback_i$$] = this.freqPos[$feedback_i$$] != NO_ANTIALIAS ? PSG_VOLUME[this.reg[($feedback_i$$ << 1) + 1]] * this.freqPos[$feedback_i$$] >> SCALE : PSG_VOLUME[this.reg[($feedback_i$$ << 1) + 1]] * this.freqPolarity[$feedback_i$$]; } this.outputChannel[3] = PSG_VOLUME[this.reg[7]] * (this.noiseShiftReg & 1) << 1; $feedback_i$$ = this.outputChannel[0] + this.outputChannel[1] + this.outputChannel[2] + this.outputChannel[3]; @@ -7866,19 +7864,19 @@ JSSMS.SN76489.prototype = {init:function $JSSMS$SN76489$$init$($clockSpeed$$, $s this.freqCounter[1] -= $clockCycles$$; this.freqCounter[2] -= $clockCycles$$; this.freqCounter[3] = 128 == this.noiseFreq ? this.freqCounter[2] : this.freqCounter[3] - $clockCycles$$; - for($feedback_i$$ = 0;3 > $feedback_i$$;$feedback_i$$++) { + for ($feedback_i$$ = 0;3 > $feedback_i$$;$feedback_i$$++) { var $counter$$ = this.freqCounter[$feedback_i$$]; - if(0 >= $counter$$) { + if (0 >= $counter$$) { var $tone$$ = this.reg[$feedback_i$$ << 1]; 6 < $tone$$ ? (this.freqPos[$feedback_i$$] = ($clockCyclesScaled$$ - this.clockFrac + (2 << SCALE) * $counter$$ << SCALE) * this.freqPolarity[$feedback_i$$] / ($clockCyclesScaled$$ + this.clockFrac), this.freqPolarity[$feedback_i$$] = -this.freqPolarity[$feedback_i$$]) : (this.freqPolarity[$feedback_i$$] = 1, this.freqPos[$feedback_i$$] = NO_ANTIALIAS); - this.freqCounter[$feedback_i$$] += $tone$$ * ($clockCycles$$ / $tone$$ + 1) - }else { - this.freqPos[$feedback_i$$] = NO_ANTIALIAS + this.freqCounter[$feedback_i$$] += $tone$$ * ($clockCycles$$ / $tone$$ + 1); + } else { + this.freqPos[$feedback_i$$] = NO_ANTIALIAS; } } - 0 >= this.freqCounter[3] && (this.freqPolarity[3] = -this.freqPolarity[3], 128 != this.noiseFreq && (this.freqCounter[3] += this.noiseFreq * ($clockCycles$$ / this.noiseFreq + 1)), 1 == this.freqPolarity[3] && ($feedback_i$$ = 0, $feedback_i$$ = 0 != (this.reg[6] & 4) ? 0 != (this.noiseShiftReg & FEEDBACK_PATTERN) && 0 != (this.noiseShiftReg & FEEDBACK_PATTERN ^ FEEDBACK_PATTERN) ? 1 : 0 : this.noiseShiftReg & 1, this.noiseShiftReg = this.noiseShiftReg >> 1 | $feedback_i$$ << 15)) + 0 >= this.freqCounter[3] && (this.freqPolarity[3] = -this.freqPolarity[3], 128 != this.noiseFreq && (this.freqCounter[3] += this.noiseFreq * ($clockCycles$$ / this.noiseFreq + 1)), 1 == this.freqPolarity[3] && ($feedback_i$$ = 0, $feedback_i$$ = 0 !== (this.reg[6] & 4) ? 0 !== (this.noiseShiftReg & FEEDBACK_PATTERN) && 0 !== (this.noiseShiftReg & FEEDBACK_PATTERN ^ FEEDBACK_PATTERN) ? 1 : 0 : this.noiseShiftReg & 1, this.noiseShiftReg = this.noiseShiftReg >> 1 | $feedback_i$$ << 15)); } - return $buffer$$ + return $buffer$$; }}; var NTSC = 0, PAL = 1, SMS_X_PIXELS = 342, SMS_Y_PIXELS_NTSC = 262, SMS_Y_PIXELS_PAL = 313, SMS_WIDTH = 256, SMS_HEIGHT = 192, GG_WIDTH = 160, GG_HEIGHT = 144, GG_X_OFFSET = 48, GG_Y_OFFSET = 24, STATUS_VINT = 128, STATUS_OVERFLOW = 64, STATUS_COLLISION = 32, STATUS_HINT = 4, BGT_LENGTH = 1792, SPRITES_PER_LINE = 8, SPRITE_COUNT = 0, SPRITE_X = 1, SPRITE_Y = 2, SPRITE_N = 3, TOTAL_TILES = 512, TILE_SIZE = 8; JSSMS.Vdp = function $JSSMS$Vdp$($sms$$) { @@ -7887,8 +7885,8 @@ JSSMS.Vdp = function $JSSMS$Vdp$($sms$$) { this.videoMode = NTSC; this.VRAM = new JSSMS.Utils.Uint8Array(16384); this.CRAM = new JSSMS.Utils.Uint8Array(96); - for($i$$ = 0;96 > $i$$;$i$$++) { - this.CRAM[$i$$] = 255 + for ($i$$ = 0;96 > $i$$;$i$$++) { + this.CRAM[$i$$] = 255; } this.vdpreg = new JSSMS.Utils.Uint8Array(16); this.status = 0; @@ -7907,20 +7905,20 @@ JSSMS.Vdp = function $JSSMS$Vdp$($sms$$) { this.sat = this.h_end = this.h_start = 0; this.isSatDirty = !1; this.lineSprites = Array(SMS_HEIGHT); - for($i$$ = 0;$i$$ < SMS_HEIGHT;$i$$++) { - this.lineSprites[$i$$] = new JSSMS.Utils.Uint8Array(1 + 3 * SPRITES_PER_LINE) + for ($i$$ = 0;$i$$ < SMS_HEIGHT;$i$$++) { + this.lineSprites[$i$$] = new JSSMS.Utils.Uint8Array(1 + 3 * SPRITES_PER_LINE); } this.tiles = Array(TOTAL_TILES); this.isTileDirty = new JSSMS.Utils.Uint8Array(TOTAL_TILES); this.maxDirty = this.minDirty = 0; this.createCachedImages(); - this.generateConvertedPals() + this.generateConvertedPals(); }; JSSMS.Vdp.prototype = {reset:function $JSSMS$Vdp$$reset$() { var $i$$; this.firstByte = !0; - for($i$$ = this.operation = this.status = this.counter = this.location = 0;16 > $i$$;$i$$++) { - this.vdpreg[$i$$] = 0 + for ($i$$ = this.operation = this.status = this.counter = this.location = 0;16 > $i$$;$i$$++) { + this.vdpreg[$i$$] = 0; } this.vdpreg[2] = 14; this.vdpreg[5] = 126; @@ -7929,53 +7927,53 @@ JSSMS.Vdp.prototype = {reset:function $JSSMS$Vdp$$reset$() { this.isSatDirty = !0; this.minDirty = TOTAL_TILES; this.maxDirty = -1; - for($i$$ = 0;16384 > $i$$;$i$$++) { - this.VRAM[$i$$] = 0 + for ($i$$ = 0;16384 > $i$$;$i$$++) { + this.VRAM[$i$$] = 0; } - for($i$$ = 0;$i$$ < 4 * SMS_WIDTH * SMS_HEIGHT;$i$$ += 4) { - this.display[$i$$] = 0, this.display[$i$$ + 1] = 0, this.display[$i$$ + 2] = 0, this.display[$i$$ + 3] = 255 + for ($i$$ = 0;$i$$ < SMS_WIDTH * SMS_HEIGHT * 4;$i$$ += 4) { + this.display[$i$$] = 0, this.display[$i$$ + 1] = 0, this.display[$i$$ + 2] = 0, this.display[$i$$ + 3] = 255; } }, forceFullRedraw:function $JSSMS$Vdp$$forceFullRedraw$() { this.bgt = (this.vdpreg[2] & 14) << 10; this.minDirty = 0; this.maxDirty = TOTAL_TILES - 1; - for(var $i$$ = 0;$i$$ < TOTAL_TILES;$i$$++) { - this.isTileDirty[$i$$] = 1 + for (var $i$$ = 0;$i$$ < TOTAL_TILES;$i$$++) { + this.isTileDirty[$i$$] = 1; } this.sat = (this.vdpreg[5] & -130) << 7; - this.isSatDirty = !0 + this.isSatDirty = !0; }, getVCount:function $JSSMS$Vdp$$getVCount$() { - if(this.videoMode == NTSC) { - if(218 < this.line) { - return this.line - 6 + if (this.videoMode == NTSC) { + if (218 < this.line) { + return this.line - 6; } - }else { - if(242 < this.line) { - return this.line - 57 + } else { + if (242 < this.line) { + return this.line - 57; } } - return this.line + return this.line; }, controlRead:function $JSSMS$Vdp$$controlRead$() { this.firstByte = !0; var $statuscopy$$ = this.status; this.status = 0; this.main.cpu.interruptLine = !1; - return $statuscopy$$ + return $statuscopy$$; }, controlWrite:function $JSSMS$Vdp$$controlWrite$($reg$$1_value$$) { - if(this.firstByte) { - this.firstByte = !1, this.commandByte = $reg$$1_value$$, this.location = this.location & 16128 | $reg$$1_value$$ - }else { - if(this.firstByte = !0, this.operation = $reg$$1_value$$ >> 6 & 3, this.location = this.commandByte | $reg$$1_value$$ << 8, 0 == this.operation) { - this.readBuffer = this.VRAM[this.location++ & 16383] & 255 - }else { - if(2 == this.operation) { + if (this.firstByte) { + this.firstByte = !1, this.commandByte = $reg$$1_value$$, this.location = this.location & 16128 | $reg$$1_value$$; + } else { + if (this.firstByte = !0, this.operation = $reg$$1_value$$ >> 6 & 3, this.location = this.commandByte | $reg$$1_value$$ << 8, 0 === this.operation) { + this.readBuffer = this.VRAM[this.location++ & 16383] & 255; + } else { + if (2 == this.operation) { $reg$$1_value$$ &= 15; switch($reg$$1_value$$) { case 0: - ACCURATE_INTERRUPT_EMULATION && 0 != (this.status & STATUS_HINT) && (this.main.cpu.interruptLine = 0 != (this.commandByte & 16)); + ACCURATE_INTERRUPT_EMULATION && 0 !== (this.status & STATUS_HINT) && (this.main.cpu.interruptLine = 0 !== (this.commandByte & 16)); break; case 1: - 0 != (this.status & STATUS_VINT) && 0 != (this.commandByte & 32) && (this.main.cpu.interruptLine = !0); + 0 !== (this.status & STATUS_VINT) && 0 !== (this.commandByte & 32) && (this.main.cpu.interruptLine = !0); (this.commandByte & 3) != (this.vdpreg[$reg$$1_value$$] & 3) && (this.isSatDirty = !0); break; case 2: @@ -7984,9 +7982,9 @@ JSSMS.Vdp.prototype = {reset:function $JSSMS$Vdp$$reset$() { case 5: var $old$$ = this.sat; this.sat = (this.commandByte & -130) << 7; - $old$$ != this.sat && (this.isSatDirty = !0) + $old$$ != this.sat && (this.isSatDirty = !0); } - this.vdpreg[$reg$$1_value$$] = this.commandByte + this.vdpreg[$reg$$1_value$$] = this.commandByte; } } } @@ -7994,7 +7992,7 @@ JSSMS.Vdp.prototype = {reset:function $JSSMS$Vdp$$reset$() { this.firstByte = !0; var $value$$ = this.readBuffer; this.readBuffer = this.VRAM[this.location++ & 16383] & 255; - return $value$$ + return $value$$; }, dataWrite:function $JSSMS$Vdp$$dataWrite$($value$$) { var $address$$15_temp$$ = 0; this.firstByte = !0; @@ -8005,156 +8003,156 @@ JSSMS.Vdp.prototype = {reset:function $JSSMS$Vdp$$reset$() { ; case 2: $address$$15_temp$$ = this.location & 16383; - if($value$$ != (this.VRAM[$address$$15_temp$$] & 255)) { - if($address$$15_temp$$ >= this.sat && $address$$15_temp$$ < this.sat + 64) { - this.isSatDirty = !0 - }else { - if($address$$15_temp$$ >= this.sat + 128 && $address$$15_temp$$ < this.sat + 256) { - this.isSatDirty = !0 - }else { + if ($value$$ != (this.VRAM[$address$$15_temp$$] & 255)) { + if ($address$$15_temp$$ >= this.sat && $address$$15_temp$$ < this.sat + 64) { + this.isSatDirty = !0; + } else { + if ($address$$15_temp$$ >= this.sat + 128 && $address$$15_temp$$ < this.sat + 256) { + this.isSatDirty = !0; + } else { var $tileIndex$$ = $address$$15_temp$$ >> 5; this.isTileDirty[$tileIndex$$] = 1; $tileIndex$$ < this.minDirty && (this.minDirty = $tileIndex$$); - $tileIndex$$ > this.maxDirty && (this.maxDirty = $tileIndex$$) + $tileIndex$$ > this.maxDirty && (this.maxDirty = $tileIndex$$); } } - this.VRAM[$address$$15_temp$$] = $value$$ + this.VRAM[$address$$15_temp$$] = $value$$; } break; case 3: - this.main.is_sms ? ($address$$15_temp$$ = 3 * (this.location & 31), this.CRAM[$address$$15_temp$$] = this.main_JAVA_R[$value$$], this.CRAM[$address$$15_temp$$ + 1] = this.main_JAVA_G[$value$$], this.CRAM[$address$$15_temp$$ + 2] = this.main_JAVA_B[$value$$]) : ($address$$15_temp$$ = 3 * ((this.location & 63) >> 1), 0 == (this.location & 1) ? (this.CRAM[$address$$15_temp$$] = this.GG_JAVA_R[$value$$], this.CRAM[$address$$15_temp$$ + 1] = this.GG_JAVA_G[$value$$]) : this.CRAM[$address$$15_temp$$ + - 2] = this.GG_JAVA_B[$value$$]) + this.main.is_sms ? ($address$$15_temp$$ = 3 * (this.location & 31), this.CRAM[$address$$15_temp$$] = this.main_JAVA_R[$value$$], this.CRAM[$address$$15_temp$$ + 1] = this.main_JAVA_G[$value$$], this.CRAM[$address$$15_temp$$ + 2] = this.main_JAVA_B[$value$$]) : ($address$$15_temp$$ = 3 * ((this.location & 63) >> 1), 0 === (this.location & 1) ? (this.CRAM[$address$$15_temp$$] = this.GG_JAVA_R[$value$$], this.CRAM[$address$$15_temp$$ + 1] = this.GG_JAVA_G[$value$$]) : this.CRAM[$address$$15_temp$$ + + 2] = this.GG_JAVA_B[$value$$]); } ACCURATE && (this.readBuffer = $value$$); - this.location++ + this.location++; }, interrupts:function $JSSMS$Vdp$$interrupts$($lineno$$) { - 192 >= $lineno$$ ? (ACCURATE_INTERRUPT_EMULATION || 192 != $lineno$$ || (this.status |= STATUS_VINT), 0 == this.counter ? (this.counter = this.vdpreg[10], this.status |= STATUS_HINT) : this.counter--, 0 != (this.status & STATUS_HINT) && 0 != (this.vdpreg[0] & 16) && (this.main.cpu.interruptLine = !0)) : (this.counter = this.vdpreg[10], 0 != (this.status & STATUS_VINT) && (0 != (this.vdpreg[1] & 32) && 224 > $lineno$$) && (this.main.cpu.interruptLine = !0), ACCURATE && $lineno$$ == this.main.no_of_scanlines - - 1 && (this.vScrollLatch = this.vdpreg[9])) + 192 >= $lineno$$ ? (ACCURATE_INTERRUPT_EMULATION || 192 != $lineno$$ || (this.status |= STATUS_VINT), 0 === this.counter ? (this.counter = this.vdpreg[10], this.status |= STATUS_HINT) : this.counter--, 0 !== (this.status & STATUS_HINT) && 0 !== (this.vdpreg[0] & 16) && (this.main.cpu.interruptLine = !0)) : (this.counter = this.vdpreg[10], 0 !== (this.status & STATUS_VINT) && 0 !== (this.vdpreg[1] & 32) && 224 > $lineno$$ && (this.main.cpu.interruptLine = !0), ACCURATE && $lineno$$ == this.main.no_of_scanlines - + 1 && (this.vScrollLatch = this.vdpreg[9])); }, setVBlankFlag:function $JSSMS$Vdp$$setVBlankFlag$() { - this.status |= STATUS_VINT + this.status |= STATUS_VINT; }, drawLine:function $JSSMS$Vdp$$drawLine$($lineno$$) { var $i$$ = 0, $temp$$ = 0, $temp2$$ = 0; - if(!this.main.is_gg || !($lineno$$ < GG_Y_OFFSET || $lineno$$ >= GG_Y_OFFSET + GG_HEIGHT)) { - if(VDP_SPRITE_COLLISIONS) { - for($i$$ = 0;$i$$ < SMS_WIDTH;$i$$++) { - this.spriteCol[$i$$] = !1 + if (!this.main.is_gg || !($lineno$$ < GG_Y_OFFSET || $lineno$$ >= GG_Y_OFFSET + GG_HEIGHT)) { + if (VDP_SPRITE_COLLISIONS) { + for ($i$$ = 0;$i$$ < SMS_WIDTH;$i$$++) { + this.spriteCol[$i$$] = !1; } } - if(0 != (this.vdpreg[1] & 64)) { - if(-1 != this.maxDirty && this.decodeTiles(), this.drawBg($lineno$$), this.isSatDirty && this.decodeSat(), 0 != this.lineSprites[$lineno$$][SPRITE_COUNT] && this.drawSprite($lineno$$), this.main.is_sms && 0 != (this.vdpreg[0] & 32)) { - for($temp$$ = 4 * ($lineno$$ << 8), $temp2$$ = 3 * ((this.vdpreg[7] & 15) + 16), $i$$ = 0;8 > $i$$;$i$$++) { - this.display[$temp$$ + $i$$] = this.CRAM[$temp2$$], this.display[$temp$$ + $i$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + $i$$ + 2] = this.CRAM[$temp2$$ + 2] + if (0 !== (this.vdpreg[1] & 64)) { + if (-1 != this.maxDirty && this.decodeTiles(), this.drawBg($lineno$$), this.isSatDirty && this.decodeSat(), 0 !== this.lineSprites[$lineno$$][SPRITE_COUNT] && this.drawSprite($lineno$$), this.main.is_sms && 0 !== (this.vdpreg[0] & 32)) { + for ($temp$$ = 4 * ($lineno$$ << 8), $temp2$$ = 3 * ((this.vdpreg[7] & 15) + 16), $i$$ = 0;8 > $i$$;$i$$++) { + this.display[$temp$$ + $i$$] = this.CRAM[$temp2$$], this.display[$temp$$ + $i$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + $i$$ + 2] = this.CRAM[$temp2$$ + 2]; } } - }else { - this.drawBGColour($lineno$$) + } else { + this.drawBGColour($lineno$$); } } }, drawBg:function $JSSMS$Vdp$$drawBg$($lineno$$) { var $pixX_tile_props$$ = 0, $colour$$ = 0, $temp$$ = 0, $temp2$$ = 0, $hscroll$$ = this.vdpreg[8], $tile_y_vscroll$$ = ACCURATE ? this.vScrollLatch : this.vdpreg[9]; - 16 > $lineno$$ && 0 != (this.vdpreg[0] & 64) && ($hscroll$$ = 0); + 16 > $lineno$$ && 0 !== (this.vdpreg[0] & 64) && ($hscroll$$ = 0); var $lock$$ = this.vdpreg[0] & 128, $tile_column$$ = 32 - ($hscroll$$ >> 3) + this.h_start, $tile_row$$ = $lineno$$ + $tile_y_vscroll$$ >> 3; 27 < $tile_row$$ && ($tile_row$$ -= 28); - for(var $tile_y_vscroll$$ = ($lineno$$ + ($tile_y_vscroll$$ & 7) & 7) << 3, $row_precal$$ = $lineno$$ << 8, $tx$$ = this.h_start;$tx$$ < this.h_end;$tx$$++) { - var $pixX_tile_props$$ = this.bgt + (($tile_column$$ & 31) << 1) + ($tile_row$$ << 6), $secondbyte$$ = this.VRAM[$pixX_tile_props$$ + 1], $pal$$ = ($secondbyte$$ & 8) << 1, $sx$$ = ($tx$$ << 3) + ($hscroll$$ & 7), $pixY$$ = 0 == ($secondbyte$$ & 4) ? $tile_y_vscroll$$ : 56 - $tile_y_vscroll$$, $tile$$ = this.tiles[(this.VRAM[$pixX_tile_props$$] & 255) + (($secondbyte$$ & 1) << 8)]; - if(0 == ($secondbyte$$ & 2)) { - for($pixX_tile_props$$ = 0;8 > $pixX_tile_props$$ && $sx$$ < SMS_WIDTH;$pixX_tile_props$$++, $sx$$++) { - $colour$$ = $tile$$[$pixX_tile_props$$ + $pixY$$], $temp$$ = 4 * ($sx$$ + $row_precal$$), $temp2$$ = 3 * ($colour$$ + $pal$$), this.bgPriority[$sx$$] = 0 != ($secondbyte$$ & 16) && 0 != $colour$$, this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2] + for (var $tile_y_vscroll$$ = ($lineno$$ + ($tile_y_vscroll$$ & 7) & 7) << 3, $row_precal$$ = $lineno$$ << 8, $tx$$ = this.h_start;$tx$$ < this.h_end;$tx$$++) { + var $pixX_tile_props$$ = this.bgt + (($tile_column$$ & 31) << 1) + ($tile_row$$ << 6), $secondbyte$$ = this.VRAM[$pixX_tile_props$$ + 1], $pal$$ = ($secondbyte$$ & 8) << 1, $sx$$ = ($tx$$ << 3) + ($hscroll$$ & 7), $pixY$$ = 0 === ($secondbyte$$ & 4) ? $tile_y_vscroll$$ : 56 - $tile_y_vscroll$$, $tile$$ = this.tiles[(this.VRAM[$pixX_tile_props$$] & 255) + (($secondbyte$$ & 1) << 8)]; + if (0 === ($secondbyte$$ & 2)) { + for ($pixX_tile_props$$ = 0;8 > $pixX_tile_props$$ && $sx$$ < SMS_WIDTH;$pixX_tile_props$$++, $sx$$++) { + $colour$$ = $tile$$[$pixX_tile_props$$ + $pixY$$], $temp$$ = 4 * ($sx$$ + $row_precal$$), $temp2$$ = 3 * ($colour$$ + $pal$$), this.bgPriority[$sx$$] = 0 !== ($secondbyte$$ & 16) && 0 !== $colour$$, this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2]; } - }else { - for($pixX_tile_props$$ = 7;0 <= $pixX_tile_props$$ && $sx$$ < SMS_WIDTH;$pixX_tile_props$$--, $sx$$++) { - $colour$$ = $tile$$[$pixX_tile_props$$ + $pixY$$], $temp$$ = 4 * ($sx$$ + $row_precal$$), $temp2$$ = 3 * ($colour$$ + $pal$$), this.bgPriority[$sx$$] = 0 != ($secondbyte$$ & 16) && 0 != $colour$$, this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2] + } else { + for ($pixX_tile_props$$ = 7;0 <= $pixX_tile_props$$ && $sx$$ < SMS_WIDTH;$pixX_tile_props$$--, $sx$$++) { + $colour$$ = $tile$$[$pixX_tile_props$$ + $pixY$$], $temp$$ = 4 * ($sx$$ + $row_precal$$), $temp2$$ = 3 * ($colour$$ + $pal$$), this.bgPriority[$sx$$] = 0 !== ($secondbyte$$ & 16) && 0 !== $colour$$, this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2]; } } $tile_column$$++; - 0 != $lock$$ && 23 == $tx$$ && ($tile_row$$ = $lineno$$ >> 3, $tile_y_vscroll$$ = ($lineno$$ & 7) << 3) + 0 !== $lock$$ && 23 == $tx$$ && ($tile_row$$ = $lineno$$ >> 3, $tile_y_vscroll$$ = ($lineno$$ & 7) << 3); } }, drawSprite:function $JSSMS$Vdp$$drawSprite$($lineno$$) { - for(var $colour$$ = 0, $temp$$ = 0, $temp2$$ = 0, $i$$ = 0, $sprites$$ = this.lineSprites[$lineno$$], $count$$ = Math.min(SPRITES_PER_LINE, $sprites$$[SPRITE_COUNT]), $zoomed$$ = this.vdpreg[1] & 1, $row_precal$$ = $lineno$$ << 8, $off$$ = 3 * $count$$;$i$$ < $count$$;$i$$++) { - var $n$$3_tile$$ = $sprites$$[$off$$--] | (this.vdpreg[6] & 4) << 6, $pix_y$$ = $sprites$$[$off$$--], $x$$ = $sprites$$[$off$$--] - (this.vdpreg[0] & 8), $colour$$ = $lineno$$ - $pix_y$$ >> $zoomed$$; - 0 != (this.vdpreg[1] & 2) && ($n$$3_tile$$ &= -2); - $n$$3_tile$$ = this.tiles[$n$$3_tile$$ + (($colour$$ & 8) >> 3)]; + for (var $colour$$ = 0, $temp$$ = 0, $temp2$$ = 0, $i$$ = 0, $sprites$$ = this.lineSprites[$lineno$$], $count$$ = Math.min(SPRITES_PER_LINE, $sprites$$[SPRITE_COUNT]), $zoomed$$ = this.vdpreg[1] & 1, $row_precal$$ = $lineno$$ << 8, $off$$ = 3 * $count$$;$i$$ < $count$$;$i$$++) { + var $n$$4_tile$$ = $sprites$$[$off$$--] | (this.vdpreg[6] & 4) << 6, $pix_y$$ = $sprites$$[$off$$--], $x$$ = $sprites$$[$off$$--] - (this.vdpreg[0] & 8), $colour$$ = $lineno$$ - $pix_y$$ >> $zoomed$$; + 0 !== (this.vdpreg[1] & 2) && ($n$$4_tile$$ &= -2); + $n$$4_tile$$ = this.tiles[$n$$4_tile$$ + (($colour$$ & 8) >> 3)]; $pix_y$$ = 0; 0 > $x$$ && ($pix_y$$ = -$x$$, $x$$ = 0); var $offset$$ = $pix_y$$ + (($colour$$ & 7) << 3); - if(0 == $zoomed$$) { - for(;8 > $pix_y$$ && $x$$ < SMS_WIDTH;$pix_y$$++, $x$$++) { - $colour$$ = $n$$3_tile$$[$offset$$++], 0 == $colour$$ || this.bgPriority[$x$$] || ($temp$$ = 4 * ($x$$ + $row_precal$$), $temp2$$ = 3 * ($colour$$ + 16), this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2], VDP_SPRITE_COLLISIONS && (this.spriteCol[$x$$] ? this.status |= STATUS_COLLISION : this.spriteCol[$x$$] = !0)) + if (0 === $zoomed$$) { + for (;8 > $pix_y$$ && $x$$ < SMS_WIDTH;$pix_y$$++, $x$$++) { + $colour$$ = $n$$4_tile$$[$offset$$++], 0 === $colour$$ || this.bgPriority[$x$$] || ($temp$$ = 4 * ($x$$ + $row_precal$$), $temp2$$ = 3 * ($colour$$ + 16), this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2], VDP_SPRITE_COLLISIONS && (this.spriteCol[$x$$] ? this.status |= STATUS_COLLISION : this.spriteCol[$x$$] = !0)); } - }else { - for(;8 > $pix_y$$ && $x$$ < SMS_WIDTH;$pix_y$$++, $x$$ += 2) { - $colour$$ = $n$$3_tile$$[$offset$$++], 0 == $colour$$ || this.bgPriority[$x$$] || ($temp$$ = 4 * ($x$$ + $row_precal$$), $temp2$$ = 3 * ($colour$$ + 16), this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2], VDP_SPRITE_COLLISIONS && (this.spriteCol[$x$$] ? this.status |= STATUS_COLLISION : this.spriteCol[$x$$] = !0)), 0 == $colour$$ || this.bgPriority[$x$$ + 1] || ($temp$$ = 4 * ($x$$ + $row_precal$$ + - 1), $temp2$$ = 3 * ($colour$$ + 16), this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2], VDP_SPRITE_COLLISIONS && (this.spriteCol[$x$$ + 1] ? this.status |= STATUS_COLLISION : this.spriteCol[$x$$ + 1] = !0)) + } else { + for (;8 > $pix_y$$ && $x$$ < SMS_WIDTH;$pix_y$$++, $x$$ += 2) { + $colour$$ = $n$$4_tile$$[$offset$$++], 0 === $colour$$ || this.bgPriority[$x$$] || ($temp$$ = 4 * ($x$$ + $row_precal$$), $temp2$$ = 3 * ($colour$$ + 16), this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2], VDP_SPRITE_COLLISIONS && (this.spriteCol[$x$$] ? this.status |= STATUS_COLLISION : this.spriteCol[$x$$] = !0)), 0 === $colour$$ || this.bgPriority[$x$$ + 1] || ($temp$$ = 4 * ($x$$ + $row_precal$$ + + 1), $temp2$$ = 3 * ($colour$$ + 16), this.display[$temp$$] = this.CRAM[$temp2$$], this.display[$temp$$ + 1] = this.CRAM[$temp2$$ + 1], this.display[$temp$$ + 2] = this.CRAM[$temp2$$ + 2], VDP_SPRITE_COLLISIONS && (this.spriteCol[$x$$ + 1] ? this.status |= STATUS_COLLISION : this.spriteCol[$x$$ + 1] = !0)); } } } - $sprites$$[SPRITE_COUNT] >= SPRITES_PER_LINE && (this.status |= STATUS_OVERFLOW) + $sprites$$[SPRITE_COUNT] >= SPRITES_PER_LINE && (this.status |= STATUS_OVERFLOW); }, drawBGColour:function $JSSMS$Vdp$$drawBGColour$($lineno$$4_row_precal$$) { $lineno$$4_row_precal$$ <<= 8; var $length$$ = 4 * ($lineno$$4_row_precal$$ + 4 * SMS_WIDTH), $temp$$ = 3 * ((this.vdpreg[7] & 15) + 16); - for($lineno$$4_row_precal$$ *= 4;$lineno$$4_row_precal$$ < $length$$;$lineno$$4_row_precal$$ += 4) { - this.display[$lineno$$4_row_precal$$] = this.CRAM[$temp$$], this.display[$lineno$$4_row_precal$$ + 1] = this.CRAM[$temp$$ + 1], this.display[$lineno$$4_row_precal$$ + 2] = this.CRAM[$temp$$ + 2] + for ($lineno$$4_row_precal$$ *= 4;$lineno$$4_row_precal$$ < $length$$;$lineno$$4_row_precal$$ += 4) { + this.display[$lineno$$4_row_precal$$] = this.CRAM[$temp$$], this.display[$lineno$$4_row_precal$$ + 1] = this.CRAM[$temp$$ + 1], this.display[$lineno$$4_row_precal$$ + 2] = this.CRAM[$temp$$ + 2]; } }, decodeTiles:function $JSSMS$Vdp$$decodeTiles$() { - for(var $i$$ = this.minDirty;$i$$ <= this.maxDirty;$i$$++) { - if(this.isTileDirty[$i$$]) { + for (var $i$$ = this.minDirty;$i$$ <= this.maxDirty;$i$$++) { + if (this.isTileDirty[$i$$]) { this.isTileDirty[$i$$] = 0; - for(var $tile$$ = this.tiles[$i$$], $pixel_index$$ = 0, $address$$ = $i$$ << 5, $y$$ = 0;$y$$ < TILE_SIZE;$y$$++) { - for(var $address0$$ = this.VRAM[$address$$++], $address1$$ = this.VRAM[$address$$++], $address2$$ = this.VRAM[$address$$++], $address3$$ = this.VRAM[$address$$++], $bit$$ = 128;0 != $bit$$;$bit$$ >>= 1) { + for (var $tile$$ = this.tiles[$i$$], $pixel_index$$ = 0, $address$$ = $i$$ << 5, $y$$ = 0;$y$$ < TILE_SIZE;$y$$++) { + for (var $address0$$ = this.VRAM[$address$$++], $address1$$ = this.VRAM[$address$$++], $address2$$ = this.VRAM[$address$$++], $address3$$ = this.VRAM[$address$$++], $bit$$ = 128;0 !== $bit$$;$bit$$ >>= 1) { var $colour$$ = 0; - 0 != ($address0$$ & $bit$$) && ($colour$$ |= 1); - 0 != ($address1$$ & $bit$$) && ($colour$$ |= 2); - 0 != ($address2$$ & $bit$$) && ($colour$$ |= 4); - 0 != ($address3$$ & $bit$$) && ($colour$$ |= 8); - $tile$$[$pixel_index$$++] = $colour$$ + 0 !== ($address0$$ & $bit$$) && ($colour$$ |= 1); + 0 !== ($address1$$ & $bit$$) && ($colour$$ |= 2); + 0 !== ($address2$$ & $bit$$) && ($colour$$ |= 4); + 0 !== ($address3$$ & $bit$$) && ($colour$$ |= 8); + $tile$$[$pixel_index$$++] = $colour$$; } } } } this.minDirty = TOTAL_TILES; - this.maxDirty = -1 + this.maxDirty = -1; }, decodeSat:function $JSSMS$Vdp$$decodeSat$() { this.isSatDirty = !1; - for(var $height$$11_i$$ = 0;$height$$11_i$$ < this.lineSprites.length;$height$$11_i$$++) { - this.lineSprites[$height$$11_i$$][SPRITE_COUNT] = 0 + for (var $height$$11_i$$ = 0;$height$$11_i$$ < this.lineSprites.length;$height$$11_i$$++) { + this.lineSprites[$height$$11_i$$][SPRITE_COUNT] = 0; } - $height$$11_i$$ = 0 == (this.vdpreg[1] & 2) ? 8 : 16; + $height$$11_i$$ = 0 === (this.vdpreg[1] & 2) ? 8 : 16; 1 == (this.vdpreg[1] & 1) && ($height$$11_i$$ <<= 1); - for(var $spriteno$$ = 0;64 > $spriteno$$;$spriteno$$++) { + for (var $spriteno$$ = 0;64 > $spriteno$$;$spriteno$$++) { var $y$$ = this.VRAM[this.sat + $spriteno$$] & 255; - if(208 == $y$$) { - break + if (208 == $y$$) { + break; } $y$$++; 240 < $y$$ && ($y$$ -= 256); - for(var $lineno$$ = $y$$;$lineno$$ < SMS_HEIGHT;$lineno$$++) { - if($lineno$$ - $y$$ < $height$$11_i$$) { + for (var $lineno$$ = $y$$;$lineno$$ < SMS_HEIGHT;$lineno$$++) { + if ($lineno$$ - $y$$ < $height$$11_i$$) { var $sprites$$ = this.lineSprites[$lineno$$]; - if(!$sprites$$ || $sprites$$[SPRITE_COUNT] >= SPRITES_PER_LINE) { - break + if (!$sprites$$ || $sprites$$[SPRITE_COUNT] >= SPRITES_PER_LINE) { + break; } var $off$$ = 3 * $sprites$$[SPRITE_COUNT] + SPRITE_X, $address$$ = this.sat + ($spriteno$$ << 1) + 128; $sprites$$[$off$$++] = this.VRAM[$address$$++] & 255; $sprites$$[$off$$++] = $y$$; $sprites$$[$off$$++] = this.VRAM[$address$$] & 255; - $sprites$$[SPRITE_COUNT]++ + $sprites$$[SPRITE_COUNT]++; } } } }, createCachedImages:function $JSSMS$Vdp$$createCachedImages$() { - for(var $i$$ = 0;$i$$ < TOTAL_TILES;$i$$++) { - this.tiles[$i$$] = new JSSMS.Utils.Uint8Array(TILE_SIZE * TILE_SIZE) + for (var $i$$ = 0;$i$$ < TOTAL_TILES;$i$$++) { + this.tiles[$i$$] = new JSSMS.Utils.Uint8Array(TILE_SIZE * TILE_SIZE); } }, generateConvertedPals:function $JSSMS$Vdp$$generateConvertedPals$() { var $i$$, $r$$, $g$$, $b$$; - for($i$$ = 0;64 > $i$$;$i$$++) { - $r$$ = $i$$ & 3, $g$$ = $i$$ >> 2 & 3, $b$$ = $i$$ >> 4 & 3, this.main_JAVA_R[$i$$] = 85 * $r$$ & 255, this.main_JAVA_G[$i$$] = 85 * $g$$ & 255, this.main_JAVA_B[$i$$] = 85 * $b$$ & 255 + for ($i$$ = 0;64 > $i$$;$i$$++) { + $r$$ = $i$$ & 3, $g$$ = $i$$ >> 2 & 3, $b$$ = $i$$ >> 4 & 3, this.main_JAVA_R[$i$$] = 85 * $r$$ & 255, this.main_JAVA_G[$i$$] = 85 * $g$$ & 255, this.main_JAVA_B[$i$$] = 85 * $b$$ & 255; } - for($i$$ = 0;256 > $i$$;$i$$++) { - $g$$ = $i$$ & 15, $b$$ = $i$$ >> 4 & 15, this.GG_JAVA_R[$i$$] = ($g$$ << 4 | $g$$) & 255, this.GG_JAVA_G[$i$$] = ($b$$ << 4 | $b$$) & 255 + for ($i$$ = 0;256 > $i$$;$i$$++) { + $g$$ = $i$$ & 15, $b$$ = $i$$ >> 4 & 15, this.GG_JAVA_R[$i$$] = ($g$$ << 4 | $g$$) & 255, this.GG_JAVA_G[$i$$] = ($b$$ << 4 | $b$$) & 255; } - for($i$$ = 0;16 > $i$$;$i$$++) { - this.GG_JAVA_B[$i$$] = ($i$$ << 4 | $i$$) & 255 + for ($i$$ = 0;16 > $i$$;$i$$++) { + this.GG_JAVA_B[$i$$] = ($i$$ << 4 | $i$$) & 255; } }, getState:function $JSSMS$Vdp$$getState$() { var $state$$ = Array(51); @@ -8163,12 +8161,12 @@ JSSMS.Vdp.prototype = {reset:function $JSSMS$Vdp$$reset$() { $state$$[2] = this.counter | this.vScrollLatch << 8 | this.line << 16; JSSMS.Utils.copyArrayElements(this.vdpreg, 0, $state$$, 3, 16); JSSMS.Utils.copyArrayElements(this.CRAM, 0, $state$$, 19, 96); - return $state$$ + return $state$$; }, setState:function $JSSMS$Vdp$$setState$($state$$) { var $temp$$ = $state$$[0]; this.videoMode = $temp$$ & 255; this.status = $temp$$ >> 8 & 255; - this.firstByte = 0 != ($temp$$ >> 16 & 255); + this.firstByte = 0 !== ($temp$$ >> 16 & 255); this.commandByte = $temp$$ >> 24 & 255; $temp$$ = $state$$[1]; this.location = $temp$$ & 65535; @@ -8180,7 +8178,7 @@ JSSMS.Vdp.prototype = {reset:function $JSSMS$Vdp$$reset$() { this.line = $temp$$ >> 16 & 65535; JSSMS.Utils.copyArrayElements($state$$, 3, this.vdpreg, 0, 16); JSSMS.Utils.copyArrayElements($state$$, 19, this.CRAM, 0, 96); - this.forceFullRedraw() + this.forceFullRedraw(); }}; JSSMS.DummyUI = function $JSSMS$DummyUI$($sms$$) { this.main = $sms$$; @@ -8192,104 +8190,106 @@ JSSMS.DummyUI = function $JSSMS$DummyUI$($sms$$) { }; this.updateDisassembly = function $this$updateDisassembly$() { }; - this.canvasImageData = {data:[]} + this.canvasImageData = {data:[]}; }; window.$ && ($.fn.JSSMSUI = function $$$fn$JSSMSUI$($roms$$) { - var $parent$$ = this, $UI$$ = function $$UI$$$($root_sms$$) { - this.main = $root_sms$$; - if("[object OperaMini]" == Object.prototype.toString.call(window.operamini)) { - $($parent$$).html('
Oh no! Your browser can\'t run this emulator. Try the latest version of Firefox, Google Chrome, Opera or Safari!
') - }else { + var $parent$$ = this, $UI$$ = function $$UI$$$($root$$2_sms$$) { + function $touchStart$$($key$$) { + return function($evt$$) { + $self$$.main.keyboard.controller1 &= ~$key$$; + $evt$$.preventDefault(); + }; + } + function $touchEnd$$($key$$) { + return function($evt$$) { + $self$$.main.keyboard.controller1 |= $key$$; + $evt$$.preventDefault(); + }; + } + this.main = $root$$2_sms$$; + if ("[object OperaMini]" == Object.prototype.toString.call(window.operamini)) { + $($parent$$).html('
Oh no! Your browser can\'t run this emulator. Try the latest version of Firefox, Google Chrome, Opera or Safari!
'); + } else { var $self$$ = this; - $root_sms$$ = $("
"); + $root$$2_sms$$ = $("
"); var $screenContainer$$ = $('
'), $gamepadContainer$$ = $('
'), $controls$$ = $('
'), $fullscreenSupport$$ = JSSMS.Utils.getPrefix(["fullscreenEnabled", "mozFullScreenEnabled", "webkitCancelFullScreen"]), $requestAnimationFramePrefix_startButton$$ = JSSMS.Utils.getPrefix(["requestAnimationFrame", "msRequestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame"], window), $i$$; - if($requestAnimationFramePrefix_startButton$$) { - this.requestAnimationFrame = window[$requestAnimationFramePrefix_startButton$$].bind(window) - }else { + if ($requestAnimationFramePrefix_startButton$$) { + this.requestAnimationFrame = window[$requestAnimationFramePrefix_startButton$$].bind(window); + } else { var $lastTime$$ = 0; this.requestAnimationFrame = function $this$requestAnimationFrame$($callback$$) { var $currTime_timeToCall$$ = JSSMS.Utils.getTimestamp(), $currTime_timeToCall$$ = Math.max(0, 1E3 / 60 - ($currTime_timeToCall$$ - $lastTime$$)); window.setTimeout(function() { $lastTime$$ = JSSMS.Utils.getTimestamp(); - $callback$$() - }, $currTime_timeToCall$$) - } + $callback$$(); + }, $currTime_timeToCall$$); + }; } this.screen = $(""); this.canvasContext = this.screen[0].getContext("2d"); this.canvasContext.webkitImageSmoothingEnabled = !1; this.canvasContext.mozImageSmoothingEnabled = !1; this.canvasContext.imageSmoothingEnabled = !1; - if(this.canvasContext.getImageData) { + if (this.canvasContext.getImageData) { this.canvasImageData = this.canvasContext.getImageData(0, 0, SMS_WIDTH, SMS_HEIGHT); this.gamepad = {u:{e:$(".up", $gamepadContainer$$), k:KEY_UP}, r:{e:$(".right", $gamepadContainer$$), k:KEY_RIGHT}, d:{e:$(".down", $gamepadContainer$$), k:KEY_DOWN}, l:{e:$(".left", $gamepadContainer$$), k:KEY_LEFT}, 1:{e:$(".fire1", $gamepadContainer$$), k:KEY_FIRE1}, 2:{e:$(".fire2", $gamepadContainer$$), k:KEY_FIRE2}}; $requestAnimationFramePrefix_startButton$$ = $(".start", $gamepadContainer$$); this.romContainer = $('
'); this.romSelect = $("").change(function() { - $self$$.loadROM() + $self$$.loadROM(); }); this.buttons = Object.create(null); this.buttons.start = $('').click(function() { - $self$$.main.isRunning ? ($self$$.main.stop(), $self$$.updateStatus("Paused"), $self$$.buttons.start.attr("value", "Start")) : ($self$$.main.start(), $self$$.buttons.start.attr("value", "Pause")) + $self$$.main.isRunning ? ($self$$.main.stop(), $self$$.updateStatus("Paused"), $self$$.buttons.start.attr("value", "Start")) : ($self$$.main.start(), $self$$.buttons.start.attr("value", "Pause")); }); this.buttons.reset = $('').click(function() { - $self$$.main.reloadRom() ? ($self$$.main.reset(), $self$$.main.vdp.forceFullRedraw(), $self$$.main.start()) : $(this).attr("disabled", "disabled") + $self$$.main.reloadRom() ? ($self$$.main.reset(), $self$$.main.vdp.forceFullRedraw(), $self$$.main.start()) : $(this).attr("disabled", "disabled"); }); ENABLE_DEBUGGER && (this.dissambler = $('
'), $($parent$$).after(this.dissambler), this.buttons.nextStep = $('').click(function() { - $self$$.main.nextStep() + $self$$.main.nextStep(); })); this.main.soundEnabled && (this.buttons.sound = $('').click(function() { - $self$$.main.soundEnabled ? ($self$$.main.soundEnabled = !1, $self$$.buttons.sound.attr("value", "Enable sound")) : ($self$$.main.soundEnabled = !0, $self$$.buttons.sound.attr("value", "Disable sound")) + $self$$.main.soundEnabled ? ($self$$.main.soundEnabled = !1, $self$$.buttons.sound.attr("value", "Enable sound")) : ($self$$.main.soundEnabled = !0, $self$$.buttons.sound.attr("value", "Disable sound")); })); $fullscreenSupport$$ ? this.buttons.fullscreen = $('').click(function() { var $screen$$ = $screenContainer$$[0]; - $screen$$.requestFullscreen ? $screen$$.requestFullscreen() : $screen$$.mozRequestFullScreen ? $screen$$.mozRequestFullScreen() : $screen$$.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT) + $screen$$.requestFullscreen ? $screen$$.requestFullscreen() : $screen$$.mozRequestFullScreen ? $screen$$.mozRequestFullScreen() : $screen$$.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); }) : (this.zoomed = !1, this.buttons.zoom = $('').click(function() { $self$$.zoomed ? ($self$$.screen.animate({width:SMS_WIDTH + "px", height:SMS_HEIGHT + "px"}, function() { - $(this).removeAttr("style") + $(this).removeAttr("style"); }), $self$$.buttons.zoom.attr("value", "Zoom in")) : ($self$$.screen.animate({width:2 * SMS_WIDTH + "px", height:2 * SMS_HEIGHT + "px"}), $self$$.buttons.zoom.attr("value", "Zoom out")); - $self$$.zoomed = !$self$$.zoomed + $self$$.zoomed = !$self$$.zoomed; })); - for($i$$ in this.buttons) { - this.buttons[$i$$].appendTo($controls$$) + for ($i$$ in this.buttons) { + this.buttons[$i$$].appendTo($controls$$); } this.log = $('
'); this.screen.appendTo($screenContainer$$); $gamepadContainer$$.appendTo($screenContainer$$); - $screenContainer$$.appendTo($root_sms$$); - this.romContainer.appendTo($root_sms$$); - $controls$$.appendTo($root_sms$$); - this.log.appendTo($root_sms$$); - $root_sms$$.appendTo($($parent$$)); - void 0 != $roms$$ && this.setRoms($roms$$); + $screenContainer$$.appendTo($root$$2_sms$$); + this.romContainer.appendTo($root$$2_sms$$); + $controls$$.appendTo($root$$2_sms$$); + this.log.appendTo($root$$2_sms$$); + $root$$2_sms$$.appendTo($($parent$$)); + void 0 !== $roms$$ && this.setRoms($roms$$); $(document).bind("keydown", function($evt$$) { - $self$$.main.keyboard.keydown($evt$$) + $self$$.main.keyboard.keydown($evt$$); }).bind("keyup", function($evt$$) { - $self$$.main.keyboard.keyup($evt$$) + $self$$.main.keyboard.keyup($evt$$); }); - for($i$$ in this.gamepad) { - this.gamepad[$i$$].e.on("mousedown touchstart", function($key$$) { - return function($evt$$) { - $self$$.main.keyboard.controller1 &= ~$key$$; - $evt$$.preventDefault() - } - }(this.gamepad[$i$$].k)).on("mouseup touchend", function($key$$) { - return function($evt$$) { - $self$$.main.keyboard.controller1 |= $key$$; - $evt$$.preventDefault() - } - }(this.gamepad[$i$$].k)) + for ($i$$ in this.gamepad) { + this.gamepad[$i$$].e.on("mousedown touchstart", $touchStart$$(this.gamepad[$i$$].k)).on("mouseup touchend", $touchEnd$$(this.gamepad[$i$$].k)); } $requestAnimationFramePrefix_startButton$$.on("mousedown touchstart", function($evt$$) { $self$$.main.is_sms ? $self$$.main.pause_button = !0 : $self$$.main.keyboard.ggstart &= -129; - $evt$$.preventDefault() + $evt$$.preventDefault(); }).on("mouseup touchend", function($evt$$) { $self$$.main.is_sms || ($self$$.main.keyboard.ggstart |= 128); - $evt$$.preventDefault() - }) - }else { - $($parent$$).html('
Oh no! Your browser doesn\'t support writing pixels directly to the <canvas> tag. Try the latest version of Firefox, Google Chrome, Opera or Safari!
') + $evt$$.preventDefault(); + }); + } else { + $($parent$$).html('
Oh no! Your browser doesn\'t support writing pixels directly to the <canvas> tag. Try the latest version of Firefox, Google Chrome, Opera or Safari!
'); } } }; @@ -8297,57 +8297,57 @@ window.$ && ($.fn.JSSMSUI = function $$$fn$JSSMSUI$($roms$$) { this.screen[0].width = SMS_WIDTH; this.screen[0].height = SMS_HEIGHT; this.log.empty(); - ENABLE_DEBUGGER && this.dissambler.empty() + ENABLE_DEBUGGER && this.dissambler.empty(); }, setRoms:function $$UI$$$$setRoms$($roms$$) { var $groupName$$, $optgroup$$, $length$$, $i$$, $count$$ = 0; this.romSelect.children().remove(); $("").appendTo(this.romSelect); - for($groupName$$ in $roms$$) { - if($roms$$.hasOwnProperty($groupName$$)) { + for ($groupName$$ in $roms$$) { + if ($roms$$.hasOwnProperty($groupName$$)) { $optgroup$$ = $("").attr("label", $groupName$$); $length$$ = $roms$$[$groupName$$].length; - for($i$$ = 0;$i$$ < $length$$;$i$$++) { - $("").attr("value", $roms$$[$groupName$$][$i$$][1]).appendTo($optgroup$$) + for ($i$$ = 0;$i$$ < $length$$;$i$$++) { + $("").attr("value", $roms$$[$groupName$$][$i$$][1]).appendTo($optgroup$$); } - $optgroup$$.appendTo(this.romSelect) + $optgroup$$.appendTo(this.romSelect); } - $count$$++ + $count$$++; } - $count$$ && this.romSelect.appendTo(this.romContainer) + $count$$ && this.romSelect.appendTo(this.romContainer); }, loadROM:function $$UI$$$$loadROM$() { var $self$$ = this; this.updateStatus("Downloading..."); - $.ajax({url:escape(this.romSelect.val()), xhr:function() { + $.ajax({url:encodeURI(this.romSelect.val()), xhr:function() { var $xhr$$ = $.ajaxSettings.xhr(); - void 0 != $xhr$$.overrideMimeType && $xhr$$.overrideMimeType("text/plain; charset=x-user-defined"); - return $self$$.xhr = $xhr$$ + void 0 !== $xhr$$.overrideMimeType && $xhr$$.overrideMimeType("text/plain; charset=x-user-defined"); + return $self$$.xhr = $xhr$$; }, complete:function($xhr$$, $status$$) { var $data$$; - "error" == $status$$ ? $self$$.updateStatus("The selected ROM file could not be loaded.") : ($data$$ = $xhr$$.responseText, $self$$.main.stop(), $self$$.main.readRomDirectly($data$$, $self$$.romSelect.val()), $self$$.main.reset(), $self$$.main.vdp.forceFullRedraw(), $self$$.enable()) - }}) + "error" == $status$$ ? $self$$.updateStatus("The selected ROM file could not be loaded.") : ($data$$ = $xhr$$.responseText, $self$$.main.stop(), $self$$.main.readRomDirectly($data$$, $self$$.romSelect.val()), $self$$.main.reset(), $self$$.main.vdp.forceFullRedraw(), $self$$.enable()); + }}); }, enable:function $$UI$$$$enable$() { this.buttons.start.removeAttr("disabled"); this.buttons.start.attr("value", "Start"); this.buttons.reset.removeAttr("disabled"); ENABLE_DEBUGGER && this.buttons.nextStep.removeAttr("disabled"); - this.main.soundEnabled && (this.buttons.sound ? this.buttons.sound.attr("value", "Disable sound") : this.buttons.sound.attr("value", "Enable sound")) + this.main.soundEnabled && (this.buttons.sound ? this.buttons.sound.attr("value", "Disable sound") : this.buttons.sound.attr("value", "Enable sound")); }, updateStatus:function $$UI$$$$updateStatus$($s$$) { - this.log.text($s$$) + this.log.text($s$$); }, writeAudio:function $$UI$$$$writeAudio$($buffer$$) { }, writeFrame:function() { var $hiddenPrefix$$ = JSSMS.Utils.getPrefix(["hidden", "mozHidden", "webkitHidden", "msHidden"]); return $hiddenPrefix$$ ? function() { - document[$hiddenPrefix$$] || this.canvasContext.putImageData(this.canvasImageData, 0, 0) + document[$hiddenPrefix$$] || this.canvasContext.putImageData(this.canvasImageData, 0, 0); } : function() { - this.canvasContext.putImageData(this.canvasImageData, 0, 0) - } + this.canvasContext.putImageData(this.canvasImageData, 0, 0); + }; }(), updateDisassembly:function $$UI$$$$updateDisassembly$($currentAddress$$) { - for(var $instructions$$ = this.main.cpu.instructions, $length$$ = $instructions$$.length, $html$$ = "", $i$$ = 8 > $currentAddress$$ ? 0 : $currentAddress$$ - 8, $num$$ = 0;16 > $num$$ && $i$$ <= $length$$;$i$$++) { - $instructions$$[$i$$] && ($html$$ += "" + $instructions$$[$i$$].hexAddress + ($instructions$$[$i$$].isJumpTarget ? ":" : " ") + "" + $instructions$$[$i$$].inst + "", $num$$++) + for (var $instructions$$ = this.main.cpu.instructions, $length$$ = $instructions$$.length, $html$$ = "", $i$$ = 8 > $currentAddress$$ ? 0 : $currentAddress$$ - 8, $num$$ = 0;16 > $num$$ && $i$$ <= $length$$;$i$$++) { + $instructions$$[$i$$] && ($html$$ += "" + $instructions$$[$i$$].hexAddress + ($instructions$$[$i$$].isJumpTarget ? ":" : " ") + "" + $instructions$$[$i$$].inst + "", $num$$++); } - this.dissambler.html($html$$) + this.dissambler.html($html$$); }}; - return $UI$$ + return $UI$$; }); var IO_TR_DIRECTION = 0, IO_TH_DIRECTION = 1, IO_TR_OUTPUT = 2, IO_TH_OUTPUT = 3, IO_TH_INPUT = 4, PORT_A = 0, PORT_B = 5; JSSMS.Ports = function $JSSMS$Ports$($sms$$) { @@ -8357,15 +8357,15 @@ JSSMS.Ports = function $JSSMS$Ports$($sms$$) { this.keyboard = $sms$$.keyboard; this.europe = 64; this.hCounter = 0; - this.ioPorts = [] + this.ioPorts = []; }; JSSMS.Ports.prototype = {reset:function $JSSMS$Ports$$reset$() { - LIGHTGUN ? (this.ioPorts = Array(10), this.ioPorts[PORT_A + IO_TH_INPUT] = 1, this.ioPorts[PORT_B + IO_TH_INPUT] = 1) : this.ioPorts = Array(2) + LIGHTGUN ? (this.ioPorts = Array(10), this.ioPorts[PORT_A + IO_TH_INPUT] = 1, this.ioPorts[PORT_B + IO_TH_INPUT] = 1) : this.ioPorts = Array(2); }, out:function $JSSMS$Ports$$out$($port$$, $value$$) { - if(!(this.main.is_gg && 7 > $port$$)) { + if (!(this.main.is_gg && 7 > $port$$)) { switch($port$$ & 193) { case 1: - LIGHTGUN ? (this.oldTH = 0 != this.getTH(PORT_A) || 0 != this.getTH(PORT_B), this.writePort(PORT_A, $value$$), this.writePort(PORT_B, $value$$ >> 2), this.oldTH || 0 == this.getTH(PORT_A) && 0 == this.getTH(PORT_B) || (this.hCounter = this.getHCount())) : (this.ioPorts[0] = ($value$$ & 32) << 1, this.ioPorts[1] = $value$$ & 128, 0 == this.europe && (this.ioPorts[0] = ~this.ioPorts[0], this.ioPorts[1] = ~this.ioPorts[1])); + LIGHTGUN ? (this.oldTH = 0 !== this.getTH(PORT_A) || 0 !== this.getTH(PORT_B), this.writePort(PORT_A, $value$$), this.writePort(PORT_B, $value$$ >> 2), this.oldTH || 0 === this.getTH(PORT_A) && 0 === this.getTH(PORT_B) || (this.hCounter = this.getHCount())) : (this.ioPorts[0] = ($value$$ & 32) << 1, this.ioPorts[1] = $value$$ & 128, 0 === this.europe && (this.ioPorts[0] = ~this.ioPorts[0], this.ioPorts[1] = ~this.ioPorts[1])); break; case 128: this.vdp.dataWrite($value$$); @@ -8376,11 +8376,11 @@ JSSMS.Ports.prototype = {reset:function $JSSMS$Ports$$reset$() { case 64: ; case 65: - this.main.soundEnabled && this.psg.write($value$$) + this.main.soundEnabled && this.psg.write($value$$); } } }, in_:function $JSSMS$Ports$$in_$($port$$) { - if(this.main.is_gg && 7 > $port$$) { + if (this.main.is_gg && 7 > $port$$) { switch($port$$) { case 0: return this.keyboard.ggstart & 191 | this.europe; @@ -8395,7 +8395,7 @@ JSSMS.Ports.prototype = {reset:function $JSSMS$Ports$$reset$() { case 5: return 0; case 6: - return 255 + return 255; } } switch($port$$ & 193) { @@ -8410,30 +8410,30 @@ JSSMS.Ports.prototype = {reset:function $JSSMS$Ports$$reset$() { case 192: return this.keyboard.controller1; case 193: - return LIGHTGUN ? (this.keyboard.lightgunClick && this.lightPhaserSync(), this.keyboard.controller2 & 63 | (0 != this.getTH(PORT_A) ? 64 : 0) | (0 != this.getTH(PORT_B) ? 128 : 0)) : this.keyboard.controller2 & 63 | this.ioPorts[0] | this.ioPorts[1] + return LIGHTGUN ? (this.keyboard.lightgunClick && this.lightPhaserSync(), this.keyboard.controller2 & 63 | (0 !== this.getTH(PORT_A) ? 64 : 0) | (0 !== this.getTH(PORT_B) ? 128 : 0)) : this.keyboard.controller2 & 63 | this.ioPorts[0] | this.ioPorts[1]; } - return 255 + return 255; }, writePort:function $JSSMS$Ports$$writePort$($index$$, $value$$) { this.ioPorts[$index$$ + IO_TR_DIRECTION] = $value$$ & 1; this.ioPorts[$index$$ + IO_TH_DIRECTION] = $value$$ & 2; this.ioPorts[$index$$ + IO_TR_OUTPUT] = $value$$ & 16; - this.ioPorts[$index$$ + IO_TH_OUTPUT] = 0 == this.europe ? ~$value$$ & 32 : $value$$ & 32 + this.ioPorts[$index$$ + IO_TH_OUTPUT] = 0 === this.europe ? ~$value$$ & 32 : $value$$ & 32; }, getTH:function $JSSMS$Ports$$getTH$($index$$) { - return 0 == this.ioPorts[$index$$ + IO_TH_DIRECTION] ? this.ioPorts[$index$$ + IO_TH_OUTPUT] : this.ioPorts[$index$$ + IO_TH_INPUT] + return 0 === this.ioPorts[$index$$ + IO_TH_DIRECTION] ? this.ioPorts[$index$$ + IO_TH_OUTPUT] : this.ioPorts[$index$$ + IO_TH_INPUT]; }, setTH:function $JSSMS$Ports$$setTH$($index$$, $on$$) { this.ioPorts[$index$$ + IO_TH_DIRECTION] = 1; - this.ioPorts[$index$$ + IO_TH_INPUT] = $on$$ ? 1 : 0 + this.ioPorts[$index$$ + IO_TH_INPUT] = $on$$ ? 1 : 0; }, getHCount:function $JSSMS$Ports$$getHCount$() { var $v$$ = Math.round(this.main.cpu.getCycle() * SMS_X_PIXELS / this.main.cyclesPerLine) - 8 >> 1; 147 < $v$$ && ($v$$ += 85); - return $v$$ & 255 + return $v$$ & 255; }, X_RANGE:48, Y_RANGE:4, lightPhaserSync:function $JSSMS$Ports$$lightPhaserSync$() { var $oldTH$$ = this.getTH(PORT_A), $hc$$ = this.getHCount(), $dx$$ = this.keyboard.lightgunX - ($hc$$ << 1), $dy$$ = this.keyboard.lightgunY - this.vdp.line; - $dy$$ > -this.Y_RANGE && $dy$$ < this.Y_RANGE && $dx$$ > -this.X_RANGE && $dx$$ < this.X_RANGE ? (this.setTH(PORT_A, !1), $oldTH$$ != this.getTH(PORT_A) && (this.hCounter = 20 + (this.keyboard.lightgunX >> 1))) : (this.setTH(PORT_A, !0), $oldTH$$ != this.getTH(PORT_A) && (this.hCounter = $hc$$)) + $dy$$ > -this.Y_RANGE && $dy$$ < this.Y_RANGE && $dx$$ > -this.X_RANGE && $dx$$ < this.X_RANGE ? (this.setTH(PORT_A, !1), $oldTH$$ != this.getTH(PORT_A) && (this.hCounter = 20 + (this.keyboard.lightgunX >> 1))) : (this.setTH(PORT_A, !0), $oldTH$$ != this.getTH(PORT_A) && (this.hCounter = $hc$$)); }, setDomestic:function $JSSMS$Ports$$setDomestic$($value$$) { - this.europe = $value$$ ? 64 : 0 + this.europe = $value$$ ? 64 : 0; }, isDomestic:function $JSSMS$Ports$$isDomestic$() { - return 0 != this.europe + return 0 !== this.europe; }}; var Bytecode = function() { function $Bytecode$$($address$$, $page$$) { @@ -8443,24 +8443,24 @@ var Bytecode = function() { this.target = this.nextAddress = this.operand = null; this.isJumpTarget = this.canEnd = this.isFunctionEnder = !1; this.jumpTargetNb = 0; - this.ast = null + this.ast = null; } var $toHex$$ = JSSMS.Utils.toHex; $Bytecode$$.prototype = {get hexOpcode() { - return this.opcode.length ? this.opcode.map($toHex$$).join(" ") : "" + return this.opcode.length ? this.opcode.map($toHex$$).join(" ") : ""; }, get label() { var $name$$ = this.name ? this.name.replace(/(nn|n|PC\+e|d)/, $toHex$$(this.target || this.operand || 0)) : ""; - return $toHex$$(this.address + this.page * PAGE_SIZE) + " " + this.hexOpcode + " " + $name$$ + return $toHex$$(this.address + this.page * PAGE_SIZE) + " " + this.hexOpcode + " " + $name$$; }}; - return $Bytecode$$ + return $Bytecode$$; }(); var Parser = function() { function $disassemble$$($bytecode$$, $stream$$) { $stream$$.page = $bytecode$$.page; $stream$$.seek($bytecode$$.address + 16384 * $stream$$.page); - var $opcode$$13_opcode$$inline_13_opcode$$ = $stream$$.getUint8(), $operand$$3_operand$$ = null, $target$$48_target$$ = null, $isFunctionEnder_isFunctionEnder$$ = !1, $canEnd_canEnd$$ = !1; - $bytecode$$.opcode.push($opcode$$13_opcode$$inline_13_opcode$$); - switch($opcode$$13_opcode$$inline_13_opcode$$) { + var $opcode$$13_opcode$$inline_11_opcode$$ = $stream$$.getUint8(), $operand$$3_operand$$ = null, $target$$48_target$$ = null, $isFunctionEnder_isFunctionEnder$$ = !1, $canEnd_canEnd$$ = !1; + $bytecode$$.opcode.push($opcode$$13_opcode$$inline_11_opcode$$); + switch($opcode$$13_opcode$$inline_11_opcode$$) { case 0: break; case 1: @@ -8914,7 +8914,7 @@ var Parser = function() { $canEnd_canEnd$$ = !0; break; case 203: - return $opcode$$13_opcode$$inline_13_opcode$$ = $stream$$.getUint8(), $bytecode$$.opcode.push($opcode$$13_opcode$$inline_13_opcode$$), $bytecode$$.nextAddress = $stream$$.position, $bytecode$$; + return $opcode$$13_opcode$$inline_11_opcode$$ = $stream$$.getUint8(), $bytecode$$.opcode.push($opcode$$13_opcode$$inline_11_opcode$$), $bytecode$$.nextAddress = $stream$$.position, $bytecode$$; case 204: $target$$48_target$$ = $stream$$.getUint16(); $canEnd_canEnd$$ = !0; @@ -9022,11 +9022,11 @@ var Parser = function() { $canEnd_canEnd$$ = !0; break; case 237: - $opcode$$13_opcode$$inline_13_opcode$$ = $stream$$.getUint8(); + $opcode$$13_opcode$$inline_11_opcode$$ = $stream$$.getUint8(); $target$$48_target$$ = $operand$$3_operand$$ = null; $canEnd_canEnd$$ = $isFunctionEnder_isFunctionEnder$$ = !1; - $bytecode$$.opcode.push($opcode$$13_opcode$$inline_13_opcode$$); - switch($opcode$$13_opcode$$inline_13_opcode$$) { + $bytecode$$.opcode.push($opcode$$13_opcode$$inline_11_opcode$$); + switch($opcode$$13_opcode$$inline_11_opcode$$) { case 64: break; case 65: @@ -9200,7 +9200,7 @@ var Parser = function() { $canEnd_canEnd$$ = !0; break; default: - JSSMS.Utils.console.error("Unexpected opcode", "0xED " + $toHex$$($opcode$$13_opcode$$inline_13_opcode$$)) + JSSMS.Utils.console.error("Unexpected opcode", "0xED " + $toHex$$($opcode$$13_opcode$$inline_11_opcode$$)); } $bytecode$$.nextAddress = $stream$$.position; $bytecode$$.operand = $operand$$3_operand$$; @@ -9264,17 +9264,17 @@ var Parser = function() { $isFunctionEnder_isFunctionEnder$$ = !0; break; default: - JSSMS.Utils.console.error("Unexpected opcode", $toHex$$($opcode$$13_opcode$$inline_13_opcode$$)) + JSSMS.Utils.console.error("Unexpected opcode", $toHex$$($opcode$$13_opcode$$inline_11_opcode$$)); } $bytecode$$.nextAddress = $stream$$.position; $bytecode$$.operand = $operand$$3_operand$$; $bytecode$$.target = $target$$48_target$$; $bytecode$$.isFunctionEnder = $isFunctionEnder_isFunctionEnder$$; $bytecode$$.canEnd = $canEnd_canEnd$$; - return $bytecode$$ + return $bytecode$$; } function $getIndex$$($bytecode$$, $stream$$) { - var $opcode$$16_operand$$ = $stream$$.getUint8(), $opcode$$inline_22_operand$$ = null, $isFunctionEnder$$ = !1; + var $opcode$$16_operand$$ = $stream$$.getUint8(), $opcode$$inline_20_operand$$ = null, $isFunctionEnder$$ = !1; $bytecode$$.opcode.push($opcode$$16_operand$$); switch($opcode$$16_operand$$) { case 9: @@ -9282,10 +9282,10 @@ var Parser = function() { case 25: break; case 33: - $opcode$$inline_22_operand$$ = $stream$$.getUint16(); + $opcode$$inline_20_operand$$ = $stream$$.getUint16(); break; case 34: - $opcode$$inline_22_operand$$ = $stream$$.getUint16(); + $opcode$$inline_20_operand$$ = $stream$$.getUint16(); break; case 35: break; @@ -9294,12 +9294,12 @@ var Parser = function() { case 37: break; case 38: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 41: break; case 42: - $opcode$$inline_22_operand$$ = $stream$$.getUint16(); + $opcode$$inline_20_operand$$ = $stream$$.getUint16(); break; case 43: break; @@ -9308,16 +9308,16 @@ var Parser = function() { case 45: break; case 46: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 52: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 53: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 54: - $opcode$$inline_22_operand$$ = $stream$$.getUint16(); + $opcode$$inline_20_operand$$ = $stream$$.getUint16(); break; case 57: break; @@ -9326,28 +9326,28 @@ var Parser = function() { case 69: break; case 70: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 76: break; case 77: break; case 78: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 84: break; case 85: break; case 86: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 92: break; case 93: break; case 94: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 96: break; @@ -9362,7 +9362,7 @@ var Parser = function() { case 101: break; case 102: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 103: break; @@ -9379,96 +9379,96 @@ var Parser = function() { case 109: break; case 110: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 111: break; case 112: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 113: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 114: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 115: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 116: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 117: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 119: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 124: break; case 125: break; case 126: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 132: break; case 133: break; case 134: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 140: break; case 141: break; case 142: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 148: break; case 149: break; case 150: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 156: break; case 157: break; case 158: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 164: break; case 165: break; case 166: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 172: break; case 173: break; case 174: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 180: break; case 181: break; case 182: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 188: break; case 189: break; case 190: - $opcode$$inline_22_operand$$ = $stream$$.getUint8(); + $opcode$$inline_20_operand$$ = $stream$$.getUint8(); break; case 203: - return $opcode$$16_operand$$ = $stream$$.getUint8(), $opcode$$inline_22_operand$$ = $stream$$.getUint8(), $bytecode$$.opcode.push($opcode$$inline_22_operand$$), $bytecode$$.nextAddress = $stream$$.position, $bytecode$$.operand = $opcode$$16_operand$$, $bytecode$$; + return $opcode$$16_operand$$ = $stream$$.getUint8(), $opcode$$inline_20_operand$$ = $stream$$.getUint8(), $bytecode$$.opcode.push($opcode$$inline_20_operand$$), $bytecode$$.nextAddress = $stream$$.position, $bytecode$$.operand = $opcode$$16_operand$$, $bytecode$$; case 225: break; case 227: @@ -9482,17 +9482,17 @@ var Parser = function() { case 249: break; default: - JSSMS.Utils.console.error("Unexpected opcode", "0xDD/0xFD " + $toHex$$($opcode$$16_operand$$)) + JSSMS.Utils.console.error("Unexpected opcode", "0xDD/0xFD " + $toHex$$($opcode$$16_operand$$)); } $bytecode$$.nextAddress = $stream$$.position; - $bytecode$$.operand = $opcode$$inline_22_operand$$; + $bytecode$$.operand = $opcode$$inline_20_operand$$; $bytecode$$.isFunctionEnder = $isFunctionEnder$$; - return $bytecode$$ + return $bytecode$$; } function $RomStream$$($rom$$) { this.rom = $rom$$; this.pos = null; - this.page = 0 + this.page = 0; } var $toHex$$ = JSSMS.Utils.toHex, $parser$$ = function $$parser$$$($rom$$, $frameReg$$) { this.stream = new $RomStream$$($rom$$); @@ -9500,708 +9500,689 @@ var Parser = function() { this.addresses = Array($rom$$.length); this.entryPoints = []; this.bytecodes = Array($rom$$.length); - for(var $i$$ = 0;$i$$ < $rom$$.length;$i$$++) { - this.addresses[$i$$] = [], this.bytecodes[$i$$] = [] + for (var $i$$ = 0;$i$$ < $rom$$.length;$i$$++) { + this.addresses[$i$$] = [], this.bytecodes[$i$$] = []; } }; $parser$$.prototype = {addEntryPoint:function $$parser$$$$addEntryPoint$($obj$$) { this.entryPoints.push($obj$$); - this.addAddress($obj$$.address) + this.addAddress($obj$$.address); }, parse:function $$parser$$$$parse$($currentPage_entryPoint$$2_page$$) { JSSMS.Utils.console.time("Parsing"); var $i$$, $length$$; - void 0 == $currentPage_entryPoint$$2_page$$ ? ($i$$ = 0, $length$$ = this.stream.length - 1) : ($i$$ = 0, $length$$ = 16383); - for($currentPage_entryPoint$$2_page$$ = 0;$currentPage_entryPoint$$2_page$$ < this.addresses.length;$currentPage_entryPoint$$2_page$$++) { - for(;this.addresses[$currentPage_entryPoint$$2_page$$].length;) { + void 0 === $currentPage_entryPoint$$2_page$$ ? ($i$$ = 0, $length$$ = this.stream.length - 1) : ($i$$ = 0, $length$$ = 16383); + for ($currentPage_entryPoint$$2_page$$ = 0;$currentPage_entryPoint$$2_page$$ < this.addresses.length;$currentPage_entryPoint$$2_page$$++) { + for (;this.addresses[$currentPage_entryPoint$$2_page$$].length;) { var $currentAddress$$ = this.addresses[$currentPage_entryPoint$$2_page$$].shift().address % 16384; - if($currentAddress$$ < $i$$ || $currentAddress$$ > $length$$) { - JSSMS.Utils.console.error("Address out of bound", $toHex$$($currentAddress$$)) - }else { - if(!this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$]) { + if ($currentAddress$$ < $i$$ || $currentAddress$$ > $length$$) { + JSSMS.Utils.console.error("Address out of bound", $toHex$$($currentAddress$$)); + } else { + if (!this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$]) { var $bytecode$$ = new Bytecode($currentAddress$$, $currentPage_entryPoint$$2_page$$); this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$] = $disassemble$$($bytecode$$, this.stream); - null != this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].nextAddress && (this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].nextAddress >= $i$$ && this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].nextAddress <= $length$$) && this.addAddress(this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].nextAddress); - null != this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].target && (this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].target >= $i$$ && this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].target <= $length$$) && this.addAddress(this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].target) + null !== this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].nextAddress && this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].nextAddress >= $i$$ && this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].nextAddress <= $length$$ && this.addAddress(this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].nextAddress); + null !== this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].target && this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].target >= $i$$ && this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].target <= $length$$ && this.addAddress(this.bytecodes[$currentPage_entryPoint$$2_page$$][$currentAddress$$].target); } } } } this.bytecodes[0][1023] ? this.bytecodes[0][1023].isFunctionEnder = !0 : this.bytecodes[0][1022] && (this.bytecodes[0][1022].isFunctionEnder = !0); $i$$ = $length$$ = $i$$ = 0; - for($length$$ = this.entryPoints.length;$i$$ < $length$$;$i$$++) { - $currentPage_entryPoint$$2_page$$ = this.entryPoints[$i$$].address, $currentAddress$$ = this.entryPoints[$i$$].romPage, this.bytecodes[$currentAddress$$][$currentPage_entryPoint$$2_page$$].isJumpTarget = !0, this.bytecodes[$currentAddress$$][$currentPage_entryPoint$$2_page$$].jumpTargetNb++ + for ($length$$ = this.entryPoints.length;$i$$ < $length$$;$i$$++) { + $currentPage_entryPoint$$2_page$$ = this.entryPoints[$i$$].address, $currentAddress$$ = this.entryPoints[$i$$].romPage, this.bytecodes[$currentAddress$$][$currentPage_entryPoint$$2_page$$].isJumpTarget = !0, this.bytecodes[$currentAddress$$][$currentPage_entryPoint$$2_page$$].jumpTargetNb++; } - for($currentPage_entryPoint$$2_page$$ = 0;$currentPage_entryPoint$$2_page$$ < this.bytecodes.length;$currentPage_entryPoint$$2_page$$++) { - for($i$$ = 0, $length$$ = this.bytecodes[$currentPage_entryPoint$$2_page$$].length;$i$$ < $length$$;$i$$++) { - this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$] && (null != this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].nextAddress && this.bytecodes[$currentPage_entryPoint$$2_page$$][this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].nextAddress] && this.bytecodes[$currentPage_entryPoint$$2_page$$][this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].nextAddress].jumpTargetNb++, null != this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].target && ($currentAddress$$ = ~~(this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].target / - 16384), $bytecode$$ = this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].target % 16384, this.bytecodes[$currentAddress$$] && this.bytecodes[$currentAddress$$][$bytecode$$] ? (this.bytecodes[$currentAddress$$][$bytecode$$].isJumpTarget = !0, this.bytecodes[$currentAddress$$][$bytecode$$].jumpTargetNb++) : JSSMS.Utils.console.log("Invalid target address", $toHex$$(this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].target)))) + for ($currentPage_entryPoint$$2_page$$ = 0;$currentPage_entryPoint$$2_page$$ < this.bytecodes.length;$currentPage_entryPoint$$2_page$$++) { + for ($i$$ = 0, $length$$ = this.bytecodes[$currentPage_entryPoint$$2_page$$].length;$i$$ < $length$$;$i$$++) { + this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$] && (null !== this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].nextAddress && this.bytecodes[$currentPage_entryPoint$$2_page$$][this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].nextAddress] && this.bytecodes[$currentPage_entryPoint$$2_page$$][this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].nextAddress].jumpTargetNb++, null !== this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].target && ($currentAddress$$ = + ~~(this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].target / 16384), $bytecode$$ = this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].target % 16384, this.bytecodes[$currentAddress$$] && this.bytecodes[$currentAddress$$][$bytecode$$] ? (this.bytecodes[$currentAddress$$][$bytecode$$].isJumpTarget = !0, this.bytecodes[$currentAddress$$][$bytecode$$].jumpTargetNb++) : JSSMS.Utils.console.log("Invalid target address", $toHex$$(this.bytecodes[$currentPage_entryPoint$$2_page$$][$i$$].target)))) + ; } } - JSSMS.Utils.console.timeEnd("Parsing") + JSSMS.Utils.console.timeEnd("Parsing"); }, parseFromAddress:function $$parser$$$$parseFromAddress$($obj$$37_romPage$$) { var $address$$ = $obj$$37_romPage$$.address % 16384; $obj$$37_romPage$$ = $obj$$37_romPage$$.romPage; var $pageStart$$ = 16384 * $obj$$37_romPage$$, $pageEnd$$ = 16384 * ($obj$$37_romPage$$ + 1), $branch$$ = [], $bytecode$$, $startingBytecode$$ = !0, $absoluteAddress$$ = 0; - 1024 > $address$$ && 0 == $obj$$37_romPage$$ && ($pageStart$$ = 0, $pageEnd$$ = 1024); + 1024 > $address$$ && 0 === $obj$$37_romPage$$ && ($pageStart$$ = 0, $pageEnd$$ = 1024); do { this.bytecodes[$obj$$37_romPage$$][$address$$] ? $bytecode$$ = this.bytecodes[$obj$$37_romPage$$][$address$$] : ($bytecode$$ = new Bytecode($address$$, $obj$$37_romPage$$), this.bytecodes[$obj$$37_romPage$$][$address$$] = $disassemble$$($bytecode$$, this.stream)); - if($bytecode$$.canEnd && !$startingBytecode$$) { - break + if ($bytecode$$.canEnd && !$startingBytecode$$) { + break; } $address$$ = $bytecode$$.nextAddress % 16384; $branch$$.push($bytecode$$); $startingBytecode$$ = !1; - $absoluteAddress$$ = $address$$ + 16384 * $obj$$37_romPage$$ - }while(null != $address$$ && $absoluteAddress$$ >= $pageStart$$ && $absoluteAddress$$ < $pageEnd$$ && !$bytecode$$.isFunctionEnder); - return $branch$$ + $absoluteAddress$$ = $address$$ + 16384 * $obj$$37_romPage$$; + } while (null !== $address$$ && $absoluteAddress$$ >= $pageStart$$ && $absoluteAddress$$ < $pageEnd$$ && !$bytecode$$.isFunctionEnder); + return $branch$$; }, writeGraphViz:function $$parser$$$$writeGraphViz$() { JSSMS.Utils.console.time("DOT generation"); - for(var $tree$$ = this.bytecodes, $content$$ = ["digraph G {"], $i$$ = 0, $length$$ = $tree$$.length;$i$$ < $length$$;$i$$++) { - $tree$$[$i$$] && ($content$$.push(" " + $i$$ + ' [label="' + $tree$$[$i$$].label + '"];'), null != $tree$$[$i$$].target && $content$$.push(" " + $i$$ + " -> " + $tree$$[$i$$].target + ";"), null != $tree$$[$i$$].nextAddress && $content$$.push(" " + $i$$ + " -> " + $tree$$[$i$$].nextAddress + ";")) + for (var $tree$$ = this.bytecodes, $content$$ = ["digraph G {"], $i$$ = 0, $length$$ = $tree$$.length;$i$$ < $length$$;$i$$++) { + $tree$$[$i$$] && ($content$$.push(" " + $i$$ + ' [label="' + $tree$$[$i$$].label + '"];'), null !== $tree$$[$i$$].target && $content$$.push(" " + $i$$ + " -> " + $tree$$[$i$$].target + ";"), null !== $tree$$[$i$$].nextAddress && $content$$.push(" " + $i$$ + " -> " + $tree$$[$i$$].nextAddress + ";")); } $content$$.push("}"); $content$$ = $content$$.join("\n"); $content$$ = $content$$.replace(/ 0 \[label="/, ' 0 [style=filled,color="#CC0000",label="'); JSSMS.Utils.console.timeEnd("DOT generation"); - return $content$$ + return $content$$; }, addAddress:function $$parser$$$$addAddress$($address$$) { var $memPage$$ = ~~($address$$ / 16384), $romPage$$ = this.frameReg[$memPage$$]; - this.addresses[$romPage$$].push({address:$address$$ % 16384, romPage:$romPage$$, memPage:$memPage$$}) + this.addresses[$romPage$$].push({address:$address$$ % 16384, romPage:$romPage$$, memPage:$memPage$$}); }}; $RomStream$$.prototype = {get position() { - return this.pos + return this.pos; }, get length() { - return this.rom.length * PAGE_SIZE + return this.rom.length * PAGE_SIZE; }, seek:function $$RomStream$$$$seek$($pos$$) { - this.pos = $pos$$ + this.pos = $pos$$; }, getUint8:function $$RomStream$$$$getUint8$() { var $page$$2_value$$ = 0, $page$$2_value$$ = this.page, $address$$ = this.pos & 16383, $page$$2_value$$ = SUPPORT_DATAVIEW ? this.rom[$page$$2_value$$].getUint8($address$$) : this.rom[$page$$2_value$$][$address$$] & 255; this.pos++; - return $page$$2_value$$ + return $page$$2_value$$; }, getInt8:function $$RomStream$$$$getInt8$() { var $page$$3_value$$ = 0, $page$$3_value$$ = this.page, $address$$ = this.pos & 16383; SUPPORT_DATAVIEW ? $page$$3_value$$ = this.rom[$page$$3_value$$].getInt8($address$$) : ($page$$3_value$$ = this.rom[$page$$3_value$$][$address$$] & 255, 128 <= $page$$3_value$$ && ($page$$3_value$$ -= 256)); this.pos++; - return $page$$3_value$$ + 1 + return $page$$3_value$$ + 1; }, getUint16:function $$RomStream$$$$getUint16$() { var $page$$4_value$$ = 0, $page$$4_value$$ = this.page, $address$$ = this.pos & 16383, $page$$4_value$$ = SUPPORT_DATAVIEW ? 16383 > ($address$$ & 16383) ? this.rom[$page$$4_value$$].getUint16($address$$, LITTLE_ENDIAN) : this.rom[$page$$4_value$$].getUint8($address$$) | this.rom[++$page$$4_value$$].getUint8($address$$) << 8 : this.rom[$page$$4_value$$][$address$$] & 255 | (this.rom[++$page$$4_value$$][$address$$] & 255) << 8; this.pos += 2; - return $page$$4_value$$ + return $page$$4_value$$; }}; - return $parser$$ + return $parser$$; }(); -var UINT8 = 1, INT8 = 2, UINT16 = 3, BIT_TABLE = [1, 2, 4, 8, 16, 32, 64, 128], n = {IfStatement:function($test$$, $consequent$$, $alternate$$) { - void 0 == $alternate$$ && ($alternate$$ = null); - return{type:"IfStatement", test:$test$$, consequent:$consequent$$, alternate:$alternate$$} +var BIT_TABLE = [1, 2, 4, 8, 16, 32, 64, 128], n = {IfStatement:function($test$$, $consequent$$, $alternate$$) { + void 0 === $alternate$$ && ($alternate$$ = null); + return{type:"IfStatement", test:$test$$, consequent:$consequent$$, alternate:$alternate$$}; }, BlockStatement:function($body$$) { - void 0 == $body$$ && ($body$$ = []); + void 0 === $body$$ && ($body$$ = []); Array.isArray($body$$) || ($body$$ = [$body$$]); - return{type:"BlockStatement", body:$body$$} + return{type:"BlockStatement", body:$body$$}; }, ExpressionStatement:function($expression$$) { - return{type:"ExpressionStatement", expression:$expression$$} + return{type:"ExpressionStatement", expression:$expression$$}; }, ReturnStatement:function($argument$$) { - void 0 == $argument$$ && ($argument$$ = null); - return{type:"ReturnStatement", argument:$argument$$} + void 0 === $argument$$ && ($argument$$ = null); + return{type:"ReturnStatement", argument:$argument$$}; }, VariableDeclaration:function($name$$, $init$$) { - return{type:"VariableDeclaration", declarations:[{type:"VariableDeclarator", id:{type:"Identifier", name:$name$$}, init:$init$$}], kind:"var"} + return{type:"VariableDeclaration", declarations:[{type:"VariableDeclarator", id:{type:"Identifier", name:$name$$}, init:$init$$}], kind:"var"}; }, Identifier:function($name$$) { - return{type:"Identifier", name:$name$$} + return{type:"Identifier", name:$name$$}; }, Literal:function($value$$) { - return"number" == typeof $value$$ ? {type:"Literal", value:$value$$, raw:DEBUG ? JSSMS.Utils.toHex($value$$) : "" + $value$$} : {type:"Literal", value:$value$$, raw:"" + $value$$} + return "number" == typeof $value$$ ? {type:"Literal", value:$value$$, raw:DEBUG ? JSSMS.Utils.toHex($value$$) : "" + $value$$} : {type:"Literal", value:$value$$, raw:"" + $value$$}; }, CallExpression:function($callee$$, $args$$) { - void 0 == $args$$ && ($args$$ = []); + void 0 === $args$$ && ($args$$ = []); Array.isArray($args$$) || ($args$$ = [$args$$]); - return{type:"CallExpression", callee:n.Identifier($callee$$), arguments:$args$$} + return{type:"CallExpression", callee:n.Identifier($callee$$), arguments:$args$$}; }, AssignmentExpression:function($operator$$, $left$$, $right$$) { - return{type:"AssignmentExpression", operator:$operator$$, left:$left$$, right:$right$$} + return{type:"AssignmentExpression", operator:$operator$$, left:$left$$, right:$right$$}; }, BinaryExpression:function($operator$$, $left$$, $right$$) { - return{type:"BinaryExpression", operator:$operator$$, left:$left$$, right:$right$$} + return{type:"BinaryExpression", operator:$operator$$, left:$left$$, right:$right$$}; }, UnaryExpression:function($operator$$, $argument$$) { - return{type:"UnaryExpression", operator:$operator$$, argument:$argument$$} + return{type:"UnaryExpression", operator:$operator$$, argument:$argument$$}; }, MemberExpression:function($object$$, $property$$) { - return{type:"MemberExpression", computed:!0, object:$object$$, property:$property$$} + return{type:"MemberExpression", computed:!0, object:$object$$, property:$property$$}; }, ArrayExpression:function($elements$$) { - return{type:"ArrayExpression", elements:$elements$$} + return{type:"ArrayExpression", elements:$elements$$}; }, ConditionalExpression:function($test$$, $consequent$$, $alternate$$) { - return{type:"ConditionalExpression", test:$test$$, consequent:$consequent$$, alternate:$alternate$$} + return{type:"ConditionalExpression", test:$test$$, consequent:$consequent$$, alternate:$alternate$$}; }, LogicalExpression:function($operator$$, $left$$, $right$$) { - return{type:"LogicalExpression", operator:$operator$$, left:$left$$, right:$right$$} + return{type:"LogicalExpression", operator:$operator$$, left:$left$$, right:$right$$}; }, Register:function($name$$) { - return{type:"Register", name:$name$$} + return{type:"Register", name:$name$$}; }, Bit:function($bitNumber$$) { - return n.Literal(BIT_TABLE[$bitNumber$$]) -}}, o = {SET16:function($register1$$, $register2$$, $lo$$1_value$$) { - if("Literal" == $lo$$1_value$$.type) { - var $hi$$ = evaluate(n.BinaryExpression(">>", $lo$$1_value$$, n.Literal(8))); - $lo$$1_value$$ = evaluate(n.BinaryExpression("&", $lo$$1_value$$, n.Literal(255))); - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), $hi$$)), n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register2$$), $lo$$1_value$$))] - } - return[n.VariableDeclaration("val", $lo$$1_value$$), n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.BinaryExpression(">>", n.Identifier("val"), n.Literal(8)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register2$$), n.BinaryExpression("&", n.Identifier("val"), n.Literal(255))))] + return n.Literal(BIT_TABLE[$bitNumber$$]); +}}, o = {SET16:function($register1$$, $register2$$, $value$$) { + return "Literal" == $value$$.type ? [n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.BinaryExpression(">>", $value$$, n.Literal(8)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register2$$), n.BinaryExpression("&", $value$$, n.Literal(255))))] : [n.VariableDeclaration("val", $value$$), n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.BinaryExpression(">>", n.Identifier("val"), n.Literal(8)))), n.ExpressionStatement(n.AssignmentExpression("=", + n.Register($register2$$), n.BinaryExpression("&", n.Identifier("val"), n.Literal(255))))]; }, EX:function($register1$$, $register2$$) { return SUPPORT_DESTRUCTURING ? [n.ExpressionStatement(n.AssignmentExpression("=", n.ArrayExpression([n.Register($register1$$), n.Register($register2$$)]), n.ArrayExpression([n.Register($register2$$), n.Register($register1$$)])))] : [n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register($register1$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.Register($register2$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register2$$), - n.Identifier("temp")))] + n.Identifier("temp")))]; }, NOOP:function() { return function() { - } + }; }, LD8:function($srcRegister$$, $dstRegister1$$, $dstRegister2$$) { - return void 0 == $dstRegister1$$ && void 0 == $dstRegister2$$ ? function($value$$) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), n.Literal($value$$))) - } : "i" == $dstRegister1$$ && void 0 == $dstRegister2$$ ? function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), n.Register("i"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZ_TABLE"), n.Register($srcRegister$$))), n.ConditionalExpression(n.Identifier("iff2"), n.Literal(F_PARITY), n.Literal(0)))))] - } : "r" == $dstRegister1$$ && void 0 == $dstRegister2$$ ? function() { + return void 0 === $dstRegister1$$ && void 0 === $dstRegister2$$ ? function($value$$) { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), n.Literal($value$$))); + } : "i" == $dstRegister1$$ && void 0 === $dstRegister2$$ ? function() { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), n.Register("i"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZ_TABLE"), n.Register($srcRegister$$))), n.ConditionalExpression(n.Identifier("iff2"), n.Literal(F_PARITY), n.Literal(0)))))]; + } : "r" == $dstRegister1$$ && void 0 === $dstRegister2$$ ? function() { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), REFRESH_EMULATION ? n.Register("r") : n.CallExpression("JSSMS.Utils.rndInt", n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZ_TABLE"), n.Register($srcRegister$$))), n.ConditionalExpression(n.Identifier("iff2"), n.Literal(F_PARITY), - n.Literal(0)))))] - } : void 0 == $dstRegister2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), n.Register($dstRegister1$$))) + n.Literal(0)))))]; + } : void 0 === $dstRegister2$$ ? function() { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), n.Register($dstRegister1$$))); } : "n" == $dstRegister1$$ && "n" == $dstRegister2$$ ? function($value$$) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), o.READ_MEM8(n.Literal($value$$)))) + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), o.READ_MEM8(n.Literal($value$$)))); } : function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), o.READ_MEM8(n.CallExpression("get" + ($dstRegister1$$ + $dstRegister2$$).toUpperCase())))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), o.READ_MEM8(n.CallExpression("get" + ($dstRegister1$$ + $dstRegister2$$).toUpperCase())))); + }; }, LD8_D:function($srcRegister$$, $dstRegister1$$, $dstRegister2$$) { return function($value$$) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($dstRegister1$$ + $dstRegister2$$).toUpperCase()), n.Literal($value$$))))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($srcRegister$$), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($dstRegister1$$ + $dstRegister2$$).toUpperCase()), n.Literal($value$$))))); + }; }, LD16:function($srcRegister1$$, $srcRegister2$$, $dstRegister1$$, $dstRegister2$$) { - if(void 0 == $dstRegister1$$ && void 0 == $dstRegister2$$) { + if (void 0 === $dstRegister1$$ && void 0 === $dstRegister2$$) { return function($value$$) { - return o.SET16($srcRegister1$$, $srcRegister2$$, n.Literal($value$$)) - } + return o.SET16($srcRegister1$$, $srcRegister2$$, n.Literal($value$$)); + }; } - if("n" == $dstRegister1$$ && "n" == $dstRegister2$$) { + if ("n" == $dstRegister1$$ && "n" == $dstRegister2$$) { return function($value$$) { - return o.SET16($srcRegister1$$, $srcRegister2$$, o.READ_MEM16(n.Literal($value$$))) - } + return o.SET16($srcRegister1$$, $srcRegister2$$, o.READ_MEM16(n.Literal($value$$))); + }; } - JSSMS.Utils.console.error("Wrong parameters number") + JSSMS.Utils.console.error("Wrong parameters number"); }, LD_WRITE_MEM:function($srcRegister1$$, $srcRegister2$$, $dstRegister1$$, $dstRegister2$$) { - return void 0 == $dstRegister1$$ && void 0 == $dstRegister2$$ ? function($value$$) { - return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ($srcRegister1$$ + $srcRegister2$$).toUpperCase()), n.Literal($value$$)])) - } : "n" == $srcRegister1$$ && "n" == $srcRegister2$$ && void 0 == $dstRegister2$$ ? function($value$$) { - return n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$), n.Register($dstRegister1$$)])) + return void 0 === $dstRegister1$$ && void 0 === $dstRegister2$$ ? function($value$$) { + return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ($srcRegister1$$ + $srcRegister2$$).toUpperCase()), n.Literal($value$$)])); + } : "n" == $srcRegister1$$ && "n" == $srcRegister2$$ && void 0 === $dstRegister2$$ ? function($value$$) { + return n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$), n.Register($dstRegister1$$)])); } : "n" == $srcRegister1$$ && "n" == $srcRegister2$$ ? function($value$$) { - return[n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$), n.Register($dstRegister2$$)])), n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$ + 1), n.Register($dstRegister1$$)]))] + return[n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$), n.Register($dstRegister2$$)])), n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$ + 1), n.Register($dstRegister1$$)]))]; } : function() { - return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ($srcRegister1$$ + $srcRegister2$$).toUpperCase()), n.Register($dstRegister1$$)])) - } + return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ($srcRegister1$$ + $srcRegister2$$).toUpperCase()), n.Register($dstRegister1$$)])); + }; }, LD_SP:function($register1$$, $register2$$) { - return void 0 == $register1$$ && void 0 == $register2$$ ? function($value$$) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.Literal($value$$))) + return void 0 === $register1$$ && void 0 === $register2$$ ? function($value$$) { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.Literal($value$$))); } : function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()))); + }; }, LD_NN:function($register1$$, $register2$$) { - return void 0 == $register2$$ ? function($value$$) { - return[n.ExpressionStatement(n.CallExpression("writeMem", n.Literal($value$$), n.BinaryExpression("&", n.Identifier($register1$$), n.Literal(255)))), n.ExpressionStatement(n.CallExpression("writeMem", n.Literal($value$$ + 1), n.BinaryExpression(">>", n.Identifier($register1$$), n.Literal(8))))] + return void 0 === $register2$$ ? function($value$$) { + return[n.ExpressionStatement(n.CallExpression("writeMem", n.Literal($value$$), n.BinaryExpression("&", n.Identifier($register1$$), n.Literal(255)))), n.ExpressionStatement(n.CallExpression("writeMem", n.Literal($value$$ + 1), n.BinaryExpression(">>", n.Identifier($register1$$), n.Literal(8))))]; } : function($value$$) { - return[n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$), n.Register($register2$$)])), n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$ + 1), n.Register($register1$$)]))] - } + return[n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$), n.Register($register2$$)])), n.ExpressionStatement(n.CallExpression("writeMem", [n.Literal($value$$ + 1), n.Register($register1$$)]))]; + }; }, INC8:function($register1$$, $register2$$) { - return void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression("inc8", n.Register($register1$$)))) + return void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression("inc8", n.Register($register1$$)))); } : "s" == $register1$$ && "p" == $register2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1)))) + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1)))); } : function() { - return n.ExpressionStatement(n.CallExpression("incMem", n.CallExpression("getHL"))) - } + return n.ExpressionStatement(n.CallExpression("incMem", n.CallExpression("getHL"))); + }; }, INC16:function($register1$$, $register2$$) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register2$$), n.BinaryExpression("&", n.BinaryExpression("+", n.Register($register2$$), n.Literal(1)), n.Literal(255)))), n.IfStatement(n.BinaryExpression("==", n.Register($register2$$), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.BinaryExpression("&", n.BinaryExpression("+", n.Register($register1$$), n.Literal(1)), n.Literal(255))))]))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register2$$), n.BinaryExpression("&", n.BinaryExpression("+", n.Register($register2$$), n.Literal(1)), n.Literal(255)))), n.IfStatement(n.BinaryExpression("==", n.Register($register2$$), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.BinaryExpression("&", n.BinaryExpression("+", n.Register($register1$$), n.Literal(1)), n.Literal(255))))]))]; + }; }, DEC8:function($register1$$, $register2$$) { - return void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression("dec8", n.Register($register1$$)))) + return void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression("dec8", n.Register($register1$$)))); } : "s" == $register1$$ && "p" == $register2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.BinaryExpression("-", n.Identifier("sp"), n.Literal(1)))) + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("sp"), n.BinaryExpression("-", n.Identifier("sp"), n.Literal(1)))); } : function() { - return n.ExpressionStatement(n.CallExpression("decMem", n.CallExpression("getHL"))) - } + return n.ExpressionStatement(n.CallExpression("decMem", n.CallExpression("getHL"))); + }; }, DEC16:function($register1$$, $register2$$) { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register2$$), n.BinaryExpression("&", n.BinaryExpression("-", n.Register($register2$$), n.Literal(1)), n.Literal(255)))), n.IfStatement(n.BinaryExpression("==", n.Register($register2$$), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.BinaryExpression("&", n.BinaryExpression("-", n.Register($register1$$), n.Literal(1)), n.Literal(255))))]))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register2$$), n.BinaryExpression("&", n.BinaryExpression("-", n.Register($register2$$), n.Literal(1)), n.Literal(255)))), n.IfStatement(n.BinaryExpression("==", n.Register($register2$$), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.BinaryExpression("&", n.BinaryExpression("-", n.Register($register1$$), n.Literal(1)), n.Literal(255))))]))]; + }; }, ADD16:function($register1$$, $register2$$, $register3$$, $register4$$) { - return void 0 == $register4$$ ? function() { - return o.SET16($register1$$, $register2$$, n.CallExpression("add16", [n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Register($register3$$)])) + return void 0 === $register4$$ ? function() { + return o.SET16($register1$$, $register2$$, n.CallExpression("add16", [n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Register($register3$$)])); } : function() { - return o.SET16($register1$$, $register2$$, n.CallExpression("add16", [n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.CallExpression("get" + ($register3$$ + $register4$$).toUpperCase())])) - } + return o.SET16($register1$$, $register2$$, n.CallExpression("add16", [n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.CallExpression("get" + ($register3$$ + $register4$$).toUpperCase())])); + }; }, RLCA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("rlca_a")) - } + return n.ExpressionStatement(n.CallExpression("rlca_a")); + }; }, RRCA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("rrca_a")) - } + return n.ExpressionStatement(n.CallExpression("rrca_a")); + }; }, RLA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("rla_a")) - } + return n.ExpressionStatement(n.CallExpression("rla_a")); + }; }, RRA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("rra_a")) - } + return n.ExpressionStatement(n.CallExpression("rra_a")); + }; }, DAA:function() { return function() { - return n.ExpressionStatement(n.CallExpression("daa")) - } + return n.ExpressionStatement(n.CallExpression("daa")); + }; }, CPL:function() { return function() { - return n.ExpressionStatement(n.CallExpression("cpl_a")) - } + return n.ExpressionStatement(n.CallExpression("cpl_a")); + }; }, SCF:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))]; + }; }, CCF:function() { return function() { - return n.ExpressionStatement(n.CallExpression("ccf")) - } + return n.ExpressionStatement(n.CallExpression("ccf")); + }; }, ADD:function($register1$$, $register2$$) { - return void 0 == $register1$$ && void 0 == $register2$$ ? function($value$$) { - return n.ExpressionStatement(n.CallExpression("add_a", n.Literal($value$$))) - } : void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.CallExpression("add_a", n.Register($register1$$))) + return void 0 === $register1$$ && void 0 === $register2$$ ? function($value$$) { + return n.ExpressionStatement(n.CallExpression("add_a", n.Literal($value$$))); + } : void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.CallExpression("add_a", n.Register($register1$$))); } : function() { - return n.ExpressionStatement(n.CallExpression("add_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("add_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))); + }; }, ADC:function($register1$$, $register2$$) { - return void 0 == $register1$$ && void 0 == $register2$$ ? function($value$$) { - return n.ExpressionStatement(n.CallExpression("adc_a", n.Literal($value$$))) - } : void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.CallExpression("adc_a", n.Register($register1$$))) + return void 0 === $register1$$ && void 0 === $register2$$ ? function($value$$) { + return n.ExpressionStatement(n.CallExpression("adc_a", n.Literal($value$$))); + } : void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.CallExpression("adc_a", n.Register($register1$$))); } : function() { - return n.ExpressionStatement(n.CallExpression("adc_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("adc_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))); + }; }, SUB:function($register1$$, $register2$$) { - return void 0 == $register1$$ && void 0 == $register2$$ ? function($value$$, $target$$, $nextAddress$$) { - return n.ExpressionStatement(n.CallExpression("sub_a", n.Literal($value$$))) - } : void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.CallExpression("sub_a", n.Register($register1$$))) + return void 0 === $register1$$ && void 0 === $register2$$ ? function($value$$, $target$$, $nextAddress$$) { + return n.ExpressionStatement(n.CallExpression("sub_a", n.Literal($value$$))); + } : void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.CallExpression("sub_a", n.Register($register1$$))); } : function() { - return n.ExpressionStatement(n.CallExpression("sub_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("sub_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))); + }; }, SBC:function($register1$$, $register2$$) { - return void 0 == $register1$$ && void 0 == $register2$$ ? function($value$$, $target$$, $nextAddress$$) { - return n.ExpressionStatement(n.CallExpression("sbc_a", n.Literal($value$$))) - } : void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.CallExpression("sbc_a", n.Register($register1$$))) + return void 0 === $register1$$ && void 0 === $register2$$ ? function($value$$, $target$$, $nextAddress$$) { + return n.ExpressionStatement(n.CallExpression("sbc_a", n.Literal($value$$))); + } : void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.CallExpression("sbc_a", n.Register($register1$$))); } : function() { - return n.ExpressionStatement(n.CallExpression("sbc_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("sbc_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))); + }; }, AND:function($register1$$, $register2$$) { - return void 0 == $register1$$ && void 0 == $register2$$ ? function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), n.Literal($value$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))] - } : "a" != $register1$$ && void 0 == $register2$$ ? function() { - return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), n.Register($register1$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))] - } : "a" == $register1$$ && void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY)))) + return void 0 === $register1$$ && void 0 === $register2$$ ? function($value$$, $target$$, $nextAddress$$) { + return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), n.Literal($value$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))]; + } : "a" != $register1$$ && void 0 === $register2$$ ? function() { + return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), n.Register($register1$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))]; + } : "a" == $register1$$ && void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY)))); } : function() { - return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))]; + }; }, XOR:function($register1$$, $register2$$) { - return void 0 == $register1$$ && void 0 == $register2$$ ? function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), n.Literal($value$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } : "a" != $register1$$ && void 0 == $register2$$ ? function() { - return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), n.Register($register1$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } : "a" == $register1$$ && void 0 == $register2$$ ? function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register("a"), n.Literal(0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Literal(0))))] + return void 0 === $register1$$ && void 0 === $register2$$ ? function($value$$, $target$$, $nextAddress$$) { + return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), n.Literal($value$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + } : "a" != $register1$$ && void 0 === $register2$$ ? function() { + return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), n.Register($register1$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + } : "a" == $register1$$ && void 0 === $register2$$ ? function() { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register("a"), n.Literal(0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Literal(0))))]; } : function() { - return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; }, OR:function($register1$$, $register2$$) { - return void 0 == $register1$$ && void 0 == $register2$$ ? function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), n.Literal($value$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } : "a" != $register1$$ && void 0 == $register2$$ ? function() { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), n.Register($register1$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } : "a" == $register1$$ && void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")))) + return void 0 === $register1$$ && void 0 === $register2$$ ? function($value$$, $target$$, $nextAddress$$) { + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), n.Literal($value$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + } : "a" != $register1$$ && void 0 === $register2$$ ? function() { + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), n.Register($register1$$))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + } : "a" == $register1$$ && void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")))); } : function() { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; }, CP:function($register1$$, $register2$$) { - return void 0 == $register1$$ && void 0 == $register2$$ ? function($value$$) { - return n.ExpressionStatement(n.CallExpression("cp_a", n.Literal($value$$))) - } : void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.CallExpression("cp_a", n.Register($register1$$))) + return void 0 === $register1$$ && void 0 === $register2$$ ? function($value$$) { + return n.ExpressionStatement(n.CallExpression("cp_a", n.Literal($value$$))); + } : void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.CallExpression("cp_a", n.Register($register1$$))); } : function() { - return n.ExpressionStatement(n.CallExpression("cp_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))) - } + return n.ExpressionStatement(n.CallExpression("cp_a", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))); + }; }, POP:function($register1$$, $register2$$) { return function() { - return[].concat(o.SET16($register1$$, $register2$$, o.READ_MEM16(n.Identifier("sp"))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2)))) - } + return[].concat(o.SET16($register1$$, $register2$$, o.READ_MEM16(n.Identifier("sp"))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2)))); + }; }, PUSH:function($register1$$, $register2$$) { return function() { - return n.ExpressionStatement(n.CallExpression("pushUint8", [n.Register($register1$$), n.Register($register2$$)])) - } + return n.ExpressionStatement(n.CallExpression("pushUint8", [n.Register($register1$$), n.Register($register2$$)])); + }; }, JR:function($test$$) { return function($value$$, $target$$) { - return n.IfStatement($test$$, n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.BinaryExpression("+", n.Literal($target$$ % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ReturnStatement()])) - } + return n.IfStatement($test$$, n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.BinaryExpression("+", n.Literal($target$$ % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ReturnStatement()])); + }; }, DJNZ:function() { return function($value$$, $target$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register("b"), n.BinaryExpression("&", n.BinaryExpression("-", n.Register("b"), n.Literal(1)), n.Literal(255)))), o.JR(n.BinaryExpression("!=", n.Register("b"), n.Literal(0)))(void 0, $target$$)] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register("b"), n.BinaryExpression("&", n.BinaryExpression("-", n.Register("b"), n.Literal(1)), n.Literal(255)))), o.JR(n.BinaryExpression("!=", n.Register("b"), n.Literal(0)))(void 0, $target$$)]; + }; }, JRNZ:function() { return function($value$$, $target$$) { - return o.JR(n.UnaryExpression("!", n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0))))(void 0, $target$$) - } + return o.JR(n.UnaryExpression("!", n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0))))(void 0, $target$$); + }; }, JRZ:function() { return function($value$$, $target$$) { - return o.JR(n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0)))(void 0, $target$$) - } + return o.JR(n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0)))(void 0, $target$$); + }; }, JRNC:function() { return function($value$$, $target$$) { - return o.JR(n.UnaryExpression("!", n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(0))))(void 0, $target$$) - } + return o.JR(n.UnaryExpression("!", n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(0))))(void 0, $target$$); + }; }, JRC:function() { return function($value$$, $target$$) { - return o.JR(n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(0)))(void 0, $target$$) - } + return o.JR(n.BinaryExpression("!=", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(0)))(void 0, $target$$); + }; }, RET:function($operator$$, $bitMask$$) { - return void 0 == $operator$$ && void 0 == $bitMask$$ ? function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ReturnStatement()] + return void 0 === $operator$$ && void 0 === $bitMask$$ ? function() { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2)))]; } : function($value$$, $target$$, $nextAddress$$) { - return n.IfStatement(n.BinaryExpression($operator$$, n.BinaryExpression("&", n.Register("f"), n.Literal($bitMask$$)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(6))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ReturnStatement()])) - } + return n.IfStatement(n.BinaryExpression($operator$$, n.BinaryExpression("&", n.Register("f"), n.Literal($bitMask$$)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(6))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ReturnStatement()])); + }; }, JP:function($operator$$, $bitMask$$) { - return void 0 == $operator$$ && void 0 == $bitMask$$ ? function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal($target$$))), n.ReturnStatement()] + return void 0 === $operator$$ && void 0 === $bitMask$$ ? function($value$$, $target$$, $nextAddress$$) { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal($target$$)))]; } : "h" == $operator$$ && "l" == $bitMask$$ ? function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.CallExpression("getHL"))), n.ReturnStatement()] + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.CallExpression("getHL")))]; } : function($value$$, $target$$) { - return n.IfStatement(n.BinaryExpression($operator$$, n.BinaryExpression("&", n.Register("f"), n.Literal($bitMask$$)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal($target$$))), n.ReturnStatement()])) - } + return n.IfStatement(n.BinaryExpression($operator$$, n.BinaryExpression("&", n.Register("f"), n.Literal($bitMask$$)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal($target$$))), n.ReturnStatement()])); + }; }, CALL:function($operator$$, $bitMask$$) { - return void 0 == $operator$$ && void 0 == $bitMask$$ ? function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal($nextAddress$$ % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal($target$$))), n.ReturnStatement()] + return void 0 === $operator$$ && void 0 === $bitMask$$ ? function($value$$, $target$$, $nextAddress$$) { + return[n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal($nextAddress$$ % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal($target$$))), n.ReturnStatement()]; } : function($value$$, $target$$, $nextAddress$$) { return n.IfStatement(n.BinaryExpression($operator$$, n.BinaryExpression("&", n.Register("f"), n.Literal($bitMask$$)), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(7))), n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal($nextAddress$$ % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal($target$$))), - n.ReturnStatement()])) - } + n.ReturnStatement()])); + }; }, RST:function($targetAddress$$) { return function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal($nextAddress$$ % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal($targetAddress$$))), n.ReturnStatement()] - } + return[n.ExpressionStatement(n.CallExpression("push", n.BinaryExpression("+", n.Literal($nextAddress$$ % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.Literal($targetAddress$$))), n.ReturnStatement()]; + }; }, DI:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Literal(!1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff2"), n.Literal(!1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("EI_inst"), n.Literal(!0)))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Literal(!1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff2"), n.Literal(!1))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("EI_inst"), n.Literal(!0)))]; + }; }, EI:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Literal(!0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff2"), n.Literal(!0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("EI_inst"), n.Literal(!0)))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Literal(!0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff2"), n.Literal(!0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("EI_inst"), n.Literal(!0)))]; + }; }, OUT:function($register1$$, $register2$$) { - return void 0 == $register2$$ ? function($value$$, $target$$, $nextAddress$$) { - return n.ExpressionStatement(n.CallExpression("port.out", [n.Literal($value$$), n.Register($register1$$)])) + return void 0 === $register2$$ ? function($value$$, $target$$, $nextAddress$$) { + return n.ExpressionStatement(n.CallExpression("port.out", [n.Literal($value$$), n.Register($register1$$)])); } : function() { - return n.ExpressionStatement(n.CallExpression("port.out", [n.Register($register1$$), n.Register($register2$$)])) - } + return n.ExpressionStatement(n.CallExpression("port.out", [n.Register($register1$$), n.Register($register2$$)])); + }; }, IN:function($register1$$, $register2$$) { - return void 0 == $register2$$ ? function($value$$, $target$$, $nextAddress$$) { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression("port.in_", n.Literal($value$$)))) + return void 0 === $register2$$ ? function($value$$, $target$$, $nextAddress$$) { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression("port.in_", n.Literal($value$$)))); } : function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression("port.in_", n.Register($register2$$)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register($register1$$)))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression("port.in_", n.Register($register2$$)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register($register1$$)))))]; + }; }, EX_AF:function() { return function() { - return[].concat(o.EX("a", "a2"), o.EX("f", "f2")) - } + return[].concat(o.EX("a", "a2"), o.EX("f", "f2")); + }; }, EXX:function() { return function() { - return[].concat(o.EX("b", "b2"), o.EX("c", "c2"), o.EX("d", "d2"), o.EX("e", "e2"), o.EX("h", "h2"), o.EX("l", "l2")) - } + return[].concat(o.EX("b", "b2"), o.EX("c", "c2"), o.EX("d", "d2"), o.EX("e", "e2"), o.EX("h", "h2"), o.EX("l", "l2")); + }; }, EX_DE_HL:function() { return function() { - return[].concat(o.EX("d", "h"), o.EX("e", "l")) - } + return[].concat(o.EX("d", "h"), o.EX("e", "l")); + }; }, EX_SP_HL:function() { return function() { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register("h"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("h"), o.READ_MEM8(n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1))))), n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1)), n.Identifier("temp")])), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register("l"))), n.ExpressionStatement(n.AssignmentExpression("=", - n.Register("l"), o.READ_MEM8(n.Identifier("sp")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("sp"), n.Identifier("temp")]))] - } + n.Register("l"), o.READ_MEM8(n.Identifier("sp")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("sp"), n.Identifier("temp")]))]; + }; }, HALT:function() { return function($ret_value$$, $target$$, $nextAddress$$) { $ret_value$$ = []; HALT_SPEEDUP && $ret_value$$.push(n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("tstates"), n.Literal(0)))); - return $ret_value$$.concat([n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("halt"), n.Literal(!0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.BinaryExpression("+", n.Literal(($nextAddress$$ - 1) % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ReturnStatement()]) - } + return $ret_value$$.concat([n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("halt"), n.Literal(!0))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.BinaryExpression("+", n.Literal(($nextAddress$$ - 1) % 16384), n.BinaryExpression("*", n.Identifier("page"), n.Literal(16384))))), n.ReturnStatement()]); + }; }, RLC:generateCBFunctions("rlc"), RRC:generateCBFunctions("rrc"), RL:generateCBFunctions("rl"), RR:generateCBFunctions("rr"), SLA:generateCBFunctions("sla"), SRA:generateCBFunctions("sra"), SLL:generateCBFunctions("sll"), SRL:generateCBFunctions("srl"), BIT:function($bit$$, $register1$$, $register2$$) { - return void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", n.Register($register1$$), n.Bit($bit$$)))) + return void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", n.Register($register1$$), n.Bit($bit$$)))); } : "h" == $register1$$ && "l" == $register2$$ ? function() { - return n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())), n.Bit($bit$$)))) + return n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())), n.Bit($bit$$)))); } : function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", o.READ_MEM8(n.Identifier("location")), n.Bit($bit$$))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("bit", n.BinaryExpression("&", o.READ_MEM8(n.Identifier("location")), n.Bit($bit$$))))]; + }; }, RES:function($bit$$, $register1$$, $register2$$) { - return void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("&=", n.Register($register1$$), n.UnaryExpression("~", n.Bit($bit$$)))) + return void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.AssignmentExpression("&=", n.Register($register1$$), n.UnaryExpression("~", n.Bit($bit$$)))); } : "h" == $register1$$ && "l" == $register2$$ ? function() { - return n.ExpressionStatement(n.CallExpression("writeMem", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.BinaryExpression("&", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())), n.UnaryExpression("~", n.Bit($bit$$))))) + return n.ExpressionStatement(n.CallExpression("writeMem", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.BinaryExpression("&", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())), n.UnaryExpression("~", n.Bit($bit$$))))); } : function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.BinaryExpression("&", o.READ_MEM8(n.Identifier("location")), n.UnaryExpression("~", n.Bit($bit$$)))]))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.BinaryExpression("&", o.READ_MEM8(n.Identifier("location")), n.UnaryExpression("~", n.Bit($bit$$)))]))]; + }; }, SET:function($bit$$, $register1$$, $register2$$) { - return void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("|=", n.Register($register1$$), n.Bit($bit$$))) + return void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.AssignmentExpression("|=", n.Register($register1$$), n.Bit($bit$$))); } : "h" == $register1$$ && "l" == $register2$$ ? function() { - return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.BinaryExpression("|", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())), n.Bit($bit$$))])) + return n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.BinaryExpression("|", o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())), n.Bit($bit$$))])); } : function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.BinaryExpression("|", o.READ_MEM8(n.Identifier("location")), n.Bit($bit$$))]))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.BinaryExpression("|", o.READ_MEM8(n.Identifier("location")), n.Bit($bit$$))]))]; + }; }, LD_X:function($register1$$, $register2$$, $register3$$) { - return void 0 == $register3$$ ? function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$ & 255)), n.Literal($value$$ >> 8)]))] + return void 0 === $register3$$ ? function($value$$, $target$$, $nextAddress$$) { + return[n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$ & 255)), n.Literal($value$$ >> 8)]))]; } : function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.CallExpression("get" + ($register2$$ + $register3$$).toUpperCase()), n.Literal($value$$)), n.Register($register1$$)]))] - } + return[n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.CallExpression("get" + ($register2$$ + $register3$$).toUpperCase()), n.Literal($value$$)), n.Register($register1$$)]))]; + }; }, INC_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.CallExpression("incMem", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))] - } + return[n.ExpressionStatement(n.CallExpression("incMem", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))]; + }; }, DEC_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.CallExpression("decMem", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))] - } + return[n.ExpressionStatement(n.CallExpression("decMem", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))]; + }; }, ADD_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return n.ExpressionStatement(n.CallExpression("add_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))) - } + return n.ExpressionStatement(n.CallExpression("add_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))); + }; }, ADC_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return n.ExpressionStatement(n.CallExpression("adc_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))) - } + return n.ExpressionStatement(n.CallExpression("adc_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))); + }; }, SUB_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return n.ExpressionStatement(n.CallExpression("sub_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))) - } + return n.ExpressionStatement(n.CallExpression("sub_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))); + }; }, SBC_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return n.ExpressionStatement(n.CallExpression("sbc_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))) - } + return n.ExpressionStatement(n.CallExpression("sbc_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))); + }; }, AND_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a")), n.Literal(F_HALFCARRY))))]; + }; }, XOR_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("^=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; }, OR_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))] - } + return[n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("a"), o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.MemberExpression(n.Identifier("SZP_TABLE"), n.Register("a"))))]; + }; }, CP_X:function($register1$$, $register2$$) { return function($value$$) { - return n.ExpressionStatement(n.CallExpression("cp_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))) - } + return n.ExpressionStatement(n.CallExpression("cp_a", o.READ_MEM8(n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$))))); + }; }, EX_SP_X:function($register1$$, $register2$$) { return function() { return[].concat(n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()))), o.SET16($register1$$, $register2$$, o.READ_MEM16(n.Identifier("sp"))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("sp"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))])), n.ExpressionStatement(n.CallExpression("writeMem", [n.BinaryExpression("+", n.Identifier("sp"), n.Literal(1)), n.BinaryExpression(">>", - n.Identifier("sp"), n.Literal(8))]))) - } + n.Identifier("sp"), n.Literal(8))]))); + }; }, JP_X:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()))), n.ReturnStatement()] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase())))]; + }; }, ADC16:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return[void 0 == $register2$$ ? n.VariableDeclaration("value", n.Identifier($register1$$)) : n.VariableDeclaration("value", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register($register1$$), n.Literal(8)), n.Register($register2$$))), n.VariableDeclaration("val", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register("h"), n.Literal(8)), n.Register("l"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("+", n.BinaryExpression("+", n.Identifier("val"), + return[void 0 === $register2$$ ? n.VariableDeclaration("value", n.Identifier($register1$$)) : n.VariableDeclaration("value", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register($register1$$), n.Literal(8)), n.Register($register2$$))), n.VariableDeclaration("val", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register("h"), n.Literal(8)), n.Register("l"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("+", n.BinaryExpression("+", n.Identifier("val"), n.Identifier("value")), n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.BinaryExpression(">>", n.BinaryExpression("^", n.BinaryExpression("^", n.Identifier("val"), n.Identifier("temp")), n.Identifier("value")), n.Literal(8)), n.Literal(16)), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(16)), n.Literal(1))), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(8)), n.Literal(128))), n.ConditionalExpression(n.BinaryExpression("!=", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(65535)), n.Literal(0)), n.Literal(0), n.Literal(64))), n.BinaryExpression(">>", n.BinaryExpression("&", n.BinaryExpression("&", n.BinaryExpression("^", n.BinaryExpression("^", n.Identifier("value"), n.Identifier("val")), n.Literal(32768)), - n.BinaryExpression("^", n.Identifier("value"), n.Identifier("temp"))), n.Literal(32768)), n.Literal(13))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("h"), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(8)), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("l"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))))] - } + n.BinaryExpression("^", n.Identifier("value"), n.Identifier("temp"))), n.Literal(32768)), n.Literal(13))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("h"), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(8)), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("l"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))))]; + }; }, SBC16:function($register1$$, $register2$$) { return function($value$$, $target$$, $nextAddress$$) { - return[void 0 == $register2$$ ? n.VariableDeclaration("value", n.Identifier($register1$$)) : n.VariableDeclaration("value", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register($register1$$), n.Literal(8)), n.Register($register2$$))), n.VariableDeclaration("val", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register("h"), n.Literal(8)), n.Register("l"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("-", n.BinaryExpression("-", n.Identifier("val"), + return[void 0 === $register2$$ ? n.VariableDeclaration("value", n.Identifier($register1$$)) : n.VariableDeclaration("value", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register($register1$$), n.Literal(8)), n.Register($register2$$))), n.VariableDeclaration("val", n.BinaryExpression("|", n.BinaryExpression("<<", n.Register("h"), n.Literal(8)), n.Register("l"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("-", n.BinaryExpression("-", n.Identifier("val"), n.Identifier("value")), n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.BinaryExpression(">>", n.BinaryExpression("^", n.BinaryExpression("^", n.Identifier("val"), n.Identifier("temp")), n.Identifier("value")), n.Literal(8)), n.Literal(16)), n.Literal(2)), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(16)), n.Literal(1))), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(8)), n.Literal(128))), n.ConditionalExpression(n.BinaryExpression("!=", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(65535)), n.Literal(0)), n.Literal(0), n.Literal(64))), n.BinaryExpression(">>", n.BinaryExpression("&", n.BinaryExpression("&", n.BinaryExpression("^", n.Identifier("value"), n.Identifier("val")), n.BinaryExpression("^", - n.Identifier("val"), n.Identifier("temp"))), n.Literal(32768)), n.Literal(13))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("h"), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(8)), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("l"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))))] - } + n.Identifier("val"), n.Identifier("temp"))), n.Literal(32768)), n.Literal(13))))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("h"), n.BinaryExpression("&", n.BinaryExpression(">>", n.Identifier("temp"), n.Literal(8)), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("l"), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(255))))]; + }; }, NEG:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register("a"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("a"), n.Literal(0))), n.ExpressionStatement(n.CallExpression("sub_a", n.Identifier("temp")))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.Register("a"))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("a"), n.Literal(0))), n.ExpressionStatement(n.CallExpression("sub_a", n.Identifier("temp")))]; + }; }, RETN_RETI:function() { return function() { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Identifier("iff2")))] - } + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"), o.READ_MEM16(n.Identifier("sp")))), n.ExpressionStatement(n.AssignmentExpression("+=", n.Identifier("sp"), n.Literal(2))), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("iff1"), n.Identifier("iff2")))]; + }; }, IM:function($value$$) { return function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("im"), n.Literal($value$$))) - } + return n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("im"), n.Literal($value$$))); + }; }, INI:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.CallExpression("port.in_", n.Register("c")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("getHL"), n.Identifier("temp")])), o.DEC8("b")(), n.ExpressionStatement(n.CallExpression("incHL")), n.IfStatement(n.BinaryExpression("==", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(128)), n.Literal(128)), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), - n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))] - } + n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))]; + }; }, OUTI:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("getHL")))), n.ExpressionStatement(n.CallExpression("port.out", [n.Register("c"), n.Identifier("temp")])), o.DEC8("b")(), n.ExpressionStatement(n.CallExpression("incHL")), n.IfStatement(n.BinaryExpression(">", n.BinaryExpression("+", n.Register("l"), n.Identifier("temp")), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_HALFCARRY)))]), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_CARRY)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))])), n.IfStatement(n.BinaryExpression("==", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(128)), n.Literal(128)), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=", - n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))] - } + n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))]; + }; }, OUTD:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("getHL")))), n.ExpressionStatement(n.CallExpression("port.out", [n.Register("c"), n.Identifier("temp")])), o.DEC8("b")(), n.ExpressionStatement(n.CallExpression("decHL")), n.IfStatement(n.BinaryExpression(">", n.BinaryExpression("+", n.Register("l"), n.Identifier("temp")), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_HALFCARRY)))]), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_CARRY)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))])), n.IfStatement(n.BinaryExpression("==", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(128)), n.Literal(128)), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=", - n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))] - } + n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE))))))]; + }; }, LDI:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("getHL")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("getDE"), n.Identifier("temp")])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("incDE")), n.ExpressionStatement(n.CallExpression("incHL")), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("&", n.BinaryExpression("+", n.Identifier("temp"), n.Register("a")), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(193)), n.ConditionalExpression(n.CallExpression("getBC"), n.Literal(F_PARITY), n.Literal(0))), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_BIT3))), n.ConditionalExpression(n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), - n.Literal(0)))))] - } + n.Literal(0)))))]; + }; }, CPI:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(F_NEGATIVE)))), n.ExpressionStatement(n.CallExpression("cp_a", [o.READ_MEM8(n.CallExpression("getHL"))])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("incHL")), n.ExpressionStatement(n.AssignmentExpression("|=", n.Identifier("temp"), n.ConditionalExpression(n.BinaryExpression("==", - n.CallExpression("getBC"), n.Literal(0)), n.Literal(0), n.Literal(F_PARITY)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp"))))] - } + n.CallExpression("getBC"), n.Literal(0)), n.Literal(0), n.Literal(F_PARITY)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp"))))]; + }; }, LDD:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("getHL")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("getDE"), n.Identifier("temp")])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("decDE")), n.ExpressionStatement(n.CallExpression("decHL")), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("&", n.BinaryExpression("+", n.Identifier("temp"), n.Register("a")), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(193)), n.ConditionalExpression(n.CallExpression("getBC"), n.Literal(F_PARITY), n.Literal(0))), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_BIT3))), n.ConditionalExpression(n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), - n.Literal(0)))))] - } + n.Literal(0)))))]; + }; }, LDIR:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("getHL")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("getDE"), n.Identifier("temp")])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("incDE")), n.ExpressionStatement(n.CallExpression("incHL")), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("&", n.BinaryExpression("+", n.Identifier("temp"), n.Register("a")), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(193)), n.ConditionalExpression(n.CallExpression("getBC"), n.Literal(F_PARITY), n.Literal(0))), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_BIT3))), n.ConditionalExpression(n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), - n.Literal(0))))), n.IfStatement(n.BinaryExpression("!=", n.CallExpression("getBC"), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))] - } + n.Literal(0))))), n.IfStatement(n.BinaryExpression("!=", n.CallExpression("getBC"), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))]; + }; }, CPIR:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(F_CARRY)), n.Literal(F_NEGATIVE)))), n.ExpressionStatement(n.CallExpression("cp_a", [o.READ_MEM8(n.CallExpression("getHL"))])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("incHL")), n.ExpressionStatement(n.AssignmentExpression("|=", n.Identifier("temp"), n.ConditionalExpression(n.BinaryExpression("==", n.CallExpression("getBC"), n.Literal(0)), n.Literal(0), n.Literal(F_PARITY)))), n.IfStatement(n.LogicalExpression("&&", n.BinaryExpression("!=", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_PARITY)), n.Literal(0)), n.BinaryExpression("==", n.BinaryExpression("&", n.Register("f"), n.Literal(F_ZERO)), n.Literal(0))), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), - n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp")))), n.ReturnStatement()])), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp"))))] - } + n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp")))), n.ReturnStatement()])), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(248)), n.Identifier("temp"))))]; + }; }, OTIR:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("getHL")))), n.ExpressionStatement(n.CallExpression("port.out", [n.Register("c"), n.Identifier("temp")])), o.DEC8("b")(), n.ExpressionStatement(n.CallExpression("incHL")), n.IfStatement(n.BinaryExpression(">", n.BinaryExpression("+", n.Register("l"), n.Identifier("temp")), n.Literal(255)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_CARRY))), n.ExpressionStatement(n.AssignmentExpression("|=", n.Register("f"), n.Literal(F_HALFCARRY)))]), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_CARRY)))), n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_HALFCARRY))))])), n.IfStatement(n.BinaryExpression("!=", n.BinaryExpression("&", n.Identifier("temp"), n.Literal(128)), n.Literal(0)), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=", - n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE)))))), n.IfStatement(n.BinaryExpression("!=", n.Register("b"), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))] - } + n.Register("f"), n.Literal(F_NEGATIVE)))), n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=", n.Register("f"), n.UnaryExpression("~", n.Literal(F_NEGATIVE)))))), n.IfStatement(n.BinaryExpression("!=", n.Register("b"), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))]; + }; }, LDDR:function() { return function($value$$, $target$$, $nextAddress$$) { return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), o.READ_MEM8(n.CallExpression("getHL")))), n.ExpressionStatement(n.CallExpression("writeMem", [n.CallExpression("getDE"), n.Identifier("temp")])), n.ExpressionStatement(n.CallExpression("decBC")), n.ExpressionStatement(n.CallExpression("decDE")), n.ExpressionStatement(n.CallExpression("decHL")), n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("temp"), n.BinaryExpression("&", n.BinaryExpression("+", n.Identifier("temp"), n.Register("a")), n.Literal(255)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"), n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("|", n.BinaryExpression("&", n.Register("f"), n.Literal(193)), n.ConditionalExpression(n.CallExpression("getBC"), n.Literal(F_PARITY), n.Literal(0))), n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_BIT3))), n.ConditionalExpression(n.BinaryExpression("&", n.Identifier("temp"), n.Literal(F_NEGATIVE)), n.Literal(32), - n.Literal(0))))), n.IfStatement(n.BinaryExpression("!=", n.CallExpression("getBC"), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))] - } + n.Literal(0))))), n.IfStatement(n.BinaryExpression("!=", n.CallExpression("getBC"), n.Literal(0)), n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", n.Identifier("tstates"), n.Literal(5))), n.ReturnStatement()]))]; + }; }, LD_RLC:generateIndexCBFunctions("rlc"), LD_RRC:generateIndexCBFunctions("rrc"), LD_RL:generateIndexCBFunctions("rl"), LD_RR:generateIndexCBFunctions("rr"), LD_SLA:generateIndexCBFunctions("sla"), LD_SRA:generateIndexCBFunctions("sra"), LD_SLL:generateIndexCBFunctions("sll"), LD_SRL:generateIndexCBFunctions("srl"), READ_MEM8:function($value$$) { - return n.CallExpression("readMem", $value$$) + return n.CallExpression("readMem", $value$$); }, READ_MEM16:function($value$$) { - return n.CallExpression("readMemWord", $value$$) + return n.CallExpression("readMemWord", $value$$); }}; function generateCBFunctions($fn$$) { return function($register1$$, $register2$$) { - return void 0 == $register2$$ ? function() { - return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression($fn$$, n.Register($register1$$)))) + return void 0 === $register2$$ ? function() { + return n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register1$$), n.CallExpression($fn$$, n.Register($register1$$)))); } : function() { - return n.ExpressionStatement(n.CallExpression("writeMem", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.CallExpression($fn$$, o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()))))) - } - } + return n.ExpressionStatement(n.CallExpression("writeMem", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.CallExpression($fn$$, o.READ_MEM8(n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()))))); + }; + }; } function generateIndexCBFunctions($fn$$) { return function($register1$$, $register2$$, $register3$$) { - return void 0 == $register3$$ ? function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.CallExpression($fn$$, o.READ_MEM8(n.Identifier("location")))]))] + return void 0 === $register3$$ ? function($value$$, $target$$, $nextAddress$$) { + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.CallExpression($fn$$, o.READ_MEM8(n.Identifier("location")))]))]; } : function($value$$, $target$$, $nextAddress$$) { - return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register3$$), n.CallExpression($fn$$, o.READ_MEM8(n.Identifier("location"))))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.Register($register3$$)]))] - } - } -} -function evaluate($expression$$) { - switch($expression$$.type) { - case "BinaryExpression": - if("Literal" != $expression$$.left.type && "Literal" != $expression$$.right.type) { - break - } - switch($expression$$.operator) { - case ">>": - return n.Literal($expression$$.left.value >> $expression$$.right.value); - case "&": - return n.Literal($expression$$.left.value & $expression$$.right.value) - } - } - return $expression$$ + return[n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("location"), n.BinaryExpression("&", n.BinaryExpression("+", n.CallExpression("get" + ($register1$$ + $register2$$).toUpperCase()), n.Literal($value$$)), n.Literal(65535)))), n.ExpressionStatement(n.AssignmentExpression("=", n.Register($register3$$), n.CallExpression($fn$$, o.READ_MEM8(n.Identifier("location"))))), n.ExpressionStatement(n.CallExpression("writeMem", [n.Identifier("location"), n.Register($register3$$)]))]; + }; + }; } ;var opcodeTableCB = [], opcodeTableDDCB = [], opcodeTableFDCB = [], regs = {B:["b"], C:["c"], D:["d"], E:["e"], H:["h"], L:["l"], "(HL)":["h", "l"], A:["a"]}; "RLC RRC RL RR SLA SRA SLL SRL".split(" ").forEach(function($op$$) { - for(var $reg$$ in regs) { + for (var $reg$$ in regs) { opcodeTableCB.push({name:$op$$ + " " + $reg$$, ast:o[$op$$].apply(null, regs[$reg$$])}), "(HL)" != $reg$$ ? (opcodeTableDDCB.push({name:"LD " + $reg$$ + "," + $op$$ + " (IX)", ast:o["LD_" + $op$$].apply(null, ["ixH", "ixL"].concat(regs[$reg$$]))}), opcodeTableFDCB.push({name:"LD " + $reg$$ + "," + $op$$ + " (IY)", ast:o["LD_" + $op$$].apply(null, ["iyH", "iyL"].concat(regs[$reg$$]))})) : (opcodeTableDDCB.push({name:$op$$ + " (IX)", ast:o["LD_" + $op$$]("ixH", "ixL")}), opcodeTableFDCB.push({name:$op$$ + - " (IY)", ast:o["LD_" + $op$$]("iyH", "iyL")})) + " (IY)", ast:o["LD_" + $op$$]("iyH", "iyL")})); } }); ["BIT", "RES", "SET"].forEach(function($op$$) { - for(var $i$$ = 0;8 > $i$$;$i$$++) { - for(var $reg$$ in regs) { - opcodeTableCB.push({name:$op$$ + " " + $i$$ + "," + $reg$$, ast:o[$op$$].apply(null, [$i$$].concat(regs[$reg$$]))}) + for (var $i$$ = 0;8 > $i$$;$i$$++) { + for (var $reg$$ in regs) { + opcodeTableCB.push({name:$op$$ + " " + $i$$ + "," + $reg$$, ast:o[$op$$].apply(null, [$i$$].concat(regs[$reg$$]))}); } - for(var $j$$ = 0;8 > $j$$;$j$$++) { - opcodeTableDDCB.push({name:$op$$ + " " + $i$$ + " (IX)", ast:o[$op$$].apply(null, [$i$$].concat(["ixH", "ixL"]))}), opcodeTableFDCB.push({name:$op$$ + " " + $i$$ + " (IY)", ast:o[$op$$].apply(null, [$i$$].concat(["iyH", "iyL"]))}) + for (var $j$$ = 0;8 > $j$$;$j$$++) { + opcodeTableDDCB.push({name:$op$$ + " " + $i$$ + " (IX)", ast:o[$op$$].apply(null, [$i$$].concat(["ixH", "ixL"]))}), opcodeTableFDCB.push({name:$op$$ + " " + $i$$ + " (IY)", ast:o[$op$$].apply(null, [$i$$].concat(["iyH", "iyL"]))}); } } }); function generateIndexTable($index$$) { var $register_registerL$$ = $index$$.substring(1, 2).toLowerCase(), $registerH$$ = "i" + $register_registerL$$ + "H", $register_registerL$$ = "i" + $register_registerL$$ + "L"; return{9:{name:"ADD " + $index$$ + ",BC", ast:o.ADD16($registerH$$, $register_registerL$$, "b", "c")}, 25:{name:"ADD " + $index$$ + ",DE", ast:o.ADD16($registerH$$, $register_registerL$$, "d", "e")}, 33:{name:"LD " + $index$$ + ",nn", ast:o.LD16($registerH$$, $register_registerL$$)}, 34:{name:"LD (nn)," + $index$$, ast:o.LD_NN($registerH$$, $register_registerL$$)}, 35:{name:"INC " + $index$$, ast:o.INC16($registerH$$, $register_registerL$$)}, 42:{name:"LD " + $index$$ + ",(nn)", ast:o.LD16($registerH$$, - $register_registerL$$, "n", "n"), operand:UINT16}, 43:{name:"DEC " + $index$$, ast:o.DEC16($registerH$$, $register_registerL$$)}, 52:{name:"INC (" + $index$$ + "+d)", ast:o.INC_X($registerH$$, $register_registerL$$)}, 53:{name:"DEC (" + $index$$ + "+d)", ast:o.DEC_X($registerH$$, $register_registerL$$)}, 54:{name:"LD (" + $index$$ + "+d),n", ast:o.LD_X($registerH$$, $register_registerL$$)}, 57:{name:"ADD " + $index$$ + ",SP", ast:o.ADD16($registerH$$, $register_registerL$$, "sp")}, 70:{name:"LD B,(" + - $index$$ + "+d)", ast:o.LD8_D("b", $registerH$$, $register_registerL$$)}, 78:{name:"LD C,(" + $index$$ + "+d)", ast:o.LD8_D("c", $registerH$$, $register_registerL$$)}, 84:{name:" LD D," + $index$$ + "H *", ast:o.LD8("d", $registerH$$)}, 86:{name:"LD D,(" + $index$$ + "+d)", ast:o.LD8_D("d", $registerH$$, $register_registerL$$)}, 93:{name:"LD E," + $index$$ + "L *", ast:o.LD8("e", $register_registerL$$)}, 94:{name:"LD E,(" + $index$$ + "+d)", ast:o.LD8_D("e", $registerH$$, $register_registerL$$)}, - 96:{name:"LD " + $index$$ + "H,B", ast:o.LD8($registerH$$, "b")}, 97:{name:"LD " + $index$$ + "H,C", ast:o.LD8($registerH$$, "c")}, 98:{name:"LD " + $index$$ + "H,D", ast:o.LD8($registerH$$, "d")}, 99:{name:"LD " + $index$$ + "H,E", ast:o.LD8($registerH$$, "e")}, 100:{name:"LD " + $index$$ + "H," + $index$$ + "H", ast:o.NOOP()}, 101:{name:"LD " + $index$$ + "H," + $index$$ + "L *", ast:o.LD8_D($registerH$$, $register_registerL$$)}, 102:{name:"LD H,(" + $index$$ + "+d)", ast:o.LD8_D("h", $registerH$$, - $register_registerL$$)}, 103:{name:"LD " + $index$$ + "H,A", ast:o.LD8($registerH$$, "a")}, 104:{name:"LD " + $index$$ + "L,B", ast:o.LD8($register_registerL$$, "b")}, 105:{name:"LD " + $index$$ + "L,C", ast:o.LD8($register_registerL$$, "c")}, 106:{name:"LD " + $index$$ + "L,D", ast:o.LD8($register_registerL$$, "d")}, 107:{name:"LD " + $index$$ + "L,E", ast:o.LD8($register_registerL$$, "e")}, 108:{name:"LD " + $index$$ + "L," + $index$$ + "H", ast:o.LD8_D($register_registerL$$, $registerH$$)}, - 109:{name:"LD " + $index$$ + "L," + $index$$ + "L *", ast:o.NOOP()}, 110:{name:"LD L,(" + $index$$ + "+d)", ast:o.LD8_D("l", $registerH$$, $register_registerL$$)}, 111:{name:"LD " + $index$$ + "L,A *", ast:o.LD8($register_registerL$$, "a")}, 112:{name:"LD (" + $index$$ + "+d),B", ast:o.LD_X("b", $registerH$$, $register_registerL$$)}, 113:{name:"LD (" + $index$$ + "+d),C", ast:o.LD_X("c", $registerH$$, $register_registerL$$)}, 114:{name:"LD (" + $index$$ + "+d),D", ast:o.LD_X("d", $registerH$$, - $register_registerL$$)}, 115:{name:"LD (" + $index$$ + "+d),E", ast:o.LD_X("e", $registerH$$, $register_registerL$$)}, 116:{name:"LD (" + $index$$ + "+d),H", ast:o.LD_X("h", $registerH$$, $register_registerL$$)}, 117:{name:"LD (" + $index$$ + "+d),L", ast:o.LD_X("l", $registerH$$, $register_registerL$$)}, 118:{name:"LD (" + $index$$ + "+d),B", ast:o.LD_X("b", $registerH$$, $register_registerL$$)}, 119:{name:"LD (" + $index$$ + "+d),A", ast:o.LD_X("a", $registerH$$, $register_registerL$$)}, 126:{name:"LD A,(" + - $index$$ + "+d)", ast:o.LD8_D("a", $registerH$$, $register_registerL$$)}, 124:{name:"LD A," + $index$$ + "H", ast:o.LD8("a", $registerH$$)}, 125:{name:"LD A," + $index$$ + "L", ast:o.LD8("a", $register_registerL$$)}, 132:{name:"ADD A," + $index$$ + "H", ast:o.ADD($register_registerL$$)}, 133:{name:"ADD A," + $index$$ + "L", ast:o.ADD($register_registerL$$)}, 134:{name:"ADD A,(" + $index$$ + "+d)", ast:o.ADD_X($registerH$$, $register_registerL$$)}, 140:{name:"ADC A," + $index$$ + "H", ast:o.ADC($register_registerL$$)}, - 141:{name:"ADC A," + $index$$ + "L", ast:o.ADC($register_registerL$$)}, 142:{name:"ADC A,(" + $index$$ + "+d)", ast:o.ADC_X($registerH$$, $register_registerL$$)}, 148:{name:"SUB A," + $index$$ + "H", ast:o.SUB($register_registerL$$)}, 149:{name:"SUB A," + $index$$ + "L", ast:o.SUB($register_registerL$$)}, 150:{name:"SUB A,(" + $index$$ + "+d)", ast:o.SUB_X($registerH$$, $register_registerL$$)}, 156:{name:"SBC A," + $index$$ + "H", ast:o.SBC($register_registerL$$)}, 157:{name:"SBC A," + $index$$ + - "L", ast:o.SBC($register_registerL$$)}, 158:{name:"SBC A,(" + $index$$ + "+d)", ast:o.SBC_X($registerH$$, $register_registerL$$)}, 166:{name:"AND A,(" + $index$$ + "+d)", ast:o.AND_X($registerH$$, $register_registerL$$)}, 174:{name:"XOR A,(" + $index$$ + "+d)", ast:o.XOR_X($registerH$$, $register_registerL$$)}, 182:{name:"OR A,(" + $index$$ + "+d)", ast:o.OR_X($registerH$$, $register_registerL$$)}, 190:{name:"CP (" + $index$$ + "+d)", ast:o.CP_X($registerH$$, $register_registerL$$)}, 203:"IX" == - $index$$ ? opcodeTableDDCB : opcodeTableFDCB, 225:{name:"POP " + $index$$, ast:o.POP($registerH$$, $register_registerL$$)}, 227:{name:"EX SP,(" + $index$$ + ")", ast:o.EX_SP_X($registerH$$, $register_registerL$$)}, 229:{name:"PUSH " + $index$$, ast:o.PUSH($registerH$$, $register_registerL$$)}, 233:{name:"JP (" + $index$$ + ")", ast:o.JP_X($registerH$$, $register_registerL$$)}, 249:{name:"LD SP," + $index$$, ast:o.LD_SP($registerH$$, $register_registerL$$)}} + $register_registerL$$, "n", "n")}, 43:{name:"DEC " + $index$$, ast:o.DEC16($registerH$$, $register_registerL$$)}, 52:{name:"INC (" + $index$$ + "+d)", ast:o.INC_X($registerH$$, $register_registerL$$)}, 53:{name:"DEC (" + $index$$ + "+d)", ast:o.DEC_X($registerH$$, $register_registerL$$)}, 54:{name:"LD (" + $index$$ + "+d),n", ast:o.LD_X($registerH$$, $register_registerL$$)}, 57:{name:"ADD " + $index$$ + ",SP", ast:o.ADD16($registerH$$, $register_registerL$$, "sp")}, 70:{name:"LD B,(" + $index$$ + + "+d)", ast:o.LD8_D("b", $registerH$$, $register_registerL$$)}, 78:{name:"LD C,(" + $index$$ + "+d)", ast:o.LD8_D("c", $registerH$$, $register_registerL$$)}, 84:{name:" LD D," + $index$$ + "H *", ast:o.LD8("d", $registerH$$)}, 86:{name:"LD D,(" + $index$$ + "+d)", ast:o.LD8_D("d", $registerH$$, $register_registerL$$)}, 93:{name:"LD E," + $index$$ + "L *", ast:o.LD8("e", $register_registerL$$)}, 94:{name:"LD E,(" + $index$$ + "+d)", ast:o.LD8_D("e", $registerH$$, $register_registerL$$)}, 96:{name:"LD " + + $index$$ + "H,B", ast:o.LD8($registerH$$, "b")}, 97:{name:"LD " + $index$$ + "H,C", ast:o.LD8($registerH$$, "c")}, 98:{name:"LD " + $index$$ + "H,D", ast:o.LD8($registerH$$, "d")}, 99:{name:"LD " + $index$$ + "H,E", ast:o.LD8($registerH$$, "e")}, 100:{name:"LD " + $index$$ + "H," + $index$$ + "H", ast:o.NOOP()}, 101:{name:"LD " + $index$$ + "H," + $index$$ + "L *", ast:o.LD8_D($registerH$$, $register_registerL$$)}, 102:{name:"LD H,(" + $index$$ + "+d)", ast:o.LD8_D("h", $registerH$$, $register_registerL$$)}, + 103:{name:"LD " + $index$$ + "H,A", ast:o.LD8($registerH$$, "a")}, 104:{name:"LD " + $index$$ + "L,B", ast:o.LD8($register_registerL$$, "b")}, 105:{name:"LD " + $index$$ + "L,C", ast:o.LD8($register_registerL$$, "c")}, 106:{name:"LD " + $index$$ + "L,D", ast:o.LD8($register_registerL$$, "d")}, 107:{name:"LD " + $index$$ + "L,E", ast:o.LD8($register_registerL$$, "e")}, 108:{name:"LD " + $index$$ + "L," + $index$$ + "H", ast:o.LD8_D($register_registerL$$, $registerH$$)}, 109:{name:"LD " + $index$$ + + "L," + $index$$ + "L *", ast:o.NOOP()}, 110:{name:"LD L,(" + $index$$ + "+d)", ast:o.LD8_D("l", $registerH$$, $register_registerL$$)}, 111:{name:"LD " + $index$$ + "L,A *", ast:o.LD8($register_registerL$$, "a")}, 112:{name:"LD (" + $index$$ + "+d),B", ast:o.LD_X("b", $registerH$$, $register_registerL$$)}, 113:{name:"LD (" + $index$$ + "+d),C", ast:o.LD_X("c", $registerH$$, $register_registerL$$)}, 114:{name:"LD (" + $index$$ + "+d),D", ast:o.LD_X("d", $registerH$$, $register_registerL$$)}, 115:{name:"LD (" + + $index$$ + "+d),E", ast:o.LD_X("e", $registerH$$, $register_registerL$$)}, 116:{name:"LD (" + $index$$ + "+d),H", ast:o.LD_X("h", $registerH$$, $register_registerL$$)}, 117:{name:"LD (" + $index$$ + "+d),L", ast:o.LD_X("l", $registerH$$, $register_registerL$$)}, 118:{name:"LD (" + $index$$ + "+d),B", ast:o.LD_X("b", $registerH$$, $register_registerL$$)}, 119:{name:"LD (" + $index$$ + "+d),A", ast:o.LD_X("a", $registerH$$, $register_registerL$$)}, 126:{name:"LD A,(" + $index$$ + "+d)", ast:o.LD8_D("a", + $registerH$$, $register_registerL$$)}, 124:{name:"LD A," + $index$$ + "H", ast:o.LD8("a", $registerH$$)}, 125:{name:"LD A," + $index$$ + "L", ast:o.LD8("a", $register_registerL$$)}, 132:{name:"ADD A," + $index$$ + "H", ast:o.ADD($register_registerL$$)}, 133:{name:"ADD A," + $index$$ + "L", ast:o.ADD($register_registerL$$)}, 134:{name:"ADD A,(" + $index$$ + "+d)", ast:o.ADD_X($registerH$$, $register_registerL$$)}, 140:{name:"ADC A," + $index$$ + "H", ast:o.ADC($register_registerL$$)}, 141:{name:"ADC A," + + $index$$ + "L", ast:o.ADC($register_registerL$$)}, 142:{name:"ADC A,(" + $index$$ + "+d)", ast:o.ADC_X($registerH$$, $register_registerL$$)}, 148:{name:"SUB A," + $index$$ + "H", ast:o.SUB($register_registerL$$)}, 149:{name:"SUB A," + $index$$ + "L", ast:o.SUB($register_registerL$$)}, 150:{name:"SUB A,(" + $index$$ + "+d)", ast:o.SUB_X($registerH$$, $register_registerL$$)}, 156:{name:"SBC A," + $index$$ + "H", ast:o.SBC($register_registerL$$)}, 157:{name:"SBC A," + $index$$ + "L", ast:o.SBC($register_registerL$$)}, + 158:{name:"SBC A,(" + $index$$ + "+d)", ast:o.SBC_X($registerH$$, $register_registerL$$)}, 166:{name:"AND A,(" + $index$$ + "+d)", ast:o.AND_X($registerH$$, $register_registerL$$)}, 174:{name:"XOR A,(" + $index$$ + "+d)", ast:o.XOR_X($registerH$$, $register_registerL$$)}, 182:{name:"OR A,(" + $index$$ + "+d)", ast:o.OR_X($registerH$$, $register_registerL$$)}, 190:{name:"CP (" + $index$$ + "+d)", ast:o.CP_X($registerH$$, $register_registerL$$)}, 203:"IX" == $index$$ ? opcodeTableDDCB : opcodeTableFDCB, + 225:{name:"POP " + $index$$, ast:o.POP($registerH$$, $register_registerL$$)}, 227:{name:"EX SP,(" + $index$$ + ")", ast:o.EX_SP_X($registerH$$, $register_registerL$$)}, 229:{name:"PUSH " + $index$$, ast:o.PUSH($registerH$$, $register_registerL$$)}, 233:{name:"JP (" + $index$$ + ")", ast:o.JP_X($registerH$$, $register_registerL$$)}, 249:{name:"LD SP," + $index$$, ast:o.LD_SP($registerH$$, $register_registerL$$)}}; } -;var opcodeTableED = {64:{name:"IN B,(C)", ast:o.IN("b", "c")}, 66:{name:"SBC HL,BC", ast:o.SBC16("b", "c")}, 65:{name:"OUT (C),B", ast:o.OUT("c", "b")}, 67:{name:"LD (nn),BC", ast:o.LD_NN("b", "c")}, 68:{name:"NEG", ast:o.NEG()}, 69:{name:"RETN / RETI", ast:o.RETN_RETI()}, 70:{name:"IM 0", ast:o.IM(0)}, 72:{name:"IN C,(C)", ast:o.IN("c", "c")}, 73:{name:"OUT (C),C", ast:o.OUT("c", "c")}, 74:{name:"ADC HL,BC", ast:o.ADC16("b", "c")}, 75:{name:"LD BC,(nn)", ast:o.LD16("b", "c", "n", "n"), operand:UINT16}, -76:{name:"NEG", ast:o.NEG()}, 77:{name:"RETN / RETI", ast:o.RETN_RETI()}, 78:{name:"IM 0", ast:o.IM(0)}, 79:{name:"LD R,A", ast:o.LD8("r", "a")}, 80:{name:"IN D,(C)", ast:o.IN("d", "c")}, 81:{name:"OUT (C),D", ast:o.OUT("c", "d")}, 82:{name:"SBC HL,DE", ast:o.SBC16("d", "e")}, 83:{name:"LD (nn),DE", ast:o.LD_NN("d", "e")}, 84:{name:"NEG", ast:o.NEG()}, 85:{name:"RETN / RETI", ast:o.RETN_RETI()}, 86:{name:"IM 1", ast:o.IM(1)}, 87:{name:"LD A,I", ast:o.LD8("a", "i")}, 88:{name:"IN E,(C)", ast:o.IN("e", -"c")}, 89:{name:"OUT (C),E", ast:o.OUT("c", "e")}, 90:{name:"ADC HL,DE", ast:o.ADC16("d", "e")}, 91:{name:"LD DE,(nn)", ast:o.LD16("d", "e", "n", "n"), operand:UINT16}, 92:{name:"NEG", ast:o.NEG()}, 95:{name:"LD A,R", ast:o.LD8("a", "r")}, 96:{name:"IN H,(C)", ast:o.IN("h", "c")}, 97:{name:"OUT (C),H", ast:o.OUT("c", "h")}, 98:{name:"SBC HL,HL", ast:o.SBC16("h", "l")}, 99:{name:"LD (nn),HL", ast:o.LD_NN("h", "l")}, 100:{name:"NEG", ast:o.NEG()}, 102:{name:"IM 0", ast:o.IM(0)}, 104:{name:"IN L,(C)", -ast:o.IN("l", "c")}, 105:{name:"OUT (C),L", ast:o.OUT("c", "l")}, 106:{name:"ADC HL,HL", ast:o.ADC16("h", "l")}, 107:{name:"LD HL,(nn)", ast:o.LD16("h", "l", "n", "n"), operand:UINT16}, 108:{name:"NEG", ast:o.NEG()}, 110:{name:"IM 0", ast:o.IM(0)}, 115:{name:"LD (nn),SP", ast:o.LD_NN("sp")}, 116:{name:"NEG", ast:o.NEG()}, 118:{name:"IM 1", ast:o.IM(1)}, 120:{name:"IN A,(C)", ast:o.IN("a", "c")}, 121:{name:"OUT (C),A", ast:o.OUT("c", "a")}, 122:{name:"ADC HL,SP", ast:o.ADC16("sp")}, 124:{name:"NEG", -ast:o.NEG()}, 160:{name:"LDI", ast:o.LDI()}, 161:{name:"CPI", ast:o.CPI()}, 162:{name:"INI", ast:o.INI()}, 163:{name:"OUTI", ast:o.OUTI()}, 168:{name:"LDD", ast:o.LDD()}, 171:{name:"OUTD", ast:o.OUTD()}, 176:{name:"LDIR", ast:o.LDIR()}, 177:{name:"CPIR", ast:o.CPIR()}, 179:{name:"OTIR", ast:o.OTIR()}, 184:{name:"LDDR", ast:o.LDDR()}}; -var opcodeTable = [{name:"NOP", ast:o.NOOP()}, {name:"LD BC,nn", ast:o.LD16("b", "c"), operand:UINT16}, {name:"LD (BC),A", ast:o.LD_WRITE_MEM("b", "c", "a")}, {name:"INC BC", ast:o.INC16("b", "c")}, {name:"INC B", ast:o.INC8("b")}, {name:"DEC B", ast:o.DEC8("b")}, {name:"LD B,n", ast:o.LD8("b"), operand:UINT8}, {name:"RLCA", ast:o.RLCA()}, {name:"EX AF AF'", ast:o.EX_AF()}, {name:"ADD HL,BC", ast:o.ADD16("h", "l", "b", "c")}, {name:"LD A,(BC)", ast:o.LD8("a", "b", "c")}, {name:"DEC BC", ast:o.DEC16("b", -"c")}, {name:"INC C", ast:o.INC8("c")}, {name:"DEC C", ast:o.DEC8("c")}, {name:"LD C,n", ast:o.LD8("c"), operand:UINT8}, {name:"RRCA", ast:o.RRCA()}, {name:"DJNZ (PC+e)", ast:o.DJNZ(), operand:INT8}, {name:"LD DE,nn", ast:o.LD16("d", "e"), operand:UINT16}, {name:"LD (DE),A", ast:o.LD_WRITE_MEM("d", "e", "a")}, {name:"INC DE", ast:o.INC16("d", "e")}, {name:"INC D", ast:o.INC8("d")}, {name:"DEC D", ast:o.DEC8("d")}, {name:"LD D,n", ast:o.LD8("d"), operand:UINT8}, {name:"RLA", ast:o.RLA()}, {name:"JR (PC+e)", -ast:o.JP(), operand:INT8}, {name:"ADD HL,DE", ast:o.ADD16("h", "l", "d", "e")}, {name:"LD A,(DE)", ast:o.LD8("a", "d", "e")}, {name:"DEC DE", ast:o.DEC16("d", "e")}, {name:"INC E", ast:o.INC8("e")}, {name:"DEC E", ast:o.DEC8("e")}, {name:"LD E,n", ast:o.LD8("e"), operand:UINT8}, {name:"RRA", ast:o.RRA()}, {name:"JR NZ,(PC+e)", ast:o.JRNZ(), operand:INT8}, {name:"LD HL,nn", ast:o.LD16("h", "l"), operand:UINT16}, {name:"LD (nn),HL", ast:o.LD_NN("h", "l"), operand:UINT16}, {name:"INC HL", ast:o.INC16("h", -"l")}, {name:"INC H", ast:o.INC8("h")}, {name:"DEC H", ast:o.DEC8("h")}, {name:"LD H,n", ast:o.LD8("h"), operand:UINT8}, {name:"DAA", ast:o.DAA()}, {name:"JR Z,(PC+e)", ast:o.JRZ(), operand:INT8}, {name:"ADD HL,HL", ast:o.ADD16("h", "l", "h", "l")}, {name:"LD HL,(nn)", ast:o.LD16("h", "l", "n", "n"), operand:UINT16}, {name:"DEC HL", ast:o.DEC16("h", "l")}, {name:"INC L", ast:o.INC8("l")}, {name:"DEC L", ast:o.DEC8("l")}, {name:"LD L,n", ast:o.LD8("l"), operand:UINT8}, {name:"CPL", ast:o.CPL()}, {name:"JR NC,(PC+e)", -ast:o.JRNC(), operand:INT8}, {name:"LD SP,nn", ast:o.LD_SP(), operand:UINT16}, {name:"LD (nn),A", ast:o.LD_WRITE_MEM("n", "n", "a"), operand:UINT16}, {name:"INC SP", ast:o.INC8("s", "p")}, {name:"INC (HL)", ast:o.INC8("h", "l")}, {name:"DEC (HL)", ast:o.DEC8("h", "l")}, {name:"LD (HL),n", ast:o.LD_WRITE_MEM("h", "l"), operand:UINT8}, {name:"SCF", ast:o.SCF()}, {name:"JR C,(PC+e)", ast:o.JRC(), operand:INT8}, {name:"ADD HL,SP", ast:o.ADD16("h", "l", "sp")}, {name:"LD A,(nn)", ast:o.LD8("a", "n", "n"), -operand:UINT16}, {name:"DEC SP", ast:o.DEC8("s", "p")}, {name:"INC A", ast:o.INC8("a")}, {name:"DEC A", ast:o.DEC8("a")}, {name:"LD A,n", ast:o.LD8("a"), operand:UINT8}, {name:"CCF", ast:o.CCF()}, {name:"LD B,B", ast:o.NOOP(), operand:UINT8}, {name:"LD B,C", ast:o.LD8("b", "c")}, {name:"LD B,D", ast:o.LD8("b", "d")}, {name:"LD B,E", ast:o.LD8("b", "e")}, {name:"LD B,H", ast:o.LD8("b", "h")}, {name:"LD B,L", ast:o.LD8("b", "l")}, {name:"LD B,(HL)", ast:o.LD8("b", "h", "l")}, {name:"LD B,A", ast:o.LD8("b", -"a")}, {name:"LD C,B", ast:o.LD8("c", "b")}, {name:"LD C,C", ast:o.NOOP()}, {name:"LD C,D", ast:o.LD8("c", "d")}, {name:"LD C,E", ast:o.LD8("c", "e")}, {name:"LD C,H", ast:o.LD8("c", "h")}, {name:"LD C,L", ast:o.LD8("c", "l")}, {name:"LD C,(HL)", ast:o.LD8("c", "h", "l")}, {name:"LD C,A", ast:o.LD8("c", "a")}, {name:"LD D,B", ast:o.LD8("d", "b")}, {name:"LD D,C", ast:o.LD8("d", "c")}, {name:"LD D,D", ast:o.NOOP()}, {name:"LD D,E", ast:o.LD8("d", "e")}, {name:"LD D,H", ast:o.LD8("d", "h")}, {name:"LD D,L", -ast:o.LD8("d", "l")}, {name:"LD D,(HL)", ast:o.LD8("d", "h", "l")}, {name:"LD D,A", ast:o.LD8("d", "a")}, {name:"LD E,B", ast:o.LD8("e", "b")}, {name:"LD E,C", ast:o.LD8("e", "c")}, {name:"LD E,D", ast:o.LD8("e", "d")}, {name:"LD E,E", ast:o.NOOP()}, {name:"LD E,H", ast:o.LD8("e", "h")}, {name:"LD E,L", ast:o.LD8("e", "l")}, {name:"LD E,(HL)", ast:o.LD8("e", "h", "l")}, {name:"LD E,A", ast:o.LD8("e", "a")}, {name:"LD H,B", ast:o.LD8("h", "b")}, {name:"LD H,C", ast:o.LD8("h", "c")}, {name:"LD H,D", -ast:o.LD8("h", "d")}, {name:"LD H,E", ast:o.LD8("h", "e")}, {name:"LD H,H", ast:o.NOOP()}, {name:"LD H,L", ast:o.LD8("h", "l")}, {name:"LD H,(HL)", ast:o.LD8("h", "h", "l")}, {name:"LD H,A", ast:o.LD8("h", "a")}, {name:"LD L,B", ast:o.LD8("l", "b")}, {name:"LD L,C", ast:o.LD8("l", "c")}, {name:"LD L,D", ast:o.LD8("l", "d")}, {name:"LD L,E", ast:o.LD8("l", "e")}, {name:"LD L,H", ast:o.LD8("l", "h")}, {name:"LD L,L", ast:o.NOOP()}, {name:"LD L,(HL)", ast:o.LD8("l", "h", "l")}, {name:"LD L,A", ast:o.LD8("l", -"a")}, {name:"LD (HL),B", ast:o.LD_WRITE_MEM("h", "l", "b")}, {name:"LD (HL),C", ast:o.LD_WRITE_MEM("h", "l", "c")}, {name:"LD (HL),D", ast:o.LD_WRITE_MEM("h", "l", "d")}, {name:"LD (HL),E", ast:o.LD_WRITE_MEM("h", "l", "e")}, {name:"LD (HL),H", ast:o.LD_WRITE_MEM("h", "l", "h")}, {name:"LD (HL),L", ast:o.LD_WRITE_MEM("h", "l", "l")}, {name:"HALT", ast:o.HALT()}, {name:"LD (HL),A", ast:o.LD_WRITE_MEM("h", "l", "a")}, {name:"LD A,B", ast:o.LD8("a", "b")}, {name:"LD A,C", ast:o.LD8("a", "c")}, {name:"LD A,D", -ast:o.LD8("a", "d")}, {name:"LD A,E", ast:o.LD8("a", "e")}, {name:"LD A,H", ast:o.LD8("a", "h")}, {name:"LD A,L", ast:o.LD8("a", "l")}, {name:"LD A,(HL)", ast:o.LD8("a", "h", "l")}, {name:"LD A,A", ast:o.NOOP()}, {name:"ADD A,B", ast:o.ADD("b")}, {name:"ADD A,C", ast:o.ADD("c")}, {name:"ADD A,D", ast:o.ADD("d")}, {name:"ADD A,E", ast:o.ADD("e")}, {name:"ADD A,H", ast:o.ADD("h")}, {name:"ADD A,L", ast:o.ADD("l")}, {name:"ADD A,(HL)", ast:o.ADD("h", "l")}, {name:"ADD A,A", ast:o.ADD("a")}, {name:"ADC A,B", -ast:o.ADC("b")}, {name:"ADC A,C", ast:o.ADC("c")}, {name:"ADC A,D", ast:o.ADC("d")}, {name:"ADC A,E", ast:o.ADC("e")}, {name:"ADC A,H", ast:o.ADC("h")}, {name:"ADC A,L", ast:o.ADC("l")}, {name:"ADC A,(HL)", ast:o.ADC("h", "l")}, {name:"ADC A,A", ast:o.ADC("a")}, {name:"SUB A,B", ast:o.SUB("b")}, {name:"SUB A,C", ast:o.SUB("c")}, {name:"SUB A,D", ast:o.SUB("d")}, {name:"SUB A,E", ast:o.SUB("e")}, {name:"SUB A,H", ast:o.SUB("h")}, {name:"SUB A,L", ast:o.SUB("l")}, {name:"SUB A,(HL)", ast:o.SUB("h", -"l")}, {name:"SUB A,A", ast:o.SUB("a")}, {name:"SBC A,B", ast:o.SBC("b")}, {name:"SBC A,C", ast:o.SBC("c")}, {name:"SBC A,D", ast:o.SBC("d")}, {name:"SBC A,E", ast:o.SBC("e")}, {name:"SBC A,H", ast:o.SBC("h")}, {name:"SBC A,L", ast:o.SBC("l")}, {name:"SBC A,(HL)", ast:o.SBC("h", "l")}, {name:"SBC A,A", ast:o.SBC("a")}, {name:"AND A,B", ast:o.AND("b")}, {name:"AND A,C", ast:o.AND("c")}, {name:"AND A,D", ast:o.AND("d")}, {name:"AND A,E", ast:o.AND("e")}, {name:"AND A,H", ast:o.AND("h")}, {name:"AND A,L", -ast:o.AND("l")}, {name:"AND A,(HL)", ast:o.AND("h", "l")}, {name:"AND A,A", ast:o.AND("a")}, {name:"XOR A,B", ast:o.XOR("b")}, {name:"XOR A,C", ast:o.XOR("c")}, {name:"XOR A,D", ast:o.XOR("d")}, {name:"XOR A,E", ast:o.XOR("e")}, {name:"XOR A,H", ast:o.XOR("h")}, {name:"XOR A,L", ast:o.XOR("l")}, {name:"XOR A,(HL)", ast:o.XOR("h", "l")}, {name:"XOR A,A", ast:o.XOR("a")}, {name:"OR A,B", ast:o.OR("b")}, {name:"OR A,C", ast:o.OR("c")}, {name:"OR A,D", ast:o.OR("d")}, {name:"OR A,E", ast:o.OR("e")}, -{name:"OR A,H", ast:o.OR("h")}, {name:"OR A,L", ast:o.OR("l")}, {name:"OR A,(HL)", ast:o.OR("h", "l")}, {name:"OR A,A", ast:o.OR("a")}, {name:"CP A,B", ast:o.CP("b")}, {name:"CP A,C", ast:o.CP("c")}, {name:"CP A,D", ast:o.CP("d")}, {name:"CP A,E", ast:o.CP("e")}, {name:"CP A,H", ast:o.CP("h")}, {name:"CP A,L", ast:o.CP("l")}, {name:"CP A,(HL)", ast:o.CP("h", "l")}, {name:"CP A,A", ast:o.CP("a")}, {name:"RET NZ", ast:o.RET("==", F_ZERO)}, {name:"POP BC", ast:o.POP("b", "c")}, {name:"JP NZ,(nn)", ast:o.JP("==", -F_ZERO)}, {name:"JP (nn)", ast:o.JP()}, {name:"CALL NZ (nn)", ast:o.CALL("==", F_ZERO)}, {name:"PUSH BC", ast:o.PUSH("b", "c")}, {name:"ADD A,n", ast:o.ADD()}, {name:"RST 0x00", ast:o.RST(0)}, {name:"RET Z", ast:o.RET("!=", F_ZERO)}, {name:"RET", ast:o.RET()}, {name:"JP Z,(nn)", ast:o.JP("!=", F_ZERO)}, opcodeTableCB, {name:"CALL Z (nn)", ast:o.CALL("!=", F_ZERO)}, {name:"CALL (nn)", ast:o.CALL()}, {name:"ADC A,n", ast:o.ADC()}, {name:"RST 0x08", ast:o.RST(8)}, {name:"RET NC", ast:o.RET("==", F_CARRY)}, -{name:"POP DE", ast:o.POP("d", "e")}, {name:"JP NC,(nn)", ast:o.JP("==", F_CARRY)}, {name:"OUT (n),A", ast:o.OUT("a")}, {name:"CALL NC (nn)", ast:o.CALL("==", F_CARRY)}, {name:"PUSH DE", ast:o.PUSH("d", "e")}, {name:"SUB n", ast:o.SUB()}, {name:"RST 0x10", ast:o.RST(16)}, {name:"RET C", ast:o.RET("!=", F_CARRY)}, {name:"EXX", ast:o.EXX()}, {name:"JP C,(nn)", ast:o.JP("!=", F_CARRY)}, {name:"IN A,(n)", ast:o.IN("a")}, {name:"CALL C (nn)", ast:o.CALL("!=", F_CARRY)}, generateIndexTable("IX"), {name:"SBC A,n", -ast:o.SBC()}, {name:"RST 0x18", ast:o.RST(24)}, {name:"RET PO", ast:o.RET("==", F_PARITY)}, {name:"POP HL", ast:o.POP("h", "l")}, {name:"JP PO,(nn)", ast:o.JP("==", F_PARITY)}, {name:"EX (SP),HL", ast:o.EX_SP_HL()}, {name:"CALL PO (nn)", ast:o.CALL("==", F_PARITY)}, {name:"PUSH HL", ast:o.PUSH("h", "l")}, {name:"AND (n)", ast:o.AND()}, {name:"RST 0x20", ast:o.RST(32)}, {name:"RET PE", ast:o.RET("!=", F_PARITY)}, {name:"JP (HL)", ast:o.JP("h", "l")}, {name:"JP PE,(nn)", ast:o.JP("!=", F_PARITY)}, -{name:"EX DE,HL", ast:o.EX_DE_HL()}, {name:"CALL PE (nn)", ast:o.CALL("!=", F_PARITY)}, opcodeTableED, {name:"XOR n", ast:o.XOR()}, {name:"RST 0x28", ast:o.RST(40)}, {name:"RET P", ast:o.RET("==", F_SIGN)}, {name:"POP AF", ast:o.POP("a", "f")}, {name:"JP P,(nn)", ast:o.JP("==", F_SIGN)}, {name:"DI", ast:o.DI()}, {name:"CALL P (nn)", ast:o.CALL("==", F_SIGN)}, {name:"PUSH AF", ast:o.PUSH("a", "f")}, {name:"OR n", ast:o.OR()}, {name:"RST 0x30", ast:o.RST(48)}, {name:"RET M", ast:o.RET("!=", F_SIGN)}, -{name:"LD SP,HL", ast:o.LD_SP("h", "l")}, {name:"JP M,(nn)", ast:o.JP("!=", F_SIGN)}, {name:"EI", ast:o.EI()}, {name:"CALL M (nn)", ast:o.CALL("!=", F_SIGN)}, generateIndexTable("IY"), {name:"CP n", ast:o.CP()}, {name:"RST 0x38", ast:o.RST(56)}]; +;var opcodeTableED = {64:{name:"IN B,(C)", ast:o.IN("b", "c")}, 66:{name:"SBC HL,BC", ast:o.SBC16("b", "c")}, 65:{name:"OUT (C),B", ast:o.OUT("c", "b")}, 67:{name:"LD (nn),BC", ast:o.LD_NN("b", "c")}, 68:{name:"NEG", ast:o.NEG()}, 69:{name:"RETN / RETI", ast:o.RETN_RETI()}, 70:{name:"IM 0", ast:o.IM(0)}, 72:{name:"IN C,(C)", ast:o.IN("c", "c")}, 73:{name:"OUT (C),C", ast:o.OUT("c", "c")}, 74:{name:"ADC HL,BC", ast:o.ADC16("b", "c")}, 75:{name:"LD BC,(nn)", ast:o.LD16("b", "c", "n", "n")}, 76:{name:"NEG", +ast:o.NEG()}, 77:{name:"RETN / RETI", ast:o.RETN_RETI()}, 78:{name:"IM 0", ast:o.IM(0)}, 79:{name:"LD R,A", ast:o.LD8("r", "a")}, 80:{name:"IN D,(C)", ast:o.IN("d", "c")}, 81:{name:"OUT (C),D", ast:o.OUT("c", "d")}, 82:{name:"SBC HL,DE", ast:o.SBC16("d", "e")}, 83:{name:"LD (nn),DE", ast:o.LD_NN("d", "e")}, 84:{name:"NEG", ast:o.NEG()}, 85:{name:"RETN / RETI", ast:o.RETN_RETI()}, 86:{name:"IM 1", ast:o.IM(1)}, 87:{name:"LD A,I", ast:o.LD8("a", "i")}, 88:{name:"IN E,(C)", ast:o.IN("e", "c")}, 89:{name:"OUT (C),E", +ast:o.OUT("c", "e")}, 90:{name:"ADC HL,DE", ast:o.ADC16("d", "e")}, 91:{name:"LD DE,(nn)", ast:o.LD16("d", "e", "n", "n")}, 92:{name:"NEG", ast:o.NEG()}, 95:{name:"LD A,R", ast:o.LD8("a", "r")}, 96:{name:"IN H,(C)", ast:o.IN("h", "c")}, 97:{name:"OUT (C),H", ast:o.OUT("c", "h")}, 98:{name:"SBC HL,HL", ast:o.SBC16("h", "l")}, 99:{name:"LD (nn),HL", ast:o.LD_NN("h", "l")}, 100:{name:"NEG", ast:o.NEG()}, 102:{name:"IM 0", ast:o.IM(0)}, 104:{name:"IN L,(C)", ast:o.IN("l", "c")}, 105:{name:"OUT (C),L", +ast:o.OUT("c", "l")}, 106:{name:"ADC HL,HL", ast:o.ADC16("h", "l")}, 107:{name:"LD HL,(nn)", ast:o.LD16("h", "l", "n", "n")}, 108:{name:"NEG", ast:o.NEG()}, 110:{name:"IM 0", ast:o.IM(0)}, 115:{name:"LD (nn),SP", ast:o.LD_NN("sp")}, 116:{name:"NEG", ast:o.NEG()}, 118:{name:"IM 1", ast:o.IM(1)}, 120:{name:"IN A,(C)", ast:o.IN("a", "c")}, 121:{name:"OUT (C),A", ast:o.OUT("c", "a")}, 122:{name:"ADC HL,SP", ast:o.ADC16("sp")}, 124:{name:"NEG", ast:o.NEG()}, 160:{name:"LDI", ast:o.LDI()}, 161:{name:"CPI", +ast:o.CPI()}, 162:{name:"INI", ast:o.INI()}, 163:{name:"OUTI", ast:o.OUTI()}, 168:{name:"LDD", ast:o.LDD()}, 171:{name:"OUTD", ast:o.OUTD()}, 176:{name:"LDIR", ast:o.LDIR()}, 177:{name:"CPIR", ast:o.CPIR()}, 179:{name:"OTIR", ast:o.OTIR()}, 184:{name:"LDDR", ast:o.LDDR()}}; +var opcodeTable = [{name:"NOP", ast:o.NOOP()}, {name:"LD BC,nn", ast:o.LD16("b", "c")}, {name:"LD (BC),A", ast:o.LD_WRITE_MEM("b", "c", "a")}, {name:"INC BC", ast:o.INC16("b", "c")}, {name:"INC B", ast:o.INC8("b")}, {name:"DEC B", ast:o.DEC8("b")}, {name:"LD B,n", ast:o.LD8("b")}, {name:"RLCA", ast:o.RLCA()}, {name:"EX AF AF'", ast:o.EX_AF()}, {name:"ADD HL,BC", ast:o.ADD16("h", "l", "b", "c")}, {name:"LD A,(BC)", ast:o.LD8("a", "b", "c")}, {name:"DEC BC", ast:o.DEC16("b", "c")}, {name:"INC C", ast:o.INC8("c")}, +{name:"DEC C", ast:o.DEC8("c")}, {name:"LD C,n", ast:o.LD8("c")}, {name:"RRCA", ast:o.RRCA()}, {name:"DJNZ (PC+e)", ast:o.DJNZ()}, {name:"LD DE,nn", ast:o.LD16("d", "e")}, {name:"LD (DE),A", ast:o.LD_WRITE_MEM("d", "e", "a")}, {name:"INC DE", ast:o.INC16("d", "e")}, {name:"INC D", ast:o.INC8("d")}, {name:"DEC D", ast:o.DEC8("d")}, {name:"LD D,n", ast:o.LD8("d")}, {name:"RLA", ast:o.RLA()}, {name:"JR (PC+e)", ast:o.JP()}, {name:"ADD HL,DE", ast:o.ADD16("h", "l", "d", "e")}, {name:"LD A,(DE)", ast:o.LD8("a", +"d", "e")}, {name:"DEC DE", ast:o.DEC16("d", "e")}, {name:"INC E", ast:o.INC8("e")}, {name:"DEC E", ast:o.DEC8("e")}, {name:"LD E,n", ast:o.LD8("e")}, {name:"RRA", ast:o.RRA()}, {name:"JR NZ,(PC+e)", ast:o.JRNZ()}, {name:"LD HL,nn", ast:o.LD16("h", "l")}, {name:"LD (nn),HL", ast:o.LD_NN("h", "l")}, {name:"INC HL", ast:o.INC16("h", "l")}, {name:"INC H", ast:o.INC8("h")}, {name:"DEC H", ast:o.DEC8("h")}, {name:"LD H,n", ast:o.LD8("h")}, {name:"DAA", ast:o.DAA()}, {name:"JR Z,(PC+e)", ast:o.JRZ()}, +{name:"ADD HL,HL", ast:o.ADD16("h", "l", "h", "l")}, {name:"LD HL,(nn)", ast:o.LD16("h", "l", "n", "n")}, {name:"DEC HL", ast:o.DEC16("h", "l")}, {name:"INC L", ast:o.INC8("l")}, {name:"DEC L", ast:o.DEC8("l")}, {name:"LD L,n", ast:o.LD8("l")}, {name:"CPL", ast:o.CPL()}, {name:"JR NC,(PC+e)", ast:o.JRNC()}, {name:"LD SP,nn", ast:o.LD_SP()}, {name:"LD (nn),A", ast:o.LD_WRITE_MEM("n", "n", "a")}, {name:"INC SP", ast:o.INC8("s", "p")}, {name:"INC (HL)", ast:o.INC8("h", "l")}, {name:"DEC (HL)", ast:o.DEC8("h", +"l")}, {name:"LD (HL),n", ast:o.LD_WRITE_MEM("h", "l")}, {name:"SCF", ast:o.SCF()}, {name:"JR C,(PC+e)", ast:o.JRC()}, {name:"ADD HL,SP", ast:o.ADD16("h", "l", "sp")}, {name:"LD A,(nn)", ast:o.LD8("a", "n", "n")}, {name:"DEC SP", ast:o.DEC8("s", "p")}, {name:"INC A", ast:o.INC8("a")}, {name:"DEC A", ast:o.DEC8("a")}, {name:"LD A,n", ast:o.LD8("a")}, {name:"CCF", ast:o.CCF()}, {name:"LD B,B", ast:o.NOOP()}, {name:"LD B,C", ast:o.LD8("b", "c")}, {name:"LD B,D", ast:o.LD8("b", "d")}, {name:"LD B,E", +ast:o.LD8("b", "e")}, {name:"LD B,H", ast:o.LD8("b", "h")}, {name:"LD B,L", ast:o.LD8("b", "l")}, {name:"LD B,(HL)", ast:o.LD8("b", "h", "l")}, {name:"LD B,A", ast:o.LD8("b", "a")}, {name:"LD C,B", ast:o.LD8("c", "b")}, {name:"LD C,C", ast:o.NOOP()}, {name:"LD C,D", ast:o.LD8("c", "d")}, {name:"LD C,E", ast:o.LD8("c", "e")}, {name:"LD C,H", ast:o.LD8("c", "h")}, {name:"LD C,L", ast:o.LD8("c", "l")}, {name:"LD C,(HL)", ast:o.LD8("c", "h", "l")}, {name:"LD C,A", ast:o.LD8("c", "a")}, {name:"LD D,B", +ast:o.LD8("d", "b")}, {name:"LD D,C", ast:o.LD8("d", "c")}, {name:"LD D,D", ast:o.NOOP()}, {name:"LD D,E", ast:o.LD8("d", "e")}, {name:"LD D,H", ast:o.LD8("d", "h")}, {name:"LD D,L", ast:o.LD8("d", "l")}, {name:"LD D,(HL)", ast:o.LD8("d", "h", "l")}, {name:"LD D,A", ast:o.LD8("d", "a")}, {name:"LD E,B", ast:o.LD8("e", "b")}, {name:"LD E,C", ast:o.LD8("e", "c")}, {name:"LD E,D", ast:o.LD8("e", "d")}, {name:"LD E,E", ast:o.NOOP()}, {name:"LD E,H", ast:o.LD8("e", "h")}, {name:"LD E,L", ast:o.LD8("e", +"l")}, {name:"LD E,(HL)", ast:o.LD8("e", "h", "l")}, {name:"LD E,A", ast:o.LD8("e", "a")}, {name:"LD H,B", ast:o.LD8("h", "b")}, {name:"LD H,C", ast:o.LD8("h", "c")}, {name:"LD H,D", ast:o.LD8("h", "d")}, {name:"LD H,E", ast:o.LD8("h", "e")}, {name:"LD H,H", ast:o.NOOP()}, {name:"LD H,L", ast:o.LD8("h", "l")}, {name:"LD H,(HL)", ast:o.LD8("h", "h", "l")}, {name:"LD H,A", ast:o.LD8("h", "a")}, {name:"LD L,B", ast:o.LD8("l", "b")}, {name:"LD L,C", ast:o.LD8("l", "c")}, {name:"LD L,D", ast:o.LD8("l", +"d")}, {name:"LD L,E", ast:o.LD8("l", "e")}, {name:"LD L,H", ast:o.LD8("l", "h")}, {name:"LD L,L", ast:o.NOOP()}, {name:"LD L,(HL)", ast:o.LD8("l", "h", "l")}, {name:"LD L,A", ast:o.LD8("l", "a")}, {name:"LD (HL),B", ast:o.LD_WRITE_MEM("h", "l", "b")}, {name:"LD (HL),C", ast:o.LD_WRITE_MEM("h", "l", "c")}, {name:"LD (HL),D", ast:o.LD_WRITE_MEM("h", "l", "d")}, {name:"LD (HL),E", ast:o.LD_WRITE_MEM("h", "l", "e")}, {name:"LD (HL),H", ast:o.LD_WRITE_MEM("h", "l", "h")}, {name:"LD (HL),L", ast:o.LD_WRITE_MEM("h", +"l", "l")}, {name:"HALT", ast:o.HALT()}, {name:"LD (HL),A", ast:o.LD_WRITE_MEM("h", "l", "a")}, {name:"LD A,B", ast:o.LD8("a", "b")}, {name:"LD A,C", ast:o.LD8("a", "c")}, {name:"LD A,D", ast:o.LD8("a", "d")}, {name:"LD A,E", ast:o.LD8("a", "e")}, {name:"LD A,H", ast:o.LD8("a", "h")}, {name:"LD A,L", ast:o.LD8("a", "l")}, {name:"LD A,(HL)", ast:o.LD8("a", "h", "l")}, {name:"LD A,A", ast:o.NOOP()}, {name:"ADD A,B", ast:o.ADD("b")}, {name:"ADD A,C", ast:o.ADD("c")}, {name:"ADD A,D", ast:o.ADD("d")}, +{name:"ADD A,E", ast:o.ADD("e")}, {name:"ADD A,H", ast:o.ADD("h")}, {name:"ADD A,L", ast:o.ADD("l")}, {name:"ADD A,(HL)", ast:o.ADD("h", "l")}, {name:"ADD A,A", ast:o.ADD("a")}, {name:"ADC A,B", ast:o.ADC("b")}, {name:"ADC A,C", ast:o.ADC("c")}, {name:"ADC A,D", ast:o.ADC("d")}, {name:"ADC A,E", ast:o.ADC("e")}, {name:"ADC A,H", ast:o.ADC("h")}, {name:"ADC A,L", ast:o.ADC("l")}, {name:"ADC A,(HL)", ast:o.ADC("h", "l")}, {name:"ADC A,A", ast:o.ADC("a")}, {name:"SUB A,B", ast:o.SUB("b")}, {name:"SUB A,C", +ast:o.SUB("c")}, {name:"SUB A,D", ast:o.SUB("d")}, {name:"SUB A,E", ast:o.SUB("e")}, {name:"SUB A,H", ast:o.SUB("h")}, {name:"SUB A,L", ast:o.SUB("l")}, {name:"SUB A,(HL)", ast:o.SUB("h", "l")}, {name:"SUB A,A", ast:o.SUB("a")}, {name:"SBC A,B", ast:o.SBC("b")}, {name:"SBC A,C", ast:o.SBC("c")}, {name:"SBC A,D", ast:o.SBC("d")}, {name:"SBC A,E", ast:o.SBC("e")}, {name:"SBC A,H", ast:o.SBC("h")}, {name:"SBC A,L", ast:o.SBC("l")}, {name:"SBC A,(HL)", ast:o.SBC("h", "l")}, {name:"SBC A,A", ast:o.SBC("a")}, +{name:"AND A,B", ast:o.AND("b")}, {name:"AND A,C", ast:o.AND("c")}, {name:"AND A,D", ast:o.AND("d")}, {name:"AND A,E", ast:o.AND("e")}, {name:"AND A,H", ast:o.AND("h")}, {name:"AND A,L", ast:o.AND("l")}, {name:"AND A,(HL)", ast:o.AND("h", "l")}, {name:"AND A,A", ast:o.AND("a")}, {name:"XOR A,B", ast:o.XOR("b")}, {name:"XOR A,C", ast:o.XOR("c")}, {name:"XOR A,D", ast:o.XOR("d")}, {name:"XOR A,E", ast:o.XOR("e")}, {name:"XOR A,H", ast:o.XOR("h")}, {name:"XOR A,L", ast:o.XOR("l")}, {name:"XOR A,(HL)", +ast:o.XOR("h", "l")}, {name:"XOR A,A", ast:o.XOR("a")}, {name:"OR A,B", ast:o.OR("b")}, {name:"OR A,C", ast:o.OR("c")}, {name:"OR A,D", ast:o.OR("d")}, {name:"OR A,E", ast:o.OR("e")}, {name:"OR A,H", ast:o.OR("h")}, {name:"OR A,L", ast:o.OR("l")}, {name:"OR A,(HL)", ast:o.OR("h", "l")}, {name:"OR A,A", ast:o.OR("a")}, {name:"CP A,B", ast:o.CP("b")}, {name:"CP A,C", ast:o.CP("c")}, {name:"CP A,D", ast:o.CP("d")}, {name:"CP A,E", ast:o.CP("e")}, {name:"CP A,H", ast:o.CP("h")}, {name:"CP A,L", ast:o.CP("l")}, +{name:"CP A,(HL)", ast:o.CP("h", "l")}, {name:"CP A,A", ast:o.CP("a")}, {name:"RET NZ", ast:o.RET("==", F_ZERO)}, {name:"POP BC", ast:o.POP("b", "c")}, {name:"JP NZ,(nn)", ast:o.JP("==", F_ZERO)}, {name:"JP (nn)", ast:o.JP()}, {name:"CALL NZ (nn)", ast:o.CALL("==", F_ZERO)}, {name:"PUSH BC", ast:o.PUSH("b", "c")}, {name:"ADD A,n", ast:o.ADD()}, {name:"RST 0x00", ast:o.RST(0)}, {name:"RET Z", ast:o.RET("!=", F_ZERO)}, {name:"RET", ast:o.RET()}, {name:"JP Z,(nn)", ast:o.JP("!=", F_ZERO)}, opcodeTableCB, +{name:"CALL Z (nn)", ast:o.CALL("!=", F_ZERO)}, {name:"CALL (nn)", ast:o.CALL()}, {name:"ADC A,n", ast:o.ADC()}, {name:"RST 0x08", ast:o.RST(8)}, {name:"RET NC", ast:o.RET("==", F_CARRY)}, {name:"POP DE", ast:o.POP("d", "e")}, {name:"JP NC,(nn)", ast:o.JP("==", F_CARRY)}, {name:"OUT (n),A", ast:o.OUT("a")}, {name:"CALL NC (nn)", ast:o.CALL("==", F_CARRY)}, {name:"PUSH DE", ast:o.PUSH("d", "e")}, {name:"SUB n", ast:o.SUB()}, {name:"RST 0x10", ast:o.RST(16)}, {name:"RET C", ast:o.RET("!=", F_CARRY)}, +{name:"EXX", ast:o.EXX()}, {name:"JP C,(nn)", ast:o.JP("!=", F_CARRY)}, {name:"IN A,(n)", ast:o.IN("a")}, {name:"CALL C (nn)", ast:o.CALL("!=", F_CARRY)}, generateIndexTable("IX"), {name:"SBC A,n", ast:o.SBC()}, {name:"RST 0x18", ast:o.RST(24)}, {name:"RET PO", ast:o.RET("==", F_PARITY)}, {name:"POP HL", ast:o.POP("h", "l")}, {name:"JP PO,(nn)", ast:o.JP("==", F_PARITY)}, {name:"EX (SP),HL", ast:o.EX_SP_HL()}, {name:"CALL PO (nn)", ast:o.CALL("==", F_PARITY)}, {name:"PUSH HL", ast:o.PUSH("h", "l")}, +{name:"AND (n)", ast:o.AND()}, {name:"RST 0x20", ast:o.RST(32)}, {name:"RET PE", ast:o.RET("!=", F_PARITY)}, {name:"JP (HL)", ast:o.JP("h", "l")}, {name:"JP PE,(nn)", ast:o.JP("!=", F_PARITY)}, {name:"EX DE,HL", ast:o.EX_DE_HL()}, {name:"CALL PE (nn)", ast:o.CALL("!=", F_PARITY)}, opcodeTableED, {name:"XOR n", ast:o.XOR()}, {name:"RST 0x28", ast:o.RST(40)}, {name:"RET P", ast:o.RET("==", F_SIGN)}, {name:"POP AF", ast:o.POP("a", "f")}, {name:"JP P,(nn)", ast:o.JP("==", F_SIGN)}, {name:"DI", ast:o.DI()}, +{name:"CALL P (nn)", ast:o.CALL("==", F_SIGN)}, {name:"PUSH AF", ast:o.PUSH("a", "f")}, {name:"OR n", ast:o.OR()}, {name:"RST 0x30", ast:o.RST(48)}, {name:"RET M", ast:o.RET("!=", F_SIGN)}, {name:"LD SP,HL", ast:o.LD_SP("h", "l")}, {name:"JP M,(nn)", ast:o.JP("!=", F_SIGN)}, {name:"EI", ast:o.EI()}, {name:"CALL M (nn)", ast:o.CALL("!=", F_SIGN)}, generateIndexTable("IY"), {name:"CP n", ast:o.CP()}, {name:"RST 0x38", ast:o.RST(56)}]; var Analyzer = function() { var $Analyzer$$ = function $$Analyzer$$$() { this.bytecodes = {}; this.ast = []; - this.missingOpcodes = {} + this.missingOpcodes = {}; }; $Analyzer$$.prototype = {analyze:function $$Analyzer$$$$analyze$($bytecodes$$) { var $i$$ = 0; this.bytecodes = $bytecodes$$; this.ast = Array(this.bytecodes.length); JSSMS.Utils.console.time("Analyzing"); - for($i$$ = 0;$i$$ < this.bytecodes.length;$i$$++) { - this.normalizeBytecode($i$$), this.restructure($i$$) + for ($i$$ = 0;$i$$ < this.bytecodes.length;$i$$++) { + this.normalizeBytecode($i$$), this.restructure($i$$); } JSSMS.Utils.console.timeEnd("Analyzing"); - for($i$$ in this.missingOpcodes) { - console.error("Missing opcode", $i$$, this.missingOpcodes[$i$$]) + for ($i$$ in this.missingOpcodes) { + console.error("Missing opcode", $i$$, this.missingOpcodes[$i$$]); } }, analyzeFromAddress:function $$Analyzer$$$$analyzeFromAddress$($bytecodes$$) { this.bytecodes = [$bytecodes$$]; @@ -10210,146 +10191,175 @@ var Analyzer = function() { this.normalizeBytecode(0); this.bytecodes[0][this.bytecodes[0].length - 1].isFunctionEnder = !0; this.ast = [this.bytecodes]; - for(var $i$$ in this.missingOpcodes) { - console.error("Missing opcode", $i$$, this.missingOpcodes[$i$$]) + for (var $i$$ in this.missingOpcodes) { + console.error("Missing opcode", $i$$, this.missingOpcodes[$i$$]); } }, normalizeBytecode:function $$Analyzer$$$$normalizeBytecode$($page$$) { var $self$$ = this; this.bytecodes[$page$$] = this.bytecodes[$page$$].map(function($bytecode$$) { + var $i$$36_opcode$$; switch($bytecode$$.opcode.length) { case 1: - var $i$$34_opcode$$ = opcodeTable[$bytecode$$.opcode[0]]; + $i$$36_opcode$$ = opcodeTable[$bytecode$$.opcode[0]]; break; case 2: - $i$$34_opcode$$ = opcodeTable[$bytecode$$.opcode[0]][$bytecode$$.opcode[1]]; + $i$$36_opcode$$ = opcodeTable[$bytecode$$.opcode[0]][$bytecode$$.opcode[1]]; break; case 3: - $i$$34_opcode$$ = opcodeTable[$bytecode$$.opcode[0]][$bytecode$$.opcode[1]][$bytecode$$.opcode[2]]; + $i$$36_opcode$$ = opcodeTable[$bytecode$$.opcode[0]][$bytecode$$.opcode[1]][$bytecode$$.opcode[2]]; break; default: - JSSMS.Utils.console.error("Something went wrong in parsing. Opcode: [" + $bytecode$$.opcode.join(" ") + "]") + JSSMS.Utils.console.error("Something went wrong in parsing. Opcode: [" + $bytecode$$.opcode.join(" ") + "]"); } - if($i$$34_opcode$$ && $i$$34_opcode$$.ast) { - var $ast$$ = $i$$34_opcode$$.ast($bytecode$$.operand, $bytecode$$.target, $bytecode$$.nextAddress); - Array.isArray($ast$$) || void 0 == $ast$$ || ($ast$$ = [$ast$$]); + if ($i$$36_opcode$$ && $i$$36_opcode$$.ast) { + var $ast$$ = $i$$36_opcode$$.ast($bytecode$$.operand, $bytecode$$.target, $bytecode$$.nextAddress); + Array.isArray($ast$$) || void 0 === $ast$$ || ($ast$$ = [$ast$$]); $bytecode$$.ast = $ast$$; - DEBUG && ($bytecode$$.name = $i$$34_opcode$$.name, $i$$34_opcode$$.opcode && ($bytecode$$.opcode = $i$$34_opcode$$.opcode($bytecode$$.operand, $bytecode$$.target, $bytecode$$.nextAddress))) - }else { - $i$$34_opcode$$ = $bytecode$$.hexOpcode, $self$$.missingOpcodes[$i$$34_opcode$$] = void 0 != $self$$.missingOpcodes[$i$$34_opcode$$] ? $self$$.missingOpcodes[$i$$34_opcode$$] + 1 : 1 + DEBUG && ($bytecode$$.name = $i$$36_opcode$$.name, $i$$36_opcode$$.opcode && ($bytecode$$.opcode = $i$$36_opcode$$.opcode($bytecode$$.operand, $bytecode$$.target, $bytecode$$.nextAddress))); + } else { + $i$$36_opcode$$ = $bytecode$$.hexOpcode, $self$$.missingOpcodes[$i$$36_opcode$$] = void 0 !== $self$$.missingOpcodes[$i$$36_opcode$$] ? $self$$.missingOpcodes[$i$$36_opcode$$] + 1 : 1; } - return $bytecode$$ - }) + return $bytecode$$; + }); }, restructure:function $$Analyzer$$$$restructure$($page$$) { this.ast[$page$$] = []; var $self$$ = this, $pointer$$ = -1, $startNewFunction$$ = !0, $prevBytecode$$ = {}; this.bytecodes[$page$$].forEach(function($bytecode$$) { - if($bytecode$$.isJumpTarget || $startNewFunction$$) { - $pointer$$++, $self$$.ast[$page$$][$pointer$$] = [], $startNewFunction$$ = !1, $prevBytecode$$.isFunctionEnder = !0 + if ($bytecode$$.isJumpTarget || $startNewFunction$$) { + $pointer$$++, $self$$.ast[$page$$][$pointer$$] = [], $startNewFunction$$ = !1, $prevBytecode$$.isFunctionEnder = !0; } $self$$.ast[$page$$][$pointer$$].push($bytecode$$); $bytecode$$.isFunctionEnder && ($startNewFunction$$ = !0); - $prevBytecode$$ = $bytecode$$ - }) + $prevBytecode$$ = $bytecode$$; + }); }}; - return $Analyzer$$ + return $Analyzer$$; }(); var Optimizer = function() { var $Optimizer$$ = function $$Optimizer$$$() { - this.ast = [] + this.ast = []; }; $Optimizer$$.prototype = {optimize:function $$Optimizer$$$$optimize$($functions_i$$) { this.ast = $functions_i$$; - for($functions_i$$ = 0;$functions_i$$ < this.ast.length;$functions_i$$++) { - this.localOptimization($functions_i$$) + for ($functions_i$$ = 0;$functions_i$$ < this.ast.length;$functions_i$$++) { + this.localOptimization($functions_i$$); } }, localOptimization:function $$Optimizer$$$$localOptimization$($page$$) { - this.ast[$page$$] = this.ast[$page$$].map(this.inlineRegisters) + this.ast[$page$$] = this.ast[$page$$].map(this.evaluateBinaryExpressions); + this.ast[$page$$] = this.ast[$page$$].map(this.inlineRegisters); + }, evaluateBinaryExpressions:function $$Optimizer$$$$evaluateBinaryExpressions$($fn$$) { + return $fn$$.map(function($bytecodes$$) { + var $ast$$0$$ = $bytecodes$$.ast; + if (!$ast$$0$$) { + return $bytecodes$$; + } + $bytecodes$$.ast = JSSMS.Utils.traverse($ast$$0$$, function($ast$$) { + if ("BinaryExpression" == $ast$$.type && "Literal" == $ast$$.left.type && "Literal" == $ast$$.right.type) { + var $value$$ = 0; + switch($ast$$.operator) { + case ">>": + $value$$ = $ast$$.left.value >> $ast$$.right.value; + break; + case "&": + $value$$ = $ast$$.left.value & $ast$$.right.value; + break; + default: + return JSSMS.Utils.console.log("Unimplemented evaluation optimization for operator", $ast$$.operator), $ast$$; + } + $ast$$.type = "Literal"; + $ast$$.value = $value$$; + $ast$$.raw = DEBUG ? JSSMS.Utils.toHex($value$$) : "" + $value$$; + delete $ast$$.right; + delete $ast$$.left; + } + return $ast$$; + }); + return $bytecodes$$; + }); }, inlineRegisters:function $$Optimizer$$$$inlineRegisters$($fn$$) { var $definedReg$$ = {b:!1, c:!1, d:!1, e:!1, h:!1, l:!1}, $definedRegValue$$ = {b:{}, c:{}, d:{}, e:{}, h:{}, l:{}}; return $fn$$.map(function($bytecodes$$) { var $ast$$0$$ = $bytecodes$$.ast; - if(!$ast$$0$$) { - return $bytecodes$$ + if (!$ast$$0$$) { + return $bytecodes$$; } $bytecodes$$.ast = JSSMS.Utils.traverse($ast$$0$$, function($ast$$) { - "AssignmentExpression" == $ast$$.type && ("=" == $ast$$.operator && "Register" == $ast$$.left.type && "Literal" == $ast$$.right.type && "a" != $ast$$.left.name && "f" != $ast$$.left.name) && ($definedReg$$[$ast$$.left.name] = !0, $definedRegValue$$[$ast$$.left.name] = $ast$$.right); - if("AssignmentExpression" == $ast$$.type && "Register" == $ast$$.left.type && "Literal" != $ast$$.right.type && "a" != $ast$$.left.name && "f" != $ast$$.left.name) { - return $definedReg$$[$ast$$.left.name] = !1, $definedRegValue$$[$ast$$.left.name] = {}, $ast$$ + "AssignmentExpression" == $ast$$.type && "=" == $ast$$.operator && "Register" == $ast$$.left.type && "Literal" == $ast$$.right.type && "a" != $ast$$.left.name && "f" != $ast$$.left.name && ($definedReg$$[$ast$$.left.name] = !0, $definedRegValue$$[$ast$$.left.name] = $ast$$.right); + if ("AssignmentExpression" == $ast$$.type && "Register" == $ast$$.left.type && "Literal" != $ast$$.right.type && "a" != $ast$$.left.name && "f" != $ast$$.left.name) { + return $definedReg$$[$ast$$.left.name] = !1, $definedRegValue$$[$ast$$.left.name] = {}, $ast$$; } - if("CallExpression" == $ast$$.type) { - return $ast$$.arguments[0] && ("Register" == $ast$$.arguments[0].type && $definedReg$$[$ast$$.arguments[0].name] && "a" != $ast$$.arguments[0].name && "f" != $ast$$.arguments[0].name) && ($ast$$.arguments[0] = $definedRegValue$$[$ast$$.arguments[0].name]), $ast$$.arguments[1] && ("Register" == $ast$$.arguments[1].type && $definedReg$$[$ast$$.arguments[1].name] && "a" != $ast$$.arguments[1].name && "f" != $ast$$.arguments[1].name) && ($ast$$.arguments[1] = $definedRegValue$$[$ast$$.arguments[1].name]), - $ast$$ + if ("CallExpression" == $ast$$.type) { + return $ast$$.arguments[0] && "Register" == $ast$$.arguments[0].type && $definedReg$$[$ast$$.arguments[0].name] && "a" != $ast$$.arguments[0].name && "f" != $ast$$.arguments[0].name && ($ast$$.arguments[0] = $definedRegValue$$[$ast$$.arguments[0].name]), $ast$$.arguments[1] && "Register" == $ast$$.arguments[1].type && $definedReg$$[$ast$$.arguments[1].name] && "a" != $ast$$.arguments[1].name && "f" != $ast$$.arguments[1].name && ($ast$$.arguments[1] = $definedRegValue$$[$ast$$.arguments[1].name]), + $ast$$; } - if("MemberExpression" == $ast$$.type && "Register" == $ast$$.property.type && $definedReg$$[$ast$$.property.name] && "a" != $ast$$.property.name && "f" != $ast$$.property.name) { - return $ast$$.property = $definedRegValue$$[$ast$$.property.name], $ast$$ + if ("MemberExpression" == $ast$$.type && "Register" == $ast$$.property.type && $definedReg$$[$ast$$.property.name] && "a" != $ast$$.property.name && "f" != $ast$$.property.name) { + return $ast$$.property = $definedRegValue$$[$ast$$.property.name], $ast$$; } - "BinaryExpression" == $ast$$.type && ("Register" == $ast$$.right.type && ($definedReg$$[$ast$$.right.name] && "a" != $ast$$.right.name && "f" != $ast$$.right.name) && ($ast$$.right = $definedRegValue$$[$ast$$.right.name]), "Register" == $ast$$.left.type && ($definedReg$$[$ast$$.left.name] && "a" != $ast$$.left.name && "f" != $ast$$.left.name) && ($ast$$.left = $definedRegValue$$[$ast$$.left.name])); - return $ast$$ + "BinaryExpression" == $ast$$.type && ("Register" == $ast$$.right.type && $definedReg$$[$ast$$.right.name] && "a" != $ast$$.right.name && "f" != $ast$$.right.name && ($ast$$.right = $definedRegValue$$[$ast$$.right.name]), "Register" == $ast$$.left.type && $definedReg$$[$ast$$.left.name] && "a" != $ast$$.left.name && "f" != $ast$$.left.name && ($ast$$.left = $definedRegValue$$[$ast$$.left.name])); + return $ast$$; }); - return $bytecodes$$ - }) + return $bytecodes$$; + }); }}; - return $Optimizer$$ + return $Optimizer$$; }(); var Generator = function() { + function $getTotalTStates$$($opcodes$$) { + switch($opcodes$$[0]) { + case 203: + return OP_CB_STATES[$opcodes$$[1]]; + case 221: + ; + case 253: + return 2 == $opcodes$$.length ? OP_DD_STATES[$opcodes$$[1]] : OP_INDEX_CB_STATES[$opcodes$$[2]]; + case 237: + return OP_ED_STATES[$opcodes$$[1]]; + default: + return OP_STATES[$opcodes$$[0]]; + } + } function $convertRegisters$$($ast$$) { return JSSMS.Utils.traverse($ast$$, function($node$$) { "Register" == $node$$.type && ($node$$.type = "Identifier"); - return $node$$ - }) + return $node$$; + }); } var $toHex$$ = JSSMS.Utils.toHex, $whitelist$$ = "page temp location val value JSSMS.Utils.rndInt".split(" "), $Generator$$ = function $$Generator$$$() { - this.ast = [] + this.ast = []; }; $Generator$$.prototype = {generate:function $$Generator$$$$generate$($functions$$) { - for(var $page$$ = 0;$page$$ < $functions$$.length;$page$$++) { + for (var $page$$ = 0;$page$$ < $functions$$.length;$page$$++) { $functions$$[$page$$] = $functions$$[$page$$].map(function($fn$$) { - var $body$$ = [{type:"ExpressionStatement", expression:{type:"Literal", value:"use strict", raw:'"use strict"'}}], $name$$ = $fn$$[0].address, $tstates$$0$$ = 0; + var $body$$ = [{type:"ExpressionStatement", expression:{type:"Literal", value:"use strict", raw:'"use strict"'}}], $name$$ = $fn$$[0].address, $tstates$$ = 0; $fn$$ = $fn$$.map(function($bytecode$$) { - null == $bytecode$$.ast && ($bytecode$$.ast = []); - if(ENABLE_SERVER_LOGGER) { + void 0 === $bytecode$$.ast && ($bytecode$$.ast = []); + if (ENABLE_SERVER_LOGGER) { var $nextAddress$$ = {type:"ExpressionStatement", expression:{type:"CallExpression", callee:n.Identifier("sync"), arguments:[]}} } - var $JSCompiler_temp_const$$ = $tstates$$0$$, $opcodes$$ = $bytecode$$.opcode, $tstates$$ = 0; - switch($opcodes$$[0]) { - case 203: - $tstates$$ = OP_CB_STATES[$opcodes$$[1]]; - break; - case 221: - ; - case 253: - $tstates$$ = 2 == $opcodes$$.length ? OP_DD_STATES[$opcodes$$[1]] : OP_INDEX_CB_STATES[$opcodes$$[2]]; - break; - case 237: - $tstates$$ = OP_ED_STATES[$opcodes$$[1]]; - break; - default: - $tstates$$ = OP_STATES[$opcodes$$[0]] - } - $tstates$$0$$ = $JSCompiler_temp_const$$ + $tstates$$; - $JSCompiler_temp_const$$ = [{type:"ExpressionStatement", expression:{type:"AssignmentExpression", operator:"-=", left:{type:"Identifier", name:"tstates"}, right:{type:"Literal", value:$tstates$$0$$, raw:DEBUG ? $toHex$$($tstates$$0$$) : "" + $tstates$$0$$}}}]; - $tstates$$0$$ = 0; - ENABLE_SERVER_LOGGER && ($JSCompiler_temp_const$$ = [].concat($nextAddress$$, $JSCompiler_temp_const$$)); - $bytecode$$.ast = [].concat($JSCompiler_temp_const$$, $bytecode$$.ast); - (ENABLE_SERVER_LOGGER || $bytecode$$.isFunctionEnder) && null != $bytecode$$.nextAddress && ($nextAddress$$ = $bytecode$$.nextAddress % 16384, $nextAddress$$ = {type:"ExpressionStatement", expression:{type:"AssignmentExpression", operator:"=", left:{type:"Identifier", name:"pc"}, right:{type:"BinaryExpression", operator:"+", left:{type:"Literal", value:$nextAddress$$, raw:DEBUG ? $toHex$$($nextAddress$$) : "" + $nextAddress$$}, right:{type:"BinaryExpression", operator:"*", left:{type:"Identifier", + $tstates$$ += $getTotalTStates$$($bytecode$$.opcode); + var $decreaseTStateStmt$$ = [{type:"ExpressionStatement", expression:{type:"AssignmentExpression", operator:"-=", left:{type:"Identifier", name:"tstates"}, right:{type:"Literal", value:$tstates$$, raw:DEBUG ? $toHex$$($tstates$$) : "" + $tstates$$}}}]; + $tstates$$ = 0; + ENABLE_SERVER_LOGGER && ($decreaseTStateStmt$$ = [].concat($nextAddress$$, $decreaseTStateStmt$$)); + $bytecode$$.ast = [].concat($decreaseTStateStmt$$, $bytecode$$.ast); + (ENABLE_SERVER_LOGGER || $bytecode$$.isFunctionEnder) && null !== $bytecode$$.nextAddress && ($nextAddress$$ = $bytecode$$.nextAddress % 16384, $nextAddress$$ = {type:"ExpressionStatement", expression:{type:"AssignmentExpression", operator:"=", left:{type:"Identifier", name:"pc"}, right:{type:"BinaryExpression", operator:"+", left:{type:"Literal", value:$nextAddress$$, raw:DEBUG ? $toHex$$($nextAddress$$) : "" + $nextAddress$$}, right:{type:"BinaryExpression", operator:"*", left:{type:"Identifier", name:"page"}, right:{type:"Literal", value:16384, raw:"0x4000"}}}}}, $bytecode$$.ast.push($nextAddress$$)); DEBUG && $bytecode$$.ast[0] && ($bytecode$$.ast[0].leadingComments = [{type:"Line", value:" " + $bytecode$$.label}]); - return $bytecode$$.ast + return $bytecode$$.ast; }); $fn$$.forEach(function($ast$$) { - $body$$ = $body$$.concat($ast$$) + $body$$ = $body$$.concat($ast$$); }); $body$$ = $convertRegisters$$($body$$); $body$$ = JSSMS.Utils.traverse($body$$, function($obj$$) { - $obj$$.type && ("Identifier" == $obj$$.type && -1 == $whitelist$$.indexOf($obj$$.name)) && ($obj$$.name = "this." + $obj$$.name); - return $obj$$ + $obj$$.type && "Identifier" == $obj$$.type && -1 == $whitelist$$.indexOf($obj$$.name) && ($obj$$.name = "this." + $obj$$.name); + return $obj$$; }); - return DEBUG ? {type:"Program", body:[{type:"FunctionDeclaration", id:{type:"Identifier", name:$name$$}, params:[{type:"Identifier", name:"page"}, {type:"Identifier", name:"temp"}, {type:"Identifier", name:"location"}], defaults:[], body:{type:"BlockStatement", body:$body$$}, rest:null, generator:!1, expression:!1}]} : {type:"Program", body:$body$$, comments:[{type:"Line", value:$name$$}]} - }) + return{type:"Program", body:[{type:"FunctionDeclaration", id:{type:"Identifier", name:$name$$}, params:[{type:"Identifier", name:"page"}, {type:"Identifier", name:"temp"}, {type:"Identifier", name:"location"}], defaults:[], body:{type:"BlockStatement", body:$body$$}, rest:null, generator:!1, expression:!1}]}; + }); } - this.ast = $functions$$ + this.ast = $functions$$; }}; - return $Generator$$ + return $Generator$$; }(); var Recompiler = function() { var $toHex$$ = JSSMS.Utils.toHex, $Recompiler$$ = function $$Recompiler$$$($cpu$$) { @@ -10360,69 +10370,68 @@ var Recompiler = function() { this.analyzer = new Analyzer; this.optimizer = new Optimizer; this.generator = new Generator; - this.bytecodes = {} + this.bytecodes = {}; }; $Recompiler$$.prototype = {setRom:function $$Recompiler$$$$setRom$($rom$$) { this.rom = $rom$$; - this.parser = new Parser($rom$$, this.cpu.frameReg) + this.parser = new Parser($rom$$, this.cpu.frameReg); }, reset:function $$Recompiler$$$$reset$() { var $self$$ = this; this.options.entryPoints = [{address:0, romPage:0, memPage:0}, {address:56, romPage:0, memPage:0}, {address:102, romPage:0, memPage:0}]; 2 >= this.rom.length ? JSSMS.Utils.console.log("Parsing full ROM") : (this.options.pageLimit = 0, JSSMS.Utils.console.log("Parsing initial memory page of ROM")); - for(var $fns$$ = this.parse().analyze().optimize().generate(), $page$$ = 0;$page$$ < this.rom.length;$page$$++) { + for (var $fns$$ = this.parse().analyze().optimize().generate(), $page$$ = 0;$page$$ < this.rom.length;$page$$++) { $fns$$[$page$$].forEach(function($fn$$) { - if(DEBUG) { - var $funcName$$ = $fn$$.body[0].id.name; - $fn$$.body[0].id.name = "_" + $toHex$$($funcName$$); - $self$$.cpu.branches[$page$$][$funcName$$] = (new Function("return " + $self$$.generateCodeFromAst($fn$$)))() - }else { - $funcName$$ = $fn$$.comments[0].value, $self$$.cpu.branches[$page$$][$funcName$$] = new Function("page", "temp", "location", $self$$.generateCodeFromAst($fn$$)) - } - }) + var $funcName$$ = $fn$$.body[0].id.name; + DEBUG && ($fn$$.body[0].id.name = "_" + $toHex$$($funcName$$)); + $self$$.cpu.branches[$page$$][$funcName$$] = (new Function("return " + $self$$.generateCodeFromAst($fn$$)))(); + }); } }, parse:function $$Recompiler$$$$parse$() { var $self$$ = this; this.options.entryPoints.forEach(function($entryPoint$$) { - $self$$.parser.addEntryPoint($entryPoint$$) + $self$$.parser.addEntryPoint($entryPoint$$); }); this.parser.parse(this.options.pageLimit); - return this + return this; }, analyze:function $$Recompiler$$$$analyze$() { this.analyzer.analyze(this.parser.bytecodes); - return this + return this; }, optimize:function $$Recompiler$$$$optimize$() { this.optimizer.optimize(this.analyzer.ast); - return this + return this; }, generate:function $$Recompiler$$$$generate$() { this.generator.generate(this.optimizer.ast); - return this.generator.ast + return this.generator.ast; }, recompileFromAddress:function $$Recompiler$$$$recompileFromAddress$($address$$, $romPage$$, $memPage$$) { var $self$$ = this; this.parseFromAddress($address$$, $romPage$$, $memPage$$).analyzeFromAddress().optimize().generate()[0].forEach(function($fn$$) { - DEBUG ? ($fn$$.body[0].id.name = "_" + $toHex$$($fn$$.body[0].id.name), $self$$.cpu.branches[$romPage$$][$address$$ % 16384] = (new Function("return " + $self$$.generateCodeFromAst($fn$$)))()) : $self$$.cpu.branches[$romPage$$][$address$$ % 16384] = new Function("page", "temp", "location", $self$$.generateCodeFromAst($fn$$)) - }) + DEBUG && ($fn$$.body[0].id.name = "_" + $toHex$$($fn$$.body[0].id.name)); + $self$$.cpu.branches[$romPage$$][$address$$ % 16384] = (new Function("return " + $self$$.generateCodeFromAst($fn$$)))(); + }); }, parseFromAddress:function $$Recompiler$$$$parseFromAddress$($address$$25_obj$$, $romPage$$, $memPage$$) { $address$$25_obj$$ = {address:$address$$25_obj$$, romPage:$romPage$$, memPage:$memPage$$}; this.parser.entryPoints.push($address$$25_obj$$); this.bytecodes = this.parser.parseFromAddress($address$$25_obj$$); - return this + return this; }, analyzeFromAddress:function $$Recompiler$$$$analyzeFromAddress$() { this.analyzer.analyzeFromAddress(this.bytecodes); - return this + return this; }, generateCodeFromAst:function $$Recompiler$$$$generateCodeFromAst$($fn$$) { - return window.escodegen.generate($fn$$, {comment:!0, renumber:!0, hexadecimal:!0, parse:DEBUG ? window.esprima.parse : null}) + return window.escodegen.generate($fn$$, {comment:!0, renumber:!0, hexadecimal:!0, parse:DEBUG ? window.esprima.parse : function($c$$) { + return{type:"Program", body:[{type:"ExpressionStatement", expression:{type:"Literal", value:$c$$, raw:$c$$}}]}; + }}); }, dump:function $$Recompiler$$$$dump$() { var $output$$ = [], $i$$; - for($i$$ in this.cpu.branches) { + for ($i$$ in this.cpu.branches) { $output$$.push("// Page " + $i$$); - for(var $j$$ in this.cpu.branches[$i$$]) { - $output$$.push(this.cpu.branches[$i$$][$j$$]) + for (var $j$$ in this.cpu.branches[$i$$]) { + $output$$.push(this.cpu.branches[$i$$][$j$$]); } } $output$$ = $output$$.join("\n"); - console.log($output$$) + console.log($output$$); }}; - return $Recompiler$$ + return $Recompiler$$; }(); window.JSSMS = JSSMS; diff --git a/min/jssms.min.js b/min/jssms.min.js index ee2e400..60baf45 100644 --- a/min/jssms.min.js +++ b/min/jssms.min.js @@ -18,20 +18,20 @@ along with this program. If not, see . */ (function(window){'use strict';var DEBUG=!1,ENABLE_DEBUGGER=!1,ENABLE_COMPILER=!0,WRITE_MODE=0,READ_MODE=1,ENABLE_SERVER_LOGGER=!1,SYNC_MODE=READ_MODE,ACCURATE=!1,LITTLE_ENDIAN=!0,FORCE_TYPED_ARRAYS=!1,SUPPORT_TYPED_ARRAYS=FORCE_TYPED_ARRAYS||"Uint8Array"in window,FORCE_DATAVIEW=!1,SUPPORT_DATAVIEW=FORCE_DATAVIEW||"ArrayBuffer"in window&&"DataView"in window,FORCE_DESTRUCTURING=!1,SUPPORT_DESTRUCTURING=!1,SAMPLE_RATE=44100,DEBUG_TIMING=DEBUG,REFRESH_EMULATION=!1,ACCURATE_INTERRUPT_EMULATION=!1,LIGHTGUN=!1,VDP_SPRITE_COLLISIONS= ACCURATE,PAGE_SIZE=16384;var fpsInterval=500,CLOCK_NTSC=3579545,CLOCK_PAL=3546893; -function JSSMS(a){this.opts={ui:JSSMS.DummyUI,swfPath:"lib/"};if(void 0!=a)for(var b in this.opts)void 0!=a[b]&&(this.opts[b]=a[b]);void 0!=a.DEBUG&&(DEBUG=a.DEBUG);void 0!=a.ENABLE_COMPILER&&(ENABLE_COMPILER=a.ENABLE_COMPILER);this.keyboard=new JSSMS.Keyboard(this);this.ui=new this.opts.ui(this);this.vdp=new JSSMS.Vdp(this);this.psg=new JSSMS.SN76489(this);this.ports=new JSSMS.Ports(this);this.cpu=new JSSMS.Z80(this);this.ui.updateStatus("Ready to load a ROM.");this.ui=this.ui} +function JSSMS(a){this.opts={ui:JSSMS.DummyUI,swfPath:"lib/"};if(void 0!==a)for(var b in this.opts)void 0!==a[b]&&(this.opts[b]=a[b]);void 0!==a.DEBUG&&(DEBUG=a.DEBUG);void 0!==a.ENABLE_COMPILER&&(ENABLE_COMPILER=a.ENABLE_COMPILER);this.keyboard=new JSSMS.Keyboard(this);this.ui=new this.opts.ui(this);this.vdp=new JSSMS.Vdp(this);this.psg=new JSSMS.SN76489(this);this.ports=new JSSMS.Ports(this);this.cpu=new JSSMS.Z80(this);this.ui.updateStatus("Ready to load a ROM.");this.ui=this.ui} JSSMS.prototype={isRunning:!1,cyclesPerLine:0,no_of_scanlines:0,frameSkip:0,throttle:!0,fps:0,frameskip_counter:0,pause_button:!1,is_sms:!0,is_gg:!1,soundEnabled:!1,audioBuffer:[],audioBufferOffset:0,samplesPerFrame:0,samplesPerLine:[],emuWidth:0,emuHeight:0,fpsFrameCount:0,z80Time:0,drawTime:0,z80TimeCounter:0,drawTimeCounter:0,frameCount:0,romData:"",romFileName:"",lineno:0,reset:function(){this.setVideoTiming(this.vdp.videoMode);this.frameCount=0;this.frameskip_counter=this.frameSkip;this.keyboard.reset(); this.ui.reset();this.vdp.reset();this.ports.reset();this.cpu.reset();ENABLE_DEBUGGER&&this.cpu.resetDebug();DEBUG&&clearInterval(this.fpsInterval)},start:function(){var a=this;this.isRunning||(this.isRunning=!0,this.ui.requestAnimationFrame(this.frame.bind(this),this.ui.screen),DEBUG&&(this.resetFps(),this.fpsInterval=setInterval(function(){a.printFps()},fpsInterval)));this.ui.updateStatus("Running")},stop:function(){DEBUG&&clearInterval(this.fpsInterval);this.isRunning=!1},frame:function(){this.isRunning&& (this.cpu.frame(),this.fpsFrameCount++,this.ui.requestAnimationFrame(this.frame.bind(this),this.ui.screen))},nextStep:function(){this.cpu.frame()},setSMS:function(){this.is_sms=!0;this.is_gg=!1;this.vdp.h_start=0;this.vdp.h_end=32;this.emuWidth=SMS_WIDTH;this.emuHeight=SMS_HEIGHT},setGG:function(){this.is_gg=!0;this.is_sms=!1;this.vdp.h_start=5;this.vdp.h_end=27;this.emuWidth=GG_WIDTH;this.emuHeight=GG_HEIGHT},setVideoTiming:function(a){var b=0;a==NTSC||this.is_gg?(this.fps=60,this.no_of_scanlines= -SMS_Y_PIXELS_NTSC,b=CLOCK_NTSC):(this.fps=50,this.no_of_scanlines=SMS_Y_PIXELS_PAL,b=CLOCK_PAL);this.cyclesPerLine=Math.round(b/this.fps/this.no_of_scanlines+1);this.vdp.videoMode=a;if(this.soundEnabled){this.psg.init(b,SAMPLE_RATE);this.samplesPerFrame=Math.round(SAMPLE_RATE/this.fps);if(0==this.audioBuffer.length||this.audioBuffer.length!=this.samplesPerFrame)this.audioBuffer=Array(this.samplesPerFrame);if(0==this.samplesPerLine.length||this.samplesPerLine.length!=this.no_of_scanlines){this.samplesPerLine= +SMS_Y_PIXELS_NTSC,b=CLOCK_NTSC):(this.fps=50,this.no_of_scanlines=SMS_Y_PIXELS_PAL,b=CLOCK_PAL);this.cyclesPerLine=Math.round(b/this.fps/this.no_of_scanlines+1);this.vdp.videoMode=a;if(this.soundEnabled){this.psg.init(b,SAMPLE_RATE);this.samplesPerFrame=Math.round(SAMPLE_RATE/this.fps);if(0===this.audioBuffer.length||this.audioBuffer.length!=this.samplesPerFrame)this.audioBuffer=Array(this.samplesPerFrame);if(0===this.samplesPerLine.length||this.samplesPerLine.length!=this.no_of_scanlines){this.samplesPerLine= Array(this.no_of_scanlines);var c=0;for(a=0;a>16<<16),this.samplesPerLine[a]=b>>16}}},audioOutput:function(a){this.ui.writeAudio(a)},doRepaint:function(){this.ui.writeFrame()},printFps:function(){var a=JSSMS.Utils.getTimestamp(),b="Running: "+(this.fpsFrameCount/((a-this.lastFpsTime)/1E3)).toFixed(2)+" FPS";this.ui.updateStatus(b);this.fpsFrameCount=0;this.lastFpsTime=a},resetFps:function(){this.lastFpsTime=JSSMS.Utils.getTimestamp(); -this.fpsFrameCount=0},updateSound:function(a){0==a&&(this.audioBufferOffset=0);a=this.samplesPerLine[a];this.audioBuffer=this.psg.update(this.audioBufferOffset,a);this.audioBufferOffset+=a},readRomDirectly:function(a,b){var c;c=".gg"==b.substr(-3).toLowerCase()?2:1;var e=a.length;1==c?this.setSMS():2==c&&this.setGG();if(e<=PAGE_SIZE)return!1;c=this.loadROM(a,e);if(null==c)return!1;this.cpu.resetMemory(c);this.romData=a;this.romFileName=b;return!0},loadROM:function(a,b){0!=b%1024&&(a=a.substr(512), -b-=512);var c,e,d=Math.round(b/PAGE_SIZE),g=Array(d);for(c=0;c=this.syncBuffer.length&&(this.buffers.push(this.syncBuffer),this.syncBuffer=new Uint16Array(this.kBufferLength),this.syncBufferIdx=0)},tick:function(){if(!this.curRequest&&0=this.syncBuffer.length&&this.flushBuffer();this.syncBuffer[this.syncBufferIdx]=a;this.syncBufferIdx++},reflect16:function(a){this.syncBufferIdx>=this.syncBuffer.length&&this.flushBuffer(); +this,a=this.buffers[0];this.buffers.splice(0,1);var e=2*a.length;this.curRequest=(new BinaryRequest("POST","/wsynclog",{o:this.fileOffset,l:e},a,function(){c.fileOffset+=e})).always(function(){c.curRequest=null})}return 0===this.buffers.length},getAvailableBytes:function(){return 1E9},sync16:function(a,b){this.syncBufferIdx>=this.syncBuffer.length&&this.flushBuffer();this.syncBuffer[this.syncBufferIdx]=a;this.syncBufferIdx++},reflect16:function(a){this.syncBufferIdx>=this.syncBuffer.length&&this.flushBuffer(); this.syncBuffer[this.syncBufferIdx]=a;this.syncBufferIdx++;return a}};function SyncReader(){this.kBufferLength=1048576;this.syncBuffer=null;this.fileOffset=this.syncBufferIdx=0;this.curRequest=null;this.oos=!1;this.nextBuffer=null} SyncReader.prototype={refill:function(){if(!this.syncBuffer||this.syncBufferIdx>=this.syncBuffer.length)this.syncBuffer=this.nextBuffer,this.syncBufferIdx=0,this.nextBuffer=null},tick:function(){this.refill();if(!this.nextBuffer&&!this.curRequest){var a=this;this.curRequest=(new BinaryRequest("GET","/rsynclog",{o:this.fileOffset,l:this.kBufferLength},void 0,function(b){a.nextBuffer=new Uint16Array(b);a.fileOffset+=b.byteLength})).always(function(){a.curRequest=null});return!1}return!0},getAvailableBytes:function(){var a= 0;this.syncBuffer&&(a+=this.syncBuffer.length-this.syncBufferIdx);this.nextBuffer&&(a+=this.nextBuffer.length);return 2*a},pop:function(){(!this.syncBuffer||this.syncBufferIdx>=this.syncBuffer.length)&&this.refill();if(this.syncBuffer&&this.syncBufferIdxthis.pc?(this.branches[this.frameReg[1]][this.pc-16384]||this.recompiler.recompileFromAddress(this.pc,this.frameReg[1],1),this.branches[this.frameReg[1]][this.pc-16384].call(this,1)):49152>this.pc?(this.branches[this.frameReg[2]][this.pc-32768]||this.recompiler.recompileFromAddress(this.pc,this.frameReg[2],2),this.branches[this.frameReg[2]][this.pc-32768].call(this,2)):this.interpret()},eol:function(){this.main.soundEnabled&& this.main.updateSound(this.lineno);this.vdp.line=this.lineno;192>this.lineno&&this.vdp.drawLine(this.lineno);this.vdp.interrupts(this.lineno);this.interruptLine&&this.interrupt();this.lineno++;if(this.lineno>=this.main.no_of_scanlines)return this.eof(),!0;this.tstates+=this.main.cyclesPerLine;this.totalCycles=this.main.cyclesPerLine;return!1},eof:function(){this.main.soundEnabled&&this.main.audioOutput(this.main.audioBuffer);this.main.pause_button&&(this.nmi(),this.main.pause_button=!1);this.main.doRepaint()}, branches:[Object.create(null),Object.create(null),Object.create(null)],interpret:function(){var a=0,a=this.readMem(this.pc++);ACCURATE_INTERRUPT_EMULATION&&(this.EI_inst=!1);this.tstates-=OP_STATES[a];REFRESH_EMULATION&&this.incR();switch(a){case 1:this.setBC(this.readMemWord(this.pc++));this.pc++;break;case 2:this.writeMem(this.getBC(),this.a);break;case 3:this.incBC();break;case 4:this.b=this.inc8(this.b);break;case 5:this.b=this.dec8(this.b);break;case 6:this.b=this.readMem(this.pc++);break;case 7:this.rlca_a(); -break;case 8:this.exAF();break;case 9:this.setHL(this.add16(this.getHL(),this.getBC()));break;case 10:this.a=this.readMem(this.getBC());break;case 11:this.decBC();break;case 12:this.c=this.inc8(this.c);break;case 13:this.c=this.dec8(this.c);break;case 14:this.c=this.readMem(this.pc++);break;case 15:this.rrca_a();break;case 16:this.b=this.b-1&255;this.jr(0!=this.b);break;case 17:this.setDE(this.readMemWord(this.pc++));this.pc++;break;case 18:this.writeMem(this.getDE(),this.a);break;case 19:this.incDE(); -break;case 20:this.d=this.inc8(this.d);break;case 21:this.d=this.dec8(this.d);break;case 22:this.d=this.readMem(this.pc++);break;case 23:this.rla_a();break;case 24:this.pc+=this.signExtend(this.d_()+1);break;case 25:this.setHL(this.add16(this.getHL(),this.getDE()));break;case 26:this.a=this.readMem(this.getDE());break;case 27:this.decDE();break;case 28:this.e=this.inc8(this.e);break;case 29:this.e=this.dec8(this.e);break;case 30:this.e=this.readMem(this.pc++);break;case 31:this.rra_a();break;case 32:this.jr(0== -(this.f&F_ZERO));break;case 33:this.setHL(this.readMemWord(this.pc++));this.pc++;break;case 34:this.writeMemWord(this.readMemWord(this.pc++),this.getHL());this.pc++;break;case 35:this.incHL();break;case 36:this.h=this.inc8(this.h);break;case 37:this.h=this.dec8(this.h);break;case 38:this.h=this.readMem(this.pc++);break;case 39:this.daa();break;case 40:this.jr(0!=(this.f&F_ZERO));break;case 41:this.setHL(this.add16(this.getHL(),this.getHL()));break;case 42:this.setHL(this.readMemWord(this.readMemWord(this.pc++))); -this.pc++;break;case 43:this.decHL();break;case 44:this.l=this.inc8(this.l);break;case 45:this.l=this.dec8(this.l);break;case 46:this.l=this.readMem(this.pc++);break;case 47:this.cpl_a();break;case 48:this.jr(0==(this.f&F_CARRY));break;case 49:this.sp=this.readMemWord(this.pc++);this.pc++;break;case 50:this.writeMem(this.readMemWord(this.pc++),this.a);this.pc++;break;case 51:this.sp++;break;case 52:this.incMem(this.getHL());break;case 53:this.decMem(this.getHL());break;case 54:this.writeMem(this.getHL(), -this.readMem(this.pc++));break;case 55:this.f|=F_CARRY;this.f&=~F_NEGATIVE;this.f&=~F_HALFCARRY;break;case 56:this.jr(0!=(this.f&F_CARRY));break;case 57:this.setHL(this.add16(this.getHL(),this.sp));break;case 58:this.a=this.readMem(this.readMemWord(this.pc++));this.pc++;break;case 59:this.sp--;break;case 60:this.a=this.inc8(this.a);break;case 61:this.a=this.dec8(this.a);break;case 62:this.a=this.readMem(this.pc++);break;case 63:this.ccf();break;case 65:this.b=this.c;break;case 66:this.b=this.d;break; +break;case 8:this.exAF();break;case 9:this.setHL(this.add16(this.getHL(),this.getBC()));break;case 10:this.a=this.readMem(this.getBC());break;case 11:this.decBC();break;case 12:this.c=this.inc8(this.c);break;case 13:this.c=this.dec8(this.c);break;case 14:this.c=this.readMem(this.pc++);break;case 15:this.rrca_a();break;case 16:this.b=this.b-1&255;this.jr(0!==this.b);break;case 17:this.setDE(this.readMemWord(this.pc++));this.pc++;break;case 18:this.writeMem(this.getDE(),this.a);break;case 19:this.incDE(); +break;case 20:this.d=this.inc8(this.d);break;case 21:this.d=this.dec8(this.d);break;case 22:this.d=this.readMem(this.pc++);break;case 23:this.rla_a();break;case 24:this.pc+=this.signExtend(this.d_()+1);break;case 25:this.setHL(this.add16(this.getHL(),this.getDE()));break;case 26:this.a=this.readMem(this.getDE());break;case 27:this.decDE();break;case 28:this.e=this.inc8(this.e);break;case 29:this.e=this.dec8(this.e);break;case 30:this.e=this.readMem(this.pc++);break;case 31:this.rra_a();break;case 32:this.jr(0=== +(this.f&F_ZERO));break;case 33:this.setHL(this.readMemWord(this.pc++));this.pc++;break;case 34:this.writeMemWord(this.readMemWord(this.pc++),this.getHL());this.pc++;break;case 35:this.incHL();break;case 36:this.h=this.inc8(this.h);break;case 37:this.h=this.dec8(this.h);break;case 38:this.h=this.readMem(this.pc++);break;case 39:this.daa();break;case 40:this.jr(0!==(this.f&F_ZERO));break;case 41:this.setHL(this.add16(this.getHL(),this.getHL()));break;case 42:this.setHL(this.readMemWord(this.readMemWord(this.pc++))); +this.pc++;break;case 43:this.decHL();break;case 44:this.l=this.inc8(this.l);break;case 45:this.l=this.dec8(this.l);break;case 46:this.l=this.readMem(this.pc++);break;case 47:this.cpl_a();break;case 48:this.jr(0===(this.f&F_CARRY));break;case 49:this.sp=this.readMemWord(this.pc++);this.pc++;break;case 50:this.writeMem(this.readMemWord(this.pc++),this.a);this.pc++;break;case 51:this.sp++;break;case 52:this.incMem(this.getHL());break;case 53:this.decMem(this.getHL());break;case 54:this.writeMem(this.getHL(), +this.readMem(this.pc++));break;case 55:this.f|=F_CARRY;this.f&=~F_NEGATIVE;this.f&=~F_HALFCARRY;break;case 56:this.jr(0!==(this.f&F_CARRY));break;case 57:this.setHL(this.add16(this.getHL(),this.sp));break;case 58:this.a=this.readMem(this.readMemWord(this.pc++));this.pc++;break;case 59:this.sp--;break;case 60:this.a=this.inc8(this.a);break;case 61:this.a=this.dec8(this.a);break;case 62:this.a=this.readMem(this.pc++);break;case 63:this.ccf();break;case 65:this.b=this.c;break;case 66:this.b=this.d;break; case 67:this.b=this.e;break;case 68:this.b=this.h;break;case 69:this.b=this.l;break;case 70:this.b=this.readMem(this.getHL());break;case 71:this.b=this.a;break;case 72:this.c=this.b;break;case 74:this.c=this.d;break;case 75:this.c=this.e;break;case 76:this.c=this.h;break;case 77:this.c=this.l;break;case 78:this.c=this.readMem(this.getHL());break;case 79:this.c=this.a;break;case 80:this.d=this.b;break;case 81:this.d=this.c;break;case 83:this.d=this.e;break;case 84:this.d=this.h;break;case 85:this.d= this.l;break;case 86:this.d=this.readMem(this.getHL());break;case 87:this.d=this.a;break;case 88:this.e=this.b;break;case 89:this.e=this.c;break;case 90:this.e=this.d;break;case 92:this.e=this.h;break;case 93:this.e=this.l;break;case 94:this.e=this.readMem(this.getHL());break;case 95:this.e=this.a;break;case 96:this.h=this.b;break;case 97:this.h=this.c;break;case 98:this.h=this.d;break;case 99:this.h=this.e;break;case 101:this.h=this.l;break;case 102:this.h=this.readMem(this.getHL());break;case 103:this.h= this.a;break;case 104:this.l=this.b;break;case 105:this.l=this.c;break;case 106:this.l=this.d;break;case 107:this.l=this.e;break;case 108:this.l=this.h;break;case 110:this.l=this.readMem(this.getHL());break;case 111:this.l=this.a;break;case 112:this.writeMem(this.getHL(),this.b);break;case 113:this.writeMem(this.getHL(),this.c);break;case 114:this.writeMem(this.getHL(),this.d);break;case 115:this.writeMem(this.getHL(),this.e);break;case 116:this.writeMem(this.getHL(),this.h);break;case 117:this.writeMem(this.getHL(), @@ -64,114 +64,114 @@ break;case 147:this.sub_a(this.e);break;case 148:this.sub_a(this.h);break;case 1 this.SZP_TABLE[this.a&=this.b]|F_HALFCARRY;break;case 161:this.f=this.SZP_TABLE[this.a&=this.c]|F_HALFCARRY;break;case 162:this.f=this.SZP_TABLE[this.a&=this.d]|F_HALFCARRY;break;case 163:this.f=this.SZP_TABLE[this.a&=this.e]|F_HALFCARRY;break;case 164:this.f=this.SZP_TABLE[this.a&=this.h]|F_HALFCARRY;break;case 165:this.f=this.SZP_TABLE[this.a&=this.l]|F_HALFCARRY;break;case 166:this.f=this.SZP_TABLE[this.a&=this.readMem(this.getHL())]|F_HALFCARRY;break;case 167:this.f=this.SZP_TABLE[this.a]|F_HALFCARRY; break;case 168:this.f=this.SZP_TABLE[this.a^=this.b];break;case 169:this.f=this.SZP_TABLE[this.a^=this.c];break;case 170:this.f=this.SZP_TABLE[this.a^=this.d];break;case 171:this.f=this.SZP_TABLE[this.a^=this.e];break;case 172:this.f=this.SZP_TABLE[this.a^=this.h];break;case 173:this.f=this.SZP_TABLE[this.a^=this.l];break;case 174:this.f=this.SZP_TABLE[this.a^=this.readMem(this.getHL())];break;case 175:this.f=this.SZP_TABLE[this.a=0];break;case 176:this.f=this.SZP_TABLE[this.a|=this.b];break;case 177:this.f= this.SZP_TABLE[this.a|=this.c];break;case 178:this.f=this.SZP_TABLE[this.a|=this.d];break;case 179:this.f=this.SZP_TABLE[this.a|=this.e];break;case 180:this.f=this.SZP_TABLE[this.a|=this.h];break;case 181:this.f=this.SZP_TABLE[this.a|=this.l];break;case 182:this.f=this.SZP_TABLE[this.a|=this.readMem(this.getHL())];break;case 183:this.f=this.SZP_TABLE[this.a];break;case 184:this.cp_a(this.b);break;case 185:this.cp_a(this.c);break;case 186:this.cp_a(this.d);break;case 187:this.cp_a(this.e);break;case 188:this.cp_a(this.h); -break;case 189:this.cp_a(this.l);break;case 190:this.cp_a(this.readMem(this.getHL()));break;case 191:this.cp_a(this.a);break;case 192:this.ret(0==(this.f&F_ZERO));break;case 193:this.setBC(this.readMemWord(this.sp));this.sp+=2;break;case 194:this.jp(0==(this.f&F_ZERO));break;case 195:this.pc=this.readMemWord(this.pc);break;case 196:this.call(0==(this.f&F_ZERO));break;case 197:this.push(this.getBC());break;case 198:this.add_a(this.readMem(this.pc++));break;case 199:this.push(this.pc);this.pc=0;break; -case 200:this.ret(0!=(this.f&F_ZERO));break;case 201:this.pc=this.readMemWord(this.sp);this.sp+=2;break;case 202:this.jp(0!=(this.f&F_ZERO));break;case 203:this.doCB(this.readMem(this.pc++));break;case 204:this.call(0!=(this.f&F_ZERO));break;case 205:this.push(this.pc+2);this.pc=this.readMemWord(this.pc);break;case 206:this.adc_a(this.readMem(this.pc++));break;case 207:this.push(this.pc);this.pc=8;break;case 208:this.ret(0==(this.f&F_CARRY));break;case 209:this.setDE(this.readMemWord(this.sp));this.sp+= -2;break;case 210:this.jp(0==(this.f&F_CARRY));break;case 211:this.port.out(this.readMem(this.pc++),this.a);break;case 212:this.call(0==(this.f&F_CARRY));break;case 213:this.push(this.getDE());break;case 214:this.sub_a(this.readMem(this.pc++));break;case 215:this.push(this.pc);this.pc=16;break;case 216:this.ret(0!=(this.f&F_CARRY));break;case 217:this.exBC();this.exDE();this.exHL();break;case 218:this.jp(0!=(this.f&F_CARRY));break;case 219:this.a=this.port.in_(this.readMem(this.pc++));break;case 220:this.call(0!= -(this.f&F_CARRY));break;case 221:this.doIndexOpIX(this.readMem(this.pc++));break;case 222:this.sbc_a(this.readMem(this.pc++));break;case 223:this.push(this.pc);this.pc=24;break;case 224:this.ret(0==(this.f&F_PARITY));break;case 225:this.setHL(this.readMemWord(this.sp));this.sp+=2;break;case 226:this.jp(0==(this.f&F_PARITY));break;case 227:a=this.getHL();this.setHL(this.readMemWord(this.sp));this.writeMemWord(this.sp,a);break;case 228:this.call(0==(this.f&F_PARITY));break;case 229:this.push(this.getHL()); -break;case 230:this.f=this.SZP_TABLE[this.a&=this.readMem(this.pc++)]|F_HALFCARRY;break;case 231:this.push(this.pc);this.pc=32;break;case 232:this.ret(0!=(this.f&F_PARITY));break;case 233:this.pc=this.getHL();break;case 234:this.jp(0!=(this.f&F_PARITY));break;case 235:a=this.d;this.d=this.h;this.h=a;a=this.e;this.e=this.l;this.l=a;break;case 236:this.call(0!=(this.f&F_PARITY));break;case 237:this.doED(this.readMem(this.pc));break;case 238:this.f=this.SZP_TABLE[this.a^=this.readMem(this.pc++)];break; -case 239:this.push(this.pc);this.pc=40;break;case 240:this.ret(0==(this.f&F_SIGN));break;case 241:this.setAF(this.readMemWord(this.sp));this.sp+=2;break;case 242:this.jp(0==(this.f&F_SIGN));break;case 243:this.iff1=this.iff2=!1;this.EI_inst=!0;break;case 244:this.call(0==(this.f&F_SIGN));break;case 245:this.push(this.getAF());break;case 246:this.f=this.SZP_TABLE[this.a|=this.readMem(this.pc++)];break;case 247:this.push(this.pc);this.pc=48;break;case 248:this.ret(0!=(this.f&F_SIGN));break;case 249:this.sp= -this.getHL();break;case 250:this.jp(0!=(this.f&F_SIGN));break;case 251:this.iff1=this.iff2=this.EI_inst=!0;break;case 252:this.call(0!=(this.f&F_SIGN));break;case 253:this.doIndexOpIY(this.readMem(this.pc++));break;case 254:this.cp_a(this.readMem(this.pc++));break;case 255:this.push(this.pc),this.pc=56}},getCycle:function(){return this.totalCycles-this.tstates},nmi:function(){this.iff2=this.iff1;this.iff1=!1;REFRESH_EMULATION&&this.incR();this.halt&&(this.pc++,this.halt=!1);this.push(this.pc);this.pc= -102;this.tstates-=11},interrupt:function(){!this.iff1||ACCURATE_INTERRUPT_EMULATION&&this.EI_inst||(this.halt&&(this.pc++,this.halt=!1),REFRESH_EMULATION&&this.incR(),this.interruptLine=this.iff1=this.iff2=!1,this.push(this.pc),0==this.im?(this.pc=0==this.interruptVector||255==this.interruptVector?56:this.interruptVector,this.tstates-=13):1==this.im?(this.pc=56,this.tstates-=13):(this.pc=this.readMemWord((this.i<<8)+this.interruptVector),this.tstates-=19))},jp:function(a){this.pc=a?this.readMemWord(this.pc): -this.pc+2},jr:function(a){a?(this.pc+=this.signExtend(this.d_()+1),this.tstates-=5):this.pc++},signExtend:function(a){128<=a&&(a-=256);return a},call:function(a){a?(this.push(this.pc+2),this.pc=this.readMemWord(this.pc),this.tstates-=7):this.pc+=2},ret:function(a){a&&(this.pc=this.readMemWord(this.sp),this.sp+=2,this.tstates-=6)},push:function(a){this.sp-=2;this.writeMemWord(this.sp,a)},pushUint8:function(a,b){this.sp-=2;this.writeMemWord(this.sp,a<<8|b)},incMem:function(a){this.writeMem(a,this.inc8(this.readMem(a)))}, -decMem:function(a){this.writeMem(a,this.dec8(this.readMem(a)))},ccf:function(){0!=(this.f&F_CARRY)?(this.f&=~F_CARRY,this.f|=F_HALFCARRY):(this.f|=F_CARRY,this.f&=~F_HALFCARRY);this.f&=~F_NEGATIVE},daa:function(){var a=this.DAA_TABLE[this.a|(this.f&F_CARRY)<<8|(this.f&F_NEGATIVE)<<8|(this.f&F_HALFCARRY)<<6];this.a=a&255;this.f=this.f&F_NEGATIVE|a>>8},doCB:function(a){this.tstates-=OP_CB_STATES[a];REFRESH_EMULATION&&this.incR();switch(a){case 0:this.b=this.rlc(this.b);break;case 1:this.c=this.rlc(this.c); -break;case 2:this.d=this.rlc(this.d);break;case 3:this.e=this.rlc(this.e);break;case 4:this.h=this.rlc(this.h);break;case 5:this.l=this.rlc(this.l);break;case 6:this.writeMem(this.getHL(),this.rlc(this.readMem(this.getHL())));break;case 7:this.a=this.rlc(this.a);break;case 8:this.b=this.rrc(this.b);break;case 9:this.c=this.rrc(this.c);break;case 10:this.d=this.rrc(this.d);break;case 11:this.e=this.rrc(this.e);break;case 12:this.h=this.rrc(this.h);break;case 13:this.l=this.rrc(this.l);break;case 14:this.writeMem(this.getHL(), -this.rrc(this.readMem(this.getHL())));break;case 15:this.a=this.rrc(this.a);break;case 16:this.b=this.rl(this.b);break;case 17:this.c=this.rl(this.c);break;case 18:this.d=this.rl(this.d);break;case 19:this.e=this.rl(this.e);break;case 20:this.h=this.rl(this.h);break;case 21:this.l=this.rl(this.l);break;case 22:this.writeMem(this.getHL(),this.rl(this.readMem(this.getHL())));break;case 23:this.a=this.rl(this.a);break;case 24:this.b=this.rr(this.b);break;case 25:this.c=this.rr(this.c);break;case 26:this.d= -this.rr(this.d);break;case 27:this.e=this.rr(this.e);break;case 28:this.h=this.rr(this.h);break;case 29:this.l=this.rr(this.l);break;case 30:this.writeMem(this.getHL(),this.rr(this.readMem(this.getHL())));break;case 31:this.a=this.rr(this.a);break;case 32:this.b=this.sla(this.b);break;case 33:this.c=this.sla(this.c);break;case 34:this.d=this.sla(this.d);break;case 35:this.e=this.sla(this.e);break;case 36:this.h=this.sla(this.h);break;case 37:this.l=this.sla(this.l);break;case 38:this.writeMem(this.getHL(), -this.sla(this.readMem(this.getHL())));break;case 39:this.a=this.sla(this.a);break;case 40:this.b=this.sra(this.b);break;case 41:this.c=this.sra(this.c);break;case 42:this.d=this.sra(this.d);break;case 43:this.e=this.sra(this.e);break;case 44:this.h=this.sra(this.h);break;case 45:this.l=this.sra(this.l);break;case 46:this.writeMem(this.getHL(),this.sra(this.readMem(this.getHL())));break;case 47:this.a=this.sra(this.a);break;case 48:this.b=this.sll(this.b);break;case 49:this.c=this.sll(this.c);break; -case 50:this.d=this.sll(this.d);break;case 51:this.e=this.sll(this.e);break;case 52:this.h=this.sll(this.h);break;case 53:this.l=this.sll(this.l);break;case 54:this.writeMem(this.getHL(),this.sll(this.readMem(this.getHL())));break;case 55:this.a=this.sll(this.a);break;case 56:this.b=this.srl(this.b);break;case 57:this.c=this.srl(this.c);break;case 58:this.d=this.srl(this.d);break;case 59:this.e=this.srl(this.e);break;case 60:this.h=this.srl(this.h);break;case 61:this.l=this.srl(this.l);break;case 62:this.writeMem(this.getHL(), -this.srl(this.readMem(this.getHL())));break;case 63:this.a=this.srl(this.a);break;case 64:this.bit(this.b&BIT_0);break;case 65:this.bit(this.c&BIT_0);break;case 66:this.bit(this.d&BIT_0);break;case 67:this.bit(this.e&BIT_0);break;case 68:this.bit(this.h&BIT_0);break;case 69:this.bit(this.l&BIT_0);break;case 70:this.bit(this.readMem(this.getHL())&BIT_0);break;case 71:this.bit(this.a&BIT_0);break;case 72:this.bit(this.b&BIT_1);break;case 73:this.bit(this.c&BIT_1);break;case 74:this.bit(this.d&BIT_1); -break;case 75:this.bit(this.e&BIT_1);break;case 76:this.bit(this.h&BIT_1);break;case 77:this.bit(this.l&BIT_1);break;case 78:this.bit(this.readMem(this.getHL())&BIT_1);break;case 79:this.bit(this.a&BIT_1);break;case 80:this.bit(this.b&BIT_2);break;case 81:this.bit(this.c&BIT_2);break;case 82:this.bit(this.d&BIT_2);break;case 83:this.bit(this.e&BIT_2);break;case 84:this.bit(this.h&BIT_2);break;case 85:this.bit(this.l&BIT_2);break;case 86:this.bit(this.readMem(this.getHL())&BIT_2);break;case 87:this.bit(this.a& -BIT_2);break;case 88:this.bit(this.b&BIT_3);break;case 89:this.bit(this.c&BIT_3);break;case 90:this.bit(this.d&BIT_3);break;case 91:this.bit(this.e&BIT_3);break;case 92:this.bit(this.h&BIT_3);break;case 93:this.bit(this.l&BIT_3);break;case 94:this.bit(this.readMem(this.getHL())&BIT_3);break;case 95:this.bit(this.a&BIT_3);break;case 96:this.bit(this.b&BIT_4);break;case 97:this.bit(this.c&BIT_4);break;case 98:this.bit(this.d&BIT_4);break;case 99:this.bit(this.e&BIT_4);break;case 100:this.bit(this.h& -BIT_4);break;case 101:this.bit(this.l&BIT_4);break;case 102:this.bit(this.readMem(this.getHL())&BIT_4);break;case 103:this.bit(this.a&BIT_4);break;case 104:this.bit(this.b&BIT_5);break;case 105:this.bit(this.c&BIT_5);break;case 106:this.bit(this.d&BIT_5);break;case 107:this.bit(this.e&BIT_5);break;case 108:this.bit(this.h&BIT_5);break;case 109:this.bit(this.l&BIT_5);break;case 110:this.bit(this.readMem(this.getHL())&BIT_5);break;case 111:this.bit(this.a&BIT_5);break;case 112:this.bit(this.b&BIT_6); -break;case 113:this.bit(this.c&BIT_6);break;case 114:this.bit(this.d&BIT_6);break;case 115:this.bit(this.e&BIT_6);break;case 116:this.bit(this.h&BIT_6);break;case 117:this.bit(this.l&BIT_6);break;case 118:this.bit(this.readMem(this.getHL())&BIT_6);break;case 119:this.bit(this.a&BIT_6);break;case 120:this.bit(this.b&BIT_7);break;case 121:this.bit(this.c&BIT_7);break;case 122:this.bit(this.d&BIT_7);break;case 123:this.bit(this.e&BIT_7);break;case 124:this.bit(this.h&BIT_7);break;case 125:this.bit(this.l& -BIT_7);break;case 126:this.bit(this.readMem(this.getHL())&BIT_7);break;case 127:this.bit(this.a&BIT_7);break;case 128:this.b&=~BIT_0;break;case 129:this.c&=~BIT_0;break;case 130:this.d&=~BIT_0;break;case 131:this.e&=~BIT_0;break;case 132:this.h&=~BIT_0;break;case 133:this.l&=~BIT_0;break;case 134:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_0);break;case 135:this.a&=~BIT_0;break;case 136:this.b&=~BIT_1;break;case 137:this.c&=~BIT_1;break;case 138:this.d&=~BIT_1;break;case 139:this.e&= -~BIT_1;break;case 140:this.h&=~BIT_1;break;case 141:this.l&=~BIT_1;break;case 142:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_1);break;case 143:this.a&=~BIT_1;break;case 144:this.b&=~BIT_2;break;case 145:this.c&=~BIT_2;break;case 146:this.d&=~BIT_2;break;case 147:this.e&=~BIT_2;break;case 148:this.h&=~BIT_2;break;case 149:this.l&=~BIT_2;break;case 150:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_2);break;case 151:this.a&=~BIT_2;break;case 152:this.b&=~BIT_3;break;case 153:this.c&= -~BIT_3;break;case 154:this.d&=~BIT_3;break;case 155:this.e&=~BIT_3;break;case 156:this.h&=~BIT_3;break;case 157:this.l&=~BIT_3;break;case 158:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_3);break;case 159:this.a&=~BIT_3;break;case 160:this.b&=~BIT_4;break;case 161:this.c&=~BIT_4;break;case 162:this.d&=~BIT_4;break;case 163:this.e&=~BIT_4;break;case 164:this.h&=~BIT_4;break;case 165:this.l&=~BIT_4;break;case 166:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_4);break;case 167:this.a&= -~BIT_4;break;case 168:this.b&=~BIT_5;break;case 169:this.c&=~BIT_5;break;case 170:this.d&=~BIT_5;break;case 171:this.e&=~BIT_5;break;case 172:this.h&=~BIT_5;break;case 173:this.l&=~BIT_5;break;case 174:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_5);break;case 175:this.a&=~BIT_5;break;case 176:this.b&=~BIT_6;break;case 177:this.c&=~BIT_6;break;case 178:this.d&=~BIT_6;break;case 179:this.e&=~BIT_6;break;case 180:this.h&=~BIT_6;break;case 181:this.l&=~BIT_6;break;case 182:this.writeMem(this.getHL(), -this.readMem(this.getHL())&~BIT_6);break;case 183:this.a&=~BIT_6;break;case 184:this.b&=~BIT_7;break;case 185:this.c&=~BIT_7;break;case 186:this.d&=~BIT_7;break;case 187:this.e&=~BIT_7;break;case 188:this.h&=~BIT_7;break;case 189:this.l&=~BIT_7;break;case 190:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_7);break;case 191:this.a&=~BIT_7;break;case 192:this.b|=BIT_0;break;case 193:this.c|=BIT_0;break;case 194:this.d|=BIT_0;break;case 195:this.e|=BIT_0;break;case 196:this.h|=BIT_0;break; -case 197:this.l|=BIT_0;break;case 198:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_0);break;case 199:this.a|=BIT_0;break;case 200:this.b|=BIT_1;break;case 201:this.c|=BIT_1;break;case 202:this.d|=BIT_1;break;case 203:this.e|=BIT_1;break;case 204:this.h|=BIT_1;break;case 205:this.l|=BIT_1;break;case 206:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_1);break;case 207:this.a|=BIT_1;break;case 208:this.b|=BIT_2;break;case 209:this.c|=BIT_2;break;case 210:this.d|=BIT_2;break;case 211:this.e|= -BIT_2;break;case 212:this.h|=BIT_2;break;case 213:this.l|=BIT_2;break;case 214:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_2);break;case 215:this.a|=BIT_2;break;case 216:this.b|=BIT_3;break;case 217:this.c|=BIT_3;break;case 218:this.d|=BIT_3;break;case 219:this.e|=BIT_3;break;case 220:this.h|=BIT_3;break;case 221:this.l|=BIT_3;break;case 222:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_3);break;case 223:this.a|=BIT_3;break;case 224:this.b|=BIT_4;break;case 225:this.c|=BIT_4; -break;case 226:this.d|=BIT_4;break;case 227:this.e|=BIT_4;break;case 228:this.h|=BIT_4;break;case 229:this.l|=BIT_4;break;case 230:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_4);break;case 231:this.a|=BIT_4;break;case 232:this.b|=BIT_5;break;case 233:this.c|=BIT_5;break;case 234:this.d|=BIT_5;break;case 235:this.e|=BIT_5;break;case 236:this.h|=BIT_5;break;case 237:this.l|=BIT_5;break;case 238:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_5);break;case 239:this.a|=BIT_5;break; -case 240:this.b|=BIT_6;break;case 241:this.c|=BIT_6;break;case 242:this.d|=BIT_6;break;case 243:this.e|=BIT_6;break;case 244:this.h|=BIT_6;break;case 245:this.l|=BIT_6;break;case 246:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_6);break;case 247:this.a|=BIT_6;break;case 248:this.b|=BIT_7;break;case 249:this.c|=BIT_7;break;case 250:this.d|=BIT_7;break;case 251:this.e|=BIT_7;break;case 252:this.h|=BIT_7;break;case 253:this.l|=BIT_7;break;case 254:this.writeMem(this.getHL(),this.readMem(this.getHL())| -BIT_7);break;case 255:this.a|=BIT_7;break;default:JSSMS.Utils.console.log("Unimplemented CB Opcode: "+JSSMS.Utils.toHex(a))}},rlc:function(a){var b=(a&128)>>7;a=(a<<1|a>>7)&255;this.f=b|this.SZP_TABLE[a];return a},rrc:function(a){var b=a&1;a=(a>>1|a<<7)&255;this.f=b|this.SZP_TABLE[a];return a},rl:function(a){var b=(a&128)>>7;a=(a<<1|this.f&F_CARRY)&255;this.f=b|this.SZP_TABLE[a];return a},rr:function(a){var b=a&1;a=(a>>1|this.f<<7)&255;this.f=b|this.SZP_TABLE[a];return a},sla:function(a){var b=(a& -128)>>7;a=a<<1&255;this.f=b|this.SZP_TABLE[a];return a},sll:function(a){var b=(a&128)>>7;a=(a<<1|1)&255;this.f=b|this.SZP_TABLE[a];return a},sra:function(a){var b=a&1;a=a>>1|a&128;this.f=b|this.SZP_TABLE[a];return a},srl:function(a){var b=a&1;a=a>>1&255;this.f=b|this.SZP_TABLE[a];return a},bit:function(a){this.f=this.f&F_CARRY|this.SZ_BIT_TABLE[a]},doIndexOpIX:function(a){var b=0;this.tstates-=OP_DD_STATES[a];REFRESH_EMULATION&&this.incR();switch(a){case 9:this.setIXHIXL(this.add16(this.getIXHIXL(), -this.getBC()));break;case 25:this.setIXHIXL(this.add16(this.getIXHIXL(),this.getDE()));break;case 33:this.setIXHIXL(this.readMemWord(this.pc++));this.pc++;break;case 34:this.writeMemWord(this.readMemWord(this.pc++),this.getIXHIXL());this.pc++;break;case 35:this.incIXHIXL();break;case 36:this.ixH=this.inc8(this.ixH);break;case 37:this.ixH=this.dec8(this.ixH);break;case 38:this.ixH=this.readMem(this.pc++);break;case 41:this.setIXHIXL(this.add16(this.getIXHIXL(),this.getIXHIXL()));break;case 42:this.setIXHIXL(this.readMemWord(this.readMemWord(this.pc++))); -this.pc++;break;case 43:this.decIXHIXL();break;case 44:this.ixL=this.inc8(this.ixL);break;case 45:this.ixL=this.dec8(this.ixL);break;case 46:this.ixL=this.readMem(this.pc++);break;case 52:this.incMem(this.getIXHIXL()+this.d_());this.pc++;break;case 53:this.decMem(this.getIXHIXL()+this.d_());this.pc++;break;case 54:this.writeMem(this.getIXHIXL()+this.d_(),this.readMem(++this.pc));this.pc++;break;case 57:this.setIXHIXL(this.add16(this.getIXHIXL(),this.sp));break;case 68:this.b=this.ixH;break;case 69:this.b= -this.ixL;break;case 70:this.b=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 76:this.c=this.ixH;break;case 77:this.c=this.ixL;break;case 78:this.c=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 84:this.d=this.ixH;break;case 85:this.d=this.ixL;break;case 86:this.d=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 92:this.e=this.ixH;break;case 93:this.e=this.ixL;break;case 94:this.e=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 96:this.ixH=this.b; -break;case 97:this.ixH=this.c;break;case 98:this.ixH=this.d;break;case 99:this.ixH=this.e;break;case 100:break;case 101:this.ixH=this.ixL;break;case 102:this.h=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 103:this.ixH=this.a;break;case 104:this.ixL=this.b;break;case 105:this.ixL=this.c;break;case 106:this.ixL=this.d;break;case 107:this.ixL=this.e;break;case 108:this.ixL=this.ixH;break;case 109:break;case 110:this.l=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 111:this.ixL= -this.a;break;case 112:this.writeMem(this.getIXHIXL()+this.d_(),this.b);this.pc++;break;case 113:this.writeMem(this.getIXHIXL()+this.d_(),this.c);this.pc++;break;case 114:this.writeMem(this.getIXHIXL()+this.d_(),this.d);this.pc++;break;case 115:this.writeMem(this.getIXHIXL()+this.d_(),this.e);this.pc++;break;case 116:this.writeMem(this.getIXHIXL()+this.d_(),this.h);this.pc++;break;case 117:this.writeMem(this.getIXHIXL()+this.d_(),this.l);this.pc++;break;case 119:this.writeMem(this.getIXHIXL()+this.d_(), -this.a);this.pc++;break;case 124:this.a=this.ixH;break;case 125:this.a=this.ixL;break;case 126:this.a=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 132:this.add_a(this.ixH);break;case 133:this.add_a(this.ixL);break;case 134:this.add_a(this.readMem(this.getIXHIXL()+this.d_()));this.pc++;break;case 140:this.adc_a(this.ixH);break;case 141:this.adc_a(this.ixL);break;case 142:this.adc_a(this.readMem(this.getIXHIXL()+this.d_()));this.pc++;break;case 148:this.sub_a(this.ixH);break;case 149:this.sub_a(this.ixL); -break;case 150:this.sub_a(this.readMem(this.getIXHIXL()+this.d_()));this.pc++;break;case 156:this.sbc_a(this.ixH);break;case 157:this.sbc_a(this.ixL);break;case 158:this.sbc_a(this.readMem(this.getIXHIXL()+this.d_()));this.pc++;break;case 164:this.f=this.SZP_TABLE[this.a&=this.ixH]|F_HALFCARRY;break;case 165:this.f=this.SZP_TABLE[this.a&=this.ixL]|F_HALFCARRY;break;case 166:this.f=this.SZP_TABLE[this.a&=this.readMem(this.getIXHIXL()+this.d_())]|F_HALFCARRY;this.pc++;break;case 172:this.f=this.SZP_TABLE[this.a^= -this.ixH];break;case 173:this.f=this.SZP_TABLE[this.a^=this.ixL];break;case 174:this.f=this.SZP_TABLE[this.a^=this.readMem(this.getIXHIXL()+this.d_())];this.pc++;break;case 180:this.f=this.SZP_TABLE[this.a|=this.ixH];break;case 181:this.f=this.SZP_TABLE[this.a|=this.ixL];break;case 182:this.f=this.SZP_TABLE[this.a|=this.readMem(this.getIXHIXL()+this.d_())];this.pc++;break;case 188:this.cp_a(this.ixH);break;case 189:this.cp_a(this.ixL);break;case 190:this.cp_a(this.readMem(this.getIXHIXL()+this.d_())); -this.pc++;break;case 203:this.doIndexCB(this.getIXHIXL());break;case 225:this.setIXHIXL(this.readMemWord(this.sp));this.sp+=2;break;case 227:b=this.getIXHIXL();this.setIXHIXL(this.readMemWord(this.sp));this.writeMemWord(this.sp,b);break;case 229:this.push(this.getIXHIXL());break;case 233:this.pc=this.getIXHIXL();break;case 249:this.sp=this.getIXHIXL();break;default:JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: "+JSSMS.Utils.toHex(a)),this.pc--}},doIndexOpIY:function(a){this.tstates-=OP_DD_STATES[a]; -REFRESH_EMULATION&&this.incR();switch(a){case 9:this.setIYHIYL(this.add16(this.getIYHIYL(),this.getBC()));break;case 25:this.setIYHIYL(this.add16(this.getIYHIYL(),this.getDE()));break;case 33:this.setIYHIYL(this.readMemWord(this.pc++));this.pc++;break;case 34:this.writeMemWord(this.readMemWord(this.pc++),this.getIYHIYL());this.pc++;break;case 35:this.incIYHIYL();break;case 36:this.iyH=this.inc8(this.iyH);break;case 37:this.iyH=this.dec8(this.iyH);break;case 38:this.iyH=this.readMem(this.pc++);break; -case 41:this.setIYHIYL(this.add16(this.getIYHIYL(),this.getIYHIYL()));break;case 42:this.setIYHIYL(this.readMemWord(this.readMemWord(this.pc++)));this.pc++;break;case 43:this.decIYHIYL();break;case 44:this.iyL=this.inc8(this.iyL);break;case 45:this.iyL=this.dec8(this.iyL);break;case 46:this.iyL=this.readMem(this.pc++);break;case 52:this.incMem(this.getIYHIYL()+this.d_());this.pc++;break;case 53:this.decMem(this.getIYHIYL()+this.d_());this.pc++;break;case 54:this.writeMem(this.getIYHIYL()+this.d_(), -this.readMem(++this.pc));this.pc++;break;case 57:this.setIYHIYL(this.add16(this.getIYHIYL(),this.sp));break;case 68:this.b=this.iyH;break;case 69:this.b=this.iyL;break;case 70:this.b=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 76:this.c=this.iyH;break;case 77:this.c=this.iyL;break;case 78:this.c=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 84:this.d=this.iyH;break;case 85:this.d=this.iyL;break;case 86:this.d=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break; -case 92:this.e=this.iyH;break;case 93:this.e=this.iyL;break;case 94:this.e=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 96:this.iyH=this.b;break;case 97:this.iyH=this.c;break;case 98:this.iyH=this.d;break;case 99:this.iyH=this.e;break;case 100:break;case 101:this.iyH=this.iyL;break;case 102:this.h=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 103:this.iyH=this.a;break;case 104:this.iyL=this.b;break;case 105:this.iyL=this.c;break;case 106:this.iyL=this.d;break;case 107:this.iyL= -this.e;break;case 108:this.iyL=this.iyH;break;case 109:break;case 110:this.l=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 111:this.iyL=this.a;break;case 112:this.writeMem(this.getIYHIYL()+this.d_(),this.b);this.pc++;break;case 113:this.writeMem(this.getIYHIYL()+this.d_(),this.c);this.pc++;break;case 114:this.writeMem(this.getIYHIYL()+this.d_(),this.d);this.pc++;break;case 115:this.writeMem(this.getIYHIYL()+this.d_(),this.e);this.pc++;break;case 116:this.writeMem(this.getIYHIYL()+ -this.d_(),this.h);this.pc++;break;case 117:this.writeMem(this.getIYHIYL()+this.d_(),this.l);this.pc++;break;case 119:this.writeMem(this.getIYHIYL()+this.d_(),this.a);this.pc++;break;case 124:this.a=this.iyH;break;case 125:this.a=this.iyL;break;case 126:this.a=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 132:this.add_a(this.iyH);break;case 133:this.add_a(this.iyL);break;case 134:this.add_a(this.readMem(this.getIYHIYL()+this.d_()));this.pc++;break;case 140:this.adc_a(this.iyH);break; -case 141:this.adc_a(this.iyL);break;case 142:this.adc_a(this.readMem(this.getIYHIYL()+this.d_()));this.pc++;break;case 148:this.sub_a(this.iyH);break;case 149:this.sub_a(this.iyL);break;case 150:this.sub_a(this.readMem(this.getIYHIYL()+this.d_()));this.pc++;break;case 156:this.sbc_a(this.iyH);break;case 157:this.sbc_a(this.iyL);break;case 158:this.sbc_a(this.readMem(this.getIYHIYL()+this.d_()));this.pc++;break;case 164:this.f=this.SZP_TABLE[this.a&=this.iyH]|F_HALFCARRY;break;case 165:this.f=this.SZP_TABLE[this.a&= -this.iyL]|F_HALFCARRY;break;case 166:this.f=this.SZP_TABLE[this.a&=this.readMem(this.getIYHIYL()+this.d_())]|F_HALFCARRY;this.pc++;break;case 172:this.f=this.SZP_TABLE[this.a^=this.iyH];break;case 173:this.f=this.SZP_TABLE[this.a^=this.iyL];break;case 174:this.f=this.SZP_TABLE[this.a^=this.readMem(this.getIYHIYL()+this.d_())];this.pc++;break;case 180:this.f=this.SZP_TABLE[this.a|=this.iyH];break;case 181:this.f=this.SZP_TABLE[this.a|=this.iyL];break;case 182:this.f=this.SZP_TABLE[this.a|=this.readMem(this.getIYHIYL()+ -this.d_())];this.pc++;break;case 188:this.cp_a(this.iyH);break;case 189:this.cp_a(this.iyL);break;case 190:this.cp_a(this.readMem(this.getIYHIYL()+this.d_()));this.pc++;break;case 203:this.doIndexCB(this.getIYHIYL());break;case 225:this.setIYHIYL(this.readMemWord(this.sp));this.sp+=2;break;case 227:a=this.getIYHIYL();this.setIYHIYL(this.readMemWord(this.sp));this.writeMemWord(this.sp,a);break;case 229:this.push(this.getIYHIYL());break;case 233:this.pc=this.getIYHIYL();break;case 249:this.sp=this.getIYHIYL(); -break;default:JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: "+JSSMS.Utils.toHex(a)),this.pc--}},doIndexCB:function(a){a=a+this.readMem(this.pc)&65535;var b=this.readMem(++this.pc);this.tstates-=OP_INDEX_CB_STATES[b];switch(b){case 0:this.b=this.rlc(this.readMem(a));this.writeMem(a,this.b);break;case 1:this.c=this.rlc(this.readMem(a));this.writeMem(a,this.c);break;case 2:this.d=this.rlc(this.readMem(a));this.writeMem(a,this.d);break;case 3:this.e=this.rlc(this.readMem(a));this.writeMem(a,this.e); -break;case 4:this.h=this.rlc(this.readMem(a));this.writeMem(a,this.h);break;case 5:this.l=this.rlc(this.readMem(a));this.writeMem(a,this.l);break;case 6:this.writeMem(a,this.rlc(this.readMem(a)));break;case 7:this.a=this.rlc(this.readMem(a));this.writeMem(a,this.a);break;case 8:this.b=this.rrc(this.readMem(a));this.writeMem(a,this.b);break;case 9:this.c=this.rrc(this.readMem(a));this.writeMem(a,this.c);break;case 10:this.d=this.rrc(this.readMem(a));this.writeMem(a,this.d);break;case 11:this.e=this.rrc(this.readMem(a)); -this.writeMem(a,this.e);break;case 12:this.h=this.rrc(this.readMem(a));this.writeMem(a,this.h);break;case 13:this.l=this.rrc(this.readMem(a));this.writeMem(a,this.l);break;case 14:this.writeMem(a,this.rrc(this.readMem(a)));break;case 15:this.a=this.rrc(this.readMem(a));this.writeMem(a,this.a);break;case 16:this.b=this.rl(this.readMem(a));this.writeMem(a,this.b);break;case 17:this.c=this.rl(this.readMem(a));this.writeMem(a,this.c);break;case 18:this.d=this.rl(this.readMem(a));this.writeMem(a,this.d); -break;case 19:this.e=this.rl(this.readMem(a));this.writeMem(a,this.e);break;case 20:this.h=this.rl(this.readMem(a));this.writeMem(a,this.h);break;case 21:this.l=this.rl(this.readMem(a));this.writeMem(a,this.l);break;case 22:this.writeMem(a,this.rl(this.readMem(a)));break;case 23:this.a=this.rl(this.readMem(a));this.writeMem(a,this.a);break;case 24:this.b=this.rr(this.readMem(a));this.writeMem(a,this.b);break;case 25:this.c=this.rr(this.readMem(a));this.writeMem(a,this.c);break;case 26:this.d=this.rr(this.readMem(a)); -this.writeMem(a,this.d);break;case 27:this.e=this.rr(this.readMem(a));this.writeMem(a,this.e);break;case 28:this.h=this.rr(this.readMem(a));this.writeMem(a,this.h);break;case 29:this.l=this.rr(this.readMem(a));this.writeMem(a,this.l);break;case 30:this.writeMem(a,this.rr(this.readMem(a)));break;case 31:this.a=this.rr(this.readMem(a));this.writeMem(a,this.a);break;case 32:this.b=this.sla(this.readMem(a));this.writeMem(a,this.b);break;case 33:this.c=this.sla(this.readMem(a));this.writeMem(a,this.c); -break;case 34:this.d=this.sla(this.readMem(a));this.writeMem(a,this.d);break;case 35:this.e=this.sla(this.readMem(a));this.writeMem(a,this.e);break;case 36:this.h=this.sla(this.readMem(a));this.writeMem(a,this.h);break;case 37:this.l=this.sla(this.readMem(a));this.writeMem(a,this.l);break;case 38:this.writeMem(a,this.sla(this.readMem(a)));break;case 39:this.a=this.sla(this.readMem(a));this.writeMem(a,this.a);break;case 40:this.b=this.sra(this.readMem(a));this.writeMem(a,this.b);break;case 41:this.c= -this.sra(this.readMem(a));this.writeMem(a,this.c);break;case 42:this.d=this.sra(this.readMem(a));this.writeMem(a,this.d);break;case 43:this.e=this.sra(this.readMem(a));this.writeMem(a,this.e);break;case 44:this.h=this.sra(this.readMem(a));this.writeMem(a,this.h);break;case 45:this.l=this.sra(this.readMem(a));this.writeMem(a,this.l);break;case 46:this.writeMem(a,this.sra(this.readMem(a)));break;case 47:this.a=this.sra(this.readMem(a));this.writeMem(a,this.a);break;case 48:this.b=this.sll(this.readMem(a)); -this.writeMem(a,this.b);break;case 49:this.c=this.sll(this.readMem(a));this.writeMem(a,this.c);break;case 50:this.d=this.sll(this.readMem(a));this.writeMem(a,this.d);break;case 51:this.e=this.sll(this.readMem(a));this.writeMem(a,this.e);break;case 52:this.h=this.sll(this.readMem(a));this.writeMem(a,this.h);break;case 53:this.l=this.sll(this.readMem(a));this.writeMem(a,this.l);break;case 54:this.writeMem(a,this.sll(this.readMem(a)));break;case 55:this.a=this.sll(this.readMem(a));this.writeMem(a,this.a); -break;case 56:this.b=this.srl(this.readMem(a));this.writeMem(a,this.b);break;case 57:this.c=this.srl(this.readMem(a));this.writeMem(a,this.c);break;case 58:this.d=this.srl(this.readMem(a));this.writeMem(a,this.d);break;case 59:this.e=this.srl(this.readMem(a));this.writeMem(a,this.e);break;case 60:this.h=this.srl(this.readMem(a));this.writeMem(a,this.h);break;case 61:this.l=this.srl(this.readMem(a));this.writeMem(a,this.l);break;case 62:this.writeMem(a,this.srl(this.readMem(a)));break;case 63:this.a= -this.srl(this.readMem(a));this.writeMem(a,this.a);break;case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:this.bit(this.readMem(a)&BIT_0);break;case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:this.bit(this.readMem(a)&BIT_1);break;case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:this.bit(this.readMem(a)&BIT_2);break;case 88:case 89:case 90:case 91:case 92:case 93:case 94:case 95:this.bit(this.readMem(a)&BIT_3);break;case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:this.bit(this.readMem(a)& -BIT_4);break;case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:this.bit(this.readMem(a)&BIT_5);break;case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:this.bit(this.readMem(a)&BIT_6);break;case 120:case 121:case 122:case 123:case 124:case 125:case 126:case 127:this.bit(this.readMem(a)&BIT_7);break;case 128:case 129:case 130:case 131:case 132:case 133:case 134:case 135:this.writeMem(a,this.readMem(a)&~BIT_0);break;case 136:case 137:case 138:case 139:case 140:case 141:case 142:case 143:this.writeMem(a, -this.readMem(a)&~BIT_1);break;case 144:case 145:case 146:case 147:case 148:case 149:case 150:case 151:this.writeMem(a,this.readMem(a)&~BIT_2);break;case 152:case 153:case 154:case 155:case 156:case 157:case 158:case 159:this.writeMem(a,this.readMem(a)&~BIT_3);break;case 160:case 161:case 162:case 163:case 164:case 165:case 166:case 167:this.writeMem(a,this.readMem(a)&~BIT_4);break;case 168:case 169:case 170:case 171:case 172:case 173:case 174:case 175:this.writeMem(a,this.readMem(a)&~BIT_5);break; -case 176:case 177:case 178:case 179:case 180:case 181:case 182:case 183:this.writeMem(a,this.readMem(a)&~BIT_6);break;case 184:case 185:case 186:case 187:case 188:case 189:case 190:case 191:this.writeMem(a,this.readMem(a)&~BIT_7);break;case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:this.writeMem(a,this.readMem(a)|BIT_0);break;case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:this.writeMem(a,this.readMem(a)|BIT_1);break;case 208:case 209:case 210:case 211:case 212:case 213:case 214:case 215:this.writeMem(a, -this.readMem(a)|BIT_2);break;case 216:case 217:case 218:case 219:case 220:case 221:case 222:case 223:this.writeMem(a,this.readMem(a)|BIT_3);break;case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:this.writeMem(a,this.readMem(a)|BIT_4);break;case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:this.writeMem(a,this.readMem(a)|BIT_5);break;case 240:case 241:case 242:case 243:case 244:case 245:case 246:case 247:this.writeMem(a,this.readMem(a)|BIT_6);break;case 248:case 249:case 250:case 251:case 252:case 253:case 254:case 255:this.writeMem(a, -this.readMem(a)|BIT_7);break;default:JSSMS.Utils.console.log("Unimplemented DDCB/FDCB Opcode: "+JSSMS.Utils.toHex(b))}this.pc++},doED:function(a){var b=0,c=0;this.tstates-=OP_ED_STATES[a];REFRESH_EMULATION&&this.incR();switch(a){case 64:this.b=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.b];this.pc++;break;case 65:this.port.out(this.c,this.b);this.pc++;break;case 66:this.sbc16(this.getBC());this.pc++;break;case 67:this.writeMemWord(this.readMemWord(++this.pc),this.getBC());this.pc+= -2;break;case 68:case 76:case 84:case 92:case 100:case 108:case 116:case 124:b=this.a;this.a=0;this.sub_a(b);this.pc++;break;case 69:case 77:case 85:case 93:case 101:case 109:case 117:case 125:this.pc=this.readMemWord(this.sp);this.sp+=2;this.iff1=this.iff2;break;case 70:case 78:case 102:case 110:this.im=0;this.pc++;break;case 71:this.i=this.a;this.pc++;break;case 72:this.c=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.c];this.pc++;break;case 73:this.port.out(this.c,this.c);this.pc++; -break;case 74:this.adc16(this.getBC());this.pc++;break;case 75:this.setBC(this.readMemWord(this.readMemWord(++this.pc)));this.pc+=2;break;case 79:this.r=this.a;this.pc++;break;case 80:this.d=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.d];this.pc++;break;case 81:this.port.out(this.c,this.d);this.pc++;break;case 82:this.sbc16(this.getDE());this.pc++;break;case 83:this.writeMemWord(this.readMemWord(++this.pc),this.getDE());this.pc+=2;break;case 86:case 118:this.im=1;this.pc++;break; -case 87:this.a=this.i;this.f=this.f&F_CARRY|this.SZ_TABLE[this.a]|(this.iff2?F_PARITY:0);this.pc++;break;case 88:this.e=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.e];this.pc++;break;case 89:this.port.out(this.c,this.e);this.pc++;break;case 90:this.adc16(this.getDE());this.pc++;break;case 91:this.setDE(this.readMemWord(this.readMemWord(++this.pc)));this.pc+=2;break;case 95:this.a=REFRESH_EMULATION?this.r:JSSMS.Utils.rndInt(255);this.f=this.f&F_CARRY|this.SZ_TABLE[this.a]|(this.iff2? -F_PARITY:0);this.pc++;break;case 96:this.h=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.h];this.pc++;break;case 97:this.port.out(this.c,this.h);this.pc++;break;case 98:this.sbc16(this.getHL());this.pc++;break;case 99:this.writeMemWord(this.readMemWord(++this.pc),this.getHL());this.pc+=2;break;case 103:c=this.getHL();b=this.readMem(c);this.writeMem(c,b>>4|(this.a&15)<<4);this.a=this.a&240|b&15;this.f=this.f&F_CARRY|this.SZP_TABLE[this.a];this.pc++;break;case 104:this.l=this.port.in_(this.c); -this.f=this.f&F_CARRY|this.SZP_TABLE[this.l];this.pc++;break;case 105:this.port.out(this.c,this.l);this.pc++;break;case 106:this.adc16(this.getHL());this.pc++;break;case 107:this.setHL(this.readMemWord(this.readMemWord(++this.pc)));this.pc+=2;break;case 111:c=this.getHL();b=this.readMem(c);this.writeMem(c,(b&15)<<4|this.a&15);this.a=this.a&240|b>>4;this.f=this.f&F_CARRY|this.SZP_TABLE[this.a];this.pc++;break;case 113:this.port.out(this.c,0);this.pc++;break;case 114:this.sbc16(this.sp);this.pc++;break; -case 115:this.writeMemWord(this.readMemWord(++this.pc),this.sp);this.pc+=2;break;case 120:this.a=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.a];this.pc++;break;case 121:this.port.out(this.c,this.a);this.pc++;break;case 122:this.adc16(this.sp);this.pc++;break;case 123:this.sp=this.readMemWord(this.readMemWord(++this.pc));this.pc+=2;break;case 160:b=this.readMem(this.getHL());this.writeMem(this.getDE(),b);this.decBC();this.incDE();this.incHL();b=b+this.a&255;this.f=this.f&193|(this.getBC()? -F_PARITY:0)|b&8|(b&2?32:0);this.pc++;break;case 161:b=this.f&F_CARRY|F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.decBC();this.incHL();b|=0==this.getBC()?0:F_PARITY;this.f=this.f&248|b;this.pc++;break;case 162:b=this.port.in_(this.c);this.writeMem(this.getHL(),b);this.b=this.dec8(this.b);this.incHL();this.f=128==(b&128)?this.f|F_NEGATIVE:this.f&~F_NEGATIVE;this.pc++;break;case 163:b=this.readMem(this.getHL());this.port.out(this.c,b);this.b=this.dec8(this.b);this.incHL();255=b;b++)for(c=0;1>=c;c++)for(e=0;1>=e;e++)this.DAA_TABLE[b<<8|e<<9|c<<10|a]=this.getDAAResult(a,b|e<<1|c<<4);this.a=this.f=0},getDAAResult:function(a,b){this.a=a;this.f=b;var c=this.a,e=0,d=b&F_CARRY,g=d;if(0!=(b&F_HALFCARRY)||9<(c&15))e|=6;if(1==d||159> -1|(this.f&F_CARRY)<<7)&255;this.f=this.f&236|a},rla_a:function(){var a=this.a>>7;this.a=(this.a<<1|this.f&F_CARRY)&255;this.f=this.f&236|a},rlca_a:function(){var a=this.a>>7;this.a=this.a<<1&255|a;this.f=this.f&236|a},rrca_a:function(){var a=this.a&1;this.a=this.a>>1|a<<7;this.f=this.f&236|a},getBC:function(){return this.b<<8|this.c},getDE:function(){return this.d<<8|this.e},getHL:function(){return this.h<<8|this.l},getAF:function(){return this.a<<8|this.f},getIXHIXL:function(){return this.ixH<<8| -this.ixL},getIYHIYL:function(){return this.iyH<<8|this.iyL},setBC:function(a){this.b=a>>8;this.c=a&255},setDE:function(a){this.d=a>>8;this.e=a&255},setHL:function(a){this.h=a>>8;this.l=a&255},setAF:function(a){this.a=a>>8;this.f=a&255},setIXHIXL:function(a){this.ixH=a>>8;this.ixL=a&255},setIYHIYL:function(a){this.iyH=a>>8;this.iyL=a&255},incBC:function(){this.c=this.c+1&255;0==this.c&&(this.b=this.b+1&255)},incDE:function(){this.e=this.e+1&255;0==this.e&&(this.d=this.d+1&255)},incHL:function(){this.l= -this.l+1&255;0==this.l&&(this.h=this.h+1&255)},incIXHIXL:function(){this.ixL=this.ixL+1&255;0==this.ixL&&(this.ixH=this.ixH+1&255)},incIYHIYL:function(){this.iyL=this.iyL+1&255;0==this.iyL&&(this.iyH=this.iyH+1&255)},decBC:function(){this.c=this.c-1&255;255==this.c&&(this.b=this.b-1&255)},decDE:function(){this.e=this.e-1&255;255==this.e&&(this.d=this.d-1&255)},decHL:function(){this.l=this.l-1&255;255==this.l&&(this.h=this.h-1&255)},decIXHIXL:function(){this.ixL=this.ixL-1&255;255==this.ixL&&(this.ixH= -this.ixH-1&255)},decIYHIYL:function(){this.iyL=this.iyL-1&255;255==this.iyL&&(this.iyH=this.iyH-1&255)},inc8:function(a){a=a+1&255;this.f=this.f&F_CARRY|this.SZHV_INC_TABLE[a];return a},dec8:function(a){a=a-1&255;this.f=this.f&F_CARRY|this.SZHV_DEC_TABLE[a];return a},exAF:function(){var a=this.a;this.a=this.a2;this.a2=a;a=this.f;this.f=this.f2;this.f2=a},exBC:function(){var a=this.b;this.b=this.b2;this.b2=a;a=this.c;this.c=this.c2;this.c2=a},exDE:function(){var a=this.d;this.d=this.d2;this.d2=a;a= -this.e;this.e=this.e2;this.e2=a},exHL:function(){var a=this.h;this.h=this.h2;this.h2=a;a=this.l;this.l=this.l2;this.l2=a},add16:function(a,b){var c=a+b;this.f=this.f&196|(a^c^b)>>8&16|c>>16&1;return c&65535},adc16:function(a){var b=this.getHL(),c=b+a+(this.f&F_CARRY);this.f=(b^c^a)>>8&16|c>>16&1|c>>8&128|(0!=(c&65535)?0:64)|((a^b^32768)&(a^c)&32768)>>13;this.h=c>>8&255;this.l=c&255},sbc16:function(a){var b=this.getHL(),c=b-a-(this.f&F_CARRY);this.f=(b^c^a)>>8&16|2|c>>16&1|c>>8&128|(0!=(c&65535)?0: -64)|((a^b)&(b^c)&32768)>>13;this.h=c>>8&255;this.l=c&255},incR:function(){this.r=this.r&128|this.r+1&127},generateFlagTables:function(){var a,b,c,e,d,g,h;for(a=0;256>a;a++)b=0!=(a&128)?F_SIGN:0,c=0==a?F_ZERO:0,e=a&32,d=a&8,g=this.getParity(a)?F_PARITY:0,this.SZ_TABLE[a]=b|c|e|d,this.SZP_TABLE[a]=b|c|e|d|g,this.SZHV_INC_TABLE[a]=b|c|e|d,this.SZHV_INC_TABLE[a]|=128==a?F_OVERFLOW:0,this.SZHV_INC_TABLE[a]|=0==(a&15)?F_HALFCARRY:0,this.SZHV_DEC_TABLE[a]=b|c|e|d|F_NEGATIVE,this.SZHV_DEC_TABLE[a]|=127== -a?F_OVERFLOW:0,this.SZHV_DEC_TABLE[a]|=15==(a&15)?F_HALFCARRY:0,this.SZ_BIT_TABLE[a]=0!=a?a&128:F_ZERO|F_PARITY,this.SZ_BIT_TABLE[a]|=e|d|F_HALFCARRY;a=0;b=65536;c=0;e=65536;for(g=0;256>g;g++)for(h=0;256>h;h++)d=h-g,this.SZHVC_ADD_TABLE[a]=0!=h?0!=(h&128)?F_SIGN:0:F_ZERO,this.SZHVC_ADD_TABLE[a]|=h&(F_BIT5|F_BIT3),(h&15)<(g&15)&&(this.SZHVC_ADD_TABLE[a]|=F_HALFCARRY),h(g&15)&&(this.SZHVC_SUB_TABLE[c]|=F_HALFCARRY),h>g&&(this.SZHVC_SUB_TABLE[c]|=F_CARRY),0!=((d^g)&(g^h)&128)&&(this.SZHVC_SUB_TABLE[c]|= -F_OVERFLOW),c++,d=g-h-1,this.SZHVC_SUB_TABLE[e]=0!=h?0!=(h&128)?F_NEGATIVE|F_SIGN:F_NEGATIVE:F_NEGATIVE|F_ZERO,this.SZHVC_SUB_TABLE[e]|=h&(F_BIT5|F_BIT3),(h&15)>=(g&15)&&(this.SZHVC_SUB_TABLE[e]|=F_HALFCARRY),h>=g&&(this.SZHVC_SUB_TABLE[e]|=F_CARRY),0!=((d^g)&(g^h)&128)&&(this.SZHVC_SUB_TABLE[e]|=F_OVERFLOW),e++},getParity:function(a){var b=!0,c;for(c=0;8>c;c++)0!=(a&1<a;a++)this.memWriteMap.setUint8(a,0);else for(a= -0;8192>a;a++)this.memWriteMap[a]=0;if(SUPPORT_DATAVIEW)for(a=0;32768>a;a++)this.sram.setUint8(a,0);else for(a=0;32768>a;a++)this.sram[a]=0;this.useSRAM=!1;this.number_of_pages=2;for(a=0;4>a;a++)this.frameReg[a]=a%3},resetMemory:function(a){var b=0;a&&(this.rom=a);if(this.rom.length){this.number_of_pages=this.rom.length;this.romPageMask=this.number_of_pages-1;for(b=0;3>b;b++)this.frameReg[b]=b%this.number_of_pages;this.frameReg[3]=0;if(ENABLE_COMPILER){this.branches=Array(this.number_of_pages);for(b= -0;b=a)this.memWriteMap.setUint8(a&8191,b),65532==a?this.frameReg[3]=b:65533==a?this.frameReg[0]=b&this.romPageMask:65534==a?this.frameReg[1]=b&this.romPageMask:65535==a&&(this.frameReg[2]=b&this.romPageMask);else if(JSSMS.Utils.console.error(JSSMS.Utils.toHex(a)), -DEBUG)debugger}:function(a,b){if(65535>=a)this.memWriteMap[a&8191]=b,65532==a?this.frameReg[3]=b:65533==a?this.frameReg[0]=b&this.romPageMask:65534==a?this.frameReg[1]=b&this.romPageMask:65535==a&&(this.frameReg[2]=b&this.romPageMask);else if(JSSMS.Utils.console.error(JSSMS.Utils.toHex(a)),DEBUG)debugger}}(),writeMemWord:function(){return SUPPORT_DATAVIEW?function(a,b){if(65532>a)this.memWriteMap.setUint16(a&8191,b,LITTLE_ENDIAN);else if(65532==a)this.frameReg[3]=b&255,this.frameReg[0]=b>>8&this.romPageMask; -else if(65533==a)this.frameReg[0]=b&255&this.romPageMask,this.frameReg[1]=b>>8&this.romPageMask;else if(65534==a)this.frameReg[1]=b&255&this.romPageMask,this.frameReg[2]=b>>8&this.romPageMask;else if(JSSMS.Utils.console.error(JSSMS.Utils.toHex(a)),DEBUG)debugger}:function(a,b){if(65532>a)a&=8191,this.memWriteMap[a++]=b&255,this.memWriteMap[a]=b>>8;else if(65532==a)this.frameReg[3]=b&255,this.frameReg[0]=b>>8&this.romPageMask;else if(65533==a)this.frameReg[0]=b&255&this.romPageMask,this.frameReg[1]= -b>>8&this.romPageMask;else if(65534==a)this.frameReg[1]=b&255&this.romPageMask,this.frameReg[2]=b>>8&this.romPageMask;else if(JSSMS.Utils.console.error(JSSMS.Utils.toHex(a)),DEBUG)debugger}}(),readMem:function(){return SUPPORT_DATAVIEW?function(a){if(1024>a)return this.rom[0].getUint8(a);if(16384>a)return this.rom[this.frameReg[0]].getUint8(a);if(32768>a)return this.rom[this.frameReg[1]].getUint8(a-16384);if(49152>a)return 8==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram.getUint8(a-32768)):12== -(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram.getUint8(a-16384)):this.rom[this.frameReg[2]].getUint8(a-32768);if(57344>a)return this.memWriteMap.getUint8(a-49152);if(65532>a)return this.memWriteMap.getUint8(a-57344);if(65532==a)return this.frameReg[3];if(65533==a)return this.frameReg[0];if(65534==a)return this.frameReg[1];if(65535==a)return this.frameReg[2];JSSMS.Utils.console.error(JSSMS.Utils.toHex(a));if(DEBUG)debugger;return 0}:function(a){if(1024>a)return this.rom[0][a];if(16384>a)return this.rom[this.frameReg[0]][a]; -if(32768>a)return this.rom[this.frameReg[1]][a-16384];if(49152>a)return 8==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a-32768]):12==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a-16384]):this.rom[this.frameReg[2]][a-32768];if(57344>a)return this.memWriteMap[a-49152];if(65532>a)return this.memWriteMap[a-57344];if(65532==a)return this.frameReg[3];if(65533==a)return this.frameReg[0];if(65534==a)return this.frameReg[1];if(65535==a)return this.frameReg[2];JSSMS.Utils.console.error(JSSMS.Utils.toHex(a)); -if(DEBUG)debugger;return 0}}(),readMemWord:function(){return SUPPORT_DATAVIEW?function(a){if(1024>a)return this.rom[0].getUint16(a,LITTLE_ENDIAN);if(16384>a)return this.rom[this.frameReg[0]].getUint16(a,LITTLE_ENDIAN);if(32768>a)return this.rom[this.frameReg[1]].getUint16(a-16384,LITTLE_ENDIAN);if(49152>a)return 8==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a-32768]):12==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a-16384]):this.rom[this.frameReg[2]].getUint16(a-32768,LITTLE_ENDIAN);if(57344> -a)return this.memWriteMap.getUint16(a-49152,LITTLE_ENDIAN);if(65532>a)return this.memWriteMap.getUint16(a-57344,LITTLE_ENDIAN);if(65532==a)return this.frameReg[3];if(65533==a)return this.frameReg[0];if(65534==a)return this.frameReg[1];if(65535==a)return this.frameReg[2];JSSMS.Utils.console.error(JSSMS.Utils.toHex(a));if(DEBUG)debugger;return 0}:function(a){if(1024>a)return this.rom[0][a++]|this.rom[0][a]<<8;if(16384>a)return this.rom[this.frameReg[0]][a++]|this.rom[this.frameReg[0]][a]<<8;if(32768> -a)return this.rom[this.frameReg[1]][a++-16384]|this.rom[this.frameReg[1]][a-16384]<<8;if(49152>a)return 8==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a++-32768]|this.sram[a-32768]<<8):12==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a++-16384]|this.sram[a-16384]<<8):this.rom[this.frameReg[2]][a++-32768]|this.rom[this.frameReg[2]][a-32768]<<8;if(57344>a)return this.memWriteMap[a++-49152]|this.memWriteMap[a-49152]<<8;if(65532>a)return this.memWriteMap[a++-57344]|this.memWriteMap[a-57344]<< -8;if(65532==a)return this.frameReg[3];if(65533==a)return this.frameReg[0];if(65534==a)return this.frameReg[1];if(65535==a)return this.frameReg[2];JSSMS.Utils.console.error(JSSMS.Utils.toHex(a));if(DEBUG)debugger;return 0}}(),hasUsedSRAM:function(){return this.useSRAM},setSRAM:function(a){var b=a.length/PAGE_SIZE,c;for(c=0;c>16&65535; -b=a[1];this.iff1=0!=(b&1);this.iff2=0!=(b&2);this.halt=0!=(b&4);this.EI_inst=0!=(b&8);this.interruptLine=0!=(b&16);b=a[2];this.a=b&255;this.a2=b>>8&255;this.f=b>>16&255;this.f2=b>>24&255;b=a[3];this.setBC(b&65535);this.setDE(b>>16&65535);b=a[4];this.setHL(b&65535);this.r=b>>16&255;this.i=b>>24&255;b=a[5];this.setIXHIXL(b&65535);this.setIYHIYL(b>>16&65535);this.exBC();this.exDE();this.exHL();b=a[6];this.setBC(b&65535);this.setDE(b>>16&65535);b=a[7];this.setHL(b&65535);this.im=b>>16&255;this.interruptVector= +break;case 189:this.cp_a(this.l);break;case 190:this.cp_a(this.readMem(this.getHL()));break;case 191:this.cp_a(this.a);break;case 192:this.ret(0===(this.f&F_ZERO));break;case 193:this.setBC(this.readMemWord(this.sp));this.sp+=2;break;case 194:this.jp(0===(this.f&F_ZERO));break;case 195:this.pc=this.readMemWord(this.pc);break;case 196:this.call(0===(this.f&F_ZERO));break;case 197:this.push(this.getBC());break;case 198:this.add_a(this.readMem(this.pc++));break;case 199:this.push(this.pc);this.pc=0; +break;case 200:this.ret(0!==(this.f&F_ZERO));break;case 201:this.pc=this.readMemWord(this.sp);this.sp+=2;break;case 202:this.jp(0!==(this.f&F_ZERO));break;case 203:this.doCB(this.readMem(this.pc++));break;case 204:this.call(0!==(this.f&F_ZERO));break;case 205:this.push(this.pc+2);this.pc=this.readMemWord(this.pc);break;case 206:this.adc_a(this.readMem(this.pc++));break;case 207:this.push(this.pc);this.pc=8;break;case 208:this.ret(0===(this.f&F_CARRY));break;case 209:this.setDE(this.readMemWord(this.sp)); +this.sp+=2;break;case 210:this.jp(0===(this.f&F_CARRY));break;case 211:this.port.out(this.readMem(this.pc++),this.a);break;case 212:this.call(0===(this.f&F_CARRY));break;case 213:this.push(this.getDE());break;case 214:this.sub_a(this.readMem(this.pc++));break;case 215:this.push(this.pc);this.pc=16;break;case 216:this.ret(0!==(this.f&F_CARRY));break;case 217:this.exBC();this.exDE();this.exHL();break;case 218:this.jp(0!==(this.f&F_CARRY));break;case 219:this.a=this.port.in_(this.readMem(this.pc++)); +break;case 220:this.call(0!==(this.f&F_CARRY));break;case 221:this.doIndexOpIX(this.readMem(this.pc++));break;case 222:this.sbc_a(this.readMem(this.pc++));break;case 223:this.push(this.pc);this.pc=24;break;case 224:this.ret(0===(this.f&F_PARITY));break;case 225:this.setHL(this.readMemWord(this.sp));this.sp+=2;break;case 226:this.jp(0===(this.f&F_PARITY));break;case 227:a=this.getHL();this.setHL(this.readMemWord(this.sp));this.writeMemWord(this.sp,a);break;case 228:this.call(0===(this.f&F_PARITY)); +break;case 229:this.push(this.getHL());break;case 230:this.f=this.SZP_TABLE[this.a&=this.readMem(this.pc++)]|F_HALFCARRY;break;case 231:this.push(this.pc);this.pc=32;break;case 232:this.ret(0!==(this.f&F_PARITY));break;case 233:this.pc=this.getHL();break;case 234:this.jp(0!==(this.f&F_PARITY));break;case 235:a=this.d;this.d=this.h;this.h=a;a=this.e;this.e=this.l;this.l=a;break;case 236:this.call(0!==(this.f&F_PARITY));break;case 237:this.doED(this.readMem(this.pc));break;case 238:this.f=this.SZP_TABLE[this.a^= +this.readMem(this.pc++)];break;case 239:this.push(this.pc);this.pc=40;break;case 240:this.ret(0===(this.f&F_SIGN));break;case 241:this.setAF(this.readMemWord(this.sp));this.sp+=2;break;case 242:this.jp(0===(this.f&F_SIGN));break;case 243:this.iff1=this.iff2=!1;this.EI_inst=!0;break;case 244:this.call(0===(this.f&F_SIGN));break;case 245:this.push(this.getAF());break;case 246:this.f=this.SZP_TABLE[this.a|=this.readMem(this.pc++)];break;case 247:this.push(this.pc);this.pc=48;break;case 248:this.ret(0!== +(this.f&F_SIGN));break;case 249:this.sp=this.getHL();break;case 250:this.jp(0!==(this.f&F_SIGN));break;case 251:this.iff1=this.iff2=this.EI_inst=!0;break;case 252:this.call(0!==(this.f&F_SIGN));break;case 253:this.doIndexOpIY(this.readMem(this.pc++));break;case 254:this.cp_a(this.readMem(this.pc++));break;case 255:this.push(this.pc),this.pc=56}},getCycle:function(){return this.totalCycles-this.tstates},nmi:function(){this.iff2=this.iff1;this.iff1=!1;REFRESH_EMULATION&&this.incR();this.halt&&(this.pc++, +this.halt=!1);this.push(this.pc);this.pc=102;this.tstates-=11},interrupt:function(){!this.iff1||ACCURATE_INTERRUPT_EMULATION&&this.EI_inst||(this.halt&&(this.pc++,this.halt=!1),REFRESH_EMULATION&&this.incR(),this.interruptLine=this.iff1=this.iff2=!1,this.push(this.pc),0===this.im?(this.pc=0===this.interruptVector||255===this.interruptVector?56:this.interruptVector,this.tstates-=13):1==this.im?(this.pc=56,this.tstates-=13):(this.pc=this.readMemWord((this.i<<8)+this.interruptVector),this.tstates-=19))}, +jp:function(a){this.pc=a?this.readMemWord(this.pc):this.pc+2},jr:function(a){a?(this.pc+=this.signExtend(this.d_()+1),this.tstates-=5):this.pc++},signExtend:function(a){128<=a&&(a-=256);return a},call:function(a){a?(this.push(this.pc+2),this.pc=this.readMemWord(this.pc),this.tstates-=7):this.pc+=2},ret:function(a){a&&(this.pc=this.readMemWord(this.sp),this.sp+=2,this.tstates-=6)},push:function(a){this.sp-=2;this.writeMemWord(this.sp,a)},pushUint8:function(a,b){this.sp-=2;this.writeMemWord(this.sp, +a<<8|b)},incMem:function(a){this.writeMem(a,this.inc8(this.readMem(a)))},decMem:function(a){this.writeMem(a,this.dec8(this.readMem(a)))},ccf:function(){0!==(this.f&F_CARRY)?(this.f&=~F_CARRY,this.f|=F_HALFCARRY):(this.f|=F_CARRY,this.f&=~F_HALFCARRY);this.f&=~F_NEGATIVE},daa:function(){var a=this.DAA_TABLE[this.a|(this.f&F_CARRY)<<8|(this.f&F_NEGATIVE)<<8|(this.f&F_HALFCARRY)<<6];this.a=a&255;this.f=this.f&F_NEGATIVE|a>>8},doCB:function(a){this.tstates-=OP_CB_STATES[a];REFRESH_EMULATION&&this.incR(); +switch(a){case 0:this.b=this.rlc(this.b);break;case 1:this.c=this.rlc(this.c);break;case 2:this.d=this.rlc(this.d);break;case 3:this.e=this.rlc(this.e);break;case 4:this.h=this.rlc(this.h);break;case 5:this.l=this.rlc(this.l);break;case 6:this.writeMem(this.getHL(),this.rlc(this.readMem(this.getHL())));break;case 7:this.a=this.rlc(this.a);break;case 8:this.b=this.rrc(this.b);break;case 9:this.c=this.rrc(this.c);break;case 10:this.d=this.rrc(this.d);break;case 11:this.e=this.rrc(this.e);break;case 12:this.h= +this.rrc(this.h);break;case 13:this.l=this.rrc(this.l);break;case 14:this.writeMem(this.getHL(),this.rrc(this.readMem(this.getHL())));break;case 15:this.a=this.rrc(this.a);break;case 16:this.b=this.rl(this.b);break;case 17:this.c=this.rl(this.c);break;case 18:this.d=this.rl(this.d);break;case 19:this.e=this.rl(this.e);break;case 20:this.h=this.rl(this.h);break;case 21:this.l=this.rl(this.l);break;case 22:this.writeMem(this.getHL(),this.rl(this.readMem(this.getHL())));break;case 23:this.a=this.rl(this.a); +break;case 24:this.b=this.rr(this.b);break;case 25:this.c=this.rr(this.c);break;case 26:this.d=this.rr(this.d);break;case 27:this.e=this.rr(this.e);break;case 28:this.h=this.rr(this.h);break;case 29:this.l=this.rr(this.l);break;case 30:this.writeMem(this.getHL(),this.rr(this.readMem(this.getHL())));break;case 31:this.a=this.rr(this.a);break;case 32:this.b=this.sla(this.b);break;case 33:this.c=this.sla(this.c);break;case 34:this.d=this.sla(this.d);break;case 35:this.e=this.sla(this.e);break;case 36:this.h= +this.sla(this.h);break;case 37:this.l=this.sla(this.l);break;case 38:this.writeMem(this.getHL(),this.sla(this.readMem(this.getHL())));break;case 39:this.a=this.sla(this.a);break;case 40:this.b=this.sra(this.b);break;case 41:this.c=this.sra(this.c);break;case 42:this.d=this.sra(this.d);break;case 43:this.e=this.sra(this.e);break;case 44:this.h=this.sra(this.h);break;case 45:this.l=this.sra(this.l);break;case 46:this.writeMem(this.getHL(),this.sra(this.readMem(this.getHL())));break;case 47:this.a=this.sra(this.a); +break;case 48:this.b=this.sll(this.b);break;case 49:this.c=this.sll(this.c);break;case 50:this.d=this.sll(this.d);break;case 51:this.e=this.sll(this.e);break;case 52:this.h=this.sll(this.h);break;case 53:this.l=this.sll(this.l);break;case 54:this.writeMem(this.getHL(),this.sll(this.readMem(this.getHL())));break;case 55:this.a=this.sll(this.a);break;case 56:this.b=this.srl(this.b);break;case 57:this.c=this.srl(this.c);break;case 58:this.d=this.srl(this.d);break;case 59:this.e=this.srl(this.e);break; +case 60:this.h=this.srl(this.h);break;case 61:this.l=this.srl(this.l);break;case 62:this.writeMem(this.getHL(),this.srl(this.readMem(this.getHL())));break;case 63:this.a=this.srl(this.a);break;case 64:this.bit(this.b&BIT_0);break;case 65:this.bit(this.c&BIT_0);break;case 66:this.bit(this.d&BIT_0);break;case 67:this.bit(this.e&BIT_0);break;case 68:this.bit(this.h&BIT_0);break;case 69:this.bit(this.l&BIT_0);break;case 70:this.bit(this.readMem(this.getHL())&BIT_0);break;case 71:this.bit(this.a&BIT_0); +break;case 72:this.bit(this.b&BIT_1);break;case 73:this.bit(this.c&BIT_1);break;case 74:this.bit(this.d&BIT_1);break;case 75:this.bit(this.e&BIT_1);break;case 76:this.bit(this.h&BIT_1);break;case 77:this.bit(this.l&BIT_1);break;case 78:this.bit(this.readMem(this.getHL())&BIT_1);break;case 79:this.bit(this.a&BIT_1);break;case 80:this.bit(this.b&BIT_2);break;case 81:this.bit(this.c&BIT_2);break;case 82:this.bit(this.d&BIT_2);break;case 83:this.bit(this.e&BIT_2);break;case 84:this.bit(this.h&BIT_2); +break;case 85:this.bit(this.l&BIT_2);break;case 86:this.bit(this.readMem(this.getHL())&BIT_2);break;case 87:this.bit(this.a&BIT_2);break;case 88:this.bit(this.b&BIT_3);break;case 89:this.bit(this.c&BIT_3);break;case 90:this.bit(this.d&BIT_3);break;case 91:this.bit(this.e&BIT_3);break;case 92:this.bit(this.h&BIT_3);break;case 93:this.bit(this.l&BIT_3);break;case 94:this.bit(this.readMem(this.getHL())&BIT_3);break;case 95:this.bit(this.a&BIT_3);break;case 96:this.bit(this.b&BIT_4);break;case 97:this.bit(this.c& +BIT_4);break;case 98:this.bit(this.d&BIT_4);break;case 99:this.bit(this.e&BIT_4);break;case 100:this.bit(this.h&BIT_4);break;case 101:this.bit(this.l&BIT_4);break;case 102:this.bit(this.readMem(this.getHL())&BIT_4);break;case 103:this.bit(this.a&BIT_4);break;case 104:this.bit(this.b&BIT_5);break;case 105:this.bit(this.c&BIT_5);break;case 106:this.bit(this.d&BIT_5);break;case 107:this.bit(this.e&BIT_5);break;case 108:this.bit(this.h&BIT_5);break;case 109:this.bit(this.l&BIT_5);break;case 110:this.bit(this.readMem(this.getHL())& +BIT_5);break;case 111:this.bit(this.a&BIT_5);break;case 112:this.bit(this.b&BIT_6);break;case 113:this.bit(this.c&BIT_6);break;case 114:this.bit(this.d&BIT_6);break;case 115:this.bit(this.e&BIT_6);break;case 116:this.bit(this.h&BIT_6);break;case 117:this.bit(this.l&BIT_6);break;case 118:this.bit(this.readMem(this.getHL())&BIT_6);break;case 119:this.bit(this.a&BIT_6);break;case 120:this.bit(this.b&BIT_7);break;case 121:this.bit(this.c&BIT_7);break;case 122:this.bit(this.d&BIT_7);break;case 123:this.bit(this.e& +BIT_7);break;case 124:this.bit(this.h&BIT_7);break;case 125:this.bit(this.l&BIT_7);break;case 126:this.bit(this.readMem(this.getHL())&BIT_7);break;case 127:this.bit(this.a&BIT_7);break;case 128:this.b&=~BIT_0;break;case 129:this.c&=~BIT_0;break;case 130:this.d&=~BIT_0;break;case 131:this.e&=~BIT_0;break;case 132:this.h&=~BIT_0;break;case 133:this.l&=~BIT_0;break;case 134:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_0);break;case 135:this.a&=~BIT_0;break;case 136:this.b&=~BIT_1;break; +case 137:this.c&=~BIT_1;break;case 138:this.d&=~BIT_1;break;case 139:this.e&=~BIT_1;break;case 140:this.h&=~BIT_1;break;case 141:this.l&=~BIT_1;break;case 142:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_1);break;case 143:this.a&=~BIT_1;break;case 144:this.b&=~BIT_2;break;case 145:this.c&=~BIT_2;break;case 146:this.d&=~BIT_2;break;case 147:this.e&=~BIT_2;break;case 148:this.h&=~BIT_2;break;case 149:this.l&=~BIT_2;break;case 150:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_2); +break;case 151:this.a&=~BIT_2;break;case 152:this.b&=~BIT_3;break;case 153:this.c&=~BIT_3;break;case 154:this.d&=~BIT_3;break;case 155:this.e&=~BIT_3;break;case 156:this.h&=~BIT_3;break;case 157:this.l&=~BIT_3;break;case 158:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_3);break;case 159:this.a&=~BIT_3;break;case 160:this.b&=~BIT_4;break;case 161:this.c&=~BIT_4;break;case 162:this.d&=~BIT_4;break;case 163:this.e&=~BIT_4;break;case 164:this.h&=~BIT_4;break;case 165:this.l&=~BIT_4;break; +case 166:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_4);break;case 167:this.a&=~BIT_4;break;case 168:this.b&=~BIT_5;break;case 169:this.c&=~BIT_5;break;case 170:this.d&=~BIT_5;break;case 171:this.e&=~BIT_5;break;case 172:this.h&=~BIT_5;break;case 173:this.l&=~BIT_5;break;case 174:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_5);break;case 175:this.a&=~BIT_5;break;case 176:this.b&=~BIT_6;break;case 177:this.c&=~BIT_6;break;case 178:this.d&=~BIT_6;break;case 179:this.e&= +~BIT_6;break;case 180:this.h&=~BIT_6;break;case 181:this.l&=~BIT_6;break;case 182:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_6);break;case 183:this.a&=~BIT_6;break;case 184:this.b&=~BIT_7;break;case 185:this.c&=~BIT_7;break;case 186:this.d&=~BIT_7;break;case 187:this.e&=~BIT_7;break;case 188:this.h&=~BIT_7;break;case 189:this.l&=~BIT_7;break;case 190:this.writeMem(this.getHL(),this.readMem(this.getHL())&~BIT_7);break;case 191:this.a&=~BIT_7;break;case 192:this.b|=BIT_0;break;case 193:this.c|= +BIT_0;break;case 194:this.d|=BIT_0;break;case 195:this.e|=BIT_0;break;case 196:this.h|=BIT_0;break;case 197:this.l|=BIT_0;break;case 198:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_0);break;case 199:this.a|=BIT_0;break;case 200:this.b|=BIT_1;break;case 201:this.c|=BIT_1;break;case 202:this.d|=BIT_1;break;case 203:this.e|=BIT_1;break;case 204:this.h|=BIT_1;break;case 205:this.l|=BIT_1;break;case 206:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_1);break;case 207:this.a|=BIT_1; +break;case 208:this.b|=BIT_2;break;case 209:this.c|=BIT_2;break;case 210:this.d|=BIT_2;break;case 211:this.e|=BIT_2;break;case 212:this.h|=BIT_2;break;case 213:this.l|=BIT_2;break;case 214:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_2);break;case 215:this.a|=BIT_2;break;case 216:this.b|=BIT_3;break;case 217:this.c|=BIT_3;break;case 218:this.d|=BIT_3;break;case 219:this.e|=BIT_3;break;case 220:this.h|=BIT_3;break;case 221:this.l|=BIT_3;break;case 222:this.writeMem(this.getHL(),this.readMem(this.getHL())| +BIT_3);break;case 223:this.a|=BIT_3;break;case 224:this.b|=BIT_4;break;case 225:this.c|=BIT_4;break;case 226:this.d|=BIT_4;break;case 227:this.e|=BIT_4;break;case 228:this.h|=BIT_4;break;case 229:this.l|=BIT_4;break;case 230:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_4);break;case 231:this.a|=BIT_4;break;case 232:this.b|=BIT_5;break;case 233:this.c|=BIT_5;break;case 234:this.d|=BIT_5;break;case 235:this.e|=BIT_5;break;case 236:this.h|=BIT_5;break;case 237:this.l|=BIT_5;break;case 238:this.writeMem(this.getHL(), +this.readMem(this.getHL())|BIT_5);break;case 239:this.a|=BIT_5;break;case 240:this.b|=BIT_6;break;case 241:this.c|=BIT_6;break;case 242:this.d|=BIT_6;break;case 243:this.e|=BIT_6;break;case 244:this.h|=BIT_6;break;case 245:this.l|=BIT_6;break;case 246:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_6);break;case 247:this.a|=BIT_6;break;case 248:this.b|=BIT_7;break;case 249:this.c|=BIT_7;break;case 250:this.d|=BIT_7;break;case 251:this.e|=BIT_7;break;case 252:this.h|=BIT_7;break;case 253:this.l|= +BIT_7;break;case 254:this.writeMem(this.getHL(),this.readMem(this.getHL())|BIT_7);break;case 255:this.a|=BIT_7;break;default:JSSMS.Utils.console.log("Unimplemented CB Opcode: "+JSSMS.Utils.toHex(a))}},rlc:function(a){var b=(a&128)>>7;a=(a<<1|a>>7)&255;this.f=b|this.SZP_TABLE[a];return a},rrc:function(a){var b=a&1;a=(a>>1|a<<7)&255;this.f=b|this.SZP_TABLE[a];return a},rl:function(a){var b=(a&128)>>7;a=(a<<1|this.f&F_CARRY)&255;this.f=b|this.SZP_TABLE[a];return a},rr:function(a){var b=a&1;a=(a>>1|this.f<< +7)&255;this.f=b|this.SZP_TABLE[a];return a},sla:function(a){var b=(a&128)>>7;a=a<<1&255;this.f=b|this.SZP_TABLE[a];return a},sll:function(a){var b=(a&128)>>7;a=(a<<1|1)&255;this.f=b|this.SZP_TABLE[a];return a},sra:function(a){var b=a&1;a=a>>1|a&128;this.f=b|this.SZP_TABLE[a];return a},srl:function(a){var b=a&1;a=a>>1&255;this.f=b|this.SZP_TABLE[a];return a},bit:function(a){this.f=this.f&F_CARRY|this.SZ_BIT_TABLE[a]},doIndexOpIX:function(a){var b=0;this.tstates-=OP_DD_STATES[a];REFRESH_EMULATION&& +this.incR();switch(a){case 9:this.setIXHIXL(this.add16(this.getIXHIXL(),this.getBC()));break;case 25:this.setIXHIXL(this.add16(this.getIXHIXL(),this.getDE()));break;case 33:this.setIXHIXL(this.readMemWord(this.pc++));this.pc++;break;case 34:this.writeMemWord(this.readMemWord(this.pc++),this.getIXHIXL());this.pc++;break;case 35:this.incIXHIXL();break;case 36:this.ixH=this.inc8(this.ixH);break;case 37:this.ixH=this.dec8(this.ixH);break;case 38:this.ixH=this.readMem(this.pc++);break;case 41:this.setIXHIXL(this.add16(this.getIXHIXL(), +this.getIXHIXL()));break;case 42:this.setIXHIXL(this.readMemWord(this.readMemWord(this.pc++)));this.pc++;break;case 43:this.decIXHIXL();break;case 44:this.ixL=this.inc8(this.ixL);break;case 45:this.ixL=this.dec8(this.ixL);break;case 46:this.ixL=this.readMem(this.pc++);break;case 52:this.incMem(this.getIXHIXL()+this.d_());this.pc++;break;case 53:this.decMem(this.getIXHIXL()+this.d_());this.pc++;break;case 54:this.writeMem(this.getIXHIXL()+this.d_(),this.readMem(++this.pc));this.pc++;break;case 57:this.setIXHIXL(this.add16(this.getIXHIXL(), +this.sp));break;case 68:this.b=this.ixH;break;case 69:this.b=this.ixL;break;case 70:this.b=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 76:this.c=this.ixH;break;case 77:this.c=this.ixL;break;case 78:this.c=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 84:this.d=this.ixH;break;case 85:this.d=this.ixL;break;case 86:this.d=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 92:this.e=this.ixH;break;case 93:this.e=this.ixL;break;case 94:this.e=this.readMem(this.getIXHIXL()+ +this.d_());this.pc++;break;case 96:this.ixH=this.b;break;case 97:this.ixH=this.c;break;case 98:this.ixH=this.d;break;case 99:this.ixH=this.e;break;case 100:break;case 101:this.ixH=this.ixL;break;case 102:this.h=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 103:this.ixH=this.a;break;case 104:this.ixL=this.b;break;case 105:this.ixL=this.c;break;case 106:this.ixL=this.d;break;case 107:this.ixL=this.e;break;case 108:this.ixL=this.ixH;break;case 109:break;case 110:this.l=this.readMem(this.getIXHIXL()+ +this.d_());this.pc++;break;case 111:this.ixL=this.a;break;case 112:this.writeMem(this.getIXHIXL()+this.d_(),this.b);this.pc++;break;case 113:this.writeMem(this.getIXHIXL()+this.d_(),this.c);this.pc++;break;case 114:this.writeMem(this.getIXHIXL()+this.d_(),this.d);this.pc++;break;case 115:this.writeMem(this.getIXHIXL()+this.d_(),this.e);this.pc++;break;case 116:this.writeMem(this.getIXHIXL()+this.d_(),this.h);this.pc++;break;case 117:this.writeMem(this.getIXHIXL()+this.d_(),this.l);this.pc++;break; +case 119:this.writeMem(this.getIXHIXL()+this.d_(),this.a);this.pc++;break;case 124:this.a=this.ixH;break;case 125:this.a=this.ixL;break;case 126:this.a=this.readMem(this.getIXHIXL()+this.d_());this.pc++;break;case 132:this.add_a(this.ixH);break;case 133:this.add_a(this.ixL);break;case 134:this.add_a(this.readMem(this.getIXHIXL()+this.d_()));this.pc++;break;case 140:this.adc_a(this.ixH);break;case 141:this.adc_a(this.ixL);break;case 142:this.adc_a(this.readMem(this.getIXHIXL()+this.d_()));this.pc++; +break;case 148:this.sub_a(this.ixH);break;case 149:this.sub_a(this.ixL);break;case 150:this.sub_a(this.readMem(this.getIXHIXL()+this.d_()));this.pc++;break;case 156:this.sbc_a(this.ixH);break;case 157:this.sbc_a(this.ixL);break;case 158:this.sbc_a(this.readMem(this.getIXHIXL()+this.d_()));this.pc++;break;case 164:this.f=this.SZP_TABLE[this.a&=this.ixH]|F_HALFCARRY;break;case 165:this.f=this.SZP_TABLE[this.a&=this.ixL]|F_HALFCARRY;break;case 166:this.f=this.SZP_TABLE[this.a&=this.readMem(this.getIXHIXL()+ +this.d_())]|F_HALFCARRY;this.pc++;break;case 172:this.f=this.SZP_TABLE[this.a^=this.ixH];break;case 173:this.f=this.SZP_TABLE[this.a^=this.ixL];break;case 174:this.f=this.SZP_TABLE[this.a^=this.readMem(this.getIXHIXL()+this.d_())];this.pc++;break;case 180:this.f=this.SZP_TABLE[this.a|=this.ixH];break;case 181:this.f=this.SZP_TABLE[this.a|=this.ixL];break;case 182:this.f=this.SZP_TABLE[this.a|=this.readMem(this.getIXHIXL()+this.d_())];this.pc++;break;case 188:this.cp_a(this.ixH);break;case 189:this.cp_a(this.ixL); +break;case 190:this.cp_a(this.readMem(this.getIXHIXL()+this.d_()));this.pc++;break;case 203:this.doIndexCB(this.getIXHIXL());break;case 225:this.setIXHIXL(this.readMemWord(this.sp));this.sp+=2;break;case 227:b=this.getIXHIXL();this.setIXHIXL(this.readMemWord(this.sp));this.writeMemWord(this.sp,b);break;case 229:this.push(this.getIXHIXL());break;case 233:this.pc=this.getIXHIXL();break;case 249:this.sp=this.getIXHIXL();break;default:JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: "+JSSMS.Utils.toHex(a)), +this.pc--}},doIndexOpIY:function(a){this.tstates-=OP_DD_STATES[a];REFRESH_EMULATION&&this.incR();switch(a){case 9:this.setIYHIYL(this.add16(this.getIYHIYL(),this.getBC()));break;case 25:this.setIYHIYL(this.add16(this.getIYHIYL(),this.getDE()));break;case 33:this.setIYHIYL(this.readMemWord(this.pc++));this.pc++;break;case 34:this.writeMemWord(this.readMemWord(this.pc++),this.getIYHIYL());this.pc++;break;case 35:this.incIYHIYL();break;case 36:this.iyH=this.inc8(this.iyH);break;case 37:this.iyH=this.dec8(this.iyH); +break;case 38:this.iyH=this.readMem(this.pc++);break;case 41:this.setIYHIYL(this.add16(this.getIYHIYL(),this.getIYHIYL()));break;case 42:this.setIYHIYL(this.readMemWord(this.readMemWord(this.pc++)));this.pc++;break;case 43:this.decIYHIYL();break;case 44:this.iyL=this.inc8(this.iyL);break;case 45:this.iyL=this.dec8(this.iyL);break;case 46:this.iyL=this.readMem(this.pc++);break;case 52:this.incMem(this.getIYHIYL()+this.d_());this.pc++;break;case 53:this.decMem(this.getIYHIYL()+this.d_());this.pc++; +break;case 54:this.writeMem(this.getIYHIYL()+this.d_(),this.readMem(++this.pc));this.pc++;break;case 57:this.setIYHIYL(this.add16(this.getIYHIYL(),this.sp));break;case 68:this.b=this.iyH;break;case 69:this.b=this.iyL;break;case 70:this.b=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 76:this.c=this.iyH;break;case 77:this.c=this.iyL;break;case 78:this.c=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 84:this.d=this.iyH;break;case 85:this.d=this.iyL;break;case 86:this.d= +this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 92:this.e=this.iyH;break;case 93:this.e=this.iyL;break;case 94:this.e=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 96:this.iyH=this.b;break;case 97:this.iyH=this.c;break;case 98:this.iyH=this.d;break;case 99:this.iyH=this.e;break;case 100:break;case 101:this.iyH=this.iyL;break;case 102:this.h=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 103:this.iyH=this.a;break;case 104:this.iyL=this.b;break;case 105:this.iyL= +this.c;break;case 106:this.iyL=this.d;break;case 107:this.iyL=this.e;break;case 108:this.iyL=this.iyH;break;case 109:break;case 110:this.l=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 111:this.iyL=this.a;break;case 112:this.writeMem(this.getIYHIYL()+this.d_(),this.b);this.pc++;break;case 113:this.writeMem(this.getIYHIYL()+this.d_(),this.c);this.pc++;break;case 114:this.writeMem(this.getIYHIYL()+this.d_(),this.d);this.pc++;break;case 115:this.writeMem(this.getIYHIYL()+this.d_(),this.e); +this.pc++;break;case 116:this.writeMem(this.getIYHIYL()+this.d_(),this.h);this.pc++;break;case 117:this.writeMem(this.getIYHIYL()+this.d_(),this.l);this.pc++;break;case 119:this.writeMem(this.getIYHIYL()+this.d_(),this.a);this.pc++;break;case 124:this.a=this.iyH;break;case 125:this.a=this.iyL;break;case 126:this.a=this.readMem(this.getIYHIYL()+this.d_());this.pc++;break;case 132:this.add_a(this.iyH);break;case 133:this.add_a(this.iyL);break;case 134:this.add_a(this.readMem(this.getIYHIYL()+this.d_())); +this.pc++;break;case 140:this.adc_a(this.iyH);break;case 141:this.adc_a(this.iyL);break;case 142:this.adc_a(this.readMem(this.getIYHIYL()+this.d_()));this.pc++;break;case 148:this.sub_a(this.iyH);break;case 149:this.sub_a(this.iyL);break;case 150:this.sub_a(this.readMem(this.getIYHIYL()+this.d_()));this.pc++;break;case 156:this.sbc_a(this.iyH);break;case 157:this.sbc_a(this.iyL);break;case 158:this.sbc_a(this.readMem(this.getIYHIYL()+this.d_()));this.pc++;break;case 164:this.f=this.SZP_TABLE[this.a&= +this.iyH]|F_HALFCARRY;break;case 165:this.f=this.SZP_TABLE[this.a&=this.iyL]|F_HALFCARRY;break;case 166:this.f=this.SZP_TABLE[this.a&=this.readMem(this.getIYHIYL()+this.d_())]|F_HALFCARRY;this.pc++;break;case 172:this.f=this.SZP_TABLE[this.a^=this.iyH];break;case 173:this.f=this.SZP_TABLE[this.a^=this.iyL];break;case 174:this.f=this.SZP_TABLE[this.a^=this.readMem(this.getIYHIYL()+this.d_())];this.pc++;break;case 180:this.f=this.SZP_TABLE[this.a|=this.iyH];break;case 181:this.f=this.SZP_TABLE[this.a|= +this.iyL];break;case 182:this.f=this.SZP_TABLE[this.a|=this.readMem(this.getIYHIYL()+this.d_())];this.pc++;break;case 188:this.cp_a(this.iyH);break;case 189:this.cp_a(this.iyL);break;case 190:this.cp_a(this.readMem(this.getIYHIYL()+this.d_()));this.pc++;break;case 203:this.doIndexCB(this.getIYHIYL());break;case 225:this.setIYHIYL(this.readMemWord(this.sp));this.sp+=2;break;case 227:a=this.getIYHIYL();this.setIYHIYL(this.readMemWord(this.sp));this.writeMemWord(this.sp,a);break;case 229:this.push(this.getIYHIYL()); +break;case 233:this.pc=this.getIYHIYL();break;case 249:this.sp=this.getIYHIYL();break;default:JSSMS.Utils.console.log("Unimplemented DD/FD Opcode: "+JSSMS.Utils.toHex(a)),this.pc--}},doIndexCB:function(a){a=a+this.readMem(this.pc)&65535;var b=this.readMem(++this.pc);this.tstates-=OP_INDEX_CB_STATES[b];switch(b){case 0:this.b=this.rlc(this.readMem(a));this.writeMem(a,this.b);break;case 1:this.c=this.rlc(this.readMem(a));this.writeMem(a,this.c);break;case 2:this.d=this.rlc(this.readMem(a));this.writeMem(a, +this.d);break;case 3:this.e=this.rlc(this.readMem(a));this.writeMem(a,this.e);break;case 4:this.h=this.rlc(this.readMem(a));this.writeMem(a,this.h);break;case 5:this.l=this.rlc(this.readMem(a));this.writeMem(a,this.l);break;case 6:this.writeMem(a,this.rlc(this.readMem(a)));break;case 7:this.a=this.rlc(this.readMem(a));this.writeMem(a,this.a);break;case 8:this.b=this.rrc(this.readMem(a));this.writeMem(a,this.b);break;case 9:this.c=this.rrc(this.readMem(a));this.writeMem(a,this.c);break;case 10:this.d= +this.rrc(this.readMem(a));this.writeMem(a,this.d);break;case 11:this.e=this.rrc(this.readMem(a));this.writeMem(a,this.e);break;case 12:this.h=this.rrc(this.readMem(a));this.writeMem(a,this.h);break;case 13:this.l=this.rrc(this.readMem(a));this.writeMem(a,this.l);break;case 14:this.writeMem(a,this.rrc(this.readMem(a)));break;case 15:this.a=this.rrc(this.readMem(a));this.writeMem(a,this.a);break;case 16:this.b=this.rl(this.readMem(a));this.writeMem(a,this.b);break;case 17:this.c=this.rl(this.readMem(a)); +this.writeMem(a,this.c);break;case 18:this.d=this.rl(this.readMem(a));this.writeMem(a,this.d);break;case 19:this.e=this.rl(this.readMem(a));this.writeMem(a,this.e);break;case 20:this.h=this.rl(this.readMem(a));this.writeMem(a,this.h);break;case 21:this.l=this.rl(this.readMem(a));this.writeMem(a,this.l);break;case 22:this.writeMem(a,this.rl(this.readMem(a)));break;case 23:this.a=this.rl(this.readMem(a));this.writeMem(a,this.a);break;case 24:this.b=this.rr(this.readMem(a));this.writeMem(a,this.b);break; +case 25:this.c=this.rr(this.readMem(a));this.writeMem(a,this.c);break;case 26:this.d=this.rr(this.readMem(a));this.writeMem(a,this.d);break;case 27:this.e=this.rr(this.readMem(a));this.writeMem(a,this.e);break;case 28:this.h=this.rr(this.readMem(a));this.writeMem(a,this.h);break;case 29:this.l=this.rr(this.readMem(a));this.writeMem(a,this.l);break;case 30:this.writeMem(a,this.rr(this.readMem(a)));break;case 31:this.a=this.rr(this.readMem(a));this.writeMem(a,this.a);break;case 32:this.b=this.sla(this.readMem(a)); +this.writeMem(a,this.b);break;case 33:this.c=this.sla(this.readMem(a));this.writeMem(a,this.c);break;case 34:this.d=this.sla(this.readMem(a));this.writeMem(a,this.d);break;case 35:this.e=this.sla(this.readMem(a));this.writeMem(a,this.e);break;case 36:this.h=this.sla(this.readMem(a));this.writeMem(a,this.h);break;case 37:this.l=this.sla(this.readMem(a));this.writeMem(a,this.l);break;case 38:this.writeMem(a,this.sla(this.readMem(a)));break;case 39:this.a=this.sla(this.readMem(a));this.writeMem(a,this.a); +break;case 40:this.b=this.sra(this.readMem(a));this.writeMem(a,this.b);break;case 41:this.c=this.sra(this.readMem(a));this.writeMem(a,this.c);break;case 42:this.d=this.sra(this.readMem(a));this.writeMem(a,this.d);break;case 43:this.e=this.sra(this.readMem(a));this.writeMem(a,this.e);break;case 44:this.h=this.sra(this.readMem(a));this.writeMem(a,this.h);break;case 45:this.l=this.sra(this.readMem(a));this.writeMem(a,this.l);break;case 46:this.writeMem(a,this.sra(this.readMem(a)));break;case 47:this.a= +this.sra(this.readMem(a));this.writeMem(a,this.a);break;case 48:this.b=this.sll(this.readMem(a));this.writeMem(a,this.b);break;case 49:this.c=this.sll(this.readMem(a));this.writeMem(a,this.c);break;case 50:this.d=this.sll(this.readMem(a));this.writeMem(a,this.d);break;case 51:this.e=this.sll(this.readMem(a));this.writeMem(a,this.e);break;case 52:this.h=this.sll(this.readMem(a));this.writeMem(a,this.h);break;case 53:this.l=this.sll(this.readMem(a));this.writeMem(a,this.l);break;case 54:this.writeMem(a, +this.sll(this.readMem(a)));break;case 55:this.a=this.sll(this.readMem(a));this.writeMem(a,this.a);break;case 56:this.b=this.srl(this.readMem(a));this.writeMem(a,this.b);break;case 57:this.c=this.srl(this.readMem(a));this.writeMem(a,this.c);break;case 58:this.d=this.srl(this.readMem(a));this.writeMem(a,this.d);break;case 59:this.e=this.srl(this.readMem(a));this.writeMem(a,this.e);break;case 60:this.h=this.srl(this.readMem(a));this.writeMem(a,this.h);break;case 61:this.l=this.srl(this.readMem(a));this.writeMem(a, +this.l);break;case 62:this.writeMem(a,this.srl(this.readMem(a)));break;case 63:this.a=this.srl(this.readMem(a));this.writeMem(a,this.a);break;case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:this.bit(this.readMem(a)&BIT_0);break;case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:this.bit(this.readMem(a)&BIT_1);break;case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:this.bit(this.readMem(a)&BIT_2);break;case 88:case 89:case 90:case 91:case 92:case 93:case 94:case 95:this.bit(this.readMem(a)& +BIT_3);break;case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:this.bit(this.readMem(a)&BIT_4);break;case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:this.bit(this.readMem(a)&BIT_5);break;case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:this.bit(this.readMem(a)&BIT_6);break;case 120:case 121:case 122:case 123:case 124:case 125:case 126:case 127:this.bit(this.readMem(a)&BIT_7);break;case 128:case 129:case 130:case 131:case 132:case 133:case 134:case 135:this.writeMem(a, +this.readMem(a)&~BIT_0);break;case 136:case 137:case 138:case 139:case 140:case 141:case 142:case 143:this.writeMem(a,this.readMem(a)&~BIT_1);break;case 144:case 145:case 146:case 147:case 148:case 149:case 150:case 151:this.writeMem(a,this.readMem(a)&~BIT_2);break;case 152:case 153:case 154:case 155:case 156:case 157:case 158:case 159:this.writeMem(a,this.readMem(a)&~BIT_3);break;case 160:case 161:case 162:case 163:case 164:case 165:case 166:case 167:this.writeMem(a,this.readMem(a)&~BIT_4);break; +case 168:case 169:case 170:case 171:case 172:case 173:case 174:case 175:this.writeMem(a,this.readMem(a)&~BIT_5);break;case 176:case 177:case 178:case 179:case 180:case 181:case 182:case 183:this.writeMem(a,this.readMem(a)&~BIT_6);break;case 184:case 185:case 186:case 187:case 188:case 189:case 190:case 191:this.writeMem(a,this.readMem(a)&~BIT_7);break;case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:this.writeMem(a,this.readMem(a)|BIT_0);break;case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:this.writeMem(a, +this.readMem(a)|BIT_1);break;case 208:case 209:case 210:case 211:case 212:case 213:case 214:case 215:this.writeMem(a,this.readMem(a)|BIT_2);break;case 216:case 217:case 218:case 219:case 220:case 221:case 222:case 223:this.writeMem(a,this.readMem(a)|BIT_3);break;case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:this.writeMem(a,this.readMem(a)|BIT_4);break;case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:this.writeMem(a,this.readMem(a)|BIT_5);break;case 240:case 241:case 242:case 243:case 244:case 245:case 246:case 247:this.writeMem(a, +this.readMem(a)|BIT_6);break;case 248:case 249:case 250:case 251:case 252:case 253:case 254:case 255:this.writeMem(a,this.readMem(a)|BIT_7);break;default:JSSMS.Utils.console.log("Unimplemented DDCB/FDCB Opcode: "+JSSMS.Utils.toHex(b))}this.pc++},doED:function(a){var b=0,c=0;this.tstates-=OP_ED_STATES[a];REFRESH_EMULATION&&this.incR();switch(a){case 64:this.b=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.b];this.pc++;break;case 65:this.port.out(this.c,this.b);this.pc++;break;case 66:this.sbc16(this.getBC()); +this.pc++;break;case 67:this.writeMemWord(this.readMemWord(++this.pc),this.getBC());this.pc+=2;break;case 68:case 76:case 84:case 92:case 100:case 108:case 116:case 124:b=this.a;this.a=0;this.sub_a(b);this.pc++;break;case 69:case 77:case 85:case 93:case 101:case 109:case 117:case 125:this.pc=this.readMemWord(this.sp);this.sp+=2;this.iff1=this.iff2;break;case 70:case 78:case 102:case 110:this.im=0;this.pc++;break;case 71:this.i=this.a;this.pc++;break;case 72:this.c=this.port.in_(this.c);this.f=this.f& +F_CARRY|this.SZP_TABLE[this.c];this.pc++;break;case 73:this.port.out(this.c,this.c);this.pc++;break;case 74:this.adc16(this.getBC());this.pc++;break;case 75:this.setBC(this.readMemWord(this.readMemWord(++this.pc)));this.pc+=2;break;case 79:this.r=this.a;this.pc++;break;case 80:this.d=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.d];this.pc++;break;case 81:this.port.out(this.c,this.d);this.pc++;break;case 82:this.sbc16(this.getDE());this.pc++;break;case 83:this.writeMemWord(this.readMemWord(++this.pc), +this.getDE());this.pc+=2;break;case 86:case 118:this.im=1;this.pc++;break;case 87:this.a=this.i;this.f=this.f&F_CARRY|this.SZ_TABLE[this.a]|(this.iff2?F_PARITY:0);this.pc++;break;case 88:this.e=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.e];this.pc++;break;case 89:this.port.out(this.c,this.e);this.pc++;break;case 90:this.adc16(this.getDE());this.pc++;break;case 91:this.setDE(this.readMemWord(this.readMemWord(++this.pc)));this.pc+=2;break;case 95:this.a=REFRESH_EMULATION?this.r: +JSSMS.Utils.rndInt(255);this.f=this.f&F_CARRY|this.SZ_TABLE[this.a]|(this.iff2?F_PARITY:0);this.pc++;break;case 96:this.h=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.h];this.pc++;break;case 97:this.port.out(this.c,this.h);this.pc++;break;case 98:this.sbc16(this.getHL());this.pc++;break;case 99:this.writeMemWord(this.readMemWord(++this.pc),this.getHL());this.pc+=2;break;case 103:c=this.getHL();b=this.readMem(c);this.writeMem(c,b>>4|(this.a&15)<<4);this.a=this.a&240|b&15;this.f= +this.f&F_CARRY|this.SZP_TABLE[this.a];this.pc++;break;case 104:this.l=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.l];this.pc++;break;case 105:this.port.out(this.c,this.l);this.pc++;break;case 106:this.adc16(this.getHL());this.pc++;break;case 107:this.setHL(this.readMemWord(this.readMemWord(++this.pc)));this.pc+=2;break;case 111:c=this.getHL();b=this.readMem(c);this.writeMem(c,(b&15)<<4|this.a&15);this.a=this.a&240|b>>4;this.f=this.f&F_CARRY|this.SZP_TABLE[this.a];this.pc++;break; +case 113:this.port.out(this.c,0);this.pc++;break;case 114:this.sbc16(this.sp);this.pc++;break;case 115:this.writeMemWord(this.readMemWord(++this.pc),this.sp);this.pc+=2;break;case 120:this.a=this.port.in_(this.c);this.f=this.f&F_CARRY|this.SZP_TABLE[this.a];this.pc++;break;case 121:this.port.out(this.c,this.a);this.pc++;break;case 122:this.adc16(this.sp);this.pc++;break;case 123:this.sp=this.readMemWord(this.readMemWord(++this.pc));this.pc+=2;break;case 160:b=this.readMem(this.getHL());this.writeMem(this.getDE(), +b);this.decBC();this.incDE();this.incHL();b=b+this.a&255;this.f=this.f&193|(this.getBC()?F_PARITY:0)|b&8|(b&2?32:0);this.pc++;break;case 161:b=this.f&F_CARRY|F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.decBC();this.incHL();b|=0===this.getBC()?0:F_PARITY;this.f=this.f&248|b;this.pc++;break;case 162:b=this.port.in_(this.c);this.writeMem(this.getHL(),b);this.b=this.dec8(this.b);this.incHL();this.f=128===(b&128)?this.f|F_NEGATIVE:this.f&~F_NEGATIVE;this.pc++;break;case 163:b=this.readMem(this.getHL()); +this.port.out(this.c,b);this.b=this.dec8(this.b);this.incHL();255=b;b++)for(c=0;1>=c;c++)for(e=0;1>=e;e++)this.DAA_TABLE[b<<8|e<<9|c<<10|a]=this.getDAAResult(a,b|e<<1|c<<4);this.a=this.f=0},getDAAResult:function(a,b){this.a=a;this.f=b;var c=this.a,e=0,d=b&F_CARRY,g=d;if(0!==(b&F_HALFCARRY)||9<(c&15))e|=6;if(1==d||159>1|(this.f&F_CARRY)<<7)&255;this.f=this.f&236|a},rla_a:function(){var a=this.a>>7;this.a=(this.a<<1|this.f&F_CARRY)&255;this.f=this.f&236|a},rlca_a:function(){var a=this.a>>7;this.a=this.a<<1&255|a;this.f=this.f&236|a},rrca_a:function(){var a=this.a&1;this.a=this.a>>1|a<<7;this.f=this.f&236|a},getBC:function(){return this.b<<8|this.c},getDE:function(){return this.d<<8| +this.e},getHL:function(){return this.h<<8|this.l},getAF:function(){return this.a<<8|this.f},getIXHIXL:function(){return this.ixH<<8|this.ixL},getIYHIYL:function(){return this.iyH<<8|this.iyL},setBC:function(a){this.b=a>>8;this.c=a&255},setDE:function(a){this.d=a>>8;this.e=a&255},setHL:function(a){this.h=a>>8;this.l=a&255},setAF:function(a){this.a=a>>8;this.f=a&255},setIXHIXL:function(a){this.ixH=a>>8;this.ixL=a&255},setIYHIYL:function(a){this.iyH=a>>8;this.iyL=a&255},incBC:function(){this.c=this.c+ +1&255;0===this.c&&(this.b=this.b+1&255)},incDE:function(){this.e=this.e+1&255;0===this.e&&(this.d=this.d+1&255)},incHL:function(){this.l=this.l+1&255;0===this.l&&(this.h=this.h+1&255)},incIXHIXL:function(){this.ixL=this.ixL+1&255;0===this.ixL&&(this.ixH=this.ixH+1&255)},incIYHIYL:function(){this.iyL=this.iyL+1&255;0===this.iyL&&(this.iyH=this.iyH+1&255)},decBC:function(){this.c=this.c-1&255;255==this.c&&(this.b=this.b-1&255)},decDE:function(){this.e=this.e-1&255;255==this.e&&(this.d=this.d-1&255)}, +decHL:function(){this.l=this.l-1&255;255==this.l&&(this.h=this.h-1&255)},decIXHIXL:function(){this.ixL=this.ixL-1&255;255==this.ixL&&(this.ixH=this.ixH-1&255)},decIYHIYL:function(){this.iyL=this.iyL-1&255;255==this.iyL&&(this.iyH=this.iyH-1&255)},inc8:function(a){a=a+1&255;this.f=this.f&F_CARRY|this.SZHV_INC_TABLE[a];return a},dec8:function(a){a=a-1&255;this.f=this.f&F_CARRY|this.SZHV_DEC_TABLE[a];return a},exAF:function(){var a=this.a;this.a=this.a2;this.a2=a;a=this.f;this.f=this.f2;this.f2=a},exBC:function(){var a= +this.b;this.b=this.b2;this.b2=a;a=this.c;this.c=this.c2;this.c2=a},exDE:function(){var a=this.d;this.d=this.d2;this.d2=a;a=this.e;this.e=this.e2;this.e2=a},exHL:function(){var a=this.h;this.h=this.h2;this.h2=a;a=this.l;this.l=this.l2;this.l2=a},add16:function(a,b){var c=a+b;this.f=this.f&196|(a^c^b)>>8&16|c>>16&1;return c&65535},adc16:function(a){var b=this.getHL(),c=b+a+(this.f&F_CARRY);this.f=(b^c^a)>>8&16|c>>16&1|c>>8&128|(0!==(c&65535)?0:64)|((a^b^32768)&(a^c)&32768)>>13;this.h=c>>8&255;this.l= +c&255},sbc16:function(a){var b=this.getHL(),c=b-a-(this.f&F_CARRY);this.f=(b^c^a)>>8&16|2|c>>16&1|c>>8&128|(0!==(c&65535)?0:64)|((a^b)&(b^c)&32768)>>13;this.h=c>>8&255;this.l=c&255},incR:function(){this.r=this.r&128|this.r+1&127},generateFlagTables:function(){var a,b,c,e,d,g,h;for(a=0;256>a;a++)b=0!==(a&128)?F_SIGN:0,c=0===a?F_ZERO:0,e=a&32,d=a&8,g=this.getParity(a)?F_PARITY:0,this.SZ_TABLE[a]=b|c|e|d,this.SZP_TABLE[a]=b|c|e|d|g,this.SZHV_INC_TABLE[a]=b|c|e|d,this.SZHV_INC_TABLE[a]|=128===a?F_OVERFLOW: +0,this.SZHV_INC_TABLE[a]|=0===(a&15)?F_HALFCARRY:0,this.SZHV_DEC_TABLE[a]=b|c|e|d|F_NEGATIVE,this.SZHV_DEC_TABLE[a]|=127===a?F_OVERFLOW:0,this.SZHV_DEC_TABLE[a]|=15===(a&15)?F_HALFCARRY:0,this.SZ_BIT_TABLE[a]=0!==a?a&128:F_ZERO|F_PARITY,this.SZ_BIT_TABLE[a]=this.SZ_BIT_TABLE[a]|e|d|F_HALFCARRY;a=0;b=65536;c=0;e=65536;for(g=0;256>g;g++)for(h=0;256>h;h++)d=h-g,this.SZHVC_ADD_TABLE[a]=0!==h?0!==(h&128)?F_SIGN:0:F_ZERO,this.SZHVC_ADD_TABLE[a]|=h&(F_BIT5|F_BIT3),(h&15)<(g&15)&&(this.SZHVC_ADD_TABLE[a]|= +F_HALFCARRY),h(g&15)&&(this.SZHVC_SUB_TABLE[c]|=F_HALFCARRY),h>g&&(this.SZHVC_SUB_TABLE[c]|=F_CARRY),0!==((d^g)&(g^h)&128)&&(this.SZHVC_SUB_TABLE[c]|=F_OVERFLOW),c++,d=g-h-1,this.SZHVC_SUB_TABLE[e]=0!==h?0!==(h&128)?F_NEGATIVE|F_SIGN:F_NEGATIVE:F_NEGATIVE|F_ZERO,this.SZHVC_SUB_TABLE[e]|=h&(F_BIT5|F_BIT3),(h&15)>=(g&15)&&(this.SZHVC_SUB_TABLE[e]|=F_HALFCARRY),h>=g&&(this.SZHVC_SUB_TABLE[e]|=F_CARRY),0!==((d^g)&(g^h)&128)&&(this.SZHVC_SUB_TABLE[e]|=F_OVERFLOW),e++},getParity:function(a){var b= +!0,c;for(c=0;8>c;c++)0!==(a&1<a;a++)this.memWriteMap.setUint8(a,0);else for(a=0;8192>a;a++)this.memWriteMap[a]=0;if(SUPPORT_DATAVIEW)for(a=0;32768>a;a++)this.sram.setUint8(a,0);else for(a=0;32768>a;a++)this.sram[a]=0;this.useSRAM=!1;this.number_of_pages=2;for(a=0;4>a;a++)this.frameReg[a]=a%3},resetMemory:function(a){var b=0;a&&(this.rom=a);if(this.rom.length){this.number_of_pages=this.rom.length;this.romPageMask= +this.number_of_pages-1;for(b=0;3>b;b++)this.frameReg[b]=b%this.number_of_pages;this.frameReg[3]=0;if(ENABLE_COMPILER){this.branches=Array(this.number_of_pages);for(b=0;b=a?(this.memWriteMap.setUint8(a&8191,b),65532===a?this.frameReg[3]=b:65533===a?this.frameReg[0]= +b&this.romPageMask:65534===a?this.frameReg[1]=b&this.romPageMask:65535===a&&(this.frameReg[2]=b&this.romPageMask)):JSSMS.Utils.console.error(JSSMS.Utils.toHex(a))}:function(a,b){65535>=a?(this.memWriteMap[a&8191]=b,65532===a?this.frameReg[3]=b:65533===a?this.frameReg[0]=b&this.romPageMask:65534===a?this.frameReg[1]=b&this.romPageMask:65535===a&&(this.frameReg[2]=b&this.romPageMask)):JSSMS.Utils.console.error(JSSMS.Utils.toHex(a))}}(),writeMemWord:function(){return SUPPORT_DATAVIEW?function(a,b){65532> +a?this.memWriteMap.setUint16(a&8191,b,LITTLE_ENDIAN):65532===a?(this.frameReg[3]=b&255,this.frameReg[0]=b>>8&this.romPageMask):65533===a?(this.frameReg[0]=b&255&this.romPageMask,this.frameReg[1]=b>>8&this.romPageMask):65534===a?(this.frameReg[1]=b&255&this.romPageMask,this.frameReg[2]=b>>8&this.romPageMask):JSSMS.Utils.console.error(JSSMS.Utils.toHex(a))}:function(a,b){65532>a?(a&=8191,this.memWriteMap[a++]=b&255,this.memWriteMap[a]=b>>8):65532===a?(this.frameReg[3]=b&255,this.frameReg[0]=b>>8&this.romPageMask): +65533===a?(this.frameReg[0]=b&255&this.romPageMask,this.frameReg[1]=b>>8&this.romPageMask):65534===a?(this.frameReg[1]=b&255&this.romPageMask,this.frameReg[2]=b>>8&this.romPageMask):JSSMS.Utils.console.error(JSSMS.Utils.toHex(a))}}(),readMem:function(){return SUPPORT_DATAVIEW?function(a){if(1024>a)return this.rom[0].getUint8(a);if(16384>a)return this.rom[this.frameReg[0]].getUint8(a);if(32768>a)return this.rom[this.frameReg[1]].getUint8(a-16384);if(49152>a)return 8==(this.frameReg[3]&12)?(this.useSRAM= +!0,this.sram.getUint8(a-32768)):12==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram.getUint8(a-16384)):this.rom[this.frameReg[2]].getUint8(a-32768);if(57344>a)return this.memWriteMap.getUint8(a-49152);if(65532>a)return this.memWriteMap.getUint8(a-57344);if(65532===a)return this.frameReg[3];if(65533===a)return this.frameReg[0];if(65534===a)return this.frameReg[1];if(65535===a)return this.frameReg[2];JSSMS.Utils.console.error(JSSMS.Utils.toHex(a));return 0}:function(a){if(1024>a)return this.rom[0][a]; +if(16384>a)return this.rom[this.frameReg[0]][a];if(32768>a)return this.rom[this.frameReg[1]][a-16384];if(49152>a)return 8==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a-32768]):12==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a-16384]):this.rom[this.frameReg[2]][a-32768];if(57344>a)return this.memWriteMap[a-49152];if(65532>a)return this.memWriteMap[a-57344];if(65532===a)return this.frameReg[3];if(65533===a)return this.frameReg[0];if(65534===a)return this.frameReg[1];if(65535===a)return this.frameReg[2]; +JSSMS.Utils.console.error(JSSMS.Utils.toHex(a));return 0}}(),readMemWord:function(){return SUPPORT_DATAVIEW?function(a){if(1024>a)return this.rom[0].getUint16(a,LITTLE_ENDIAN);if(16384>a)return this.rom[this.frameReg[0]].getUint16(a,LITTLE_ENDIAN);if(32768>a)return this.rom[this.frameReg[1]].getUint16(a-16384,LITTLE_ENDIAN);if(49152>a)return 8==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a-32768]):12==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a-16384]):this.rom[this.frameReg[2]].getUint16(a- +32768,LITTLE_ENDIAN);if(57344>a)return this.memWriteMap.getUint16(a-49152,LITTLE_ENDIAN);if(65532>a)return this.memWriteMap.getUint16(a-57344,LITTLE_ENDIAN);if(65532===a)return this.frameReg[3];if(65533===a)return this.frameReg[0];if(65534===a)return this.frameReg[1];if(65535===a)return this.frameReg[2];JSSMS.Utils.console.error(JSSMS.Utils.toHex(a));return 0}:function(a){if(1024>a)return this.rom[0][a++]|this.rom[0][a]<<8;if(16384>a)return this.rom[this.frameReg[0]][a++]|this.rom[this.frameReg[0]][a]<< +8;if(32768>a)return this.rom[this.frameReg[1]][a++-16384]|this.rom[this.frameReg[1]][a-16384]<<8;if(49152>a)return 8==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a++-32768]|this.sram[a-32768]<<8):12==(this.frameReg[3]&12)?(this.useSRAM=!0,this.sram[a++-16384]|this.sram[a-16384]<<8):this.rom[this.frameReg[2]][a++-32768]|this.rom[this.frameReg[2]][a-32768]<<8;if(57344>a)return this.memWriteMap[a++-49152]|this.memWriteMap[a-49152]<<8;if(65532>a)return this.memWriteMap[a++-57344]|this.memWriteMap[a- +57344]<<8;if(65532===a)return this.frameReg[3];if(65533===a)return this.frameReg[0];if(65534===a)return this.frameReg[1];if(65535===a)return this.frameReg[2];JSSMS.Utils.console.error(JSSMS.Utils.toHex(a));return 0}}(),hasUsedSRAM:function(){return this.useSRAM},setSRAM:function(a){var b=a.length/PAGE_SIZE,c;for(c=0;c>16&65535;b=a[1]; +this.iff1=0!==(b&1);this.iff2=0!==(b&2);this.halt=0!==(b&4);this.EI_inst=0!==(b&8);this.interruptLine=0!==(b&16);b=a[2];this.a=b&255;this.a2=b>>8&255;this.f=b>>16&255;this.f2=b>>24&255;b=a[3];this.setBC(b&65535);this.setDE(b>>16&65535);b=a[4];this.setHL(b&65535);this.r=b>>16&255;this.i=b>>24&255;b=a[5];this.setIXHIXL(b&65535);this.setIYHIYL(b>>16&65535);this.exBC();this.exDE();this.exHL();b=a[6];this.setBC(b&65535);this.setDE(b>>16&65535);b=a[7];this.setHL(b&65535);this.im=b>>16&255;this.interruptVector= b>>24&255;this.exBC();this.exDE();this.exHL()}};JSSMS.Debugger=function(){}; JSSMS.Debugger.prototype={instructions:[],resetDebug:function(){this.instructions=[];this.main.ui.updateStatus("Parsing instructions...");this.parseInstructions();this.main.ui.updateStatus("Instructions parsed")},parseInstructions:function(){JSSMS.Utils.console.time("Instructions parsing");var a=PAGE_SIZE*this.rom.length,b,c,e=0,d=[],g=[0,56,102];for(g.forEach(function(a){d.push(a)});d.length;)c=d.shift(),this.instructions[c]||(c>=a||65<=c>>10?JSSMS.Utils.console.log("Invalid address",JSSMS.Utils.toHex(c)): -(b=this.disassemble(c),this.instructions[c]=b,null!=b.nextAddress&&d.push(b.nextAddress),null!=b.target&&d.push(b.target)));for(g.forEach(function(a){this.instructions[a]&&(this.instructions[a].isJumpTarget=!0)},this);e "+a[c].target+";"),null!=a[c].nextAddress&&b.push(" "+c+" -> "+ +(b=this.disassemble(c),this.instructions[c]=b,null!==b.nextAddress&&d.push(b.nextAddress),null!==b.target&&d.push(b.target)));for(g.forEach(function(a){this.instructions[a]&&(this.instructions[a].isJumpTarget=!0)},this);e "+a[c].target+";"),null!==a[c].nextAddress&&b.push(" "+c+" -> "+ a[c].nextAddress+";"));b.push("}");b=b.join("\n");b=b.replace(/ 0 \[label="/,' 0 [style=filled,color="#CC0000",label="');JSSMS.Utils.console.timeEnd("DOT generation");return b},writeJavaScript:function(){function a(a){var b=0;switch(a[0]){case 203:b=OP_CB_STATES[a[1]];break;case 221:case 253:b=2==a.length?OP_DD_STATES[a[1]]:OP_INDEX_CB_STATES[a[2]];break;case 237:b=OP_ED_STATES[a[1]];break;default:b=OP_STATES[a[0]]}return b}function b(){d&&q.push("this.tstates -= "+e(d)+";");d=0}JSSMS.Utils.console.time("JavaScript generation"); for(var c=this.instructions,e=JSSMS.Utils.toHex,d=0,g=0,h=0,f=!1,k=1024,l=0,m=0,p=0,q=['"": {','"": function() {','throw "Bad address: " + JSSMS.Utils.toHex(this.pc);'],m=0,p=c.length;m=k&&(q.push("this.pc = "+e(c[m].address)+";"),q.push("}"),q.push("},"),q.push(""+l+": {"),q.push('"": function() {'),q.push('throw "Bad address: " + JSSMS.Utils.toHex(this.pc);'),f=!0,l++,k=l*PAGE_SIZE);if(c[m].isJumpTarget||h!=c[m].address||f)b(),h&&!f&&q.push("this.pc = "+e(h)+";"), -q.push("},"),q.push(""+e(c[m].address)+": function(temp, location) {");q.push("// "+c[m].label);f="return;"==c[m].code.substr(-7);d+=a(c[m].opcodes);(/return;/.test(c[m].code)||/this\.tstates/.test(c[m].code))&&b();""!=c[m].code&&q.push(c[m].code);g=c[m].address;h=c[m].nextAddress}q.push("}");q.push("}");q=q.join("\n");JSSMS.Utils.console.timeEnd("JavaScript generation");return q},disassemble:function(a){var b=JSSMS.Utils.toHex,c=this.readRom8bit(a),e=[c],d="Unknown Opcode",g=a,h=null,f='throw "Unimplemented opcode '+ +q.push("},"),q.push(""+e(c[m].address)+": function(temp, location) {");q.push("// "+c[m].label);f="return;"==c[m].code.substr(-7);d+=a(c[m].opcodes);(/return;/.test(c[m].code)||/this\.tstates/.test(c[m].code))&&b();""!==c[m].code&&q.push(c[m].code);g=c[m].address;h=c[m].nextAddress}q.push("}");q.push("}");q=q.join("\n");JSSMS.Utils.console.timeEnd("JavaScript generation");return q},disassemble:function(a){var b=JSSMS.Utils.toHex,c=this.readRom8bit(a),e=[c],d="Unknown Opcode",g=a,h=null,f='throw "Unimplemented opcode '+ b(c)+'";',k="",l=0;a++;k={};switch(c){case 0:d="NOP";f="";break;case 1:k=b(this.readRom16bit(a));d="LD BC,"+k;f="this.setBC("+k+");";a+=2;break;case 2:d="LD (BC),A";f="this.writeMem(this.getBC(), this.a);";break;case 3:d="INC BC";f="this.incBC();";break;case 4:d="INC B";f="this.b = this.inc8(this.b);";break;case 5:d="DEC B";f="this.b = this.dec8(this.b);";break;case 6:k=b(this.readRom8bit(a));d="LD B,"+k;f="this.b = "+k+";";a++;break;case 7:d="RLCA";f="this.rlca_a();";break;case 8:d="EX AF AF'";f= "this.exAF();";break;case 9:d="ADD HL,BC";f="this.setHL(this.add16(this.getHL(), this.getBC()));";break;case 10:d="LD A,(BC)";f="this.a = this.readMem(this.getBC());";break;case 11:d="DEC BC";f="this.decBC();";break;case 12:d="INC C";f="this.c = this.inc8(this.c);";break;case 13:d="DEC C";f="this.c = this.dec8(this.c);";break;case 14:k=b(this.readRom8bit(a));d="LD C,"+k;f="this.c = "+k+";";a++;break;case 15:d="RRCA";f="this.rrca_a();";break;case 16:h=a+this.signExtend(this.readRom8bit(a)+1);d="DJNZ ("+ b(h)+")";f="this.b = this.b - 0x01 & 0xFF;if (this.b != 0x00) {this.tstates -= 0x05;this.pc = "+b(h)+";return;}";a++;break;case 17:k=b(this.readRom16bit(a));d="LD DE,"+k;f="this.setDE("+k+");";a+=2;break;case 18:d="LD (DE),A";f="this.writeMem(this.getDE(), this.a);";break;case 19:d="INC DE";f="this.incDE();";break;case 20:d="INC D";f="this.d = this.inc8(this.d);";break;case 21:d="DEC D";f="this.d = this.dec8(this.d);";break;case 22:k=b(this.readRom8bit(a));d="LD D,"+k;f="this.d = "+k+";";a++;break; @@ -195,19 +195,19 @@ f="this.f = this.SZP_TABLE[this.a &= this.b] | F_HALFCARRY;";break;case 161:d="A break;case 166:d="AND A,(HL)";f="this.f = this.SZP_TABLE[this.a &= this.readMem(this.getHL())] | F_HALFCARRY;";break;case 167:d="AND A,A";f="this.f = this.SZP_TABLE[this.a] | F_HALFCARRY;";break;case 168:d="XOR A,B";f="this.f = this.SZP_TABLE[this.a ^= this.b];";break;case 169:d="XOR A,C";f="this.f = this.SZP_TABLE[this.a ^= this.c];";break;case 170:d="XOR A,D";f="this.f = this.SZP_TABLE[this.a ^= this.d];";break;case 171:d="XOR A,E";f="this.f = this.SZP_TABLE[this.a ^= this.e];";break;case 172:d= "XOR A,H";f="this.f = this.SZP_TABLE[this.a ^= this.h];";break;case 173:d="XOR A,L";f="this.f = this.SZP_TABLE[this.a ^= this.l];";break;case 174:d="XOR A,(HL)";f="this.f = this.SZP_TABLE[this.a ^= this.readMem(this.getHL())];";break;case 175:d="XOR A,A";f="this.a = "+b(0)+"; this.f = this.SZP_TABLE[0x00];";break;case 176:d="OR A,B";f="this.f = this.SZP_TABLE[this.a |= this.b];";break;case 177:d="OR A,C";f="this.f = this.SZP_TABLE[this.a |= this.c];";break;case 178:d="OR A,D";f="this.f = this.SZP_TABLE[this.a |= this.d];"; break;case 179:d="OR A,E";f="this.f = this.SZP_TABLE[this.a |= this.e];";break;case 180:d="OR A,H";f="this.f = this.SZP_TABLE[this.a |= this.h];";break;case 181:d="OR A,L";f="this.f = this.SZP_TABLE[this.a |= this.l];";break;case 182:d="OR A,(HL)";f="this.f = this.SZP_TABLE[this.a |= this.readMem(this.getHL())];";break;case 183:d="OR A,A";f="this.f = this.SZP_TABLE[this.a];";break;case 184:d="CP A,B";f="this.cp_a(this.b);";break;case 185:d="CP A,C";f="this.cp_a(this.c);";break;case 186:d="CP A,D"; -f="this.cp_a(this.d);";break;case 187:d="CP A,E";f="this.cp_a(this.e);";break;case 188:d="CP A,H";f="this.cp_a(this.h);";break;case 189:d="CP A,L";f="this.cp_a(this.l);";break;case 190:d="CP A,(HL)";f="this.cp_a(this.readMem(this.getHL()));";break;case 191:d="CP A,A";f="this.cp_a(this.a);";break;case 192:d="RET NZ";f="if ((this.f & F_ZERO) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 193:d="POP BC";f="this.setBC(this.readMemWord(this.sp)); this.sp += 0x02;"; -break;case 194:h=this.readRom16bit(a);d="JP NZ,("+b(h)+")";f="if ((this.f & F_ZERO) == 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 195:h=this.readRom16bit(a);d="JP ("+b(h)+")";f="this.pc = "+b(h)+"; return;";a=null;break;case 196:h=this.readRom16bit(a);d="CALL NZ ("+b(h)+")";f="if ((this.f & F_ZERO) == 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 197:d="PUSH BC";f="this.push2(this.b, this.c);";break;case 198:k=b(this.readRom8bit(a));d="ADD A,"+ +f="this.cp_a(this.d);";break;case 187:d="CP A,E";f="this.cp_a(this.e);";break;case 188:d="CP A,H";f="this.cp_a(this.h);";break;case 189:d="CP A,L";f="this.cp_a(this.l);";break;case 190:d="CP A,(HL)";f="this.cp_a(this.readMem(this.getHL()));";break;case 191:d="CP A,A";f="this.cp_a(this.a);";break;case 192:d="RET NZ";f="if ((this.f & F_ZERO) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 193:d="POP BC";f="this.setBC(this.readMemWord(this.sp)); this.sp += 0x02;"; +break;case 194:h=this.readRom16bit(a);d="JP NZ,("+b(h)+")";f="if ((this.f & F_ZERO) === 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 195:h=this.readRom16bit(a);d="JP ("+b(h)+")";f="this.pc = "+b(h)+"; return;";a=null;break;case 196:h=this.readRom16bit(a);d="CALL NZ ("+b(h)+")";f="if ((this.f & F_ZERO) === 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 197:d="PUSH BC";f="this.push2(this.b, this.c);";break;case 198:k=b(this.readRom8bit(a));d="ADD A,"+ k;f="this.add_a("+k+");";a++;break;case 199:h=0;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 200:d="RET Z";f="if ((this.f & F_ZERO) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 201:d="RET";f="this.pc = this.readMemWord(this.sp); this.sp += 0x02; return;";a=null;break;case 202:h=this.readRom16bit(a);d="JP Z,("+b(h)+")";f="if ((this.f & F_ZERO) != 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 203:k=this.getCB(a); d=k.inst;f=k.code;e=e.concat(k.opcodes);a=k.nextAddress;break;case 204:h=this.readRom16bit(a);d="CALL Z ("+b(h)+")";f="if ((this.f & F_ZERO) != 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 205:h=this.readRom16bit(a);d="CALL ("+b(h)+")";f="this.push1("+b(a+2)+"); this.pc = "+b(h)+"; return;";a+=2;break;case 206:k=b(this.readRom8bit(a));d="ADC ,"+k;f="this.adc_a("+k+");";a++;break;case 207:h=8;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+ -"; return;";break;case 208:d="RET NC";f="if ((this.f & F_CARRY) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 209:d="POP DE";f="this.setDE(this.readMemWord(this.sp)); this.sp += 0x02;";break;case 210:h=this.readRom16bit(a);d="JP NC,("+b(h)+")";f="if ((this.f & F_CARRY) == 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 211:k=this.readRom8bit(a);d="OUT ("+b(k)+"),A";f=this.peepholePortOut(k);a++;break;case 212:h=this.readRom16bit(a);d="CALL NC ("+ -b(h)+")";f="if ((this.f & F_CARRY) == 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 213:d="PUSH DE";f="this.push2(this.d, this.e);";break;case 214:k=b(this.readRom8bit(a));d="SUB "+k;f="this.sub_a("+k+");";a++;break;case 215:h=16;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 216:d="RET C";f="if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 217:d= -"EXX";f="this.exBC(); this.exDE(); this.exHL();";break;case 218:h=this.readRom16bit(a);d="JP C,("+b(h)+")";f="if ((this.f & F_CARRY) != 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 219:k=this.readRom8bit(a);d="IN A,("+b(k)+")";f=this.peepholePortIn(k);a++;break;case 220:h=this.readRom16bit(a);d="CALL C ("+b(h)+")";f="if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 221:k=this.getIndexOpIX(a);d=k.inst;f=k.code;e=e.concat(k.opcodes); -a=k.nextAddress;break;case 222:k=b(this.readRom8bit(a));d="SBC A,"+k;f="this.sbc_a("+k+");";a++;break;case 223:h=24;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 224:d="RET PO";f="if ((this.f & F_PARITY) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 225:d="POP HL";f="this.setHL(this.readMemWord(this.sp)); this.sp += 0x02;";break;case 226:h=this.readRom16bit(a);d="JP PO,("+b(h)+")";f="if ((this.f & F_PARITY) == 0x00) {this.pc = "+ -b(h)+";return;}";a+=2;break;case 227:d="EX (SP),HL";f="temp = this.h;this.h = this.readMem(this.sp + 0x01);this.writeMem(this.sp + 0x01, temp);temp = this.l;this.l = this.readMem(this.sp);this.writeMem(this.sp, temp);";break;case 228:h=this.readRom16bit(a);d="CALL PO ("+b(h)+")";f="if ((this.f & F_PARITY) == 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 229:d="PUSH HL";f="this.push2(this.h, this.l);";break;case 230:k=b(this.readRom8bit(a));d="AND ("+ -k+")";f="this.f = this.SZP_TABLE[this.a &= "+k+"] | F_HALFCARRY;";a++;break;case 231:h=32;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 232:d="RET PE";f="if ((this.f & F_PARITY) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 233:d="JP (HL)";f="this.pc = this.getHL(); return;";a=null;break;case 234:h=this.readRom16bit(a);d="JP PE,("+b(h)+")";f="if ((this.f & F_PARITY) != 0x00) {this.pc = "+b(h)+";return;}";a+= -2;break;case 235:d="EX DE,HL";f="temp = this.d;this.d = this.h;this.h = temp;temp = this.e;this.e = this.l;this.l = temp;";break;case 236:h=this.readRom16bit(a);d="CALL PE ("+b(h)+")";f="if ((this.f & F_PARITY) != 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 237:k=this.getED(a);h=k.target;d=k.inst;f=k.code;e=e.concat(k.opcodes);a=k.nextAddress;break;case 238:k=b(this.readRom8bit(a));d="XOR "+k;f="this.f = this.SZP_TABLE[this.a ^= "+k+"];";a++;break; -case 239:h=40;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 240:d="RET P";f="if ((this.f & F_SIGN) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 241:d="POP AF";f="this.setAF(this.readMemWord(this.sp)); this.sp += 0x02;";break;case 242:h=this.readRom16bit(a);d="JP P,("+b(h)+")";f="if ((this.f & F_SIGN) == 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 243:d="DI";f="this.iff1 = false; this.iff2 = false; this.EI_inst = true;"; -break;case 244:h=this.readRom16bit(a);d="CALL P ("+b(h)+")";f="if ((this.f & F_SIGN) == 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 245:d="PUSH AF";f="this.push2(this.a, this.f);";break;case 246:k=b(this.readRom8bit(a));d="OR "+k;f="this.f = this.SZP_TABLE[this.a |= "+k+"];";a++;break;case 247:h=48;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 248:d="RET M";f="if ((this.f & F_SIGN) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; +"; return;";break;case 208:d="RET NC";f="if ((this.f & F_CARRY) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 209:d="POP DE";f="this.setDE(this.readMemWord(this.sp)); this.sp += 0x02;";break;case 210:h=this.readRom16bit(a);d="JP NC,("+b(h)+")";f="if ((this.f & F_CARRY) === 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 211:k=this.readRom8bit(a);d="OUT ("+b(k)+"),A";f=this.peepholePortOut(k);a++;break;case 212:h=this.readRom16bit(a);d= +"CALL NC ("+b(h)+")";f="if ((this.f & F_CARRY) === 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 213:d="PUSH DE";f="this.push2(this.d, this.e);";break;case 214:k=b(this.readRom8bit(a));d="SUB "+k;f="this.sub_a("+k+");";a++;break;case 215:h=16;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 216:d="RET C";f="if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; +break;case 217:d="EXX";f="this.exBC(); this.exDE(); this.exHL();";break;case 218:h=this.readRom16bit(a);d="JP C,("+b(h)+")";f="if ((this.f & F_CARRY) != 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 219:k=this.readRom8bit(a);d="IN A,("+b(k)+")";f=this.peepholePortIn(k);a++;break;case 220:h=this.readRom16bit(a);d="CALL C ("+b(h)+")";f="if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 221:k=this.getIndexOpIX(a);d=k.inst; +f=k.code;e=e.concat(k.opcodes);a=k.nextAddress;break;case 222:k=b(this.readRom8bit(a));d="SBC A,"+k;f="this.sbc_a("+k+");";a++;break;case 223:h=24;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 224:d="RET PO";f="if ((this.f & F_PARITY) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 225:d="POP HL";f="this.setHL(this.readMemWord(this.sp)); this.sp += 0x02;";break;case 226:h=this.readRom16bit(a);d="JP PO,("+b(h)+ +")";f="if ((this.f & F_PARITY) === 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 227:d="EX (SP),HL";f="temp = this.h;this.h = this.readMem(this.sp + 0x01);this.writeMem(this.sp + 0x01, temp);temp = this.l;this.l = this.readMem(this.sp);this.writeMem(this.sp, temp);";break;case 228:h=this.readRom16bit(a);d="CALL PO ("+b(h)+")";f="if ((this.f & F_PARITY) === 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 229:d="PUSH HL";f="this.push2(this.h, this.l);"; +break;case 230:k=b(this.readRom8bit(a));d="AND ("+k+")";f="this.f = this.SZP_TABLE[this.a &= "+k+"] | F_HALFCARRY;";a++;break;case 231:h=32;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 232:d="RET PE";f="if ((this.f & F_PARITY) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 233:d="JP (HL)";f="this.pc = this.getHL(); return;";a=null;break;case 234:h=this.readRom16bit(a);d="JP PE,("+b(h)+")";f="if ((this.f & F_PARITY) != 0x00) {this.pc = "+ +b(h)+";return;}";a+=2;break;case 235:d="EX DE,HL";f="temp = this.d;this.d = this.h;this.h = temp;temp = this.e;this.e = this.l;this.l = temp;";break;case 236:h=this.readRom16bit(a);d="CALL PE ("+b(h)+")";f="if ((this.f & F_PARITY) != 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 237:k=this.getED(a);h=k.target;d=k.inst;f=k.code;e=e.concat(k.opcodes);a=k.nextAddress;break;case 238:k=b(this.readRom8bit(a));d="XOR "+k;f="this.f = this.SZP_TABLE[this.a ^= "+ +k+"];";a++;break;case 239:h=40;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 240:d="RET P";f="if ((this.f & F_SIGN) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}";break;case 241:d="POP AF";f="this.setAF(this.readMemWord(this.sp)); this.sp += 0x02;";break;case 242:h=this.readRom16bit(a);d="JP P,("+b(h)+")";f="if ((this.f & F_SIGN) === 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 243:d="DI";f="this.iff1 = false; this.iff2 = false; this.EI_inst = true;"; +break;case 244:h=this.readRom16bit(a);d="CALL P ("+b(h)+")";f="if ((this.f & F_SIGN) === 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 245:d="PUSH AF";f="this.push2(this.a, this.f);";break;case 246:k=b(this.readRom8bit(a));d="OR "+k;f="this.f = this.SZP_TABLE[this.a |= "+k+"];";a++;break;case 247:h=48;d="RST "+b(h);f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;";break;case 248:d="RET M";f="if ((this.f & F_SIGN) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break;case 249:d="LD SP,HL";f="this.sp = this.getHL()";break;case 250:h=this.readRom16bit(a);d="JP M,("+b(h)+")";f="if ((this.f & F_SIGN) != 0x00) {this.pc = "+b(h)+";return;}";a+=2;break;case 251:d="EI";f="this.iff1 = true; this.iff2 = true; this.EI_inst = true;";break;case 252:h=this.readRom16bit(a);d="CALL M ("+b(h)+")";f="if ((this.f & F_SIGN) != 0x00) {this.tstates -= 0x07;this.push1("+b(a+2)+");this.pc = "+b(h)+";return;}";a+=2;break;case 253:k=this.getIndexOpIY(a);d=k.inst;f=k.code;e=e.concat(k.opcodes); a=k.nextAddress;break;case 254:k=b(this.readRom8bit(a));d="CP "+k;f="this.cp_a("+k+");";a++;break;case 255:h=56,d="RST "+b(h),f="this.push1("+b(a)+"); this.pc = "+b(h)+"; return;"}return Instruction({opcode:c,opcodes:e,inst:d,code:f,address:g,nextAddress:a,target:h})},getCB:function(a){var b=this.readRom8bit(a),c=[b],e="Unimplemented 0xCB prefixed opcode",d=a,g='throw "Unimplemented 0xCB prefixed opcode";';a++;switch(b){case 0:e="RLC B";g="this.b = this.rlc(this.b);";break;case 1:e="RLC C";g="this.c = this.rlc(this.c);"; break;case 2:e="RLC D";g="this.d = this.rlc(this.d);";break;case 3:e="RLC E";g="this.e = this.rlc(this.e);";break;case 4:e="RLC H";g="this.h = this.rlc(this.h);";break;case 5:e="RLC L";g="this.l = this.rlc(this.l);";break;case 6:e="RLC (HL)";g="this.writeMem(this.getHL(), this.rlc(this.readMem(this.getHL())));";break;case 7:e="RLC A";g="this.a = this.rlc(this.a);";break;case 8:e="RRC B";g="this.b = this.rrc(this.b);";break;case 9:e="RRC C";g="this.c = this.rrc(this.c);";break;case 10:e="RRC D";g= @@ -243,12 +243,12 @@ break;case 88:d="IN E,(C)";f="this.e = this.port.in_(this.c);this.f = (this.f & break;case 96:d="IN H,(C)";f="this.h = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.h];";break;case 97:d="OUT (C),H";f="this.port.out(this.c, this.h);";break;case 98:d="SBC HL,HL";f="this.sbc16(this.getHL());";break;case 99:l=this.readRom16bit(a);k=b(l);d="LD ("+k+"),HL";f="this.writeMem("+k+", this.l);this.writeMem("+b(l+1)+", this.h);";a+=2;break;case 103:d="RRD";f="var location = this.getHL();temp = this.readMem(location);this.writeMem(location, (temp >> 4) | ((this.a & 0x0F) << 4));this.a = (this.a & 0xF0) | (temp & 0x0F);this.f = this.f & F_CARRY | this.SZP_TABLE[this.a];"; break;case 104:d="IN L,(C)";f="this.l = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.l];";break;case 105:d="OUT (C),L";f="this.port.out(this.c, this.l);";break;case 106:d="ADC HL,HL";f="this.adc16(this.getHL());";break;case 107:k=b(this.readRom16bit(a));d="LD HL,("+k+")";f="this.setHL(this.readMemWord("+k+"));";a+=2;break;case 111:d="RLD";f="var location = this.getHL();temp = this.readMem(location);this.writeMem(location, (temp & 0x0F) << 4 | (this.a & 0x0F));this.a = (this.a & 0xF0) | (temp >> 4);this.f = this.f & F_CARRY | this.SZP_TABLE[this.a];"; break;case 113:d="OUT (C),0";f="this.port.out(this.c, 0);";break;case 114:d="SBC HL,SP";f="this.sbc16(this.sp);";break;case 115:l=this.readRom16bit(a);k=b(l);d="LD ("+k+"),SP";f="this.writeMem("+k+", this.sp & 0xFF);this.writeMem("+b(l+1)+", this.sp >> 8);";a+=2;break;case 120:d="IN A,(C)";f="this.a = this.port.in_(this.c);this.f = this.f & F_CARRY | this.SZP_TABLE[this.a];";break;case 121:d="OUT (C),A";f="this.port.out(this.c, this.a);";break;case 122:d="ADC HL,SP";f="this.adc16(this.sp);";break; -case 123:k=b(this.readRom16bit(a));d="LD SP,("+k+")";f="this.sp = this.readMemWord("+k+");";a+=2;break;case 160:d="LDI";f="temp = this.readMem(this.getHL());this.writeMem(this.getDE(), temp);this.decBC();this.incDE();this.incHL();temp = (temp + this.a) & 0xFF;this.f = (this.f & 0xC1) | (this.getBC() ? F_PARITY : 0) | (temp & 0x08) | ((temp & 0x02) ? 0x20 : 0);";break;case 161:d="CPI";f="temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);this.f = (this.f & 0xF8) | temp;"; -break;case 162:d="INI";f="temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}";break;case 163:d="OUTI";f="temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.incHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; -break;case 168:d="LDD";break;case 169:d="CPD";break;case 170:d="IND";f="temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.decHL();if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}";break;case 171:d="OUTD";f="temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.decHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; +case 123:k=b(this.readRom16bit(a));d="LD SP,("+k+")";f="this.sp = this.readMemWord("+k+");";a+=2;break;case 160:d="LDI";f="temp = this.readMem(this.getHL());this.writeMem(this.getDE(), temp);this.decBC();this.incDE();this.incHL();temp = (temp + this.a) & 0xFF;this.f = (this.f & 0xC1) | (this.getBC() ? F_PARITY : 0) | (temp & 0x08) | ((temp & 0x02) ? 0x20 : 0);";break;case 161:d="CPI";f="temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);this.f = (this.f & 0xF8) | temp;"; +break;case 162:d="INI";f="temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}";break;case 163:d="OUTI";f="temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.incHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; +break;case 168:d="LDD";break;case 169:d="CPD";break;case 170:d="IND";f="temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.decHL();if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}";break;case 171:d="OUTD";f="temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.decHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break;case 176:d="LDIR";f="this.writeMem(this.getDE(), this.readMem(this.getHL()));this.incDE();this.incHL();this.decBC();";ACCURATE_INTERRUPT_EMULATION?(h=a-2,f+="if (this.getBC() != 0x00) {this.tstates -= 0x05;this.f |= F_PARITY;return;} else {"):f+="for (;this.getBC() != 0x00; this.f |= F_PARITY, this.tstates -= 5) {this.writeMem(this.getDE(), this.readMem(this.getHL()));this.incDE();this.incHL();this.decBC();}if (!(this.getBC() != 0x00)) {";f+="this.f &= ~ F_PARITY;}this.f &= ~ F_NEGATIVE; this.f &= ~ F_HALFCARRY;"; -break;case 177:d="CPIR";f="temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);";ACCURATE_INTERRUPT_EMULATION?(h=a-2,f+="if ((temp & F_PARITY) != 0x00 && (this.f & F_ZERO) == 0x00) {this.tstates -= 0x05;this.pc = "+b(h)+";return;}"):f+="for (;(temp & F_PARITY) != 0x00 && (this.f & F_ZERO) == 0x00; this.tstates -= 5) {temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);}"; -f+="this.f = (this.f & 0xF8) | temp;";break;case 178:h=a-2;d="INIR";f="temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}";break;case 179:d="OTIR";f="temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.incHL();";ACCURATE_INTERRUPT_EMULATION?(h=a-2,f+="if (this.b != 0x00) {this.tstates -= 0x05;return;}"): +break;case 177:d="CPIR";f="temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);";ACCURATE_INTERRUPT_EMULATION?(h=a-2,f+="if ((temp & F_PARITY) != 0x00 && (this.f & F_ZERO) === 0x00) {this.tstates -= 0x05;this.pc = "+b(h)+";return;}"):f+="for (;(temp & F_PARITY) != 0x00 && (this.f & F_ZERO) === 0x00; this.tstates -= 5) {temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);}"; +f+="this.f = (this.f & 0xF8) | temp;";break;case 178:h=a-2;d="INIR";f="temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}";break;case 179:d="OTIR";f="temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.incHL();";ACCURATE_INTERRUPT_EMULATION?(h=a-2,f+="if (this.b != 0x00) {this.tstates -= 0x05;return;}"): f+="for (;this.b != 0x00; this.tstates -= 5) {temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.incHL();}";f+="if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}";break;case 184:d="LDDR";break;case 185:d="CPDR";break;case 186:h=a-2;d="INDR";f="temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.decHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break;case 187:h=a-2,d="OTDR",f="temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.decHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"}return{opcode:c,opcodes:e,inst:d,code:f,address:g,nextAddress:a,target:h}},getIndex:function(a,b){var c=JSSMS.Utils.toHex, e=this.readRom8bit(b),d=[e],g="Unimplemented 0xDD or 0xFD prefixed opcode",h=b,f='throw "Unimplemented 0xDD or 0xFD prefixed opcode";',k="",l=0;b++;l=0;k={};switch(e){case 9:g="ADD "+a+",BC";f="this.set"+a+"(this.add16(this.get"+a+"(), this.getBC()));";break;case 25:g="ADD "+a+",DE";f="this.set"+a+"(this.add16(this.get"+a+"(), this.getDE()));";break;case 33:k=c(this.readRom16bit(b));g="LD "+a+","+k;f="this.set"+a+"("+k+");";b+=2;break;case 34:l=this.readRom16bit(b);k=c(l);g="LD ("+k+"),"+a;f="this.writeMem("+ @@ -275,53 +275,55 @@ break;case 59:h="LD E,SRL ("+a+")";break;case 60:h="LD H,SRL ("+a+")";break;case "RES 1,("+a+")";break;case 144:case 145:case 146:case 147:case 148:case 149:case 150:case 151:h="RES 2,("+a+")";break;case 152:case 153:case 154:case 155:case 156:case 157:case 158:case 159:h="RES 3,("+a+")";break;case 160:case 161:case 162:case 163:case 164:case 165:case 166:case 167:h="RES 4,("+a+")";break;case 168:case 169:case 170:case 171:case 172:case 173:case 174:case 175:h="RES 5,("+a+")";break;case 176:case 177:case 178:case 179:case 180:case 181:case 182:case 183:h="RES 6,("+a+")";break; case 184:case 185:case 186:case 187:case 188:case 189:case 190:case 191:h="RES 7,("+a+")";break;case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:h="SET 0,("+a+")";break;case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:h="SET 1,("+a+")";break;case 208:case 209:case 210:case 211:case 212:case 213:case 214:case 215:h="SET 2,("+a+")";break;case 216:case 217:case 218:case 219:case 220:case 221:case 222:case 223:h="SET 3,("+a+")";break;case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:h= "SET 4,("+a+")";break;case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:h="SET 5,("+a+")";break;case 240:case 241:case 242:case 243:case 244:case 245:case 246:case 247:h="SET 6,("+a+")";break;case 248:case 249:case 250:case 251:case 252:case 253:case 254:case 255:h="SET 7,("+a+")"}b++;return{opcode:d,opcodes:g,inst:h,code:f,address:e,nextAddress:b}},getIndexOpIX:function(a){return this.getIndex("IX",a)},getIndexOpIY:function(a){return this.getIndex("IY",a)},readRom8bit:function(a){return SUPPORT_DATAVIEW? -this.rom[a>>14].getUint8(a&16383):this.rom[a>>14][a&16383]&255},readRom16bit:function(a){return SUPPORT_DATAVIEW?16383>(a&16383)?this.rom[a>>14].getUint16(a&16383,LITTLE_ENDIAN):this.rom[a>>14].getUint8(a&16383)|this.rom[++a>>14].getUint8(a&16383)<<8:this.rom[a>>14][a&16383]&255|(this.rom[++a>>14][a&16383]&255)<<8},peepholePortOut:function(a){return"this.port.out("+JSSMS.Utils.toHex(a)+", this.a);"},peepholePortIn:function(a){return"this.a = this.port.in_("+JSSMS.Utils.toHex(a)+");"}}; -function Instruction(a){var b=JSSMS.Utils.toHex,c={address:0,hexAddress:"",opcode:0,opcodes:[],inst:"",code:"",nextAddress:null,target:null,isJumpTarget:!1,jumpTargetNb:0,label:""},e,d="";for(e in c)void 0!=a[e]&&(c[e]=a[e]);c.hexAddress=b(c.address);c.opcodes.length&&(d=c.opcodes.map(b).join(" ")+" ");c.label=c.hexAddress+" "+d+c.inst;return c};var KEY_UP=1,KEY_DOWN=2,KEY_LEFT=4,KEY_RIGHT=8,KEY_FIRE1=16,KEY_FIRE2=32,KEY_START=64;JSSMS.Keyboard=function(a){this.main=a;this.lightgunY=this.lightgunX=this.ggstart=this.controller2=this.controller1=0;this.lightgunEnabled=this.lightgunClick=!1}; +this.rom[a>>14].getUint8(a&16383):this.rom[a>>14][a&16383]&255},readRom16bit:function(a){return SUPPORT_DATAVIEW?16383>(a&16383)?this.rom[a>>14].getUint16(a&16383,LITTLE_ENDIAN):this.rom[a>>14].getUint8(a&16383)|this.rom[++a>>14].getUint8(a&16383)<<8:this.rom[a>>14][a&16383]&255|(this.rom[++a>>14][a&16383]&255)<<8},peepholePortOut:function(a){if(this.main.is_gg&&7>a)return"";switch(a&193){case 1:if(LIGHTGUN)return"var value = this.a;this.port.oldTH = (this.port.getTH(PORT_A) != 0x00 || this.port.getTH(PORT_B) != 0x00);this.port.writePort(PORT_A, value);this.port.writePort(PORT_B, value >> 2);if (!this.port.oldTH && (this.port.getTH(PORT_A) != 0x00 || this.port.getTH(PORT_B) != 0x00)) {this.port.hCounter = this.port.getHCount();}"; +a="var value = this.a;this.port.ioPorts[0] = (value & 0x20) << 1;this.port.ioPorts[1] = (value & 0x80);";0===this.port.europe&&(a+="this.port.ioPorts[0] = ~this.port.ioPorts[0];this.port.ioPorts[1] = ~this.port.ioPorts[1];");return a;case 128:return"this.vdp.dataWrite(this.a);";case 129:return"this.vdp.controlWrite(this.a);";case 64:case 65:if(this.main.soundEnabled)return"this.psg.write(this.a);"}return""},peepholePortIn:function(a){if(this.main.is_gg&&7>a)switch(a){case 0:return"this.a = (this.port.keyboard.ggstart & 0xBF) | this.port.europe;"; +case 1:case 2:case 3:case 4:case 5:return"this.a = 0x00;";case 6:return"this.a = 0xFF;"}switch(a&193){case 64:return"this.a = this.vdp.getVCount();";case 65:return"this.a = this.port.hCounter;";case 128:return"this.a = this.vdp.dataRead();";case 129:return"this.a = this.vdp.controlRead();";case 192:return"this.a = this.port.keyboard.controller1;";case 193:return LIGHTGUN?"if (this.port.keyboard.lightgunClick)this.port.lightPhaserSync();this.a = (this.port.keyboard.controller2 & 0x3F) | (this.port.getTH(PORT_A) != 0x00 ? 0x40 : 0x00) | (this.port.getTH(PORT_B) != 0x00 ? 0x80 : 0x00);": +"this.a = (this.port.keyboard.controller2 & 0x3F) | this.port.ioPorts[0] | this.port.ioPorts[1];"}return"this.a = 0xFF;"}};function Instruction(a){var b=JSSMS.Utils.toHex,c={address:0,hexAddress:"",opcode:0,opcodes:[],inst:"",code:"",nextAddress:null,target:null,isJumpTarget:!1,jumpTargetNb:0,label:""},e,d="";for(e in c)void 0!==a[e]&&(c[e]=a[e]);c.hexAddress=b(c.address);c.opcodes.length&&(d=c.opcodes.map(b).join(" ")+" ");c.label=c.hexAddress+" "+d+c.inst;return c};var KEY_UP=1,KEY_DOWN=2,KEY_LEFT=4,KEY_RIGHT=8,KEY_FIRE1=16,KEY_FIRE2=32,KEY_START=64;JSSMS.Keyboard=function(a){this.main=a;this.lightgunY=this.lightgunX=this.ggstart=this.controller2=this.controller1=0;this.lightgunEnabled=this.lightgunClick=!1}; JSSMS.Keyboard.prototype={reset:function(){this.ggstart=this.controller2=this.controller1=255;LIGHTGUN&&(this.lightgunClick=!1);this.pause_button=!1},keydown:function(a){switch(a.keyCode){case 38:this.controller1&=~KEY_UP;break;case 40:this.controller1&=~KEY_DOWN;break;case 37:this.controller1&=~KEY_LEFT;break;case 39:this.controller1&=~KEY_RIGHT;break;case 88:this.controller1&=~KEY_FIRE1;break;case 90:this.controller1&=~KEY_FIRE2;break;case 13:this.main.is_sms?this.main.pause_button=!0:this.ggstart&= -129;break;case 104:this.controller2&=~KEY_UP;break;case 98:this.controller2&=~KEY_DOWN;break;case 100:this.controller2&=~KEY_LEFT;break;case 102:this.controller2&=~KEY_RIGHT;break;case 103:this.controller2&=~KEY_FIRE1;break;case 105:this.controller2&=~KEY_FIRE2;break;case 97:this.controller2&=~KEY_START;break;default:return}a.preventDefault()},keyup:function(a){switch(a.keyCode){case 38:this.controller1|=KEY_UP;break;case 40:this.controller1|=KEY_DOWN;break;case 37:this.controller1|=KEY_LEFT;break; case 39:this.controller1|=KEY_RIGHT;break;case 88:this.controller1|=KEY_FIRE1;break;case 90:this.controller1|=KEY_FIRE2;break;case 13:this.main.is_sms||(this.ggstart|=128);break;case 104:this.controller2|=KEY_UP;break;case 98:this.controller2|=KEY_DOWN;break;case 100:this.controller2|=KEY_LEFT;break;case 102:this.controller2|=KEY_RIGHT;break;case 103:this.controller2|=KEY_FIRE1;break;case 105:this.controller2|=KEY_FIRE2;break;case 97:this.controller2|=KEY_START;break;default:return}a.preventDefault()}};var SCALE=8,NO_ANTIALIAS=Number.MIN_VALUE,SHIFT_RESET=32768,FEEDBACK_PATTERN=9,PSG_VOLUME=[25,20,16,13,10,8,6,5,4,3,3,2,2,1,1,0],HI_BOUNDARY=127,LO_BOUNDARY=-128;JSSMS.SN76489=function(a){this.main=a;this.clockFrac=this.clock=0;this.reg=Array(8);this.regLatch=0;this.freqCounter=Array(4);this.freqPolarity=Array(4);this.freqPos=Array(3);this.noiseFreq=16;this.noiseShiftReg=SHIFT_RESET;this.outputChannel=Array(4)}; -JSSMS.SN76489.prototype={init:function(a,b){this.clock=(a<c;c++)this.reg[c<<1]=1,this.reg[(c<<1)+1]=15,this.freqCounter[c]=0,this.freqPolarity[c]=1,3!=c&&(this.freqPos[c]=NO_ANTIALIAS)},write:function(a){0!=(a&128)?(this.regLatch=a>>4&7,this.reg[this.regLatch]=this.reg[this.regLatch]&1008|a&15):this.reg[this.regLatch]=0==this.regLatch||2==this.regLatch||4==this.regLatch?this.reg[this.regLatch]& -15|(a&63)<<4:a&15;switch(this.regLatch){case 0:case 2:case 4:0==this.reg[this.regLatch]&&(this.reg[this.regLatch]=1);break;case 6:this.noiseFreq=16<<(this.reg[6]&3),this.noiseShiftReg=SHIFT_RESET}},update:function(a,b){for(var c=[],e=0,d=0;ed;d++)this.outputChannel[d]=this.freqPos[d]!=NO_ANTIALIAS?PSG_VOLUME[this.reg[(d<<1)+1]]*this.freqPos[d]>>SCALE:PSG_VOLUME[this.reg[(d<<1)+1]]*this.freqPolarity[d];this.outputChannel[3]=PSG_VOLUME[this.reg[7]]*(this.noiseShiftReg&1)<<1;d=this.outputChannel[0]+ +JSSMS.SN76489.prototype={init:function(a,b){this.clock=(a<c;c++)this.reg[c<<1]=1,this.reg[(c<<1)+1]=15,this.freqCounter[c]=0,this.freqPolarity[c]=1,3!=c&&(this.freqPos[c]=NO_ANTIALIAS)},write:function(a){0!==(a&128)?(this.regLatch=a>>4&7,this.reg[this.regLatch]=this.reg[this.regLatch]&1008|a&15):this.reg[this.regLatch]=0===this.regLatch||2==this.regLatch||4==this.regLatch?this.reg[this.regLatch]& +15|(a&63)<<4:a&15;switch(this.regLatch){case 0:case 2:case 4:0===this.reg[this.regLatch]&&(this.reg[this.regLatch]=1);break;case 6:this.noiseFreq=16<<(this.reg[6]&3),this.noiseShiftReg=SHIFT_RESET}},update:function(a,b){for(var c=[],e=0,d=0;ed;d++)this.outputChannel[d]=this.freqPos[d]!=NO_ANTIALIAS?PSG_VOLUME[this.reg[(d<<1)+1]]*this.freqPos[d]>>SCALE:PSG_VOLUME[this.reg[(d<<1)+1]]*this.freqPolarity[d];this.outputChannel[3]=PSG_VOLUME[this.reg[7]]*(this.noiseShiftReg&1)<<1;d=this.outputChannel[0]+ this.outputChannel[1]+this.outputChannel[2]+this.outputChannel[3];d>HI_BOUNDARY?d=HI_BOUNDARY:d>SCALE,h=g<d;d++){var f=this.freqCounter[d];if(0>=f){var k=this.reg[d<<1];6=this.freqCounter[3]&&(this.freqPolarity[3]=-this.freqPolarity[3],128!=this.noiseFreq&&(this.freqCounter[3]+=this.noiseFreq*(g/this.noiseFreq+1)),1==this.freqPolarity[3]&&(d=0,d=0!=(this.reg[6]&4)?0!=(this.noiseShiftReg&FEEDBACK_PATTERN)&&0!=(this.noiseShiftReg&FEEDBACK_PATTERN^FEEDBACK_PATTERN)? +this.freqPolarity[d]/(h+this.clockFrac),this.freqPolarity[d]=-this.freqPolarity[d]):(this.freqPolarity[d]=1,this.freqPos[d]=NO_ANTIALIAS);this.freqCounter[d]+=k*(g/k+1)}else this.freqPos[d]=NO_ANTIALIAS}0>=this.freqCounter[3]&&(this.freqPolarity[3]=-this.freqPolarity[3],128!=this.noiseFreq&&(this.freqCounter[3]+=this.noiseFreq*(g/this.noiseFreq+1)),1==this.freqPolarity[3]&&(d=0,d=0!==(this.reg[6]&4)?0!==(this.noiseShiftReg&FEEDBACK_PATTERN)&&0!==(this.noiseShiftReg&FEEDBACK_PATTERN^FEEDBACK_PATTERN)? 1:0:this.noiseShiftReg&1,this.noiseShiftReg=this.noiseShiftReg>>1|d<<15))}return c}};var NTSC=0,PAL=1,SMS_X_PIXELS=342,SMS_Y_PIXELS_NTSC=262,SMS_Y_PIXELS_PAL=313,SMS_WIDTH=256,SMS_HEIGHT=192,GG_WIDTH=160,GG_HEIGHT=144,GG_X_OFFSET=48,GG_Y_OFFSET=24,STATUS_VINT=128,STATUS_OVERFLOW=64,STATUS_COLLISION=32,STATUS_HINT=4,BGT_LENGTH=1792,SPRITES_PER_LINE=8,SPRITE_COUNT=0,SPRITE_X=1,SPRITE_Y=2,SPRITE_N=3,TOTAL_TILES=512,TILE_SIZE=8; JSSMS.Vdp=function(a){this.main=a;var b=0;this.videoMode=NTSC;this.VRAM=new JSSMS.Utils.Uint8Array(16384);this.CRAM=new JSSMS.Utils.Uint8Array(96);for(b=0;96>b;b++)this.CRAM[b]=255;this.vdpreg=new JSSMS.Utils.Uint8Array(16);this.status=0;this.firstByte=!1;this.counter=this.line=this.readBuffer=this.operation=this.location=this.commandByte=0;this.bgPriority=new JSSMS.Utils.Uint8Array(SMS_WIDTH);VDP_SPRITE_COLLISIONS&&(this.spriteCol=new JSSMS.Utils.Uint8Array(SMS_WIDTH));this.vScrollLatch=this.bgt= 0;this.display=a.ui.canvasImageData.data;this.main_JAVA_R=new JSSMS.Utils.Uint8Array(64);this.main_JAVA_G=new JSSMS.Utils.Uint8Array(64);this.main_JAVA_B=new JSSMS.Utils.Uint8Array(64);this.GG_JAVA_R=new JSSMS.Utils.Uint8Array(256);this.GG_JAVA_G=new JSSMS.Utils.Uint8Array(256);this.GG_JAVA_B=new JSSMS.Utils.Uint8Array(16);this.sat=this.h_end=this.h_start=0;this.isSatDirty=!1;this.lineSprites=Array(SMS_HEIGHT);for(b=0;ba;a++)this.vdpreg[a]=0;this.vdpreg[2]=14;this.vdpreg[5]=126;this.vScrollLatch=0;this.main.cpu.interruptLine=!1;this.isSatDirty=!0;this.minDirty=TOTAL_TILES;this.maxDirty=-1;for(a=0;16384>a;a++)this.VRAM[a]=0;for(a=0;a<4*SMS_WIDTH*SMS_HEIGHT;a+=4)this.display[a]=0,this.display[a+1]=0,this.display[a+2]=0,this.display[a+3]=255},forceFullRedraw:function(){this.bgt=(this.vdpreg[2]& +JSSMS.Vdp.prototype={reset:function(){var a;this.firstByte=!0;for(a=this.operation=this.status=this.counter=this.location=0;16>a;a++)this.vdpreg[a]=0;this.vdpreg[2]=14;this.vdpreg[5]=126;this.vScrollLatch=0;this.main.cpu.interruptLine=!1;this.isSatDirty=!0;this.minDirty=TOTAL_TILES;this.maxDirty=-1;for(a=0;16384>a;a++)this.VRAM[a]=0;for(a=0;a>6&3,this.location=this.commandByte|a<<8,0==this.operation)this.readBuffer=this.VRAM[this.location++&16383]&255;else if(2==this.operation){a&=15;switch(a){case 0:ACCURATE_INTERRUPT_EMULATION&&0!=(this.status&STATUS_HINT)&&(this.main.cpu.interruptLine=0!=(this.commandByte&16));break;case 1:0!=(this.status&STATUS_VINT)&&0!=(this.commandByte&32)&&(this.main.cpu.interruptLine=!0);(this.commandByte&3)!=(this.vdpreg[a]&3)&&(this.isSatDirty= +this.location&16128|a;else if(this.firstByte=!0,this.operation=a>>6&3,this.location=this.commandByte|a<<8,0===this.operation)this.readBuffer=this.VRAM[this.location++&16383]&255;else if(2==this.operation){a&=15;switch(a){case 0:ACCURATE_INTERRUPT_EMULATION&&0!==(this.status&STATUS_HINT)&&(this.main.cpu.interruptLine=0!==(this.commandByte&16));break;case 1:0!==(this.status&STATUS_VINT)&&0!==(this.commandByte&32)&&(this.main.cpu.interruptLine=!0);(this.commandByte&3)!=(this.vdpreg[a]&3)&&(this.isSatDirty= !0);break;case 2:this.bgt=(this.commandByte&14)<<10;break;case 5:var b=this.sat;this.sat=(this.commandByte&-130)<<7;b!=this.sat&&(this.isSatDirty=!0)}this.vdpreg[a]=this.commandByte}},dataRead:function(){this.firstByte=!0;var a=this.readBuffer;this.readBuffer=this.VRAM[this.location++&16383]&255;return a},dataWrite:function(a){var b=0;this.firstByte=!0;switch(this.operation){case 0:case 1:case 2:b=this.location&16383;if(a!=(this.VRAM[b]&255)){if(b>=this.sat&&b= -this.sat+128&&b>5;this.isTileDirty[c]=1;cthis.maxDirty&&(this.maxDirty=c)}this.VRAM[b]=a}break;case 3:this.main.is_sms?(b=3*(this.location&31),this.CRAM[b]=this.main_JAVA_R[a],this.CRAM[b+1]=this.main_JAVA_G[a],this.CRAM[b+2]=this.main_JAVA_B[a]):(b=3*((this.location&63)>>1),0==(this.location&1)?(this.CRAM[b]=this.GG_JAVA_R[a],this.CRAM[b+1]=this.GG_JAVA_G[a]):this.CRAM[b+2]=this.GG_JAVA_B[a])}ACCURATE&&(this.readBuffer= -a);this.location++},interrupts:function(a){192>=a?(ACCURATE_INTERRUPT_EMULATION||192!=a||(this.status|=STATUS_VINT),0==this.counter?(this.counter=this.vdpreg[10],this.status|=STATUS_HINT):this.counter--,0!=(this.status&STATUS_HINT)&&0!=(this.vdpreg[0]&16)&&(this.main.cpu.interruptLine=!0)):(this.counter=this.vdpreg[10],0!=(this.status&STATUS_VINT)&&(0!=(this.vdpreg[1]&32)&&224>a)&&(this.main.cpu.interruptLine=!0),ACCURATE&&a==this.main.no_of_scanlines-1&&(this.vScrollLatch=this.vdpreg[9]))},setVBlankFlag:function(){this.status|= -STATUS_VINT},drawLine:function(a){var b=0,c=0,e=0;if(!this.main.is_gg||!(a=GG_Y_OFFSET+GG_HEIGHT)){if(VDP_SPRITE_COLLISIONS)for(b=0;bb;b++)this.display[c+b]=this.CRAM[e],this.display[c+ -b+1]=this.CRAM[e+1],this.display[c+b+2]=this.CRAM[e+2]}else this.drawBGColour(a)}},drawBg:function(a){var b=0,c=0,e=0,d=0,g=this.vdpreg[8],h=ACCURATE?this.vScrollLatch:this.vdpreg[9];16>a&&0!=(this.vdpreg[0]&64)&&(g=0);var f=this.vdpreg[0]&128,k=32-(g>>3)+this.h_start,l=a+h>>3;27b&&r>3,h=(a&7)<<3)}},drawSprite:function(a){for(var b=0,c=0,e=0,d=0,g=this.lineSprites[a], -h=Math.min(SPRITES_PER_LINE,g[SPRITE_COUNT]),f=this.vdpreg[1]&1,k=a<<8,l=3*h;d>f;0!=(this.vdpreg[1]&2)&&(m&=-2);m=this.tiles[m+((b&8)>>3)];p=0;0>q&&(p=-q,q=0);var s=p+((b&7)<<3);if(0==f)for(;8>p&&qp&&q>5;this.isTileDirty[c]=1;cthis.maxDirty&&(this.maxDirty=c)}this.VRAM[b]=a}break;case 3:this.main.is_sms?(b=3*(this.location&31),this.CRAM[b]=this.main_JAVA_R[a],this.CRAM[b+1]=this.main_JAVA_G[a],this.CRAM[b+2]=this.main_JAVA_B[a]):(b=3*((this.location&63)>>1),0===(this.location&1)?(this.CRAM[b]=this.GG_JAVA_R[a],this.CRAM[b+1]=this.GG_JAVA_G[a]):this.CRAM[b+2]=this.GG_JAVA_B[a])}ACCURATE&&(this.readBuffer= +a);this.location++},interrupts:function(a){192>=a?(ACCURATE_INTERRUPT_EMULATION||192!=a||(this.status|=STATUS_VINT),0===this.counter?(this.counter=this.vdpreg[10],this.status|=STATUS_HINT):this.counter--,0!==(this.status&STATUS_HINT)&&0!==(this.vdpreg[0]&16)&&(this.main.cpu.interruptLine=!0)):(this.counter=this.vdpreg[10],0!==(this.status&STATUS_VINT)&&0!==(this.vdpreg[1]&32)&&224>a&&(this.main.cpu.interruptLine=!0),ACCURATE&&a==this.main.no_of_scanlines-1&&(this.vScrollLatch=this.vdpreg[9]))},setVBlankFlag:function(){this.status|= +STATUS_VINT},drawLine:function(a){var b=0,c=0,e=0;if(!this.main.is_gg||!(a=GG_Y_OFFSET+GG_HEIGHT)){if(VDP_SPRITE_COLLISIONS)for(b=0;bb;b++)this.display[c+b]=this.CRAM[e],this.display[c+ +b+1]=this.CRAM[e+1],this.display[c+b+2]=this.CRAM[e+2]}else this.drawBGColour(a)}},drawBg:function(a){var b=0,c=0,e=0,d=0,g=this.vdpreg[8],h=ACCURATE?this.vScrollLatch:this.vdpreg[9];16>a&&0!==(this.vdpreg[0]&64)&&(g=0);var f=this.vdpreg[0]&128,k=32-(g>>3)+this.h_start,l=a+h>>3;27b&&s>3,h=(a&7)<<3)}},drawSprite:function(a){for(var b=0,c=0,e=0,d=0,g=this.lineSprites[a], +h=Math.min(SPRITES_PER_LINE,g[SPRITE_COUNT]),f=this.vdpreg[1]&1,k=a<<8,l=3*h;d>f;0!==(this.vdpreg[1]&2)&&(m&=-2);m=this.tiles[m+((b&8)>>3)];p=0;0>q&&(p=-q,q=0);var r=p+((b&7)<<3);if(0===f)for(;8>p&&qp&&q=SPRITES_PER_LINE&&(this.status|=STATUS_OVERFLOW)},drawBGColour:function(a){a<<=8;var b=4*(a+4*SMS_WIDTH),c=3*((this.vdpreg[7]&15)+16);for(a*=4;a>=1){var m=0;0!=(g&l)&&(m|=1);0!=(h&l)&&(m|=2);0!=(f&l)&&(m|=4);0!=(k&l)&&(m|=8);b[c++]=m}}this.minDirty=TOTAL_TILES;this.maxDirty=-1},decodeSat:function(){this.isSatDirty=!1;for(var a=0;ab;b++){var c=this.VRAM[this.sat+b]&255;if(208==c)break;c++;240=SPRITES_PER_LINE)break;var g=3*d[SPRITE_COUNT]+SPRITE_X,h=this.sat+(b<<1)+128;d[g++]=this.VRAM[h++]&255;d[g++]=c;d[g++]=this.VRAM[h]&255;d[SPRITE_COUNT]++}}},createCachedImages:function(){for(var a=0;aa;a++)b=a&3,c=a>>2&3,e=a>>4&3,this.main_JAVA_R[a]=85*b&255,this.main_JAVA_G[a]=85*c&255,this.main_JAVA_B[a]=85* -e&255;for(a=0;256>a;a++)c=a&15,e=a>>4&15,this.GG_JAVA_R[a]=(c<<4|c)&255,this.GG_JAVA_G[a]=(e<<4|e)&255;for(a=0;16>a;a++)this.GG_JAVA_B[a]=(a<<4|a)&255},getState:function(){var a=Array(51);a[0]=this.videoMode|this.status<<8|(this.firstByte?65536:0)|this.commandByte<<24;a[1]=this.location|this.operation<<16|this.readBuffer<<24;a[2]=this.counter|this.vScrollLatch<<8|this.line<<16;JSSMS.Utils.copyArrayElements(this.vdpreg,0,a,3,16);JSSMS.Utils.copyArrayElements(this.CRAM,0,a,19,96);return a},setState:function(a){var b= -a[0];this.videoMode=b&255;this.status=b>>8&255;this.firstByte=0!=(b>>16&255);this.commandByte=b>>24&255;b=a[1];this.location=b&65535;this.operation=b>>16&255;this.readBuffer=b>>24&255;b=a[2];this.counter=b&255;this.vScrollLatch=b>>8&255;this.line=b>>16&65535;JSSMS.Utils.copyArrayElements(a,3,this.vdpreg,0,16);JSSMS.Utils.copyArrayElements(a,19,this.CRAM,0,96);this.forceFullRedraw()}};JSSMS.DummyUI=function(a){this.main=a;this.reset=function(){};this.updateStatus=function(){};this.writeFrame=function(){};this.updateDisassembly=function(){};this.canvasImageData={data:[]}}; -window.$&&($.fn.JSSMSUI=function(a){var b=this,c=function(e){this.main=e;if("[object OperaMini]"==Object.prototype.toString.call(window.operamini))$(b).html('
Oh no! Your browser can\'t run this emulator. Try the latest version of Firefox, Google Chrome, Opera or Safari!
');else{var d=this;e=$("
");var c=$('
'),h=$('
'), -f=$('
'),k=JSSMS.Utils.getPrefix(["fullscreenEnabled","mozFullScreenEnabled","webkitCancelFullScreen"]),l=JSSMS.Utils.getPrefix(["requestAnimationFrame","msRequestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame"],window),m;if(l)this.requestAnimationFrame=window[l].bind(window);else{var p=0;this.requestAnimationFrame=function(a){var b=JSSMS.Utils.getTimestamp(),b=Math.max(0,1E3/60-(b-p));window.setTimeout(function(){p=JSSMS.Utils.getTimestamp();a()}, -b)}}this.screen=$("");this.canvasContext=this.screen[0].getContext("2d");this.canvasContext.webkitImageSmoothingEnabled=!1;this.canvasContext.mozImageSmoothingEnabled=!1;this.canvasContext.imageSmoothingEnabled=!1;if(this.canvasContext.getImageData){this.canvasImageData=this.canvasContext.getImageData(0,0,SMS_WIDTH,SMS_HEIGHT);this.gamepad={u:{e:$(".up",h),k:KEY_UP},r:{e:$(".right",h),k:KEY_RIGHT},d:{e:$(".down",h),k:KEY_DOWN}, -l:{e:$(".left",h),k:KEY_LEFT},1:{e:$(".fire1",h),k:KEY_FIRE1},2:{e:$(".fire2",h),k:KEY_FIRE2}};l=$(".start",h);this.romContainer=$('
');this.romSelect=$("").change(function(){d.loadROM()});this.buttons=Object.create(null);this.buttons.start=$('').click(function(){d.main.isRunning?(d.main.stop(),d.updateStatus("Paused"),d.buttons.start.attr("value","Start")):(d.main.start(),d.buttons.start.attr("value", -"Pause"))});this.buttons.reset=$('').click(function(){d.main.reloadRom()?(d.main.reset(),d.main.vdp.forceFullRedraw(),d.main.start()):$(this).attr("disabled","disabled")});ENABLE_DEBUGGER&&(this.dissambler=$('
'),$(b).after(this.dissambler),this.buttons.nextStep=$('').click(function(){d.main.nextStep()}));this.main.soundEnabled&&(this.buttons.sound= -$('').click(function(){d.main.soundEnabled?(d.main.soundEnabled=!1,d.buttons.sound.attr("value","Enable sound")):(d.main.soundEnabled=!0,d.buttons.sound.attr("value","Disable sound"))}));k?this.buttons.fullscreen=$('').click(function(){var a=c[0];a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}): -(this.zoomed=!1,this.buttons.zoom=$('').click(function(){d.zoomed?(d.screen.animate({width:SMS_WIDTH+"px",height:SMS_HEIGHT+"px"},function(){$(this).removeAttr("style")}),d.buttons.zoom.attr("value","Zoom in")):(d.screen.animate({width:2*SMS_WIDTH+"px",height:2*SMS_HEIGHT+"px"}),d.buttons.zoom.attr("value","Zoom out"));d.zoomed=!d.zoomed}));for(m in this.buttons)this.buttons[m].appendTo(f);this.log=$('
');this.screen.appendTo(c); -h.appendTo(c);c.appendTo(e);this.romContainer.appendTo(e);f.appendTo(e);this.log.appendTo(e);e.appendTo($(b));void 0!=a&&this.setRoms(a);$(document).bind("keydown",function(a){d.main.keyboard.keydown(a)}).bind("keyup",function(a){d.main.keyboard.keyup(a)});for(m in this.gamepad)this.gamepad[m].e.on("mousedown touchstart",function(a){return function(b){d.main.keyboard.controller1&=~a;b.preventDefault()}}(this.gamepad[m].k)).on("mouseup touchend",function(a){return function(b){d.main.keyboard.controller1|= -a;b.preventDefault()}}(this.gamepad[m].k));l.on("mousedown touchstart",function(a){d.main.is_sms?d.main.pause_button=!0:d.main.keyboard.ggstart&=-129;a.preventDefault()}).on("mouseup touchend",function(a){d.main.is_sms||(d.main.keyboard.ggstart|=128);a.preventDefault()})}else $(b).html('
Oh no! Your browser doesn\'t support writing pixels directly to the <canvas> tag. Try the latest version of Firefox, Google Chrome, Opera or Safari!
')}}; +this.VRAM[e++],h=this.VRAM[e++],f=this.VRAM[e++],k=this.VRAM[e++],l=128;0!==l;l>>=1){var m=0;0!==(g&l)&&(m|=1);0!==(h&l)&&(m|=2);0!==(f&l)&&(m|=4);0!==(k&l)&&(m|=8);b[c++]=m}}this.minDirty=TOTAL_TILES;this.maxDirty=-1},decodeSat:function(){this.isSatDirty=!1;for(var a=0;ab;b++){var c=this.VRAM[this.sat+b]&255;if(208==c)break;c++;240=SPRITES_PER_LINE)break;var g=3*d[SPRITE_COUNT]+SPRITE_X,h=this.sat+(b<<1)+128;d[g++]=this.VRAM[h++]&255;d[g++]=c;d[g++]=this.VRAM[h]&255;d[SPRITE_COUNT]++}}},createCachedImages:function(){for(var a=0;aa;a++)b=a&3,c=a>>2&3,e=a>>4&3,this.main_JAVA_R[a]=85*b&255,this.main_JAVA_G[a]=85*c&255,this.main_JAVA_B[a]= +85*e&255;for(a=0;256>a;a++)c=a&15,e=a>>4&15,this.GG_JAVA_R[a]=(c<<4|c)&255,this.GG_JAVA_G[a]=(e<<4|e)&255;for(a=0;16>a;a++)this.GG_JAVA_B[a]=(a<<4|a)&255},getState:function(){var a=Array(51);a[0]=this.videoMode|this.status<<8|(this.firstByte?65536:0)|this.commandByte<<24;a[1]=this.location|this.operation<<16|this.readBuffer<<24;a[2]=this.counter|this.vScrollLatch<<8|this.line<<16;JSSMS.Utils.copyArrayElements(this.vdpreg,0,a,3,16);JSSMS.Utils.copyArrayElements(this.CRAM,0,a,19,96);return a},setState:function(a){var b= +a[0];this.videoMode=b&255;this.status=b>>8&255;this.firstByte=0!==(b>>16&255);this.commandByte=b>>24&255;b=a[1];this.location=b&65535;this.operation=b>>16&255;this.readBuffer=b>>24&255;b=a[2];this.counter=b&255;this.vScrollLatch=b>>8&255;this.line=b>>16&65535;JSSMS.Utils.copyArrayElements(a,3,this.vdpreg,0,16);JSSMS.Utils.copyArrayElements(a,19,this.CRAM,0,96);this.forceFullRedraw()}};JSSMS.DummyUI=function(a){this.main=a;this.reset=function(){};this.updateStatus=function(){};this.writeFrame=function(){};this.updateDisassembly=function(){};this.canvasImageData={data:[]}}; +window.$&&($.fn.JSSMSUI=function(a){var b=this,c=function(e){function c(a){return function(b){h.main.keyboard.controller1&=~a;b.preventDefault()}}function g(a){return function(b){h.main.keyboard.controller1|=a;b.preventDefault()}}this.main=e;if("[object OperaMini]"==Object.prototype.toString.call(window.operamini))$(b).html('
Oh no! Your browser can\'t run this emulator. Try the latest version of Firefox, Google Chrome, Opera or Safari!
');else{var h= +this;e=$("
");var f=$('
'),k=$('
'),l=$('
'),m=JSSMS.Utils.getPrefix(["fullscreenEnabled","mozFullScreenEnabled","webkitCancelFullScreen"]),p=JSSMS.Utils.getPrefix(["requestAnimationFrame","msRequestAnimationFrame", +"mozRequestAnimationFrame","webkitRequestAnimationFrame"],window),q;if(p)this.requestAnimationFrame=window[p].bind(window);else{var r=0;this.requestAnimationFrame=function(a){var b=JSSMS.Utils.getTimestamp(),b=Math.max(0,1E3/60-(b-r));window.setTimeout(function(){r=JSSMS.Utils.getTimestamp();a()},b)}}this.screen=$("");this.canvasContext=this.screen[0].getContext("2d");this.canvasContext.webkitImageSmoothingEnabled=!1;this.canvasContext.mozImageSmoothingEnabled= +!1;this.canvasContext.imageSmoothingEnabled=!1;if(this.canvasContext.getImageData){this.canvasImageData=this.canvasContext.getImageData(0,0,SMS_WIDTH,SMS_HEIGHT);this.gamepad={u:{e:$(".up",k),k:KEY_UP},r:{e:$(".right",k),k:KEY_RIGHT},d:{e:$(".down",k),k:KEY_DOWN},l:{e:$(".left",k),k:KEY_LEFT},1:{e:$(".fire1",k),k:KEY_FIRE1},2:{e:$(".fire2",k),k:KEY_FIRE2}};p=$(".start",k);this.romContainer=$('
');this.romSelect=$("").change(function(){h.loadROM()});this.buttons= +Object.create(null);this.buttons.start=$('').click(function(){h.main.isRunning?(h.main.stop(),h.updateStatus("Paused"),h.buttons.start.attr("value","Start")):(h.main.start(),h.buttons.start.attr("value","Pause"))});this.buttons.reset=$('').click(function(){h.main.reloadRom()?(h.main.reset(),h.main.vdp.forceFullRedraw(),h.main.start()):$(this).attr("disabled", +"disabled")});ENABLE_DEBUGGER&&(this.dissambler=$('
'),$(b).after(this.dissambler),this.buttons.nextStep=$('').click(function(){h.main.nextStep()}));this.main.soundEnabled&&(this.buttons.sound=$('').click(function(){h.main.soundEnabled?(h.main.soundEnabled=!1,h.buttons.sound.attr("value","Enable sound")):(h.main.soundEnabled=!0, +h.buttons.sound.attr("value","Disable sound"))}));m?this.buttons.fullscreen=$('').click(function(){var a=f[0];a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}):(this.zoomed=!1,this.buttons.zoom=$('').click(function(){h.zoomed?(h.screen.animate({width:SMS_WIDTH+"px",height:SMS_HEIGHT+"px"}, +function(){$(this).removeAttr("style")}),h.buttons.zoom.attr("value","Zoom in")):(h.screen.animate({width:2*SMS_WIDTH+"px",height:2*SMS_HEIGHT+"px"}),h.buttons.zoom.attr("value","Zoom out"));h.zoomed=!h.zoomed}));for(q in this.buttons)this.buttons[q].appendTo(l);this.log=$('
');this.screen.appendTo(f);k.appendTo(f);f.appendTo(e);this.romContainer.appendTo(e);l.appendTo(e);this.log.appendTo(e);e.appendTo($(b));void 0!==a&&this.setRoms(a);$(document).bind("keydown",function(a){h.main.keyboard.keydown(a)}).bind("keyup", +function(a){h.main.keyboard.keyup(a)});for(q in this.gamepad)this.gamepad[q].e.on("mousedown touchstart",c(this.gamepad[q].k)).on("mouseup touchend",g(this.gamepad[q].k));p.on("mousedown touchstart",function(a){h.main.is_sms?h.main.pause_button=!0:h.main.keyboard.ggstart&=-129;a.preventDefault()}).on("mouseup touchend",function(a){h.main.is_sms||(h.main.keyboard.ggstart|=128);a.preventDefault()})}else $(b).html('
Oh no! Your browser doesn\'t support writing pixels directly to the <canvas> tag. Try the latest version of Firefox, Google Chrome, Opera or Safari!
')}}; c.prototype={reset:function(){this.screen[0].width=SMS_WIDTH;this.screen[0].height=SMS_HEIGHT;this.log.empty();ENABLE_DEBUGGER&&this.dissambler.empty()},setRoms:function(a){var b,c,h,f,k=0;this.romSelect.children().remove();$("").appendTo(this.romSelect);for(b in a){if(a.hasOwnProperty(b)){c=$("").attr("label",b);h=a[b].length;for(f=0;f"+a[b][f][0]+"").attr("value",a[b][f][1]).appendTo(c);c.appendTo(this.romSelect)}k++}k&& -this.romSelect.appendTo(this.romContainer)},loadROM:function(){var a=this;this.updateStatus("Downloading...");$.ajax({url:escape(this.romSelect.val()),xhr:function(){var b=$.ajaxSettings.xhr();void 0!=b.overrideMimeType&&b.overrideMimeType("text/plain; charset=x-user-defined");return a.xhr=b},complete:function(b,c){var h;"error"==c?a.updateStatus("The selected ROM file could not be loaded."):(h=b.responseText,a.main.stop(),a.main.readRomDirectly(h,a.romSelect.val()),a.main.reset(),a.main.vdp.forceFullRedraw(), +this.romSelect.appendTo(this.romContainer)},loadROM:function(){var a=this;this.updateStatus("Downloading...");$.ajax({url:encodeURI(this.romSelect.val()),xhr:function(){var b=$.ajaxSettings.xhr();void 0!==b.overrideMimeType&&b.overrideMimeType("text/plain; charset=x-user-defined");return a.xhr=b},complete:function(b,c){var h;"error"==c?a.updateStatus("The selected ROM file could not be loaded."):(h=b.responseText,a.main.stop(),a.main.readRomDirectly(h,a.romSelect.val()),a.main.reset(),a.main.vdp.forceFullRedraw(), a.enable())}})},enable:function(){this.buttons.start.removeAttr("disabled");this.buttons.start.attr("value","Start");this.buttons.reset.removeAttr("disabled");ENABLE_DEBUGGER&&this.buttons.nextStep.removeAttr("disabled");this.main.soundEnabled&&(this.buttons.sound?this.buttons.sound.attr("value","Disable sound"):this.buttons.sound.attr("value","Enable sound"))},updateStatus:function(a){this.log.text(a)},writeAudio:function(a){},writeFrame:function(){var a=JSSMS.Utils.getPrefix(["hidden","mozHidden", "webkitHidden","msHidden"]);return a?function(){document[a]||this.canvasContext.putImageData(this.canvasImageData,0,0)}:function(){this.canvasContext.putImageData(this.canvasImageData,0,0)}}(),updateDisassembly:function(a){for(var b=this.main.cpu.instructions,c=b.length,h="",f=8>a?0:a-8,k=0;16>k&&f<=c;f++)b[f]&&(h+=""+b[f].hexAddress+(b[f].isJumpTarget?":":" ")+""+b[f].inst+"",k++);this.dissambler.html(h)}};return c});var IO_TR_DIRECTION=0,IO_TH_DIRECTION=1,IO_TR_OUTPUT=2,IO_TH_OUTPUT=3,IO_TH_INPUT=4,PORT_A=0,PORT_B=5;JSSMS.Ports=function(a){this.main=a;this.vdp=a.vdp;this.psg=a.psg;this.keyboard=a.keyboard;this.europe=64;this.hCounter=0;this.ioPorts=[]}; -JSSMS.Ports.prototype={reset:function(){LIGHTGUN?(this.ioPorts=Array(10),this.ioPorts[PORT_A+IO_TH_INPUT]=1,this.ioPorts[PORT_B+IO_TH_INPUT]=1):this.ioPorts=Array(2)},out:function(a,b){if(!(this.main.is_gg&&7>a))switch(a&193){case 1:LIGHTGUN?(this.oldTH=0!=this.getTH(PORT_A)||0!=this.getTH(PORT_B),this.writePort(PORT_A,b),this.writePort(PORT_B,b>>2),this.oldTH||0==this.getTH(PORT_A)&&0==this.getTH(PORT_B)||(this.hCounter=this.getHCount())):(this.ioPorts[0]=(b&32)<<1,this.ioPorts[1]=b&128,0==this.europe&& -(this.ioPorts[0]=~this.ioPorts[0],this.ioPorts[1]=~this.ioPorts[1]));break;case 128:this.vdp.dataWrite(b);break;case 129:this.vdp.controlWrite(b);break;case 64:case 65:this.main.soundEnabled&&this.psg.write(b)}},in_:function(a){if(this.main.is_gg&&7>a)switch(a){case 0:return this.keyboard.ggstart&191|this.europe;case 1:case 2:case 3:case 4:case 5:return 0;case 6:return 255}switch(a&193){case 64:return this.vdp.getVCount();case 65:return this.hCounter;case 128:return this.vdp.dataRead();case 129:return this.vdp.controlRead(); -case 192:return this.keyboard.controller1;case 193:return LIGHTGUN?(this.keyboard.lightgunClick&&this.lightPhaserSync(),this.keyboard.controller2&63|(0!=this.getTH(PORT_A)?64:0)|(0!=this.getTH(PORT_B)?128:0)):this.keyboard.controller2&63|this.ioPorts[0]|this.ioPorts[1]}return 255},writePort:function(a,b){this.ioPorts[a+IO_TR_DIRECTION]=b&1;this.ioPorts[a+IO_TH_DIRECTION]=b&2;this.ioPorts[a+IO_TR_OUTPUT]=b&16;this.ioPorts[a+IO_TH_OUTPUT]=0==this.europe?~b&32:b&32},getTH:function(a){return 0==this.ioPorts[a+ -IO_TH_DIRECTION]?this.ioPorts[a+IO_TH_OUTPUT]:this.ioPorts[a+IO_TH_INPUT]},setTH:function(a,b){this.ioPorts[a+IO_TH_DIRECTION]=1;this.ioPorts[a+IO_TH_INPUT]=b?1:0},getHCount:function(){var a=Math.round(this.main.cpu.getCycle()*SMS_X_PIXELS/this.main.cyclesPerLine)-8>>1;147-this.Y_RANGE&&e-this.X_RANGE&& -c>1))):(this.setTH(PORT_A,!0),a!=this.getTH(PORT_A)&&(this.hCounter=b))},setDomestic:function(a){this.europe=a?64:0},isDomestic:function(){return 0!=this.europe}};var Bytecode=function(){function a(a,b){this.address=a;this.page=b;this.opcode=[];this.target=this.nextAddress=this.operand=null;this.isJumpTarget=this.canEnd=this.isFunctionEnder=!1;this.jumpTargetNb=0;this.ast=null}var b=JSSMS.Utils.toHex;a.prototype={get hexOpcode(){return this.opcode.length?this.opcode.map(b).join(" "):""},get label(){var a=this.name?this.name.replace(/(nn|n|PC\+e|d)/,b(this.target||this.operand||0)):"";return b(this.address+this.page*PAGE_SIZE)+" "+this.hexOpcode+" "+a}};return a}();var Parser=function(){function a(a,c){c.page=a.page;c.seek(a.address+16384*c.page);var d=c.getUint8(),k=null,l=null,m=!1,p=!1;a.opcode.push(d);switch(d){case 0:break;case 1:k=c.getUint16();break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:k=c.getUint8();break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:break;case 12:break;case 13:break;case 14:k=c.getUint8();break;case 15:break;case 16:l=c.position+c.getInt8();p=!0;break;case 17:k=c.getUint16();break;case 18:break; +JSSMS.Ports.prototype={reset:function(){LIGHTGUN?(this.ioPorts=Array(10),this.ioPorts[PORT_A+IO_TH_INPUT]=1,this.ioPorts[PORT_B+IO_TH_INPUT]=1):this.ioPorts=Array(2)},out:function(a,b){if(!(this.main.is_gg&&7>a))switch(a&193){case 1:LIGHTGUN?(this.oldTH=0!==this.getTH(PORT_A)||0!==this.getTH(PORT_B),this.writePort(PORT_A,b),this.writePort(PORT_B,b>>2),this.oldTH||0===this.getTH(PORT_A)&&0===this.getTH(PORT_B)||(this.hCounter=this.getHCount())):(this.ioPorts[0]=(b&32)<<1,this.ioPorts[1]=b&128,0=== +this.europe&&(this.ioPorts[0]=~this.ioPorts[0],this.ioPorts[1]=~this.ioPorts[1]));break;case 128:this.vdp.dataWrite(b);break;case 129:this.vdp.controlWrite(b);break;case 64:case 65:this.main.soundEnabled&&this.psg.write(b)}},in_:function(a){if(this.main.is_gg&&7>a)switch(a){case 0:return this.keyboard.ggstart&191|this.europe;case 1:case 2:case 3:case 4:case 5:return 0;case 6:return 255}switch(a&193){case 64:return this.vdp.getVCount();case 65:return this.hCounter;case 128:return this.vdp.dataRead(); +case 129:return this.vdp.controlRead();case 192:return this.keyboard.controller1;case 193:return LIGHTGUN?(this.keyboard.lightgunClick&&this.lightPhaserSync(),this.keyboard.controller2&63|(0!==this.getTH(PORT_A)?64:0)|(0!==this.getTH(PORT_B)?128:0)):this.keyboard.controller2&63|this.ioPorts[0]|this.ioPorts[1]}return 255},writePort:function(a,b){this.ioPorts[a+IO_TR_DIRECTION]=b&1;this.ioPorts[a+IO_TH_DIRECTION]=b&2;this.ioPorts[a+IO_TR_OUTPUT]=b&16;this.ioPorts[a+IO_TH_OUTPUT]=0===this.europe?~b& +32:b&32},getTH:function(a){return 0===this.ioPorts[a+IO_TH_DIRECTION]?this.ioPorts[a+IO_TH_OUTPUT]:this.ioPorts[a+IO_TH_INPUT]},setTH:function(a,b){this.ioPorts[a+IO_TH_DIRECTION]=1;this.ioPorts[a+IO_TH_INPUT]=b?1:0},getHCount:function(){var a=Math.round(this.main.cpu.getCycle()*SMS_X_PIXELS/this.main.cyclesPerLine)-8>>1;147-this.Y_RANGE&&e-this.X_RANGE&&c>1))):(this.setTH(PORT_A,!0),a!=this.getTH(PORT_A)&&(this.hCounter=b))},setDomestic:function(a){this.europe=a?64:0},isDomestic:function(){return 0!==this.europe}};var Bytecode=function(){function a(a,b){this.address=a;this.page=b;this.opcode=[];this.target=this.nextAddress=this.operand=null;this.isJumpTarget=this.canEnd=this.isFunctionEnder=!1;this.jumpTargetNb=0;this.ast=null}var b=JSSMS.Utils.toHex;a.prototype={get hexOpcode(){return this.opcode.length?this.opcode.map(b).join(" "):""},get label(){var a=this.name?this.name.replace(/(nn|n|PC\+e|d)/,b(this.target||this.operand||0)):"";return b(this.address+this.page*PAGE_SIZE)+" "+this.hexOpcode+" "+a}};return a}();var Parser=function(){function a(a,c){c.page=a.page;c.seek(a.address+16384*c.page);var d=c.getUint8(),k=null,l=null,m=!1,p=!1;a.opcode.push(d);switch(d){case 0:break;case 1:k=c.getUint16();break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:k=c.getUint8();break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:break;case 12:break;case 13:break;case 14:k=c.getUint8();break;case 15:break;case 16:l=c.position+c.getInt8();p=!0;break;case 17:k=c.getUint16();break;case 18:break; case 19:break;case 20:break;case 21:break;case 22:k=c.getUint8();break;case 23:break;case 24:l=c.position+c.getInt8();c.seek(null);m=!0;break;case 25:break;case 26:break;case 27:break;case 28:break;case 29:break;case 30:k=c.getUint8();break;case 31:break;case 32:l=c.position+c.getInt8();p=!0;break;case 33:k=c.getUint16();break;case 34:k=c.getUint16();break;case 35:break;case 36:break;case 37:break;case 38:k=c.getUint8();break;case 39:break;case 40:l=c.position+c.getInt8();p=!0;break;case 41:break; case 42:k=c.getUint16();break;case 43:break;case 44:break;case 45:break;case 46:k=c.getUint8();break;case 47:break;case 48:l=c.position+c.getInt8();p=!0;break;case 49:k=c.getUint16();break;case 50:k=c.getUint16();break;case 51:break;case 52:break;case 53:break;case 54:k=c.getUint8();break;case 55:break;case 56:l=c.position+c.getInt8();p=!0;break;case 57:break;case 58:k=c.getUint16();break;case 59:break;case 60:break;case 61:break;case 62:k=c.getUint8();break;case 63:break;case 64:break;case 65:break; case 66:break;case 67:break;case 68:break;case 69:break;case 70:break;case 71:break;case 72:break;case 73:break;case 74:break;case 75:break;case 76:break;case 77:break;case 78:break;case 79:break;case 80:break;case 81:break;case 82:break;case 83:break;case 84:break;case 85:break;case 86:break;case 87:break;case 88:break;case 89:break;case 90:break;case 91:break;case 92:break;case 93:break;case 94:break;case 95:break;case 96:break;case 97:break;case 98:break;case 99:break;case 100:break;case 101:break; @@ -339,88 +341,88 @@ b.getUint16();break;case 57:break;case 68:break;case 69:break;case 70:d=b.getUin break;case 111:break;case 112:d=b.getUint8();break;case 113:d=b.getUint8();break;case 114:d=b.getUint8();break;case 115:d=b.getUint8();break;case 116:d=b.getUint8();break;case 117:d=b.getUint8();break;case 119:d=b.getUint8();break;case 124:break;case 125:break;case 126:d=b.getUint8();break;case 132:break;case 133:break;case 134:d=b.getUint8();break;case 140:break;case 141:break;case 142:d=b.getUint8();break;case 148:break;case 149:break;case 150:d=b.getUint8();break;case 156:break;case 157:break; case 158:d=b.getUint8();break;case 164:break;case 165:break;case 166:d=b.getUint8();break;case 172:break;case 173:break;case 174:d=b.getUint8();break;case 180:break;case 181:break;case 182:d=b.getUint8();break;case 188:break;case 189:break;case 190:d=b.getUint8();break;case 203:return c=b.getUint8(),d=b.getUint8(),a.opcode.push(d),a.nextAddress=b.position,a.operand=c,a;case 225:break;case 227:break;case 229:break;case 233:b.seek(null);l=!0;break;case 249:break;default:JSSMS.Utils.console.error("Unexpected opcode", "0xDD/0xFD "+e(c))}a.nextAddress=b.position;a.operand=d;a.isFunctionEnder=l;return a}function c(a){this.rom=a;this.pos=null;this.page=0}var e=JSSMS.Utils.toHex,d=function(a,b){this.stream=new c(a);this.frameReg=b;this.addresses=Array(a.length);this.entryPoints=[];this.bytecodes=Array(a.length);for(var d=0;dd)JSSMS.Utils.console.error("Address out of bound",e(k));else if(!this.bytecodes[b][k]){var l=new Bytecode(k,b);this.bytecodes[b][k]=a(l,this.stream);null!=this.bytecodes[b][k].nextAddress&&(this.bytecodes[b][k].nextAddress>=c&&this.bytecodes[b][k].nextAddress<=d)&&this.addAddress(this.bytecodes[b][k].nextAddress); -null!=this.bytecodes[b][k].target&&(this.bytecodes[b][k].target>=c&&this.bytecodes[b][k].target<=d)&&this.addAddress(this.bytecodes[b][k].target)}}this.bytecodes[0][1023]?this.bytecodes[0][1023].isFunctionEnder=!0:this.bytecodes[0][1022]&&(this.bytecodes[0][1022].isFunctionEnder=!0);c=d=c=0;for(d=this.entryPoints.length;cc&&0==b&&(d=0,e=1024);do{this.bytecodes[b][c]?m=this.bytecodes[b][c]:(m=new Bytecode(c,b),this.bytecodes[b][c]=a(m,this.stream));if(m.canEnd&&!p)break;c=m.nextAddress%16384;l.push(m);p=!1;q=c+16384*b}while(null!=c&&q>=d&&q "+a[c].target+";"),null!=a[c].nextAddress&&b.push(" "+c+" -> "+a[c].nextAddress+";"));b.push("}");b=b.join("\n");b=b.replace(/ 0 \[label="/,' 0 [style=filled,color="#CC0000",label="');JSSMS.Utils.console.timeEnd("DOT generation");return b},addAddress:function(a){var b=~~(a/16384),c=this.frameReg[b];this.addresses[c].push({address:a%16384,romPage:c,memPage:b})}};c.prototype= +var c,d;void 0===b?(c=0,d=this.stream.length-1):(c=0,d=16383);for(b=0;bd)JSSMS.Utils.console.error("Address out of bound",e(k));else if(!this.bytecodes[b][k]){var l=new Bytecode(k,b);this.bytecodes[b][k]=a(l,this.stream);null!==this.bytecodes[b][k].nextAddress&&this.bytecodes[b][k].nextAddress>=c&&this.bytecodes[b][k].nextAddress<=d&&this.addAddress(this.bytecodes[b][k].nextAddress); +null!==this.bytecodes[b][k].target&&this.bytecodes[b][k].target>=c&&this.bytecodes[b][k].target<=d&&this.addAddress(this.bytecodes[b][k].target)}}this.bytecodes[0][1023]?this.bytecodes[0][1023].isFunctionEnder=!0:this.bytecodes[0][1022]&&(this.bytecodes[0][1022].isFunctionEnder=!0);c=d=c=0;for(d=this.entryPoints.length;cc&&0===b&&(d=0,e=1024);do{this.bytecodes[b][c]?m=this.bytecodes[b][c]:(m=new Bytecode(c,b),this.bytecodes[b][c]=a(m,this.stream));if(m.canEnd&&!p)break;c=m.nextAddress%16384;l.push(m);p=!1;q=c+16384*b}while(null!==c&&q>=d&&q "+a[c].target+";"),null!==a[c].nextAddress&&b.push(" "+c+" -> "+a[c].nextAddress+";"));b.push("}");b=b.join("\n");b=b.replace(/ 0 \[label="/,' 0 [style=filled,color="#CC0000",label="');JSSMS.Utils.console.timeEnd("DOT generation");return b},addAddress:function(a){var b=~~(a/16384),c=this.frameReg[b];this.addresses[c].push({address:a%16384,romPage:c,memPage:b})}};c.prototype= {get position(){return this.pos},get length(){return this.rom.length*PAGE_SIZE},seek:function(a){this.pos=a},getUint8:function(){var a=0,a=this.page,b=this.pos&16383,a=SUPPORT_DATAVIEW?this.rom[a].getUint8(b):this.rom[a][b]&255;this.pos++;return a},getInt8:function(){var a=0,a=this.page,b=this.pos&16383;SUPPORT_DATAVIEW?a=this.rom[a].getInt8(b):(a=this.rom[a][b]&255,128<=a&&(a-=256));this.pos++;return a+1},getUint16:function(){var a=0,a=this.page,b=this.pos&16383,a=SUPPORT_DATAVIEW?16383>(b&16383)? -this.rom[a].getUint16(b,LITTLE_ENDIAN):this.rom[a].getUint8(b)|this.rom[++a].getUint8(b)<<8:this.rom[a][b]&255|(this.rom[++a][b]&255)<<8;this.pos+=2;return a}};return d}();var UINT8=1,INT8=2,UINT16=3,BIT_TABLE=[1,2,4,8,16,32,64,128],n={IfStatement:function(a,b,c){void 0==c&&(c=null);return{type:"IfStatement",test:a,consequent:b,alternate:c}},BlockStatement:function(a){void 0==a&&(a=[]);Array.isArray(a)||(a=[a]);return{type:"BlockStatement",body:a}},ExpressionStatement:function(a){return{type:"ExpressionStatement",expression:a}},ReturnStatement:function(a){void 0==a&&(a=null);return{type:"ReturnStatement",argument:a}},VariableDeclaration:function(a,b){return{type:"VariableDeclaration", -declarations:[{type:"VariableDeclarator",id:{type:"Identifier",name:a},init:b}],kind:"var"}},Identifier:function(a){return{type:"Identifier",name:a}},Literal:function(a){return"number"==typeof a?{type:"Literal",value:a,raw:DEBUG?JSSMS.Utils.toHex(a):""+a}:{type:"Literal",value:a,raw:""+a}},CallExpression:function(a,b){void 0==b&&(b=[]);Array.isArray(b)||(b=[b]);return{type:"CallExpression",callee:n.Identifier(a),arguments:b}},AssignmentExpression:function(a,b,c){return{type:"AssignmentExpression", -operator:a,left:b,right:c}},BinaryExpression:function(a,b,c){return{type:"BinaryExpression",operator:a,left:b,right:c}},UnaryExpression:function(a,b){return{type:"UnaryExpression",operator:a,argument:b}},MemberExpression:function(a,b){return{type:"MemberExpression",computed:!0,object:a,property:b}},ArrayExpression:function(a){return{type:"ArrayExpression",elements:a}},ConditionalExpression:function(a,b,c){return{type:"ConditionalExpression",test:a,consequent:b,alternate:c}},LogicalExpression:function(a, -b,c){return{type:"LogicalExpression",operator:a,left:b,right:c}},Register:function(a){return{type:"Register",name:a}},Bit:function(a){return n.Literal(BIT_TABLE[a])}},o={SET16:function(a,b,c){if("Literal"==c.type){var e=evaluate(n.BinaryExpression(">>",c,n.Literal(8)));c=evaluate(n.BinaryExpression("&",c,n.Literal(255)));return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),e)),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),c))]}return[n.VariableDeclaration("val",c), -n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.BinaryExpression(">>",n.Identifier("val"),n.Literal(8)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),n.BinaryExpression("&",n.Identifier("val"),n.Literal(255))))]},EX:function(a,b){return SUPPORT_DESTRUCTURING?[n.ExpressionStatement(n.AssignmentExpression("=",n.ArrayExpression([n.Register(a),n.Register(b)]),n.ArrayExpression([n.Register(b),n.Register(a)])))]:[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"), -n.Register(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.Register(b))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),n.Identifier("temp")))]},NOOP:function(){return function(){}},LD8:function(a,b,c){return void 0==b&&void 0==c?function(b){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.Literal(b)))}:"i"==b&&void 0==c?function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.Register("i"))),n.ExpressionStatement(n.AssignmentExpression("=", -n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.MemberExpression(n.Identifier("SZ_TABLE"),n.Register(a))),n.ConditionalExpression(n.Identifier("iff2"),n.Literal(F_PARITY),n.Literal(0)))))]}:"r"==b&&void 0==c?function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),REFRESH_EMULATION?n.Register("r"):n.CallExpression("JSSMS.Utils.rndInt",n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=", -n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.MemberExpression(n.Identifier("SZ_TABLE"),n.Register(a))),n.ConditionalExpression(n.Identifier("iff2"),n.Literal(F_PARITY),n.Literal(0)))))]}:void 0==c?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.Register(b)))}:"n"==b&&"n"==c?function(b){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),o.READ_MEM8(n.Literal(b))))}:function(){return n.ExpressionStatement(n.AssignmentExpression("=", -n.Register(a),o.READ_MEM8(n.CallExpression("get"+(b+c).toUpperCase()))))}},LD8_D:function(a,b,c){return function(e){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)))))}},LD16:function(a,b,c,e){if(void 0==c&&void 0==e)return function(c){return o.SET16(a,b,n.Literal(c))};if("n"==c&&"n"==e)return function(c){return o.SET16(a,b,o.READ_MEM16(n.Literal(c)))};JSSMS.Utils.console.error("Wrong parameters number")}, -LD_WRITE_MEM:function(a,b,c,e){return void 0==c&&void 0==e?function(c){return n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)]))}:"n"==a&&"n"==b&&void 0==e?function(a){return n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(a),n.Register(c)]))}:"n"==a&&"n"==b?function(a){return[n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(a),n.Register(e)])),n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(a+1),n.Register(c)]))]}: -function(){return n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("get"+(a+b).toUpperCase()),n.Register(c)]))}},LD_SP:function(a,b){return void 0==a&&void 0==b?function(a){return n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("sp"),n.Literal(a)))}:function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("sp"),n.CallExpression("get"+(a+b).toUpperCase())))}},LD_NN:function(a,b){return void 0==b?function(b){return[n.ExpressionStatement(n.CallExpression("writeMem", -n.Literal(b),n.BinaryExpression("&",n.Identifier(a),n.Literal(255)))),n.ExpressionStatement(n.CallExpression("writeMem",n.Literal(b+1),n.BinaryExpression(">>",n.Identifier(a),n.Literal(8))))]}:function(c){return[n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(c),n.Register(b)])),n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(c+1),n.Register(a)]))]}},INC8:function(a,b){return void 0==b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.CallExpression("inc8", +this.rom[a].getUint16(b,LITTLE_ENDIAN):this.rom[a].getUint8(b)|this.rom[++a].getUint8(b)<<8:this.rom[a][b]&255|(this.rom[++a][b]&255)<<8;this.pos+=2;return a}};return d}();var BIT_TABLE=[1,2,4,8,16,32,64,128],n={IfStatement:function(a,b,c){void 0===c&&(c=null);return{type:"IfStatement",test:a,consequent:b,alternate:c}},BlockStatement:function(a){void 0===a&&(a=[]);Array.isArray(a)||(a=[a]);return{type:"BlockStatement",body:a}},ExpressionStatement:function(a){return{type:"ExpressionStatement",expression:a}},ReturnStatement:function(a){void 0===a&&(a=null);return{type:"ReturnStatement",argument:a}},VariableDeclaration:function(a,b){return{type:"VariableDeclaration",declarations:[{type:"VariableDeclarator", +id:{type:"Identifier",name:a},init:b}],kind:"var"}},Identifier:function(a){return{type:"Identifier",name:a}},Literal:function(a){return"number"==typeof a?{type:"Literal",value:a,raw:DEBUG?JSSMS.Utils.toHex(a):""+a}:{type:"Literal",value:a,raw:""+a}},CallExpression:function(a,b){void 0===b&&(b=[]);Array.isArray(b)||(b=[b]);return{type:"CallExpression",callee:n.Identifier(a),arguments:b}},AssignmentExpression:function(a,b,c){return{type:"AssignmentExpression",operator:a,left:b,right:c}},BinaryExpression:function(a, +b,c){return{type:"BinaryExpression",operator:a,left:b,right:c}},UnaryExpression:function(a,b){return{type:"UnaryExpression",operator:a,argument:b}},MemberExpression:function(a,b){return{type:"MemberExpression",computed:!0,object:a,property:b}},ArrayExpression:function(a){return{type:"ArrayExpression",elements:a}},ConditionalExpression:function(a,b,c){return{type:"ConditionalExpression",test:a,consequent:b,alternate:c}},LogicalExpression:function(a,b,c){return{type:"LogicalExpression",operator:a,left:b, +right:c}},Register:function(a){return{type:"Register",name:a}},Bit:function(a){return n.Literal(BIT_TABLE[a])}},o={SET16:function(a,b,c){return"Literal"==c.type?[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.BinaryExpression(">>",c,n.Literal(8)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),n.BinaryExpression("&",c,n.Literal(255))))]:[n.VariableDeclaration("val",c),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.BinaryExpression(">>",n.Identifier("val"), +n.Literal(8)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),n.BinaryExpression("&",n.Identifier("val"),n.Literal(255))))]},EX:function(a,b){return SUPPORT_DESTRUCTURING?[n.ExpressionStatement(n.AssignmentExpression("=",n.ArrayExpression([n.Register(a),n.Register(b)]),n.ArrayExpression([n.Register(b),n.Register(a)])))]:[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.Register(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.Register(b))), +n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),n.Identifier("temp")))]},NOOP:function(){return function(){}},LD8:function(a,b,c){return void 0===b&&void 0===c?function(b){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.Literal(b)))}:"i"==b&&void 0===c?function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.Register("i"))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|", +n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.MemberExpression(n.Identifier("SZ_TABLE"),n.Register(a))),n.ConditionalExpression(n.Identifier("iff2"),n.Literal(F_PARITY),n.Literal(0)))))]}:"r"==b&&void 0===c?function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),REFRESH_EMULATION?n.Register("r"):n.CallExpression("JSSMS.Utils.rndInt",n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|", +n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.MemberExpression(n.Identifier("SZ_TABLE"),n.Register(a))),n.ConditionalExpression(n.Identifier("iff2"),n.Literal(F_PARITY),n.Literal(0)))))]}:void 0===c?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.Register(b)))}:"n"==b&&"n"==c?function(b){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),o.READ_MEM8(n.Literal(b))))}:function(){return n.ExpressionStatement(n.AssignmentExpression("=", +n.Register(a),o.READ_MEM8(n.CallExpression("get"+(b+c).toUpperCase()))))}},LD8_D:function(a,b,c){return function(e){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)))))}},LD16:function(a,b,c,e){if(void 0===c&&void 0===e)return function(c){return o.SET16(a,b,n.Literal(c))};if("n"==c&&"n"==e)return function(c){return o.SET16(a,b,o.READ_MEM16(n.Literal(c)))};JSSMS.Utils.console.error("Wrong parameters number")}, +LD_WRITE_MEM:function(a,b,c,e){return void 0===c&&void 0===e?function(c){return n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)]))}:"n"==a&&"n"==b&&void 0===e?function(a){return n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(a),n.Register(c)]))}:"n"==a&&"n"==b?function(a){return[n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(a),n.Register(e)])),n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(a+1), +n.Register(c)]))]}:function(){return n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("get"+(a+b).toUpperCase()),n.Register(c)]))}},LD_SP:function(a,b){return void 0===a&&void 0===b?function(a){return n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("sp"),n.Literal(a)))}:function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("sp"),n.CallExpression("get"+(a+b).toUpperCase())))}},LD_NN:function(a,b){return void 0===b?function(b){return[n.ExpressionStatement(n.CallExpression("writeMem", +n.Literal(b),n.BinaryExpression("&",n.Identifier(a),n.Literal(255)))),n.ExpressionStatement(n.CallExpression("writeMem",n.Literal(b+1),n.BinaryExpression(">>",n.Identifier(a),n.Literal(8))))]}:function(c){return[n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(c),n.Register(b)])),n.ExpressionStatement(n.CallExpression("writeMem",[n.Literal(c+1),n.Register(a)]))]}},INC8:function(a,b){return void 0===b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.CallExpression("inc8", n.Register(a))))}:"s"==a&&"p"==b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("sp"),n.BinaryExpression("+",n.Identifier("sp"),n.Literal(1))))}:function(){return n.ExpressionStatement(n.CallExpression("incMem",n.CallExpression("getHL")))}},INC16:function(a,b){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),n.BinaryExpression("&",n.BinaryExpression("+",n.Register(b),n.Literal(1)),n.Literal(255)))),n.IfStatement(n.BinaryExpression("==", -n.Register(b),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.BinaryExpression("&",n.BinaryExpression("+",n.Register(a),n.Literal(1)),n.Literal(255))))]))]}},DEC8:function(a,b){return void 0==b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.CallExpression("dec8",n.Register(a))))}:"s"==a&&"p"==b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("sp"),n.BinaryExpression("-",n.Identifier("sp"), +n.Register(b),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.BinaryExpression("&",n.BinaryExpression("+",n.Register(a),n.Literal(1)),n.Literal(255))))]))]}},DEC8:function(a,b){return void 0===b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.CallExpression("dec8",n.Register(a))))}:"s"==a&&"p"==b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("sp"),n.BinaryExpression("-",n.Identifier("sp"), n.Literal(1))))}:function(){return n.ExpressionStatement(n.CallExpression("decMem",n.CallExpression("getHL")))}},DEC16:function(a,b){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),n.BinaryExpression("&",n.BinaryExpression("-",n.Register(b),n.Literal(1)),n.Literal(255)))),n.IfStatement(n.BinaryExpression("==",n.Register(b),n.Literal(255)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.BinaryExpression("&",n.BinaryExpression("-", -n.Register(a),n.Literal(1)),n.Literal(255))))]))]}},ADD16:function(a,b,c,e){return void 0==e?function(){return o.SET16(a,b,n.CallExpression("add16",[n.CallExpression("get"+(a+b).toUpperCase()),n.Register(c)]))}:function(){return o.SET16(a,b,n.CallExpression("add16",[n.CallExpression("get"+(a+b).toUpperCase()),n.CallExpression("get"+(c+e).toUpperCase())]))}},RLCA:function(){return function(){return n.ExpressionStatement(n.CallExpression("rlca_a"))}},RRCA:function(){return function(){return n.ExpressionStatement(n.CallExpression("rrca_a"))}}, +n.Register(a),n.Literal(1)),n.Literal(255))))]))]}},ADD16:function(a,b,c,e){return void 0===e?function(){return o.SET16(a,b,n.CallExpression("add16",[n.CallExpression("get"+(a+b).toUpperCase()),n.Register(c)]))}:function(){return o.SET16(a,b,n.CallExpression("add16",[n.CallExpression("get"+(a+b).toUpperCase()),n.CallExpression("get"+(c+e).toUpperCase())]))}},RLCA:function(){return function(){return n.ExpressionStatement(n.CallExpression("rlca_a"))}},RRCA:function(){return function(){return n.ExpressionStatement(n.CallExpression("rrca_a"))}}, RLA:function(){return function(){return n.ExpressionStatement(n.CallExpression("rla_a"))}},RRA:function(){return function(){return n.ExpressionStatement(n.CallExpression("rra_a"))}},DAA:function(){return function(){return n.ExpressionStatement(n.CallExpression("daa"))}},CPL:function(){return function(){return n.ExpressionStatement(n.CallExpression("cpl_a"))}},SCF:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_CARRY))),n.ExpressionStatement(n.AssignmentExpression("&=", -n.Register("f"),n.UnaryExpression("~",n.Literal(F_NEGATIVE)))),n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_HALFCARRY))))]}},CCF:function(){return function(){return n.ExpressionStatement(n.CallExpression("ccf"))}},ADD:function(a,b){return void 0==a&&void 0==b?function(a){return n.ExpressionStatement(n.CallExpression("add_a",n.Literal(a)))}:void 0==b?function(){return n.ExpressionStatement(n.CallExpression("add_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("add_a", -o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}},ADC:function(a,b){return void 0==a&&void 0==b?function(a){return n.ExpressionStatement(n.CallExpression("adc_a",n.Literal(a)))}:void 0==b?function(){return n.ExpressionStatement(n.CallExpression("adc_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("adc_a",o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}},SUB:function(a,b){return void 0==a&&void 0==b?function(a,b,d){return n.ExpressionStatement(n.CallExpression("sub_a", -n.Literal(a)))}:void 0==b?function(){return n.ExpressionStatement(n.CallExpression("sub_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("sub_a",o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}},SBC:function(a,b){return void 0==a&&void 0==b?function(a,b,d){return n.ExpressionStatement(n.CallExpression("sbc_a",n.Literal(a)))}:void 0==b?function(){return n.ExpressionStatement(n.CallExpression("sbc_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("sbc_a", -o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}},AND:function(a,b){return void 0==a&&void 0==b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("a"),n.Literal(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))]}:"a"!=a&&void 0==b?function(){return[n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("a"),n.Register(a))), -n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))]}:"a"==a&&void 0==b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))}:function(){return[n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("a"),o.READ_MEM8(n.CallExpression("get"+ -(a+b).toUpperCase())))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))]}},XOR:function(a,b){return void 0==a&&void 0==b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("^=",n.Register("a"),n.Literal(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}:"a"!=a&&void 0==b? -function(){return[n.ExpressionStatement(n.AssignmentExpression("^=",n.Register("a"),n.Register(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}:"a"==a&&void 0==b?function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register("a"),n.Literal(0))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Literal(0))))]}:function(){return[n.ExpressionStatement(n.AssignmentExpression("^=", -n.Register("a"),o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase())))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}},OR:function(a,b){return void 0==a&&void 0==b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("a"),n.Literal(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}:"a"!=a&&void 0== -b?function(){return[n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("a"),n.Register(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}:"a"==a&&void 0==b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))}:function(){return[n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("a"),o.READ_MEM8(n.CallExpression("get"+ -(a+b).toUpperCase())))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}},CP:function(a,b){return void 0==a&&void 0==b?function(a){return n.ExpressionStatement(n.CallExpression("cp_a",n.Literal(a)))}:void 0==b?function(){return n.ExpressionStatement(n.CallExpression("cp_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("cp_a",o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}},POP:function(a, -b){return function(){return[].concat(o.SET16(a,b,o.READ_MEM16(n.Identifier("sp"))),n.ExpressionStatement(n.AssignmentExpression("+=",n.Identifier("sp"),n.Literal(2))))}},PUSH:function(a,b){return function(){return n.ExpressionStatement(n.CallExpression("pushUint8",[n.Register(a),n.Register(b)]))}},JR:function(a){return function(b,c){return n.IfStatement(a,n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=",n.Identifier("tstates"),n.Literal(5))),n.ExpressionStatement(n.AssignmentExpression("=", +n.Register("f"),n.UnaryExpression("~",n.Literal(F_NEGATIVE)))),n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_HALFCARRY))))]}},CCF:function(){return function(){return n.ExpressionStatement(n.CallExpression("ccf"))}},ADD:function(a,b){return void 0===a&&void 0===b?function(a){return n.ExpressionStatement(n.CallExpression("add_a",n.Literal(a)))}:void 0===b?function(){return n.ExpressionStatement(n.CallExpression("add_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("add_a", +o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}},ADC:function(a,b){return void 0===a&&void 0===b?function(a){return n.ExpressionStatement(n.CallExpression("adc_a",n.Literal(a)))}:void 0===b?function(){return n.ExpressionStatement(n.CallExpression("adc_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("adc_a",o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}},SUB:function(a,b){return void 0===a&&void 0===b?function(a,b,d){return n.ExpressionStatement(n.CallExpression("sub_a", +n.Literal(a)))}:void 0===b?function(){return n.ExpressionStatement(n.CallExpression("sub_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("sub_a",o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}},SBC:function(a,b){return void 0===a&&void 0===b?function(a,b,d){return n.ExpressionStatement(n.CallExpression("sbc_a",n.Literal(a)))}:void 0===b?function(){return n.ExpressionStatement(n.CallExpression("sbc_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("sbc_a", +o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}},AND:function(a,b){return void 0===a&&void 0===b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("a"),n.Literal(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))]}:"a"!=a&&void 0===b?function(){return[n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("a"),n.Register(a))), +n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))]}:"a"==a&&void 0===b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))}:function(){return[n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("a"),o.READ_MEM8(n.CallExpression("get"+ +(a+b).toUpperCase())))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))]}},XOR:function(a,b){return void 0===a&&void 0===b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("^=",n.Register("a"),n.Literal(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}:"a"!=a&&void 0=== +b?function(){return[n.ExpressionStatement(n.AssignmentExpression("^=",n.Register("a"),n.Register(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}:"a"==a&&void 0===b?function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register("a"),n.Literal(0))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Literal(0))))]}:function(){return[n.ExpressionStatement(n.AssignmentExpression("^=", +n.Register("a"),o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase())))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}},OR:function(a,b){return void 0===a&&void 0===b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("a"),n.Literal(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}:"a"!=a&&void 0=== +b?function(){return[n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("a"),n.Register(a))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}:"a"==a&&void 0===b?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))}:function(){return[n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("a"),o.READ_MEM8(n.CallExpression("get"+ +(a+b).toUpperCase())))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}},CP:function(a,b){return void 0===a&&void 0===b?function(a){return n.ExpressionStatement(n.CallExpression("cp_a",n.Literal(a)))}:void 0===b?function(){return n.ExpressionStatement(n.CallExpression("cp_a",n.Register(a)))}:function(){return n.ExpressionStatement(n.CallExpression("cp_a",o.READ_MEM8(n.CallExpression("get"+(a+b).toUpperCase()))))}}, +POP:function(a,b){return function(){return[].concat(o.SET16(a,b,o.READ_MEM16(n.Identifier("sp"))),n.ExpressionStatement(n.AssignmentExpression("+=",n.Identifier("sp"),n.Literal(2))))}},PUSH:function(a,b){return function(){return n.ExpressionStatement(n.CallExpression("pushUint8",[n.Register(a),n.Register(b)]))}},JR:function(a){return function(b,c){return n.IfStatement(a,n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=",n.Identifier("tstates"),n.Literal(5))),n.ExpressionStatement(n.AssignmentExpression("=", n.Identifier("pc"),n.BinaryExpression("+",n.Literal(c%16384),n.BinaryExpression("*",n.Identifier("page"),n.Literal(16384))))),n.ReturnStatement()]))}},DJNZ:function(){return function(a,b){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register("b"),n.BinaryExpression("&",n.BinaryExpression("-",n.Register("b"),n.Literal(1)),n.Literal(255)))),o.JR(n.BinaryExpression("!=",n.Register("b"),n.Literal(0)))(void 0,b)]}},JRNZ:function(){return function(a,b){return o.JR(n.UnaryExpression("!",n.BinaryExpression("!=", n.BinaryExpression("&",n.Register("f"),n.Literal(F_ZERO)),n.Literal(0))))(void 0,b)}},JRZ:function(){return function(a,b){return o.JR(n.BinaryExpression("!=",n.BinaryExpression("&",n.Register("f"),n.Literal(F_ZERO)),n.Literal(0)))(void 0,b)}},JRNC:function(){return function(a,b){return o.JR(n.UnaryExpression("!",n.BinaryExpression("!=",n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.Literal(0))))(void 0,b)}},JRC:function(){return function(a,b){return o.JR(n.BinaryExpression("!=",n.BinaryExpression("&", -n.Register("f"),n.Literal(F_CARRY)),n.Literal(0)))(void 0,b)}},RET:function(a,b){return void 0==a&&void 0==b?function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),o.READ_MEM16(n.Identifier("sp")))),n.ExpressionStatement(n.AssignmentExpression("+=",n.Identifier("sp"),n.Literal(2))),n.ReturnStatement()]}:function(c,e,d){return n.IfStatement(n.BinaryExpression(a,n.BinaryExpression("&",n.Register("f"),n.Literal(b)),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", -n.Identifier("tstates"),n.Literal(6))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),o.READ_MEM16(n.Identifier("sp")))),n.ExpressionStatement(n.AssignmentExpression("+=",n.Identifier("sp"),n.Literal(2))),n.ReturnStatement()]))}},JP:function(a,b){return void 0==a&&void 0==b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.Literal(b))),n.ReturnStatement()]}:"h"==a&&"l"==b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("=", -n.Identifier("pc"),n.CallExpression("getHL"))),n.ReturnStatement()]}:function(c,e){return n.IfStatement(n.BinaryExpression(a,n.BinaryExpression("&",n.Register("f"),n.Literal(b)),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.Literal(e))),n.ReturnStatement()]))}},CALL:function(a,b){return void 0==a&&void 0==b?function(a,b,d){return[n.ExpressionStatement(n.CallExpression("push",n.BinaryExpression("+",n.Literal(d%16384),n.BinaryExpression("*",n.Identifier("page"), -n.Literal(16384))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.Literal(b))),n.ReturnStatement()]}:function(c,e,d){return n.IfStatement(n.BinaryExpression(a,n.BinaryExpression("&",n.Register("f"),n.Literal(b)),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=",n.Identifier("tstates"),n.Literal(7))),n.ExpressionStatement(n.CallExpression("push",n.BinaryExpression("+",n.Literal(d%16384),n.BinaryExpression("*",n.Identifier("page"),n.Literal(16384))))), -n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.Literal(e))),n.ReturnStatement()]))}},RST:function(a){return function(b,c,e){return[n.ExpressionStatement(n.CallExpression("push",n.BinaryExpression("+",n.Literal(e%16384),n.BinaryExpression("*",n.Identifier("page"),n.Literal(16384))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.Literal(a))),n.ReturnStatement()]}},DI:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=", -n.Identifier("iff1"),n.Literal(!1))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("iff2"),n.Literal(!1))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("EI_inst"),n.Literal(!0)))]}},EI:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("iff1"),n.Literal(!0))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("iff2"),n.Literal(!0))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("EI_inst"),n.Literal(!0)))]}}, -OUT:function(a,b){return void 0==b?function(b,e,d){return n.ExpressionStatement(n.CallExpression("port.out",[n.Literal(b),n.Register(a)]))}:function(){return n.ExpressionStatement(n.CallExpression("port.out",[n.Register(a),n.Register(b)]))}},IN:function(a,b){return void 0==b?function(b,e,d){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.CallExpression("port.in_",n.Literal(b))))}:function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.CallExpression("port.in_", -n.Register(b)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register(a)))))]}},EX_AF:function(){return function(){return[].concat(o.EX("a","a2"),o.EX("f","f2"))}},EXX:function(){return function(){return[].concat(o.EX("b","b2"),o.EX("c","c2"),o.EX("d","d2"),o.EX("e","e2"),o.EX("h","h2"),o.EX("l","l2"))}},EX_DE_HL:function(){return function(){return[].concat(o.EX("d", -"h"),o.EX("e","l"))}},EX_SP_HL:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.Register("h"))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("h"),o.READ_MEM8(n.BinaryExpression("+",n.Identifier("sp"),n.Literal(1))))),n.ExpressionStatement(n.CallExpression("writeMem",[n.BinaryExpression("+",n.Identifier("sp"),n.Literal(1)),n.Identifier("temp")])),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.Register("l"))), -n.ExpressionStatement(n.AssignmentExpression("=",n.Register("l"),o.READ_MEM8(n.Identifier("sp")))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("sp"),n.Identifier("temp")]))]}},HALT:function(){return function(a,b,c){a=[];HALT_SPEEDUP&&a.push(n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("tstates"),n.Literal(0))));return a.concat([n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("halt"),n.Literal(!0))),n.ExpressionStatement(n.AssignmentExpression("=", -n.Identifier("pc"),n.BinaryExpression("+",n.Literal((c-1)%16384),n.BinaryExpression("*",n.Identifier("page"),n.Literal(16384))))),n.ReturnStatement()])}},RLC:generateCBFunctions("rlc"),RRC:generateCBFunctions("rrc"),RL:generateCBFunctions("rl"),RR:generateCBFunctions("rr"),SLA:generateCBFunctions("sla"),SRA:generateCBFunctions("sra"),SLL:generateCBFunctions("sll"),SRL:generateCBFunctions("srl"),BIT:function(a,b,c){return void 0==c?function(){return n.ExpressionStatement(n.CallExpression("bit",n.BinaryExpression("&", -n.Register(b),n.Bit(a))))}:"h"==b&&"l"==c?function(){return n.ExpressionStatement(n.CallExpression("bit",n.BinaryExpression("&",o.READ_MEM8(n.CallExpression("get"+(b+c).toUpperCase())),n.Bit(a))))}:function(e,d,g){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("location"),n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)),n.Literal(65535)))),n.ExpressionStatement(n.CallExpression("bit",n.BinaryExpression("&",o.READ_MEM8(n.Identifier("location")), -n.Bit(a))))]}},RES:function(a,b,c){return void 0==c?function(){return n.ExpressionStatement(n.AssignmentExpression("&=",n.Register(b),n.UnaryExpression("~",n.Bit(a))))}:"h"==b&&"l"==c?function(){return n.ExpressionStatement(n.CallExpression("writeMem",n.CallExpression("get"+(b+c).toUpperCase()),n.BinaryExpression("&",o.READ_MEM8(n.CallExpression("get"+(b+c).toUpperCase())),n.UnaryExpression("~",n.Bit(a)))))}:function(e,d,g){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("location"), -n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)),n.Literal(65535)))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("location"),n.BinaryExpression("&",o.READ_MEM8(n.Identifier("location")),n.UnaryExpression("~",n.Bit(a)))]))]}},SET:function(a,b,c){return void 0==c?function(){return n.ExpressionStatement(n.AssignmentExpression("|=",n.Register(b),n.Bit(a)))}:"h"==b&&"l"==c?function(){return n.ExpressionStatement(n.CallExpression("writeMem", -[n.CallExpression("get"+(b+c).toUpperCase()),n.BinaryExpression("|",o.READ_MEM8(n.CallExpression("get"+(b+c).toUpperCase())),n.Bit(a))]))}:function(e,d,g){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("location"),n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)),n.Literal(65535)))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("location"),n.BinaryExpression("|",o.READ_MEM8(n.Identifier("location")),n.Bit(a))]))]}}, -LD_X:function(a,b,c){return void 0==c?function(c,d,g){return[n.ExpressionStatement(n.CallExpression("writeMem",[n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c&255)),n.Literal(c>>8)]))]}:function(e,d,g){return[n.ExpressionStatement(n.CallExpression("writeMem",[n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)),n.Register(a)]))]}},INC_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.CallExpression("incMem",n.BinaryExpression("+", -n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c))))]}},DEC_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.CallExpression("decMem",n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c))))]}},ADD_X:function(a,b){return function(c,e,d){return n.ExpressionStatement(n.CallExpression("add_a",o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)))))}},ADC_X:function(a,b){return function(c,e,d){return n.ExpressionStatement(n.CallExpression("adc_a", -o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)))))}},SUB_X:function(a,b){return function(c,e,d){return n.ExpressionStatement(n.CallExpression("sub_a",o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)))))}},SBC_X:function(a,b){return function(c,e,d){return n.ExpressionStatement(n.CallExpression("sbc_a",o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)))))}},AND_X:function(a, -b){return function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("a"),o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))]}},XOR_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("^=",n.Register("a"),o.READ_MEM8(n.BinaryExpression("+", -n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}},OR_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("a"),o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"), -n.Register("a"))))]}},CP_X:function(a,b){return function(c){return n.ExpressionStatement(n.CallExpression("cp_a",o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)))))}},EX_SP_X:function(a,b){return function(){return[].concat(n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.CallExpression("get"+(a+b).toUpperCase()))),o.SET16(a,b,o.READ_MEM16(n.Identifier("sp"))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("sp"),n.BinaryExpression("&", -n.Identifier("temp"),n.Literal(255))])),n.ExpressionStatement(n.CallExpression("writeMem",[n.BinaryExpression("+",n.Identifier("sp"),n.Literal(1)),n.BinaryExpression(">>",n.Identifier("sp"),n.Literal(8))])))}},JP_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.CallExpression("get"+(a+b).toUpperCase()))),n.ReturnStatement()]}},ADC16:function(a,b){return function(c,e,d){return[void 0==b?n.VariableDeclaration("value",n.Identifier(a)): -n.VariableDeclaration("value",n.BinaryExpression("|",n.BinaryExpression("<<",n.Register(a),n.Literal(8)),n.Register(b))),n.VariableDeclaration("val",n.BinaryExpression("|",n.BinaryExpression("<<",n.Register("h"),n.Literal(8)),n.Register("l"))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("+",n.BinaryExpression("+",n.Identifier("val"),n.Identifier("value")),n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY))))),n.ExpressionStatement(n.AssignmentExpression("=", -n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.BinaryExpression(">>",n.BinaryExpression("^",n.BinaryExpression("^",n.Identifier("val"),n.Identifier("temp")),n.Identifier("value")),n.Literal(8)),n.Literal(16)),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(16)),n.Literal(1))),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(8)),n.Literal(128))),n.ConditionalExpression(n.BinaryExpression("!=", -n.BinaryExpression("&",n.Identifier("temp"),n.Literal(65535)),n.Literal(0)),n.Literal(0),n.Literal(64))),n.BinaryExpression(">>",n.BinaryExpression("&",n.BinaryExpression("&",n.BinaryExpression("^",n.BinaryExpression("^",n.Identifier("value"),n.Identifier("val")),n.Literal(32768)),n.BinaryExpression("^",n.Identifier("value"),n.Identifier("temp"))),n.Literal(32768)),n.Literal(13))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("h"),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"), -n.Literal(8)),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("l"),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(255))))]}},SBC16:function(a,b){return function(c,e,d){return[void 0==b?n.VariableDeclaration("value",n.Identifier(a)):n.VariableDeclaration("value",n.BinaryExpression("|",n.BinaryExpression("<<",n.Register(a),n.Literal(8)),n.Register(b))),n.VariableDeclaration("val",n.BinaryExpression("|",n.BinaryExpression("<<",n.Register("h"),n.Literal(8)),n.Register("l"))), -n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("-",n.BinaryExpression("-",n.Identifier("val"),n.Identifier("value")),n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.BinaryExpression(">>",n.BinaryExpression("^",n.BinaryExpression("^",n.Identifier("val"), -n.Identifier("temp")),n.Identifier("value")),n.Literal(8)),n.Literal(16)),n.Literal(2)),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(16)),n.Literal(1))),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(8)),n.Literal(128))),n.ConditionalExpression(n.BinaryExpression("!=",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(65535)),n.Literal(0)),n.Literal(0),n.Literal(64))),n.BinaryExpression(">>",n.BinaryExpression("&",n.BinaryExpression("&", -n.BinaryExpression("^",n.Identifier("value"),n.Identifier("val")),n.BinaryExpression("^",n.Identifier("val"),n.Identifier("temp"))),n.Literal(32768)),n.Literal(13))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("h"),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(8)),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("l"),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(255))))]}},NEG:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=", -n.Identifier("temp"),n.Register("a"))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("a"),n.Literal(0))),n.ExpressionStatement(n.CallExpression("sub_a",n.Identifier("temp")))]}},RETN_RETI:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),o.READ_MEM16(n.Identifier("sp")))),n.ExpressionStatement(n.AssignmentExpression("+=",n.Identifier("sp"),n.Literal(2))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("iff1"),n.Identifier("iff2")))]}}, -IM:function(a){return function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("im"),n.Literal(a)))}},INI:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.CallExpression("port.in_",n.Register("c")))),n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("getHL"),n.Identifier("temp")])),o.DEC8("b")(),n.ExpressionStatement(n.CallExpression("incHL")),n.IfStatement(n.BinaryExpression("==",n.BinaryExpression("&", -n.Identifier("temp"),n.Literal(128)),n.Literal(128)),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_NEGATIVE)))),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_NEGATIVE))))))]}},OUTI:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))),n.ExpressionStatement(n.CallExpression("port.out", -[n.Register("c"),n.Identifier("temp")])),o.DEC8("b")(),n.ExpressionStatement(n.CallExpression("incHL")),n.IfStatement(n.BinaryExpression(">",n.BinaryExpression("+",n.Register("l"),n.Identifier("temp")),n.Literal(255)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_CARRY))),n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_HALFCARRY)))]),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~", -n.Literal(F_CARRY)))),n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_HALFCARRY))))])),n.IfStatement(n.BinaryExpression("==",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(128)),n.Literal(128)),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_NEGATIVE)))),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_NEGATIVE))))))]}},OUTD:function(){return function(a, -b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))),n.ExpressionStatement(n.CallExpression("port.out",[n.Register("c"),n.Identifier("temp")])),o.DEC8("b")(),n.ExpressionStatement(n.CallExpression("decHL")),n.IfStatement(n.BinaryExpression(">",n.BinaryExpression("+",n.Register("l"),n.Identifier("temp")),n.Literal(255)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_CARRY))),n.ExpressionStatement(n.AssignmentExpression("|=", -n.Register("f"),n.Literal(F_HALFCARRY)))]),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_CARRY)))),n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_HALFCARRY))))])),n.IfStatement(n.BinaryExpression("==",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(128)),n.Literal(128)),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_NEGATIVE)))), -n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_NEGATIVE))))))]}},LDI:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))),n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("getDE"),n.Identifier("temp")])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("incDE")),n.ExpressionStatement(n.CallExpression("incHL")), -n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("&",n.BinaryExpression("+",n.Identifier("temp"),n.Register("a")),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(193)),n.ConditionalExpression(n.CallExpression("getBC"),n.Literal(F_PARITY),n.Literal(0))),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_BIT3))), -n.ConditionalExpression(n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_NEGATIVE)),n.Literal(32),n.Literal(0)))))]}},CPI:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.Literal(F_NEGATIVE)))),n.ExpressionStatement(n.CallExpression("cp_a",[o.READ_MEM8(n.CallExpression("getHL"))])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("incHL")), -n.ExpressionStatement(n.AssignmentExpression("|=",n.Identifier("temp"),n.ConditionalExpression(n.BinaryExpression("==",n.CallExpression("getBC"),n.Literal(0)),n.Literal(0),n.Literal(F_PARITY)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(248)),n.Identifier("temp"))))]}},LDD:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))), -n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("getDE"),n.Identifier("temp")])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("decDE")),n.ExpressionStatement(n.CallExpression("decHL")),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("&",n.BinaryExpression("+",n.Identifier("temp"),n.Register("a")),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|", -n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(193)),n.ConditionalExpression(n.CallExpression("getBC"),n.Literal(F_PARITY),n.Literal(0))),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_BIT3))),n.ConditionalExpression(n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_NEGATIVE)),n.Literal(32),n.Literal(0)))))]}},LDIR:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))), -n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("getDE"),n.Identifier("temp")])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("incDE")),n.ExpressionStatement(n.CallExpression("incHL")),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("&",n.BinaryExpression("+",n.Identifier("temp"),n.Register("a")),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|", -n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(193)),n.ConditionalExpression(n.CallExpression("getBC"),n.Literal(F_PARITY),n.Literal(0))),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_BIT3))),n.ConditionalExpression(n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_NEGATIVE)),n.Literal(32),n.Literal(0))))),n.IfStatement(n.BinaryExpression("!=",n.CallExpression("getBC"),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", -n.Identifier("tstates"),n.Literal(5))),n.ReturnStatement()]))]}},CPIR:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.Literal(F_NEGATIVE)))),n.ExpressionStatement(n.CallExpression("cp_a",[o.READ_MEM8(n.CallExpression("getHL"))])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("incHL")),n.ExpressionStatement(n.AssignmentExpression("|=", -n.Identifier("temp"),n.ConditionalExpression(n.BinaryExpression("==",n.CallExpression("getBC"),n.Literal(0)),n.Literal(0),n.Literal(F_PARITY)))),n.IfStatement(n.LogicalExpression("&&",n.BinaryExpression("!=",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_PARITY)),n.Literal(0)),n.BinaryExpression("==",n.BinaryExpression("&",n.Register("f"),n.Literal(F_ZERO)),n.Literal(0))),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=",n.Identifier("tstates"),n.Literal(5))),n.ExpressionStatement(n.AssignmentExpression("=", +n.Register("f"),n.Literal(F_CARRY)),n.Literal(0)))(void 0,b)}},RET:function(a,b){return void 0===a&&void 0===b?function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),o.READ_MEM16(n.Identifier("sp")))),n.ExpressionStatement(n.AssignmentExpression("+=",n.Identifier("sp"),n.Literal(2)))]}:function(c,e,d){return n.IfStatement(n.BinaryExpression(a,n.BinaryExpression("&",n.Register("f"),n.Literal(b)),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=", +n.Identifier("tstates"),n.Literal(6))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),o.READ_MEM16(n.Identifier("sp")))),n.ExpressionStatement(n.AssignmentExpression("+=",n.Identifier("sp"),n.Literal(2))),n.ReturnStatement()]))}},JP:function(a,b){return void 0===a&&void 0===b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.Literal(b)))]}:"h"==a&&"l"==b?function(a,b,d){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"), +n.CallExpression("getHL")))]}:function(c,e){return n.IfStatement(n.BinaryExpression(a,n.BinaryExpression("&",n.Register("f"),n.Literal(b)),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.Literal(e))),n.ReturnStatement()]))}},CALL:function(a,b){return void 0===a&&void 0===b?function(a,b,d){return[n.ExpressionStatement(n.CallExpression("push",n.BinaryExpression("+",n.Literal(d%16384),n.BinaryExpression("*",n.Identifier("page"),n.Literal(16384))))), +n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.Literal(b))),n.ReturnStatement()]}:function(c,e,d){return n.IfStatement(n.BinaryExpression(a,n.BinaryExpression("&",n.Register("f"),n.Literal(b)),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=",n.Identifier("tstates"),n.Literal(7))),n.ExpressionStatement(n.CallExpression("push",n.BinaryExpression("+",n.Literal(d%16384),n.BinaryExpression("*",n.Identifier("page"),n.Literal(16384))))),n.ExpressionStatement(n.AssignmentExpression("=", +n.Identifier("pc"),n.Literal(e))),n.ReturnStatement()]))}},RST:function(a){return function(b,c,e){return[n.ExpressionStatement(n.CallExpression("push",n.BinaryExpression("+",n.Literal(e%16384),n.BinaryExpression("*",n.Identifier("page"),n.Literal(16384))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.Literal(a))),n.ReturnStatement()]}},DI:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("iff1"),n.Literal(!1))),n.ExpressionStatement(n.AssignmentExpression("=", +n.Identifier("iff2"),n.Literal(!1))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("EI_inst"),n.Literal(!0)))]}},EI:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("iff1"),n.Literal(!0))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("iff2"),n.Literal(!0))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("EI_inst"),n.Literal(!0)))]}},OUT:function(a,b){return void 0===b?function(b,e,d){return n.ExpressionStatement(n.CallExpression("port.out", +[n.Literal(b),n.Register(a)]))}:function(){return n.ExpressionStatement(n.CallExpression("port.out",[n.Register(a),n.Register(b)]))}},IN:function(a,b){return void 0===b?function(b,e,d){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.CallExpression("port.in_",n.Literal(b))))}:function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Register(a),n.CallExpression("port.in_",n.Register(b)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|", +n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register(a)))))]}},EX_AF:function(){return function(){return[].concat(o.EX("a","a2"),o.EX("f","f2"))}},EXX:function(){return function(){return[].concat(o.EX("b","b2"),o.EX("c","c2"),o.EX("d","d2"),o.EX("e","e2"),o.EX("h","h2"),o.EX("l","l2"))}},EX_DE_HL:function(){return function(){return[].concat(o.EX("d","h"),o.EX("e","l"))}},EX_SP_HL:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=", +n.Identifier("temp"),n.Register("h"))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("h"),o.READ_MEM8(n.BinaryExpression("+",n.Identifier("sp"),n.Literal(1))))),n.ExpressionStatement(n.CallExpression("writeMem",[n.BinaryExpression("+",n.Identifier("sp"),n.Literal(1)),n.Identifier("temp")])),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.Register("l"))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("l"),o.READ_MEM8(n.Identifier("sp")))),n.ExpressionStatement(n.CallExpression("writeMem", +[n.Identifier("sp"),n.Identifier("temp")]))]}},HALT:function(){return function(a,b,c){a=[];HALT_SPEEDUP&&a.push(n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("tstates"),n.Literal(0))));return a.concat([n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("halt"),n.Literal(!0))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.BinaryExpression("+",n.Literal((c-1)%16384),n.BinaryExpression("*",n.Identifier("page"),n.Literal(16384))))),n.ReturnStatement()])}}, +RLC:generateCBFunctions("rlc"),RRC:generateCBFunctions("rrc"),RL:generateCBFunctions("rl"),RR:generateCBFunctions("rr"),SLA:generateCBFunctions("sla"),SRA:generateCBFunctions("sra"),SLL:generateCBFunctions("sll"),SRL:generateCBFunctions("srl"),BIT:function(a,b,c){return void 0===c?function(){return n.ExpressionStatement(n.CallExpression("bit",n.BinaryExpression("&",n.Register(b),n.Bit(a))))}:"h"==b&&"l"==c?function(){return n.ExpressionStatement(n.CallExpression("bit",n.BinaryExpression("&",o.READ_MEM8(n.CallExpression("get"+ +(b+c).toUpperCase())),n.Bit(a))))}:function(e,d,g){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("location"),n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)),n.Literal(65535)))),n.ExpressionStatement(n.CallExpression("bit",n.BinaryExpression("&",o.READ_MEM8(n.Identifier("location")),n.Bit(a))))]}},RES:function(a,b,c){return void 0===c?function(){return n.ExpressionStatement(n.AssignmentExpression("&=",n.Register(b),n.UnaryExpression("~", +n.Bit(a))))}:"h"==b&&"l"==c?function(){return n.ExpressionStatement(n.CallExpression("writeMem",n.CallExpression("get"+(b+c).toUpperCase()),n.BinaryExpression("&",o.READ_MEM8(n.CallExpression("get"+(b+c).toUpperCase())),n.UnaryExpression("~",n.Bit(a)))))}:function(e,d,g){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("location"),n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)),n.Literal(65535)))),n.ExpressionStatement(n.CallExpression("writeMem", +[n.Identifier("location"),n.BinaryExpression("&",o.READ_MEM8(n.Identifier("location")),n.UnaryExpression("~",n.Bit(a)))]))]}},SET:function(a,b,c){return void 0===c?function(){return n.ExpressionStatement(n.AssignmentExpression("|=",n.Register(b),n.Bit(a)))}:"h"==b&&"l"==c?function(){return n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("get"+(b+c).toUpperCase()),n.BinaryExpression("|",o.READ_MEM8(n.CallExpression("get"+(b+c).toUpperCase())),n.Bit(a))]))}:function(e,d,g){return[n.ExpressionStatement(n.AssignmentExpression("=", +n.Identifier("location"),n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)),n.Literal(65535)))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("location"),n.BinaryExpression("|",o.READ_MEM8(n.Identifier("location")),n.Bit(a))]))]}},LD_X:function(a,b,c){return void 0===c?function(c,d,g){return[n.ExpressionStatement(n.CallExpression("writeMem",[n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c&255)),n.Literal(c>> +8)]))]}:function(e,d,g){return[n.ExpressionStatement(n.CallExpression("writeMem",[n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(e)),n.Register(a)]))]}},INC_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.CallExpression("incMem",n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c))))]}},DEC_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.CallExpression("decMem",n.BinaryExpression("+",n.CallExpression("get"+ +(a+b).toUpperCase()),n.Literal(c))))]}},ADD_X:function(a,b){return function(c,e,d){return n.ExpressionStatement(n.CallExpression("add_a",o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)))))}},ADC_X:function(a,b){return function(c,e,d){return n.ExpressionStatement(n.CallExpression("adc_a",o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)))))}},SUB_X:function(a,b){return function(c,e,d){return n.ExpressionStatement(n.CallExpression("sub_a", +o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)))))}},SBC_X:function(a,b){return function(c,e,d){return n.ExpressionStatement(n.CallExpression("sbc_a",o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c)))))}},AND_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("a"),o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c))))), +n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a")),n.Literal(F_HALFCARRY))))]}},XOR_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("^=",n.Register("a"),o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"), +n.Register("a"))))]}},OR_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("a"),o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+(a+b).toUpperCase()),n.Literal(c))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.MemberExpression(n.Identifier("SZP_TABLE"),n.Register("a"))))]}},CP_X:function(a,b){return function(c){return n.ExpressionStatement(n.CallExpression("cp_a",o.READ_MEM8(n.BinaryExpression("+",n.CallExpression("get"+ +(a+b).toUpperCase()),n.Literal(c)))))}},EX_SP_X:function(a,b){return function(){return[].concat(n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.CallExpression("get"+(a+b).toUpperCase()))),o.SET16(a,b,o.READ_MEM16(n.Identifier("sp"))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("sp"),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(255))])),n.ExpressionStatement(n.CallExpression("writeMem",[n.BinaryExpression("+",n.Identifier("sp"),n.Literal(1)),n.BinaryExpression(">>", +n.Identifier("sp"),n.Literal(8))])))}},JP_X:function(a,b){return function(c,e,d){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),n.CallExpression("get"+(a+b).toUpperCase())))]}},ADC16:function(a,b){return function(c,e,d){return[void 0===b?n.VariableDeclaration("value",n.Identifier(a)):n.VariableDeclaration("value",n.BinaryExpression("|",n.BinaryExpression("<<",n.Register(a),n.Literal(8)),n.Register(b))),n.VariableDeclaration("val",n.BinaryExpression("|",n.BinaryExpression("<<", +n.Register("h"),n.Literal(8)),n.Register("l"))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("+",n.BinaryExpression("+",n.Identifier("val"),n.Identifier("value")),n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.BinaryExpression(">>",n.BinaryExpression("^",n.BinaryExpression("^", +n.Identifier("val"),n.Identifier("temp")),n.Identifier("value")),n.Literal(8)),n.Literal(16)),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(16)),n.Literal(1))),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(8)),n.Literal(128))),n.ConditionalExpression(n.BinaryExpression("!=",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(65535)),n.Literal(0)),n.Literal(0),n.Literal(64))),n.BinaryExpression(">>",n.BinaryExpression("&",n.BinaryExpression("&", +n.BinaryExpression("^",n.BinaryExpression("^",n.Identifier("value"),n.Identifier("val")),n.Literal(32768)),n.BinaryExpression("^",n.Identifier("value"),n.Identifier("temp"))),n.Literal(32768)),n.Literal(13))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("h"),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(8)),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("l"),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(255))))]}}, +SBC16:function(a,b){return function(c,e,d){return[void 0===b?n.VariableDeclaration("value",n.Identifier(a)):n.VariableDeclaration("value",n.BinaryExpression("|",n.BinaryExpression("<<",n.Register(a),n.Literal(8)),n.Register(b))),n.VariableDeclaration("val",n.BinaryExpression("|",n.BinaryExpression("<<",n.Register("h"),n.Literal(8)),n.Register("l"))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("-",n.BinaryExpression("-",n.Identifier("val"),n.Identifier("value")), +n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.BinaryExpression(">>",n.BinaryExpression("^",n.BinaryExpression("^",n.Identifier("val"),n.Identifier("temp")),n.Identifier("value")),n.Literal(8)),n.Literal(16)),n.Literal(2)),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"), +n.Literal(16)),n.Literal(1))),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(8)),n.Literal(128))),n.ConditionalExpression(n.BinaryExpression("!=",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(65535)),n.Literal(0)),n.Literal(0),n.Literal(64))),n.BinaryExpression(">>",n.BinaryExpression("&",n.BinaryExpression("&",n.BinaryExpression("^",n.Identifier("value"),n.Identifier("val")),n.BinaryExpression("^",n.Identifier("val"),n.Identifier("temp"))),n.Literal(32768)), +n.Literal(13))))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("h"),n.BinaryExpression("&",n.BinaryExpression(">>",n.Identifier("temp"),n.Literal(8)),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("l"),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(255))))]}},NEG:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.Register("a"))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("a"), +n.Literal(0))),n.ExpressionStatement(n.CallExpression("sub_a",n.Identifier("temp")))]}},RETN_RETI:function(){return function(){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("pc"),o.READ_MEM16(n.Identifier("sp")))),n.ExpressionStatement(n.AssignmentExpression("+=",n.Identifier("sp"),n.Literal(2))),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("iff1"),n.Identifier("iff2")))]}},IM:function(a){return function(){return n.ExpressionStatement(n.AssignmentExpression("=", +n.Identifier("im"),n.Literal(a)))}},INI:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.CallExpression("port.in_",n.Register("c")))),n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("getHL"),n.Identifier("temp")])),o.DEC8("b")(),n.ExpressionStatement(n.CallExpression("incHL")),n.IfStatement(n.BinaryExpression("==",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(128)),n.Literal(128)),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=", +n.Register("f"),n.Literal(F_NEGATIVE)))),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_NEGATIVE))))))]}},OUTI:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))),n.ExpressionStatement(n.CallExpression("port.out",[n.Register("c"),n.Identifier("temp")])),o.DEC8("b")(),n.ExpressionStatement(n.CallExpression("incHL")),n.IfStatement(n.BinaryExpression(">", +n.BinaryExpression("+",n.Register("l"),n.Identifier("temp")),n.Literal(255)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_CARRY))),n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_HALFCARRY)))]),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_CARRY)))),n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_HALFCARRY))))])), +n.IfStatement(n.BinaryExpression("==",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(128)),n.Literal(128)),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_NEGATIVE)))),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_NEGATIVE))))))]}},OUTD:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))), +n.ExpressionStatement(n.CallExpression("port.out",[n.Register("c"),n.Identifier("temp")])),o.DEC8("b")(),n.ExpressionStatement(n.CallExpression("decHL")),n.IfStatement(n.BinaryExpression(">",n.BinaryExpression("+",n.Register("l"),n.Identifier("temp")),n.Literal(255)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_CARRY))),n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_HALFCARRY)))]),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=", +n.Register("f"),n.UnaryExpression("~",n.Literal(F_CARRY)))),n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_HALFCARRY))))])),n.IfStatement(n.BinaryExpression("==",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(128)),n.Literal(128)),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_NEGATIVE)))),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~", +n.Literal(F_NEGATIVE))))))]}},LDI:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))),n.ExpressionStatement(n.CallExpression("writeMem",[n.CallExpression("getDE"),n.Identifier("temp")])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("incDE")),n.ExpressionStatement(n.CallExpression("incHL")),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"), +n.BinaryExpression("&",n.BinaryExpression("+",n.Identifier("temp"),n.Register("a")),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(193)),n.ConditionalExpression(n.CallExpression("getBC"),n.Literal(F_PARITY),n.Literal(0))),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_BIT3))),n.ConditionalExpression(n.BinaryExpression("&",n.Identifier("temp"), +n.Literal(F_NEGATIVE)),n.Literal(32),n.Literal(0)))))]}},CPI:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.Literal(F_NEGATIVE)))),n.ExpressionStatement(n.CallExpression("cp_a",[o.READ_MEM8(n.CallExpression("getHL"))])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("incHL")),n.ExpressionStatement(n.AssignmentExpression("|=", +n.Identifier("temp"),n.ConditionalExpression(n.BinaryExpression("==",n.CallExpression("getBC"),n.Literal(0)),n.Literal(0),n.Literal(F_PARITY)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(248)),n.Identifier("temp"))))]}},LDD:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))),n.ExpressionStatement(n.CallExpression("writeMem", +[n.CallExpression("getDE"),n.Identifier("temp")])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("decDE")),n.ExpressionStatement(n.CallExpression("decHL")),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("&",n.BinaryExpression("+",n.Identifier("temp"),n.Register("a")),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|", +n.BinaryExpression("&",n.Register("f"),n.Literal(193)),n.ConditionalExpression(n.CallExpression("getBC"),n.Literal(F_PARITY),n.Literal(0))),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_BIT3))),n.ConditionalExpression(n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_NEGATIVE)),n.Literal(32),n.Literal(0)))))]}},LDIR:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))),n.ExpressionStatement(n.CallExpression("writeMem", +[n.CallExpression("getDE"),n.Identifier("temp")])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("incDE")),n.ExpressionStatement(n.CallExpression("incHL")),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("&",n.BinaryExpression("+",n.Identifier("temp"),n.Register("a")),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|", +n.BinaryExpression("&",n.Register("f"),n.Literal(193)),n.ConditionalExpression(n.CallExpression("getBC"),n.Literal(F_PARITY),n.Literal(0))),n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_BIT3))),n.ConditionalExpression(n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_NEGATIVE)),n.Literal(32),n.Literal(0))))),n.IfStatement(n.BinaryExpression("!=",n.CallExpression("getBC"),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=",n.Identifier("tstates"),n.Literal(5))), +n.ReturnStatement()]))]}},CPIR:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(F_CARRY)),n.Literal(F_NEGATIVE)))),n.ExpressionStatement(n.CallExpression("cp_a",[o.READ_MEM8(n.CallExpression("getHL"))])),n.ExpressionStatement(n.CallExpression("decBC")),n.ExpressionStatement(n.CallExpression("incHL")),n.ExpressionStatement(n.AssignmentExpression("|=",n.Identifier("temp"), +n.ConditionalExpression(n.BinaryExpression("==",n.CallExpression("getBC"),n.Literal(0)),n.Literal(0),n.Literal(F_PARITY)))),n.IfStatement(n.LogicalExpression("&&",n.BinaryExpression("!=",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_PARITY)),n.Literal(0)),n.BinaryExpression("==",n.BinaryExpression("&",n.Register("f"),n.Literal(F_ZERO)),n.Literal(0))),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=",n.Identifier("tstates"),n.Literal(5))),n.ExpressionStatement(n.AssignmentExpression("=", n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(248)),n.Identifier("temp")))),n.ReturnStatement()])),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(248)),n.Identifier("temp"))))]}},OTIR:function(){return function(a,b,c){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),o.READ_MEM8(n.CallExpression("getHL")))),n.ExpressionStatement(n.CallExpression("port.out", [n.Register("c"),n.Identifier("temp")])),o.DEC8("b")(),n.ExpressionStatement(n.CallExpression("incHL")),n.IfStatement(n.BinaryExpression(">",n.BinaryExpression("+",n.Register("l"),n.Identifier("temp")),n.Literal(255)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_CARRY))),n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_HALFCARRY)))]),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~", n.Literal(F_CARRY)))),n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_HALFCARRY))))])),n.IfStatement(n.BinaryExpression("!=",n.BinaryExpression("&",n.Identifier("temp"),n.Literal(128)),n.Literal(0)),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("|=",n.Register("f"),n.Literal(F_NEGATIVE)))),n.BlockStatement(n.ExpressionStatement(n.AssignmentExpression("&=",n.Register("f"),n.UnaryExpression("~",n.Literal(F_NEGATIVE)))))),n.IfStatement(n.BinaryExpression("!=", @@ -428,50 +430,49 @@ n.Register("b"),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.Assignme n.ExpressionStatement(n.CallExpression("decHL")),n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("temp"),n.BinaryExpression("&",n.BinaryExpression("+",n.Identifier("temp"),n.Register("a")),n.Literal(255)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register("f"),n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("|",n.BinaryExpression("&",n.Register("f"),n.Literal(193)),n.ConditionalExpression(n.CallExpression("getBC"),n.Literal(F_PARITY),n.Literal(0))),n.BinaryExpression("&", n.Identifier("temp"),n.Literal(F_BIT3))),n.ConditionalExpression(n.BinaryExpression("&",n.Identifier("temp"),n.Literal(F_NEGATIVE)),n.Literal(32),n.Literal(0))))),n.IfStatement(n.BinaryExpression("!=",n.CallExpression("getBC"),n.Literal(0)),n.BlockStatement([n.ExpressionStatement(n.AssignmentExpression("-=",n.Identifier("tstates"),n.Literal(5))),n.ReturnStatement()]))]}},LD_RLC:generateIndexCBFunctions("rlc"),LD_RRC:generateIndexCBFunctions("rrc"),LD_RL:generateIndexCBFunctions("rl"),LD_RR:generateIndexCBFunctions("rr"), LD_SLA:generateIndexCBFunctions("sla"),LD_SRA:generateIndexCBFunctions("sra"),LD_SLL:generateIndexCBFunctions("sll"),LD_SRL:generateIndexCBFunctions("srl"),READ_MEM8:function(a){return n.CallExpression("readMem",a)},READ_MEM16:function(a){return n.CallExpression("readMemWord",a)}}; -function generateCBFunctions(a){return function(b,c){return void 0==c?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),n.CallExpression(a,n.Register(b))))}:function(){return n.ExpressionStatement(n.CallExpression("writeMem",n.CallExpression("get"+(b+c).toUpperCase()),n.CallExpression(a,o.READ_MEM8(n.CallExpression("get"+(b+c).toUpperCase())))))}}} -function generateIndexCBFunctions(a){return function(b,c,e){return void 0==e?function(d,e,h){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("location"),n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(d)),n.Literal(65535)))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("location"),n.CallExpression(a,o.READ_MEM8(n.Identifier("location")))]))]}:function(d,g,h){return[n.ExpressionStatement(n.AssignmentExpression("=", -n.Identifier("location"),n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(d)),n.Literal(65535)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(e),n.CallExpression(a,o.READ_MEM8(n.Identifier("location"))))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("location"),n.Register(e)]))]}}} -function evaluate(a){switch(a.type){case "BinaryExpression":if("Literal"!=a.left.type&&"Literal"!=a.right.type)break;switch(a.operator){case ">>":return n.Literal(a.left.value>>a.right.value);case "&":return n.Literal(a.left.value&a.right.value)}}return a};var opcodeTableCB=[],opcodeTableDDCB=[],opcodeTableFDCB=[],regs={B:["b"],C:["c"],D:["d"],E:["e"],H:["h"],L:["l"],"(HL)":["h","l"],A:["a"]}; +function generateCBFunctions(a){return function(b,c){return void 0===c?function(){return n.ExpressionStatement(n.AssignmentExpression("=",n.Register(b),n.CallExpression(a,n.Register(b))))}:function(){return n.ExpressionStatement(n.CallExpression("writeMem",n.CallExpression("get"+(b+c).toUpperCase()),n.CallExpression(a,o.READ_MEM8(n.CallExpression("get"+(b+c).toUpperCase())))))}}} +function generateIndexCBFunctions(a){return function(b,c,e){return void 0===e?function(d,e,h){return[n.ExpressionStatement(n.AssignmentExpression("=",n.Identifier("location"),n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(d)),n.Literal(65535)))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("location"),n.CallExpression(a,o.READ_MEM8(n.Identifier("location")))]))]}:function(d,g,h){return[n.ExpressionStatement(n.AssignmentExpression("=", +n.Identifier("location"),n.BinaryExpression("&",n.BinaryExpression("+",n.CallExpression("get"+(b+c).toUpperCase()),n.Literal(d)),n.Literal(65535)))),n.ExpressionStatement(n.AssignmentExpression("=",n.Register(e),n.CallExpression(a,o.READ_MEM8(n.Identifier("location"))))),n.ExpressionStatement(n.CallExpression("writeMem",[n.Identifier("location"),n.Register(e)]))]}}};var opcodeTableCB=[],opcodeTableDDCB=[],opcodeTableFDCB=[],regs={B:["b"],C:["c"],D:["d"],E:["e"],H:["h"],L:["l"],"(HL)":["h","l"],A:["a"]}; "RLC RRC RL RR SLA SRA SLL SRL".split(" ").forEach(function(a){for(var b in regs)opcodeTableCB.push({name:a+" "+b,ast:o[a].apply(null,regs[b])}),"(HL)"!=b?(opcodeTableDDCB.push({name:"LD "+b+","+a+" (IX)",ast:o["LD_"+a].apply(null,["ixH","ixL"].concat(regs[b]))}),opcodeTableFDCB.push({name:"LD "+b+","+a+" (IY)",ast:o["LD_"+a].apply(null,["iyH","iyL"].concat(regs[b]))})):(opcodeTableDDCB.push({name:a+" (IX)",ast:o["LD_"+a]("ixH","ixL")}),opcodeTableFDCB.push({name:a+" (IY)",ast:o["LD_"+a]("iyH","iyL")}))}); -["BIT","RES","SET"].forEach(function(a){for(var b=0;8>b;b++){for(var c in regs)opcodeTableCB.push({name:a+" "+b+","+c,ast:o[a].apply(null,[b].concat(regs[c]))});for(var e=0;8>e;e++)opcodeTableDDCB.push({name:a+" "+b+" (IX)",ast:o[a].apply(null,[b].concat(["ixH","ixL"]))}),opcodeTableFDCB.push({name:a+" "+b+" (IY)",ast:o[a].apply(null,[b].concat(["iyH","iyL"]))})}});function generateIndexTable(a){var b=a.substring(1,2).toLowerCase(),c="i"+b+"H",b="i"+b+"L";return{9:{name:"ADD "+a+",BC",ast:o.ADD16(c,b,"b","c")},25:{name:"ADD "+a+",DE",ast:o.ADD16(c,b,"d","e")},33:{name:"LD "+a+",nn",ast:o.LD16(c,b)},34:{name:"LD (nn),"+a,ast:o.LD_NN(c,b)},35:{name:"INC "+a,ast:o.INC16(c,b)},42:{name:"LD "+a+",(nn)",ast:o.LD16(c,b,"n","n"),operand:UINT16},43:{name:"DEC "+a,ast:o.DEC16(c,b)},52:{name:"INC ("+a+"+d)",ast:o.INC_X(c,b)},53:{name:"DEC ("+a+"+d)",ast:o.DEC_X(c,b)}, -54:{name:"LD ("+a+"+d),n",ast:o.LD_X(c,b)},57:{name:"ADD "+a+",SP",ast:o.ADD16(c,b,"sp")},70:{name:"LD B,("+a+"+d)",ast:o.LD8_D("b",c,b)},78:{name:"LD C,("+a+"+d)",ast:o.LD8_D("c",c,b)},84:{name:" LD D,"+a+"H *",ast:o.LD8("d",c)},86:{name:"LD D,("+a+"+d)",ast:o.LD8_D("d",c,b)},93:{name:"LD E,"+a+"L *",ast:o.LD8("e",b)},94:{name:"LD E,("+a+"+d)",ast:o.LD8_D("e",c,b)},96:{name:"LD "+a+"H,B",ast:o.LD8(c,"b")},97:{name:"LD "+a+"H,C",ast:o.LD8(c,"c")},98:{name:"LD "+a+"H,D",ast:o.LD8(c,"d")},99:{name:"LD "+ -a+"H,E",ast:o.LD8(c,"e")},100:{name:"LD "+a+"H,"+a+"H",ast:o.NOOP()},101:{name:"LD "+a+"H,"+a+"L *",ast:o.LD8_D(c,b)},102:{name:"LD H,("+a+"+d)",ast:o.LD8_D("h",c,b)},103:{name:"LD "+a+"H,A",ast:o.LD8(c,"a")},104:{name:"LD "+a+"L,B",ast:o.LD8(b,"b")},105:{name:"LD "+a+"L,C",ast:o.LD8(b,"c")},106:{name:"LD "+a+"L,D",ast:o.LD8(b,"d")},107:{name:"LD "+a+"L,E",ast:o.LD8(b,"e")},108:{name:"LD "+a+"L,"+a+"H",ast:o.LD8_D(b,c)},109:{name:"LD "+a+"L,"+a+"L *",ast:o.NOOP()},110:{name:"LD L,("+a+"+d)",ast:o.LD8_D("l", -c,b)},111:{name:"LD "+a+"L,A *",ast:o.LD8(b,"a")},112:{name:"LD ("+a+"+d),B",ast:o.LD_X("b",c,b)},113:{name:"LD ("+a+"+d),C",ast:o.LD_X("c",c,b)},114:{name:"LD ("+a+"+d),D",ast:o.LD_X("d",c,b)},115:{name:"LD ("+a+"+d),E",ast:o.LD_X("e",c,b)},116:{name:"LD ("+a+"+d),H",ast:o.LD_X("h",c,b)},117:{name:"LD ("+a+"+d),L",ast:o.LD_X("l",c,b)},118:{name:"LD ("+a+"+d),B",ast:o.LD_X("b",c,b)},119:{name:"LD ("+a+"+d),A",ast:o.LD_X("a",c,b)},126:{name:"LD A,("+a+"+d)",ast:o.LD8_D("a",c,b)},124:{name:"LD A,"+ -a+"H",ast:o.LD8("a",c)},125:{name:"LD A,"+a+"L",ast:o.LD8("a",b)},132:{name:"ADD A,"+a+"H",ast:o.ADD(b)},133:{name:"ADD A,"+a+"L",ast:o.ADD(b)},134:{name:"ADD A,("+a+"+d)",ast:o.ADD_X(c,b)},140:{name:"ADC A,"+a+"H",ast:o.ADC(b)},141:{name:"ADC A,"+a+"L",ast:o.ADC(b)},142:{name:"ADC A,("+a+"+d)",ast:o.ADC_X(c,b)},148:{name:"SUB A,"+a+"H",ast:o.SUB(b)},149:{name:"SUB A,"+a+"L",ast:o.SUB(b)},150:{name:"SUB A,("+a+"+d)",ast:o.SUB_X(c,b)},156:{name:"SBC A,"+a+"H",ast:o.SBC(b)},157:{name:"SBC A,"+a+"L", -ast:o.SBC(b)},158:{name:"SBC A,("+a+"+d)",ast:o.SBC_X(c,b)},166:{name:"AND A,("+a+"+d)",ast:o.AND_X(c,b)},174:{name:"XOR A,("+a+"+d)",ast:o.XOR_X(c,b)},182:{name:"OR A,("+a+"+d)",ast:o.OR_X(c,b)},190:{name:"CP ("+a+"+d)",ast:o.CP_X(c,b)},203:"IX"==a?opcodeTableDDCB:opcodeTableFDCB,225:{name:"POP "+a,ast:o.POP(c,b)},227:{name:"EX SP,("+a+")",ast:o.EX_SP_X(c,b)},229:{name:"PUSH "+a,ast:o.PUSH(c,b)},233:{name:"JP ("+a+")",ast:o.JP_X(c,b)},249:{name:"LD SP,"+a,ast:o.LD_SP(c,b)}}};var opcodeTableED={64:{name:"IN B,(C)",ast:o.IN("b","c")},66:{name:"SBC HL,BC",ast:o.SBC16("b","c")},65:{name:"OUT (C),B",ast:o.OUT("c","b")},67:{name:"LD (nn),BC",ast:o.LD_NN("b","c")},68:{name:"NEG",ast:o.NEG()},69:{name:"RETN / RETI",ast:o.RETN_RETI()},70:{name:"IM 0",ast:o.IM(0)},72:{name:"IN C,(C)",ast:o.IN("c","c")},73:{name:"OUT (C),C",ast:o.OUT("c","c")},74:{name:"ADC HL,BC",ast:o.ADC16("b","c")},75:{name:"LD BC,(nn)",ast:o.LD16("b","c","n","n"),operand:UINT16},76:{name:"NEG",ast:o.NEG()}, -77:{name:"RETN / RETI",ast:o.RETN_RETI()},78:{name:"IM 0",ast:o.IM(0)},79:{name:"LD R,A",ast:o.LD8("r","a")},80:{name:"IN D,(C)",ast:o.IN("d","c")},81:{name:"OUT (C),D",ast:o.OUT("c","d")},82:{name:"SBC HL,DE",ast:o.SBC16("d","e")},83:{name:"LD (nn),DE",ast:o.LD_NN("d","e")},84:{name:"NEG",ast:o.NEG()},85:{name:"RETN / RETI",ast:o.RETN_RETI()},86:{name:"IM 1",ast:o.IM(1)},87:{name:"LD A,I",ast:o.LD8("a","i")},88:{name:"IN E,(C)",ast:o.IN("e","c")},89:{name:"OUT (C),E",ast:o.OUT("c","e")},90:{name:"ADC HL,DE", -ast:o.ADC16("d","e")},91:{name:"LD DE,(nn)",ast:o.LD16("d","e","n","n"),operand:UINT16},92:{name:"NEG",ast:o.NEG()},95:{name:"LD A,R",ast:o.LD8("a","r")},96:{name:"IN H,(C)",ast:o.IN("h","c")},97:{name:"OUT (C),H",ast:o.OUT("c","h")},98:{name:"SBC HL,HL",ast:o.SBC16("h","l")},99:{name:"LD (nn),HL",ast:o.LD_NN("h","l")},100:{name:"NEG",ast:o.NEG()},102:{name:"IM 0",ast:o.IM(0)},104:{name:"IN L,(C)",ast:o.IN("l","c")},105:{name:"OUT (C),L",ast:o.OUT("c","l")},106:{name:"ADC HL,HL",ast:o.ADC16("h","l")}, -107:{name:"LD HL,(nn)",ast:o.LD16("h","l","n","n"),operand:UINT16},108:{name:"NEG",ast:o.NEG()},110:{name:"IM 0",ast:o.IM(0)},115:{name:"LD (nn),SP",ast:o.LD_NN("sp")},116:{name:"NEG",ast:o.NEG()},118:{name:"IM 1",ast:o.IM(1)},120:{name:"IN A,(C)",ast:o.IN("a","c")},121:{name:"OUT (C),A",ast:o.OUT("c","a")},122:{name:"ADC HL,SP",ast:o.ADC16("sp")},124:{name:"NEG",ast:o.NEG()},160:{name:"LDI",ast:o.LDI()},161:{name:"CPI",ast:o.CPI()},162:{name:"INI",ast:o.INI()},163:{name:"OUTI",ast:o.OUTI()},168:{name:"LDD", -ast:o.LDD()},171:{name:"OUTD",ast:o.OUTD()},176:{name:"LDIR",ast:o.LDIR()},177:{name:"CPIR",ast:o.CPIR()},179:{name:"OTIR",ast:o.OTIR()},184:{name:"LDDR",ast:o.LDDR()}};var opcodeTable=[{name:"NOP",ast:o.NOOP()},{name:"LD BC,nn",ast:o.LD16("b","c"),operand:UINT16},{name:"LD (BC),A",ast:o.LD_WRITE_MEM("b","c","a")},{name:"INC BC",ast:o.INC16("b","c")},{name:"INC B",ast:o.INC8("b")},{name:"DEC B",ast:o.DEC8("b")},{name:"LD B,n",ast:o.LD8("b"),operand:UINT8},{name:"RLCA",ast:o.RLCA()},{name:"EX AF AF'",ast:o.EX_AF()},{name:"ADD HL,BC",ast:o.ADD16("h","l","b","c")},{name:"LD A,(BC)",ast:o.LD8("a","b","c")},{name:"DEC BC",ast:o.DEC16("b","c")},{name:"INC C",ast:o.INC8("c")}, -{name:"DEC C",ast:o.DEC8("c")},{name:"LD C,n",ast:o.LD8("c"),operand:UINT8},{name:"RRCA",ast:o.RRCA()},{name:"DJNZ (PC+e)",ast:o.DJNZ(),operand:INT8},{name:"LD DE,nn",ast:o.LD16("d","e"),operand:UINT16},{name:"LD (DE),A",ast:o.LD_WRITE_MEM("d","e","a")},{name:"INC DE",ast:o.INC16("d","e")},{name:"INC D",ast:o.INC8("d")},{name:"DEC D",ast:o.DEC8("d")},{name:"LD D,n",ast:o.LD8("d"),operand:UINT8},{name:"RLA",ast:o.RLA()},{name:"JR (PC+e)",ast:o.JP(),operand:INT8},{name:"ADD HL,DE",ast:o.ADD16("h","l", -"d","e")},{name:"LD A,(DE)",ast:o.LD8("a","d","e")},{name:"DEC DE",ast:o.DEC16("d","e")},{name:"INC E",ast:o.INC8("e")},{name:"DEC E",ast:o.DEC8("e")},{name:"LD E,n",ast:o.LD8("e"),operand:UINT8},{name:"RRA",ast:o.RRA()},{name:"JR NZ,(PC+e)",ast:o.JRNZ(),operand:INT8},{name:"LD HL,nn",ast:o.LD16("h","l"),operand:UINT16},{name:"LD (nn),HL",ast:o.LD_NN("h","l"),operand:UINT16},{name:"INC HL",ast:o.INC16("h","l")},{name:"INC H",ast:o.INC8("h")},{name:"DEC H",ast:o.DEC8("h")},{name:"LD H,n",ast:o.LD8("h"), -operand:UINT8},{name:"DAA",ast:o.DAA()},{name:"JR Z,(PC+e)",ast:o.JRZ(),operand:INT8},{name:"ADD HL,HL",ast:o.ADD16("h","l","h","l")},{name:"LD HL,(nn)",ast:o.LD16("h","l","n","n"),operand:UINT16},{name:"DEC HL",ast:o.DEC16("h","l")},{name:"INC L",ast:o.INC8("l")},{name:"DEC L",ast:o.DEC8("l")},{name:"LD L,n",ast:o.LD8("l"),operand:UINT8},{name:"CPL",ast:o.CPL()},{name:"JR NC,(PC+e)",ast:o.JRNC(),operand:INT8},{name:"LD SP,nn",ast:o.LD_SP(),operand:UINT16},{name:"LD (nn),A",ast:o.LD_WRITE_MEM("n", -"n","a"),operand:UINT16},{name:"INC SP",ast:o.INC8("s","p")},{name:"INC (HL)",ast:o.INC8("h","l")},{name:"DEC (HL)",ast:o.DEC8("h","l")},{name:"LD (HL),n",ast:o.LD_WRITE_MEM("h","l"),operand:UINT8},{name:"SCF",ast:o.SCF()},{name:"JR C,(PC+e)",ast:o.JRC(),operand:INT8},{name:"ADD HL,SP",ast:o.ADD16("h","l","sp")},{name:"LD A,(nn)",ast:o.LD8("a","n","n"),operand:UINT16},{name:"DEC SP",ast:o.DEC8("s","p")},{name:"INC A",ast:o.INC8("a")},{name:"DEC A",ast:o.DEC8("a")},{name:"LD A,n",ast:o.LD8("a"),operand:UINT8}, -{name:"CCF",ast:o.CCF()},{name:"LD B,B",ast:o.NOOP(),operand:UINT8},{name:"LD B,C",ast:o.LD8("b","c")},{name:"LD B,D",ast:o.LD8("b","d")},{name:"LD B,E",ast:o.LD8("b","e")},{name:"LD B,H",ast:o.LD8("b","h")},{name:"LD B,L",ast:o.LD8("b","l")},{name:"LD B,(HL)",ast:o.LD8("b","h","l")},{name:"LD B,A",ast:o.LD8("b","a")},{name:"LD C,B",ast:o.LD8("c","b")},{name:"LD C,C",ast:o.NOOP()},{name:"LD C,D",ast:o.LD8("c","d")},{name:"LD C,E",ast:o.LD8("c","e")},{name:"LD C,H",ast:o.LD8("c","h")},{name:"LD C,L", -ast:o.LD8("c","l")},{name:"LD C,(HL)",ast:o.LD8("c","h","l")},{name:"LD C,A",ast:o.LD8("c","a")},{name:"LD D,B",ast:o.LD8("d","b")},{name:"LD D,C",ast:o.LD8("d","c")},{name:"LD D,D",ast:o.NOOP()},{name:"LD D,E",ast:o.LD8("d","e")},{name:"LD D,H",ast:o.LD8("d","h")},{name:"LD D,L",ast:o.LD8("d","l")},{name:"LD D,(HL)",ast:o.LD8("d","h","l")},{name:"LD D,A",ast:o.LD8("d","a")},{name:"LD E,B",ast:o.LD8("e","b")},{name:"LD E,C",ast:o.LD8("e","c")},{name:"LD E,D",ast:o.LD8("e","d")},{name:"LD E,E",ast:o.NOOP()}, -{name:"LD E,H",ast:o.LD8("e","h")},{name:"LD E,L",ast:o.LD8("e","l")},{name:"LD E,(HL)",ast:o.LD8("e","h","l")},{name:"LD E,A",ast:o.LD8("e","a")},{name:"LD H,B",ast:o.LD8("h","b")},{name:"LD H,C",ast:o.LD8("h","c")},{name:"LD H,D",ast:o.LD8("h","d")},{name:"LD H,E",ast:o.LD8("h","e")},{name:"LD H,H",ast:o.NOOP()},{name:"LD H,L",ast:o.LD8("h","l")},{name:"LD H,(HL)",ast:o.LD8("h","h","l")},{name:"LD H,A",ast:o.LD8("h","a")},{name:"LD L,B",ast:o.LD8("l","b")},{name:"LD L,C",ast:o.LD8("l","c")},{name:"LD L,D", -ast:o.LD8("l","d")},{name:"LD L,E",ast:o.LD8("l","e")},{name:"LD L,H",ast:o.LD8("l","h")},{name:"LD L,L",ast:o.NOOP()},{name:"LD L,(HL)",ast:o.LD8("l","h","l")},{name:"LD L,A",ast:o.LD8("l","a")},{name:"LD (HL),B",ast:o.LD_WRITE_MEM("h","l","b")},{name:"LD (HL),C",ast:o.LD_WRITE_MEM("h","l","c")},{name:"LD (HL),D",ast:o.LD_WRITE_MEM("h","l","d")},{name:"LD (HL),E",ast:o.LD_WRITE_MEM("h","l","e")},{name:"LD (HL),H",ast:o.LD_WRITE_MEM("h","l","h")},{name:"LD (HL),L",ast:o.LD_WRITE_MEM("h","l","l")}, -{name:"HALT",ast:o.HALT()},{name:"LD (HL),A",ast:o.LD_WRITE_MEM("h","l","a")},{name:"LD A,B",ast:o.LD8("a","b")},{name:"LD A,C",ast:o.LD8("a","c")},{name:"LD A,D",ast:o.LD8("a","d")},{name:"LD A,E",ast:o.LD8("a","e")},{name:"LD A,H",ast:o.LD8("a","h")},{name:"LD A,L",ast:o.LD8("a","l")},{name:"LD A,(HL)",ast:o.LD8("a","h","l")},{name:"LD A,A",ast:o.NOOP()},{name:"ADD A,B",ast:o.ADD("b")},{name:"ADD A,C",ast:o.ADD("c")},{name:"ADD A,D",ast:o.ADD("d")},{name:"ADD A,E",ast:o.ADD("e")},{name:"ADD A,H", -ast:o.ADD("h")},{name:"ADD A,L",ast:o.ADD("l")},{name:"ADD A,(HL)",ast:o.ADD("h","l")},{name:"ADD A,A",ast:o.ADD("a")},{name:"ADC A,B",ast:o.ADC("b")},{name:"ADC A,C",ast:o.ADC("c")},{name:"ADC A,D",ast:o.ADC("d")},{name:"ADC A,E",ast:o.ADC("e")},{name:"ADC A,H",ast:o.ADC("h")},{name:"ADC A,L",ast:o.ADC("l")},{name:"ADC A,(HL)",ast:o.ADC("h","l")},{name:"ADC A,A",ast:o.ADC("a")},{name:"SUB A,B",ast:o.SUB("b")},{name:"SUB A,C",ast:o.SUB("c")},{name:"SUB A,D",ast:o.SUB("d")},{name:"SUB A,E",ast:o.SUB("e")}, -{name:"SUB A,H",ast:o.SUB("h")},{name:"SUB A,L",ast:o.SUB("l")},{name:"SUB A,(HL)",ast:o.SUB("h","l")},{name:"SUB A,A",ast:o.SUB("a")},{name:"SBC A,B",ast:o.SBC("b")},{name:"SBC A,C",ast:o.SBC("c")},{name:"SBC A,D",ast:o.SBC("d")},{name:"SBC A,E",ast:o.SBC("e")},{name:"SBC A,H",ast:o.SBC("h")},{name:"SBC A,L",ast:o.SBC("l")},{name:"SBC A,(HL)",ast:o.SBC("h","l")},{name:"SBC A,A",ast:o.SBC("a")},{name:"AND A,B",ast:o.AND("b")},{name:"AND A,C",ast:o.AND("c")},{name:"AND A,D",ast:o.AND("d")},{name:"AND A,E", -ast:o.AND("e")},{name:"AND A,H",ast:o.AND("h")},{name:"AND A,L",ast:o.AND("l")},{name:"AND A,(HL)",ast:o.AND("h","l")},{name:"AND A,A",ast:o.AND("a")},{name:"XOR A,B",ast:o.XOR("b")},{name:"XOR A,C",ast:o.XOR("c")},{name:"XOR A,D",ast:o.XOR("d")},{name:"XOR A,E",ast:o.XOR("e")},{name:"XOR A,H",ast:o.XOR("h")},{name:"XOR A,L",ast:o.XOR("l")},{name:"XOR A,(HL)",ast:o.XOR("h","l")},{name:"XOR A,A",ast:o.XOR("a")},{name:"OR A,B",ast:o.OR("b")},{name:"OR A,C",ast:o.OR("c")},{name:"OR A,D",ast:o.OR("d")}, -{name:"OR A,E",ast:o.OR("e")},{name:"OR A,H",ast:o.OR("h")},{name:"OR A,L",ast:o.OR("l")},{name:"OR A,(HL)",ast:o.OR("h","l")},{name:"OR A,A",ast:o.OR("a")},{name:"CP A,B",ast:o.CP("b")},{name:"CP A,C",ast:o.CP("c")},{name:"CP A,D",ast:o.CP("d")},{name:"CP A,E",ast:o.CP("e")},{name:"CP A,H",ast:o.CP("h")},{name:"CP A,L",ast:o.CP("l")},{name:"CP A,(HL)",ast:o.CP("h","l")},{name:"CP A,A",ast:o.CP("a")},{name:"RET NZ",ast:o.RET("==",F_ZERO)},{name:"POP BC",ast:o.POP("b","c")},{name:"JP NZ,(nn)",ast:o.JP("==", -F_ZERO)},{name:"JP (nn)",ast:o.JP()},{name:"CALL NZ (nn)",ast:o.CALL("==",F_ZERO)},{name:"PUSH BC",ast:o.PUSH("b","c")},{name:"ADD A,n",ast:o.ADD()},{name:"RST 0x00",ast:o.RST(0)},{name:"RET Z",ast:o.RET("!=",F_ZERO)},{name:"RET",ast:o.RET()},{name:"JP Z,(nn)",ast:o.JP("!=",F_ZERO)},opcodeTableCB,{name:"CALL Z (nn)",ast:o.CALL("!=",F_ZERO)},{name:"CALL (nn)",ast:o.CALL()},{name:"ADC A,n",ast:o.ADC()},{name:"RST 0x08",ast:o.RST(8)},{name:"RET NC",ast:o.RET("==",F_CARRY)},{name:"POP DE",ast:o.POP("d", -"e")},{name:"JP NC,(nn)",ast:o.JP("==",F_CARRY)},{name:"OUT (n),A",ast:o.OUT("a")},{name:"CALL NC (nn)",ast:o.CALL("==",F_CARRY)},{name:"PUSH DE",ast:o.PUSH("d","e")},{name:"SUB n",ast:o.SUB()},{name:"RST 0x10",ast:o.RST(16)},{name:"RET C",ast:o.RET("!=",F_CARRY)},{name:"EXX",ast:o.EXX()},{name:"JP C,(nn)",ast:o.JP("!=",F_CARRY)},{name:"IN A,(n)",ast:o.IN("a")},{name:"CALL C (nn)",ast:o.CALL("!=",F_CARRY)},generateIndexTable("IX"),{name:"SBC A,n",ast:o.SBC()},{name:"RST 0x18",ast:o.RST(24)},{name:"RET PO", -ast:o.RET("==",F_PARITY)},{name:"POP HL",ast:o.POP("h","l")},{name:"JP PO,(nn)",ast:o.JP("==",F_PARITY)},{name:"EX (SP),HL",ast:o.EX_SP_HL()},{name:"CALL PO (nn)",ast:o.CALL("==",F_PARITY)},{name:"PUSH HL",ast:o.PUSH("h","l")},{name:"AND (n)",ast:o.AND()},{name:"RST 0x20",ast:o.RST(32)},{name:"RET PE",ast:o.RET("!=",F_PARITY)},{name:"JP (HL)",ast:o.JP("h","l")},{name:"JP PE,(nn)",ast:o.JP("!=",F_PARITY)},{name:"EX DE,HL",ast:o.EX_DE_HL()},{name:"CALL PE (nn)",ast:o.CALL("!=",F_PARITY)},opcodeTableED, -{name:"XOR n",ast:o.XOR()},{name:"RST 0x28",ast:o.RST(40)},{name:"RET P",ast:o.RET("==",F_SIGN)},{name:"POP AF",ast:o.POP("a","f")},{name:"JP P,(nn)",ast:o.JP("==",F_SIGN)},{name:"DI",ast:o.DI()},{name:"CALL P (nn)",ast:o.CALL("==",F_SIGN)},{name:"PUSH AF",ast:o.PUSH("a","f")},{name:"OR n",ast:o.OR()},{name:"RST 0x30",ast:o.RST(48)},{name:"RET M",ast:o.RET("!=",F_SIGN)},{name:"LD SP,HL",ast:o.LD_SP("h","l")},{name:"JP M,(nn)",ast:o.JP("!=",F_SIGN)},{name:"EI",ast:o.EI()},{name:"CALL M (nn)",ast:o.CALL("!=", -F_SIGN)},generateIndexTable("IY"),{name:"CP n",ast:o.CP()},{name:"RST 0x38",ast:o.RST(56)}];var Analyzer=function(){var a=function(){this.bytecodes={};this.ast=[];this.missingOpcodes={}};a.prototype={analyze:function(a){var c=0;this.bytecodes=a;this.ast=Array(this.bytecodes.length);JSSMS.Utils.console.time("Analyzing");for(c=0;c=this.rom.length?JSSMS.Utils.console.log("Parsing full ROM"): -(this.options.pageLimit=0,JSSMS.Utils.console.log("Parsing initial memory page of ROM"));for(var e=this.parse().analyze().optimize().generate(),d=0;db;b++){for(var c in regs)opcodeTableCB.push({name:a+" "+b+","+c,ast:o[a].apply(null,[b].concat(regs[c]))});for(var e=0;8>e;e++)opcodeTableDDCB.push({name:a+" "+b+" (IX)",ast:o[a].apply(null,[b].concat(["ixH","ixL"]))}),opcodeTableFDCB.push({name:a+" "+b+" (IY)",ast:o[a].apply(null,[b].concat(["iyH","iyL"]))})}});function generateIndexTable(a){var b=a.substring(1,2).toLowerCase(),c="i"+b+"H",b="i"+b+"L";return{9:{name:"ADD "+a+",BC",ast:o.ADD16(c,b,"b","c")},25:{name:"ADD "+a+",DE",ast:o.ADD16(c,b,"d","e")},33:{name:"LD "+a+",nn",ast:o.LD16(c,b)},34:{name:"LD (nn),"+a,ast:o.LD_NN(c,b)},35:{name:"INC "+a,ast:o.INC16(c,b)},42:{name:"LD "+a+",(nn)",ast:o.LD16(c,b,"n","n")},43:{name:"DEC "+a,ast:o.DEC16(c,b)},52:{name:"INC ("+a+"+d)",ast:o.INC_X(c,b)},53:{name:"DEC ("+a+"+d)",ast:o.DEC_X(c,b)},54:{name:"LD ("+ +a+"+d),n",ast:o.LD_X(c,b)},57:{name:"ADD "+a+",SP",ast:o.ADD16(c,b,"sp")},70:{name:"LD B,("+a+"+d)",ast:o.LD8_D("b",c,b)},78:{name:"LD C,("+a+"+d)",ast:o.LD8_D("c",c,b)},84:{name:" LD D,"+a+"H *",ast:o.LD8("d",c)},86:{name:"LD D,("+a+"+d)",ast:o.LD8_D("d",c,b)},93:{name:"LD E,"+a+"L *",ast:o.LD8("e",b)},94:{name:"LD E,("+a+"+d)",ast:o.LD8_D("e",c,b)},96:{name:"LD "+a+"H,B",ast:o.LD8(c,"b")},97:{name:"LD "+a+"H,C",ast:o.LD8(c,"c")},98:{name:"LD "+a+"H,D",ast:o.LD8(c,"d")},99:{name:"LD "+a+"H,E",ast:o.LD8(c, +"e")},100:{name:"LD "+a+"H,"+a+"H",ast:o.NOOP()},101:{name:"LD "+a+"H,"+a+"L *",ast:o.LD8_D(c,b)},102:{name:"LD H,("+a+"+d)",ast:o.LD8_D("h",c,b)},103:{name:"LD "+a+"H,A",ast:o.LD8(c,"a")},104:{name:"LD "+a+"L,B",ast:o.LD8(b,"b")},105:{name:"LD "+a+"L,C",ast:o.LD8(b,"c")},106:{name:"LD "+a+"L,D",ast:o.LD8(b,"d")},107:{name:"LD "+a+"L,E",ast:o.LD8(b,"e")},108:{name:"LD "+a+"L,"+a+"H",ast:o.LD8_D(b,c)},109:{name:"LD "+a+"L,"+a+"L *",ast:o.NOOP()},110:{name:"LD L,("+a+"+d)",ast:o.LD8_D("l",c,b)},111:{name:"LD "+ +a+"L,A *",ast:o.LD8(b,"a")},112:{name:"LD ("+a+"+d),B",ast:o.LD_X("b",c,b)},113:{name:"LD ("+a+"+d),C",ast:o.LD_X("c",c,b)},114:{name:"LD ("+a+"+d),D",ast:o.LD_X("d",c,b)},115:{name:"LD ("+a+"+d),E",ast:o.LD_X("e",c,b)},116:{name:"LD ("+a+"+d),H",ast:o.LD_X("h",c,b)},117:{name:"LD ("+a+"+d),L",ast:o.LD_X("l",c,b)},118:{name:"LD ("+a+"+d),B",ast:o.LD_X("b",c,b)},119:{name:"LD ("+a+"+d),A",ast:o.LD_X("a",c,b)},126:{name:"LD A,("+a+"+d)",ast:o.LD8_D("a",c,b)},124:{name:"LD A,"+a+"H",ast:o.LD8("a",c)}, +125:{name:"LD A,"+a+"L",ast:o.LD8("a",b)},132:{name:"ADD A,"+a+"H",ast:o.ADD(b)},133:{name:"ADD A,"+a+"L",ast:o.ADD(b)},134:{name:"ADD A,("+a+"+d)",ast:o.ADD_X(c,b)},140:{name:"ADC A,"+a+"H",ast:o.ADC(b)},141:{name:"ADC A,"+a+"L",ast:o.ADC(b)},142:{name:"ADC A,("+a+"+d)",ast:o.ADC_X(c,b)},148:{name:"SUB A,"+a+"H",ast:o.SUB(b)},149:{name:"SUB A,"+a+"L",ast:o.SUB(b)},150:{name:"SUB A,("+a+"+d)",ast:o.SUB_X(c,b)},156:{name:"SBC A,"+a+"H",ast:o.SBC(b)},157:{name:"SBC A,"+a+"L",ast:o.SBC(b)},158:{name:"SBC A,("+ +a+"+d)",ast:o.SBC_X(c,b)},166:{name:"AND A,("+a+"+d)",ast:o.AND_X(c,b)},174:{name:"XOR A,("+a+"+d)",ast:o.XOR_X(c,b)},182:{name:"OR A,("+a+"+d)",ast:o.OR_X(c,b)},190:{name:"CP ("+a+"+d)",ast:o.CP_X(c,b)},203:"IX"==a?opcodeTableDDCB:opcodeTableFDCB,225:{name:"POP "+a,ast:o.POP(c,b)},227:{name:"EX SP,("+a+")",ast:o.EX_SP_X(c,b)},229:{name:"PUSH "+a,ast:o.PUSH(c,b)},233:{name:"JP ("+a+")",ast:o.JP_X(c,b)},249:{name:"LD SP,"+a,ast:o.LD_SP(c,b)}}};var opcodeTableED={64:{name:"IN B,(C)",ast:o.IN("b","c")},66:{name:"SBC HL,BC",ast:o.SBC16("b","c")},65:{name:"OUT (C),B",ast:o.OUT("c","b")},67:{name:"LD (nn),BC",ast:o.LD_NN("b","c")},68:{name:"NEG",ast:o.NEG()},69:{name:"RETN / RETI",ast:o.RETN_RETI()},70:{name:"IM 0",ast:o.IM(0)},72:{name:"IN C,(C)",ast:o.IN("c","c")},73:{name:"OUT (C),C",ast:o.OUT("c","c")},74:{name:"ADC HL,BC",ast:o.ADC16("b","c")},75:{name:"LD BC,(nn)",ast:o.LD16("b","c","n","n")},76:{name:"NEG",ast:o.NEG()},77:{name:"RETN / RETI", +ast:o.RETN_RETI()},78:{name:"IM 0",ast:o.IM(0)},79:{name:"LD R,A",ast:o.LD8("r","a")},80:{name:"IN D,(C)",ast:o.IN("d","c")},81:{name:"OUT (C),D",ast:o.OUT("c","d")},82:{name:"SBC HL,DE",ast:o.SBC16("d","e")},83:{name:"LD (nn),DE",ast:o.LD_NN("d","e")},84:{name:"NEG",ast:o.NEG()},85:{name:"RETN / RETI",ast:o.RETN_RETI()},86:{name:"IM 1",ast:o.IM(1)},87:{name:"LD A,I",ast:o.LD8("a","i")},88:{name:"IN E,(C)",ast:o.IN("e","c")},89:{name:"OUT (C),E",ast:o.OUT("c","e")},90:{name:"ADC HL,DE",ast:o.ADC16("d", +"e")},91:{name:"LD DE,(nn)",ast:o.LD16("d","e","n","n")},92:{name:"NEG",ast:o.NEG()},95:{name:"LD A,R",ast:o.LD8("a","r")},96:{name:"IN H,(C)",ast:o.IN("h","c")},97:{name:"OUT (C),H",ast:o.OUT("c","h")},98:{name:"SBC HL,HL",ast:o.SBC16("h","l")},99:{name:"LD (nn),HL",ast:o.LD_NN("h","l")},100:{name:"NEG",ast:o.NEG()},102:{name:"IM 0",ast:o.IM(0)},104:{name:"IN L,(C)",ast:o.IN("l","c")},105:{name:"OUT (C),L",ast:o.OUT("c","l")},106:{name:"ADC HL,HL",ast:o.ADC16("h","l")},107:{name:"LD HL,(nn)",ast:o.LD16("h", +"l","n","n")},108:{name:"NEG",ast:o.NEG()},110:{name:"IM 0",ast:o.IM(0)},115:{name:"LD (nn),SP",ast:o.LD_NN("sp")},116:{name:"NEG",ast:o.NEG()},118:{name:"IM 1",ast:o.IM(1)},120:{name:"IN A,(C)",ast:o.IN("a","c")},121:{name:"OUT (C),A",ast:o.OUT("c","a")},122:{name:"ADC HL,SP",ast:o.ADC16("sp")},124:{name:"NEG",ast:o.NEG()},160:{name:"LDI",ast:o.LDI()},161:{name:"CPI",ast:o.CPI()},162:{name:"INI",ast:o.INI()},163:{name:"OUTI",ast:o.OUTI()},168:{name:"LDD",ast:o.LDD()},171:{name:"OUTD",ast:o.OUTD()}, +176:{name:"LDIR",ast:o.LDIR()},177:{name:"CPIR",ast:o.CPIR()},179:{name:"OTIR",ast:o.OTIR()},184:{name:"LDDR",ast:o.LDDR()}};var opcodeTable=[{name:"NOP",ast:o.NOOP()},{name:"LD BC,nn",ast:o.LD16("b","c")},{name:"LD (BC),A",ast:o.LD_WRITE_MEM("b","c","a")},{name:"INC BC",ast:o.INC16("b","c")},{name:"INC B",ast:o.INC8("b")},{name:"DEC B",ast:o.DEC8("b")},{name:"LD B,n",ast:o.LD8("b")},{name:"RLCA",ast:o.RLCA()},{name:"EX AF AF'",ast:o.EX_AF()},{name:"ADD HL,BC",ast:o.ADD16("h","l","b","c")},{name:"LD A,(BC)",ast:o.LD8("a","b","c")},{name:"DEC BC",ast:o.DEC16("b","c")},{name:"INC C",ast:o.INC8("c")},{name:"DEC C",ast:o.DEC8("c")}, +{name:"LD C,n",ast:o.LD8("c")},{name:"RRCA",ast:o.RRCA()},{name:"DJNZ (PC+e)",ast:o.DJNZ()},{name:"LD DE,nn",ast:o.LD16("d","e")},{name:"LD (DE),A",ast:o.LD_WRITE_MEM("d","e","a")},{name:"INC DE",ast:o.INC16("d","e")},{name:"INC D",ast:o.INC8("d")},{name:"DEC D",ast:o.DEC8("d")},{name:"LD D,n",ast:o.LD8("d")},{name:"RLA",ast:o.RLA()},{name:"JR (PC+e)",ast:o.JP()},{name:"ADD HL,DE",ast:o.ADD16("h","l","d","e")},{name:"LD A,(DE)",ast:o.LD8("a","d","e")},{name:"DEC DE",ast:o.DEC16("d","e")},{name:"INC E", +ast:o.INC8("e")},{name:"DEC E",ast:o.DEC8("e")},{name:"LD E,n",ast:o.LD8("e")},{name:"RRA",ast:o.RRA()},{name:"JR NZ,(PC+e)",ast:o.JRNZ()},{name:"LD HL,nn",ast:o.LD16("h","l")},{name:"LD (nn),HL",ast:o.LD_NN("h","l")},{name:"INC HL",ast:o.INC16("h","l")},{name:"INC H",ast:o.INC8("h")},{name:"DEC H",ast:o.DEC8("h")},{name:"LD H,n",ast:o.LD8("h")},{name:"DAA",ast:o.DAA()},{name:"JR Z,(PC+e)",ast:o.JRZ()},{name:"ADD HL,HL",ast:o.ADD16("h","l","h","l")},{name:"LD HL,(nn)",ast:o.LD16("h","l","n","n")}, +{name:"DEC HL",ast:o.DEC16("h","l")},{name:"INC L",ast:o.INC8("l")},{name:"DEC L",ast:o.DEC8("l")},{name:"LD L,n",ast:o.LD8("l")},{name:"CPL",ast:o.CPL()},{name:"JR NC,(PC+e)",ast:o.JRNC()},{name:"LD SP,nn",ast:o.LD_SP()},{name:"LD (nn),A",ast:o.LD_WRITE_MEM("n","n","a")},{name:"INC SP",ast:o.INC8("s","p")},{name:"INC (HL)",ast:o.INC8("h","l")},{name:"DEC (HL)",ast:o.DEC8("h","l")},{name:"LD (HL),n",ast:o.LD_WRITE_MEM("h","l")},{name:"SCF",ast:o.SCF()},{name:"JR C,(PC+e)",ast:o.JRC()},{name:"ADD HL,SP", +ast:o.ADD16("h","l","sp")},{name:"LD A,(nn)",ast:o.LD8("a","n","n")},{name:"DEC SP",ast:o.DEC8("s","p")},{name:"INC A",ast:o.INC8("a")},{name:"DEC A",ast:o.DEC8("a")},{name:"LD A,n",ast:o.LD8("a")},{name:"CCF",ast:o.CCF()},{name:"LD B,B",ast:o.NOOP()},{name:"LD B,C",ast:o.LD8("b","c")},{name:"LD B,D",ast:o.LD8("b","d")},{name:"LD B,E",ast:o.LD8("b","e")},{name:"LD B,H",ast:o.LD8("b","h")},{name:"LD B,L",ast:o.LD8("b","l")},{name:"LD B,(HL)",ast:o.LD8("b","h","l")},{name:"LD B,A",ast:o.LD8("b","a")}, +{name:"LD C,B",ast:o.LD8("c","b")},{name:"LD C,C",ast:o.NOOP()},{name:"LD C,D",ast:o.LD8("c","d")},{name:"LD C,E",ast:o.LD8("c","e")},{name:"LD C,H",ast:o.LD8("c","h")},{name:"LD C,L",ast:o.LD8("c","l")},{name:"LD C,(HL)",ast:o.LD8("c","h","l")},{name:"LD C,A",ast:o.LD8("c","a")},{name:"LD D,B",ast:o.LD8("d","b")},{name:"LD D,C",ast:o.LD8("d","c")},{name:"LD D,D",ast:o.NOOP()},{name:"LD D,E",ast:o.LD8("d","e")},{name:"LD D,H",ast:o.LD8("d","h")},{name:"LD D,L",ast:o.LD8("d","l")},{name:"LD D,(HL)", +ast:o.LD8("d","h","l")},{name:"LD D,A",ast:o.LD8("d","a")},{name:"LD E,B",ast:o.LD8("e","b")},{name:"LD E,C",ast:o.LD8("e","c")},{name:"LD E,D",ast:o.LD8("e","d")},{name:"LD E,E",ast:o.NOOP()},{name:"LD E,H",ast:o.LD8("e","h")},{name:"LD E,L",ast:o.LD8("e","l")},{name:"LD E,(HL)",ast:o.LD8("e","h","l")},{name:"LD E,A",ast:o.LD8("e","a")},{name:"LD H,B",ast:o.LD8("h","b")},{name:"LD H,C",ast:o.LD8("h","c")},{name:"LD H,D",ast:o.LD8("h","d")},{name:"LD H,E",ast:o.LD8("h","e")},{name:"LD H,H",ast:o.NOOP()}, +{name:"LD H,L",ast:o.LD8("h","l")},{name:"LD H,(HL)",ast:o.LD8("h","h","l")},{name:"LD H,A",ast:o.LD8("h","a")},{name:"LD L,B",ast:o.LD8("l","b")},{name:"LD L,C",ast:o.LD8("l","c")},{name:"LD L,D",ast:o.LD8("l","d")},{name:"LD L,E",ast:o.LD8("l","e")},{name:"LD L,H",ast:o.LD8("l","h")},{name:"LD L,L",ast:o.NOOP()},{name:"LD L,(HL)",ast:o.LD8("l","h","l")},{name:"LD L,A",ast:o.LD8("l","a")},{name:"LD (HL),B",ast:o.LD_WRITE_MEM("h","l","b")},{name:"LD (HL),C",ast:o.LD_WRITE_MEM("h","l","c")},{name:"LD (HL),D", +ast:o.LD_WRITE_MEM("h","l","d")},{name:"LD (HL),E",ast:o.LD_WRITE_MEM("h","l","e")},{name:"LD (HL),H",ast:o.LD_WRITE_MEM("h","l","h")},{name:"LD (HL),L",ast:o.LD_WRITE_MEM("h","l","l")},{name:"HALT",ast:o.HALT()},{name:"LD (HL),A",ast:o.LD_WRITE_MEM("h","l","a")},{name:"LD A,B",ast:o.LD8("a","b")},{name:"LD A,C",ast:o.LD8("a","c")},{name:"LD A,D",ast:o.LD8("a","d")},{name:"LD A,E",ast:o.LD8("a","e")},{name:"LD A,H",ast:o.LD8("a","h")},{name:"LD A,L",ast:o.LD8("a","l")},{name:"LD A,(HL)",ast:o.LD8("a", +"h","l")},{name:"LD A,A",ast:o.NOOP()},{name:"ADD A,B",ast:o.ADD("b")},{name:"ADD A,C",ast:o.ADD("c")},{name:"ADD A,D",ast:o.ADD("d")},{name:"ADD A,E",ast:o.ADD("e")},{name:"ADD A,H",ast:o.ADD("h")},{name:"ADD A,L",ast:o.ADD("l")},{name:"ADD A,(HL)",ast:o.ADD("h","l")},{name:"ADD A,A",ast:o.ADD("a")},{name:"ADC A,B",ast:o.ADC("b")},{name:"ADC A,C",ast:o.ADC("c")},{name:"ADC A,D",ast:o.ADC("d")},{name:"ADC A,E",ast:o.ADC("e")},{name:"ADC A,H",ast:o.ADC("h")},{name:"ADC A,L",ast:o.ADC("l")},{name:"ADC A,(HL)", +ast:o.ADC("h","l")},{name:"ADC A,A",ast:o.ADC("a")},{name:"SUB A,B",ast:o.SUB("b")},{name:"SUB A,C",ast:o.SUB("c")},{name:"SUB A,D",ast:o.SUB("d")},{name:"SUB A,E",ast:o.SUB("e")},{name:"SUB A,H",ast:o.SUB("h")},{name:"SUB A,L",ast:o.SUB("l")},{name:"SUB A,(HL)",ast:o.SUB("h","l")},{name:"SUB A,A",ast:o.SUB("a")},{name:"SBC A,B",ast:o.SBC("b")},{name:"SBC A,C",ast:o.SBC("c")},{name:"SBC A,D",ast:o.SBC("d")},{name:"SBC A,E",ast:o.SBC("e")},{name:"SBC A,H",ast:o.SBC("h")},{name:"SBC A,L",ast:o.SBC("l")}, +{name:"SBC A,(HL)",ast:o.SBC("h","l")},{name:"SBC A,A",ast:o.SBC("a")},{name:"AND A,B",ast:o.AND("b")},{name:"AND A,C",ast:o.AND("c")},{name:"AND A,D",ast:o.AND("d")},{name:"AND A,E",ast:o.AND("e")},{name:"AND A,H",ast:o.AND("h")},{name:"AND A,L",ast:o.AND("l")},{name:"AND A,(HL)",ast:o.AND("h","l")},{name:"AND A,A",ast:o.AND("a")},{name:"XOR A,B",ast:o.XOR("b")},{name:"XOR A,C",ast:o.XOR("c")},{name:"XOR A,D",ast:o.XOR("d")},{name:"XOR A,E",ast:o.XOR("e")},{name:"XOR A,H",ast:o.XOR("h")},{name:"XOR A,L", +ast:o.XOR("l")},{name:"XOR A,(HL)",ast:o.XOR("h","l")},{name:"XOR A,A",ast:o.XOR("a")},{name:"OR A,B",ast:o.OR("b")},{name:"OR A,C",ast:o.OR("c")},{name:"OR A,D",ast:o.OR("d")},{name:"OR A,E",ast:o.OR("e")},{name:"OR A,H",ast:o.OR("h")},{name:"OR A,L",ast:o.OR("l")},{name:"OR A,(HL)",ast:o.OR("h","l")},{name:"OR A,A",ast:o.OR("a")},{name:"CP A,B",ast:o.CP("b")},{name:"CP A,C",ast:o.CP("c")},{name:"CP A,D",ast:o.CP("d")},{name:"CP A,E",ast:o.CP("e")},{name:"CP A,H",ast:o.CP("h")},{name:"CP A,L",ast:o.CP("l")}, +{name:"CP A,(HL)",ast:o.CP("h","l")},{name:"CP A,A",ast:o.CP("a")},{name:"RET NZ",ast:o.RET("==",F_ZERO)},{name:"POP BC",ast:o.POP("b","c")},{name:"JP NZ,(nn)",ast:o.JP("==",F_ZERO)},{name:"JP (nn)",ast:o.JP()},{name:"CALL NZ (nn)",ast:o.CALL("==",F_ZERO)},{name:"PUSH BC",ast:o.PUSH("b","c")},{name:"ADD A,n",ast:o.ADD()},{name:"RST 0x00",ast:o.RST(0)},{name:"RET Z",ast:o.RET("!=",F_ZERO)},{name:"RET",ast:o.RET()},{name:"JP Z,(nn)",ast:o.JP("!=",F_ZERO)},opcodeTableCB,{name:"CALL Z (nn)",ast:o.CALL("!=", +F_ZERO)},{name:"CALL (nn)",ast:o.CALL()},{name:"ADC A,n",ast:o.ADC()},{name:"RST 0x08",ast:o.RST(8)},{name:"RET NC",ast:o.RET("==",F_CARRY)},{name:"POP DE",ast:o.POP("d","e")},{name:"JP NC,(nn)",ast:o.JP("==",F_CARRY)},{name:"OUT (n),A",ast:o.OUT("a")},{name:"CALL NC (nn)",ast:o.CALL("==",F_CARRY)},{name:"PUSH DE",ast:o.PUSH("d","e")},{name:"SUB n",ast:o.SUB()},{name:"RST 0x10",ast:o.RST(16)},{name:"RET C",ast:o.RET("!=",F_CARRY)},{name:"EXX",ast:o.EXX()},{name:"JP C,(nn)",ast:o.JP("!=",F_CARRY)}, +{name:"IN A,(n)",ast:o.IN("a")},{name:"CALL C (nn)",ast:o.CALL("!=",F_CARRY)},generateIndexTable("IX"),{name:"SBC A,n",ast:o.SBC()},{name:"RST 0x18",ast:o.RST(24)},{name:"RET PO",ast:o.RET("==",F_PARITY)},{name:"POP HL",ast:o.POP("h","l")},{name:"JP PO,(nn)",ast:o.JP("==",F_PARITY)},{name:"EX (SP),HL",ast:o.EX_SP_HL()},{name:"CALL PO (nn)",ast:o.CALL("==",F_PARITY)},{name:"PUSH HL",ast:o.PUSH("h","l")},{name:"AND (n)",ast:o.AND()},{name:"RST 0x20",ast:o.RST(32)},{name:"RET PE",ast:o.RET("!=",F_PARITY)}, +{name:"JP (HL)",ast:o.JP("h","l")},{name:"JP PE,(nn)",ast:o.JP("!=",F_PARITY)},{name:"EX DE,HL",ast:o.EX_DE_HL()},{name:"CALL PE (nn)",ast:o.CALL("!=",F_PARITY)},opcodeTableED,{name:"XOR n",ast:o.XOR()},{name:"RST 0x28",ast:o.RST(40)},{name:"RET P",ast:o.RET("==",F_SIGN)},{name:"POP AF",ast:o.POP("a","f")},{name:"JP P,(nn)",ast:o.JP("==",F_SIGN)},{name:"DI",ast:o.DI()},{name:"CALL P (nn)",ast:o.CALL("==",F_SIGN)},{name:"PUSH AF",ast:o.PUSH("a","f")},{name:"OR n",ast:o.OR()},{name:"RST 0x30",ast:o.RST(48)}, +{name:"RET M",ast:o.RET("!=",F_SIGN)},{name:"LD SP,HL",ast:o.LD_SP("h","l")},{name:"JP M,(nn)",ast:o.JP("!=",F_SIGN)},{name:"EI",ast:o.EI()},{name:"CALL M (nn)",ast:o.CALL("!=",F_SIGN)},generateIndexTable("IY"),{name:"CP n",ast:o.CP()},{name:"RST 0x38",ast:o.RST(56)}];var Analyzer=function(){var a=function(){this.bytecodes={};this.ast=[];this.missingOpcodes={}};a.prototype={analyze:function(a){var c=0;this.bytecodes=a;this.ast=Array(this.bytecodes.length);JSSMS.Utils.console.time("Analyzing");for(c=0;c>":b=a.left.value>>a.right.value;break;case "&":b=a.left.value&a.right.value;break;default:return JSSMS.Utils.console.log("Unimplemented evaluation optimization for operator",a.operator),a}a.type="Literal";a.value=b;a.raw=DEBUG?JSSMS.Utils.toHex(b):""+b;delete a.right;delete a.left}return a});return a})},inlineRegisters:function(a){var c={b:!1,c:!1,d:!1,e:!1,h:!1,l:!1},e={b:{},c:{},d:{},e:{},h:{},l:{}};return a.map(function(a){var b=a.ast;if(!b)return a;a.ast=JSSMS.Utils.traverse(b, +function(a){"AssignmentExpression"==a.type&&"="==a.operator&&"Register"==a.left.type&&"Literal"==a.right.type&&"a"!=a.left.name&&"f"!=a.left.name&&(c[a.left.name]=!0,e[a.left.name]=a.right);if("AssignmentExpression"==a.type&&"Register"==a.left.type&&"Literal"!=a.right.type&&"a"!=a.left.name&&"f"!=a.left.name)return c[a.left.name]=!1,e[a.left.name]={},a;if("CallExpression"==a.type)return a.arguments[0]&&"Register"==a.arguments[0].type&&c[a.arguments[0].name]&&"a"!=a.arguments[0].name&&"f"!=a.arguments[0].name&& +(a.arguments[0]=e[a.arguments[0].name]),a.arguments[1]&&"Register"==a.arguments[1].type&&c[a.arguments[1].name]&&"a"!=a.arguments[1].name&&"f"!=a.arguments[1].name&&(a.arguments[1]=e[a.arguments[1].name]),a;if("MemberExpression"==a.type&&"Register"==a.property.type&&c[a.property.name]&&"a"!=a.property.name&&"f"!=a.property.name)return a.property=e[a.property.name],a;"BinaryExpression"==a.type&&("Register"==a.right.type&&c[a.right.name]&&"a"!=a.right.name&&"f"!=a.right.name&&(a.right=e[a.right.name]), +"Register"==a.left.type&&c[a.left.name]&&"a"!=a.left.name&&"f"!=a.left.name&&(a.left=e[a.left.name]));return a});return a})}};return a}();var Generator=function(){function a(a){switch(a[0]){case 203:return OP_CB_STATES[a[1]];case 221:case 253:return 2==a.length?OP_DD_STATES[a[1]]:OP_INDEX_CB_STATES[a[2]];case 237:return OP_ED_STATES[a[1]];default:return OP_STATES[a[0]]}}function b(a){return JSSMS.Utils.traverse(a,function(a){"Register"==a.type&&(a.type="Identifier");return a})}var c=JSSMS.Utils.toHex,e="page temp location val value JSSMS.Utils.rndInt".split(" "),d=function(){this.ast=[]};d.prototype={generate:function(d){for(var h= +0;h=this.rom.length?JSSMS.Utils.console.log("Parsing full ROM"): +(this.options.pageLimit=0,JSSMS.Utils.console.log("Parsing initial memory page of ROM"));for(var e=this.parse().analyze().optimize().generate(),d=0;d. */ -(function(window){'use strict';function $JSCompiler_emptyFn$$() { - return function() { - } -} -var $SUPPORT_TYPED_ARRAYS$$ = "Uint8Array" in window, $SUPPORT_DATAVIEW$$ = "ArrayBuffer" in window && "DataView" in window; +(function(window){'use strict';var $DEBUG$$ = !1, $ENABLE_COMPILER$$ = !0, $SUPPORT_TYPED_ARRAYS$$ = "Uint8Array" in window, $SUPPORT_DATAVIEW$$ = "ArrayBuffer" in window && "DataView" in window; function $JSSMS$$($opts$$) { - this.$c$ = {ui:$JSSMS$DummyUI$$, swfPath:"lib/"}; - if(void 0 != $opts$$) { - for(var $key$$16$$ in this.$c$) { - void 0 != $opts$$[$key$$16$$] && (this.$c$[$key$$16$$] = $opts$$[$key$$16$$]) + this.$g$ = {ui:$JSSMS$DummyUI$$, swfPath:"lib/"}; + if (void 0 !== $opts$$) { + for (var $key$$16$$ in this.$g$) { + void 0 !== $opts$$[$key$$16$$] && (this.$g$[$key$$16$$] = $opts$$[$key$$16$$]); } } + void 0 !== $opts$$.DEBUG && ($DEBUG$$ = $opts$$.DEBUG); + void 0 !== $opts$$.ENABLE_COMPILER && ($ENABLE_COMPILER$$ = $opts$$.ENABLE_COMPILER); this.$keyboard$ = new $JSSMS$Keyboard$$(this); - this.$a$ = new this.$c$.ui(this); + this.$a$ = new this.$g$.ui(this); this.$vdp$ = new $JSSMS$Vdp$$(this); - this.$b$ = new $JSSMS$SN76489$$(this); - this.$f$ = new $JSSMS$Ports$$(this); + this.$f$ = new $JSSMS$SN76489$$(this); + this.$i$ = new $JSSMS$Ports$$(this); this.$cpu$ = new $JSSMS$Z80$$(this); this.$a$.updateStatus("Ready to load a ROM."); - this.ui = this.$a$ + this.ui = this.$a$; } -$JSSMS$$.prototype = {$isRunning$:!1, $cyclesPerLine$:0, $no_of_scanlines$:0, $fps$:0, $pause_button$:!1, $is_sms$:!0, $is_gg$:!1, $soundEnabled$:!1, $audioBuffer$:[], $audioBufferOffset$:0, $samplesPerFrame$:0, $samplesPerLine$:[], $fpsFrameCount$:0, $romData$:"", $romFileName$:"", $lineno$:0, reset:function $$JSSMS$$$$reset$() { - var $JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$ = this.$vdp$.$N$, $clockSpeedHz$$inline_24_v$$inline_26$$ = 0; - 0 == $JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$ || this.$is_gg$ ? (this.$fps$ = 60, this.$no_of_scanlines$ = 262, $clockSpeedHz$$inline_24_v$$inline_26$$ = 3579545) : (this.$fps$ = 50, this.$no_of_scanlines$ = 313, $clockSpeedHz$$inline_24_v$$inline_26$$ = 3546893); - this.$cyclesPerLine$ = Math.round($clockSpeedHz$$inline_24_v$$inline_26$$ / this.$fps$ / this.$no_of_scanlines$ + 1); - this.$vdp$.$N$ = $JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$; - if(this.$soundEnabled$) { - this.$b$.$o$($clockSpeedHz$$inline_24_v$$inline_26$$, 44100); +$JSSMS$$.prototype = {$isRunning$:!1, $cyclesPerLine$:0, $no_of_scanlines$:0, $frameSkip$:0, $fps$:0, $frameskip_counter$:0, $pause_button$:!1, $is_sms$:!0, $is_gg$:!1, $soundEnabled$:!1, $audioBuffer$:[], $audioBufferOffset$:0, $samplesPerFrame$:0, $samplesPerLine$:[], $emuWidth$:0, $emuHeight$:0, $fpsFrameCount$:0, $frameCount$:0, $romData$:"", $romFileName$:"", $lineno$:0, reset:function $$JSSMS$$$$reset$() { + var $JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$ = this.$vdp$.$Q$, $clockSpeedHz$$inline_25_v$$inline_27$$ = 0; + 0 == $JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$ || this.$is_gg$ ? (this.$fps$ = 60, this.$no_of_scanlines$ = 262, $clockSpeedHz$$inline_25_v$$inline_27$$ = 3579545) : (this.$fps$ = 50, this.$no_of_scanlines$ = 313, $clockSpeedHz$$inline_25_v$$inline_27$$ = 3546893); + this.$cyclesPerLine$ = Math.round($clockSpeedHz$$inline_25_v$$inline_27$$ / this.$fps$ / this.$no_of_scanlines$ + 1); + this.$vdp$.$Q$ = $JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$; + if (this.$soundEnabled$) { + this.$f$.$s$($clockSpeedHz$$inline_25_v$$inline_27$$, 44100); this.$samplesPerFrame$ = Math.round(44100 / this.$fps$); - if(0 == this.$audioBuffer$.length || this.$audioBuffer$.length != this.$samplesPerFrame$) { - this.$audioBuffer$ = Array(this.$samplesPerFrame$) + if (0 === this.$audioBuffer$.length || this.$audioBuffer$.length != this.$samplesPerFrame$) { + this.$audioBuffer$ = Array(this.$samplesPerFrame$); } - if(0 == this.$samplesPerLine$.length || this.$samplesPerLine$.length != this.$no_of_scanlines$) { + if (0 === this.$samplesPerLine$.length || this.$samplesPerLine$.length != this.$no_of_scanlines$) { this.$samplesPerLine$ = Array(this.$no_of_scanlines$); - for(var $fractional$$inline_27$$ = 0, $JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$ = 0;$JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$ < this.$no_of_scanlines$;$JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$++) { - $clockSpeedHz$$inline_24_v$$inline_26$$ = (this.$samplesPerFrame$ << 16) / this.$no_of_scanlines$ + $fractional$$inline_27$$, $fractional$$inline_27$$ = $clockSpeedHz$$inline_24_v$$inline_26$$ - ($clockSpeedHz$$inline_24_v$$inline_26$$ >> 16 << 16), this.$samplesPerLine$[$JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$] = $clockSpeedHz$$inline_24_v$$inline_26$$ >> 16 + for (var $fractional$$inline_28$$ = 0, $JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$ = 0;$JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$ < this.$no_of_scanlines$;$JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$++) { + $clockSpeedHz$$inline_25_v$$inline_27$$ = (this.$samplesPerFrame$ << 16) / this.$no_of_scanlines$ + $fractional$$inline_28$$, $fractional$$inline_28$$ = $clockSpeedHz$$inline_25_v$$inline_27$$ - ($clockSpeedHz$$inline_25_v$$inline_27$$ >> 16 << 16), this.$samplesPerLine$[$JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$] = $clockSpeedHz$$inline_25_v$$inline_27$$ >> 16; } } } + this.$frameCount$ = 0; + this.$frameskip_counter$ = this.$frameSkip$; this.$keyboard$.reset(); this.$a$.reset(); this.$vdp$.reset(); - this.$f$.reset(); + this.$i$.reset(); this.$cpu$.reset(); - $JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$ = this.$cpu$; - $JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$.$instructions$ = []; - $JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$.$main$.$a$.updateStatus("Parsing instructions..."); - $JSCompiler_StaticMethods_parseInstructions$$($JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$); - $JSCompiler_StaticMethods_resetDebug$self$$inline_29_i$$inline_25_mode$$inline_23$$.$main$.$a$.updateStatus("Instructions parsed"); - clearInterval(this.$g$) + $JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$ = this.$cpu$; + $JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$.$instructions$ = []; + $JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$.$main$.$a$.updateStatus("Parsing instructions..."); + $JSCompiler_StaticMethods_parseInstructions$$($JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$); + $JSCompiler_StaticMethods_resetDebug$self$$inline_30_i$$inline_26_mode$$inline_24$$.$main$.$a$.updateStatus("Instructions parsed"); + $DEBUG$$ && clearInterval(this.$j$); }, start:function $$JSSMS$$$$start$() { var $self$$1$$ = this; - this.$isRunning$ || (this.$isRunning$ = !0, this.$a$.requestAnimationFrame(this.$JSSMS_prototype$frame$.bind(this), this.$a$.screen), this.$h$ = $JSSMS$Utils$getTimestamp$$(), this.$fpsFrameCount$ = 0, this.$g$ = setInterval(function() { - var $now$$inline_34$$ = $JSSMS$Utils$getTimestamp$$(); - $self$$1$$.$a$.updateStatus("Running: " + ($self$$1$$.$fpsFrameCount$ / (($now$$inline_34$$ - $self$$1$$.$h$) / 1E3)).toFixed(2) + " FPS"); + this.$isRunning$ || (this.$isRunning$ = !0, this.$a$.requestAnimationFrame(this.$JSSMS_prototype$frame$.bind(this), this.$a$.screen), $DEBUG$$ && (this.$m$ = $JSSMS$Utils$getTimestamp$$(), this.$fpsFrameCount$ = 0, this.$j$ = setInterval(function() { + var $now$$inline_35$$ = $JSSMS$Utils$getTimestamp$$(); + $self$$1$$.$a$.updateStatus("Running: " + ($self$$1$$.$fpsFrameCount$ / (($now$$inline_35$$ - $self$$1$$.$m$) / 1E3)).toFixed(2) + " FPS"); $self$$1$$.$fpsFrameCount$ = 0; - $self$$1$$.$h$ = $now$$inline_34$$ - }, 500)); - this.$a$.updateStatus("Running") + $self$$1$$.$m$ = $now$$inline_35$$; + }, 500))); + this.$a$.updateStatus("Running"); }, stop:function $$JSSMS$$$$stop$() { - clearInterval(this.$g$); - this.$isRunning$ = !1 + $DEBUG$$ && clearInterval(this.$j$); + this.$isRunning$ = !1; }, $JSSMS_prototype$frame$:function $$JSSMS$$$$$JSSMS_prototype$frame$$() { - this.$isRunning$ && ($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$$(this.$cpu$), this.$fpsFrameCount$++, this.$a$.requestAnimationFrame(this.$JSSMS_prototype$frame$.bind(this), this.$a$.screen)) + this.$isRunning$ && ($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$$(this.$cpu$), this.$fpsFrameCount$++, this.$a$.requestAnimationFrame(this.$JSSMS_prototype$frame$.bind(this), this.$a$.screen)); }, $nextStep$:function $$JSSMS$$$$$nextStep$$() { - $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$$(this.$cpu$) -}, $loadROM$:function $$JSSMS$$$$$loadROM$$($data$$31$$, $size$$12$$) { - 0 != $size$$12$$ % 1024 && ($data$$31$$ = $data$$31$$.substr(512), $size$$12$$ -= 512); - var $i$$2$$, $j$$, $number_of_pages$$ = Math.round($size$$12$$ / 16384), $pages$$1$$ = Array($number_of_pages$$); - for($i$$2$$ = 0;$i$$2$$ < $number_of_pages$$;$i$$2$$++) { - if($pages$$1$$[$i$$2$$] = $JSSMS$Utils$Array$$(16384), $SUPPORT_DATAVIEW$$) { - for($j$$ = 0;16384 > $j$$;$j$$++) { - $pages$$1$$[$i$$2$$].setUint8($j$$, $data$$31$$.charCodeAt(16384 * $i$$2$$ + $j$$)) + $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$$(this.$cpu$); +}, $loadROM$:function $$JSSMS$$$$$loadROM$$($data$$33$$, $size$$12$$) { + 0 !== $size$$12$$ % 1024 && ($data$$33$$ = $data$$33$$.substr(512), $size$$12$$ -= 512); + var $i$$4$$, $j$$, $number_of_pages$$ = Math.round($size$$12$$ / 16384), $pages$$1$$ = Array($number_of_pages$$); + for ($i$$4$$ = 0;$i$$4$$ < $number_of_pages$$;$i$$4$$++) { + if ($pages$$1$$[$i$$4$$] = $JSSMS$Utils$Array$$(16384), $SUPPORT_DATAVIEW$$) { + for ($j$$ = 0;16384 > $j$$;$j$$++) { + $pages$$1$$[$i$$4$$].setUint8($j$$, $data$$33$$.charCodeAt(16384 * $i$$4$$ + $j$$)); } - }else { - for($j$$ = 0;16384 > $j$$;$j$$++) { - $pages$$1$$[$i$$2$$][$j$$] = $data$$31$$.charCodeAt(16384 * $i$$2$$ + $j$$) & 255 + } else { + for ($j$$ = 0;16384 > $j$$;$j$$++) { + $pages$$1$$[$i$$4$$][$j$$] = $data$$33$$.charCodeAt(16384 * $i$$4$$ + $j$$) & 255; } } } - return $pages$$1$$ + return $pages$$1$$; }}; -function $JSCompiler_StaticMethods_readRomDirectly$$($JSCompiler_StaticMethods_readRomDirectly$self$$, $data$$30$$, $fileName$$) { - var $mode$$9_pages$$; - $mode$$9_pages$$ = ".gg" == $fileName$$.substr(-3).toLowerCase() ? 2 : 1; - var $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$ = $data$$30$$.length; - 1 == $mode$$9_pages$$ ? ($JSCompiler_StaticMethods_readRomDirectly$self$$.$is_sms$ = !0, $JSCompiler_StaticMethods_readRomDirectly$self$$.$is_gg$ = !1, $JSCompiler_StaticMethods_readRomDirectly$self$$.$vdp$.$F$ = 0, $JSCompiler_StaticMethods_readRomDirectly$self$$.$vdp$.$K$ = 32) : 2 == $mode$$9_pages$$ && ($JSCompiler_StaticMethods_readRomDirectly$self$$.$is_gg$ = !0, $JSCompiler_StaticMethods_readRomDirectly$self$$.$is_sms$ = !1, $JSCompiler_StaticMethods_readRomDirectly$self$$.$vdp$.$F$ = 5, - $JSCompiler_StaticMethods_readRomDirectly$self$$.$vdp$.$K$ = 27); - if(16384 >= $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$) { - return!1 - } - $mode$$9_pages$$ = $JSCompiler_StaticMethods_readRomDirectly$self$$.$loadROM$($data$$30$$, $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$); - if(null == $mode$$9_pages$$) { - return!1 - } - var $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$ = $JSCompiler_StaticMethods_readRomDirectly$self$$.$cpu$, $i$$inline_42$$ = 0; - $mode$$9_pages$$ && ($JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$rom$ = $mode$$9_pages$$); - if($JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$rom$.length) { - $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$S$ = $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$rom$.length; - $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$romPageMask$ = $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$S$ - 1; - for($i$$inline_42$$ = 0;3 > $i$$inline_42$$;$i$$inline_42$$++) { - $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$frameReg$[$i$$inline_42$$] = $i$$inline_42$$ % $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$S$ +function $JSCompiler_StaticMethods_readRomDirectly$$($JSCompiler_StaticMethods_readRomDirectly$self$$, $data$$32$$, $fileName$$) { + var $mode$$11_pages$$; + $mode$$11_pages$$ = ".gg" == $fileName$$.substr(-3).toLowerCase() ? 2 : 1; + var $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$ = $data$$32$$.length; + 1 == $mode$$11_pages$$ ? ($JSCompiler_StaticMethods_readRomDirectly$self$$.$is_sms$ = !0, $JSCompiler_StaticMethods_readRomDirectly$self$$.$is_gg$ = !1, $JSCompiler_StaticMethods_readRomDirectly$self$$.$vdp$.$J$ = 0, $JSCompiler_StaticMethods_readRomDirectly$self$$.$vdp$.$O$ = 32, $JSCompiler_StaticMethods_readRomDirectly$self$$.$emuWidth$ = 256, $JSCompiler_StaticMethods_readRomDirectly$self$$.$emuHeight$ = 192) : 2 == $mode$$11_pages$$ && ($JSCompiler_StaticMethods_readRomDirectly$self$$.$is_gg$ = + !0, $JSCompiler_StaticMethods_readRomDirectly$self$$.$is_sms$ = !1, $JSCompiler_StaticMethods_readRomDirectly$self$$.$vdp$.$J$ = 5, $JSCompiler_StaticMethods_readRomDirectly$self$$.$vdp$.$O$ = 27, $JSCompiler_StaticMethods_readRomDirectly$self$$.$emuWidth$ = 160, $JSCompiler_StaticMethods_readRomDirectly$self$$.$emuHeight$ = 144); + if (16384 >= $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$) { + return!1; + } + $mode$$11_pages$$ = $JSCompiler_StaticMethods_readRomDirectly$self$$.$loadROM$($data$$32$$, $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$); + if (null === $mode$$11_pages$$) { + return!1; + } + var $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$ = $JSCompiler_StaticMethods_readRomDirectly$self$$.$cpu$, $i$$inline_43$$ = 0; + $mode$$11_pages$$ && ($JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$rom$ = $mode$$11_pages$$); + if ($JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$rom$.length) { + $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$N$ = $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$rom$.length; + $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$romPageMask$ = $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$N$ - 1; + for ($i$$inline_43$$ = 0;3 > $i$$inline_43$$;$i$$inline_43$$++) { + $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$frameReg$[$i$$inline_43$$] = $i$$inline_43$$ % $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$N$; + } + $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$frameReg$[3] = 0; + if ($ENABLE_COMPILER$$) { + $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$branches$ = Array($JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$N$); + for ($i$$inline_43$$ = 0;$i$$inline_43$$ < $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$N$;$i$$inline_43$$++) { + $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$branches$[$i$$inline_43$$] = Object.create(null); + } + $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$R$.$g$($JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$rom$); } - $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$frameReg$[3] = 0 - }else { - $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$S$ = 0, $JSCompiler_StaticMethods_resetMemory$self$$inline_40_size$$11$$.$romPageMask$ = 0 + } else { + $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$N$ = 0, $JSCompiler_StaticMethods_resetMemory$self$$inline_41_size$$11$$.$romPageMask$ = 0; } - $JSCompiler_StaticMethods_readRomDirectly$self$$.$romData$ = $data$$30$$; + $JSCompiler_StaticMethods_readRomDirectly$self$$.$romData$ = $data$$32$$; $JSCompiler_StaticMethods_readRomDirectly$self$$.$romFileName$ = $fileName$$; - return!0 + return!0; } -;"console" in window ? "bind" in window.console.log || (window.console.log = function($fn$$inline_57$$) { - return function($msg$$inline_58$$) { - return $fn$$inline_57$$($msg$$inline_58$$) - } -}(window.console.log), window.console.error = function($fn$$inline_59$$) { - return function($msg$$inline_60$$) { - return $fn$$inline_59$$($msg$$inline_60$$) - } -}(window.console.error)) : window.console = {log:$JSCompiler_emptyFn$$(), error:$JSCompiler_emptyFn$$()}; +;"console" in window ? "bind" in window.console.log || (window.console.log = function($fn$$inline_58$$) { + return function($msg$$inline_59$$) { + return $fn$$inline_58$$($msg$$inline_59$$); + }; +}(window.console.log), window.console.error = function($fn$$inline_60$$) { + return function($msg$$inline_61$$) { + return $fn$$inline_60$$($msg$$inline_61$$); + }; +}(window.console.error)) : window.console = {log:function $window$console$log$() { +}, error:function $window$console$error$() { +}}; var $JSSMS$Utils$Uint8Array$$ = $SUPPORT_TYPED_ARRAYS$$ ? Uint8Array : Array, $JSSMS$Utils$Array$$ = $SUPPORT_DATAVIEW$$ ? function($length$$12$$) { - return new DataView(new ArrayBuffer($length$$12$$)) -} : Array, $JSSMS$Utils$console$log$$ = window.console.log.bind(window.console), $JSSMS$Utils$console$error$$ = window.console.error.bind(window.console), $JSSMS$Utils$console$time$$ = window.console.time ? window.console.time.bind(window.console) : $JSCompiler_emptyFn$$(), $JSSMS$Utils$console$timeEnd$$ = window.console.timeEnd ? window.console.timeEnd.bind(window.console) : $JSCompiler_emptyFn$$(), $JSSMS$Utils$getTimestamp$$ = window.performance && window.performance.now ? window.performance.now.bind(window.performance) : -function() { - return(new Date).getTime() + return new DataView(new ArrayBuffer($length$$12$$)); +} : Array, $JSSMS$Utils$console$log$$ = $DEBUG$$ ? window.console.log.bind(window.console) : function() { +}, $JSSMS$Utils$console$error$$ = $DEBUG$$ ? window.console.error.bind(window.console) : function() { +}, $JSSMS$Utils$console$time$$ = $DEBUG$$ && window.console.time ? window.console.time.bind(window.console) : function() { +}, $JSSMS$Utils$console$timeEnd$$ = $DEBUG$$ && window.console.timeEnd ? window.console.timeEnd.bind(window.console) : function() { +}; +function $JSSMS$Utils$traverse$$($object$$, $fn$$2$$) { + var $key$$17$$, $child$$1$$; + $fn$$2$$.call(null, $object$$); + for ($key$$17$$ in $object$$) { + $object$$.hasOwnProperty($key$$17$$) && ($child$$1$$ = $object$$[$key$$17$$], Object($child$$1$$) === $child$$1$$ && ($object$$[$key$$17$$] = $JSSMS$Utils$traverse$$($child$$1$$, $fn$$2$$))); + } + return $object$$; +} +var $JSSMS$Utils$getTimestamp$$ = window.performance && window.performance.now ? window.performance.now.bind(window.performance) : function() { + return(new Date).getTime(); }; function $JSSMS$Utils$toHex$$($dec_hex$$) { $dec_hex$$ = $dec_hex$$.toString(16).toUpperCase(); $dec_hex$$.length % 2 && ($dec_hex$$ = "0" + $dec_hex$$); - return"0x" + $dec_hex$$ + return "0x" + $dec_hex$$; } function $JSSMS$Utils$getPrefix$$($arr$$16$$, $obj$$35$$) { var $prefix$$2$$ = !1; - void 0 == $obj$$35$$ && ($obj$$35$$ = document); + void 0 === $obj$$35$$ && ($obj$$35$$ = document); $arr$$16$$.some(function($prop$$4$$) { - return $prop$$4$$ in $obj$$35$$ ? ($prefix$$2$$ = $prop$$4$$, !0) : !1 + return $prop$$4$$ in $obj$$35$$ ? ($prefix$$2$$ = $prop$$4$$, !0) : !1; }); - return $prefix$$2$$ + return $prefix$$2$$; } ;var $OP_STATES$$ = [4, 10, 7, 6, 4, 4, 7, 4, 4, 11, 7, 6, 4, 4, 7, 4, 8, 10, 7, 6, 4, 4, 7, 4, 12, 11, 7, 6, 4, 4, 7, 4, 7, 10, 16, 6, 4, 4, 7, 4, 7, 11, 16, 6, 4, 4, 7, 4, 7, 10, 13, 6, 11, 11, 10, 4, 7, 11, 13, 6, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 7, 7, 7, 7, 7, 7, 4, 7, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 4, 4, 7, 4, 5, 10, 10, 10, 10, 11, 7, 11, 5, 10, 10, 0, 10, 17, 7, 11, 5, 10, 10, 11, 10, 11, 7, 11, 5, 4, 10, 11, 10, 0, 7, 11, 5, 10, 10, 19, 10, 11, 7, 11, 5, 4, 10, 4, 10, 0, 7, 11, 5, 10, 10, 4, 10, 11, 7, 11, 5, 6, 10, 4, 10, 0, 7, 11], $OP_CB_STATES$$ = [8, 8, 8, 8, 8, 8, 15, 8, 8, 8, 8, 8, 8, 8, 15, 8, 8, 8, 8, 8, 8, 8, 15, 8, 8, 8, 8, 8, 8, 8, 15, 8, 8, 8, 8, 8, 8, 8, 15, 8, 8, 8, 8, 8, 8, @@ -164,663 +185,620 @@ function $JSSMS$Utils$getPrefix$$($arr$$16$$, $obj$$35$$) { 20, 20, 20, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23], $OP_ED_STATES$$ = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 15, 20, 8, 14, 8, 9, 12, 12, 15, 20, 8, 14, 8, 9, 12, 12, 15, 20, 8, 14, 8, 9, 12, 12, 15, 20, 8, 14, 8, 9, 12, 12, 15, 20, 8, 14, 8, 18, 12, 12, 15, 20, 8, 14, 8, 18, 8, 12, 15, 20, 8, 14, 8, 8, 12, 12, 15, 20, 8, 14, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 8, 8, 8, 8, 16, 16, 16, 16, 8, 8, 8, 8, 16, 16, 16, 16, 8, 8, 8, 8, 16, 16, 16, 16, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]; -function $JSSMS$Z80$$($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$) { - this.$main$ = $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$; - this.$vdp$ = $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$.$vdp$; - this.port = $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$.$f$; - this.$Q$ = this.$n$ = this.$b$ = 0; - this.$I$ = this.$P$ = this.$O$ = this.$K$ = this.$J$ = !1; - this.$o$ = this.$ba$ = this.$c$ = this.$U$ = this.$v$ = this.$s$ = this.$t$ = this.$q$ = this.$da$ = this.$ca$ = this.$l$ = this.$j$ = this.$aa$ = this.$Z$ = this.$e$ = this.$d$ = this.$Y$ = this.$X$ = this.$g$ = this.$h$ = this.$W$ = this.$a$ = this.$R$ = 0; +function $JSSMS$Z80$$($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$) { + this.$main$ = $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$; + this.$vdp$ = $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$.$vdp$; + this.$w$ = $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$.$i$; + this.$T$ = this.$n$ = this.$f$ = 0; + this.$J$ = this.$S$ = this.$Q$ = this.$M$ = this.$K$ = !1; + this.$o$ = this.$da$ = this.$g$ = this.$W$ = this.$r$ = this.$v$ = this.$s$ = this.$t$ = this.$q$ = this.$fa$ = this.$ea$ = this.$l$ = this.$h$ = this.$ca$ = this.$ba$ = this.$e$ = this.$d$ = this.$aa$ = this.$Z$ = this.$c$ = this.$b$ = this.$Y$ = this.$a$ = this.$U$ = 0; this.$rom$ = []; this.$sram$ = $JSSMS$Utils$Array$$(32768); this.$frameReg$ = Array(4); - this.$S$ = this.$romPageMask$ = 0; + this.$N$ = this.$romPageMask$ = 0; this.$memWriteMap$ = $JSSMS$Utils$Array$$(8192); - this.$ea$ = Array(2048); - this.$V$ = Array(256); + this.$ga$ = Array(2048); + this.$X$ = Array(256); this.$m$ = Array(256); - this.$N$ = Array(256); - this.$M$ = Array(256); + this.$P$ = Array(256); + this.$O$ = Array(256); + this.$G$ = Array(131072); this.$F$ = Array(131072); - this.$w$ = Array(131072); - this.$T$ = Array(256); - var $c$$inline_79_padc$$inline_70_sf$$inline_64$$, $h$$inline_80_psub$$inline_71_zf$$inline_65$$, $n$$inline_81_psbc$$inline_72_yf$$inline_66$$, $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$, $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$, $flags$$inline_266_newval$$inline_75$$; - for($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ = 0;256 > $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$;$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$++) { - $c$$inline_79_padc$$inline_70_sf$$inline_64$$ = 0 != ($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ & 128) ? 128 : 0, $h$$inline_80_psub$$inline_71_zf$$inline_65$$ = 0 == $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ ? 64 : 0, $n$$inline_81_psbc$$inline_72_yf$$inline_66$$ = $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ & 32, $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ = $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ & - 8, $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ = $JSCompiler_StaticMethods_getParity$$($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$) ? 4 : 0, this.$V$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] = $c$$inline_79_padc$$inline_70_sf$$inline_64$$ | $h$$inline_80_psub$$inline_71_zf$$inline_65$$ | $n$$inline_81_psbc$$inline_72_yf$$inline_66$$ | $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$, this.$m$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] = - $c$$inline_79_padc$$inline_70_sf$$inline_64$$ | $h$$inline_80_psub$$inline_71_zf$$inline_65$$ | $n$$inline_81_psbc$$inline_72_yf$$inline_66$$ | $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ | $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$, this.$N$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] = $c$$inline_79_padc$$inline_70_sf$$inline_64$$ | $h$$inline_80_psub$$inline_71_zf$$inline_65$$ | $n$$inline_81_psbc$$inline_72_yf$$inline_66$$ | $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$, - this.$N$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] |= 128 == $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ ? 4 : 0, this.$N$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] |= 0 == ($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ & 15) ? 16 : 0, this.$M$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] = $c$$inline_79_padc$$inline_70_sf$$inline_64$$ | $h$$inline_80_psub$$inline_71_zf$$inline_65$$ | $n$$inline_81_psbc$$inline_72_yf$$inline_66$$ | - $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ | 2, this.$M$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] |= 127 == $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ ? 4 : 0, this.$M$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] |= 15 == ($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ & 15) ? 16 : 0, this.$T$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] = 0 != $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ ? - $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ & 128 : 68, this.$T$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] |= $n$$inline_81_psbc$$inline_72_yf$$inline_66$$ | $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ | 16 - } - $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ = 0; - $c$$inline_79_padc$$inline_70_sf$$inline_64$$ = 65536; - $h$$inline_80_psub$$inline_71_zf$$inline_65$$ = 0; - $n$$inline_81_psbc$$inline_72_yf$$inline_66$$ = 65536; - for($JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ = 0;256 > $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$;$JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$++) { - for($flags$$inline_266_newval$$inline_75$$ = 0;256 > $flags$$inline_266_newval$$inline_75$$;$flags$$inline_266_newval$$inline_75$$++) { - $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ = $flags$$inline_266_newval$$inline_75$$ - $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$, this.$F$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] = 0 != $flags$$inline_266_newval$$inline_75$$ ? 0 != ($flags$$inline_266_newval$$inline_75$$ & 128) ? 128 : 0 : 64, this.$F$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] |= $flags$$inline_266_newval$$inline_75$$ & 40, ($flags$$inline_266_newval$$inline_75$$ & - 15) < ($JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ & 15) && (this.$F$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] |= 16), $flags$$inline_266_newval$$inline_75$$ < $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ && (this.$F$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] |= 1), 0 != (($JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ ^ $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ ^ 128) & ($JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ ^ - $flags$$inline_266_newval$$inline_75$$) & 128) && (this.$F$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] |= 4), $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$++, $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ = $flags$$inline_266_newval$$inline_75$$ - $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ - 1, this.$F$[$c$$inline_79_padc$$inline_70_sf$$inline_64$$] = 0 != $flags$$inline_266_newval$$inline_75$$ ? 0 != ($flags$$inline_266_newval$$inline_75$$ & - 128) ? 128 : 0 : 64, this.$F$[$c$$inline_79_padc$$inline_70_sf$$inline_64$$] |= $flags$$inline_266_newval$$inline_75$$ & 40, ($flags$$inline_266_newval$$inline_75$$ & 15) <= ($JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ & 15) && (this.$F$[$c$$inline_79_padc$$inline_70_sf$$inline_64$$] |= 16), $flags$$inline_266_newval$$inline_75$$ <= $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ && (this.$F$[$c$$inline_79_padc$$inline_70_sf$$inline_64$$] |= 1), 0 != (($JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ ^ - $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ ^ 128) & ($JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ ^ $flags$$inline_266_newval$$inline_75$$) & 128) && (this.$F$[$c$$inline_79_padc$$inline_70_sf$$inline_64$$] |= 4), $c$$inline_79_padc$$inline_70_sf$$inline_64$$++, $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ = $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ - $flags$$inline_266_newval$$inline_75$$, this.$w$[$h$$inline_80_psub$$inline_71_zf$$inline_65$$] = - 0 != $flags$$inline_266_newval$$inline_75$$ ? 0 != ($flags$$inline_266_newval$$inline_75$$ & 128) ? 130 : 2 : 66, this.$w$[$h$$inline_80_psub$$inline_71_zf$$inline_65$$] |= $flags$$inline_266_newval$$inline_75$$ & 40, ($flags$$inline_266_newval$$inline_75$$ & 15) > ($JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ & 15) && (this.$w$[$h$$inline_80_psub$$inline_71_zf$$inline_65$$] |= 16), $flags$$inline_266_newval$$inline_75$$ > $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ && - (this.$w$[$h$$inline_80_psub$$inline_71_zf$$inline_65$$] |= 1), 0 != (($JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ ^ $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$) & ($JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ ^ $flags$$inline_266_newval$$inline_75$$) & 128) && (this.$w$[$h$$inline_80_psub$$inline_71_zf$$inline_65$$] |= 4), $h$$inline_80_psub$$inline_71_zf$$inline_65$$++, $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ = $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ - - $flags$$inline_266_newval$$inline_75$$ - 1, this.$w$[$n$$inline_81_psbc$$inline_72_yf$$inline_66$$] = 0 != $flags$$inline_266_newval$$inline_75$$ ? 0 != ($flags$$inline_266_newval$$inline_75$$ & 128) ? 130 : 2 : 66, this.$w$[$n$$inline_81_psbc$$inline_72_yf$$inline_66$$] |= $flags$$inline_266_newval$$inline_75$$ & 40, ($flags$$inline_266_newval$$inline_75$$ & 15) >= ($JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ & 15) && (this.$w$[$n$$inline_81_psbc$$inline_72_yf$$inline_66$$] |= - 16), $flags$$inline_266_newval$$inline_75$$ >= $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ && (this.$w$[$n$$inline_81_psbc$$inline_72_yf$$inline_66$$] |= 1), 0 != (($JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ ^ $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$) & ($JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ ^ $flags$$inline_266_newval$$inline_75$$) & 128) && (this.$w$[$n$$inline_81_psbc$$inline_72_yf$$inline_66$$] |= 4), $n$$inline_81_psbc$$inline_72_yf$$inline_66$$++ + this.$V$ = Array(256); + var $c$$inline_80_padc$$inline_71_sf$$inline_65$$, $h$$inline_81_psub$$inline_72_zf$$inline_66$$, $n$$inline_82_psbc$$inline_73_yf$$inline_67$$, $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$, $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$, $flags$$inline_317_newval$$inline_76$$; + for ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ = 0;256 > $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$;$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$++) { + $c$$inline_80_padc$$inline_71_sf$$inline_65$$ = 0 !== ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ & 128) ? 128 : 0, $h$$inline_81_psub$$inline_72_zf$$inline_66$$ = 0 === $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ ? 64 : 0, $n$$inline_82_psbc$$inline_73_yf$$inline_67$$ = $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ & 32, $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ = $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ & + 8, $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ = $JSCompiler_StaticMethods_getParity$$($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$) ? 4 : 0, this.$X$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = $c$$inline_80_padc$$inline_71_sf$$inline_65$$ | $h$$inline_81_psub$$inline_72_zf$$inline_66$$ | $n$$inline_82_psbc$$inline_73_yf$$inline_67$$ | $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$, this.$m$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = + $c$$inline_80_padc$$inline_71_sf$$inline_65$$ | $h$$inline_81_psub$$inline_72_zf$$inline_66$$ | $n$$inline_82_psbc$$inline_73_yf$$inline_67$$ | $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ | $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$, this.$P$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = $c$$inline_80_padc$$inline_71_sf$$inline_65$$ | $h$$inline_81_psub$$inline_72_zf$$inline_66$$ | $n$$inline_82_psbc$$inline_73_yf$$inline_67$$ | $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$, + this.$P$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] |= 128 === $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ ? 4 : 0, this.$P$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] |= 0 === ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ & 15) ? 16 : 0, this.$O$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = $c$$inline_80_padc$$inline_71_sf$$inline_65$$ | $h$$inline_81_psub$$inline_72_zf$$inline_66$$ | $n$$inline_82_psbc$$inline_73_yf$$inline_67$$ | + $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ | 2, this.$O$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] |= 127 === $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ ? 4 : 0, this.$O$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] |= 15 === ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ & 15) ? 16 : 0, this.$V$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = 0 !== $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ ? + $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ & 128 : 68, this.$V$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = this.$V$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] | $n$$inline_82_psbc$$inline_73_yf$$inline_67$$ | $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ | 16; + } + $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ = 0; + $c$$inline_80_padc$$inline_71_sf$$inline_65$$ = 65536; + $h$$inline_81_psub$$inline_72_zf$$inline_66$$ = 0; + $n$$inline_82_psbc$$inline_73_yf$$inline_67$$ = 65536; + for ($JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ = 0;256 > $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$;$JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$++) { + for ($flags$$inline_317_newval$$inline_76$$ = 0;256 > $flags$$inline_317_newval$$inline_76$$;$flags$$inline_317_newval$$inline_76$$++) { + $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ = $flags$$inline_317_newval$$inline_76$$ - $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$, this.$G$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = 0 !== $flags$$inline_317_newval$$inline_76$$ ? 0 !== ($flags$$inline_317_newval$$inline_76$$ & 128) ? 128 : 0 : 64, this.$G$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] |= $flags$$inline_317_newval$$inline_76$$ & 40, ($flags$$inline_317_newval$$inline_76$$ & + 15) < ($JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ & 15) && (this.$G$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] |= 16), $flags$$inline_317_newval$$inline_76$$ < $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ && (this.$G$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] |= 1), 0 !== (($JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ ^ $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ ^ 128) & ($JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ ^ + $flags$$inline_317_newval$$inline_76$$) & 128) && (this.$G$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] |= 4), $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$++, $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ = $flags$$inline_317_newval$$inline_76$$ - $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ - 1, this.$G$[$c$$inline_80_padc$$inline_71_sf$$inline_65$$] = 0 !== $flags$$inline_317_newval$$inline_76$$ ? 0 !== ($flags$$inline_317_newval$$inline_76$$ & + 128) ? 128 : 0 : 64, this.$G$[$c$$inline_80_padc$$inline_71_sf$$inline_65$$] |= $flags$$inline_317_newval$$inline_76$$ & 40, ($flags$$inline_317_newval$$inline_76$$ & 15) <= ($JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ & 15) && (this.$G$[$c$$inline_80_padc$$inline_71_sf$$inline_65$$] |= 16), $flags$$inline_317_newval$$inline_76$$ <= $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ && (this.$G$[$c$$inline_80_padc$$inline_71_sf$$inline_65$$] |= 1), 0 !== (($JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ ^ + $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ ^ 128) & ($JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ ^ $flags$$inline_317_newval$$inline_76$$) & 128) && (this.$G$[$c$$inline_80_padc$$inline_71_sf$$inline_65$$] |= 4), $c$$inline_80_padc$$inline_71_sf$$inline_65$$++, $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ = $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ - $flags$$inline_317_newval$$inline_76$$, this.$F$[$h$$inline_81_psub$$inline_72_zf$$inline_66$$] = + 0 !== $flags$$inline_317_newval$$inline_76$$ ? 0 !== ($flags$$inline_317_newval$$inline_76$$ & 128) ? 130 : 2 : 66, this.$F$[$h$$inline_81_psub$$inline_72_zf$$inline_66$$] |= $flags$$inline_317_newval$$inline_76$$ & 40, ($flags$$inline_317_newval$$inline_76$$ & 15) > ($JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ & 15) && (this.$F$[$h$$inline_81_psub$$inline_72_zf$$inline_66$$] |= 16), $flags$$inline_317_newval$$inline_76$$ > $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ && + (this.$F$[$h$$inline_81_psub$$inline_72_zf$$inline_66$$] |= 1), 0 !== (($JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ ^ $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$) & ($JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ ^ $flags$$inline_317_newval$$inline_76$$) & 128) && (this.$F$[$h$$inline_81_psub$$inline_72_zf$$inline_66$$] |= 4), $h$$inline_81_psub$$inline_72_zf$$inline_66$$++, $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ = $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ - + $flags$$inline_317_newval$$inline_76$$ - 1, this.$F$[$n$$inline_82_psbc$$inline_73_yf$$inline_67$$] = 0 !== $flags$$inline_317_newval$$inline_76$$ ? 0 !== ($flags$$inline_317_newval$$inline_76$$ & 128) ? 130 : 2 : 66, this.$F$[$n$$inline_82_psbc$$inline_73_yf$$inline_67$$] |= $flags$$inline_317_newval$$inline_76$$ & 40, ($flags$$inline_317_newval$$inline_76$$ & 15) >= ($JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ & 15) && (this.$F$[$n$$inline_82_psbc$$inline_73_yf$$inline_67$$] |= + 16), $flags$$inline_317_newval$$inline_76$$ >= $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ && (this.$F$[$n$$inline_82_psbc$$inline_73_yf$$inline_67$$] |= 1), 0 !== (($JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ ^ $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$) & ($JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ ^ $flags$$inline_317_newval$$inline_76$$) & 128) && (this.$F$[$n$$inline_82_psbc$$inline_73_yf$$inline_67$$] |= 4), $n$$inline_82_psbc$$inline_73_yf$$inline_67$$++ + ; } } - for($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ = 256;$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$--;) { - for($c$$inline_79_padc$$inline_70_sf$$inline_64$$ = 0;1 >= $c$$inline_79_padc$$inline_70_sf$$inline_64$$;$c$$inline_79_padc$$inline_70_sf$$inline_64$$++) { - for($h$$inline_80_psub$$inline_71_zf$$inline_65$$ = 0;1 >= $h$$inline_80_psub$$inline_71_zf$$inline_65$$;$h$$inline_80_psub$$inline_71_zf$$inline_65$$++) { - for($n$$inline_81_psbc$$inline_72_yf$$inline_66$$ = 0;1 >= $n$$inline_81_psbc$$inline_72_yf$$inline_66$$;$n$$inline_81_psbc$$inline_72_yf$$inline_66$$++) { - $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$ = this.$ea$; - $JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$ = $c$$inline_79_padc$$inline_70_sf$$inline_64$$ << 8 | $n$$inline_81_psbc$$inline_72_yf$$inline_66$$ << 9 | $h$$inline_80_psub$$inline_71_zf$$inline_65$$ << 10 | $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$; - $flags$$inline_266_newval$$inline_75$$ = $c$$inline_79_padc$$inline_70_sf$$inline_64$$ | $n$$inline_81_psbc$$inline_72_yf$$inline_66$$ << 1 | $h$$inline_80_psub$$inline_71_zf$$inline_65$$ << 4; - this.$a$ = $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$; - this.$c$ = $flags$$inline_266_newval$$inline_75$$; - var $a_copy$$inline_267$$ = this.$a$, $correction$$inline_268$$ = 0, $carry$$inline_269$$ = $flags$$inline_266_newval$$inline_75$$ & 1, $carry_copy$$inline_270$$ = $carry$$inline_269$$; - if(0 != ($flags$$inline_266_newval$$inline_75$$ & 16) || 9 < ($a_copy$$inline_267$$ & 15)) { - $correction$$inline_268$$ |= 6 + for ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ = 256;$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$--;) { + for ($c$$inline_80_padc$$inline_71_sf$$inline_65$$ = 0;1 >= $c$$inline_80_padc$$inline_71_sf$$inline_65$$;$c$$inline_80_padc$$inline_71_sf$$inline_65$$++) { + for ($h$$inline_81_psub$$inline_72_zf$$inline_66$$ = 0;1 >= $h$$inline_81_psub$$inline_72_zf$$inline_66$$;$h$$inline_81_psub$$inline_72_zf$$inline_66$$++) { + for ($n$$inline_82_psbc$$inline_73_yf$$inline_67$$ = 0;1 >= $n$$inline_82_psbc$$inline_73_yf$$inline_67$$;$n$$inline_82_psbc$$inline_73_yf$$inline_67$$++) { + $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$ = this.$ga$; + $JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$ = $c$$inline_80_padc$$inline_71_sf$$inline_65$$ << 8 | $n$$inline_82_psbc$$inline_73_yf$$inline_67$$ << 9 | $h$$inline_81_psub$$inline_72_zf$$inline_66$$ << 10 | $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$; + $flags$$inline_317_newval$$inline_76$$ = $c$$inline_80_padc$$inline_71_sf$$inline_65$$ | $n$$inline_82_psbc$$inline_73_yf$$inline_67$$ << 1 | $h$$inline_81_psub$$inline_72_zf$$inline_66$$ << 4; + this.$a$ = $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$; + this.$g$ = $flags$$inline_317_newval$$inline_76$$; + var $a_copy$$inline_318$$ = this.$a$, $correction$$inline_319$$ = 0, $carry$$inline_320$$ = $flags$$inline_317_newval$$inline_76$$ & 1, $carry_copy$$inline_321$$ = $carry$$inline_320$$; + if (0 !== ($flags$$inline_317_newval$$inline_76$$ & 16) || 9 < ($a_copy$$inline_318$$ & 15)) { + $correction$$inline_319$$ |= 6; } - if(1 == $carry$$inline_269$$ || 159 < $a_copy$$inline_267$$ || 143 < $a_copy$$inline_267$$ && 9 < ($a_copy$$inline_267$$ & 15)) { - $correction$$inline_268$$ |= 96, $carry_copy$$inline_270$$ = 1 + if (1 == $carry$$inline_320$$ || 159 < $a_copy$$inline_318$$ || 143 < $a_copy$$inline_318$$ && 9 < ($a_copy$$inline_318$$ & 15)) { + $correction$$inline_319$$ |= 96, $carry_copy$$inline_321$$ = 1; } - 153 < $a_copy$$inline_267$$ && ($carry_copy$$inline_270$$ = 1); - 0 != ($flags$$inline_266_newval$$inline_75$$ & 2) ? $JSCompiler_StaticMethods_sub_a$$(this, $correction$$inline_268$$) : $JSCompiler_StaticMethods_add_a$$(this, $correction$$inline_268$$); - $flags$$inline_266_newval$$inline_75$$ = this.$c$ & 254 | $carry_copy$$inline_270$$; - $flags$$inline_266_newval$$inline_75$$ = $JSCompiler_StaticMethods_getParity$$(this.$a$) ? $flags$$inline_266_newval$$inline_75$$ & 251 | 4 : $flags$$inline_266_newval$$inline_75$$ & 251; - $JSCompiler_temp_const$$262_val$$inline_73_xf$$inline_67$$[$JSCompiler_temp_const$$261_oldval$$inline_74_pf$$inline_68$$] = this.$a$ | $flags$$inline_266_newval$$inline_75$$ << 8 + 153 < $a_copy$$inline_318$$ && ($carry_copy$$inline_321$$ = 1); + 0 !== ($flags$$inline_317_newval$$inline_76$$ & 2) ? $JSCompiler_StaticMethods_sub_a$$(this, $correction$$inline_319$$) : $JSCompiler_StaticMethods_add_a$$(this, $correction$$inline_319$$); + $flags$$inline_317_newval$$inline_76$$ = this.$g$ & 254 | $carry_copy$$inline_321$$; + $flags$$inline_317_newval$$inline_76$$ = $JSCompiler_StaticMethods_getParity$$(this.$a$) ? $flags$$inline_317_newval$$inline_76$$ & 251 | 4 : $flags$$inline_317_newval$$inline_76$$ & 251; + $JSCompiler_temp_const$$313_val$$inline_74_xf$$inline_68$$[$JSCompiler_temp_const$$312_oldval$$inline_75_pf$$inline_69$$] = this.$a$ | $flags$$inline_317_newval$$inline_76$$ << 8; } } } } - this.$a$ = this.$c$ = 0; - if($SUPPORT_DATAVIEW$$) { - for($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ = 0;8192 > $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$;$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$++) { - this.$memWriteMap$.setUint8($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$, 0) + this.$a$ = this.$g$ = 0; + if ($SUPPORT_DATAVIEW$$) { + for ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ = 0;8192 > $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$;$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$++) { + this.$memWriteMap$.setUint8($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$, 0); } - }else { - for($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ = 0;8192 > $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$;$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$++) { - this.$memWriteMap$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] = 0 + } else { + for ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ = 0;8192 > $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$;$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$++) { + this.$memWriteMap$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = 0; } } - if($SUPPORT_DATAVIEW$$) { - for($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ = 0;32768 > $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$;$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$++) { - this.$sram$.setUint8($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$, 0) + if ($SUPPORT_DATAVIEW$$) { + for ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ = 0;32768 > $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$;$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$++) { + this.$sram$.setUint8($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$, 0); } - }else { - for($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ = 0;32768 > $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$;$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$++) { - this.$sram$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] = 0 + } else { + for ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ = 0;32768 > $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$;$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$++) { + this.$sram$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = 0; } } - this.$S$ = 2; - for($i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ = 0;4 > $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$;$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$++) { - this.$frameReg$[$i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$] = $i$$inline_63_i$$inline_78_i$$inline_84_padd$$inline_69_sms$$ % 3 + this.$N$ = 2; + for ($i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ = 0;4 > $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$;$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$++) { + this.$frameReg$[$i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$] = $i$$inline_64_i$$inline_79_i$$inline_85_padd$$inline_70_sms$$ % 3; } - for(var $method$$3$$ in $JSSMS$Debugger$$.prototype) { - this[$method$$3$$] = $JSSMS$Debugger$$.prototype[$method$$3$$] + for (var $method$$3$$ in $JSSMS$Debugger$$.prototype) { + this[$method$$3$$] = $JSSMS$Debugger$$.prototype[$method$$3$$]; } + $ENABLE_COMPILER$$ && (this.$R$ = new $Recompiler$$(this)); } $JSSMS$Z80$$.prototype = {reset:function $$JSSMS$Z80$$$$reset$() { - this.$b$ = this.$ba$ = this.$c$ = this.$U$ = this.$s$ = this.$v$ = this.$q$ = this.$t$ = this.$j$ = this.$l$ = this.$ca$ = this.$da$ = this.$d$ = this.$e$ = this.$Z$ = this.$aa$ = this.$h$ = this.$g$ = this.$X$ = this.$Y$ = this.$a$ = this.$W$ = 0; + this.$f$ = this.$da$ = this.$g$ = this.$W$ = this.$r$ = this.$s$ = this.$v$ = this.$q$ = this.$t$ = this.$h$ = this.$l$ = this.$ea$ = this.$fa$ = this.$d$ = this.$e$ = this.$ba$ = this.$ca$ = this.$b$ = this.$c$ = this.$Z$ = this.$aa$ = this.$a$ = this.$Y$ = 0; this.$n$ = 57328; - this.$Q$ = this.$o$ = 0; - this.$P$ = this.$K$ = this.$J$ = !1; - this.$R$ = 0; - this.$O$ = !1 -}, call:function $$JSSMS$Z80$$$$call$($condition$$3$$) { - $condition$$3$$ ? (this.push(this.$b$ + 2), this.$b$ = this.$p$(this.$b$), this.$o$ -= 7) : this.$b$ += 2 + this.$T$ = this.$o$ = 0; + this.$S$ = this.$M$ = this.$K$ = !1; + this.$U$ = 0; + this.$Q$ = !1; + $ENABLE_COMPILER$$ && this.$R$.reset(); +}, $branches$:[Object.create(null), Object.create(null), Object.create(null)], call:function $$JSSMS$Z80$$$$call$($condition$$3$$) { + $condition$$3$$ ? (this.push(this.$f$ + 2), this.$f$ = this.$p$(this.$f$), this.$o$ -= 7) : this.$f$ += 2; }, push:function $$JSSMS$Z80$$$$push$($value$$47$$) { this.$n$ -= 2; - this.$G$(this.$n$, $value$$47$$) -}, $i$:$SUPPORT_DATAVIEW$$ ? function($address$$, $value$$74$$) { - if(65535 >= $address$$) { - this.$memWriteMap$.setUint8($address$$ & 8191, $value$$74$$), 65532 == $address$$ ? this.$frameReg$[3] = $value$$74$$ : 65533 == $address$$ ? this.$frameReg$[0] = $value$$74$$ & this.$romPageMask$ : 65534 == $address$$ ? this.$frameReg$[1] = $value$$74$$ & this.$romPageMask$ : 65535 == $address$$ && (this.$frameReg$[2] = $value$$74$$ & this.$romPageMask$) - }else { - $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$)); - debugger - } -} : function($address$$1$$, $value$$75$$) { - if(65535 >= $address$$1$$) { - this.$memWriteMap$[$address$$1$$ & 8191] = $value$$75$$, 65532 == $address$$1$$ ? this.$frameReg$[3] = $value$$75$$ : 65533 == $address$$1$$ ? this.$frameReg$[0] = $value$$75$$ & this.$romPageMask$ : 65534 == $address$$1$$ ? this.$frameReg$[1] = $value$$75$$ & this.$romPageMask$ : 65535 == $address$$1$$ && (this.$frameReg$[2] = $value$$75$$ & this.$romPageMask$) - }else { - $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$1$$)); - debugger - } -}, $G$:$SUPPORT_DATAVIEW$$ ? function($address$$2$$, $value$$76$$) { - if(65532 > $address$$2$$) { - this.$memWriteMap$.setUint16($address$$2$$ & 8191, $value$$76$$, !0) - }else { - if(65532 == $address$$2$$) { - this.$frameReg$[3] = $value$$76$$ & 255, this.$frameReg$[0] = $value$$76$$ >> 8 & this.$romPageMask$ - }else { - if(65533 == $address$$2$$) { - this.$frameReg$[0] = $value$$76$$ & 255 & this.$romPageMask$, this.$frameReg$[1] = $value$$76$$ >> 8 & this.$romPageMask$ - }else { - if(65534 == $address$$2$$) { - this.$frameReg$[1] = $value$$76$$ & 255 & this.$romPageMask$, this.$frameReg$[2] = $value$$76$$ >> 8 & this.$romPageMask$ - }else { - $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$2$$)); - debugger - } - } - } - } -} : function($address$$3$$, $value$$77$$) { - if(65532 > $address$$3$$) { - $address$$3$$ &= 8191, this.$memWriteMap$[$address$$3$$++] = $value$$77$$ & 255, this.$memWriteMap$[$address$$3$$] = $value$$77$$ >> 8 - }else { - if(65532 == $address$$3$$) { - this.$frameReg$[3] = $value$$77$$ & 255, this.$frameReg$[0] = $value$$77$$ >> 8 & this.$romPageMask$ - }else { - if(65533 == $address$$3$$) { - this.$frameReg$[0] = $value$$77$$ & 255 & this.$romPageMask$, this.$frameReg$[1] = $value$$77$$ >> 8 & this.$romPageMask$ - }else { - if(65534 == $address$$3$$) { - this.$frameReg$[1] = $value$$77$$ & 255 & this.$romPageMask$, this.$frameReg$[2] = $value$$77$$ >> 8 & this.$romPageMask$ - }else { - $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$3$$)); - debugger - } - } - } + this.$I$(this.$n$, $value$$47$$); +}, $j$:$SUPPORT_DATAVIEW$$ ? function writeMem($address$$, $value$$74$$) { + 65535 >= $address$$ ? (this.$memWriteMap$.setUint8($address$$ & 8191, $value$$74$$), 65532 === $address$$ ? this.$frameReg$[3] = $value$$74$$ : 65533 === $address$$ ? this.$frameReg$[0] = $value$$74$$ & this.$romPageMask$ : 65534 === $address$$ ? this.$frameReg$[1] = $value$$74$$ & this.$romPageMask$ : 65535 === $address$$ && (this.$frameReg$[2] = $value$$74$$ & this.$romPageMask$)) : $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$)); +} : function writeMem$$1($address$$1$$, $value$$75$$) { + 65535 >= $address$$1$$ ? (this.$memWriteMap$[$address$$1$$ & 8191] = $value$$75$$, 65532 === $address$$1$$ ? this.$frameReg$[3] = $value$$75$$ : 65533 === $address$$1$$ ? this.$frameReg$[0] = $value$$75$$ & this.$romPageMask$ : 65534 === $address$$1$$ ? this.$frameReg$[1] = $value$$75$$ & this.$romPageMask$ : 65535 === $address$$1$$ && (this.$frameReg$[2] = $value$$75$$ & this.$romPageMask$)) : $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$1$$)); +}, $I$:$SUPPORT_DATAVIEW$$ ? function writeMemWord($address$$2$$, $value$$76$$) { + 65532 > $address$$2$$ ? this.$memWriteMap$.setUint16($address$$2$$ & 8191, $value$$76$$, !0) : 65532 === $address$$2$$ ? (this.$frameReg$[3] = $value$$76$$ & 255, this.$frameReg$[0] = $value$$76$$ >> 8 & this.$romPageMask$) : 65533 === $address$$2$$ ? (this.$frameReg$[0] = $value$$76$$ & 255 & this.$romPageMask$, this.$frameReg$[1] = $value$$76$$ >> 8 & this.$romPageMask$) : 65534 === $address$$2$$ ? (this.$frameReg$[1] = $value$$76$$ & 255 & this.$romPageMask$, this.$frameReg$[2] = $value$$76$$ >> + 8 & this.$romPageMask$) : $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$2$$)); +} : function writeMemWord$$1($address$$3$$, $value$$77$$) { + 65532 > $address$$3$$ ? ($address$$3$$ &= 8191, this.$memWriteMap$[$address$$3$$++] = $value$$77$$ & 255, this.$memWriteMap$[$address$$3$$] = $value$$77$$ >> 8) : 65532 === $address$$3$$ ? (this.$frameReg$[3] = $value$$77$$ & 255, this.$frameReg$[0] = $value$$77$$ >> 8 & this.$romPageMask$) : 65533 === $address$$3$$ ? (this.$frameReg$[0] = $value$$77$$ & 255 & this.$romPageMask$, this.$frameReg$[1] = $value$$77$$ >> 8 & this.$romPageMask$) : 65534 === $address$$3$$ ? (this.$frameReg$[1] = $value$$77$$ & + 255 & this.$romPageMask$, this.$frameReg$[2] = $value$$77$$ >> 8 & this.$romPageMask$) : $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$3$$)); +}, $i$:$SUPPORT_DATAVIEW$$ ? function readMem($address$$4$$) { + if (1024 > $address$$4$$) { + return this.$rom$[0].getUint8($address$$4$$); } -}, $f$:$SUPPORT_DATAVIEW$$ ? function($address$$4$$) { - if(1024 > $address$$4$$) { - return this.$rom$[0].getUint8($address$$4$$) + if (16384 > $address$$4$$) { + return this.$rom$[this.$frameReg$[0]].getUint8($address$$4$$); } - if(16384 > $address$$4$$) { - return this.$rom$[this.$frameReg$[0]].getUint8($address$$4$$) + if (32768 > $address$$4$$) { + return this.$rom$[this.$frameReg$[1]].getUint8($address$$4$$ - 16384); } - if(32768 > $address$$4$$) { - return this.$rom$[this.$frameReg$[1]].getUint8($address$$4$$ - 16384) + if (49152 > $address$$4$$) { + return 8 == (this.$frameReg$[3] & 12) ? this.$sram$.getUint8($address$$4$$ - 32768) : 12 == (this.$frameReg$[3] & 12) ? this.$sram$.getUint8($address$$4$$ - 16384) : this.$rom$[this.$frameReg$[2]].getUint8($address$$4$$ - 32768); } - if(49152 > $address$$4$$) { - return 8 == (this.$frameReg$[3] & 12) ? this.$sram$.getUint8($address$$4$$ - 32768) : 12 == (this.$frameReg$[3] & 12) ? this.$sram$.getUint8($address$$4$$ - 16384) : this.$rom$[this.$frameReg$[2]].getUint8($address$$4$$ - 32768) + if (57344 > $address$$4$$) { + return this.$memWriteMap$.getUint8($address$$4$$ - 49152); } - if(57344 > $address$$4$$) { - return this.$memWriteMap$.getUint8($address$$4$$ - 49152) + if (65532 > $address$$4$$) { + return this.$memWriteMap$.getUint8($address$$4$$ - 57344); } - if(65532 > $address$$4$$) { - return this.$memWriteMap$.getUint8($address$$4$$ - 57344) + if (65532 === $address$$4$$) { + return this.$frameReg$[3]; } - if(65532 == $address$$4$$) { - return this.$frameReg$[3] + if (65533 === $address$$4$$) { + return this.$frameReg$[0]; } - if(65533 == $address$$4$$) { - return this.$frameReg$[0] + if (65534 === $address$$4$$) { + return this.$frameReg$[1]; } - if(65534 == $address$$4$$) { - return this.$frameReg$[1] - } - if(65535 == $address$$4$$) { - return this.$frameReg$[2] + if (65535 === $address$$4$$) { + return this.$frameReg$[2]; } $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$4$$)); - debugger; - return 0 -} : function($address$$5$$) { - if(1024 > $address$$5$$) { - return this.$rom$[0][$address$$5$$] + return 0; +} : function readMem$$1($address$$5$$) { + if (1024 > $address$$5$$) { + return this.$rom$[0][$address$$5$$]; } - if(16384 > $address$$5$$) { - return this.$rom$[this.$frameReg$[0]][$address$$5$$] + if (16384 > $address$$5$$) { + return this.$rom$[this.$frameReg$[0]][$address$$5$$]; } - if(32768 > $address$$5$$) { - return this.$rom$[this.$frameReg$[1]][$address$$5$$ - 16384] + if (32768 > $address$$5$$) { + return this.$rom$[this.$frameReg$[1]][$address$$5$$ - 16384]; } - if(49152 > $address$$5$$) { - return 8 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$5$$ - 32768] : 12 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$5$$ - 16384] : this.$rom$[this.$frameReg$[2]][$address$$5$$ - 32768] + if (49152 > $address$$5$$) { + return 8 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$5$$ - 32768] : 12 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$5$$ - 16384] : this.$rom$[this.$frameReg$[2]][$address$$5$$ - 32768]; } - if(57344 > $address$$5$$) { - return this.$memWriteMap$[$address$$5$$ - 49152] + if (57344 > $address$$5$$) { + return this.$memWriteMap$[$address$$5$$ - 49152]; } - if(65532 > $address$$5$$) { - return this.$memWriteMap$[$address$$5$$ - 57344] + if (65532 > $address$$5$$) { + return this.$memWriteMap$[$address$$5$$ - 57344]; } - if(65532 == $address$$5$$) { - return this.$frameReg$[3] + if (65532 === $address$$5$$) { + return this.$frameReg$[3]; } - if(65533 == $address$$5$$) { - return this.$frameReg$[0] + if (65533 === $address$$5$$) { + return this.$frameReg$[0]; } - if(65534 == $address$$5$$) { - return this.$frameReg$[1] + if (65534 === $address$$5$$) { + return this.$frameReg$[1]; } - if(65535 == $address$$5$$) { - return this.$frameReg$[2] + if (65535 === $address$$5$$) { + return this.$frameReg$[2]; } $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$5$$)); - debugger; - return 0 -}, $p$:$SUPPORT_DATAVIEW$$ ? function($address$$6$$) { - if(1024 > $address$$6$$) { - return this.$rom$[0].getUint16($address$$6$$, !0) + return 0; +}, $p$:$SUPPORT_DATAVIEW$$ ? function readMemWord($address$$6$$) { + if (1024 > $address$$6$$) { + return this.$rom$[0].getUint16($address$$6$$, !0); } - if(16384 > $address$$6$$) { - return this.$rom$[this.$frameReg$[0]].getUint16($address$$6$$, !0) + if (16384 > $address$$6$$) { + return this.$rom$[this.$frameReg$[0]].getUint16($address$$6$$, !0); } - if(32768 > $address$$6$$) { - return this.$rom$[this.$frameReg$[1]].getUint16($address$$6$$ - 16384, !0) + if (32768 > $address$$6$$) { + return this.$rom$[this.$frameReg$[1]].getUint16($address$$6$$ - 16384, !0); } - if(49152 > $address$$6$$) { - return 8 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$6$$ - 32768] : 12 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$6$$ - 16384] : this.$rom$[this.$frameReg$[2]].getUint16($address$$6$$ - 32768, !0) + if (49152 > $address$$6$$) { + return 8 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$6$$ - 32768] : 12 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$6$$ - 16384] : this.$rom$[this.$frameReg$[2]].getUint16($address$$6$$ - 32768, !0); } - if(57344 > $address$$6$$) { - return this.$memWriteMap$.getUint16($address$$6$$ - 49152, !0) + if (57344 > $address$$6$$) { + return this.$memWriteMap$.getUint16($address$$6$$ - 49152, !0); } - if(65532 > $address$$6$$) { - return this.$memWriteMap$.getUint16($address$$6$$ - 57344, !0) + if (65532 > $address$$6$$) { + return this.$memWriteMap$.getUint16($address$$6$$ - 57344, !0); } - if(65532 == $address$$6$$) { - return this.$frameReg$[3] + if (65532 === $address$$6$$) { + return this.$frameReg$[3]; } - if(65533 == $address$$6$$) { - return this.$frameReg$[0] + if (65533 === $address$$6$$) { + return this.$frameReg$[0]; } - if(65534 == $address$$6$$) { - return this.$frameReg$[1] + if (65534 === $address$$6$$) { + return this.$frameReg$[1]; } - if(65535 == $address$$6$$) { - return this.$frameReg$[2] + if (65535 === $address$$6$$) { + return this.$frameReg$[2]; } $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$6$$)); - debugger; - return 0 -} : function($address$$7$$) { - if(1024 > $address$$7$$) { - return this.$rom$[0][$address$$7$$++] | this.$rom$[0][$address$$7$$] << 8 + return 0; +} : function readMemWord$$1($address$$7$$) { + if (1024 > $address$$7$$) { + return this.$rom$[0][$address$$7$$++] | this.$rom$[0][$address$$7$$] << 8; } - if(16384 > $address$$7$$) { - return this.$rom$[this.$frameReg$[0]][$address$$7$$++] | this.$rom$[this.$frameReg$[0]][$address$$7$$] << 8 + if (16384 > $address$$7$$) { + return this.$rom$[this.$frameReg$[0]][$address$$7$$++] | this.$rom$[this.$frameReg$[0]][$address$$7$$] << 8; } - if(32768 > $address$$7$$) { - return this.$rom$[this.$frameReg$[1]][$address$$7$$++ - 16384] | this.$rom$[this.$frameReg$[1]][$address$$7$$ - 16384] << 8 + if (32768 > $address$$7$$) { + return this.$rom$[this.$frameReg$[1]][$address$$7$$++ - 16384] | this.$rom$[this.$frameReg$[1]][$address$$7$$ - 16384] << 8; } - if(49152 > $address$$7$$) { - return 8 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$7$$++ - 32768] | this.$sram$[$address$$7$$ - 32768] << 8 : 12 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$7$$++ - 16384] | this.$sram$[$address$$7$$ - 16384] << 8 : this.$rom$[this.$frameReg$[2]][$address$$7$$++ - 32768] | this.$rom$[this.$frameReg$[2]][$address$$7$$ - 32768] << 8 + if (49152 > $address$$7$$) { + return 8 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$7$$++ - 32768] | this.$sram$[$address$$7$$ - 32768] << 8 : 12 == (this.$frameReg$[3] & 12) ? this.$sram$[$address$$7$$++ - 16384] | this.$sram$[$address$$7$$ - 16384] << 8 : this.$rom$[this.$frameReg$[2]][$address$$7$$++ - 32768] | this.$rom$[this.$frameReg$[2]][$address$$7$$ - 32768] << 8; } - if(57344 > $address$$7$$) { - return this.$memWriteMap$[$address$$7$$++ - 49152] | this.$memWriteMap$[$address$$7$$ - 49152] << 8 + if (57344 > $address$$7$$) { + return this.$memWriteMap$[$address$$7$$++ - 49152] | this.$memWriteMap$[$address$$7$$ - 49152] << 8; } - if(65532 > $address$$7$$) { - return this.$memWriteMap$[$address$$7$$++ - 57344] | this.$memWriteMap$[$address$$7$$ - 57344] << 8 + if (65532 > $address$$7$$) { + return this.$memWriteMap$[$address$$7$$++ - 57344] | this.$memWriteMap$[$address$$7$$ - 57344] << 8; } - if(65532 == $address$$7$$) { - return this.$frameReg$[3] + if (65532 === $address$$7$$) { + return this.$frameReg$[3]; } - if(65533 == $address$$7$$) { - return this.$frameReg$[0] + if (65533 === $address$$7$$) { + return this.$frameReg$[0]; } - if(65534 == $address$$7$$) { - return this.$frameReg$[1] + if (65534 === $address$$7$$) { + return this.$frameReg$[1]; } - if(65535 == $address$$7$$) { - return this.$frameReg$[2] + if (65535 === $address$$7$$) { + return this.$frameReg$[2]; } $JSSMS$Utils$console$error$$($JSSMS$Utils$toHex$$($address$$7$$)); - debugger; - return 0 + return 0; }}; function $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_d_$self$$) { - return $JSCompiler_StaticMethods_d_$self$$.$f$($JSCompiler_StaticMethods_d_$self$$.$b$) + return $JSCompiler_StaticMethods_d_$self$$.$i$($JSCompiler_StaticMethods_d_$self$$.$f$); } function $JSCompiler_StaticMethods_getParity$$($value$$73$$) { var $parity$$ = !0, $j$$1$$; - for($j$$1$$ = 0;8 > $j$$1$$;$j$$1$$++) { - 0 != ($value$$73$$ & 1 << $j$$1$$) && ($parity$$ = !$parity$$) + for ($j$$1$$ = 0;8 > $j$$1$$;$j$$1$$++) { + 0 !== ($value$$73$$ & 1 << $j$$1$$) && ($parity$$ = !$parity$$); } - return $parity$$ + return $parity$$; } function $JSCompiler_StaticMethods_sbc16$$($JSCompiler_StaticMethods_sbc16$self$$, $value$$72$$) { - var $hl$$1$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_sbc16$self$$), $result$$3$$ = $hl$$1$$ - $value$$72$$ - ($JSCompiler_StaticMethods_sbc16$self$$.$c$ & 1); - $JSCompiler_StaticMethods_sbc16$self$$.$c$ = ($hl$$1$$ ^ $result$$3$$ ^ $value$$72$$) >> 8 & 16 | 2 | $result$$3$$ >> 16 & 1 | $result$$3$$ >> 8 & 128 | (0 != ($result$$3$$ & 65535) ? 0 : 64) | (($value$$72$$ ^ $hl$$1$$) & ($hl$$1$$ ^ $result$$3$$) & 32768) >> 13; - $JSCompiler_StaticMethods_sbc16$self$$.$j$ = $result$$3$$ >> 8 & 255; - $JSCompiler_StaticMethods_sbc16$self$$.$l$ = $result$$3$$ & 255 + var $hl$$1$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_sbc16$self$$), $result$$3$$ = $hl$$1$$ - $value$$72$$ - ($JSCompiler_StaticMethods_sbc16$self$$.$g$ & 1); + $JSCompiler_StaticMethods_sbc16$self$$.$g$ = ($hl$$1$$ ^ $result$$3$$ ^ $value$$72$$) >> 8 & 16 | 2 | $result$$3$$ >> 16 & 1 | $result$$3$$ >> 8 & 128 | (0 !== ($result$$3$$ & 65535) ? 0 : 64) | (($value$$72$$ ^ $hl$$1$$) & ($hl$$1$$ ^ $result$$3$$) & 32768) >> 13; + $JSCompiler_StaticMethods_sbc16$self$$.$h$ = $result$$3$$ >> 8 & 255; + $JSCompiler_StaticMethods_sbc16$self$$.$l$ = $result$$3$$ & 255; } function $JSCompiler_StaticMethods_adc16$$($JSCompiler_StaticMethods_adc16$self$$, $value$$71$$) { - var $hl$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_adc16$self$$), $result$$2$$ = $hl$$ + $value$$71$$ + ($JSCompiler_StaticMethods_adc16$self$$.$c$ & 1); - $JSCompiler_StaticMethods_adc16$self$$.$c$ = ($hl$$ ^ $result$$2$$ ^ $value$$71$$) >> 8 & 16 | $result$$2$$ >> 16 & 1 | $result$$2$$ >> 8 & 128 | (0 != ($result$$2$$ & 65535) ? 0 : 64) | (($value$$71$$ ^ $hl$$ ^ 32768) & ($value$$71$$ ^ $result$$2$$) & 32768) >> 13; - $JSCompiler_StaticMethods_adc16$self$$.$j$ = $result$$2$$ >> 8 & 255; - $JSCompiler_StaticMethods_adc16$self$$.$l$ = $result$$2$$ & 255 + var $hl$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_adc16$self$$), $result$$2$$ = $hl$$ + $value$$71$$ + ($JSCompiler_StaticMethods_adc16$self$$.$g$ & 1); + $JSCompiler_StaticMethods_adc16$self$$.$g$ = ($hl$$ ^ $result$$2$$ ^ $value$$71$$) >> 8 & 16 | $result$$2$$ >> 16 & 1 | $result$$2$$ >> 8 & 128 | (0 !== ($result$$2$$ & 65535) ? 0 : 64) | (($value$$71$$ ^ $hl$$ ^ 32768) & ($value$$71$$ ^ $result$$2$$) & 32768) >> 13; + $JSCompiler_StaticMethods_adc16$self$$.$h$ = $result$$2$$ >> 8 & 255; + $JSCompiler_StaticMethods_adc16$self$$.$l$ = $result$$2$$ & 255; } function $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_add16$self$$, $reg$$, $value$$70$$) { var $result$$1$$ = $reg$$ + $value$$70$$; - $JSCompiler_StaticMethods_add16$self$$.$c$ = $JSCompiler_StaticMethods_add16$self$$.$c$ & 196 | ($reg$$ ^ $result$$1$$ ^ $value$$70$$) >> 8 & 16 | $result$$1$$ >> 16 & 1; - return $result$$1$$ & 65535 + $JSCompiler_StaticMethods_add16$self$$.$g$ = $JSCompiler_StaticMethods_add16$self$$.$g$ & 196 | ($reg$$ ^ $result$$1$$ ^ $value$$70$$) >> 8 & 16 | $result$$1$$ >> 16 & 1; + return $result$$1$$ & 65535; } function $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_dec8$self$$, $value$$69$$) { $value$$69$$ = $value$$69$$ - 1 & 255; - $JSCompiler_StaticMethods_dec8$self$$.$c$ = $JSCompiler_StaticMethods_dec8$self$$.$c$ & 1 | $JSCompiler_StaticMethods_dec8$self$$.$M$[$value$$69$$]; - return $value$$69$$ + $JSCompiler_StaticMethods_dec8$self$$.$g$ = $JSCompiler_StaticMethods_dec8$self$$.$g$ & 1 | $JSCompiler_StaticMethods_dec8$self$$.$O$[$value$$69$$]; + return $value$$69$$; } function $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_inc8$self$$, $value$$68$$) { $value$$68$$ = $value$$68$$ + 1 & 255; - $JSCompiler_StaticMethods_inc8$self$$.$c$ = $JSCompiler_StaticMethods_inc8$self$$.$c$ & 1 | $JSCompiler_StaticMethods_inc8$self$$.$N$[$value$$68$$]; - return $value$$68$$ + $JSCompiler_StaticMethods_inc8$self$$.$g$ = $JSCompiler_StaticMethods_inc8$self$$.$g$ & 1 | $JSCompiler_StaticMethods_inc8$self$$.$P$[$value$$68$$]; + return $value$$68$$; } function $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_decHL$self$$) { $JSCompiler_StaticMethods_decHL$self$$.$l$ = $JSCompiler_StaticMethods_decHL$self$$.$l$ - 1 & 255; - 255 == $JSCompiler_StaticMethods_decHL$self$$.$l$ && ($JSCompiler_StaticMethods_decHL$self$$.$j$ = $JSCompiler_StaticMethods_decHL$self$$.$j$ - 1 & 255) + 255 == $JSCompiler_StaticMethods_decHL$self$$.$l$ && ($JSCompiler_StaticMethods_decHL$self$$.$h$ = $JSCompiler_StaticMethods_decHL$self$$.$h$ - 1 & 255); } function $JSCompiler_StaticMethods_decDE$$($JSCompiler_StaticMethods_decDE$self$$) { $JSCompiler_StaticMethods_decDE$self$$.$e$ = $JSCompiler_StaticMethods_decDE$self$$.$e$ - 1 & 255; - 255 == $JSCompiler_StaticMethods_decDE$self$$.$e$ && ($JSCompiler_StaticMethods_decDE$self$$.$d$ = $JSCompiler_StaticMethods_decDE$self$$.$d$ - 1 & 255) + 255 == $JSCompiler_StaticMethods_decDE$self$$.$e$ && ($JSCompiler_StaticMethods_decDE$self$$.$d$ = $JSCompiler_StaticMethods_decDE$self$$.$d$ - 1 & 255); } function $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_decBC$self$$) { - $JSCompiler_StaticMethods_decBC$self$$.$g$ = $JSCompiler_StaticMethods_decBC$self$$.$g$ - 1 & 255; - 255 == $JSCompiler_StaticMethods_decBC$self$$.$g$ && ($JSCompiler_StaticMethods_decBC$self$$.$h$ = $JSCompiler_StaticMethods_decBC$self$$.$h$ - 1 & 255) + $JSCompiler_StaticMethods_decBC$self$$.$c$ = $JSCompiler_StaticMethods_decBC$self$$.$c$ - 1 & 255; + 255 == $JSCompiler_StaticMethods_decBC$self$$.$c$ && ($JSCompiler_StaticMethods_decBC$self$$.$b$ = $JSCompiler_StaticMethods_decBC$self$$.$b$ - 1 & 255); } function $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_incHL$self$$) { $JSCompiler_StaticMethods_incHL$self$$.$l$ = $JSCompiler_StaticMethods_incHL$self$$.$l$ + 1 & 255; - 0 == $JSCompiler_StaticMethods_incHL$self$$.$l$ && ($JSCompiler_StaticMethods_incHL$self$$.$j$ = $JSCompiler_StaticMethods_incHL$self$$.$j$ + 1 & 255) + 0 === $JSCompiler_StaticMethods_incHL$self$$.$l$ && ($JSCompiler_StaticMethods_incHL$self$$.$h$ = $JSCompiler_StaticMethods_incHL$self$$.$h$ + 1 & 255); } function $JSCompiler_StaticMethods_incDE$$($JSCompiler_StaticMethods_incDE$self$$) { $JSCompiler_StaticMethods_incDE$self$$.$e$ = $JSCompiler_StaticMethods_incDE$self$$.$e$ + 1 & 255; - 0 == $JSCompiler_StaticMethods_incDE$self$$.$e$ && ($JSCompiler_StaticMethods_incDE$self$$.$d$ = $JSCompiler_StaticMethods_incDE$self$$.$d$ + 1 & 255) + 0 === $JSCompiler_StaticMethods_incDE$self$$.$e$ && ($JSCompiler_StaticMethods_incDE$self$$.$d$ = $JSCompiler_StaticMethods_incDE$self$$.$d$ + 1 & 255); } function $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_setIYHIYL$self$$, $value$$67$$) { $JSCompiler_StaticMethods_setIYHIYL$self$$.$v$ = $value$$67$$ >> 8; - $JSCompiler_StaticMethods_setIYHIYL$self$$.$s$ = $value$$67$$ & 255 + $JSCompiler_StaticMethods_setIYHIYL$self$$.$s$ = $value$$67$$ & 255; } function $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_setIXHIXL$self$$, $value$$66$$) { $JSCompiler_StaticMethods_setIXHIXL$self$$.$t$ = $value$$66$$ >> 8; - $JSCompiler_StaticMethods_setIXHIXL$self$$.$q$ = $value$$66$$ & 255 + $JSCompiler_StaticMethods_setIXHIXL$self$$.$q$ = $value$$66$$ & 255; } function $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_setHL$self$$, $value$$64$$) { - $JSCompiler_StaticMethods_setHL$self$$.$j$ = $value$$64$$ >> 8; - $JSCompiler_StaticMethods_setHL$self$$.$l$ = $value$$64$$ & 255 + $JSCompiler_StaticMethods_setHL$self$$.$h$ = $value$$64$$ >> 8; + $JSCompiler_StaticMethods_setHL$self$$.$l$ = $value$$64$$ & 255; } function $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_getIYHIYL$self$$) { - return $JSCompiler_StaticMethods_getIYHIYL$self$$.$v$ << 8 | $JSCompiler_StaticMethods_getIYHIYL$self$$.$s$ + return $JSCompiler_StaticMethods_getIYHIYL$self$$.$v$ << 8 | $JSCompiler_StaticMethods_getIYHIYL$self$$.$s$; } function $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_getIXHIXL$self$$) { - return $JSCompiler_StaticMethods_getIXHIXL$self$$.$t$ << 8 | $JSCompiler_StaticMethods_getIXHIXL$self$$.$q$ + return $JSCompiler_StaticMethods_getIXHIXL$self$$.$t$ << 8 | $JSCompiler_StaticMethods_getIXHIXL$self$$.$q$; } function $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_getHL$self$$) { - return $JSCompiler_StaticMethods_getHL$self$$.$j$ << 8 | $JSCompiler_StaticMethods_getHL$self$$.$l$ + return $JSCompiler_StaticMethods_getHL$self$$.$h$ << 8 | $JSCompiler_StaticMethods_getHL$self$$.$l$; } function $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_getDE$self$$) { - return $JSCompiler_StaticMethods_getDE$self$$.$d$ << 8 | $JSCompiler_StaticMethods_getDE$self$$.$e$ + return $JSCompiler_StaticMethods_getDE$self$$.$d$ << 8 | $JSCompiler_StaticMethods_getDE$self$$.$e$; } function $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_getBC$self$$) { - return $JSCompiler_StaticMethods_getBC$self$$.$h$ << 8 | $JSCompiler_StaticMethods_getBC$self$$.$g$ + return $JSCompiler_StaticMethods_getBC$self$$.$b$ << 8 | $JSCompiler_StaticMethods_getBC$self$$.$c$; } function $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_cp_a$self$$, $value$$61$$) { - $JSCompiler_StaticMethods_cp_a$self$$.$c$ = $JSCompiler_StaticMethods_cp_a$self$$.$w$[$JSCompiler_StaticMethods_cp_a$self$$.$a$ << 8 | $JSCompiler_StaticMethods_cp_a$self$$.$a$ - $value$$61$$ & 255] + $JSCompiler_StaticMethods_cp_a$self$$.$g$ = $JSCompiler_StaticMethods_cp_a$self$$.$F$[$JSCompiler_StaticMethods_cp_a$self$$.$a$ << 8 | $JSCompiler_StaticMethods_cp_a$self$$.$a$ - $value$$61$$ & 255]; } function $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_sbc_a$self$$, $value$$60$$) { - var $carry$$10$$ = $JSCompiler_StaticMethods_sbc_a$self$$.$c$ & 1, $temp$$8$$ = $JSCompiler_StaticMethods_sbc_a$self$$.$a$ - $value$$60$$ - $carry$$10$$ & 255; - $JSCompiler_StaticMethods_sbc_a$self$$.$c$ = $JSCompiler_StaticMethods_sbc_a$self$$.$w$[$carry$$10$$ << 16 | $JSCompiler_StaticMethods_sbc_a$self$$.$a$ << 8 | $temp$$8$$]; - $JSCompiler_StaticMethods_sbc_a$self$$.$a$ = $temp$$8$$ + var $carry$$10$$ = $JSCompiler_StaticMethods_sbc_a$self$$.$g$ & 1, $temp$$8$$ = $JSCompiler_StaticMethods_sbc_a$self$$.$a$ - $value$$60$$ - $carry$$10$$ & 255; + $JSCompiler_StaticMethods_sbc_a$self$$.$g$ = $JSCompiler_StaticMethods_sbc_a$self$$.$F$[$carry$$10$$ << 16 | $JSCompiler_StaticMethods_sbc_a$self$$.$a$ << 8 | $temp$$8$$]; + $JSCompiler_StaticMethods_sbc_a$self$$.$a$ = $temp$$8$$; } function $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_sub_a$self$$, $value$$59$$) { var $temp$$7$$ = $JSCompiler_StaticMethods_sub_a$self$$.$a$ - $value$$59$$ & 255; - $JSCompiler_StaticMethods_sub_a$self$$.$c$ = $JSCompiler_StaticMethods_sub_a$self$$.$w$[$JSCompiler_StaticMethods_sub_a$self$$.$a$ << 8 | $temp$$7$$]; - $JSCompiler_StaticMethods_sub_a$self$$.$a$ = $temp$$7$$ + $JSCompiler_StaticMethods_sub_a$self$$.$g$ = $JSCompiler_StaticMethods_sub_a$self$$.$F$[$JSCompiler_StaticMethods_sub_a$self$$.$a$ << 8 | $temp$$7$$]; + $JSCompiler_StaticMethods_sub_a$self$$.$a$ = $temp$$7$$; } function $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_adc_a$self$$, $value$$58$$) { - var $carry$$9$$ = $JSCompiler_StaticMethods_adc_a$self$$.$c$ & 1, $temp$$6$$ = $JSCompiler_StaticMethods_adc_a$self$$.$a$ + $value$$58$$ + $carry$$9$$ & 255; - $JSCompiler_StaticMethods_adc_a$self$$.$c$ = $JSCompiler_StaticMethods_adc_a$self$$.$F$[$carry$$9$$ << 16 | $JSCompiler_StaticMethods_adc_a$self$$.$a$ << 8 | $temp$$6$$]; - $JSCompiler_StaticMethods_adc_a$self$$.$a$ = $temp$$6$$ + var $carry$$9$$ = $JSCompiler_StaticMethods_adc_a$self$$.$g$ & 1, $temp$$6$$ = $JSCompiler_StaticMethods_adc_a$self$$.$a$ + $value$$58$$ + $carry$$9$$ & 255; + $JSCompiler_StaticMethods_adc_a$self$$.$g$ = $JSCompiler_StaticMethods_adc_a$self$$.$G$[$carry$$9$$ << 16 | $JSCompiler_StaticMethods_adc_a$self$$.$a$ << 8 | $temp$$6$$]; + $JSCompiler_StaticMethods_adc_a$self$$.$a$ = $temp$$6$$; } function $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_add_a$self$$, $value$$57$$) { var $temp$$5$$ = $JSCompiler_StaticMethods_add_a$self$$.$a$ + $value$$57$$ & 255; - $JSCompiler_StaticMethods_add_a$self$$.$c$ = $JSCompiler_StaticMethods_add_a$self$$.$F$[$JSCompiler_StaticMethods_add_a$self$$.$a$ << 8 | $temp$$5$$]; - $JSCompiler_StaticMethods_add_a$self$$.$a$ = $temp$$5$$ + $JSCompiler_StaticMethods_add_a$self$$.$g$ = $JSCompiler_StaticMethods_add_a$self$$.$G$[$JSCompiler_StaticMethods_add_a$self$$.$a$ << 8 | $temp$$5$$]; + $JSCompiler_StaticMethods_add_a$self$$.$a$ = $temp$$5$$; } -function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndexCB$self$$, $index$$45$$) { - var $location$$24$$ = $index$$45$$ + $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($JSCompiler_StaticMethods_doIndexCB$self$$.$b$) & 65535, $opcode$$4$$ = $JSCompiler_StaticMethods_doIndexCB$self$$.$f$(++$JSCompiler_StaticMethods_doIndexCB$self$$.$b$); +function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndexCB$self$$, $index$$46$$) { + var $location$$21$$ = $index$$46$$ + $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($JSCompiler_StaticMethods_doIndexCB$self$$.$f$) & 65535, $opcode$$4$$ = $JSCompiler_StaticMethods_doIndexCB$self$$.$i$(++$JSCompiler_StaticMethods_doIndexCB$self$$.$f$); $JSCompiler_StaticMethods_doIndexCB$self$$.$o$ -= $OP_INDEX_CB_STATES$$[$opcode$$4$$]; switch($opcode$$4$$) { case 0: - $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$b$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$b$); break; case 1: - $JSCompiler_StaticMethods_doIndexCB$self$$.$g$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$g$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$c$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$c$); break; case 2: - $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); break; case 3: - $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); break; case 4: - $JSCompiler_StaticMethods_doIndexCB$self$$.$j$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$j$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); break; case 5: - $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); break; case 6: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$))); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$))); break; case 7: - $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); break; case 8: - $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$b$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$b$); break; case 9: - $JSCompiler_StaticMethods_doIndexCB$self$$.$g$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$g$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$c$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$c$); break; case 10: - $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); break; case 11: - $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); break; case 12: - $JSCompiler_StaticMethods_doIndexCB$self$$.$j$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$j$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); break; case 13: - $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); break; case 14: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$))); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$))); break; case 15: - $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); break; case 16: - $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$b$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$b$); break; case 17: - $JSCompiler_StaticMethods_doIndexCB$self$$.$g$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$g$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$c$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$c$); break; case 18: - $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); break; case 19: - $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); break; case 20: - $JSCompiler_StaticMethods_doIndexCB$self$$.$j$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$j$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); break; case 21: - $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); break; case 22: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$))); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$))); break; case 23: - $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); break; case 24: - $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$b$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$b$); break; case 25: - $JSCompiler_StaticMethods_doIndexCB$self$$.$g$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$g$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$c$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$c$); break; case 26: - $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); break; case 27: - $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); break; case 28: - $JSCompiler_StaticMethods_doIndexCB$self$$.$j$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$j$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); break; case 29: - $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); break; case 30: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$))); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$))); break; case 31: - $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); break; case 32: - $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$b$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$b$); break; case 33: - $JSCompiler_StaticMethods_doIndexCB$self$$.$g$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$g$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$c$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$c$); break; case 34: - $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); break; case 35: - $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); break; case 36: - $JSCompiler_StaticMethods_doIndexCB$self$$.$j$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$j$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); break; case 37: - $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); break; case 38: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$))); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$))); break; case 39: - $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); break; case 40: - $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$b$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$b$); break; case 41: - $JSCompiler_StaticMethods_doIndexCB$self$$.$g$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$g$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$c$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$c$); break; case 42: - $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); break; case 43: - $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); break; case 44: - $JSCompiler_StaticMethods_doIndexCB$self$$.$j$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$j$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); break; case 45: - $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); break; case 46: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$))); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$))); break; case 47: - $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); break; case 48: - $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$b$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$b$); break; case 49: - $JSCompiler_StaticMethods_doIndexCB$self$$.$g$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$g$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$c$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$c$); break; case 50: - $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); break; case 51: - $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); break; case 52: - $JSCompiler_StaticMethods_doIndexCB$self$$.$j$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$j$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); break; case 53: - $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); break; case 54: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$))); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$))); break; case 55: - $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); break; case 56: - $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$b$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$b$); break; case 57: - $JSCompiler_StaticMethods_doIndexCB$self$$.$g$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$g$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$c$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$c$); break; case 58: - $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$d$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$d$); break; case 59: - $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$e$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$e$); break; case 60: - $JSCompiler_StaticMethods_doIndexCB$self$$.$j$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$j$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$h$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$h$); break; case 61: - $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$l$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$l$); break; case 62: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$))); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$))); break; case 63: - $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$)); - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); + $JSCompiler_StaticMethods_doIndexCB$self$$.$a$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$)); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$a$); break; case 64: ; @@ -837,7 +815,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 70: ; case 71: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & 1); + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & 1); break; case 72: ; @@ -854,7 +832,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 78: ; case 79: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & 2); + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & 2); break; case 80: ; @@ -871,7 +849,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 86: ; case 87: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & 4); + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & 4); break; case 88: ; @@ -888,7 +866,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 94: ; case 95: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & 8); + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & 8); break; case 96: ; @@ -905,7 +883,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 102: ; case 103: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & 16); + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & 16); break; case 104: ; @@ -922,7 +900,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 110: ; case 111: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & 32); + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & 32); break; case 112: ; @@ -939,7 +917,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 118: ; case 119: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & 64); + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & 64); break; case 120: ; @@ -956,7 +934,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 126: ; case 127: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & 128); + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doIndexCB$self$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & 128); break; case 128: ; @@ -973,7 +951,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 134: ; case 135: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & -2); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & -2); break; case 136: ; @@ -990,7 +968,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 142: ; case 143: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & -3); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & -3); break; case 144: ; @@ -1007,7 +985,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 150: ; case 151: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & -5); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & -5); break; case 152: ; @@ -1024,7 +1002,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 158: ; case 159: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & -9); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & -9); break; case 160: ; @@ -1041,7 +1019,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 166: ; case 167: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & -17); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & -17); break; case 168: ; @@ -1058,7 +1036,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 174: ; case 175: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & -33); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & -33); break; case 176: ; @@ -1075,7 +1053,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 182: ; case 183: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & -65); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & -65); break; case 184: ; @@ -1092,7 +1070,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 190: ; case 191: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) & -129); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) & -129); break; case 192: ; @@ -1109,7 +1087,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 198: ; case 199: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) | 1); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) | 1); break; case 200: ; @@ -1126,7 +1104,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 206: ; case 207: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) | 2); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) | 2); break; case 208: ; @@ -1143,7 +1121,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 214: ; case 215: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) | 4); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) | 4); break; case 216: ; @@ -1160,7 +1138,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 222: ; case 223: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) | 8); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) | 8); break; case 224: ; @@ -1177,7 +1155,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 230: ; case 231: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) | 16); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) | 16); break; case 232: ; @@ -1194,7 +1172,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 238: ; case 239: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) | 32); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) | 32); break; case 240: ; @@ -1211,7 +1189,7 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 246: ; case 247: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) | 64); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) | 64); break; case 248: ; @@ -1228,3400 +1206,3529 @@ function $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndex case 254: ; case 255: - $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$24$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$f$($location$$24$$) | 128); + $JSCompiler_StaticMethods_doIndexCB$self$$.$j$($location$$21$$, $JSCompiler_StaticMethods_doIndexCB$self$$.$i$($location$$21$$) | 128); break; default: - $JSSMS$Utils$console$log$$("Unimplemented DDCB/FDCB Opcode: " + $JSSMS$Utils$toHex$$($opcode$$4$$)) + $JSSMS$Utils$console$log$$("Unimplemented DDCB/FDCB Opcode: " + $JSSMS$Utils$toHex$$($opcode$$4$$)); } - $JSCompiler_StaticMethods_doIndexCB$self$$.$b$++ + $JSCompiler_StaticMethods_doIndexCB$self$$.$f$++; } function $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_bit$self$$, $mask$$5$$) { - $JSCompiler_StaticMethods_bit$self$$.$c$ = $JSCompiler_StaticMethods_bit$self$$.$c$ & 1 | $JSCompiler_StaticMethods_bit$self$$.$T$[$mask$$5$$] + $JSCompiler_StaticMethods_bit$self$$.$g$ = $JSCompiler_StaticMethods_bit$self$$.$g$ & 1 | $JSCompiler_StaticMethods_bit$self$$.$V$[$mask$$5$$]; } function $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_srl$self$$, $value$$55$$) { var $carry$$7$$ = $value$$55$$ & 1; $value$$55$$ = $value$$55$$ >> 1 & 255; - $JSCompiler_StaticMethods_srl$self$$.$c$ = $carry$$7$$ | $JSCompiler_StaticMethods_srl$self$$.$m$[$value$$55$$]; - return $value$$55$$ + $JSCompiler_StaticMethods_srl$self$$.$g$ = $carry$$7$$ | $JSCompiler_StaticMethods_srl$self$$.$m$[$value$$55$$]; + return $value$$55$$; } function $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_sra$self$$, $value$$54$$) { var $carry$$6$$ = $value$$54$$ & 1; $value$$54$$ = $value$$54$$ >> 1 | $value$$54$$ & 128; - $JSCompiler_StaticMethods_sra$self$$.$c$ = $carry$$6$$ | $JSCompiler_StaticMethods_sra$self$$.$m$[$value$$54$$]; - return $value$$54$$ + $JSCompiler_StaticMethods_sra$self$$.$g$ = $carry$$6$$ | $JSCompiler_StaticMethods_sra$self$$.$m$[$value$$54$$]; + return $value$$54$$; } function $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_sll$self$$, $value$$53$$) { var $carry$$5$$ = ($value$$53$$ & 128) >> 7; $value$$53$$ = ($value$$53$$ << 1 | 1) & 255; - $JSCompiler_StaticMethods_sll$self$$.$c$ = $carry$$5$$ | $JSCompiler_StaticMethods_sll$self$$.$m$[$value$$53$$]; - return $value$$53$$ + $JSCompiler_StaticMethods_sll$self$$.$g$ = $carry$$5$$ | $JSCompiler_StaticMethods_sll$self$$.$m$[$value$$53$$]; + return $value$$53$$; } function $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_sla$self$$, $value$$52$$) { var $carry$$4$$ = ($value$$52$$ & 128) >> 7; $value$$52$$ = $value$$52$$ << 1 & 255; - $JSCompiler_StaticMethods_sla$self$$.$c$ = $carry$$4$$ | $JSCompiler_StaticMethods_sla$self$$.$m$[$value$$52$$]; - return $value$$52$$ + $JSCompiler_StaticMethods_sla$self$$.$g$ = $carry$$4$$ | $JSCompiler_StaticMethods_sla$self$$.$m$[$value$$52$$]; + return $value$$52$$; } function $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_rr$self$$, $value$$51$$) { var $carry$$3$$ = $value$$51$$ & 1; - $value$$51$$ = ($value$$51$$ >> 1 | $JSCompiler_StaticMethods_rr$self$$.$c$ << 7) & 255; - $JSCompiler_StaticMethods_rr$self$$.$c$ = $carry$$3$$ | $JSCompiler_StaticMethods_rr$self$$.$m$[$value$$51$$]; - return $value$$51$$ + $value$$51$$ = ($value$$51$$ >> 1 | $JSCompiler_StaticMethods_rr$self$$.$g$ << 7) & 255; + $JSCompiler_StaticMethods_rr$self$$.$g$ = $carry$$3$$ | $JSCompiler_StaticMethods_rr$self$$.$m$[$value$$51$$]; + return $value$$51$$; } function $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_rl$self$$, $value$$50$$) { var $carry$$2$$ = ($value$$50$$ & 128) >> 7; - $value$$50$$ = ($value$$50$$ << 1 | $JSCompiler_StaticMethods_rl$self$$.$c$ & 1) & 255; - $JSCompiler_StaticMethods_rl$self$$.$c$ = $carry$$2$$ | $JSCompiler_StaticMethods_rl$self$$.$m$[$value$$50$$]; - return $value$$50$$ + $value$$50$$ = ($value$$50$$ << 1 | $JSCompiler_StaticMethods_rl$self$$.$g$ & 1) & 255; + $JSCompiler_StaticMethods_rl$self$$.$g$ = $carry$$2$$ | $JSCompiler_StaticMethods_rl$self$$.$m$[$value$$50$$]; + return $value$$50$$; } function $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_rrc$self$$, $value$$49$$) { var $carry$$1$$ = $value$$49$$ & 1; $value$$49$$ = ($value$$49$$ >> 1 | $value$$49$$ << 7) & 255; - $JSCompiler_StaticMethods_rrc$self$$.$c$ = $carry$$1$$ | $JSCompiler_StaticMethods_rrc$self$$.$m$[$value$$49$$]; - return $value$$49$$ + $JSCompiler_StaticMethods_rrc$self$$.$g$ = $carry$$1$$ | $JSCompiler_StaticMethods_rrc$self$$.$m$[$value$$49$$]; + return $value$$49$$; } function $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_rlc$self$$, $value$$48$$) { var $carry$$ = ($value$$48$$ & 128) >> 7; $value$$48$$ = ($value$$48$$ << 1 | $value$$48$$ >> 7) & 255; - $JSCompiler_StaticMethods_rlc$self$$.$c$ = $carry$$ | $JSCompiler_StaticMethods_rlc$self$$.$m$[$value$$48$$]; - return $value$$48$$ + $JSCompiler_StaticMethods_rlc$self$$.$g$ = $carry$$ | $JSCompiler_StaticMethods_rlc$self$$.$m$[$value$$48$$]; + return $value$$48$$; } -function $JSCompiler_StaticMethods_decMem$$($JSCompiler_StaticMethods_decMem$self$$, $offset$$15$$) { - $JSCompiler_StaticMethods_decMem$self$$.$i$($offset$$15$$, $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_decMem$self$$, $JSCompiler_StaticMethods_decMem$self$$.$f$($offset$$15$$))) +function $JSCompiler_StaticMethods_decMem$$($JSCompiler_StaticMethods_decMem$self$$, $offset$$16$$) { + $JSCompiler_StaticMethods_decMem$self$$.$j$($offset$$16$$, $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_decMem$self$$, $JSCompiler_StaticMethods_decMem$self$$.$i$($offset$$16$$))); } -function $JSCompiler_StaticMethods_incMem$$($JSCompiler_StaticMethods_incMem$self$$, $offset$$14$$) { - $JSCompiler_StaticMethods_incMem$self$$.$i$($offset$$14$$, $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_incMem$self$$, $JSCompiler_StaticMethods_incMem$self$$.$f$($offset$$14$$))) +function $JSCompiler_StaticMethods_incMem$$($JSCompiler_StaticMethods_incMem$self$$, $offset$$15$$) { + $JSCompiler_StaticMethods_incMem$self$$.$j$($offset$$15$$, $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_incMem$self$$, $JSCompiler_StaticMethods_incMem$self$$.$i$($offset$$15$$))); } function $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_ret$self$$, $condition$$4$$) { - $condition$$4$$ && ($JSCompiler_StaticMethods_ret$self$$.$b$ = $JSCompiler_StaticMethods_ret$self$$.$p$($JSCompiler_StaticMethods_ret$self$$.$n$), $JSCompiler_StaticMethods_ret$self$$.$n$ += 2, $JSCompiler_StaticMethods_ret$self$$.$o$ -= 6) + $condition$$4$$ && ($JSCompiler_StaticMethods_ret$self$$.$f$ = $JSCompiler_StaticMethods_ret$self$$.$p$($JSCompiler_StaticMethods_ret$self$$.$n$), $JSCompiler_StaticMethods_ret$self$$.$n$ += 2, $JSCompiler_StaticMethods_ret$self$$.$o$ -= 6); } function $JSCompiler_StaticMethods_signExtend$$($d$$) { 128 <= $d$$ && ($d$$ -= 256); - return $d$$ + return $d$$; } function $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_jr$self$$, $condition$$2$$) { - $condition$$2$$ ? ($JSCompiler_StaticMethods_jr$self$$.$b$ += $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_jr$self$$) + 1), $JSCompiler_StaticMethods_jr$self$$.$o$ -= 5) : $JSCompiler_StaticMethods_jr$self$$.$b$++ + $condition$$2$$ ? ($JSCompiler_StaticMethods_jr$self$$.$f$ += $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_jr$self$$) + 1), $JSCompiler_StaticMethods_jr$self$$.$o$ -= 5) : $JSCompiler_StaticMethods_jr$self$$.$f$++; } function $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_jp$self$$, $condition$$1$$) { - $condition$$1$$ ? $JSCompiler_StaticMethods_jp$self$$.$b$ = $JSCompiler_StaticMethods_jp$self$$.$p$($JSCompiler_StaticMethods_jp$self$$.$b$) : $JSCompiler_StaticMethods_jp$self$$.$b$ += 2 + $condition$$1$$ ? $JSCompiler_StaticMethods_jp$self$$.$f$ = $JSCompiler_StaticMethods_jp$self$$.$p$($JSCompiler_StaticMethods_jp$self$$.$f$) : $JSCompiler_StaticMethods_jp$self$$.$f$ += 2; } function $JSCompiler_StaticMethods_interrupt$$($JSCompiler_StaticMethods_interrupt$self$$) { - $JSCompiler_StaticMethods_interrupt$self$$.$J$ && !$JSCompiler_StaticMethods_interrupt$self$$.$P$ && ($JSCompiler_StaticMethods_interrupt$self$$.$O$ && ($JSCompiler_StaticMethods_interrupt$self$$.$b$++, $JSCompiler_StaticMethods_interrupt$self$$.$O$ = !1), $JSCompiler_StaticMethods_interrupt$self$$.$J$ = $JSCompiler_StaticMethods_interrupt$self$$.$K$ = !1, $JSCompiler_StaticMethods_interrupt$self$$.$I$ = !1, $JSCompiler_StaticMethods_interrupt$self$$.push($JSCompiler_StaticMethods_interrupt$self$$.$b$), - 0 == $JSCompiler_StaticMethods_interrupt$self$$.$Q$ ? ($JSCompiler_StaticMethods_interrupt$self$$.$b$ = 0 == $JSCompiler_StaticMethods_interrupt$self$$.$R$ || 255 == $JSCompiler_StaticMethods_interrupt$self$$.$R$ ? 56 : $JSCompiler_StaticMethods_interrupt$self$$.$R$, $JSCompiler_StaticMethods_interrupt$self$$.$o$ -= 13) : 1 == $JSCompiler_StaticMethods_interrupt$self$$.$Q$ ? ($JSCompiler_StaticMethods_interrupt$self$$.$b$ = 56, $JSCompiler_StaticMethods_interrupt$self$$.$o$ -= 13) : ($JSCompiler_StaticMethods_interrupt$self$$.$b$ = - $JSCompiler_StaticMethods_interrupt$self$$.$p$(($JSCompiler_StaticMethods_interrupt$self$$.$U$ << 8) + $JSCompiler_StaticMethods_interrupt$self$$.$R$), $JSCompiler_StaticMethods_interrupt$self$$.$o$ -= 19)) + $JSCompiler_StaticMethods_interrupt$self$$.$K$ && !$JSCompiler_StaticMethods_interrupt$self$$.$S$ && ($JSCompiler_StaticMethods_interrupt$self$$.$Q$ && ($JSCompiler_StaticMethods_interrupt$self$$.$f$++, $JSCompiler_StaticMethods_interrupt$self$$.$Q$ = !1), $JSCompiler_StaticMethods_interrupt$self$$.$K$ = $JSCompiler_StaticMethods_interrupt$self$$.$M$ = !1, $JSCompiler_StaticMethods_interrupt$self$$.$J$ = !1, $JSCompiler_StaticMethods_interrupt$self$$.push($JSCompiler_StaticMethods_interrupt$self$$.$f$), + 0 === $JSCompiler_StaticMethods_interrupt$self$$.$T$ ? ($JSCompiler_StaticMethods_interrupt$self$$.$f$ = 0 === $JSCompiler_StaticMethods_interrupt$self$$.$U$ || 255 === $JSCompiler_StaticMethods_interrupt$self$$.$U$ ? 56 : $JSCompiler_StaticMethods_interrupt$self$$.$U$, $JSCompiler_StaticMethods_interrupt$self$$.$o$ -= 13) : 1 == $JSCompiler_StaticMethods_interrupt$self$$.$T$ ? ($JSCompiler_StaticMethods_interrupt$self$$.$f$ = 56, $JSCompiler_StaticMethods_interrupt$self$$.$o$ -= 13) : ($JSCompiler_StaticMethods_interrupt$self$$.$f$ = + $JSCompiler_StaticMethods_interrupt$self$$.$p$(($JSCompiler_StaticMethods_interrupt$self$$.$W$ << 8) + $JSCompiler_StaticMethods_interrupt$self$$.$U$), $JSCompiler_StaticMethods_interrupt$self$$.$o$ -= 19)); } -function $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$$($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$) { - $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$lineno$ = 0; - $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$o$ += $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$main$.$cyclesPerLine$; - for($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$I$ && $JSCompiler_StaticMethods_interrupt$$($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$);;) { - $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$main$.$a$.$updateDisassembly$($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$b$); - var $JSCompiler_StaticMethods_interpret$self$$inline_90$$ = $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$, $temp$$inline_91$$ = 0, $opcode$$inline_92$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$P$ = !1; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$o$ -= $OP_STATES$$[$opcode$$inline_92$$]; - switch($opcode$$inline_92$$) { - case 1: - var $JSCompiler_StaticMethods_setBC$self$$inline_406$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $value$$inline_407$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - $JSCompiler_StaticMethods_setBC$self$$inline_406$$.$h$ = $value$$inline_407$$ >> 8; - $JSCompiler_StaticMethods_setBC$self$$inline_406$$.$g$ = $value$$inline_407$$ & 255; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++; - break; - case 2: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 3: - var $JSCompiler_StaticMethods_incBC$self$$inline_272$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$; - $JSCompiler_StaticMethods_incBC$self$$inline_272$$.$g$ = $JSCompiler_StaticMethods_incBC$self$$inline_272$$.$g$ + 1 & 255; - 0 == $JSCompiler_StaticMethods_incBC$self$$inline_272$$.$g$ && ($JSCompiler_StaticMethods_incBC$self$$inline_272$$.$h$ = $JSCompiler_StaticMethods_incBC$self$$inline_272$$.$h$ + 1 & 255); - break; - case 4: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$); - break; - case 5: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$); - break; - case 6: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - break; - case 7: - var $JSCompiler_StaticMethods_rlca_a$self$$inline_274$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $carry$$inline_275$$ = $JSCompiler_StaticMethods_rlca_a$self$$inline_274$$.$a$ >> 7; - $JSCompiler_StaticMethods_rlca_a$self$$inline_274$$.$a$ = $JSCompiler_StaticMethods_rlca_a$self$$inline_274$$.$a$ << 1 & 255 | $carry$$inline_275$$; - $JSCompiler_StaticMethods_rlca_a$self$$inline_274$$.$c$ = $JSCompiler_StaticMethods_rlca_a$self$$inline_274$$.$c$ & 236 | $carry$$inline_275$$; - break; - case 8: - var $JSCompiler_StaticMethods_exAF$self$$inline_277$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $temp$$inline_278$$ = $JSCompiler_StaticMethods_exAF$self$$inline_277$$.$a$; - $JSCompiler_StaticMethods_exAF$self$$inline_277$$.$a$ = $JSCompiler_StaticMethods_exAF$self$$inline_277$$.$W$; - $JSCompiler_StaticMethods_exAF$self$$inline_277$$.$W$ = $temp$$inline_278$$; - $temp$$inline_278$$ = $JSCompiler_StaticMethods_exAF$self$$inline_277$$.$c$; - $JSCompiler_StaticMethods_exAF$self$$inline_277$$.$c$ = $JSCompiler_StaticMethods_exAF$self$$inline_277$$.$ba$; - $JSCompiler_StaticMethods_exAF$self$$inline_277$$.$ba$ = $temp$$inline_278$$; - break; - case 9: - $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))); - break; - case 10: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 11: - $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$); - break; - case 12: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$); - break; - case 13: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$); - break; - case 14: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - break; - case 15: - var $JSCompiler_StaticMethods_rrca_a$self$$inline_280$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $carry$$inline_281$$ = $JSCompiler_StaticMethods_rrca_a$self$$inline_280$$.$a$ & 1; - $JSCompiler_StaticMethods_rrca_a$self$$inline_280$$.$a$ = $JSCompiler_StaticMethods_rrca_a$self$$inline_280$$.$a$ >> 1 | $carry$$inline_281$$ << 7; - $JSCompiler_StaticMethods_rrca_a$self$$inline_280$$.$c$ = $JSCompiler_StaticMethods_rrca_a$self$$inline_280$$.$c$ & 236 | $carry$$inline_281$$; - break; - case 16: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ - 1 & 255; - $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$); - break; - case 17: - var $JSCompiler_StaticMethods_setDE$self$$inline_409$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $value$$inline_410$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - $JSCompiler_StaticMethods_setDE$self$$inline_409$$.$d$ = $value$$inline_410$$ >> 8; - $JSCompiler_StaticMethods_setDE$self$$inline_409$$.$e$ = $value$$inline_410$$ & 255; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++; - break; - case 18: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 19: - $JSCompiler_StaticMethods_incDE$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$); - break; - case 20: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$); - break; - case 21: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$); - break; - case 22: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - break; - case 23: - var $JSCompiler_StaticMethods_rla_a$self$$inline_283$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $carry$$inline_284$$ = $JSCompiler_StaticMethods_rla_a$self$$inline_283$$.$a$ >> 7; - $JSCompiler_StaticMethods_rla_a$self$$inline_283$$.$a$ = ($JSCompiler_StaticMethods_rla_a$self$$inline_283$$.$a$ << 1 | $JSCompiler_StaticMethods_rla_a$self$$inline_283$$.$c$ & 1) & 255; - $JSCompiler_StaticMethods_rla_a$self$$inline_283$$.$c$ = $JSCompiler_StaticMethods_rla_a$self$$inline_283$$.$c$ & 236 | $carry$$inline_284$$; - break; - case 24: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ += $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$) + 1); - break; - case 25: - $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))); - break; - case 26: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 27: - $JSCompiler_StaticMethods_decDE$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$); - break; - case 28: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$); - break; - case 29: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$); - break; - case 30: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - break; - case 31: - var $JSCompiler_StaticMethods_rra_a$self$$inline_286$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $carry$$inline_287$$ = $JSCompiler_StaticMethods_rra_a$self$$inline_286$$.$a$ & 1; - $JSCompiler_StaticMethods_rra_a$self$$inline_286$$.$a$ = ($JSCompiler_StaticMethods_rra_a$self$$inline_286$$.$a$ >> 1 | ($JSCompiler_StaticMethods_rra_a$self$$inline_286$$.$c$ & 1) << 7) & 255; - $JSCompiler_StaticMethods_rra_a$self$$inline_286$$.$c$ = $JSCompiler_StaticMethods_rra_a$self$$inline_286$$.$c$ & 236 | $carry$$inline_287$$; - break; - case 32: - $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 64)); - break; - case 33: - $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++; - break; - case 34: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$G$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++), $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++; - break; - case 35: - $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$); - break; - case 36: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$); - break; - case 37: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$); - break; - case 38: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - break; - case 39: - var $JSCompiler_StaticMethods_daa$self$$inline_289$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $temp$$inline_290$$ = $JSCompiler_StaticMethods_daa$self$$inline_289$$.$ea$[$JSCompiler_StaticMethods_daa$self$$inline_289$$.$a$ | ($JSCompiler_StaticMethods_daa$self$$inline_289$$.$c$ & 1) << 8 | ($JSCompiler_StaticMethods_daa$self$$inline_289$$.$c$ & 2) << 8 | ($JSCompiler_StaticMethods_daa$self$$inline_289$$.$c$ & 16) << 6]; - $JSCompiler_StaticMethods_daa$self$$inline_289$$.$a$ = $temp$$inline_290$$ & 255; - $JSCompiler_StaticMethods_daa$self$$inline_289$$.$c$ = $JSCompiler_StaticMethods_daa$self$$inline_289$$.$c$ & 2 | $temp$$inline_290$$ >> 8; - break; - case 40: - $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 64)); - break; - case 41: - $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))); - break; - case 42: - $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++))); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++; - break; - case 43: - $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$); - break; - case 44: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$); - break; - case 45: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$); - break; - case 46: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - break; - case 47: - var $JSCompiler_StaticMethods_cpl_a$self$$inline_292$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$; - $JSCompiler_StaticMethods_cpl_a$self$$inline_292$$.$a$ ^= 255; - $JSCompiler_StaticMethods_cpl_a$self$$inline_292$$.$c$ |= 18; - break; - case 48: - $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 1)); - break; - case 49: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++; - break; - case 50: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++; - break; - case 51: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$++; - break; - case 52: - $JSCompiler_StaticMethods_incMem$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 53: - $JSCompiler_StaticMethods_decMem$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 54: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)); - break; - case 55: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ |= 1; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ &= -3; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ &= -17; - break; - case 56: - $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 1)); - break; - case 57: - $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$)); - break; - case 58: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++; - break; - case 59: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$--; - break; - case 60: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 61: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 62: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - break; - case 63: - var $JSCompiler_StaticMethods_ccf$self$$inline_294$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$; - 0 != ($JSCompiler_StaticMethods_ccf$self$$inline_294$$.$c$ & 1) ? ($JSCompiler_StaticMethods_ccf$self$$inline_294$$.$c$ &= -2, $JSCompiler_StaticMethods_ccf$self$$inline_294$$.$c$ |= 16) : ($JSCompiler_StaticMethods_ccf$self$$inline_294$$.$c$ |= 1, $JSCompiler_StaticMethods_ccf$self$$inline_294$$.$c$ &= -17); - $JSCompiler_StaticMethods_ccf$self$$inline_294$$.$c$ &= -3; - break; - case 65: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$; - break; - case 66: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$; - break; - case 67: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$; - break; - case 68: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$; - break; - case 69: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$; - break; - case 70: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 71: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$; - break; - case 72: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$; - break; - case 74: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$; - break; - case 75: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$; - break; - case 76: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$; - break; - case 77: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$; - break; - case 78: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 79: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$; - break; - case 80: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$; - break; - case 81: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$; - break; - case 83: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$; - break; - case 84: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$; - break; - case 85: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$; - break; - case 86: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 87: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$; - break; - case 88: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$; - break; - case 89: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$; - break; - case 90: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$; - break; - case 92: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$; - break; - case 93: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$; - break; - case 94: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 95: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$; - break; - case 96: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$; - break; - case 97: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$; - break; - case 98: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$; - break; - case 99: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$; - break; - case 101: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$; - break; - case 102: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 103: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$; - break; - case 104: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$; - break; - case 105: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$; - break; - case 106: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$; - break; - case 107: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$; - break; - case 108: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$; - break; - case 110: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 111: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$; - break; - case 112: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$); - break; - case 113: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$); - break; - case 114: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$); - break; - case 115: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$); - break; - case 116: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$); - break; - case 117: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$); - break; - case 118: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$o$ = 0; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$O$ = !0; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$--; - break; - case 119: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 120: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$; - break; - case 121: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$; - break; - case 122: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$; - break; - case 123: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$; - break; - case 124: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$; - break; - case 125: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$; - break; - case 126: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 128: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$); - break; - case 129: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$); - break; - case 130: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$); - break; - case 131: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$); - break; - case 132: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$); - break; - case 133: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$); - break; - case 134: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))); - break; - case 135: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 136: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$); - break; - case 137: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$); - break; - case 138: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$); - break; - case 139: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$); - break; - case 140: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$); - break; - case 141: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$); - break; - case 142: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))); - break; - case 143: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 144: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$); - break; - case 145: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$); - break; - case 146: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$); - break; - case 147: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$); - break; - case 148: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$); - break; - case 149: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$); - break; - case 150: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))); - break; - case 151: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 152: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$); - break; - case 153: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$); - break; - case 154: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$); - break; - case 155: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$); - break; - case 156: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$); - break; - case 157: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$); - break; - case 158: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))); - break; - case 159: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 160: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$] | 16; - break; - case 161: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$] | 16; - break; - case 162: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$] | 16; - break; - case 163: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$] | 16; - break; - case 164: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$] | 16; - break; - case 165: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$] | 16; - break; - case 166: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))] | 16; - break; - case 167: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$] | 16; - break; - case 168: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$]; - break; - case 169: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$]; - break; - case 170: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$]; - break; - case 171: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$]; - break; - case 172: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$]; - break; - case 173: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$]; - break; - case 174: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))]; - break; - case 175: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = 0]; - break; - case 176: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$]; - break; - case 177: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$]; - break; - case 178: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$]; - break; - case 179: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$]; - break; - case 180: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$]; - break; - case 181: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$]; - break; - case 182: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))]; - break; - case 183: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$]; - break; - case 184: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$h$); - break; - case 185: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$g$); - break; - case 186: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$); - break; - case 187: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$); - break; - case 188: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$); - break; - case 189: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$); - break; - case 190: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$))); - break; - case 191: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 192: - $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 64)); - break; - case 193: - var $JSCompiler_StaticMethods_setBC$self$$inline_412$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $value$$inline_413$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$); - $JSCompiler_StaticMethods_setBC$self$$inline_412$$.$h$ = $value$$inline_413$$ >> 8; - $JSCompiler_StaticMethods_setBC$self$$inline_412$$.$g$ = $value$$inline_413$$ & 255; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$ += 2; - break; - case 194: - $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 64)); - break; - case 195: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$); - break; - case 196: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.call(0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 64)); - break; - case 197: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 198: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)); - break; - case 199: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = 0; - break; - case 200: - $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 64)); - break; - case 201: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$ += 2; - break; - case 202: - $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 64)); - break; - case 203: - var $JSCompiler_StaticMethods_doCB$self$$inline_296$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $opcode$$inline_297$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++); - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$o$ -= $OP_CB_STATES$$[$opcode$$inline_297$$]; - switch($opcode$$inline_297$$) { - case 0: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$); - break; - case 1: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$); - break; - case 2: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$); - break; - case 3: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$); - break; - case 4: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$); - break; - case 5: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$); - break; - case 6: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)))); - break; - case 7: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$); - break; - case 8: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$); - break; - case 9: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$); - break; - case 10: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$); - break; - case 11: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$); - break; - case 12: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$); - break; - case 13: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$); - break; - case 14: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)))); - break; - case 15: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$); - break; - case 16: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$); - break; - case 17: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$); - break; - case 18: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$); - break; - case 19: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$); - break; - case 20: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$); - break; - case 21: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$); - break; - case 22: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)))); - break; - case 23: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$); - break; - case 24: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$); - break; - case 25: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$); - break; - case 26: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$); - break; - case 27: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$); - break; - case 28: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$); - break; - case 29: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$); - break; - case 30: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)))); - break; - case 31: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$); - break; - case 32: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$); - break; - case 33: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$); - break; - case 34: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$); - break; - case 35: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$); - break; - case 36: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$); - break; - case 37: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$); - break; - case 38: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)))); - break; - case 39: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$); - break; - case 40: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$); - break; - case 41: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$); - break; - case 42: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$); - break; - case 43: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$); - break; - case 44: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$); - break; - case 45: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$); - break; - case 46: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)))); - break; - case 47: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$); - break; - case 48: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$); - break; - case 49: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$); - break; - case 50: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$); - break; - case 51: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$); - break; - case 52: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$); - break; - case 53: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$); - break; - case 54: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)))); - break; - case 55: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$); - break; - case 56: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$); - break; - case 57: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$); - break; - case 58: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$); - break; - case 59: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$); - break; - case 60: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$); - break; - case 61: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$); - break; - case 62: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)))); - break; - case 63: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$); - break; - case 64: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ & 1); - break; - case 65: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ & 1); - break; - case 66: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ & 1); - break; - case 67: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ & 1); - break; - case 68: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ & 1); - break; - case 69: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ & 1); - break; - case 70: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & 1); - break; - case 71: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ & 1); - break; - case 72: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ & 2); - break; - case 73: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ & 2); - break; - case 74: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ & 2); - break; - case 75: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ & 2); - break; - case 76: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ & 2); - break; - case 77: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ & 2); - break; - case 78: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & 2); - break; - case 79: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ & 2); - break; - case 80: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ & 4); - break; - case 81: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ & 4); - break; - case 82: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ & 4); - break; - case 83: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ & 4); - break; - case 84: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ & 4); - break; - case 85: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ & 4); - break; - case 86: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & 4); - break; - case 87: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ & 4); - break; - case 88: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ & 8); - break; - case 89: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ & 8); - break; - case 90: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ & 8); - break; - case 91: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ & 8); - break; - case 92: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ & 8); - break; - case 93: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ & 8); - break; - case 94: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & 8); - break; - case 95: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ & 8); - break; - case 96: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ & 16); - break; - case 97: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ & 16); - break; - case 98: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ & 16); - break; - case 99: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ & 16); - break; - case 100: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ & 16); - break; - case 101: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ & 16); - break; - case 102: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & 16); - break; - case 103: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ & 16); - break; - case 104: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ & 32); - break; - case 105: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ & 32); - break; - case 106: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ & 32); - break; - case 107: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ & 32); - break; - case 108: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ & 32); - break; - case 109: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ & 32); - break; - case 110: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & 32); - break; - case 111: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ & 32); - break; - case 112: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ & 64); - break; - case 113: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ & 64); - break; - case 114: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ & 64); - break; - case 115: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ & 64); - break; - case 116: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ & 64); - break; - case 117: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ & 64); - break; - case 118: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & 64); - break; - case 119: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ & 64); - break; - case 120: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ & 128); - break; - case 121: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ & 128); - break; - case 122: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ & 128); - break; - case 123: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ & 128); - break; - case 124: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ & 128); - break; - case 125: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ & 128); - break; - case 126: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & 128); - break; - case 127: - $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$, $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ & 128); - break; - case 128: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ &= -2; - break; - case 129: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ &= -2; - break; - case 130: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ &= -2; - break; - case 131: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ &= -2; - break; - case 132: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ &= -2; - break; - case 133: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ &= -2; - break; - case 134: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & -2); - break; - case 135: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ &= -2; - break; - case 136: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ &= -3; - break; - case 137: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ &= -3; - break; - case 138: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ &= -3; - break; - case 139: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ &= -3; - break; - case 140: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ &= -3; - break; - case 141: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ &= -3; - break; - case 142: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & -3); - break; - case 143: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ &= -3; - break; - case 144: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ &= -5; - break; - case 145: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ &= -5; - break; - case 146: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ &= -5; - break; - case 147: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ &= -5; - break; - case 148: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ &= -5; - break; - case 149: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ &= -5; - break; - case 150: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & -5); - break; - case 151: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ &= -5; - break; - case 152: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ &= -9; - break; - case 153: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ &= -9; - break; - case 154: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ &= -9; - break; - case 155: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ &= -9; - break; - case 156: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ &= -9; - break; - case 157: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ &= -9; - break; - case 158: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & -9); - break; - case 159: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ &= -9; - break; - case 160: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ &= -17; - break; - case 161: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ &= -17; - break; - case 162: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ &= -17; - break; - case 163: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ &= -17; - break; - case 164: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ &= -17; - break; - case 165: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ &= -17; - break; - case 166: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & -17); - break; - case 167: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ &= -17; - break; - case 168: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ &= -33; - break; - case 169: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ &= -33; - break; - case 170: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ &= -33; - break; - case 171: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ &= -33; - break; - case 172: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ &= -33; - break; - case 173: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ &= -33; - break; - case 174: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & -33); - break; - case 175: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ &= -33; - break; - case 176: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ &= -65; - break; - case 177: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ &= -65; - break; - case 178: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ &= -65; - break; - case 179: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ &= -65; - break; - case 180: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ &= -65; - break; - case 181: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ &= -65; - break; - case 182: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & -65); - break; - case 183: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ &= -65; - break; - case 184: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ &= -129; - break; - case 185: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ &= -129; - break; - case 186: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ &= -129; - break; - case 187: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ &= -129; - break; - case 188: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ &= -129; - break; - case 189: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ &= -129; - break; - case 190: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) & -129); - break; - case 191: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ &= -129; - break; - case 192: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ |= 1; - break; - case 193: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ |= 1; - break; - case 194: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ |= 1; - break; - case 195: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ |= 1; - break; - case 196: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ |= 1; - break; - case 197: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ |= 1; - break; - case 198: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) | 1); - break; - case 199: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ |= 1; - break; - case 200: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ |= 2; - break; - case 201: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ |= 2; - break; - case 202: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ |= 2; - break; - case 203: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ |= 2; - break; - case 204: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ |= 2; - break; - case 205: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ |= 2; - break; - case 206: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) | 2); - break; - case 207: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ |= 2; - break; - case 208: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ |= 4; - break; - case 209: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ |= 4; - break; - case 210: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ |= 4; - break; - case 211: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ |= 4; - break; - case 212: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ |= 4; - break; - case 213: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ |= 4; - break; - case 214: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) | 4); - break; - case 215: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ |= 4; - break; - case 216: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ |= 8; - break; - case 217: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ |= 8; - break; - case 218: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ |= 8; - break; - case 219: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ |= 8; - break; - case 220: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ |= 8; - break; - case 221: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ |= 8; - break; - case 222: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) | 8); - break; - case 223: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ |= 8; - break; - case 224: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ |= 16; - break; - case 225: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ |= 16; - break; - case 226: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ |= 16; - break; - case 227: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ |= 16; - break; - case 228: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ |= 16; - break; - case 229: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ |= 16; - break; - case 230: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) | 16); - break; - case 231: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ |= 16; - break; - case 232: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ |= 32; - break; - case 233: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ |= 32; - break; - case 234: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ |= 32; - break; - case 235: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ |= 32; - break; - case 236: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ |= 32; - break; - case 237: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ |= 32; - break; - case 238: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) | 32); - break; - case 239: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ |= 32; - break; - case 240: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ |= 64; - break; - case 241: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ |= 64; - break; - case 242: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ |= 64; - break; - case 243: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ |= 64; - break; - case 244: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ |= 64; - break; - case 245: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ |= 64; - break; - case 246: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) | 64); - break; - case 247: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ |= 64; - break; - case 248: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$h$ |= 128; - break; - case 249: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$g$ |= 128; - break; - case 250: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$d$ |= 128; - break; - case 251: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$e$ |= 128; - break; - case 252: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$j$ |= 128; - break; - case 253: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$l$ |= 128; - break; - case 254: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$), $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doCB$self$$inline_296$$)) | 128); - break; - case 255: - $JSCompiler_StaticMethods_doCB$self$$inline_296$$.$a$ |= 128; - break; - default: - $JSSMS$Utils$console$log$$("Unimplemented CB Opcode: " + $JSSMS$Utils$toHex$$($opcode$$inline_297$$)) - } - break; - case 204: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.call(0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 64)); - break; - case 205: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ + 2); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$); - break; - case 206: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)); - break; - case 207: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = 8; - break; - case 208: - $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 1)); - break; - case 209: - var $JSCompiler_StaticMethods_setDE$self$$inline_415$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $value$$inline_416$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$); - $JSCompiler_StaticMethods_setDE$self$$inline_415$$.$d$ = $value$$inline_416$$ >> 8; - $JSCompiler_StaticMethods_setDE$self$$inline_415$$.$e$ = $value$$inline_416$$ & 255; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$ += 2; - break; - case 210: - $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 1)); - break; - case 211: - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.port, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$); - break; - case 212: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.call(0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 1)); - break; - case 213: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 214: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)); - break; - case 215: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = 16; - break; - case 216: - $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 1)); - break; - case 217: - var $JSCompiler_StaticMethods_exBC$self$$inline_299$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $temp$$inline_300$$ = $JSCompiler_StaticMethods_exBC$self$$inline_299$$.$h$; - $JSCompiler_StaticMethods_exBC$self$$inline_299$$.$h$ = $JSCompiler_StaticMethods_exBC$self$$inline_299$$.$X$; - $JSCompiler_StaticMethods_exBC$self$$inline_299$$.$X$ = $temp$$inline_300$$; - $temp$$inline_300$$ = $JSCompiler_StaticMethods_exBC$self$$inline_299$$.$g$; - $JSCompiler_StaticMethods_exBC$self$$inline_299$$.$g$ = $JSCompiler_StaticMethods_exBC$self$$inline_299$$.$Y$; - $JSCompiler_StaticMethods_exBC$self$$inline_299$$.$Y$ = $temp$$inline_300$$; - var $JSCompiler_StaticMethods_exDE$self$$inline_302$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $temp$$inline_303$$ = $JSCompiler_StaticMethods_exDE$self$$inline_302$$.$d$; - $JSCompiler_StaticMethods_exDE$self$$inline_302$$.$d$ = $JSCompiler_StaticMethods_exDE$self$$inline_302$$.$Z$; - $JSCompiler_StaticMethods_exDE$self$$inline_302$$.$Z$ = $temp$$inline_303$$; - $temp$$inline_303$$ = $JSCompiler_StaticMethods_exDE$self$$inline_302$$.$e$; - $JSCompiler_StaticMethods_exDE$self$$inline_302$$.$e$ = $JSCompiler_StaticMethods_exDE$self$$inline_302$$.$aa$; - $JSCompiler_StaticMethods_exDE$self$$inline_302$$.$aa$ = $temp$$inline_303$$; - var $JSCompiler_StaticMethods_exHL$self$$inline_305$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $temp$$inline_306$$ = $JSCompiler_StaticMethods_exHL$self$$inline_305$$.$j$; - $JSCompiler_StaticMethods_exHL$self$$inline_305$$.$j$ = $JSCompiler_StaticMethods_exHL$self$$inline_305$$.$ca$; - $JSCompiler_StaticMethods_exHL$self$$inline_305$$.$ca$ = $temp$$inline_306$$; - $temp$$inline_306$$ = $JSCompiler_StaticMethods_exHL$self$$inline_305$$.$l$; - $JSCompiler_StaticMethods_exHL$self$$inline_305$$.$l$ = $JSCompiler_StaticMethods_exHL$self$$inline_305$$.$da$; - $JSCompiler_StaticMethods_exHL$self$$inline_305$$.$da$ = $temp$$inline_306$$; - break; - case 218: - $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 1)); - break; - case 219: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.port, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)); - break; - case 220: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.call(0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 1)); - break; - case 221: - var $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $opcode$$inline_309$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++), $temp$$inline_310$$ = 0; - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$o$ -= $OP_DD_STATES$$[$opcode$$inline_309$$]; - switch($opcode$$inline_309$$) { - case 9: - $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))); - break; - case 25: - $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))); - break; - case 33: - $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$p$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 34: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$G$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$p$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++), $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 35: - var $JSCompiler_StaticMethods_incIXHIXL$self$$inline_418$$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$; - $JSCompiler_StaticMethods_incIXHIXL$self$$inline_418$$.$q$ = $JSCompiler_StaticMethods_incIXHIXL$self$$inline_418$$.$q$ + 1 & 255; - 0 == $JSCompiler_StaticMethods_incIXHIXL$self$$inline_418$$.$q$ && ($JSCompiler_StaticMethods_incIXHIXL$self$$inline_418$$.$t$ = $JSCompiler_StaticMethods_incIXHIXL$self$$inline_418$$.$t$ + 1 & 255); - break; - case 36: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$); - break; - case 37: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$); - break; - case 38: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++); - break; - case 41: - $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))); - break; - case 42: - $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$p$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$p$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++))); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 43: - var $JSCompiler_StaticMethods_decIXHIXL$self$$inline_420$$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$; - $JSCompiler_StaticMethods_decIXHIXL$self$$inline_420$$.$q$ = $JSCompiler_StaticMethods_decIXHIXL$self$$inline_420$$.$q$ - 1 & 255; - 255 == $JSCompiler_StaticMethods_decIXHIXL$self$$inline_420$$.$q$ && ($JSCompiler_StaticMethods_decIXHIXL$self$$inline_420$$.$t$ = $JSCompiler_StaticMethods_decIXHIXL$self$$inline_420$$.$t$ - 1 & 255); - break; - case 44: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$); - break; - case 45: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$); - break; - case 46: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++); - break; - case 52: - $JSCompiler_StaticMethods_incMem$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 53: - $JSCompiler_StaticMethods_decMem$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 54: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$(++$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 57: - $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$n$)); - break; - case 68: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$h$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$; - break; - case 69: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$h$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$; - break; - case 70: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$h$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 76: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$g$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$; - break; - case 77: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$g$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$; - break; - case 78: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$g$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 84: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$d$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$; - break; - case 85: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$d$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$; - break; - case 86: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$d$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 92: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$e$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$; - break; - case 93: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$e$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$; - break; - case 94: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$e$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 96: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$h$; - break; - case 97: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$g$; - break; - case 98: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$d$; - break; - case 99: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$e$; - break; - case 100: - break; - case 101: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$; - break; - case 102: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$j$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 103: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$; - break; - case 104: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$h$; - break; - case 105: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$g$; - break; - case 106: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$d$; - break; - case 107: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$e$; - break; - case 108: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$; - break; - case 109: - break; - case 110: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$l$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 111: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$; - break; - case 112: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$h$); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 113: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$g$); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 114: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$d$); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 115: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$e$); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 116: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$j$); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 117: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$l$); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 119: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 124: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$; - break; - case 125: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$; - break; - case 126: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 132: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$); - break; - case 133: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$); - break; - case 134: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 140: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$); - break; - case 141: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$); - break; - case 142: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 148: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$); - break; - case 149: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$); - break; - case 150: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 156: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$); - break; - case 157: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$); - break; - case 158: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 164: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$m$[$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ &= $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$] | 16; - break; - case 165: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$m$[$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ &= $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$] | 16; - break; - case 166: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$m$[$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ &= $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))] | 16; - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 172: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$m$[$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ ^= $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$]; - break; - case 173: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$m$[$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ ^= $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$]; - break; - case 174: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$m$[$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ ^= $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))]; - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 180: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$m$[$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ |= $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$]; - break; - case 181: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$m$[$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ |= $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$]; - break; - case 182: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$m$[$JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$a$ |= $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))]; - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 188: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$t$); - break; - case 189: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$q$); - break; - case 190: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$f$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$))); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$++; - break; - case 203: - $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - break; - case 225: - $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$p$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$n$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$n$ += 2; - break; - case 227: - $temp$$inline_310$$ = $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$); - $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$, $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$p$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$n$)); - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$G$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$n$, $temp$$inline_310$$); - break; - case 229: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.push($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$)); - break; - case 233: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$ = $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$); - break; - case 249: - $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$n$ = $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$); - break; - default: - $JSSMS$Utils$console$log$$("Unimplemented DD/FD Opcode: " + $JSSMS$Utils$toHex$$($opcode$$inline_309$$)), $JSCompiler_StaticMethods_doIndexOpIX$self$$inline_308$$.$b$-- - } - break; - case 222: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)); - break; - case 223: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = 24; - break; - case 224: - $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 4)); - break; - case 225: - $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$)); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$ += 2; - break; - case 226: - $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 4)); - break; - case 227: - $temp$$inline_91$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$); - $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$)); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$G$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$, $temp$$inline_91$$); - break; - case 228: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.call(0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 4)); - break; - case 229: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$)); - break; - case 230: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)] | 16; - break; - case 231: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = 32; - break; - case 232: - $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 4)); - break; - case 233: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$); - break; - case 234: - $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 4)); - break; - case 235: - $temp$$inline_91$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$j$ = $temp$$inline_91$$; - $temp$$inline_91$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$l$ = $temp$$inline_91$$; - break; - case 236: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.call(0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 4)); - break; - case 237: - var $JSCompiler_StaticMethods_doED$self$$inline_312$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $opcode$$inline_313$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$), $temp$$inline_314$$ = 0, $location$$inline_315$$ = 0; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$o$ -= $OP_ED_STATES$$[$opcode$$inline_313$$]; - switch($opcode$$inline_313$$) { - case 64: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$m$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$]; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 65: - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 66: - $JSCompiler_StaticMethods_sbc16$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 67: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$G$($JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$(++$JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$), $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$ += 2; - break; - case 68: - ; - case 76: - ; - case 84: - ; - case 92: - ; - case 100: - ; - case 108: - ; - case 116: - ; - case 124: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ = 0; - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $temp$$inline_314$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 69: - ; - case 77: - ; - case 85: - ; - case 93: - ; - case 101: - ; - case 109: - ; - case 117: - ; - case 125: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$($JSCompiler_StaticMethods_doED$self$$inline_312$$.$n$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$n$ += 2; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$J$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$K$; - break; - case 70: - ; - case 78: - ; - case 102: - ; - case 110: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$Q$ = 0; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 71: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$U$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 72: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$m$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$]; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 73: - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 74: - $JSCompiler_StaticMethods_adc16$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 75: - var $JSCompiler_StaticMethods_setBC$self$$inline_422$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$, $value$$inline_423$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$($JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$(++$JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$)); - $JSCompiler_StaticMethods_setBC$self$$inline_422$$.$h$ = $value$$inline_423$$ >> 8; - $JSCompiler_StaticMethods_setBC$self$$inline_422$$.$g$ = $value$$inline_423$$ & 255; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$ += 2; - break; - case 79: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 80: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$d$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$m$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$d$]; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 81: - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$d$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 82: - $JSCompiler_StaticMethods_sbc16$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 83: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$G$($JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$(++$JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$), $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$ += 2; - break; - case 86: - ; - case 118: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$Q$ = 1; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 87: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$U$; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$V$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$] | ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$K$ ? 4 : 0); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 88: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$e$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$m$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$e$]; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 89: - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$e$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 90: - $JSCompiler_StaticMethods_adc16$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 91: - var $JSCompiler_StaticMethods_setDE$self$$inline_425$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$, $value$$inline_426$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$($JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$(++$JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$)); - $JSCompiler_StaticMethods_setDE$self$$inline_425$$.$d$ = $value$$inline_426$$ >> 8; - $JSCompiler_StaticMethods_setDE$self$$inline_425$$.$e$ = $value$$inline_426$$ & 255; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$ += 2; - break; - case 95: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ = Math.round(255 * Math.random()); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$V$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$] | ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$K$ ? 4 : 0); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 96: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$j$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$m$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$j$]; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 97: - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$j$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 98: - $JSCompiler_StaticMethods_sbc16$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 99: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$G$($JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$(++$JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$), $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$ += 2; - break; - case 103: - $location$$inline_315$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($location$$inline_315$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($location$$inline_315$$, $temp$$inline_314$$ >> 4 | ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ & 15) << 4); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ & 240 | $temp$$inline_314$$ & 15; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$m$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$]; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 104: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$l$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$m$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$l$]; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 105: - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$l$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 106: - $JSCompiler_StaticMethods_adc16$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 107: - $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$($JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$(++$JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$))); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$ += 2; - break; - case 111: - $location$$inline_315$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($location$$inline_315$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($location$$inline_315$$, ($temp$$inline_314$$ & 15) << 4 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ & 15); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ & 240 | $temp$$inline_314$$ >> 4; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$m$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$]; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 113: - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, 0); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 114: - $JSCompiler_StaticMethods_sbc16$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$n$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 115: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$G$($JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$(++$JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$), $JSCompiler_StaticMethods_doED$self$$inline_312$$.$n$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$ += 2; - break; - case 120: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | $JSCompiler_StaticMethods_doED$self$$inline_312$$.$m$[$JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$]; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 121: - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 122: - $JSCompiler_StaticMethods_adc16$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$n$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 123: - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$n$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$($JSCompiler_StaticMethods_doED$self$$inline_312$$.$p$(++$JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$ += 2; - break; - case 160: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$), $temp$$inline_314$$); - $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_incDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ = $temp$$inline_314$$ + $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ & 255; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 193 | ($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? 4 : 0) | $temp$$inline_314$$ & 8 | ($temp$$inline_314$$ & 2 ? 32 : 0); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 161: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | 2; - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$))); - $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ |= 0 == $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? 0 : 4; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 248 | $temp$$inline_314$$; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 162: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$), $temp$$inline_314$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$); - $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = 128 == ($temp$$inline_314$$ & 128) ? $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ | 2 : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & -3; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 163: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $temp$$inline_314$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$); - $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - 255 < $JSCompiler_StaticMethods_doED$self$$inline_312$$.$l$ + $temp$$inline_314$$ ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ |= 1, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ |= 16) : ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ &= -2, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ &= -17); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = 128 == ($temp$$inline_314$$ & 128) ? $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ | 2 : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & -3; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 168: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$), $temp$$inline_314$$); - $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_decDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ = $temp$$inline_314$$ + $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ & 255; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 193 | ($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? 4 : 0) | $temp$$inline_314$$ & 8 | ($temp$$inline_314$$ & 2 ? 32 : 0); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 169: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | 2; - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$))); - $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ |= 0 == $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? 0 : 4; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 248 | $temp$$inline_314$$; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 170: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$), $temp$$inline_314$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$); - $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = 0 != ($temp$$inline_314$$ & 128) ? $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ | 2 : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & -3; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 171: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $temp$$inline_314$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$); - $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - 255 < $JSCompiler_StaticMethods_doED$self$$inline_312$$.$l$ + $temp$$inline_314$$ ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ |= 1, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ |= 16) : ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ &= -2, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ &= -17); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = 128 == ($temp$$inline_314$$ & 128) ? $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ | 2 : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & -3; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 176: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$), $temp$$inline_314$$); - $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_incDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ = $temp$$inline_314$$ + $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ & 255; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 193 | ($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? 4 : 0) | $temp$$inline_314$$ & 8 | ($temp$$inline_314$$ & 2 ? 32 : 0); - 0 != $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$o$ -= 5, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$--) : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 177: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | 2; - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$))); - $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ |= 0 == $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? 0 : 4; - 0 != ($temp$$inline_314$$ & 4) && 0 == ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 64) ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$o$ -= 5, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$--) : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 248 | $temp$$inline_314$$; - break; - case 178: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$), $temp$$inline_314$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$); - $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - 0 != $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$o$ -= 5, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$--) : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = 128 == ($temp$$inline_314$$ & 128) ? $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ | 2 : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & -3; - break; - case 179: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $temp$$inline_314$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$); - $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - 0 != $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$o$ -= 5, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$--) : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - 255 < $JSCompiler_StaticMethods_doED$self$$inline_312$$.$l$ + $temp$$inline_314$$ ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ |= 1, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ |= 16) : ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ &= -2, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ &= -17); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = 0 != ($temp$$inline_314$$ & 128) ? $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ | 2 : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & -3; - break; - case 184: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$), $temp$$inline_314$$); - $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_decDE$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ = $temp$$inline_314$$ + $JSCompiler_StaticMethods_doED$self$$inline_312$$.$a$ & 255; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 193 | ($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? 4 : 0) | $temp$$inline_314$$ & 8 | ($temp$$inline_314$$ & 2 ? 32 : 0); - 0 != $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$o$ -= 5, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$--) : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - break; - case 185: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 1 | 2; - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$))); - $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - $temp$$inline_314$$ |= 0 == $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doED$self$$inline_312$$) ? 0 : 4; - 0 != ($temp$$inline_314$$ & 4) && 0 == ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 64) ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$o$ -= 5, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$--) : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & 248 | $temp$$inline_314$$; - break; - case 186: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$), $temp$$inline_314$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$); - $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - 0 != $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$o$ -= 5, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$--) : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = 0 != ($temp$$inline_314$$ & 128) ? $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ | 2 : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & -3; - break; - case 187: - $temp$$inline_314$$ = $JSCompiler_StaticMethods_doED$self$$inline_312$$.$f$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$)); - $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_doED$self$$inline_312$$.port, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$g$, $temp$$inline_314$$); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doED$self$$inline_312$$, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$); - $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_doED$self$$inline_312$$); - 0 != $JSCompiler_StaticMethods_doED$self$$inline_312$$.$h$ ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$o$ -= 5, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$--) : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++; - 255 < $JSCompiler_StaticMethods_doED$self$$inline_312$$.$l$ + $temp$$inline_314$$ ? ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ |= 1, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ |= 16) : ($JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ &= -2, $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ &= -17); - $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ = 0 != ($temp$$inline_314$$ & 128) ? $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ | 2 : $JSCompiler_StaticMethods_doED$self$$inline_312$$.$c$ & -3; - break; - default: - $JSSMS$Utils$console$log$$("Unimplemented ED Opcode: " + $JSSMS$Utils$toHex$$($opcode$$inline_313$$)), $JSCompiler_StaticMethods_doED$self$$inline_312$$.$b$++ - } - break; - case 238: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)]; - break; - case 239: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = 40; - break; - case 240: - $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 128)); - break; - case 241: - var $JSCompiler_StaticMethods_setAF$self$$inline_317$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $value$$inline_318$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$p$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$); - $JSCompiler_StaticMethods_setAF$self$$inline_317$$.$a$ = $value$$inline_318$$ >> 8; - $JSCompiler_StaticMethods_setAF$self$$inline_317$$.$c$ = $value$$inline_318$$ & 255; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$ += 2; - break; - case 242: - $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 128)); - break; - case 243: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$J$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$K$ = !1; - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$P$ = !0; - break; - case 244: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.call(0 == ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 128)); - break; - case 245: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ << 8 | $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$); - break; - case 246: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$m$[$JSCompiler_StaticMethods_interpret$self$$inline_90$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)]; - break; - case 247: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$); - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = 48; - break; - case 248: - $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 128)); - break; - case 249: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$n$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$); - break; - case 250: - $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, 0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 128)); - break; - case 251: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$J$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$K$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$P$ = !0; - break; - case 252: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.call(0 != ($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$c$ & 128)); - break; - case 253: - var $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$, $opcode$$inline_321$$ = $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++), $temp$$inline_322$$ = void 0; - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$o$ -= $OP_DD_STATES$$[$opcode$$inline_321$$]; - switch($opcode$$inline_321$$) { - case 9: - $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))); - break; - case 25: - $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))); - break; - case 33: - $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$p$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 34: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$G$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$p$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++), $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 35: - var $JSCompiler_StaticMethods_incIYHIYL$self$$inline_428$$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$; - $JSCompiler_StaticMethods_incIYHIYL$self$$inline_428$$.$s$ = $JSCompiler_StaticMethods_incIYHIYL$self$$inline_428$$.$s$ + 1 & 255; - 0 == $JSCompiler_StaticMethods_incIYHIYL$self$$inline_428$$.$s$ && ($JSCompiler_StaticMethods_incIYHIYL$self$$inline_428$$.$v$ = $JSCompiler_StaticMethods_incIYHIYL$self$$inline_428$$.$v$ + 1 & 255); - break; - case 36: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$); - break; - case 37: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$); - break; - case 38: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++); - break; - case 41: - $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))); - break; - case 42: - $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$p$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$p$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++))); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 43: - var $JSCompiler_StaticMethods_decIYHIYL$self$$inline_430$$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$; - $JSCompiler_StaticMethods_decIYHIYL$self$$inline_430$$.$s$ = $JSCompiler_StaticMethods_decIYHIYL$self$$inline_430$$.$s$ - 1 & 255; - 255 == $JSCompiler_StaticMethods_decIYHIYL$self$$inline_430$$.$s$ && ($JSCompiler_StaticMethods_decIYHIYL$self$$inline_430$$.$v$ = $JSCompiler_StaticMethods_decIYHIYL$self$$inline_430$$.$v$ - 1 & 255); - break; - case 44: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$); - break; - case 45: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$); - break; - case 46: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++); - break; - case 52: - $JSCompiler_StaticMethods_incMem$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 53: - $JSCompiler_StaticMethods_decMem$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 54: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$(++$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 57: - $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$n$)); - break; - case 68: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$h$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$; - break; - case 69: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$h$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$; - break; - case 70: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$h$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 76: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$g$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$; - break; - case 77: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$g$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$; - break; - case 78: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$g$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 84: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$d$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$; - break; - case 85: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$d$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$; - break; - case 86: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$d$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 92: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$e$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$; - break; - case 93: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$e$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$; - break; - case 94: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$e$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 96: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$h$; - break; - case 97: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$g$; - break; - case 98: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$d$; - break; - case 99: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$e$; - break; - case 100: - break; - case 101: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$; - break; - case 102: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$j$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 103: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$; - break; - case 104: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$h$; - break; - case 105: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$g$; - break; - case 106: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$d$; - break; - case 107: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$e$; - break; - case 108: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$; - break; - case 109: - break; - case 110: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$l$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 111: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$; - break; - case 112: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$h$); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 113: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$g$); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 114: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$d$); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 115: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$e$); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 116: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$j$); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 117: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$l$); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 119: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 124: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$; - break; - case 125: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$; - break; - case 126: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 132: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$); - break; - case 133: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$); - break; - case 134: - $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 140: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$); - break; - case 141: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$); - break; - case 142: - $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 148: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$); - break; - case 149: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$); - break; - case 150: - $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 156: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$); - break; - case 157: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$); - break; - case 158: - $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 164: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$m$[$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ &= $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$] | 16; - break; - case 165: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$m$[$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ &= $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$] | 16; - break; - case 166: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$m$[$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ &= $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))] | 16; - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 172: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$m$[$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ ^= $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$]; - break; - case 173: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$m$[$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ ^= $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$]; - break; - case 174: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$m$[$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ ^= $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))]; - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 180: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$m$[$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ |= $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$]; - break; - case 181: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$m$[$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ |= $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$]; - break; - case 182: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$c$ = $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$m$[$JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$a$ |= $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))]; - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 188: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$v$); - break; - case 189: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$s$); - break; - case 190: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$f$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$))); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$++; - break; - case 203: - $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - break; - case 225: - $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$p$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$n$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$n$ += 2; - break; - case 227: - $temp$$inline_322$$ = $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$); - $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$, $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$p$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$n$)); - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$G$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$n$, $temp$$inline_322$$); - break; - case 229: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.push($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$)); - break; - case 233: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$ = $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$); - break; - case 249: - $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$n$ = $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$); - break; - default: - $JSSMS$Utils$console$log$$("Unimplemented DD/FD Opcode: " + $JSSMS$Utils$toHex$$($opcode$$inline_321$$)), $JSCompiler_StaticMethods_doIndexOpIY$self$$inline_320$$.$b$-- - } - break; - case 254: - $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$inline_90$$, $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$f$($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$++)); - break; - case 255: - $JSCompiler_StaticMethods_interpret$self$$inline_90$$.push($JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$), $JSCompiler_StaticMethods_interpret$self$$inline_90$$.$b$ = 56 +function $JSCompiler_StaticMethods_interpret$$($JSCompiler_StaticMethods_interpret$self$$) { + var $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = 0, $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = + $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + $JSCompiler_StaticMethods_interpret$self$$.$S$ = !1; + $JSCompiler_StaticMethods_interpret$self$$.$o$ -= $OP_STATES$$[$carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$]; + switch($carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$) { + case 1: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ >> 8; + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 2: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 3: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$c$ + 1 & 255; + 0 === $JSCompiler_StaticMethods_interpret$self$$.$c$ && ($JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$b$ + 1 & 255); + break; + case 4: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 5: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 6: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 7: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$a$ >> 7; + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$a$ << 1 & 255 | $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 236 | $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + break; + case 8: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$Y$; + $JSCompiler_StaticMethods_interpret$self$$.$Y$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$g$; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$da$; + $JSCompiler_StaticMethods_interpret$self$$.$da$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + break; + case 9: + $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 10: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 11: + $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$); + break; + case 12: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 13: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 14: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 15: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$a$ & 1; + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$a$ >> 1 | $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ << 7; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 236 | $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + break; + case 16: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$b$ - 1 & 255; + $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 17: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ >> 8; + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 18: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 19: + $JSCompiler_StaticMethods_incDE$$($JSCompiler_StaticMethods_interpret$self$$); + break; + case 20: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 21: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 22: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 23: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$a$ >> 7; + $JSCompiler_StaticMethods_interpret$self$$.$a$ = ($JSCompiler_StaticMethods_interpret$self$$.$a$ << 1 | $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1) & 255; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 236 | $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + break; + case 24: + $JSCompiler_StaticMethods_interpret$self$$.$f$ += $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$) + 1); + break; + case 25: + $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 26: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 27: + $JSCompiler_StaticMethods_decDE$$($JSCompiler_StaticMethods_interpret$self$$); + break; + case 28: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 29: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 30: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 31: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$a$ & 1; + $JSCompiler_StaticMethods_interpret$self$$.$a$ = ($JSCompiler_StaticMethods_interpret$self$$.$a$ >> 1 | ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1) << 7) & 255; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 236 | $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + break; + case 32: + $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64)); + break; + case 33: + $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 34: + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++), $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 35: + $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$); + break; + case 36: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 37: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 38: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 39: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$ga$[$JSCompiler_StaticMethods_interpret$self$$.$a$ | ($JSCompiler_StaticMethods_interpret$self$$.$g$ & + 1) << 8 | ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 2) << 8 | ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 16) << 6]; + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 2 | $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ >> 8; + break; + case 40: + $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64)); + break; + case 41: + $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 42: + $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 43: + $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$); + break; + case 44: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 45: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 46: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 47: + $JSCompiler_StaticMethods_interpret$self$$.$a$ ^= 255; + $JSCompiler_StaticMethods_interpret$self$$.$g$ |= 18; + break; + case 48: + $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1)); + break; + case 49: + $JSCompiler_StaticMethods_interpret$self$$.$n$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 50: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++), $JSCompiler_StaticMethods_interpret$self$$.$a$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 51: + $JSCompiler_StaticMethods_interpret$self$$.$n$++; + break; + case 52: + $JSCompiler_StaticMethods_incMem$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 53: + $JSCompiler_StaticMethods_decMem$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 54: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + break; + case 55: + $JSCompiler_StaticMethods_interpret$self$$.$g$ |= 1; + $JSCompiler_StaticMethods_interpret$self$$.$g$ &= -3; + $JSCompiler_StaticMethods_interpret$self$$.$g$ &= -17; + break; + case 56: + $JSCompiler_StaticMethods_jr$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1)); + break; + case 57: + $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$n$)); + break; + case 58: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 59: + $JSCompiler_StaticMethods_interpret$self$$.$n$--; + break; + case 60: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 61: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 62: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 63: + 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1) ? ($JSCompiler_StaticMethods_interpret$self$$.$g$ &= -2, $JSCompiler_StaticMethods_interpret$self$$.$g$ |= 16) : ($JSCompiler_StaticMethods_interpret$self$$.$g$ |= 1, $JSCompiler_StaticMethods_interpret$self$$.$g$ &= -17); + $JSCompiler_StaticMethods_interpret$self$$.$g$ &= -3; + break; + case 65: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 66: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 67: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 68: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$h$; + break; + case 69: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$l$; + break; + case 70: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 71: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 72: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 74: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 75: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 76: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$h$; + break; + case 77: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$l$; + break; + case 78: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 79: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 80: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 81: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 83: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 84: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$h$; + break; + case 85: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$l$; + break; + case 86: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 87: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 88: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 89: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 90: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 92: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$h$; + break; + case 93: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$l$; + break; + case 94: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 95: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 96: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 97: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 98: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 99: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 101: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$l$; + break; + case 102: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 103: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 104: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 105: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 106: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 107: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 108: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$h$; + break; + case 110: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 111: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 112: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 113: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 114: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 115: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 116: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 117: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 118: + $JSCompiler_StaticMethods_interpret$self$$.$o$ = 0; + $JSCompiler_StaticMethods_interpret$self$$.$Q$ = !0; + $JSCompiler_StaticMethods_interpret$self$$.$f$--; + break; + case 119: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 120: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 121: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 122: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 123: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 124: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$h$; + break; + case 125: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$l$; + break; + case 126: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 128: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 129: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 130: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 131: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 132: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 133: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 134: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 135: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 136: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 137: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 138: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 139: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 140: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 141: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 142: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 143: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 144: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 145: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 146: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 147: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 148: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 149: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 150: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 151: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 152: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 153: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 154: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 155: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 156: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 157: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 158: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 159: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 160: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$b$] | 16; + break; + case 161: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$c$] | 16; + break; + case 162: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$d$] | 16; + break; + case 163: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$e$] | 16; + break; + case 164: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$h$] | 16; + break; + case 165: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$l$] | 16; + break; + case 166: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))] | 16; + break; + case 167: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$] | 16; + break; + case 168: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$b$]; + break; + case 169: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$c$]; + break; + case 170: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$d$]; + break; + case 171: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$e$]; + break; + case 172: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$h$]; + break; + case 173: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$l$]; + break; + case 174: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))]; + break; + case 175: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ = 0]; + break; + case 176: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$b$]; + break; + case 177: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$c$]; + break; + case 178: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$d$]; + break; + case 179: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$e$]; + break; + case 180: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$h$]; + break; + case 181: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$l$]; + break; + case 182: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))]; + break; + case 183: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$]; + break; + case 184: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 185: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 186: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 187: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 188: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 189: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 190: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 191: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 192: + $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64)); + break; + case 193: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ >> 8; + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$n$ += 2; + break; + case 194: + $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64)); + break; + case 195: + $JSCompiler_StaticMethods_interpret$self$$.$f$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$); + break; + case 196: + $JSCompiler_StaticMethods_interpret$self$$.call(0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64)); + break; + case 197: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 198: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + break; + case 199: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$f$); + $JSCompiler_StaticMethods_interpret$self$$.$f$ = 0; + break; + case 200: + $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64)); + break; + case 201: + $JSCompiler_StaticMethods_interpret$self$$.$f$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$); + $JSCompiler_StaticMethods_interpret$self$$.$n$ += 2; + break; + case 202: + $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64)); + break; + case 203: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + $JSCompiler_StaticMethods_interpret$self$$.$o$ -= $OP_CB_STATES$$[$carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$]; + switch($carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$) { + case 0: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 1: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 2: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 3: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 4: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 5: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 6: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)))); + break; + case 7: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_rlc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 8: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 9: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 10: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 11: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 12: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 13: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 14: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)))); + break; + case 15: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_rrc$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 16: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 17: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 18: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 19: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 20: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 21: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 22: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)))); + break; + case 23: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_rl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 24: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 25: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 26: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 27: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 28: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 29: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 30: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)))); + break; + case 31: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_rr$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 32: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 33: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 34: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 35: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 36: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 37: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 38: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)))); + break; + case 39: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_sla$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 40: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 41: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 42: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 43: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 44: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 45: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 46: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)))); + break; + case 47: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_sra$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 48: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 49: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 50: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 51: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 52: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 53: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 54: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)))); + break; + case 55: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_sll$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 56: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + break; + case 57: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + break; + case 58: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + break; + case 59: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + break; + case 60: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + break; + case 61: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + break; + case 62: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)))); + break; + case 63: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_srl$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 64: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$ & 1); + break; + case 65: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$ & 1); + break; + case 66: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$ & 1); + break; + case 67: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$ & 1); + break; + case 68: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$ & 1); + break; + case 69: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$ & 1); + break; + case 70: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & 1); + break; + case 71: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$ & 1); + break; + case 72: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$ & 2); + break; + case 73: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$ & 2); + break; + case 74: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$ & 2); + break; + case 75: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$ & 2); + break; + case 76: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$ & 2); + break; + case 77: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$ & 2); + break; + case 78: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & 2); + break; + case 79: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$ & 2); + break; + case 80: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$ & 4); + break; + case 81: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$ & 4); + break; + case 82: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$ & 4); + break; + case 83: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$ & 4); + break; + case 84: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$ & 4); + break; + case 85: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$ & 4); + break; + case 86: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & 4); + break; + case 87: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$ & 4); + break; + case 88: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$ & 8); + break; + case 89: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$ & 8); + break; + case 90: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$ & 8); + break; + case 91: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$ & 8); + break; + case 92: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$ & 8); + break; + case 93: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$ & 8); + break; + case 94: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & 8); + break; + case 95: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$ & 8); + break; + case 96: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$ & 16); + break; + case 97: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$ & 16); + break; + case 98: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$ & 16); + break; + case 99: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$ & 16); + break; + case 100: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$ & 16); + break; + case 101: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$ & 16); + break; + case 102: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & 16); + break; + case 103: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$ & 16); + break; + case 104: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$ & 32); + break; + case 105: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$ & 32); + break; + case 106: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$ & 32); + break; + case 107: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$ & 32); + break; + case 108: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$ & 32); + break; + case 109: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$ & 32); + break; + case 110: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & 32); + break; + case 111: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$ & 32); + break; + case 112: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$ & 64); + break; + case 113: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$ & 64); + break; + case 114: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$ & 64); + break; + case 115: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$ & 64); + break; + case 116: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$ & 64); + break; + case 117: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$ & 64); + break; + case 118: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & 64); + break; + case 119: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$ & 64); + break; + case 120: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$ & 128); + break; + case 121: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$c$ & 128); + break; + case 122: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$d$ & 128); + break; + case 123: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$e$ & 128); + break; + case 124: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$h$ & 128); + break; + case 125: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$l$ & 128); + break; + case 126: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & 128); + break; + case 127: + $JSCompiler_StaticMethods_bit$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$a$ & 128); + break; + case 128: + $JSCompiler_StaticMethods_interpret$self$$.$b$ &= -2; + break; + case 129: + $JSCompiler_StaticMethods_interpret$self$$.$c$ &= -2; + break; + case 130: + $JSCompiler_StaticMethods_interpret$self$$.$d$ &= -2; + break; + case 131: + $JSCompiler_StaticMethods_interpret$self$$.$e$ &= -2; + break; + case 132: + $JSCompiler_StaticMethods_interpret$self$$.$h$ &= -2; + break; + case 133: + $JSCompiler_StaticMethods_interpret$self$$.$l$ &= -2; + break; + case 134: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & -2); + break; + case 135: + $JSCompiler_StaticMethods_interpret$self$$.$a$ &= -2; + break; + case 136: + $JSCompiler_StaticMethods_interpret$self$$.$b$ &= -3; + break; + case 137: + $JSCompiler_StaticMethods_interpret$self$$.$c$ &= -3; + break; + case 138: + $JSCompiler_StaticMethods_interpret$self$$.$d$ &= -3; + break; + case 139: + $JSCompiler_StaticMethods_interpret$self$$.$e$ &= -3; + break; + case 140: + $JSCompiler_StaticMethods_interpret$self$$.$h$ &= -3; + break; + case 141: + $JSCompiler_StaticMethods_interpret$self$$.$l$ &= -3; + break; + case 142: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & -3); + break; + case 143: + $JSCompiler_StaticMethods_interpret$self$$.$a$ &= -3; + break; + case 144: + $JSCompiler_StaticMethods_interpret$self$$.$b$ &= -5; + break; + case 145: + $JSCompiler_StaticMethods_interpret$self$$.$c$ &= -5; + break; + case 146: + $JSCompiler_StaticMethods_interpret$self$$.$d$ &= -5; + break; + case 147: + $JSCompiler_StaticMethods_interpret$self$$.$e$ &= -5; + break; + case 148: + $JSCompiler_StaticMethods_interpret$self$$.$h$ &= -5; + break; + case 149: + $JSCompiler_StaticMethods_interpret$self$$.$l$ &= -5; + break; + case 150: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & -5); + break; + case 151: + $JSCompiler_StaticMethods_interpret$self$$.$a$ &= -5; + break; + case 152: + $JSCompiler_StaticMethods_interpret$self$$.$b$ &= -9; + break; + case 153: + $JSCompiler_StaticMethods_interpret$self$$.$c$ &= -9; + break; + case 154: + $JSCompiler_StaticMethods_interpret$self$$.$d$ &= -9; + break; + case 155: + $JSCompiler_StaticMethods_interpret$self$$.$e$ &= -9; + break; + case 156: + $JSCompiler_StaticMethods_interpret$self$$.$h$ &= -9; + break; + case 157: + $JSCompiler_StaticMethods_interpret$self$$.$l$ &= -9; + break; + case 158: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & -9); + break; + case 159: + $JSCompiler_StaticMethods_interpret$self$$.$a$ &= -9; + break; + case 160: + $JSCompiler_StaticMethods_interpret$self$$.$b$ &= -17; + break; + case 161: + $JSCompiler_StaticMethods_interpret$self$$.$c$ &= -17; + break; + case 162: + $JSCompiler_StaticMethods_interpret$self$$.$d$ &= -17; + break; + case 163: + $JSCompiler_StaticMethods_interpret$self$$.$e$ &= -17; + break; + case 164: + $JSCompiler_StaticMethods_interpret$self$$.$h$ &= -17; + break; + case 165: + $JSCompiler_StaticMethods_interpret$self$$.$l$ &= -17; + break; + case 166: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & -17); + break; + case 167: + $JSCompiler_StaticMethods_interpret$self$$.$a$ &= -17; + break; + case 168: + $JSCompiler_StaticMethods_interpret$self$$.$b$ &= -33; + break; + case 169: + $JSCompiler_StaticMethods_interpret$self$$.$c$ &= -33; + break; + case 170: + $JSCompiler_StaticMethods_interpret$self$$.$d$ &= -33; + break; + case 171: + $JSCompiler_StaticMethods_interpret$self$$.$e$ &= -33; + break; + case 172: + $JSCompiler_StaticMethods_interpret$self$$.$h$ &= -33; + break; + case 173: + $JSCompiler_StaticMethods_interpret$self$$.$l$ &= -33; + break; + case 174: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & -33); + break; + case 175: + $JSCompiler_StaticMethods_interpret$self$$.$a$ &= -33; + break; + case 176: + $JSCompiler_StaticMethods_interpret$self$$.$b$ &= -65; + break; + case 177: + $JSCompiler_StaticMethods_interpret$self$$.$c$ &= -65; + break; + case 178: + $JSCompiler_StaticMethods_interpret$self$$.$d$ &= -65; + break; + case 179: + $JSCompiler_StaticMethods_interpret$self$$.$e$ &= -65; + break; + case 180: + $JSCompiler_StaticMethods_interpret$self$$.$h$ &= -65; + break; + case 181: + $JSCompiler_StaticMethods_interpret$self$$.$l$ &= -65; + break; + case 182: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & -65); + break; + case 183: + $JSCompiler_StaticMethods_interpret$self$$.$a$ &= -65; + break; + case 184: + $JSCompiler_StaticMethods_interpret$self$$.$b$ &= -129; + break; + case 185: + $JSCompiler_StaticMethods_interpret$self$$.$c$ &= -129; + break; + case 186: + $JSCompiler_StaticMethods_interpret$self$$.$d$ &= -129; + break; + case 187: + $JSCompiler_StaticMethods_interpret$self$$.$e$ &= -129; + break; + case 188: + $JSCompiler_StaticMethods_interpret$self$$.$h$ &= -129; + break; + case 189: + $JSCompiler_StaticMethods_interpret$self$$.$l$ &= -129; + break; + case 190: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) & -129); + break; + case 191: + $JSCompiler_StaticMethods_interpret$self$$.$a$ &= -129; + break; + case 192: + $JSCompiler_StaticMethods_interpret$self$$.$b$ |= 1; + break; + case 193: + $JSCompiler_StaticMethods_interpret$self$$.$c$ |= 1; + break; + case 194: + $JSCompiler_StaticMethods_interpret$self$$.$d$ |= 1; + break; + case 195: + $JSCompiler_StaticMethods_interpret$self$$.$e$ |= 1; + break; + case 196: + $JSCompiler_StaticMethods_interpret$self$$.$h$ |= 1; + break; + case 197: + $JSCompiler_StaticMethods_interpret$self$$.$l$ |= 1; + break; + case 198: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) | 1); + break; + case 199: + $JSCompiler_StaticMethods_interpret$self$$.$a$ |= 1; + break; + case 200: + $JSCompiler_StaticMethods_interpret$self$$.$b$ |= 2; + break; + case 201: + $JSCompiler_StaticMethods_interpret$self$$.$c$ |= 2; + break; + case 202: + $JSCompiler_StaticMethods_interpret$self$$.$d$ |= 2; + break; + case 203: + $JSCompiler_StaticMethods_interpret$self$$.$e$ |= 2; + break; + case 204: + $JSCompiler_StaticMethods_interpret$self$$.$h$ |= 2; + break; + case 205: + $JSCompiler_StaticMethods_interpret$self$$.$l$ |= 2; + break; + case 206: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) | 2); + break; + case 207: + $JSCompiler_StaticMethods_interpret$self$$.$a$ |= 2; + break; + case 208: + $JSCompiler_StaticMethods_interpret$self$$.$b$ |= 4; + break; + case 209: + $JSCompiler_StaticMethods_interpret$self$$.$c$ |= 4; + break; + case 210: + $JSCompiler_StaticMethods_interpret$self$$.$d$ |= 4; + break; + case 211: + $JSCompiler_StaticMethods_interpret$self$$.$e$ |= 4; + break; + case 212: + $JSCompiler_StaticMethods_interpret$self$$.$h$ |= 4; + break; + case 213: + $JSCompiler_StaticMethods_interpret$self$$.$l$ |= 4; + break; + case 214: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) | 4); + break; + case 215: + $JSCompiler_StaticMethods_interpret$self$$.$a$ |= 4; + break; + case 216: + $JSCompiler_StaticMethods_interpret$self$$.$b$ |= 8; + break; + case 217: + $JSCompiler_StaticMethods_interpret$self$$.$c$ |= 8; + break; + case 218: + $JSCompiler_StaticMethods_interpret$self$$.$d$ |= 8; + break; + case 219: + $JSCompiler_StaticMethods_interpret$self$$.$e$ |= 8; + break; + case 220: + $JSCompiler_StaticMethods_interpret$self$$.$h$ |= 8; + break; + case 221: + $JSCompiler_StaticMethods_interpret$self$$.$l$ |= 8; + break; + case 222: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) | 8); + break; + case 223: + $JSCompiler_StaticMethods_interpret$self$$.$a$ |= 8; + break; + case 224: + $JSCompiler_StaticMethods_interpret$self$$.$b$ |= 16; + break; + case 225: + $JSCompiler_StaticMethods_interpret$self$$.$c$ |= 16; + break; + case 226: + $JSCompiler_StaticMethods_interpret$self$$.$d$ |= 16; + break; + case 227: + $JSCompiler_StaticMethods_interpret$self$$.$e$ |= 16; + break; + case 228: + $JSCompiler_StaticMethods_interpret$self$$.$h$ |= 16; + break; + case 229: + $JSCompiler_StaticMethods_interpret$self$$.$l$ |= 16; + break; + case 230: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) | 16); + break; + case 231: + $JSCompiler_StaticMethods_interpret$self$$.$a$ |= 16; + break; + case 232: + $JSCompiler_StaticMethods_interpret$self$$.$b$ |= 32; + break; + case 233: + $JSCompiler_StaticMethods_interpret$self$$.$c$ |= 32; + break; + case 234: + $JSCompiler_StaticMethods_interpret$self$$.$d$ |= 32; + break; + case 235: + $JSCompiler_StaticMethods_interpret$self$$.$e$ |= 32; + break; + case 236: + $JSCompiler_StaticMethods_interpret$self$$.$h$ |= 32; + break; + case 237: + $JSCompiler_StaticMethods_interpret$self$$.$l$ |= 32; + break; + case 238: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) | 32); + break; + case 239: + $JSCompiler_StaticMethods_interpret$self$$.$a$ |= 32; + break; + case 240: + $JSCompiler_StaticMethods_interpret$self$$.$b$ |= 64; + break; + case 241: + $JSCompiler_StaticMethods_interpret$self$$.$c$ |= 64; + break; + case 242: + $JSCompiler_StaticMethods_interpret$self$$.$d$ |= 64; + break; + case 243: + $JSCompiler_StaticMethods_interpret$self$$.$e$ |= 64; + break; + case 244: + $JSCompiler_StaticMethods_interpret$self$$.$h$ |= 64; + break; + case 245: + $JSCompiler_StaticMethods_interpret$self$$.$l$ |= 64; + break; + case 246: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) | 64); + break; + case 247: + $JSCompiler_StaticMethods_interpret$self$$.$a$ |= 64; + break; + case 248: + $JSCompiler_StaticMethods_interpret$self$$.$b$ |= 128; + break; + case 249: + $JSCompiler_StaticMethods_interpret$self$$.$c$ |= 128; + break; + case 250: + $JSCompiler_StaticMethods_interpret$self$$.$d$ |= 128; + break; + case 251: + $JSCompiler_StaticMethods_interpret$self$$.$e$ |= 128; + break; + case 252: + $JSCompiler_StaticMethods_interpret$self$$.$h$ |= 128; + break; + case 253: + $JSCompiler_StaticMethods_interpret$self$$.$l$ |= 128; + break; + case 254: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)) | 128); + break; + case 255: + $JSCompiler_StaticMethods_interpret$self$$.$a$ |= 128; + break; + default: + $JSSMS$Utils$console$log$$("Unimplemented CB Opcode: " + $JSSMS$Utils$toHex$$($carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$)); + } + break; + case 204: + $JSCompiler_StaticMethods_interpret$self$$.call(0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64)); + break; + case 205: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$f$ + 2); + $JSCompiler_StaticMethods_interpret$self$$.$f$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$); + break; + case 206: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + break; + case 207: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$f$); + $JSCompiler_StaticMethods_interpret$self$$.$f$ = 8; + break; + case 208: + $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1)); + break; + case 209: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$); + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ >> 8; + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$n$ += 2; + break; + case 210: + $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1)); + break; + case 211: + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++), $JSCompiler_StaticMethods_interpret$self$$.$a$); + break; + case 212: + $JSCompiler_StaticMethods_interpret$self$$.call(0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1)); + break; + case 213: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 214: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + break; + case 215: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$f$); + $JSCompiler_StaticMethods_interpret$self$$.$f$ = 16; + break; + case 216: + $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1)); + break; + case 217: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$Z$; + $JSCompiler_StaticMethods_interpret$self$$.$Z$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$aa$; + $JSCompiler_StaticMethods_interpret$self$$.$aa$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$ba$; + $JSCompiler_StaticMethods_interpret$self$$.$ba$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$ca$; + $JSCompiler_StaticMethods_interpret$self$$.$ca$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$h$; + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$ea$; + $JSCompiler_StaticMethods_interpret$self$$.$ea$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$l$; + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$fa$; + $JSCompiler_StaticMethods_interpret$self$$.$fa$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + break; + case 218: + $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1)); + break; + case 219: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + break; + case 220: + $JSCompiler_StaticMethods_interpret$self$$.call(0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 1)); + break; + case 221: + var $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++), $temp$$inline_125_temp$$inline_129$$ = + 0; + $JSCompiler_StaticMethods_interpret$self$$.$o$ -= $OP_DD_STATES$$[$carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$]; + switch($carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$) { + case 9: + $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 25: + $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 33: + $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 34: + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++), $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 35: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_interpret$self$$.$q$ + 1 & 255; + 0 === $JSCompiler_StaticMethods_interpret$self$$.$q$ && ($JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_interpret$self$$.$t$ + 1 & 255); + break; + case 36: + $JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$t$); + break; + case 37: + $JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$t$); + break; + case 38: + $JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 41: + $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 42: + $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 43: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_interpret$self$$.$q$ - 1 & 255; + 255 == $JSCompiler_StaticMethods_interpret$self$$.$q$ && ($JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_interpret$self$$.$t$ - 1 & 255); + break; + case 44: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$q$); + break; + case 45: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$q$); + break; + case 46: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 52: + $JSCompiler_StaticMethods_incMem$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 53: + $JSCompiler_StaticMethods_decMem$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 54: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$(++$JSCompiler_StaticMethods_interpret$self$$.$f$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 57: + $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$n$)); + break; + case 68: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$t$; + break; + case 69: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$q$; + break; + case 70: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 76: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$t$; + break; + case 77: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$q$; + break; + case 78: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 84: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$t$; + break; + case 85: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$q$; + break; + case 86: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 92: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$t$; + break; + case 93: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$q$; + break; + case 94: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 96: + $JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 97: + $JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 98: + $JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 99: + $JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 100: + break; + case 101: + $JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_interpret$self$$.$q$; + break; + case 102: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 103: + $JSCompiler_StaticMethods_interpret$self$$.$t$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 104: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 105: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 106: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 107: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 108: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_interpret$self$$.$t$; + break; + case 109: + break; + case 110: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 111: + $JSCompiler_StaticMethods_interpret$self$$.$q$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 112: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 113: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 114: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$d$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 115: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$e$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 116: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$h$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 117: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$l$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 119: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$a$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 124: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$t$; + break; + case 125: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$q$; + break; + case 126: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 132: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$t$); + break; + case 133: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$q$); + break; + case 134: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 140: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$t$); + break; + case 141: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$q$); + break; + case 142: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 148: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$t$); + break; + case 149: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$q$); + break; + case 150: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 156: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$t$); + break; + case 157: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$q$); + break; + case 158: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 164: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$t$] | 16; + break; + case 165: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$q$] | 16; + break; + case 166: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))] | 16; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 172: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$t$]; + break; + case 173: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$q$]; + break; + case 174: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 180: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$t$]; + break; + case 181: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$q$]; + break; + case 182: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 188: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$t$); + break; + case 189: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$q$); + break; + case 190: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 203: + $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 225: + $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$)); + $JSCompiler_StaticMethods_interpret$self$$.$n$ += 2; + break; + case 227: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_setIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$)); + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$n$, $temp$$inline_125_temp$$inline_129$$); + break; + case 229: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 233: + $JSCompiler_StaticMethods_interpret$self$$.$f$ = $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$); + break; + case 249: + $JSCompiler_StaticMethods_interpret$self$$.$n$ = $JSCompiler_StaticMethods_getIXHIXL$$($JSCompiler_StaticMethods_interpret$self$$); + break; + default: + $JSSMS$Utils$console$log$$("Unimplemented DD/FD Opcode: " + $JSSMS$Utils$toHex$$($carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$)), $JSCompiler_StaticMethods_interpret$self$$.$f$--; + } + break; + case 222: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + break; + case 223: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$f$); + $JSCompiler_StaticMethods_interpret$self$$.$f$ = 24; + break; + case 224: + $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 4)); + break; + case 225: + $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$)); + $JSCompiler_StaticMethods_interpret$self$$.$n$ += 2; + break; + case 226: + $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 4)); + break; + case 227: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$)); + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$n$, $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$); + break; + case 228: + $JSCompiler_StaticMethods_interpret$self$$.call(0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 4)); + break; + case 229: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 230: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)] | 16; + break; + case 231: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$f$); + $JSCompiler_StaticMethods_interpret$self$$.$f$ = 32; + break; + case 232: + $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 4)); + break; + case 233: + $JSCompiler_StaticMethods_interpret$self$$.$f$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$); + break; + case 234: + $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 4)); + break; + case 235: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$h$; + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$l$; + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$; + break; + case 236: + $JSCompiler_StaticMethods_interpret$self$$.call(0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 4)); + break; + case 237: + var $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$), $location$$inline_130$$ = + $temp$$inline_125_temp$$inline_129$$ = 0; + $JSCompiler_StaticMethods_interpret$self$$.$o$ -= $OP_ED_STATES$$[$carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$]; + switch($carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$) { + case 64: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$b$]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 65: + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 66: + $JSCompiler_StaticMethods_sbc16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 67: + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$p$(++$JSCompiler_StaticMethods_interpret$self$$.$f$), $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$ += 2; + break; + case 68: + ; + case 76: + ; + case 84: + ; + case 92: + ; + case 100: + ; + case 108: + ; + case 116: + ; + case 124: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + $JSCompiler_StaticMethods_interpret$self$$.$a$ = 0; + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 69: + ; + case 77: + ; + case 85: + ; + case 93: + ; + case 101: + ; + case 109: + ; + case 117: + ; + case 125: + $JSCompiler_StaticMethods_interpret$self$$.$f$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$); + $JSCompiler_StaticMethods_interpret$self$$.$n$ += 2; + $JSCompiler_StaticMethods_interpret$self$$.$K$ = $JSCompiler_StaticMethods_interpret$self$$.$M$; + break; + case 70: + ; + case 78: + ; + case 102: + ; + case 110: + $JSCompiler_StaticMethods_interpret$self$$.$T$ = 0; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 71: + $JSCompiler_StaticMethods_interpret$self$$.$W$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 72: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$c$]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 73: + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 74: + $JSCompiler_StaticMethods_adc16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 75: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$p$(++$JSCompiler_StaticMethods_interpret$self$$.$f$)); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ >> 8; + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$f$ += 2; + break; + case 79: + $JSCompiler_StaticMethods_interpret$self$$.$r$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 80: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$d$]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 81: + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $JSCompiler_StaticMethods_interpret$self$$.$d$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 82: + $JSCompiler_StaticMethods_sbc16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 83: + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$p$(++$JSCompiler_StaticMethods_interpret$self$$.$f$), $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$ += 2; + break; + case 86: + ; + case 118: + $JSCompiler_StaticMethods_interpret$self$$.$T$ = 1; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 87: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$W$; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$X$[$JSCompiler_StaticMethods_interpret$self$$.$a$] | ($JSCompiler_StaticMethods_interpret$self$$.$M$ ? 4 : 0); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 88: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$e$]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 89: + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $JSCompiler_StaticMethods_interpret$self$$.$e$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 90: + $JSCompiler_StaticMethods_adc16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 91: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$p$(++$JSCompiler_StaticMethods_interpret$self$$.$f$)); + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ >> 8; + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$f$ += 2; + break; + case 95: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = Math.round(255 * Math.random()); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$X$[$JSCompiler_StaticMethods_interpret$self$$.$a$] | ($JSCompiler_StaticMethods_interpret$self$$.$M$ ? 4 : 0); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 96: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$h$]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 97: + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $JSCompiler_StaticMethods_interpret$self$$.$h$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 98: + $JSCompiler_StaticMethods_sbc16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 99: + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$p$(++$JSCompiler_StaticMethods_interpret$self$$.$f$), $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$ += 2; + break; + case 103: + $location$$inline_130$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($location$$inline_130$$); + $JSCompiler_StaticMethods_interpret$self$$.$j$($location$$inline_130$$, $temp$$inline_125_temp$$inline_129$$ >> 4 | ($JSCompiler_StaticMethods_interpret$self$$.$a$ & 15) << 4); + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$a$ & 240 | $temp$$inline_125_temp$$inline_129$$ & 15; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 104: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$l$]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 105: + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $JSCompiler_StaticMethods_interpret$self$$.$l$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 106: + $JSCompiler_StaticMethods_adc16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 107: + $JSCompiler_StaticMethods_setHL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$p$(++$JSCompiler_StaticMethods_interpret$self$$.$f$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$ += 2; + break; + case 111: + $location$$inline_130$$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($location$$inline_130$$); + $JSCompiler_StaticMethods_interpret$self$$.$j$($location$$inline_130$$, ($temp$$inline_125_temp$$inline_129$$ & 15) << 4 | $JSCompiler_StaticMethods_interpret$self$$.$a$ & 15); + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$a$ & 240 | $temp$$inline_125_temp$$inline_129$$ >> 4; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 113: + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, 0); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 114: + $JSCompiler_StaticMethods_sbc16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$n$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 115: + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$p$(++$JSCompiler_StaticMethods_interpret$self$$.$f$), $JSCompiler_StaticMethods_interpret$self$$.$n$); + $JSCompiler_StaticMethods_interpret$self$$.$f$ += 2; + break; + case 120: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 121: + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $JSCompiler_StaticMethods_interpret$self$$.$a$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 122: + $JSCompiler_StaticMethods_adc16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$n$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 123: + $JSCompiler_StaticMethods_interpret$self$$.$n$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$p$(++$JSCompiler_StaticMethods_interpret$self$$.$f$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$ += 2; + break; + case 160: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$), $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_incDE$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ = $temp$$inline_125_temp$$inline_129$$ + $JSCompiler_StaticMethods_interpret$self$$.$a$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 193 | ($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? 4 : 0) | $temp$$inline_125_temp$$inline_129$$ & 8 | ($temp$$inline_125_temp$$inline_129$$ & 2 ? 32 : 0); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 161: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | 2; + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ |= 0 === $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? 0 : 4; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 248 | $temp$$inline_125_temp$$inline_129$$; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 162: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = 128 === ($temp$$inline_125_temp$$inline_129$$ & 128) ? $JSCompiler_StaticMethods_interpret$self$$.$g$ | 2 : $JSCompiler_StaticMethods_interpret$self$$.$g$ & -3; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 163: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$); + 255 < $JSCompiler_StaticMethods_interpret$self$$.$l$ + $temp$$inline_125_temp$$inline_129$$ ? ($JSCompiler_StaticMethods_interpret$self$$.$g$ |= 1, $JSCompiler_StaticMethods_interpret$self$$.$g$ |= 16) : ($JSCompiler_StaticMethods_interpret$self$$.$g$ &= -2, $JSCompiler_StaticMethods_interpret$self$$.$g$ &= -17); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = 128 === ($temp$$inline_125_temp$$inline_129$$ & 128) ? $JSCompiler_StaticMethods_interpret$self$$.$g$ | 2 : $JSCompiler_StaticMethods_interpret$self$$.$g$ & -3; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 168: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$), $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_decDE$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ = $temp$$inline_125_temp$$inline_129$$ + $JSCompiler_StaticMethods_interpret$self$$.$a$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 193 | ($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? 4 : 0) | $temp$$inline_125_temp$$inline_129$$ & 8 | ($temp$$inline_125_temp$$inline_129$$ & 2 ? 32 : 0); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 169: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | 2; + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ |= 0 === $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? 0 : 4; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 248 | $temp$$inline_125_temp$$inline_129$$; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 170: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = 0 !== ($temp$$inline_125_temp$$inline_129$$ & 128) ? $JSCompiler_StaticMethods_interpret$self$$.$g$ | 2 : $JSCompiler_StaticMethods_interpret$self$$.$g$ & -3; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 171: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$); + 255 < $JSCompiler_StaticMethods_interpret$self$$.$l$ + $temp$$inline_125_temp$$inline_129$$ ? ($JSCompiler_StaticMethods_interpret$self$$.$g$ |= 1, $JSCompiler_StaticMethods_interpret$self$$.$g$ |= 16) : ($JSCompiler_StaticMethods_interpret$self$$.$g$ &= -2, $JSCompiler_StaticMethods_interpret$self$$.$g$ &= -17); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = 128 === ($temp$$inline_125_temp$$inline_129$$ & 128) ? $JSCompiler_StaticMethods_interpret$self$$.$g$ | 2 : $JSCompiler_StaticMethods_interpret$self$$.$g$ & -3; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 176: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$), $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_incDE$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ = $temp$$inline_125_temp$$inline_129$$ + $JSCompiler_StaticMethods_interpret$self$$.$a$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 193 | ($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? 4 : 0) | $temp$$inline_125_temp$$inline_129$$ & 8 | ($temp$$inline_125_temp$$inline_129$$ & 2 ? 32 : 0); + 0 !== $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? ($JSCompiler_StaticMethods_interpret$self$$.$o$ -= 5, $JSCompiler_StaticMethods_interpret$self$$.$f$--) : $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 177: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | 2; + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ |= 0 === $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? 0 : 4; + 0 !== ($temp$$inline_125_temp$$inline_129$$ & 4) && 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64) ? ($JSCompiler_StaticMethods_interpret$self$$.$o$ -= 5, $JSCompiler_StaticMethods_interpret$self$$.$f$--) : $JSCompiler_StaticMethods_interpret$self$$.$f$++; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 248 | $temp$$inline_125_temp$$inline_129$$; + break; + case 178: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$); + 0 !== $JSCompiler_StaticMethods_interpret$self$$.$b$ ? ($JSCompiler_StaticMethods_interpret$self$$.$o$ -= 5, $JSCompiler_StaticMethods_interpret$self$$.$f$--) : $JSCompiler_StaticMethods_interpret$self$$.$f$++; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = 128 === ($temp$$inline_125_temp$$inline_129$$ & 128) ? $JSCompiler_StaticMethods_interpret$self$$.$g$ | 2 : $JSCompiler_StaticMethods_interpret$self$$.$g$ & -3; + break; + case 179: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_incHL$$($JSCompiler_StaticMethods_interpret$self$$); + 0 !== $JSCompiler_StaticMethods_interpret$self$$.$b$ ? ($JSCompiler_StaticMethods_interpret$self$$.$o$ -= 5, $JSCompiler_StaticMethods_interpret$self$$.$f$--) : $JSCompiler_StaticMethods_interpret$self$$.$f$++; + 255 < $JSCompiler_StaticMethods_interpret$self$$.$l$ + $temp$$inline_125_temp$$inline_129$$ ? ($JSCompiler_StaticMethods_interpret$self$$.$g$ |= 1, $JSCompiler_StaticMethods_interpret$self$$.$g$ |= 16) : ($JSCompiler_StaticMethods_interpret$self$$.$g$ &= -2, $JSCompiler_StaticMethods_interpret$self$$.$g$ &= -17); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = 0 !== ($temp$$inline_125_temp$$inline_129$$ & 128) ? $JSCompiler_StaticMethods_interpret$self$$.$g$ | 2 : $JSCompiler_StaticMethods_interpret$self$$.$g$ & -3; + break; + case 184: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$), $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_decDE$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ = $temp$$inline_125_temp$$inline_129$$ + $JSCompiler_StaticMethods_interpret$self$$.$a$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 193 | ($JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? 4 : 0) | $temp$$inline_125_temp$$inline_129$$ & 8 | ($temp$$inline_125_temp$$inline_129$$ & 2 ? 32 : 0); + 0 !== $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? ($JSCompiler_StaticMethods_interpret$self$$.$o$ -= 5, $JSCompiler_StaticMethods_interpret$self$$.$f$--) : $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 185: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 1 | 2; + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_decBC$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$); + $temp$$inline_125_temp$$inline_129$$ |= 0 === $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$) ? 0 : 4; + 0 !== ($temp$$inline_125_temp$$inline_129$$ & 4) && 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 64) ? ($JSCompiler_StaticMethods_interpret$self$$.$o$ -= 5, $JSCompiler_StaticMethods_interpret$self$$.$f$--) : $JSCompiler_StaticMethods_interpret$self$$.$f$++; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$g$ & 248 | $temp$$inline_125_temp$$inline_129$$; + break; + case 186: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$), $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$); + 0 !== $JSCompiler_StaticMethods_interpret$self$$.$b$ ? ($JSCompiler_StaticMethods_interpret$self$$.$o$ -= 5, $JSCompiler_StaticMethods_interpret$self$$.$f$--) : $JSCompiler_StaticMethods_interpret$self$$.$f$++; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = 0 !== ($temp$$inline_125_temp$$inline_129$$ & 128) ? $JSCompiler_StaticMethods_interpret$self$$.$g$ | 2 : $JSCompiler_StaticMethods_interpret$self$$.$g$ & -3; + break; + case 187: + $temp$$inline_125_temp$$inline_129$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_interpret$self$$.$w$, $JSCompiler_StaticMethods_interpret$self$$.$c$, $temp$$inline_125_temp$$inline_129$$); + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_decHL$$($JSCompiler_StaticMethods_interpret$self$$); + 0 !== $JSCompiler_StaticMethods_interpret$self$$.$b$ ? ($JSCompiler_StaticMethods_interpret$self$$.$o$ -= 5, $JSCompiler_StaticMethods_interpret$self$$.$f$--) : $JSCompiler_StaticMethods_interpret$self$$.$f$++; + 255 < $JSCompiler_StaticMethods_interpret$self$$.$l$ + $temp$$inline_125_temp$$inline_129$$ ? ($JSCompiler_StaticMethods_interpret$self$$.$g$ |= 1, $JSCompiler_StaticMethods_interpret$self$$.$g$ |= 16) : ($JSCompiler_StaticMethods_interpret$self$$.$g$ &= -2, $JSCompiler_StaticMethods_interpret$self$$.$g$ &= -17); + $JSCompiler_StaticMethods_interpret$self$$.$g$ = 0 !== ($temp$$inline_125_temp$$inline_129$$ & 128) ? $JSCompiler_StaticMethods_interpret$self$$.$g$ | 2 : $JSCompiler_StaticMethods_interpret$self$$.$g$ & -3; + break; + default: + $JSSMS$Utils$console$log$$("Unimplemented ED Opcode: " + $JSSMS$Utils$toHex$$($carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$)), $JSCompiler_StaticMethods_interpret$self$$.$f$++; + } + break; + case 238: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)]; + break; + case 239: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$f$); + $JSCompiler_StaticMethods_interpret$self$$.$f$ = 40; + break; + case 240: + $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 128)); + break; + case 241: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$); + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ >> 8; + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ & 255; + $JSCompiler_StaticMethods_interpret$self$$.$n$ += 2; + break; + case 242: + $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$, 0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 128)); + break; + case 243: + $JSCompiler_StaticMethods_interpret$self$$.$K$ = $JSCompiler_StaticMethods_interpret$self$$.$M$ = !1; + $JSCompiler_StaticMethods_interpret$self$$.$S$ = !0; + break; + case 244: + $JSCompiler_StaticMethods_interpret$self$$.call(0 === ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 128)); + break; + case 245: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$a$ << 8 | $JSCompiler_StaticMethods_interpret$self$$.$g$); + break; + case 246: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)]; + break; + case 247: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$f$); + $JSCompiler_StaticMethods_interpret$self$$.$f$ = 48; + break; + case 248: + $JSCompiler_StaticMethods_ret$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 128)); + break; + case 249: + $JSCompiler_StaticMethods_interpret$self$$.$n$ = $JSCompiler_StaticMethods_getHL$$($JSCompiler_StaticMethods_interpret$self$$); + break; + case 250: + $JSCompiler_StaticMethods_jp$$($JSCompiler_StaticMethods_interpret$self$$, 0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 128)); + break; + case 251: + $JSCompiler_StaticMethods_interpret$self$$.$K$ = $JSCompiler_StaticMethods_interpret$self$$.$M$ = $JSCompiler_StaticMethods_interpret$self$$.$S$ = !0; + break; + case 252: + $JSCompiler_StaticMethods_interpret$self$$.call(0 !== ($JSCompiler_StaticMethods_interpret$self$$.$g$ & 128)); + break; + case 253: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + $JSCompiler_StaticMethods_interpret$self$$.$o$ -= $OP_DD_STATES$$[$carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$]; + switch($carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$) { + case 9: + $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_getBC$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 25: + $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_getDE$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 33: + $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 34: + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++), $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 35: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_interpret$self$$.$s$ + 1 & 255; + 0 === $JSCompiler_StaticMethods_interpret$self$$.$s$ && ($JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_interpret$self$$.$v$ + 1 & 255); + break; + case 36: + $JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$v$); + break; + case 37: + $JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$v$); + break; + case 38: + $JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 41: + $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$))); + break; + case 42: + $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$f$++))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 43: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_interpret$self$$.$s$ - 1 & 255; + 255 == $JSCompiler_StaticMethods_interpret$self$$.$s$ && ($JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_interpret$self$$.$v$ - 1 & 255); + break; + case 44: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_inc8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$s$); + break; + case 45: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_dec8$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$s$); + break; + case 46: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++); + break; + case 52: + $JSCompiler_StaticMethods_incMem$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 53: + $JSCompiler_StaticMethods_decMem$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 54: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$i$(++$JSCompiler_StaticMethods_interpret$self$$.$f$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 57: + $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_add16$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$n$)); + break; + case 68: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$v$; + break; + case 69: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$s$; + break; + case 70: + $JSCompiler_StaticMethods_interpret$self$$.$b$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 76: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$v$; + break; + case 77: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$s$; + break; + case 78: + $JSCompiler_StaticMethods_interpret$self$$.$c$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 84: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$v$; + break; + case 85: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$s$; + break; + case 86: + $JSCompiler_StaticMethods_interpret$self$$.$d$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 92: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$v$; + break; + case 93: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$s$; + break; + case 94: + $JSCompiler_StaticMethods_interpret$self$$.$e$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 96: + $JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 97: + $JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 98: + $JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 99: + $JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 100: + break; + case 101: + $JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_interpret$self$$.$s$; + break; + case 102: + $JSCompiler_StaticMethods_interpret$self$$.$h$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 103: + $JSCompiler_StaticMethods_interpret$self$$.$v$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 104: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_interpret$self$$.$b$; + break; + case 105: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_interpret$self$$.$c$; + break; + case 106: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_interpret$self$$.$d$; + break; + case 107: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_interpret$self$$.$e$; + break; + case 108: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_interpret$self$$.$v$; + break; + case 109: + break; + case 110: + $JSCompiler_StaticMethods_interpret$self$$.$l$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 111: + $JSCompiler_StaticMethods_interpret$self$$.$s$ = $JSCompiler_StaticMethods_interpret$self$$.$a$; + break; + case 112: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$b$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 113: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$c$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 114: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$d$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 115: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$e$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 116: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$h$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 117: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$l$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 119: + $JSCompiler_StaticMethods_interpret$self$$.$j$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$), $JSCompiler_StaticMethods_interpret$self$$.$a$); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 124: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$v$; + break; + case 125: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$s$; + break; + case 126: + $JSCompiler_StaticMethods_interpret$self$$.$a$ = $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$)); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 132: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$v$); + break; + case 133: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$s$); + break; + case 134: + $JSCompiler_StaticMethods_add_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 140: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$v$); + break; + case 141: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$s$); + break; + case 142: + $JSCompiler_StaticMethods_adc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 148: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$v$); + break; + case 149: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$s$); + break; + case 150: + $JSCompiler_StaticMethods_sub_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 156: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$v$); + break; + case 157: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$s$); + break; + case 158: + $JSCompiler_StaticMethods_sbc_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 164: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$v$] | 16; + break; + case 165: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$s$] | 16; + break; + case 166: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ &= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))] | 16; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 172: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$v$]; + break; + case 173: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$s$]; + break; + case 174: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ ^= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 180: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$v$]; + break; + case 181: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$s$]; + break; + case 182: + $JSCompiler_StaticMethods_interpret$self$$.$g$ = $JSCompiler_StaticMethods_interpret$self$$.$m$[$JSCompiler_StaticMethods_interpret$self$$.$a$ |= $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))]; + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 188: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$v$); + break; + case 189: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$s$); + break; + case 190: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$) + $JSCompiler_StaticMethods_d_$$($JSCompiler_StaticMethods_interpret$self$$))); + $JSCompiler_StaticMethods_interpret$self$$.$f$++; + break; + case 203: + $JSCompiler_StaticMethods_doIndexCB$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 225: + $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$)); + $JSCompiler_StaticMethods_interpret$self$$.$n$ += 2; + break; + case 227: + $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$ = $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$); + $JSCompiler_StaticMethods_setIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$p$($JSCompiler_StaticMethods_interpret$self$$.$n$)); + $JSCompiler_StaticMethods_interpret$self$$.$I$($JSCompiler_StaticMethods_interpret$self$$.$n$, $carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$); + break; + case 229: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$)); + break; + case 233: + $JSCompiler_StaticMethods_interpret$self$$.$f$ = $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$); + break; + case 249: + $JSCompiler_StaticMethods_interpret$self$$.$n$ = $JSCompiler_StaticMethods_getIYHIYL$$($JSCompiler_StaticMethods_interpret$self$$); + break; + default: + $JSSMS$Utils$console$log$$("Unimplemented DD/FD Opcode: " + $JSSMS$Utils$toHex$$($carry$$inline_102_carry$$inline_90_carry$$inline_96_carry$$inline_99_opcode_opcode$$inline_112_opcode$$inline_124_opcode$$inline_128_opcode$$inline_136_temp_temp$$inline_105_temp$$inline_115_temp$$inline_118_temp$$inline_121_temp$$inline_137_temp$$inline_93_value$$inline_133_value$$inline_324_value$$inline_327_value$$inline_330_value$$inline_333_value$$inline_340_value$$inline_343$$)), $JSCompiler_StaticMethods_interpret$self$$.$f$--; + } + break; + case 254: + $JSCompiler_StaticMethods_cp_a$$($JSCompiler_StaticMethods_interpret$self$$, $JSCompiler_StaticMethods_interpret$self$$.$i$($JSCompiler_StaticMethods_interpret$self$$.$f$++)); + break; + case 255: + $JSCompiler_StaticMethods_interpret$self$$.push($JSCompiler_StaticMethods_interpret$self$$.$f$), $JSCompiler_StaticMethods_interpret$self$$.$f$ = 56; + } +} +function $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$$($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$) { + $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$lineno$ = 0; + $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$o$ += $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$main$.$cyclesPerLine$; + for ($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$J$ && $JSCompiler_StaticMethods_interrupt$$($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$);;) { + $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$main$.$a$.$updateDisassembly$($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$f$); + if ($ENABLE_COMPILER$$) { + var $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$ = $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$; + 1024 > $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$ ? ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$branches$[0][$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$] || + $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$R$.$a$($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$, 0, 0), $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$branches$[0][$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$].call($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$, + 0)) : 16384 > $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$ ? ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$branches$[$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$frameReg$[0]][$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$] || + $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$R$.$a$($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$, $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$frameReg$[0], + 0), $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$branches$[$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$frameReg$[0]][$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$].call($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$, + 0)) : 32768 > $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$ ? ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$branches$[$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$frameReg$[1]][$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$ - + 16384] || $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$R$.$a$($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$, $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$frameReg$[1], + 1), $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$branches$[$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$frameReg$[1]][$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$ - + 16384].call($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$, 1)) : 49152 > $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$ ? ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$branches$[$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$frameReg$[2]][$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$ - + 32768] || $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$R$.$a$($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$, $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$frameReg$[2], + 2), $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$branches$[$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$frameReg$[2]][$JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$ - + 32768].call($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$, 2)) : $JSCompiler_StaticMethods_interpret$$($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$); + } else { + $JSCompiler_StaticMethods_interpret$$($JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$); } - var $JSCompiler_temp$$2$$; - if($JSCompiler_temp$$2$$ = 0 >= $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$o$) { - var $JSCompiler_StaticMethods_eol$self$$inline_94$$ = $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$; - if($JSCompiler_StaticMethods_eol$self$$inline_94$$.$main$.$soundEnabled$) { - var $JSCompiler_StaticMethods_updateSound$self$$inline_324$$ = $JSCompiler_StaticMethods_eol$self$$inline_94$$.$main$, $line$$inline_325$$ = $JSCompiler_StaticMethods_eol$self$$inline_94$$.$lineno$; - 0 == $line$$inline_325$$ && ($JSCompiler_StaticMethods_updateSound$self$$inline_324$$.$audioBufferOffset$ = 0); - for(var $samplesToGenerate$$inline_326$$ = $JSCompiler_StaticMethods_updateSound$self$$inline_324$$.$samplesPerLine$[$line$$inline_325$$], $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$ = $JSCompiler_StaticMethods_updateSound$self$$inline_324$$.$b$, $offset$$inline_328$$ = $JSCompiler_StaticMethods_updateSound$self$$inline_324$$.$audioBufferOffset$, $buffer$$inline_329$$ = [], $sample$$inline_330$$ = 0, $i$$inline_331$$ = 0;$sample$$inline_330$$ < $samplesToGenerate$$inline_326$$;$sample$$inline_330$$++) { - for($i$$inline_331$$ = 0;3 > $i$$inline_331$$;$i$$inline_331$$++) { - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$m$[$i$$inline_331$$] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$i$[$i$$inline_331$$] != $NO_ANTIALIAS$$ ? $PSG_VOLUME$$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$b$[($i$$inline_331$$ << 1) + 1]] * $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$i$[$i$$inline_331$$] >> 8 : $PSG_VOLUME$$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$b$[($i$$inline_331$$ << - 1) + 1]] * $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$f$[$i$$inline_331$$] + if ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$ = 0 >= $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$.$o$) { + $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$ = $JSCompiler_StaticMethods_JSSMS_Z80_prototype$frame$self$$; + if ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$main$.$soundEnabled$) { + var $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$ = $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$main$, $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ = $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$lineno$; + 0 === $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ && ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$audioBufferOffset$ = 0); + for (var $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$samplesPerLine$[$line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$], $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$, $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$audioBufferOffset$, $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ = + [], $address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ = 0, $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = 0;$address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ < $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$;$address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$++) { + for ($feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = 0;3 > $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$;$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$++) { + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$p$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$n$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] != + $NO_ANTIALIAS$$ ? $PSG_VOLUME$$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$f$[($feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ << 1) + 1]] * $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$n$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] >> + 8 : $PSG_VOLUME$$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$f$[($feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ << 1) + 1]] * $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$i$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] + ; } - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$m$[3] = $PSG_VOLUME$$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$b$[7]] * ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$h$ & 1) << 1; - var $output$$inline_332$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$m$[0] + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$m$[1] + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$m$[2] + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$m$[3]; - 127 < $output$$inline_332$$ ? $output$$inline_332$$ = 127 : -128 > $output$$inline_332$$ && ($output$$inline_332$$ = -128); - $buffer$$inline_329$$[$offset$$inline_328$$ + $sample$$inline_330$$] = $output$$inline_332$$; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$g$ += $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$n$; - var $clockCycles$$inline_333$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$g$ >> 8, $clockCyclesScaled$$inline_334$$ = $clockCycles$$inline_333$$ << 8; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$g$ -= $clockCyclesScaled$$inline_334$$; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[0] -= $clockCycles$$inline_333$$; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[1] -= $clockCycles$$inline_333$$; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[2] -= $clockCycles$$inline_333$$; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[3] = 128 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$j$ ? $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[2] : $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[3] - $clockCycles$$inline_333$$; - for($i$$inline_331$$ = 0;3 > $i$$inline_331$$;$i$$inline_331$$++) { - var $counter$$inline_335$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[$i$$inline_331$$]; - if(0 >= $counter$$inline_335$$) { - var $tone$$inline_336$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$b$[$i$$inline_331$$ << 1]; - 6 < $tone$$inline_336$$ ? ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$i$[$i$$inline_331$$] = ($clockCyclesScaled$$inline_334$$ - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$g$ + 512 * $counter$$inline_335$$ << 8) * $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$f$[$i$$inline_331$$] / ($clockCyclesScaled$$inline_334$$ + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$g$), - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$f$[$i$$inline_331$$] = -$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$f$[$i$$inline_331$$]) : ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$f$[$i$$inline_331$$] = 1, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$i$[$i$$inline_331$$] = $NO_ANTIALIAS$$); - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[$i$$inline_331$$] += $tone$$inline_336$$ * ($clockCycles$$inline_333$$ / $tone$$inline_336$$ + 1) - }else { - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$i$[$i$$inline_331$$] = $NO_ANTIALIAS$$ + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$p$[3] = $PSG_VOLUME$$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$f$[7]] * ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$m$ & + 1) << 1; + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$p$[0] + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$p$[1] + + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$p$[2] + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$p$[3]; + 127 < $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ ? $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = 127 : -128 > $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ && ($feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = + -128); + $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$[$lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ + $address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$] = $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$; + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$j$ += $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$q$; + var $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$j$ >> 8, $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ = $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$ << + 8; + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$j$ -= $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$; + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[0] -= $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$; + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[1] -= $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$; + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[2] -= $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$; + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[3] = 128 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$o$ ? $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[2] : + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[3] - $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$; + for ($feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = 0;3 > $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$;$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$++) { + var $address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$]; + if (0 >= $address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$) { + var $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$f$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ << 1]; + 6 < $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ ? ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$n$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] = ($address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ - + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$j$ + 512 * $address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ << 8) * $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$i$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] / + ($address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$j$), $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$i$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] = + -$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$i$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$]) : ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$i$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] = + 1, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$n$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] = $NO_ANTIALIAS$$); + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] += $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ * ($address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$ / + $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ + 1); + } else { + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$n$[$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$] = $NO_ANTIALIAS$$; } } - if(0 >= $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[3] && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$f$[3] = -$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$f$[3], 128 != $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$j$ && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$a$[3] += $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$j$ * - ($clockCycles$$inline_333$$ / $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$j$ + 1)), 1 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$f$[3])) { - var $feedback$$inline_337$$ = 0, $feedback$$inline_337$$ = 0 != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$b$[6] & 4) ? 0 != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$h$ & 9) && 0 != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$h$ & 9 ^ 9) ? 1 : 0 : $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$h$ & 1; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$h$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_327$$.$h$ >> 1 | $feedback$$inline_337$$ << 15 - } + 0 >= $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[3] && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$i$[3] = -$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$i$[3], + 128 != $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$o$ && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$a$[3] += $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$o$ * + ($address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$ / $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$o$ + 1)), 1 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$i$[3] && + ($feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = 0, $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = 0 !== ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$f$[6] & + 4) ? 0 !== ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$m$ & 9) && 0 !== ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$m$ & 9 ^ 9) ? 1 : 0 : $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$m$ & + 1, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$m$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$.$m$ >> 1 | $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ << + 15)); } - $JSCompiler_StaticMethods_updateSound$self$$inline_324$$.$audioBuffer$ = $buffer$$inline_329$$; - $JSCompiler_StaticMethods_updateSound$self$$inline_324$$.$audioBufferOffset$ += $samplesToGenerate$$inline_326$$ + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$audioBuffer$ = $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$; + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$audioBufferOffset$ += $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$; } - $JSCompiler_StaticMethods_eol$self$$inline_94$$.$vdp$.$p$ = $JSCompiler_StaticMethods_eol$self$$inline_94$$.$lineno$; - if(192 > $JSCompiler_StaticMethods_eol$self$$inline_94$$.$lineno$) { - var $JSCompiler_StaticMethods_drawLine$self$$inline_339$$ = $JSCompiler_StaticMethods_eol$self$$inline_94$$.$vdp$, $lineno$$inline_340$$ = $JSCompiler_StaticMethods_eol$self$$inline_94$$.$lineno$, $i$$inline_341$$ = 0, $temp$$inline_342$$ = 0, $temp2$$inline_343$$ = 0; - if(!$JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$main$.$is_gg$ || !(24 > $lineno$$inline_340$$ || 168 <= $lineno$$inline_340$$)) { - if(0 != ($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[1] & 64)) { - if(-1 != $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$o$) { - for(var $i$$inline_344$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$s$;$i$$inline_344$$ <= $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$o$;$i$$inline_344$$++) { - if($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$G$[$i$$inline_344$$]) { - $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$G$[$i$$inline_344$$] = 0; - for(var $tile$$inline_345$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$I$[$i$$inline_344$$], $pixel_index$$inline_346$$ = 0, $address$$inline_347$$ = $i$$inline_344$$ << 5, $y$$inline_348$$ = 0;8 > $y$$inline_348$$;$y$$inline_348$$++) { - for(var $address0$$inline_349$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$f$[$address$$inline_347$$++], $address1$$inline_350$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$f$[$address$$inline_347$$++], $address2$$inline_351$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$f$[$address$$inline_347$$++], $address3$$inline_352$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$f$[$address$$inline_347$$++], $bit$$inline_353$$ = 128;0 != - $bit$$inline_353$$;$bit$$inline_353$$ >>= 1) { - var $colour$$inline_354$$ = 0; - 0 != ($address0$$inline_349$$ & $bit$$inline_353$$) && ($colour$$inline_354$$ |= 1); - 0 != ($address1$$inline_350$$ & $bit$$inline_353$$) && ($colour$$inline_354$$ |= 2); - 0 != ($address2$$inline_351$$ & $bit$$inline_353$$) && ($colour$$inline_354$$ |= 4); - 0 != ($address3$$inline_352$$ & $bit$$inline_353$$) && ($colour$$inline_354$$ |= 8); - $tile$$inline_345$$[$pixel_index$$inline_346$$++] = $colour$$inline_354$$ - } + $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$vdp$.$t$ = $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$lineno$; + if (192 > $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$lineno$ && ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$ = $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$vdp$, + $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ = $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$lineno$, $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ = $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ = + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = 0, !$JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$main$.$is_gg$ || !(24 > $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ || + 168 <= $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$))) { + if (0 !== ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[1] & 64)) { + if (-1 != $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$s$) { + for ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$w$;$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ <= + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$s$;$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$++) { + if ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$K$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$]) { + for ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$K$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$] = 0, $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$M$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$], $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ = 0, $address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ = + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ << 5, $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = 0;8 > $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$;$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$++) { + for (var $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$i$[$address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$++], $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$i$[$address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$++], $address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$i$[$address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$++], + $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$i$[$address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$++], $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ = 128;0 !== $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$;$bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ >>= + 1) { + var $colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ = 0; + 0 !== ($address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$ & $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$) && ($colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ |= 1); + 0 !== ($address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ & $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$) && ($colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ |= 2); + 0 !== ($address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ & $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$) && ($colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ |= 4); + 0 !== ($address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ & $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$) && ($colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ |= 8); + $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$[$buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$++] = $colour$$inline_379_pixY$$inline_396_temp$$inline_407$$; } } } - $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$s$ = 512; - $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$o$ = -1 } - var $pixX$$inline_355$$ = 0, $colour$$inline_356$$ = 0, $temp$$inline_357$$ = 0, $temp2$$inline_358$$ = 0, $hscroll$$inline_359$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[8], $vscroll$$inline_360$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[9]; - 16 > $lineno$$inline_340$$ && 0 != ($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[0] & 64) && ($hscroll$$inline_359$$ = 0); - var $lock$$inline_361$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[0] & 128, $tile_column$$inline_362$$ = 32 - ($hscroll$$inline_359$$ >> 3) + $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$F$, $tile_row$$inline_363$$ = $lineno$$inline_340$$ + $vscroll$$inline_360$$ >> 3; - 27 < $tile_row$$inline_363$$ && ($tile_row$$inline_363$$ -= 28); - for(var $tile_y$$inline_364$$ = ($lineno$$inline_340$$ + ($vscroll$$inline_360$$ & 7) & 7) << 3, $row_precal$$inline_365$$ = $lineno$$inline_340$$ << 8, $tx$$inline_366$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$F$;$tx$$inline_366$$ < $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$K$;$tx$$inline_366$$++) { - var $tile_props$$inline_367$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$J$ + (($tile_column$$inline_362$$ & 31) << 1) + ($tile_row$$inline_363$$ << 6), $secondbyte$$inline_368$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$f$[$tile_props$$inline_367$$ + 1], $pal$$inline_369$$ = ($secondbyte$$inline_368$$ & 8) << 1, $sx$$inline_370$$ = ($tx$$inline_366$$ << 3) + ($hscroll$$inline_359$$ & 7), $pixY$$inline_371$$ = 0 == ($secondbyte$$inline_368$$ & 4) ? $tile_y$$inline_364$$ : - 56 - $tile_y$$inline_364$$, $tile$$inline_372$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$I$[($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$f$[$tile_props$$inline_367$$] & 255) + (($secondbyte$$inline_368$$ & 1) << 8)]; - if(0 == ($secondbyte$$inline_368$$ & 2)) { - for($pixX$$inline_355$$ = 0;8 > $pixX$$inline_355$$ && 256 > $sx$$inline_370$$;$pixX$$inline_355$$++, $sx$$inline_370$$++) { - $colour$$inline_356$$ = $tile$$inline_372$$[$pixX$$inline_355$$ + $pixY$$inline_371$$], $temp$$inline_357$$ = 4 * ($sx$$inline_370$$ + $row_precal$$inline_365$$), $temp2$$inline_358$$ = 3 * ($colour$$inline_356$$ + $pal$$inline_369$$), $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$t$[$sx$$inline_370$$] = 0 != ($secondbyte$$inline_368$$ & 16) && 0 != $colour$$inline_356$$, $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_357$$] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_358$$], - $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_357$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_358$$ + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_357$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_358$$ + 2] - } - }else { - for($pixX$$inline_355$$ = 7;0 <= $pixX$$inline_355$$ && 256 > $sx$$inline_370$$;$pixX$$inline_355$$--, $sx$$inline_370$$++) { - $colour$$inline_356$$ = $tile$$inline_372$$[$pixX$$inline_355$$ + $pixY$$inline_371$$], $temp$$inline_357$$ = 4 * ($sx$$inline_370$$ + $row_precal$$inline_365$$), $temp2$$inline_358$$ = 3 * ($colour$$inline_356$$ + $pal$$inline_369$$), $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$t$[$sx$$inline_370$$] = 0 != ($secondbyte$$inline_368$$ & 16) && 0 != $colour$$inline_356$$, $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_357$$] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_358$$], - $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_357$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_358$$ + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_357$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_358$$ + 2] - } + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$w$ = 512; + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$s$ = -1; + } + var $pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ = 0, $colour$$inline_381_offset$$inline_421$$ = 0, $temp$$inline_382$$ = 0, $temp2$$inline_383$$ = 0, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[8], + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[9]; + 16 > $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ && 0 !== ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[0] & 64) && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = + 0); + $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[0] & 128; + $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ = 32 - ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ >> 3) + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$J$; + $address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ = $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ >> 3; + 27 < $address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ && ($address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ -= 28); + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = ($line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ + ($feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ & 7) & 7) << 3; + $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$ = $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ << 8; + for ($address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$J$;$address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ < $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$O$;$address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$++) { + var $pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$N$ + (($buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ & 31) << 1) + ($address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ << 6), $address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$i$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ + 1], $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ = ($address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ & 8) << 1, $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ = + ($address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ << 3) + ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ & 7), $colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ = 0 === ($address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ & 4) ? $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ : + 56 - $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$, $tile$$inline_397$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$M$[($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$i$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$] & + 255) + (($address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ & 1) << 8)]; + if (0 === ($address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ & 2)) { + for ($pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ = 0;8 > $pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ && 256 > $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$;$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$++, $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$++) { + $colour$$inline_381_offset$$inline_421$$ = $tile$$inline_397$$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ + $colour$$inline_379_pixY$$inline_396_temp$$inline_407$$], $temp$$inline_382$$ = 4 * ($bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ + $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$), $temp2$$inline_383$$ = 3 * ($colour$$inline_381_offset$$inline_421$$ + $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$), + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$F$[$bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$] = 0 !== ($address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ & 16) && 0 !== $colour$$inline_381_offset$$inline_421$$, $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$temp$$inline_382$$] = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$temp2$$inline_383$$], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$temp$$inline_382$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$temp2$$inline_383$$ + + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$temp$$inline_382$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$temp2$$inline_383$$ + 2]; } - $tile_column$$inline_362$$++; - 0 != $lock$$inline_361$$ && 23 == $tx$$inline_366$$ && ($tile_row$$inline_363$$ = $lineno$$inline_340$$ >> 3, $tile_y$$inline_364$$ = ($lineno$$inline_340$$ & 7) << 3) + } else { + for ($pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ = 7;0 <= $pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ && 256 > $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$;$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$--, $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$++) { + $colour$$inline_381_offset$$inline_421$$ = $tile$$inline_397$$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ + $colour$$inline_379_pixY$$inline_396_temp$$inline_407$$], $temp$$inline_382$$ = 4 * ($bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ + $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$), $temp2$$inline_383$$ = 3 * ($colour$$inline_381_offset$$inline_421$$ + $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$), + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$F$[$bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$] = 0 !== ($address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ & 16) && 0 !== $colour$$inline_381_offset$$inline_421$$, $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$temp$$inline_382$$] = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$temp2$$inline_383$$], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$temp$$inline_382$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$temp2$$inline_383$$ + + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$temp$$inline_382$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$temp2$$inline_383$$ + 2]; + } + } + $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$++; + 0 !== $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ && 23 == $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ && ($address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ = $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ >> 3, $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = + ($line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ & 7) << 3); + } + if ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$p$) { + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$p$ = !1; + for ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = 0;$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ < $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$v$.length;$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$++) { + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$v$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$][0] = 0; } - if($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$m$) { - $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$m$ = !1; - for(var $i$$inline_373$$ = 0;$i$$inline_373$$ < $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$q$.length;$i$$inline_373$$++) { - $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$q$[$i$$inline_373$$][0] = 0 + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = 0 === ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[1] & 2) ? 8 : 16; + 1 == ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[1] & 1) && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ <<= 1); + for ($lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ = 0;64 > $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$;$lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$++) { + $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$i$[$JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$n$ + $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$] & + 255; + if (208 == $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$) { + break; } - var $height$$inline_374$$ = 0 == ($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[1] & 2) ? 8 : 16; - 1 == ($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[1] & 1) && ($height$$inline_374$$ <<= 1); - for(var $spriteno$$inline_375$$ = 0;64 > $spriteno$$inline_375$$;$spriteno$$inline_375$$++) { - var $y$$inline_376$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$f$[$JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$i$ + $spriteno$$inline_375$$] & 255; - if(208 == $y$$inline_376$$) { - break - } - $y$$inline_376$$++; - 240 < $y$$inline_376$$ && ($y$$inline_376$$ -= 256); - for(var $lineno$$inline_377$$ = $y$$inline_376$$;192 > $lineno$$inline_377$$;$lineno$$inline_377$$++) { - if($lineno$$inline_377$$ - $y$$inline_376$$ < $height$$inline_374$$) { - var $sprites$$inline_378$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$q$[$lineno$$inline_377$$]; - if(!$sprites$$inline_378$$ || 8 <= $sprites$$inline_378$$[0]) { - break - } - var $off$$inline_379$$ = 3 * $sprites$$inline_378$$[0] + 1, $address$$inline_380$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$i$ + ($spriteno$$inline_375$$ << 1) + 128; - $sprites$$inline_378$$[$off$$inline_379$$++] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$f$[$address$$inline_380$$++] & 255; - $sprites$$inline_378$$[$off$$inline_379$$++] = $y$$inline_376$$; - $sprites$$inline_378$$[$off$$inline_379$$++] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$f$[$address$$inline_380$$] & 255; - $sprites$$inline_378$$[0]++ + $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$++; + 240 < $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ && ($buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ -= 256); + for ($address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ = $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$;192 > $address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$;$address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$++) { + if ($address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ - $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ < $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$) { + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$v$[$address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$]; + if (!$feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ || 8 <= $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$[0]) { + break; } + $address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$ = 3 * $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$[0] + 1; + $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$n$ + ($lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ << 1) + 128; + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$[$address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$++] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$i$[$address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$++] & + 255; + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$[$address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$++] = $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$; + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$[$address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$++] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$i$[$address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$] & + 255; + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$[0]++; } } } - if(0 != $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$q$[$lineno$$inline_340$$][0]) { - for(var $colour$$inline_381$$ = 0, $temp$$inline_382$$ = 0, $temp2$$inline_383$$ = 0, $i$$inline_384$$ = 0, $sprites$$inline_385$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$q$[$lineno$$inline_340$$], $count$$inline_386$$ = Math.min(8, $sprites$$inline_385$$[0]), $zoomed$$inline_387$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[1] & 1, $row_precal$$inline_388$$ = $lineno$$inline_340$$ << 8, $off$$inline_389$$ = 3 * $count$$inline_386$$;$i$$inline_384$$ < - $count$$inline_386$$;$i$$inline_384$$++) { - var $n$$inline_390$$ = $sprites$$inline_385$$[$off$$inline_389$$--] | ($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[6] & 4) << 6, $y$$inline_391$$ = $sprites$$inline_385$$[$off$$inline_389$$--], $x$$inline_392$$ = $sprites$$inline_385$$[$off$$inline_389$$--] - ($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[0] & 8), $tileRow$$inline_393$$ = $lineno$$inline_340$$ - $y$$inline_391$$ >> $zoomed$$inline_387$$; - 0 != ($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[1] & 2) && ($n$$inline_390$$ &= -2); - var $tile$$inline_394$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$I$[$n$$inline_390$$ + (($tileRow$$inline_393$$ & 8) >> 3)], $pix$$inline_395$$ = 0; - 0 > $x$$inline_392$$ && ($pix$$inline_395$$ = -$x$$inline_392$$, $x$$inline_392$$ = 0); - var $offset$$inline_396$$ = $pix$$inline_395$$ + (($tileRow$$inline_393$$ & 7) << 3); - if(0 == $zoomed$$inline_387$$) { - for(;8 > $pix$$inline_395$$ && 256 > $x$$inline_392$$;$pix$$inline_395$$++, $x$$inline_392$$++) { - $colour$$inline_381$$ = $tile$$inline_394$$[$offset$$inline_396$$++], 0 == $colour$$inline_381$$ || $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$t$[$x$$inline_392$$] || ($temp$$inline_382$$ = 4 * ($x$$inline_392$$ + $row_precal$$inline_388$$), $temp2$$inline_383$$ = 3 * ($colour$$inline_381$$ + 16), $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_382$$] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_383$$], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_382$$ + - 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_383$$ + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_382$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_383$$ + 2]) - } - }else { - for(;8 > $pix$$inline_395$$ && 256 > $x$$inline_392$$;$pix$$inline_395$$++, $x$$inline_392$$ += 2) { - $colour$$inline_381$$ = $tile$$inline_394$$[$offset$$inline_396$$++], 0 == $colour$$inline_381$$ || $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$t$[$x$$inline_392$$] || ($temp$$inline_382$$ = 4 * ($x$$inline_392$$ + $row_precal$$inline_388$$), $temp2$$inline_383$$ = 3 * ($colour$$inline_381$$ + 16), $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_382$$] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_383$$], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_382$$ + - 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_383$$ + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_382$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_383$$ + 2]), 0 == $colour$$inline_381$$ || $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$t$[$x$$inline_392$$ + 1] || ($temp$$inline_382$$ = 4 * ($x$$inline_392$$ + $row_precal$$inline_388$$ + 1), $temp2$$inline_383$$ = 3 * ($colour$$inline_381$$ + - 16), $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_382$$] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_383$$], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_382$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_383$$ + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_382$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_383$$ + - 2]) - } + } + if (0 !== $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$v$[$line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$][0]) { + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = $pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ = $colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ = $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ = 0; + $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$v$[$line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$]; + $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ = Math.min(8, $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$[0]); + $address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[1] & 1; + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ = $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ << 8; + for ($address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$ = 3 * $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$;$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ < $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$;$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$++) { + if ($address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ = $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$[$address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$--] | ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[6] & + 4) << 6, $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ = $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$[$address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$--], $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ = $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$[$address0$$inline_374_clockCycles$$inline_358_off$$inline_404_off$$inline_414_row_precal$$inline_390$$--] - + ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[0] & 8), $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ = $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ - $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ >> $address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$, + 0 !== ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[1] & 2) && ($address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ &= -2), $address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$M$[$address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$ + + (($bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ & 8) >> 3)], $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ = 0, 0 > $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ && ($address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ = -$address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$, $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ = + 0), $colour$$inline_381_offset$$inline_421$$ = $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ + (($bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ & 7) << 3), 0 === $address$$inline_372_lineno$$inline_402_sample$$inline_355_tile_row$$inline_388_zoomed$$inline_412$$) { + for (;8 > $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ && 256 > $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$;$address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$++, $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$++) { + $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ = $address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$[$colour$$inline_381_offset$$inline_421$$++], 0 === $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ || $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$F$[$address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$] || + ($colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ = 4 * ($address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$), $pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ = 3 * ($bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ + 16), $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$colour$$inline_379_pixY$$inline_396_temp$$inline_407$$] = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ + + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ + 2]); + } + } else { + for (;8 > $address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$ && 256 > $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$;$address3$$inline_377_pal$$inline_394_pix$$inline_420_tone$$inline_361_y$$inline_416$$++, $address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ += 2) { + $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ = $address2$$inline_376_counter$$inline_360_n$$inline_415_secondbyte$$inline_393_tile$$inline_419$$[$colour$$inline_381_offset$$inline_421$$++], 0 === $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ || $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$F$[$address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$] || + ($colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ = 4 * ($address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$), $pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ = 3 * ($bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ + 16), $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$colour$$inline_379_pixY$$inline_396_temp$$inline_407$$] = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ + + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ + 2]), 0 === $bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ || + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$F$[$address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ + 1] || ($colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ = 4 * ($address$$inline_405_address1$$inline_375_clockCyclesScaled$$inline_359_tx$$inline_391_x$$inline_417$$ + $feedback$$inline_362_i$$inline_356_output$$inline_357_row_precal$$inline_413_sprites$$inline_403_tile_y$$inline_389_vscroll$$inline_385_y$$inline_373$$ + + 1), $pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ = 3 * ($bit$$inline_378_colour$$inline_406_sx$$inline_395_tileRow$$inline_418$$ + 16), $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$colour$$inline_379_pixY$$inline_396_temp$$inline_407$$] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$], + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$colour$$inline_379_pixY$$inline_396_temp$$inline_407$$ + + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$pixX$$inline_380_temp2$$inline_408_tile_props$$inline_392$$ + 2]); } - } - 8 <= $sprites$$inline_385$$[0] && ($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$h$ |= 64) - } - if($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$main$.$is_sms$ && 0 != ($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[0] & 32)) { - for($temp$$inline_342$$ = 4 * ($lineno$$inline_340$$ << 8), $temp2$$inline_343$$ = 3 * (($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[7] & 15) + 16), $i$$inline_341$$ = 0;8 > $i$$inline_341$$;$i$$inline_341$$++) { - $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_342$$ + $i$$inline_341$$] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_343$$], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_342$$ + $i$$inline_341$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_343$$ + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$temp$$inline_342$$ + $i$$inline_341$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp2$$inline_343$$ + - 2] } } - }else { - for(var $row_precal$$inline_397$$ = $lineno$$inline_340$$ << 8, $length$$inline_398$$ = 4 * ($row_precal$$inline_397$$ + 1024), $temp$$inline_399$$ = 3 * (($JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$c$[7] & 15) + 16), $row_precal$$inline_397$$ = 4 * $row_precal$$inline_397$$;$row_precal$$inline_397$$ < $length$$inline_398$$;$row_precal$$inline_397$$ += 4) { - $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$row_precal$$inline_397$$] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp$$inline_399$$], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$row_precal$$inline_397$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp$$inline_399$$ + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$b$[$row_precal$$inline_397$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_339$$.$a$[$temp$$inline_399$$ + - 2] + 8 <= $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$[0] && ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$m$ |= 64); + } + if ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$main$.$is_sms$ && 0 !== ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[0] & 32)) { + for ($lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ = 4 * ($line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ << 8), $buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ = 3 * (($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[7] & + 15) + 16), $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = 0;8 > $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$;$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$++) { + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$] = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ + + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ + 1], + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ + + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$buffer$$inline_354_count$$inline_411_pixel_index$$inline_371_temp2$$inline_368_tile_column$$inline_387_y$$inline_401$$ + 2]; } } + } else { + for ($line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ <<= 8, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$ = 4 * ($line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ + 1024), $lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ = + 3 * (($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[7] & 15) + 16), $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ *= 4;$line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ < $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$update$self$$inline_352_height$$inline_399_hscroll$$inline_384_i$$inline_366_i$$inline_369_i$$inline_398_i$$inline_409_length$$inline_423$$;$line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ += + 4) { + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$], + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ + 1] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ + + 1], $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$f$[$line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ + 2] = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$a$[$lock$$inline_386_offset$$inline_353_spriteno$$inline_400_sprites$$inline_410_temp$$inline_367_temp$$inline_424_tile$$inline_370$$ + + 2]; + } } } - var $JSCompiler_StaticMethods_interrupts$self$$inline_401$$ = $JSCompiler_StaticMethods_eol$self$$inline_94$$.$vdp$, $lineno$$inline_402$$ = $JSCompiler_StaticMethods_eol$self$$inline_94$$.$lineno$; - 192 >= $lineno$$inline_402$$ ? (0 == $JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$v$ ? ($JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$v$ = $JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$c$[10], $JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$h$ |= 4) : $JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$v$--, 0 != ($JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$h$ & 4) && 0 != ($JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$c$[0] & - 16) && ($JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$main$.$cpu$.$I$ = !0)) : ($JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$v$ = $JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$c$[10], 0 != ($JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$h$ & 128) && (0 != ($JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$c$[1] & 32) && 224 > $lineno$$inline_402$$) && ($JSCompiler_StaticMethods_interrupts$self$$inline_401$$.$main$.$cpu$.$I$ = !0)); - $JSCompiler_StaticMethods_eol$self$$inline_94$$.$I$ && $JSCompiler_StaticMethods_interrupt$$($JSCompiler_StaticMethods_eol$self$$inline_94$$); - $JSCompiler_StaticMethods_eol$self$$inline_94$$.$lineno$++; - if($JSCompiler_StaticMethods_eol$self$$inline_94$$.$lineno$ >= $JSCompiler_StaticMethods_eol$self$$inline_94$$.$main$.$no_of_scanlines$) { - var $JSCompiler_StaticMethods_eof$self$$inline_404$$ = $JSCompiler_StaticMethods_eol$self$$inline_94$$; - $JSCompiler_StaticMethods_eof$self$$inline_404$$.$main$.$pause_button$ && ($JSCompiler_StaticMethods_eof$self$$inline_404$$.$K$ = $JSCompiler_StaticMethods_eof$self$$inline_404$$.$J$, $JSCompiler_StaticMethods_eof$self$$inline_404$$.$J$ = !1, $JSCompiler_StaticMethods_eof$self$$inline_404$$.$O$ && ($JSCompiler_StaticMethods_eof$self$$inline_404$$.$b$++, $JSCompiler_StaticMethods_eof$self$$inline_404$$.$O$ = !1), $JSCompiler_StaticMethods_eof$self$$inline_404$$.push($JSCompiler_StaticMethods_eof$self$$inline_404$$.$b$), - $JSCompiler_StaticMethods_eof$self$$inline_404$$.$b$ = 102, $JSCompiler_StaticMethods_eof$self$$inline_404$$.$o$ -= 11, $JSCompiler_StaticMethods_eof$self$$inline_404$$.$main$.$pause_button$ = !1); - $JSCompiler_StaticMethods_eof$self$$inline_404$$.$main$.$a$.$writeFrame$(); - $JSCompiler_temp$$2$$ = !0 - }else { - $JSCompiler_StaticMethods_eol$self$$inline_94$$.$o$ += $JSCompiler_StaticMethods_eol$self$$inline_94$$.$main$.$cyclesPerLine$, $JSCompiler_temp$$2$$ = !1 - } + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$ = $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$vdp$; + $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ = $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$lineno$; + 192 >= $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ ? (0 === $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$G$ ? ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$G$ = $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[10], + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$m$ |= 4) : $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$G$--, 0 !== ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$m$ & + 4) && 0 !== ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[0] & 16) && ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$main$.$cpu$.$J$ = !0)) : ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$G$ = + $JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[10], 0 !== ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$m$ & 128) && 0 !== ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$g$[1] & + 32) && 224 > $line$$inline_350_lineno$$inline_365_lineno$$inline_427_row_precal$$inline_422_samplesToGenerate$$inline_351$$ && ($JSCompiler_StaticMethods_drawLine$self$$inline_364_JSCompiler_StaticMethods_interrupts$self$$inline_426_JSCompiler_StaticMethods_updateSound$self$$inline_349$$.$main$.$cpu$.$J$ = !0)); + $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$J$ && $JSCompiler_StaticMethods_interrupt$$($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$); + $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$lineno$++; + $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$lineno$ >= $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$main$.$no_of_scanlines$ ? ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$main$.$pause_button$ && + ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$M$ = $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$K$, $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$K$ = + !1, $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$Q$ && ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$++, $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$Q$ = + !1), $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.push($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$), $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$f$ = + 102, $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$o$ -= 11, $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$main$.$pause_button$ = !1), $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$main$.$a$.$writeFrame$(), + $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$ = !0) : ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$o$ += $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$.$main$.$cyclesPerLine$, + $JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$ = !1); } - if($JSCompiler_temp$$2$$) { - break + if ($JSCompiler_StaticMethods_eof$self$$inline_429_JSCompiler_StaticMethods_eol$self$$inline_145_JSCompiler_StaticMethods_recompile$self$$inline_143_JSCompiler_temp$$2$$) { + break; } } } ;function $JSSMS$Debugger$$() { } $JSSMS$Debugger$$.prototype = {$instructions$:[]}; +function $JSCompiler_StaticMethods_peepholePortIn$$($JSCompiler_StaticMethods_peepholePortIn$self$$, $port$$1$$) { + if ($JSCompiler_StaticMethods_peepholePortIn$self$$.$main$.$is_gg$ && 7 > $port$$1$$) { + switch($port$$1$$) { + case 0: + return "this.a = (this.port.keyboard.ggstart & 0xBF) | this.port.europe;"; + case 1: + ; + case 2: + ; + case 3: + ; + case 4: + ; + case 5: + return "this.a = 0x00;"; + case 6: + return "this.a = 0xFF;"; + } + } + switch($port$$1$$ & 193) { + case 64: + return "this.a = this.vdp.getVCount();"; + case 65: + return "this.a = this.port.hCounter;"; + case 128: + return "this.a = this.vdp.dataRead();"; + case 129: + return "this.a = this.vdp.controlRead();"; + case 192: + return "this.a = this.port.keyboard.controller1;"; + case 193: + return "this.a = (this.port.keyboard.controller2 & 0x3F) | this.port.ioPorts[0] | this.port.ioPorts[1];"; + } + return "this.a = 0xFF;"; +} +function $JSCompiler_StaticMethods_peepholePortOut$$($JSCompiler_StaticMethods_peepholePortOut$self$$, $port$$) { + if ($JSCompiler_StaticMethods_peepholePortOut$self$$.$main$.$is_gg$ && 7 > $port$$) { + return ""; + } + switch($port$$ & 193) { + case 1: + return "var value = this.a;this.port.ioPorts[0] = (value & 0x20) << 1;this.port.ioPorts[1] = (value & 0x80);"; + case 128: + return "this.vdp.dataWrite(this.a);"; + case 129: + return "this.vdp.controlWrite(this.a);"; + case 64: + ; + case 65: + if ($JSCompiler_StaticMethods_peepholePortOut$self$$.$main$.$soundEnabled$) { + return "this.psg.write(this.a);"; + } + ; + } + return ""; +} function $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_readRom16bit$self$$, $address$$14$$) { return $SUPPORT_DATAVIEW$$ ? 16383 > ($address$$14$$ & 16383) ? $JSCompiler_StaticMethods_readRom16bit$self$$.$rom$[$address$$14$$ >> 14].getUint16($address$$14$$ & 16383, !0) : $JSCompiler_StaticMethods_readRom16bit$self$$.$rom$[$address$$14$$ >> 14].getUint8($address$$14$$ & 16383) | $JSCompiler_StaticMethods_readRom16bit$self$$.$rom$[++$address$$14$$ >> 14].getUint8($address$$14$$ & 16383) << 8 : $JSCompiler_StaticMethods_readRom16bit$self$$.$rom$[$address$$14$$ >> 14][$address$$14$$ & 16383] & - 255 | ($JSCompiler_StaticMethods_readRom16bit$self$$.$rom$[++$address$$14$$ >> 14][$address$$14$$ & 16383] & 255) << 8 + 255 | ($JSCompiler_StaticMethods_readRom16bit$self$$.$rom$[++$address$$14$$ >> 14][$address$$14$$ & 16383] & 255) << 8; } function $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_readRom8bit$self$$, $address$$13$$) { - return $SUPPORT_DATAVIEW$$ ? $JSCompiler_StaticMethods_readRom8bit$self$$.$rom$[$address$$13$$ >> 14].getUint8($address$$13$$ & 16383) : $JSCompiler_StaticMethods_readRom8bit$self$$.$rom$[$address$$13$$ >> 14][$address$$13$$ & 16383] & 255 + return $SUPPORT_DATAVIEW$$ ? $JSCompiler_StaticMethods_readRom8bit$self$$.$rom$[$address$$13$$ >> 14].getUint8($address$$13$$ & 16383) : $JSCompiler_StaticMethods_readRom8bit$self$$.$rom$[$address$$13$$ >> 14][$address$$13$$ & 16383] & 255; } -function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $index$$46$$, $address$$11_address$$inline_98$$) { - var $opcode$$9$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$), $opcodesArray$$3$$ = [$opcode$$9$$], $inst$$3_location$$inline_100$$ = "Unimplemented 0xDD or 0xFD prefixed opcode", $currAddr$$3$$ = $address$$11_address$$inline_98$$, $code$$8_code$$inline_104$$ = 'throw "Unimplemented 0xDD or 0xFD prefixed opcode";', $opcode$$inline_101_operand$$2$$ = "", $inst$$inline_103_location$$28_offset$$16$$ = +function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $index$$47$$, $address$$11_address$$inline_149$$) { + var $opcode$$9$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$), $opcodesArray$$3$$ = [$opcode$$9$$], $inst$$3_location$$inline_151$$ = "Unimplemented 0xDD or 0xFD prefixed opcode", $currAddr$$3$$ = $address$$11_address$$inline_149$$, $code$$8_code$$inline_155$$ = 'throw "Unimplemented 0xDD or 0xFD prefixed opcode";', $opcode$$inline_152_operand$$2$$ = "", $inst$$inline_154_location$$25_offset$$17$$ = 0; - $address$$11_address$$inline_98$$++; - $inst$$inline_103_location$$28_offset$$16$$ = 0; + $address$$11_address$$inline_149$$++; + $inst$$inline_154_location$$25_offset$$17$$ = 0; switch($opcode$$9$$) { case 9: - $inst$$3_location$$inline_100$$ = "ADD " + $index$$46$$ + ",BC"; - $code$$8_code$$inline_104$$ = "this.set" + $index$$46$$ + "(this.add16(this.get" + $index$$46$$ + "(), this.getBC()));"; + $inst$$3_location$$inline_151$$ = "ADD " + $index$$47$$ + ",BC"; + $code$$8_code$$inline_155$$ = "this.set" + $index$$47$$ + "(this.add16(this.get" + $index$$47$$ + "(), this.getBC()));"; break; case 25: - $inst$$3_location$$inline_100$$ = "ADD " + $index$$46$$ + ",DE"; - $code$$8_code$$inline_104$$ = "this.set" + $index$$46$$ + "(this.add16(this.get" + $index$$46$$ + "(), this.getDE()));"; + $inst$$3_location$$inline_151$$ = "ADD " + $index$$47$$ + ",DE"; + $code$$8_code$$inline_155$$ = "this.set" + $index$$47$$ + "(this.add16(this.get" + $index$$47$$ + "(), this.getDE()));"; break; case 33: - $opcode$$inline_101_operand$$2$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$)); - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "," + $opcode$$inline_101_operand$$2$$; - $code$$8_code$$inline_104$$ = "this.set" + $index$$46$$ + "(" + $opcode$$inline_101_operand$$2$$ + ");"; - $address$$11_address$$inline_98$$ += 2; + $opcode$$inline_152_operand$$2$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$)); + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "," + $opcode$$inline_152_operand$$2$$; + $code$$8_code$$inline_155$$ = "this.set" + $index$$47$$ + "(" + $opcode$$inline_152_operand$$2$$ + ");"; + $address$$11_address$$inline_149$$ += 2; break; case 34: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $opcode$$inline_101_operand$$2$$ = $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$); - $inst$$3_location$$inline_100$$ = "LD (" + $opcode$$inline_101_operand$$2$$ + ")," + $index$$46$$; - $code$$8_code$$inline_104$$ = "this.writeMem(" + $opcode$$inline_101_operand$$2$$ + ", this." + $index$$46$$.toLowerCase() + "L);this.writeMem(" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$ + 1) + ", this." + $index$$46$$.toLowerCase() + "H);"; - $address$$11_address$$inline_98$$ += 2; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $opcode$$inline_152_operand$$2$$ = $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$); + $inst$$3_location$$inline_151$$ = "LD (" + $opcode$$inline_152_operand$$2$$ + ")," + $index$$47$$; + $code$$8_code$$inline_155$$ = "this.writeMem(" + $opcode$$inline_152_operand$$2$$ + ", this." + $index$$47$$.toLowerCase() + "L);this.writeMem(" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$ + 1) + ", this." + $index$$47$$.toLowerCase() + "H);"; + $address$$11_address$$inline_149$$ += 2; break; case 35: - $inst$$3_location$$inline_100$$ = "INC " + $index$$46$$; - $code$$8_code$$inline_104$$ = "this.inc" + $index$$46$$ + "();"; + $inst$$3_location$$inline_151$$ = "INC " + $index$$47$$; + $code$$8_code$$inline_155$$ = "this.inc" + $index$$47$$ + "();"; break; case 36: - $inst$$3_location$$inline_100$$ = "INC " + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "INC " + $index$$47$$ + "H *"; break; case 37: - $inst$$3_location$$inline_100$$ = "DEC " + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "DEC " + $index$$47$$ + "H *"; break; case 38: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "H," + $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$)) + " *"; - $address$$11_address$$inline_98$$++; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "H," + $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$)) + " *"; + $address$$11_address$$inline_149$$++; break; case 41: - $inst$$3_location$$inline_100$$ = "ADD " + $index$$46$$ + " " + $index$$46$$; + $inst$$3_location$$inline_151$$ = "ADD " + $index$$47$$ + " " + $index$$47$$; break; case 42: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + " (" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.ixL = this.readMem(" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");this.ixH = this.readMem(" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$ + 1) + ");"; - $address$$11_address$$inline_98$$ += 2; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + " (" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.ixL = this.readMem(" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");this.ixH = this.readMem(" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$ + 1) + ");"; + $address$$11_address$$inline_149$$ += 2; break; case 43: - $inst$$3_location$$inline_100$$ = "DEC " + $index$$46$$; - $code$$8_code$$inline_104$$ = "this.dec" + $index$$46$$ + "();"; + $inst$$3_location$$inline_151$$ = "DEC " + $index$$47$$; + $code$$8_code$$inline_155$$ = "this.dec" + $index$$47$$ + "();"; break; case 44: - $inst$$3_location$$inline_100$$ = "INC " + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "INC " + $index$$47$$ + "L *"; break; case 45: - $inst$$3_location$$inline_100$$ = "DEC " + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "DEC " + $index$$47$$ + "L *"; break; case 46: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "L," + $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$)); - $address$$11_address$$inline_98$$++; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "L," + $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$)); + $address$$11_address$$inline_149$$++; break; case 52: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "INC (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.incMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "INC (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.incMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");"; + $address$$11_address$$inline_149$$++; break; case 53: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "DEC (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.decMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "DEC (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.decMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");"; + $address$$11_address$$inline_149$$++; break; case 54: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $opcode$$inline_101_operand$$2$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$ + 1)); - $inst$$3_location$$inline_100$$ = "LD (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")," + $opcode$$inline_101_operand$$2$$; - $code$$8_code$$inline_104$$ = "this.writeMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ", " + $opcode$$inline_101_operand$$2$$ + ");"; - $address$$11_address$$inline_98$$ += 2; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $opcode$$inline_152_operand$$2$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$ + 1)); + $inst$$3_location$$inline_151$$ = "LD (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")," + $opcode$$inline_152_operand$$2$$; + $code$$8_code$$inline_155$$ = "this.writeMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ", " + $opcode$$inline_152_operand$$2$$ + ");"; + $address$$11_address$$inline_149$$ += 2; break; case 57: - $inst$$3_location$$inline_100$$ = "ADD " + $index$$46$$ + " SP"; - $code$$8_code$$inline_104$$ = "this.set" + $index$$46$$ + "(this.add16(this.get" + $index$$46$$ + "(), this.sp));"; + $inst$$3_location$$inline_151$$ = "ADD " + $index$$47$$ + " SP"; + $code$$8_code$$inline_155$$ = "this.set" + $index$$47$$ + "(this.add16(this.get" + $index$$47$$ + "(), this.sp));"; break; case 68: - $inst$$3_location$$inline_100$$ = "LD B," + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "LD B," + $index$$47$$ + "H *"; break; case 69: - $inst$$3_location$$inline_100$$ = "LD B," + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "LD B," + $index$$47$$ + "L *"; break; case 70: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD B,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.b = this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD B,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.b = this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");"; + $address$$11_address$$inline_149$$++; break; case 76: - $inst$$3_location$$inline_100$$ = "LD C," + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "LD C," + $index$$47$$ + "H *"; break; case 77: - $inst$$3_location$$inline_100$$ = "LD C," + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "LD C," + $index$$47$$ + "L *"; break; case 78: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD C,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.c = this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD C,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.c = this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");"; + $address$$11_address$$inline_149$$++; break; case 84: - $inst$$3_location$$inline_100$$ = "LD D," + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "LD D," + $index$$47$$ + "H *"; break; case 85: - $inst$$3_location$$inline_100$$ = "LD D," + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "LD D," + $index$$47$$ + "L *"; break; case 86: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD D,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.d = this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD D,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.d = this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");"; + $address$$11_address$$inline_149$$++; break; case 92: - $inst$$3_location$$inline_100$$ = "LD E," + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "LD E," + $index$$47$$ + "H *"; break; case 93: - $inst$$3_location$$inline_100$$ = "LD E," + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "LD E," + $index$$47$$ + "L *"; break; case 94: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD E,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.e = this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD E,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.e = this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");"; + $address$$11_address$$inline_149$$++; break; case 96: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "H,B *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "H,B *"; break; case 97: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "H,C *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "H,C *"; break; case 98: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "H,D *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "H,D *"; break; case 99: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "H,E *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "H,E *"; break; case 100: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "H," + $index$$46$$ + "H*"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "H," + $index$$47$$ + "H*"; break; case 101: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "H," + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "H," + $index$$47$$ + "L *"; break; case 102: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD H,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.h = this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD H,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.h = this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");"; + $address$$11_address$$inline_149$$++; break; case 103: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "H,A *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "H,A *"; break; case 104: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "L,B *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "L,B *"; break; case 105: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "L,C *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "L,C *"; break; case 106: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "L,D *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "L,D *"; break; case 107: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "L,E *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "L,E *"; break; case 108: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "L," + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "L," + $index$$47$$ + "H *"; break; case 109: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "L," + $index$$46$$ + "L *"; - $code$$8_code$$inline_104$$ = ""; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "L," + $index$$47$$ + "L *"; + $code$$8_code$$inline_155$$ = ""; break; case 110: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD L,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.l = this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD L,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.l = this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");"; + $address$$11_address$$inline_149$$++; break; case 111: - $inst$$3_location$$inline_100$$ = "LD " + $index$$46$$ + "L,A *"; - $code$$8_code$$inline_104$$ = "this." + $index$$46$$.toLowerCase() + "L = this.a;"; + $inst$$3_location$$inline_151$$ = "LD " + $index$$47$$ + "L,A *"; + $code$$8_code$$inline_155$$ = "this." + $index$$47$$.toLowerCase() + "L = this.a;"; break; case 112: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "),B"; - $code$$8_code$$inline_104$$ = "this.writeMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ", this.b);"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "),B"; + $code$$8_code$$inline_155$$ = "this.writeMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ", this.b);"; + $address$$11_address$$inline_149$$++; break; case 113: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "),C"; - $code$$8_code$$inline_104$$ = "this.writeMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ", this.c);"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "),C"; + $code$$8_code$$inline_155$$ = "this.writeMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ", this.c);"; + $address$$11_address$$inline_149$$++; break; case 114: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "),D"; - $code$$8_code$$inline_104$$ = "this.writeMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ", this.d);"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "),D"; + $code$$8_code$$inline_155$$ = "this.writeMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ", this.d);"; + $address$$11_address$$inline_149$$++; break; case 115: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "),E"; - $code$$8_code$$inline_104$$ = "this.writeMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ", this.e);"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "),E"; + $code$$8_code$$inline_155$$ = "this.writeMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ", this.e);"; + $address$$11_address$$inline_149$$++; break; case 116: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "),H"; - $code$$8_code$$inline_104$$ = "this.writeMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ", this.h);"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "),H"; + $code$$8_code$$inline_155$$ = "this.writeMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ", this.h);"; + $address$$11_address$$inline_149$$++; break; case 117: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "),L"; - $code$$8_code$$inline_104$$ = "this.writeMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ", this.l);"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "),L"; + $code$$8_code$$inline_155$$ = "this.writeMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ", this.l);"; + $address$$11_address$$inline_149$$++; break; case 119: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "),A"; - $code$$8_code$$inline_104$$ = "this.writeMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ", this.a);"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "),A"; + $code$$8_code$$inline_155$$ = "this.writeMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ", this.a);"; + $address$$11_address$$inline_149$$++; break; case 124: - $inst$$3_location$$inline_100$$ = "LD A," + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "LD A," + $index$$47$$ + "H *"; break; case 125: - $inst$$3_location$$inline_100$$ = "LD A," + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "LD A," + $index$$47$$ + "L *"; break; case 126: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "LD A,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.a = this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ");"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "LD A,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.a = this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ");"; + $address$$11_address$$inline_149$$++; break; case 132: - $inst$$3_location$$inline_100$$ = "ADD A," + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "ADD A," + $index$$47$$ + "H *"; break; case 133: - $inst$$3_location$$inline_100$$ = "ADD A," + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "ADD A," + $index$$47$$ + "L *"; break; case 134: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "ADD A,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.add_a(this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "));"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "ADD A,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.add_a(this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "));"; + $address$$11_address$$inline_149$$++; break; case 140: - $inst$$3_location$$inline_100$$ = "ADC A," + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "ADC A," + $index$$47$$ + "H *"; break; case 141: - $inst$$3_location$$inline_100$$ = "ADC A," + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "ADC A," + $index$$47$$ + "L *"; break; case 142: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "ADC A,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.adc_a(this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "));"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "ADC A,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.adc_a(this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "));"; + $address$$11_address$$inline_149$$++; break; case 148: - $inst$$3_location$$inline_100$$ = "SUB " + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "SUB " + $index$$47$$ + "H *"; break; case 149: - $inst$$3_location$$inline_100$$ = "SUB " + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "SUB " + $index$$47$$ + "L *"; break; case 150: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "SUB A,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.sub_a(this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "));"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "SUB A,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.sub_a(this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "));"; + $address$$11_address$$inline_149$$++; break; case 156: - $inst$$3_location$$inline_100$$ = "SBC A," + $index$$46$$ + "H *"; + $inst$$3_location$$inline_151$$ = "SBC A," + $index$$47$$ + "H *"; break; case 157: - $inst$$3_location$$inline_100$$ = "SBC A," + $index$$46$$ + "L *"; + $inst$$3_location$$inline_151$$ = "SBC A," + $index$$47$$ + "L *"; break; case 158: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "SBC A,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.sbc_a(this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "));"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "SBC A,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.sbc_a(this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "));"; + $address$$11_address$$inline_149$$++; break; case 164: - $inst$$3_location$$inline_100$$ = "AND " + $index$$46$$ + "H *"; - $code$$8_code$$inline_104$$ = "this.f = this.SZP_TABLE[this.a &= this." + $index$$46$$.toLowerCase() + "H];"; + $inst$$3_location$$inline_151$$ = "AND " + $index$$47$$ + "H *"; + $code$$8_code$$inline_155$$ = "this.f = this.SZP_TABLE[this.a &= this." + $index$$47$$.toLowerCase() + "H];"; break; case 165: - $inst$$3_location$$inline_100$$ = "AND " + $index$$46$$ + "L *"; - $code$$8_code$$inline_104$$ = "this.f = this.SZP_TABLE[this.a &= this." + $index$$46$$.toLowerCase() + "L];"; + $inst$$3_location$$inline_151$$ = "AND " + $index$$47$$ + "L *"; + $code$$8_code$$inline_155$$ = "this.f = this.SZP_TABLE[this.a &= this." + $index$$47$$.toLowerCase() + "L];"; break; case 166: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "AND A,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.f = this.SZP_TABLE[this.a &= this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")] | F_HALFCARRY;"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "AND A,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.f = this.SZP_TABLE[this.a &= this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")] | F_HALFCARRY;"; + $address$$11_address$$inline_149$$++; break; case 172: - $inst$$3_location$$inline_100$$ = "XOR A " + $index$$46$$ + "H*"; - $code$$8_code$$inline_104$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$46$$.toLowerCase() + "H];"; + $inst$$3_location$$inline_151$$ = "XOR A " + $index$$47$$ + "H*"; + $code$$8_code$$inline_155$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$47$$.toLowerCase() + "H];"; break; case 173: - $inst$$3_location$$inline_100$$ = "XOR A " + $index$$46$$ + "L*"; - $code$$8_code$$inline_104$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$46$$.toLowerCase() + "L];"; + $inst$$3_location$$inline_151$$ = "XOR A " + $index$$47$$ + "L*"; + $code$$8_code$$inline_155$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$47$$.toLowerCase() + "L];"; break; case 174: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "XOR A,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.f = this.SZP_TABLE[this.a ^= this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")];"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "XOR A,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.f = this.SZP_TABLE[this.a ^= this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")];"; + $address$$11_address$$inline_149$$++; break; case 180: - $inst$$3_location$$inline_100$$ = "OR A " + $index$$46$$ + "H*"; - $code$$8_code$$inline_104$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$46$$.toLowerCase() + "H];"; + $inst$$3_location$$inline_151$$ = "OR A " + $index$$47$$ + "H*"; + $code$$8_code$$inline_155$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$47$$.toLowerCase() + "H];"; break; case 181: - $inst$$3_location$$inline_100$$ = "OR A " + $index$$46$$ + "L*"; - $code$$8_code$$inline_104$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$46$$.toLowerCase() + "L];"; + $inst$$3_location$$inline_151$$ = "OR A " + $index$$47$$ + "L*"; + $code$$8_code$$inline_155$$ = "this.f = this.SZP_TABLE[this.a |= this." + $index$$47$$.toLowerCase() + "L];"; break; case 182: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "OR A,(" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.f = this.SZP_TABLE[this.a |= this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")];"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "OR A,(" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.f = this.SZP_TABLE[this.a |= this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")];"; + $address$$11_address$$inline_149$$++; break; case 188: - $inst$$3_location$$inline_100$$ = "CP " + $index$$46$$ + "H *"; - $code$$8_code$$inline_104$$ = "this.cp_a(this." + $index$$46$$.toLowerCase() + "H);"; + $inst$$3_location$$inline_151$$ = "CP " + $index$$47$$ + "H *"; + $code$$8_code$$inline_155$$ = "this.cp_a(this." + $index$$47$$.toLowerCase() + "H);"; break; case 189: - $inst$$3_location$$inline_100$$ = "CP " + $index$$46$$ + "L *"; - $code$$8_code$$inline_104$$ = "this.cp_a(this." + $index$$46$$.toLowerCase() + "L);"; + $inst$$3_location$$inline_151$$ = "CP " + $index$$47$$ + "L *"; + $code$$8_code$$inline_155$$ = "this.cp_a(this." + $index$$47$$.toLowerCase() + "L);"; break; case 190: - $inst$$inline_103_location$$28_offset$$16$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $inst$$3_location$$inline_100$$ = "CP (" + $index$$46$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + ")"; - $code$$8_code$$inline_104$$ = "this.cp_a(this.readMem(this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_103_location$$28_offset$$16$$) + "));"; - $address$$11_address$$inline_98$$++; + $inst$$inline_154_location$$25_offset$$17$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $inst$$3_location$$inline_151$$ = "CP (" + $index$$47$$ + "+" + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + ")"; + $code$$8_code$$inline_155$$ = "this.cp_a(this.readMem(this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($inst$$inline_154_location$$25_offset$$17$$) + "));"; + $address$$11_address$$inline_149$$++; break; case 203: - $inst$$3_location$$inline_100$$ = "location = this.get" + $index$$46$$ + "() + " + $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$++)) + " & 0xFFFF;"; - $opcode$$inline_101_operand$$2$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$, $address$$11_address$$inline_98$$); - $JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$ = [$opcode$$inline_101_operand$$2$$]; - $inst$$inline_103_location$$28_offset$$16$$ = "Unimplemented 0xDDCB or 0xFDCB prefixed opcode"; - $code$$8_code$$inline_104$$ = 'throw "Unimplemented 0xDDCB or 0xFDCB prefixed opcode";'; - $address$$11_address$$inline_98$$++; - switch($opcode$$inline_101_operand$$2$$) { + $inst$$3_location$$inline_151$$ = "location = this.get" + $index$$47$$ + "() + " + $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$++)) + " & 0xFFFF;"; + $opcode$$inline_152_operand$$2$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$, $address$$11_address$$inline_149$$); + $JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$ = [$opcode$$inline_152_operand$$2$$]; + $inst$$inline_154_location$$25_offset$$17$$ = "Unimplemented 0xDDCB or 0xFDCB prefixed opcode"; + $code$$8_code$$inline_155$$ = 'throw "Unimplemented 0xDDCB or 0xFDCB prefixed opcode";'; + $address$$11_address$$inline_149$$++; + switch($opcode$$inline_152_operand$$2$$) { case 0: - $inst$$inline_103_location$$28_offset$$16$$ = "LD B,RLC (" + $index$$46$$ + ")"; - $code$$8_code$$inline_104$$ = $inst$$3_location$$inline_100$$ + "this.b = this.rlc(this.readMem(location)); this.writeMem(location, this.b);"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD B,RLC (" + $index$$47$$ + ")"; + $code$$8_code$$inline_155$$ = $inst$$3_location$$inline_151$$ + "this.b = this.rlc(this.readMem(location)); this.writeMem(location, this.b);"; break; case 1: - $inst$$inline_103_location$$28_offset$$16$$ = "LD C,RLC (" + $index$$46$$ + ")"; - $code$$8_code$$inline_104$$ = $inst$$3_location$$inline_100$$ + "this.c = this.rlc(this.readMem(location)); this.writeMem(location, this.c);"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD C,RLC (" + $index$$47$$ + ")"; + $code$$8_code$$inline_155$$ = $inst$$3_location$$inline_151$$ + "this.c = this.rlc(this.readMem(location)); this.writeMem(location, this.c);"; break; case 2: - $inst$$inline_103_location$$28_offset$$16$$ = "LD D,RLC (" + $index$$46$$ + ")"; - $code$$8_code$$inline_104$$ = $inst$$3_location$$inline_100$$ + "this.d = this.rlc(this.readMem(location)); this.writeMem(location, this.d);"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD D,RLC (" + $index$$47$$ + ")"; + $code$$8_code$$inline_155$$ = $inst$$3_location$$inline_151$$ + "this.d = this.rlc(this.readMem(location)); this.writeMem(location, this.d);"; break; case 3: - $inst$$inline_103_location$$28_offset$$16$$ = "LD E,RLC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD E,RLC (" + $index$$47$$ + ")"; break; case 4: - $inst$$inline_103_location$$28_offset$$16$$ = "LD H,RLC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD H,RLC (" + $index$$47$$ + ")"; break; case 5: - $inst$$inline_103_location$$28_offset$$16$$ = "LD L,RLC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD L,RLC (" + $index$$47$$ + ")"; break; case 6: - $inst$$inline_103_location$$28_offset$$16$$ = "RLC (" + $index$$46$$ + ")"; - $code$$8_code$$inline_104$$ = $inst$$3_location$$inline_100$$ + "this.writeMem(location, this.rlc(this.readMem(location)));"; + $inst$$inline_154_location$$25_offset$$17$$ = "RLC (" + $index$$47$$ + ")"; + $code$$8_code$$inline_155$$ = $inst$$3_location$$inline_151$$ + "this.writeMem(location, this.rlc(this.readMem(location)));"; break; case 7: - $inst$$inline_103_location$$28_offset$$16$$ = "LD A,RLC (" + $index$$46$$ + ")"; - $code$$8_code$$inline_104$$ = $inst$$3_location$$inline_100$$ + "this.a = this.rlc(this.readMem(location)); this.writeMem(location, this.a);"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD A,RLC (" + $index$$47$$ + ")"; + $code$$8_code$$inline_155$$ = $inst$$3_location$$inline_151$$ + "this.a = this.rlc(this.readMem(location)); this.writeMem(location, this.a);"; break; case 8: - $inst$$inline_103_location$$28_offset$$16$$ = "LD B,RRC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD B,RRC (" + $index$$47$$ + ")"; break; case 9: - $inst$$inline_103_location$$28_offset$$16$$ = "LD C,RRC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD C,RRC (" + $index$$47$$ + ")"; break; case 10: - $inst$$inline_103_location$$28_offset$$16$$ = "LD D,RRC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD D,RRC (" + $index$$47$$ + ")"; break; case 11: - $inst$$inline_103_location$$28_offset$$16$$ = "LD E,RRC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD E,RRC (" + $index$$47$$ + ")"; break; case 12: - $inst$$inline_103_location$$28_offset$$16$$ = "LD H,RRC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD H,RRC (" + $index$$47$$ + ")"; break; case 13: - $inst$$inline_103_location$$28_offset$$16$$ = "LD L,RRC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD L,RRC (" + $index$$47$$ + ")"; break; case 14: - $inst$$inline_103_location$$28_offset$$16$$ = "RRC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RRC (" + $index$$47$$ + ")"; break; case 15: - $inst$$inline_103_location$$28_offset$$16$$ = "LD A,RRC (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD A,RRC (" + $index$$47$$ + ")"; break; case 16: - $inst$$inline_103_location$$28_offset$$16$$ = "LD B,RL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD B,RL (" + $index$$47$$ + ")"; break; case 17: - $inst$$inline_103_location$$28_offset$$16$$ = "LD C,RL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD C,RL (" + $index$$47$$ + ")"; break; case 18: - $inst$$inline_103_location$$28_offset$$16$$ = "LD D,RL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD D,RL (" + $index$$47$$ + ")"; break; case 19: - $inst$$inline_103_location$$28_offset$$16$$ = "LD E,RL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD E,RL (" + $index$$47$$ + ")"; break; case 20: - $inst$$inline_103_location$$28_offset$$16$$ = "LD H,RL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD H,RL (" + $index$$47$$ + ")"; break; case 21: - $inst$$inline_103_location$$28_offset$$16$$ = "LD L,RL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD L,RL (" + $index$$47$$ + ")"; break; case 22: - $inst$$inline_103_location$$28_offset$$16$$ = "RL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RL (" + $index$$47$$ + ")"; break; case 23: - $inst$$inline_103_location$$28_offset$$16$$ = "LD A,RL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD A,RL (" + $index$$47$$ + ")"; break; case 24: - $inst$$inline_103_location$$28_offset$$16$$ = "LD B,RR (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD B,RR (" + $index$$47$$ + ")"; break; case 25: - $inst$$inline_103_location$$28_offset$$16$$ = "LD C,RR (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD C,RR (" + $index$$47$$ + ")"; break; case 26: - $inst$$inline_103_location$$28_offset$$16$$ = "LD D,RR (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD D,RR (" + $index$$47$$ + ")"; break; case 27: - $inst$$inline_103_location$$28_offset$$16$$ = "LD E,RR (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD E,RR (" + $index$$47$$ + ")"; break; case 28: - $inst$$inline_103_location$$28_offset$$16$$ = "LD H,RR (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD H,RR (" + $index$$47$$ + ")"; break; case 29: - $inst$$inline_103_location$$28_offset$$16$$ = "LD L,RR (" + $index$$46$$ + ")"; - $code$$8_code$$inline_104$$ = $inst$$3_location$$inline_100$$ + "this.l = this.rr(this.readMem(location)); this.writeMem(location, this.l);"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD L,RR (" + $index$$47$$ + ")"; + $code$$8_code$$inline_155$$ = $inst$$3_location$$inline_151$$ + "this.l = this.rr(this.readMem(location)); this.writeMem(location, this.l);"; break; case 30: - $inst$$inline_103_location$$28_offset$$16$$ = "RR (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RR (" + $index$$47$$ + ")"; break; case 31: - $inst$$inline_103_location$$28_offset$$16$$ = "LD A,RR (" + $index$$46$$ + ")"; - $code$$8_code$$inline_104$$ = $inst$$3_location$$inline_100$$ + "this.a = this.rr(this.readMem(location)); this.writeMem(location, this.a);"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD A,RR (" + $index$$47$$ + ")"; + $code$$8_code$$inline_155$$ = $inst$$3_location$$inline_151$$ + "this.a = this.rr(this.readMem(location)); this.writeMem(location, this.a);"; break; case 32: - $inst$$inline_103_location$$28_offset$$16$$ = "LD B,SLA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD B,SLA (" + $index$$47$$ + ")"; break; case 33: - $inst$$inline_103_location$$28_offset$$16$$ = "LD C,SLA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD C,SLA (" + $index$$47$$ + ")"; break; case 34: - $inst$$inline_103_location$$28_offset$$16$$ = "LD D,SLA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD D,SLA (" + $index$$47$$ + ")"; break; case 35: - $inst$$inline_103_location$$28_offset$$16$$ = "LD E,SLA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD E,SLA (" + $index$$47$$ + ")"; break; case 36: - $inst$$inline_103_location$$28_offset$$16$$ = "LD H,SLA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD H,SLA (" + $index$$47$$ + ")"; break; case 37: - $inst$$inline_103_location$$28_offset$$16$$ = "LD L,SLA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD L,SLA (" + $index$$47$$ + ")"; break; case 38: - $inst$$inline_103_location$$28_offset$$16$$ = "SLA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SLA (" + $index$$47$$ + ")"; break; case 39: - $inst$$inline_103_location$$28_offset$$16$$ = "LD A,SLA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD A,SLA (" + $index$$47$$ + ")"; break; case 40: - $inst$$inline_103_location$$28_offset$$16$$ = "LD B,SRA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD B,SRA (" + $index$$47$$ + ")"; break; case 41: - $inst$$inline_103_location$$28_offset$$16$$ = "LD C,SRA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD C,SRA (" + $index$$47$$ + ")"; break; case 42: - $inst$$inline_103_location$$28_offset$$16$$ = "LD D,SRA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD D,SRA (" + $index$$47$$ + ")"; break; case 43: - $inst$$inline_103_location$$28_offset$$16$$ = "LD E,SRA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD E,SRA (" + $index$$47$$ + ")"; break; case 44: - $inst$$inline_103_location$$28_offset$$16$$ = "LD H,SRA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD H,SRA (" + $index$$47$$ + ")"; break; case 45: - $inst$$inline_103_location$$28_offset$$16$$ = "LD L,SRA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD L,SRA (" + $index$$47$$ + ")"; break; case 46: - $inst$$inline_103_location$$28_offset$$16$$ = "SRA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SRA (" + $index$$47$$ + ")"; break; case 47: - $inst$$inline_103_location$$28_offset$$16$$ = "LD A,SRA (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD A,SRA (" + $index$$47$$ + ")"; break; case 48: - $inst$$inline_103_location$$28_offset$$16$$ = "LD B,SLL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD B,SLL (" + $index$$47$$ + ")"; break; case 49: - $inst$$inline_103_location$$28_offset$$16$$ = "LD C,SLL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD C,SLL (" + $index$$47$$ + ")"; break; case 50: - $inst$$inline_103_location$$28_offset$$16$$ = "LD D,SLL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD D,SLL (" + $index$$47$$ + ")"; break; case 51: - $inst$$inline_103_location$$28_offset$$16$$ = "LD E,SLL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD E,SLL (" + $index$$47$$ + ")"; break; case 52: - $inst$$inline_103_location$$28_offset$$16$$ = "LD H,SLL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD H,SLL (" + $index$$47$$ + ")"; break; case 53: - $inst$$inline_103_location$$28_offset$$16$$ = "LD L,SLL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD L,SLL (" + $index$$47$$ + ")"; break; case 54: - $inst$$inline_103_location$$28_offset$$16$$ = "SLL (" + $index$$46$$ + ") *"; + $inst$$inline_154_location$$25_offset$$17$$ = "SLL (" + $index$$47$$ + ") *"; break; case 55: - $inst$$inline_103_location$$28_offset$$16$$ = "LD A,SLL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD A,SLL (" + $index$$47$$ + ")"; break; case 56: - $inst$$inline_103_location$$28_offset$$16$$ = "LD B,SRL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD B,SRL (" + $index$$47$$ + ")"; break; case 57: - $inst$$inline_103_location$$28_offset$$16$$ = "LD C,SRL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD C,SRL (" + $index$$47$$ + ")"; break; case 58: - $inst$$inline_103_location$$28_offset$$16$$ = "LD D,SRL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD D,SRL (" + $index$$47$$ + ")"; break; case 59: - $inst$$inline_103_location$$28_offset$$16$$ = "LD E,SRL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD E,SRL (" + $index$$47$$ + ")"; break; case 60: - $inst$$inline_103_location$$28_offset$$16$$ = "LD H,SRL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD H,SRL (" + $index$$47$$ + ")"; break; case 61: - $inst$$inline_103_location$$28_offset$$16$$ = "LD L,SRL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD L,SRL (" + $index$$47$$ + ")"; break; case 62: - $inst$$inline_103_location$$28_offset$$16$$ = "SRL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SRL (" + $index$$47$$ + ")"; break; case 63: - $inst$$inline_103_location$$28_offset$$16$$ = "LD A,SRL (" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "LD A,SRL (" + $index$$47$$ + ")"; break; case 64: ; @@ -4638,7 +4745,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 70: ; case 71: - $inst$$inline_103_location$$28_offset$$16$$ = "BIT 0,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "BIT 0,(" + $index$$47$$ + ")"; break; case 72: ; @@ -4655,7 +4762,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 78: ; case 79: - $inst$$inline_103_location$$28_offset$$16$$ = "BIT 1,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "BIT 1,(" + $index$$47$$ + ")"; break; case 80: ; @@ -4672,7 +4779,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 86: ; case 87: - $inst$$inline_103_location$$28_offset$$16$$ = "BIT 2,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "BIT 2,(" + $index$$47$$ + ")"; break; case 88: ; @@ -4689,7 +4796,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 94: ; case 95: - $inst$$inline_103_location$$28_offset$$16$$ = "BIT 3,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "BIT 3,(" + $index$$47$$ + ")"; break; case 96: ; @@ -4706,7 +4813,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 102: ; case 103: - $inst$$inline_103_location$$28_offset$$16$$ = "BIT 4,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "BIT 4,(" + $index$$47$$ + ")"; break; case 104: ; @@ -4723,7 +4830,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 110: ; case 111: - $inst$$inline_103_location$$28_offset$$16$$ = "BIT 5,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "BIT 5,(" + $index$$47$$ + ")"; break; case 112: ; @@ -4740,7 +4847,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 118: ; case 119: - $inst$$inline_103_location$$28_offset$$16$$ = "BIT 6,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "BIT 6,(" + $index$$47$$ + ")"; break; case 120: ; @@ -4757,7 +4864,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 126: ; case 127: - $inst$$inline_103_location$$28_offset$$16$$ = "BIT 7,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "BIT 7,(" + $index$$47$$ + ")"; break; case 128: ; @@ -4774,7 +4881,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 134: ; case 135: - $inst$$inline_103_location$$28_offset$$16$$ = "RES 0,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RES 0,(" + $index$$47$$ + ")"; break; case 136: ; @@ -4791,7 +4898,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 142: ; case 143: - $inst$$inline_103_location$$28_offset$$16$$ = "RES 1,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RES 1,(" + $index$$47$$ + ")"; break; case 144: ; @@ -4808,7 +4915,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 150: ; case 151: - $inst$$inline_103_location$$28_offset$$16$$ = "RES 2,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RES 2,(" + $index$$47$$ + ")"; break; case 152: ; @@ -4825,7 +4932,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 158: ; case 159: - $inst$$inline_103_location$$28_offset$$16$$ = "RES 3,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RES 3,(" + $index$$47$$ + ")"; break; case 160: ; @@ -4842,7 +4949,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 166: ; case 167: - $inst$$inline_103_location$$28_offset$$16$$ = "RES 4,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RES 4,(" + $index$$47$$ + ")"; break; case 168: ; @@ -4859,7 +4966,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 174: ; case 175: - $inst$$inline_103_location$$28_offset$$16$$ = "RES 5,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RES 5,(" + $index$$47$$ + ")"; break; case 176: ; @@ -4876,7 +4983,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 182: ; case 183: - $inst$$inline_103_location$$28_offset$$16$$ = "RES 6,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RES 6,(" + $index$$47$$ + ")"; break; case 184: ; @@ -4893,7 +5000,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 190: ; case 191: - $inst$$inline_103_location$$28_offset$$16$$ = "RES 7,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "RES 7,(" + $index$$47$$ + ")"; break; case 192: ; @@ -4910,7 +5017,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 198: ; case 199: - $inst$$inline_103_location$$28_offset$$16$$ = "SET 0,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SET 0,(" + $index$$47$$ + ")"; break; case 200: ; @@ -4927,7 +5034,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 206: ; case 207: - $inst$$inline_103_location$$28_offset$$16$$ = "SET 1,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SET 1,(" + $index$$47$$ + ")"; break; case 208: ; @@ -4944,7 +5051,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 214: ; case 215: - $inst$$inline_103_location$$28_offset$$16$$ = "SET 2,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SET 2,(" + $index$$47$$ + ")"; break; case 216: ; @@ -4961,7 +5068,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 222: ; case 223: - $inst$$inline_103_location$$28_offset$$16$$ = "SET 3,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SET 3,(" + $index$$47$$ + ")"; break; case 224: ; @@ -4978,7 +5085,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 230: ; case 231: - $inst$$inline_103_location$$28_offset$$16$$ = "SET 4,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SET 4,(" + $index$$47$$ + ")"; break; case 232: ; @@ -4995,7 +5102,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 238: ; case 239: - $inst$$inline_103_location$$28_offset$$16$$ = "SET 5,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SET 5,(" + $index$$47$$ + ")"; break; case 240: ; @@ -5012,7 +5119,7 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 246: ; case 247: - $inst$$inline_103_location$$28_offset$$16$$ = "SET 6,(" + $index$$46$$ + ")"; + $inst$$inline_154_location$$25_offset$$17$$ = "SET 6,(" + $index$$47$$ + ")"; break; case 248: ; @@ -5029,2066 +5136,2066 @@ function $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_getIndex case 254: ; case 255: - $inst$$inline_103_location$$28_offset$$16$$ = "SET 7,(" + $index$$46$$ + ")" + $inst$$inline_154_location$$25_offset$$17$$ = "SET 7,(" + $index$$47$$ + ")"; } - $address$$11_address$$inline_98$$++; - $inst$$3_location$$inline_100$$ = $inst$$inline_103_location$$28_offset$$16$$; - $opcodesArray$$3$$ = $opcodesArray$$3$$.concat($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_102$$); + $address$$11_address$$inline_149$$++; + $inst$$3_location$$inline_151$$ = $inst$$inline_154_location$$25_offset$$17$$; + $opcodesArray$$3$$ = $opcodesArray$$3$$.concat($JSCompiler_StaticMethods_getIndex$self_opcodesArray$$inline_153$$); break; case 225: - $inst$$3_location$$inline_100$$ = "POP " + $index$$46$$; - $code$$8_code$$inline_104$$ = "this.set" + $index$$46$$ + "(this.readMemWord(this.sp)); this.sp += 0x02;"; + $inst$$3_location$$inline_151$$ = "POP " + $index$$47$$; + $code$$8_code$$inline_155$$ = "this.set" + $index$$47$$ + "(this.readMemWord(this.sp)); this.sp += 0x02;"; break; case 227: - $inst$$3_location$$inline_100$$ = "EX SP,(" + $index$$46$$ + ")"; - $code$$8_code$$inline_104$$ = "temp = this.get" + $index$$46$$ + "();this.set" + $index$$46$$ + "(this.readMemWord(this.sp));this.writeMem(this.sp, temp & 0xFF);this.writeMem(this.sp + 1, temp >> 8);"; + $inst$$3_location$$inline_151$$ = "EX SP,(" + $index$$47$$ + ")"; + $code$$8_code$$inline_155$$ = "temp = this.get" + $index$$47$$ + "();this.set" + $index$$47$$ + "(this.readMemWord(this.sp));this.writeMem(this.sp, temp & 0xFF);this.writeMem(this.sp + 1, temp >> 8);"; break; case 229: - $inst$$3_location$$inline_100$$ = "PUSH " + $index$$46$$; - $code$$8_code$$inline_104$$ = "this.push2(this." + $index$$46$$.toLowerCase() + "H, this." + $index$$46$$.toLowerCase() + "L);"; + $inst$$3_location$$inline_151$$ = "PUSH " + $index$$47$$; + $code$$8_code$$inline_155$$ = "this.push2(this." + $index$$47$$.toLowerCase() + "H, this." + $index$$47$$.toLowerCase() + "L);"; break; case 233: - $inst$$3_location$$inline_100$$ = "JP (" + $index$$46$$ + ")"; - $code$$8_code$$inline_104$$ = "this.pc = this.get" + $index$$46$$ + "(); return;"; - $address$$11_address$$inline_98$$ = null; + $inst$$3_location$$inline_151$$ = "JP (" + $index$$47$$ + ")"; + $code$$8_code$$inline_155$$ = "this.pc = this.get" + $index$$47$$ + "(); return;"; + $address$$11_address$$inline_149$$ = null; break; case 249: - $inst$$3_location$$inline_100$$ = "LD SP," + $index$$46$$, $code$$8_code$$inline_104$$ = "this.sp = this.get" + $index$$46$$ + "();" + $inst$$3_location$$inline_151$$ = "LD SP," + $index$$47$$, $code$$8_code$$inline_155$$ = "this.sp = this.get" + $index$$47$$ + "();"; } - return{$opcode$:$opcode$$9$$, $opcodes$:$opcodesArray$$3$$, $inst$:$inst$$3_location$$inline_100$$, code:$code$$8_code$$inline_104$$, $address$:$currAddr$$3$$, $nextAddress$:$address$$11_address$$inline_98$$} + return{$opcode$:$opcode$$9$$, $opcodes$:$opcodesArray$$3$$, $inst$:$inst$$3_location$$inline_151$$, code:$code$$8_code$$inline_155$$, $address$:$currAddr$$3$$, $nextAddress$:$address$$11_address$$inline_149$$}; } function $JSCompiler_StaticMethods_disassemble$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) { - var $opcode$$6_options$$inline_126$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$), $defaultInstruction$$inline_128_opcodesArray$$ = [$opcode$$6_options$$inline_126$$], $address$$inline_107_inst_opcode$$inline_117$$ = "Unknown Opcode", $currAddr_hexOpcodes$$inline_130$$ = $address$$8$$, $address$$inline_115_target$$46$$ = null, $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = 'throw "Unimplemented opcode ' + $JSSMS$Utils$toHex$$($opcode$$6_options$$inline_126$$) + - '";', $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "", $currAddr$$inline_120_inst$$inline_110_location$$26$$ = 0; + var $opcode$$6_options$$inline_177$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$), $defaultInstruction$$inline_179_opcodesArray$$ = [$opcode$$6_options$$inline_177$$], $address$$inline_158_inst_opcode$$inline_168$$ = "Unknown Opcode", $currAddr_hexOpcodes$$inline_181$$ = $address$$8$$, $address$$inline_166_target$$46$$ = null, $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = 'throw "Unimplemented opcode ' + $JSSMS$Utils$toHex$$($opcode$$6_options$$inline_177$$) + + '";', $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "", $currAddr$$inline_171_inst$$inline_161_location$$23$$ = 0; $address$$8$$++; - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = {}; - switch($opcode$$6_options$$inline_126$$) { + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = {}; + switch($opcode$$6_options$$inline_177$$) { case 0: - $address$$inline_107_inst_opcode$$inline_117$$ = "NOP"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = ""; + $address$$inline_158_inst_opcode$$inline_168$$ = "NOP"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = ""; break; case 1: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD BC," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setBC(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD BC," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setBC(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$ += 2; break; case 2: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (BC),A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getBC(), this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (BC),A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getBC(), this.a);"; break; case 3: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC BC"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.incBC();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC BC"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.incBC();"; break; case 4: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.inc8(this.b);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.inc8(this.b);"; break; case 5: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.dec8(this.b);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.dec8(this.b);"; break; case 6: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD B," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ";"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD B," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ";"; $address$$8$$++; break; case 7: - $address$$inline_107_inst_opcode$$inline_117$$ = "RLCA"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.rlca_a();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RLCA"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.rlca_a();"; break; case 8: - $address$$inline_107_inst_opcode$$inline_117$$ = "EX AF AF'"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.exAF();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "EX AF AF'"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.exAF();"; break; case 9: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD HL,BC"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setHL(this.add16(this.getHL(), this.getBC()));"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD HL,BC"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setHL(this.add16(this.getHL(), this.getBC()));"; break; case 10: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,(BC)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.readMem(this.getBC());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,(BC)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.readMem(this.getBC());"; break; case 11: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC BC"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.decBC();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC BC"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.decBC();"; break; case 12: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = this.inc8(this.c);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = this.inc8(this.c);"; break; case 13: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = this.dec8(this.c);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = this.dec8(this.c);"; break; case 14: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD C," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ";"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD C," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ";"; $address$$8$$++; break; case 15: - $address$$inline_107_inst_opcode$$inline_117$$ = "RRCA"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.rrca_a();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RRCA"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.rrca_a();"; break; case 16: - $address$$inline_115_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); - $address$$inline_107_inst_opcode$$inline_117$$ = "DJNZ (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.b - 0x01 & 0xFF;if (this.b != 0x00) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); + $address$$inline_158_inst_opcode$$inline_168$$ = "DJNZ (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.b - 0x01 & 0xFF;if (this.b != 0x00) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$++; break; case 17: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD DE," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setDE(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD DE," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setDE(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$ += 2; break; case 18: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (DE),A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getDE(), this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (DE),A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getDE(), this.a);"; break; case 19: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC DE"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.incDE();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC DE"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.incDE();"; break; case 20: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = this.inc8(this.d);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = this.inc8(this.d);"; break; case 21: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = this.dec8(this.d);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = this.dec8(this.d);"; break; case 22: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD D," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ";"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD D," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ";"; $address$$8$$++; break; case 23: - $address$$inline_107_inst_opcode$$inline_117$$ = "RLA"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.rla_a();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RLA"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.rla_a();"; break; case 24: - $address$$inline_115_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); - $address$$inline_107_inst_opcode$$inline_117$$ = "JR (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); + $address$$inline_158_inst_opcode$$inline_168$$ = "JR (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; $address$$8$$ = null; break; case 25: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD HL,DE"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setHL(this.add16(this.getHL(), this.getDE()));"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD HL,DE"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setHL(this.add16(this.getHL(), this.getDE()));"; break; case 26: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,(DE)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.readMem(this.getDE());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,(DE)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.readMem(this.getDE());"; break; case 27: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC DE"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.decDE();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC DE"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.decDE();"; break; case 28: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = this.inc8(this.e);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = this.inc8(this.e);"; break; case 29: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = this.dec8(this.e);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = this.dec8(this.e);"; break; case 30: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD E," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ";"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD E," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ";"; $address$$8$$++; break; case 31: - $address$$inline_107_inst_opcode$$inline_117$$ = "RRA"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.rra_a();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RRA"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.rra_a();"; break; case 32: - $address$$inline_115_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); - $address$$inline_107_inst_opcode$$inline_117$$ = "JR NZ,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if (!((this.f & F_ZERO) != 0x00)) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); + $address$$inline_158_inst_opcode$$inline_168$$ = "JR NZ,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if (!((this.f & F_ZERO) != 0x00)) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$++; break; case 33: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD HL," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setHL(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD HL," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setHL(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$ += 2; break; case 34: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($currAddr$$inline_120_inst$$inline_110_location$$26$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + "),HL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ", this.l);this.writeMem(" + $JSSMS$Utils$toHex$$($currAddr$$inline_120_inst$$inline_110_location$$26$$ + 1) + ", this.h);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($currAddr$$inline_171_inst$$inline_161_location$$23$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + "),HL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ", this.l);this.writeMem(" + $JSSMS$Utils$toHex$$($currAddr$$inline_171_inst$$inline_161_location$$23$$ + 1) + ", this.h);"; $address$$8$$ += 2; break; case 35: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC HL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.incHL();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC HL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.incHL();"; break; case 36: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = this.inc8(this.h);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = this.inc8(this.h);"; break; case 37: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = this.dec8(this.h);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = this.dec8(this.h);"; break; case 38: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD H," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ";"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD H," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ";"; $address$$8$$++; break; case 39: - $address$$inline_107_inst_opcode$$inline_117$$ = "DAA"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.daa();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DAA"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.daa();"; break; case 40: - $address$$inline_115_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); - $address$$inline_107_inst_opcode$$inline_117$$ = "JR Z,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_ZERO) != 0x00) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); + $address$$inline_158_inst_opcode$$inline_168$$ = "JR Z,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_ZERO) != 0x00) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$++; break; case 41: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD HL,HL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setHL(this.add16(this.getHL(), this.getHL()));"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD HL,HL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setHL(this.add16(this.getHL(), this.getHL()));"; break; case 42: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD HL,(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setHL(this.readMemWord(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + "));"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD HL,(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setHL(this.readMemWord(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + "));"; $address$$8$$ += 2; break; case 43: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC HL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.decHL();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC HL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.decHL();"; break; case 44: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = this.inc8(this.l);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = this.inc8(this.l);"; break; case 45: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = this.dec8(this.l);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = this.dec8(this.l);"; break; case 46: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD L," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ";"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD L," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ";"; $address$$8$$++; break; case 47: - $address$$inline_107_inst_opcode$$inline_117$$ = "CPL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cpl_a();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CPL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cpl_a();"; break; case 48: - $address$$inline_115_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); - $address$$inline_107_inst_opcode$$inline_117$$ = "JR NC,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if (!((this.f & F_CARRY) != 0x00)) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); + $address$$inline_158_inst_opcode$$inline_168$$ = "JR NC,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if (!((this.f & F_CARRY) != 0x00)) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$++; break; case 49: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD SP," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sp = " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ";"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD SP," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sp = " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ";"; $address$$8$$ += 2; break; case 50: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + "),A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ", this.a);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + "),A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ", this.a);"; $address$$8$$ += 2; break; case 51: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC SP"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sp++;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC SP"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sp++;"; break; case 52: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC (HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.incMem(this.getHL());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC (HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.incMem(this.getHL());"; break; case 53: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC (HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.decMem(this.getHL());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC (HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.decMem(this.getHL());"; break; case 54: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (HL)," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getHL(), " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (HL)," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getHL(), " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$++; break; case 55: - $address$$inline_107_inst_opcode$$inline_117$$ = "SCF"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f |= F_CARRY; this.f &= ~ F_NEGATIVE; this.f &= ~ F_HALFCARRY;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SCF"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f |= F_CARRY; this.f &= ~ F_NEGATIVE; this.f &= ~ F_HALFCARRY;"; break; case 56: - $address$$inline_115_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); - $address$$inline_107_inst_opcode$$inline_117$$ = "JR C,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $address$$8$$ + $JSCompiler_StaticMethods_signExtend$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$) + 1); + $address$$inline_158_inst_opcode$$inline_168$$ = "JR C,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$++; break; case 57: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD HL,SP"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setHL(this.add16(this.getHL(), this.sp));"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD HL,SP"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setHL(this.add16(this.getHL(), this.sp));"; break; case 58: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.readMem(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.readMem(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$ += 2; break; case 59: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC SP"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sp--;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC SP"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sp--;"; break; case 60: - $address$$inline_107_inst_opcode$$inline_117$$ = "INC A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.inc8(this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "INC A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.inc8(this.a);"; break; case 61: - $address$$inline_107_inst_opcode$$inline_117$$ = "DEC A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.dec8(this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DEC A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.dec8(this.a);"; break; case 62: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ";"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ";"; $address$$8$$++; break; case 63: - $address$$inline_107_inst_opcode$$inline_117$$ = "CCF"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.ccf();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CCF"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.ccf();"; break; case 64: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD B,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = ""; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD B,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = ""; break; case 65: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD B,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.c;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD B,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.c;"; break; case 66: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD B,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.d;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD B,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.d;"; break; case 67: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD B,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.e;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD B,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.e;"; break; case 68: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD B,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.h;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD B,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.h;"; break; case 69: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD B,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.l;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD B,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.l;"; break; case 70: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD B,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.readMem(this.getHL());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD B,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.readMem(this.getHL());"; break; case 71: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD B,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.b = this.a;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD B,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.b = this.a;"; break; case 72: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD C,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = this.b;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD C,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = this.b;"; break; case 73: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD C,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = ""; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD C,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = ""; break; case 74: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD C,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = this.d;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD C,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = this.d;"; break; case 75: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD C,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = this.e;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD C,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = this.e;"; break; case 76: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD C,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = this.h;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD C,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = this.h;"; break; case 77: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD C,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = this.l;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD C,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = this.l;"; break; case 78: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD C,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = this.readMem(this.getHL());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD C,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = this.readMem(this.getHL());"; break; case 79: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD C,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.c = this.a;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD C,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.c = this.a;"; break; case 80: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD D,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = this.b;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD D,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = this.b;"; break; case 81: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD D,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = this.c;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD D,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = this.c;"; break; case 82: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD D,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = ""; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD D,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = ""; break; case 83: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD D,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = this.e;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD D,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = this.e;"; break; case 84: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD D,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = this.h;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD D,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = this.h;"; break; case 85: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD D,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = this.l;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD D,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = this.l;"; break; case 86: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD D,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = this.readMem(this.getHL());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD D,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = this.readMem(this.getHL());"; break; case 87: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD D,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.d = this.a;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD D,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.d = this.a;"; break; case 88: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD E,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = this.b;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD E,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = this.b;"; break; case 89: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD E,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = this.c;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD E,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = this.c;"; break; case 90: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD E,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = this.d;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD E,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = this.d;"; break; case 91: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD E,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = ""; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD E,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = ""; break; case 92: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD E,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = this.h;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD E,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = this.h;"; break; case 93: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD E,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = this.l;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD E,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = this.l;"; break; case 94: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD E,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = this.readMem(this.getHL());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD E,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = this.readMem(this.getHL());"; break; case 95: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD E,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.e = this.a;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD E,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.e = this.a;"; break; case 96: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD H,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = this.b;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD H,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = this.b;"; break; case 97: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD H,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = this.c;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD H,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = this.c;"; break; case 98: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD H,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = this.d;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD H,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = this.d;"; break; case 99: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD H,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = this.e;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD H,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = this.e;"; break; case 100: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD H,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = ""; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD H,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = ""; break; case 101: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD H,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = this.l;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD H,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = this.l;"; break; case 102: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD H,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = this.readMem(this.getHL());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD H,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = this.readMem(this.getHL());"; break; case 103: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD H,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.h = this.a;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD H,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.h = this.a;"; break; case 104: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD L,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = this.b;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD L,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = this.b;"; break; case 105: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD L,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = this.c;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD L,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = this.c;"; break; case 106: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD L,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = this.d;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD L,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = this.d;"; break; case 107: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD L,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = this.e;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD L,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = this.e;"; break; case 108: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD L,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = this.h;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD L,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = this.h;"; break; case 109: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD L,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = ""; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD L,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = ""; break; case 110: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD L,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = this.readMem(this.getHL());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD L,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = this.readMem(this.getHL());"; break; case 111: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD L,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.l = this.a;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD L,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.l = this.a;"; break; case 112: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (HL),B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getHL(), this.b);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (HL),B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getHL(), this.b);"; break; case 113: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (HL),C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getHL(), this.c);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (HL),C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getHL(), this.c);"; break; case 114: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (HL),D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getHL(), this.d);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (HL),D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getHL(), this.d);"; break; case 115: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (HL),E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getHL(), this.e);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (HL),E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getHL(), this.e);"; break; case 116: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (HL),H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getHL(), this.h);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (HL),H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getHL(), this.h);"; break; case 117: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (HL),L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getHL(), this.l);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (HL),L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getHL(), this.l);"; break; case 118: - $address$$inline_107_inst_opcode$$inline_117$$ = "HALT"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.tstates = 0x00;" + ("this.halt = true; this.pc = " + $JSSMS$Utils$toHex$$($address$$8$$ - 1) + "; return;"); + $address$$inline_158_inst_opcode$$inline_168$$ = "HALT"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.tstates = 0x00;" + ("this.halt = true; this.pc = " + $JSSMS$Utils$toHex$$($address$$8$$ - 1) + "; return;"); break; case 119: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD (HL),A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.writeMem(this.getHL(), this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD (HL),A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.writeMem(this.getHL(), this.a);"; break; case 120: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.b;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.b;"; break; case 121: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.c;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.c;"; break; case 122: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.d;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.d;"; break; case 123: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.e;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.e;"; break; case 124: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.h;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.h;"; break; case 125: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.l;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.l;"; break; case 126: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.readMem(this.getHL());"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = this.readMem(this.getHL());"; break; case 127: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD A,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = ""; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD A,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = ""; break; case 128: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD A,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.add_a(this.b);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD A,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.add_a(this.b);"; break; case 129: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD A,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.add_a(this.c);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD A,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.add_a(this.c);"; break; case 130: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD A,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.add_a(this.d);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD A,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.add_a(this.d);"; break; case 131: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD A,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.add_a(this.e);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD A,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.add_a(this.e);"; break; case 132: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD A,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.add_a(this.h);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD A,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.add_a(this.h);"; break; case 133: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD A,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.add_a(this.l);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD A,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.add_a(this.l);"; break; case 134: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD A,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.add_a(this.readMem(this.getHL()));"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD A,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.add_a(this.readMem(this.getHL()));"; break; case 135: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD A,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.add_a(this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD A,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.add_a(this.a);"; break; case 136: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADC A,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.adc_a(this.b);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADC A,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.adc_a(this.b);"; break; case 137: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADC A,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.adc_a(this.c);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADC A,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.adc_a(this.c);"; break; case 138: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADC A,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.adc_a(this.d);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADC A,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.adc_a(this.d);"; break; case 139: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADC A,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.adc_a(this.e);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADC A,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.adc_a(this.e);"; break; case 140: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADC A,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.adc_a(this.h);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADC A,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.adc_a(this.h);"; break; case 141: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADC A,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.adc_a(this.l);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADC A,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.adc_a(this.l);"; break; case 142: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADC A,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.adc_a(this.readMem(this.getHL()));"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADC A,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.adc_a(this.readMem(this.getHL()));"; break; case 143: - $address$$inline_107_inst_opcode$$inline_117$$ = "ADC A,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.adc_a(this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "ADC A,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.adc_a(this.a);"; break; case 144: - $address$$inline_107_inst_opcode$$inline_117$$ = "SUB A,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sub_a(this.b);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SUB A,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sub_a(this.b);"; break; case 145: - $address$$inline_107_inst_opcode$$inline_117$$ = "SUB A,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sub_a(this.c);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SUB A,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sub_a(this.c);"; break; case 146: - $address$$inline_107_inst_opcode$$inline_117$$ = "SUB A,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sub_a(this.d);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SUB A,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sub_a(this.d);"; break; case 147: - $address$$inline_107_inst_opcode$$inline_117$$ = "SUB A,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sub_a(this.e);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SUB A,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sub_a(this.e);"; break; case 148: - $address$$inline_107_inst_opcode$$inline_117$$ = "SUB A,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sub_a(this.h);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SUB A,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sub_a(this.h);"; break; case 149: - $address$$inline_107_inst_opcode$$inline_117$$ = "SUB A,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sub_a(this.l);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SUB A,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sub_a(this.l);"; break; case 150: - $address$$inline_107_inst_opcode$$inline_117$$ = "SUB A,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sub_a(this.readMem(this.getHL()));"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SUB A,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sub_a(this.readMem(this.getHL()));"; break; case 151: - $address$$inline_107_inst_opcode$$inline_117$$ = "SUB A,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sub_a(this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SUB A,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sub_a(this.a);"; break; case 152: - $address$$inline_107_inst_opcode$$inline_117$$ = "SBC A,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sbc_a(this.b);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SBC A,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sbc_a(this.b);"; break; case 153: - $address$$inline_107_inst_opcode$$inline_117$$ = "SBC A,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sbc_a(this.c);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SBC A,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sbc_a(this.c);"; break; case 154: - $address$$inline_107_inst_opcode$$inline_117$$ = "SBC A,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sbc_a(this.d);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SBC A,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sbc_a(this.d);"; break; case 155: - $address$$inline_107_inst_opcode$$inline_117$$ = "SBC A,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sbc_a(this.e);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SBC A,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sbc_a(this.e);"; break; case 156: - $address$$inline_107_inst_opcode$$inline_117$$ = "SBC A,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sbc_a(this.h);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SBC A,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sbc_a(this.h);"; break; case 157: - $address$$inline_107_inst_opcode$$inline_117$$ = "SBC A,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sbc_a(this.l);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SBC A,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sbc_a(this.l);"; break; case 158: - $address$$inline_107_inst_opcode$$inline_117$$ = "SBC A,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sbc_a(this.readMem(this.getHL()));"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SBC A,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sbc_a(this.readMem(this.getHL()));"; break; case 159: - $address$$inline_107_inst_opcode$$inline_117$$ = "SBC A,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sbc_a(this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "SBC A,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sbc_a(this.a);"; break; case 160: - $address$$inline_107_inst_opcode$$inline_117$$ = "AND A,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a &= this.b] | F_HALFCARRY;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "AND A,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a &= this.b] | F_HALFCARRY;"; break; case 161: - $address$$inline_107_inst_opcode$$inline_117$$ = "AND A,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a &= this.c] | F_HALFCARRY;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "AND A,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a &= this.c] | F_HALFCARRY;"; break; case 162: - $address$$inline_107_inst_opcode$$inline_117$$ = "AND A,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a &= this.d] | F_HALFCARRY;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "AND A,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a &= this.d] | F_HALFCARRY;"; break; case 163: - $address$$inline_107_inst_opcode$$inline_117$$ = "AND A,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a &= this.e] | F_HALFCARRY;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "AND A,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a &= this.e] | F_HALFCARRY;"; break; case 164: - $address$$inline_107_inst_opcode$$inline_117$$ = "AND A,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a &= this.h] | F_HALFCARRY;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "AND A,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a &= this.h] | F_HALFCARRY;"; break; case 165: - $address$$inline_107_inst_opcode$$inline_117$$ = "AND A,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a &= this.l] | F_HALFCARRY;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "AND A,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a &= this.l] | F_HALFCARRY;"; break; case 166: - $address$$inline_107_inst_opcode$$inline_117$$ = "AND A,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a &= this.readMem(this.getHL())] | F_HALFCARRY;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "AND A,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a &= this.readMem(this.getHL())] | F_HALFCARRY;"; break; case 167: - $address$$inline_107_inst_opcode$$inline_117$$ = "AND A,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a] | F_HALFCARRY;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "AND A,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a] | F_HALFCARRY;"; break; case 168: - $address$$inline_107_inst_opcode$$inline_117$$ = "XOR A,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a ^= this.b];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "XOR A,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a ^= this.b];"; break; case 169: - $address$$inline_107_inst_opcode$$inline_117$$ = "XOR A,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a ^= this.c];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "XOR A,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a ^= this.c];"; break; case 170: - $address$$inline_107_inst_opcode$$inline_117$$ = "XOR A,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a ^= this.d];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "XOR A,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a ^= this.d];"; break; case 171: - $address$$inline_107_inst_opcode$$inline_117$$ = "XOR A,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a ^= this.e];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "XOR A,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a ^= this.e];"; break; case 172: - $address$$inline_107_inst_opcode$$inline_117$$ = "XOR A,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a ^= this.h];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "XOR A,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a ^= this.h];"; break; case 173: - $address$$inline_107_inst_opcode$$inline_117$$ = "XOR A,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a ^= this.l];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "XOR A,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a ^= this.l];"; break; case 174: - $address$$inline_107_inst_opcode$$inline_117$$ = "XOR A,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a ^= this.readMem(this.getHL())];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "XOR A,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a ^= this.readMem(this.getHL())];"; break; case 175: - $address$$inline_107_inst_opcode$$inline_117$$ = "XOR A,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = " + $JSSMS$Utils$toHex$$(0) + "; this.f = this.SZP_TABLE[0x00];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "XOR A,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.a = " + $JSSMS$Utils$toHex$$(0) + "; this.f = this.SZP_TABLE[0x00];"; break; case 176: - $address$$inline_107_inst_opcode$$inline_117$$ = "OR A,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a |= this.b];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "OR A,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a |= this.b];"; break; case 177: - $address$$inline_107_inst_opcode$$inline_117$$ = "OR A,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a |= this.c];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "OR A,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a |= this.c];"; break; case 178: - $address$$inline_107_inst_opcode$$inline_117$$ = "OR A,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a |= this.d];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "OR A,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a |= this.d];"; break; case 179: - $address$$inline_107_inst_opcode$$inline_117$$ = "OR A,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a |= this.e];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "OR A,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a |= this.e];"; break; case 180: - $address$$inline_107_inst_opcode$$inline_117$$ = "OR A,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a |= this.h];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "OR A,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a |= this.h];"; break; case 181: - $address$$inline_107_inst_opcode$$inline_117$$ = "OR A,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a |= this.l];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "OR A,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a |= this.l];"; break; case 182: - $address$$inline_107_inst_opcode$$inline_117$$ = "OR A,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a |= this.readMem(this.getHL())];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "OR A,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a |= this.readMem(this.getHL())];"; break; case 183: - $address$$inline_107_inst_opcode$$inline_117$$ = "OR A,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a];"; + $address$$inline_158_inst_opcode$$inline_168$$ = "OR A,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a];"; break; case 184: - $address$$inline_107_inst_opcode$$inline_117$$ = "CP A,B"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cp_a(this.b);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CP A,B"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cp_a(this.b);"; break; case 185: - $address$$inline_107_inst_opcode$$inline_117$$ = "CP A,C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cp_a(this.c);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CP A,C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cp_a(this.c);"; break; case 186: - $address$$inline_107_inst_opcode$$inline_117$$ = "CP A,D"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cp_a(this.d);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CP A,D"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cp_a(this.d);"; break; case 187: - $address$$inline_107_inst_opcode$$inline_117$$ = "CP A,E"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cp_a(this.e);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CP A,E"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cp_a(this.e);"; break; case 188: - $address$$inline_107_inst_opcode$$inline_117$$ = "CP A,H"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cp_a(this.h);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CP A,H"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cp_a(this.h);"; break; case 189: - $address$$inline_107_inst_opcode$$inline_117$$ = "CP A,L"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cp_a(this.l);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CP A,L"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cp_a(this.l);"; break; case 190: - $address$$inline_107_inst_opcode$$inline_117$$ = "CP A,(HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cp_a(this.readMem(this.getHL()));"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CP A,(HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cp_a(this.readMem(this.getHL()));"; break; case 191: - $address$$inline_107_inst_opcode$$inline_117$$ = "CP A,A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cp_a(this.a);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "CP A,A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cp_a(this.a);"; break; case 192: - $address$$inline_107_inst_opcode$$inline_117$$ = "RET NZ"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_ZERO) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RET NZ"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_ZERO) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 193: - $address$$inline_107_inst_opcode$$inline_117$$ = "POP BC"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setBC(this.readMemWord(this.sp)); this.sp += 0x02;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "POP BC"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setBC(this.readMemWord(this.sp)); this.sp += 0x02;"; break; case 194: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "JP NZ,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_ZERO) == 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "JP NZ,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_ZERO) === 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 195: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "JP (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "JP (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; $address$$8$$ = null; break; case 196: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "CALL NZ (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_ZERO) == 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "CALL NZ (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_ZERO) === 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 197: - $address$$inline_107_inst_opcode$$inline_117$$ = "PUSH BC"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push2(this.b, this.c);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "PUSH BC"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push2(this.b, this.c);"; break; case 198: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "ADD A," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.add_a(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "ADD A," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.add_a(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$++; break; case 199: - $address$$inline_115_target$$46$$ = 0; - $address$$inline_107_inst_opcode$$inline_117$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$); - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = 0; + $address$$inline_158_inst_opcode$$inline_168$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$); + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; break; case 200: - $address$$inline_107_inst_opcode$$inline_117$$ = "RET Z"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_ZERO) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RET Z"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_ZERO) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 201: - $address$$inline_107_inst_opcode$$inline_117$$ = "RET"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.pc = this.readMemWord(this.sp); this.sp += 0x02; return;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RET"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.pc = this.readMemWord(this.sp); this.sp += 0x02; return;"; $address$$8$$ = null; break; case 202: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "JP Z,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_ZERO) != 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "JP Z,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_ZERO) != 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 203: - var $address$$inline_107_inst_opcode$$inline_117$$ = $address$$8$$, $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_107_inst_opcode$$inline_117$$), $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = [$code$$5_opcode$$inline_108_opcodesArray$$inline_118$$], $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "Unimplemented 0xCB prefixed opcode", $currAddr$$inline_111_target$$inline_121$$ = - $address$$inline_107_inst_opcode$$inline_117$$, $code$$inline_112_code$$inline_122$$ = 'throw "Unimplemented 0xCB prefixed opcode";'; - $address$$inline_107_inst_opcode$$inline_117$$++; - switch($code$$5_opcode$$inline_108_opcodesArray$$inline_118$$) { + var $address$$inline_158_inst_opcode$$inline_168$$ = $address$$8$$, $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_158_inst_opcode$$inline_168$$), $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = [$code$$5_opcode$$inline_159_opcodesArray$$inline_169$$], $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "Unimplemented 0xCB prefixed opcode", $currAddr$$inline_162_target$$inline_172$$ = + $address$$inline_158_inst_opcode$$inline_168$$, $code$$inline_163_code$$inline_173$$ = 'throw "Unimplemented 0xCB prefixed opcode";'; + $address$$inline_158_inst_opcode$$inline_168$$++; + switch($code$$5_opcode$$inline_159_opcodesArray$$inline_169$$) { case 0: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RLC B"; - $code$$inline_112_code$$inline_122$$ = "this.b = this.rlc(this.b);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RLC B"; + $code$$inline_163_code$$inline_173$$ = "this.b = this.rlc(this.b);"; break; case 1: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RLC C"; - $code$$inline_112_code$$inline_122$$ = "this.c = this.rlc(this.c);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RLC C"; + $code$$inline_163_code$$inline_173$$ = "this.c = this.rlc(this.c);"; break; case 2: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RLC D"; - $code$$inline_112_code$$inline_122$$ = "this.d = this.rlc(this.d);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RLC D"; + $code$$inline_163_code$$inline_173$$ = "this.d = this.rlc(this.d);"; break; case 3: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RLC E"; - $code$$inline_112_code$$inline_122$$ = "this.e = this.rlc(this.e);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RLC E"; + $code$$inline_163_code$$inline_173$$ = "this.e = this.rlc(this.e);"; break; case 4: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RLC H"; - $code$$inline_112_code$$inline_122$$ = "this.h = this.rlc(this.h);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RLC H"; + $code$$inline_163_code$$inline_173$$ = "this.h = this.rlc(this.h);"; break; case 5: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RLC L"; - $code$$inline_112_code$$inline_122$$ = "this.l = this.rlc(this.l);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RLC L"; + $code$$inline_163_code$$inline_173$$ = "this.l = this.rlc(this.l);"; break; case 6: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RLC (HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.rlc(this.readMem(this.getHL())));"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RLC (HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.rlc(this.readMem(this.getHL())));"; break; case 7: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RLC A"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.rlc(this.a);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RLC A"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.rlc(this.a);"; break; case 8: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RRC B"; - $code$$inline_112_code$$inline_122$$ = "this.b = this.rrc(this.b);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RRC B"; + $code$$inline_163_code$$inline_173$$ = "this.b = this.rrc(this.b);"; break; case 9: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RRC C"; - $code$$inline_112_code$$inline_122$$ = "this.c = this.rrc(this.c);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RRC C"; + $code$$inline_163_code$$inline_173$$ = "this.c = this.rrc(this.c);"; break; case 10: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RRC D"; - $code$$inline_112_code$$inline_122$$ = "this.d = this.rrc(this.d);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RRC D"; + $code$$inline_163_code$$inline_173$$ = "this.d = this.rrc(this.d);"; break; case 11: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RRC E"; - $code$$inline_112_code$$inline_122$$ = "this.e = this.rrc(this.e);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RRC E"; + $code$$inline_163_code$$inline_173$$ = "this.e = this.rrc(this.e);"; break; case 12: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RRC H"; - $code$$inline_112_code$$inline_122$$ = "this.h = this.rrc(this.h);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RRC H"; + $code$$inline_163_code$$inline_173$$ = "this.h = this.rrc(this.h);"; break; case 13: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RRC L"; - $code$$inline_112_code$$inline_122$$ = "this.l = this.rrc(this.l);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RRC L"; + $code$$inline_163_code$$inline_173$$ = "this.l = this.rrc(this.l);"; break; case 14: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RRC (HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.rrc(this.readMem(this.getHL())));"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RRC (HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.rrc(this.readMem(this.getHL())));"; break; case 15: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RRC A"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.rrc(this.a);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RRC A"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.rrc(this.a);"; break; case 16: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RL B"; - $code$$inline_112_code$$inline_122$$ = "this.b = this.rl(this.b);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RL B"; + $code$$inline_163_code$$inline_173$$ = "this.b = this.rl(this.b);"; break; case 17: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RL C"; - $code$$inline_112_code$$inline_122$$ = "this.c = this.rl(this.c);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RL C"; + $code$$inline_163_code$$inline_173$$ = "this.c = this.rl(this.c);"; break; case 18: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RL D"; - $code$$inline_112_code$$inline_122$$ = "this.d = this.rl(this.d);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RL D"; + $code$$inline_163_code$$inline_173$$ = "this.d = this.rl(this.d);"; break; case 19: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RL E"; - $code$$inline_112_code$$inline_122$$ = "this.e = this.rl(this.e);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RL E"; + $code$$inline_163_code$$inline_173$$ = "this.e = this.rl(this.e);"; break; case 20: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RL H"; - $code$$inline_112_code$$inline_122$$ = "this.h = this.rl(this.h);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RL H"; + $code$$inline_163_code$$inline_173$$ = "this.h = this.rl(this.h);"; break; case 21: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RL L"; - $code$$inline_112_code$$inline_122$$ = "this.l = this.rl(this.l);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RL L"; + $code$$inline_163_code$$inline_173$$ = "this.l = this.rl(this.l);"; break; case 22: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RL (HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.rl(this.readMem(this.getHL())));"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RL (HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.rl(this.readMem(this.getHL())));"; break; case 23: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RL A"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.rl(this.a);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RL A"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.rl(this.a);"; break; case 24: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RR B"; - $code$$inline_112_code$$inline_122$$ = "this.b = this.rr(this.b);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RR B"; + $code$$inline_163_code$$inline_173$$ = "this.b = this.rr(this.b);"; break; case 25: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RR C"; - $code$$inline_112_code$$inline_122$$ = "this.c = this.rr(this.c);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RR C"; + $code$$inline_163_code$$inline_173$$ = "this.c = this.rr(this.c);"; break; case 26: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RR D"; - $code$$inline_112_code$$inline_122$$ = "this.d = this.rr(this.d);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RR D"; + $code$$inline_163_code$$inline_173$$ = "this.d = this.rr(this.d);"; break; case 27: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RR E"; - $code$$inline_112_code$$inline_122$$ = "this.e = this.rr(this.e);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RR E"; + $code$$inline_163_code$$inline_173$$ = "this.e = this.rr(this.e);"; break; case 28: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RR H"; - $code$$inline_112_code$$inline_122$$ = "this.h = this.rr(this.h);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RR H"; + $code$$inline_163_code$$inline_173$$ = "this.h = this.rr(this.h);"; break; case 29: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RR L"; - $code$$inline_112_code$$inline_122$$ = "this.l = this.rr(this.l);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RR L"; + $code$$inline_163_code$$inline_173$$ = "this.l = this.rr(this.l);"; break; case 30: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RR (HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.rr(this.readMem(this.getHL())));"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RR (HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.rr(this.readMem(this.getHL())));"; break; case 31: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RR A"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.rr(this.a);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RR A"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.rr(this.a);"; break; case 32: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLA B"; - $code$$inline_112_code$$inline_122$$ = "this.b = this.sla(this.b);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLA B"; + $code$$inline_163_code$$inline_173$$ = "this.b = this.sla(this.b);"; break; case 33: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLA C"; - $code$$inline_112_code$$inline_122$$ = "this.c = this.sla(this.c);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLA C"; + $code$$inline_163_code$$inline_173$$ = "this.c = this.sla(this.c);"; break; case 34: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLA D"; - $code$$inline_112_code$$inline_122$$ = "this.d = this.sla(this.d);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLA D"; + $code$$inline_163_code$$inline_173$$ = "this.d = this.sla(this.d);"; break; case 35: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLA E"; - $code$$inline_112_code$$inline_122$$ = "this.e = this.sla(this.e);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLA E"; + $code$$inline_163_code$$inline_173$$ = "this.e = this.sla(this.e);"; break; case 36: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLA H"; - $code$$inline_112_code$$inline_122$$ = "this.h = this.sla(this.h);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLA H"; + $code$$inline_163_code$$inline_173$$ = "this.h = this.sla(this.h);"; break; case 37: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLA L"; - $code$$inline_112_code$$inline_122$$ = "this.l = this.sla(this.l);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLA L"; + $code$$inline_163_code$$inline_173$$ = "this.l = this.sla(this.l);"; break; case 38: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLA (HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.sla(this.readMem(this.getHL())));"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLA (HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.sla(this.readMem(this.getHL())));"; break; case 39: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLA A"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.sla(this.a);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLA A"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.sla(this.a);"; break; case 40: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRA B"; - $code$$inline_112_code$$inline_122$$ = "this.b = this.sra(this.b);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRA B"; + $code$$inline_163_code$$inline_173$$ = "this.b = this.sra(this.b);"; break; case 41: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRA C"; - $code$$inline_112_code$$inline_122$$ = "this.c = this.sra(this.c);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRA C"; + $code$$inline_163_code$$inline_173$$ = "this.c = this.sra(this.c);"; break; case 42: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRA D"; - $code$$inline_112_code$$inline_122$$ = "this.d = this.sra(this.d);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRA D"; + $code$$inline_163_code$$inline_173$$ = "this.d = this.sra(this.d);"; break; case 43: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRA E"; - $code$$inline_112_code$$inline_122$$ = "this.e = this.sra(this.e);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRA E"; + $code$$inline_163_code$$inline_173$$ = "this.e = this.sra(this.e);"; break; case 44: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRA H"; - $code$$inline_112_code$$inline_122$$ = "this.h = this.sra(this.h);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRA H"; + $code$$inline_163_code$$inline_173$$ = "this.h = this.sra(this.h);"; break; case 45: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRA L"; - $code$$inline_112_code$$inline_122$$ = "this.l = this.sra(this.l);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRA L"; + $code$$inline_163_code$$inline_173$$ = "this.l = this.sra(this.l);"; break; case 46: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRA (HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.sra(this.readMem(this.getHL())));"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRA (HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.sra(this.readMem(this.getHL())));"; break; case 47: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRA A"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.sra(this.a);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRA A"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.sra(this.a);"; break; case 48: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLL B"; - $code$$inline_112_code$$inline_122$$ = "this.b = this.sll(this.b);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLL B"; + $code$$inline_163_code$$inline_173$$ = "this.b = this.sll(this.b);"; break; case 49: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLL C"; - $code$$inline_112_code$$inline_122$$ = "this.c = this.sll(this.c);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLL C"; + $code$$inline_163_code$$inline_173$$ = "this.c = this.sll(this.c);"; break; case 50: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLL D"; - $code$$inline_112_code$$inline_122$$ = "this.d = this.sll(this.d);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLL D"; + $code$$inline_163_code$$inline_173$$ = "this.d = this.sll(this.d);"; break; case 51: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLL E"; - $code$$inline_112_code$$inline_122$$ = "this.e = this.sll(this.e);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLL E"; + $code$$inline_163_code$$inline_173$$ = "this.e = this.sll(this.e);"; break; case 52: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLL H"; - $code$$inline_112_code$$inline_122$$ = "this.h = this.sll(this.h);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLL H"; + $code$$inline_163_code$$inline_173$$ = "this.h = this.sll(this.h);"; break; case 53: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLL L"; - $code$$inline_112_code$$inline_122$$ = "this.l = this.sll(this.l);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLL L"; + $code$$inline_163_code$$inline_173$$ = "this.l = this.sll(this.l);"; break; case 54: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLL (HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.sll(this.readMem(this.getHL())));"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLL (HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.sll(this.readMem(this.getHL())));"; break; case 55: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SLL A"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.sll(this.a);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SLL A"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.sll(this.a);"; break; case 56: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRL B"; - $code$$inline_112_code$$inline_122$$ = "this.b = this.srl(this.b);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRL B"; + $code$$inline_163_code$$inline_173$$ = "this.b = this.srl(this.b);"; break; case 57: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRL C"; - $code$$inline_112_code$$inline_122$$ = "this.c = this.srl(this.c);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRL C"; + $code$$inline_163_code$$inline_173$$ = "this.c = this.srl(this.c);"; break; case 58: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRL D"; - $code$$inline_112_code$$inline_122$$ = "this.d = this.srl(this.d);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRL D"; + $code$$inline_163_code$$inline_173$$ = "this.d = this.srl(this.d);"; break; case 59: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRL E"; - $code$$inline_112_code$$inline_122$$ = "this.e = this.srl(this.e);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRL E"; + $code$$inline_163_code$$inline_173$$ = "this.e = this.srl(this.e);"; break; case 60: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRL H"; - $code$$inline_112_code$$inline_122$$ = "this.h = this.srl(this.h);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRL H"; + $code$$inline_163_code$$inline_173$$ = "this.h = this.srl(this.h);"; break; case 61: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRL L"; - $code$$inline_112_code$$inline_122$$ = "this.l = this.srl(this.l);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRL L"; + $code$$inline_163_code$$inline_173$$ = "this.l = this.srl(this.l);"; break; case 62: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRL (HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.srl(this.readMem(this.getHL())));"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRL (HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.srl(this.readMem(this.getHL())));"; break; case 63: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SRL A"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.srl(this.a);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SRL A"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.srl(this.a);"; break; case 64: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 0,B"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.b & BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 0,B"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.b & BIT_0);"; break; case 65: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 0,C"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.c & BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 0,C"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.c & BIT_0);"; break; case 66: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 0,D"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.d & BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 0,D"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.d & BIT_0);"; break; case 67: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 0,E"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.e & BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 0,E"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.e & BIT_0);"; break; case 68: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 0,H"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.h & BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 0,H"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.h & BIT_0);"; break; case 69: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 0,L"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.l & BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 0,L"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.l & BIT_0);"; break; case 70: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 0,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.readMem(this.getHL()) & BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 0,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.readMem(this.getHL()) & BIT_0);"; break; case 71: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 0,A"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.a & BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 0,A"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.a & BIT_0);"; break; case 72: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 1,B"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.b & BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 1,B"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.b & BIT_1);"; break; case 73: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 1,C"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.c & BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 1,C"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.c & BIT_1);"; break; case 74: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 1,D"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.d & BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 1,D"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.d & BIT_1);"; break; case 75: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 1,E"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.e & BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 1,E"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.e & BIT_1);"; break; case 76: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 1,H"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.h & BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 1,H"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.h & BIT_1);"; break; case 77: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 1,L"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.l & BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 1,L"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.l & BIT_1);"; break; case 78: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 1,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.readMem(this.getHL()) & BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 1,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.readMem(this.getHL()) & BIT_1);"; break; case 79: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 1,A"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.a & BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 1,A"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.a & BIT_1);"; break; case 80: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 2,B"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.b & BIT_2);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 2,B"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.b & BIT_2);"; break; case 81: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 2,C"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.c & BIT_2);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 2,C"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.c & BIT_2);"; break; case 82: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 2,D"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.d & BIT_2);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 2,D"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.d & BIT_2);"; break; case 83: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 2,E"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.e & BIT_2);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 2,E"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.e & BIT_2);"; break; case 84: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 2,H"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.h & BIT_2);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 2,H"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.h & BIT_2);"; break; case 85: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 2,L"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.l & BIT_2);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 2,L"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.l & BIT_2);"; break; case 86: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 2,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.readMem(this.getHL()) & BIT_2);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 2,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.readMem(this.getHL()) & BIT_2);"; break; case 87: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 2,A"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.a & BIT_2);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 2,A"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.a & BIT_2);"; break; case 88: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 3,B"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.b & BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 3,B"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.b & BIT_3);"; break; case 89: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 3,C"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.c & BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 3,C"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.c & BIT_3);"; break; case 90: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 3,D"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.d & BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 3,D"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.d & BIT_3);"; break; case 91: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 3,E"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.e & BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 3,E"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.e & BIT_3);"; break; case 92: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 3,H"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.h & BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 3,H"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.h & BIT_3);"; break; case 93: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 3,L"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.l & BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 3,L"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.l & BIT_3);"; break; case 94: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 3,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.readMem(this.getHL()) & BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 3,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.readMem(this.getHL()) & BIT_3);"; break; case 95: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 3,A"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.a & BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 3,A"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.a & BIT_3);"; break; case 96: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 4,B"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.b & BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 4,B"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.b & BIT_4);"; break; case 97: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 4,C"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.c & BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 4,C"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.c & BIT_4);"; break; case 98: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 4,D"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.d & BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 4,D"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.d & BIT_4);"; break; case 99: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 4,E"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.e & BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 4,E"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.e & BIT_4);"; break; case 100: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 4,H"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.h & BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 4,H"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.h & BIT_4);"; break; case 101: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 4,L"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.l & BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 4,L"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.l & BIT_4);"; break; case 102: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 4,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.readMem(this.getHL()) & BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 4,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.readMem(this.getHL()) & BIT_4);"; break; case 103: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 4,A"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.a & BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 4,A"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.a & BIT_4);"; break; case 104: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 5,B"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.b & BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 5,B"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.b & BIT_5);"; break; case 105: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 5,C"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.c & BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 5,C"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.c & BIT_5);"; break; case 106: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 5,D"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.d & BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 5,D"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.d & BIT_5);"; break; case 107: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 5,E"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.e & BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 5,E"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.e & BIT_5);"; break; case 108: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 5,H"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.h & BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 5,H"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.h & BIT_5);"; break; case 109: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 5,L"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.l & BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 5,L"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.l & BIT_5);"; break; case 110: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 5,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.readMem(this.getHL()) & BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 5,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.readMem(this.getHL()) & BIT_5);"; break; case 111: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 5,A"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.a & BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 5,A"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.a & BIT_5);"; break; case 112: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 6,B"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.b & BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 6,B"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.b & BIT_6);"; break; case 113: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 6,C"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.c & BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 6,C"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.c & BIT_6);"; break; case 114: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 6,D"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.d & BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 6,D"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.d & BIT_6);"; break; case 115: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 6,E"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.e & BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 6,E"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.e & BIT_6);"; break; case 116: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 6,H"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.h & BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 6,H"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.h & BIT_6);"; break; case 117: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 6,L"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.l & BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 6,L"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.l & BIT_6);"; break; case 118: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 6,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.readMem(this.getHL()) & BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 6,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.readMem(this.getHL()) & BIT_6);"; break; case 119: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 6,A"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.a & BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 6,A"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.a & BIT_6);"; break; case 120: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 7,B"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.b & BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 7,B"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.b & BIT_7);"; break; case 121: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 7,C"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.c & BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 7,C"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.c & BIT_7);"; break; case 122: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 7,D"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.d & BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 7,D"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.d & BIT_7);"; break; case 123: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 7,E"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.e & BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 7,E"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.e & BIT_7);"; break; case 124: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 7,H"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.h & BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 7,H"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.h & BIT_7);"; break; case 125: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 7,L"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.l & BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 7,L"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.l & BIT_7);"; break; case 126: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 7,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.readMem(this.getHL()) & BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 7,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.readMem(this.getHL()) & BIT_7);"; break; case 127: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "BIT 7,A"; - $code$$inline_112_code$$inline_122$$ = "this.bit(this.a & BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "BIT 7,A"; + $code$$inline_163_code$$inline_173$$ = "this.bit(this.a & BIT_7);"; break; case 128: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 0,B"; - $code$$inline_112_code$$inline_122$$ = "this.b &= ~BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 0,B"; + $code$$inline_163_code$$inline_173$$ = "this.b &= ~BIT_0;"; break; case 129: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 0,C"; - $code$$inline_112_code$$inline_122$$ = "this.c &= ~BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 0,C"; + $code$$inline_163_code$$inline_173$$ = "this.c &= ~BIT_0;"; break; case 130: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 0,D"; - $code$$inline_112_code$$inline_122$$ = "this.d &= ~BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 0,D"; + $code$$inline_163_code$$inline_173$$ = "this.d &= ~BIT_0;"; break; case 131: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 0,E"; - $code$$inline_112_code$$inline_122$$ = "this.e &= ~BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 0,E"; + $code$$inline_163_code$$inline_173$$ = "this.e &= ~BIT_0;"; break; case 132: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 0,H"; - $code$$inline_112_code$$inline_122$$ = "this.h &= ~BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 0,H"; + $code$$inline_163_code$$inline_173$$ = "this.h &= ~BIT_0;"; break; case 133: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 0,L"; - $code$$inline_112_code$$inline_122$$ = "this.l &= ~BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 0,L"; + $code$$inline_163_code$$inline_173$$ = "this.l &= ~BIT_0;"; break; case 134: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 0,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 0,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_0);"; break; case 135: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 0,A"; - $code$$inline_112_code$$inline_122$$ = "this.a &= ~BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 0,A"; + $code$$inline_163_code$$inline_173$$ = "this.a &= ~BIT_0;"; break; case 136: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 1,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 1,B"; break; case 137: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 1,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 1,C"; break; case 138: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 1,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 1,D"; break; case 139: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 1,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 1,E"; break; case 140: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 1,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 1,H"; break; case 141: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 1,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 1,L"; break; case 142: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 1,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 1,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_1);"; break; case 143: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 1,A"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 1,A"; break; case 144: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 2,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 2,B"; break; case 145: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 2,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 2,C"; break; case 146: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 2,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 2,D"; break; case 147: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 2,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 2,E"; break; case 148: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 2,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 2,H"; break; case 149: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 2,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 2,L"; break; case 150: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 2,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_2);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 2,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_2);"; break; case 151: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 2,A"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 2,A"; break; case 152: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 3,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 3,B"; break; case 153: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 3,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 3,C"; break; case 154: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 3,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 3,D"; break; case 155: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 3,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 3,E"; break; case 156: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 3,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 3,H"; break; case 157: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 3,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 3,L"; break; case 158: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 3,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 3,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_3);"; break; case 159: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 3,A"; - $code$$inline_112_code$$inline_122$$ = "this.a &= ~BIT_3;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 3,A"; + $code$$inline_163_code$$inline_173$$ = "this.a &= ~BIT_3;"; break; case 160: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 4,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 4,B"; break; case 161: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 4,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 4,C"; break; case 162: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 4,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 4,D"; break; case 163: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 4,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 4,E"; break; case 164: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 4,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 4,H"; break; case 165: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 4,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 4,L"; break; case 166: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 4,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 4,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_4);"; break; case 167: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 4,A"; - $code$$inline_112_code$$inline_122$$ = "this.a &= ~BIT_4;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 4,A"; + $code$$inline_163_code$$inline_173$$ = "this.a &= ~BIT_4;"; break; case 168: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 5,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 5,B"; break; case 169: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 5,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 5,C"; break; case 170: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 5,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 5,D"; break; case 171: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 5,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 5,E"; break; case 172: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 5,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 5,H"; break; case 173: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 5,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 5,L"; break; case 174: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 5,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 5,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_5);"; break; case 175: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 5,A"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 5,A"; break; case 176: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 6,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 6,B"; break; case 177: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 6,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 6,C"; break; case 178: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 6,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 6,D"; break; case 179: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 6,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 6,E"; break; case 180: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 6,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 6,H"; break; case 181: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 6,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 6,L"; break; case 182: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 6,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 6,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_6);"; break; case 183: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 6,A"; - $code$$inline_112_code$$inline_122$$ = "this.a &= ~BIT_6;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 6,A"; + $code$$inline_163_code$$inline_173$$ = "this.a &= ~BIT_6;"; break; case 184: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 7,B"; - $code$$inline_112_code$$inline_122$$ = "this.b &= ~BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 7,B"; + $code$$inline_163_code$$inline_173$$ = "this.b &= ~BIT_7;"; break; case 185: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 7,C"; - $code$$inline_112_code$$inline_122$$ = "this.c &= ~BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 7,C"; + $code$$inline_163_code$$inline_173$$ = "this.c &= ~BIT_7;"; break; case 186: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 7,D"; - $code$$inline_112_code$$inline_122$$ = "this.d &= ~BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 7,D"; + $code$$inline_163_code$$inline_173$$ = "this.d &= ~BIT_7;"; break; case 187: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 7,E"; - $code$$inline_112_code$$inline_122$$ = "this.e &= ~BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 7,E"; + $code$$inline_163_code$$inline_173$$ = "this.e &= ~BIT_7;"; break; case 188: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 7,H"; - $code$$inline_112_code$$inline_122$$ = "this.h &= ~BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 7,H"; + $code$$inline_163_code$$inline_173$$ = "this.h &= ~BIT_7;"; break; case 189: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 7,L"; - $code$$inline_112_code$$inline_122$$ = "this.l &= ~BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 7,L"; + $code$$inline_163_code$$inline_173$$ = "this.l &= ~BIT_7;"; break; case 190: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 7,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 7,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) & ~BIT_7);"; break; case 191: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "RES 7,A"; - $code$$inline_112_code$$inline_122$$ = "this.a &= ~BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "RES 7,A"; + $code$$inline_163_code$$inline_173$$ = "this.a &= ~BIT_7;"; break; case 192: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 0,B"; - $code$$inline_112_code$$inline_122$$ = "this.b |= BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 0,B"; + $code$$inline_163_code$$inline_173$$ = "this.b |= BIT_0;"; break; case 193: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 0,C"; - $code$$inline_112_code$$inline_122$$ = "this.c |= BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 0,C"; + $code$$inline_163_code$$inline_173$$ = "this.c |= BIT_0;"; break; case 194: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 0,D"; - $code$$inline_112_code$$inline_122$$ = "this.d |= BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 0,D"; + $code$$inline_163_code$$inline_173$$ = "this.d |= BIT_0;"; break; case 195: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 0,E"; - $code$$inline_112_code$$inline_122$$ = "this.e |= BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 0,E"; + $code$$inline_163_code$$inline_173$$ = "this.e |= BIT_0;"; break; case 196: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 0,H"; - $code$$inline_112_code$$inline_122$$ = "this.h |= BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 0,H"; + $code$$inline_163_code$$inline_173$$ = "this.h |= BIT_0;"; break; case 197: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 0,L"; - $code$$inline_112_code$$inline_122$$ = "this.l |= BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 0,L"; + $code$$inline_163_code$$inline_173$$ = "this.l |= BIT_0;"; break; case 198: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 0,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_0);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 0,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_0);"; break; case 199: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 0,A"; - $code$$inline_112_code$$inline_122$$ = "this.a |= BIT_0;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 0,A"; + $code$$inline_163_code$$inline_173$$ = "this.a |= BIT_0;"; break; case 200: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 1,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 1,B"; break; case 201: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 1,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 1,C"; break; case 202: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 1,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 1,D"; break; case 203: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 1,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 1,E"; break; case 204: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 1,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 1,H"; break; case 205: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 1,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 1,L"; break; case 206: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 1,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_1);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 1,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_1);"; break; case 207: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 1,A"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 1,A"; break; case 208: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 2,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 2,B"; break; case 209: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 2,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 2,C"; break; case 210: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 2,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 2,D"; break; case 211: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 2,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 2,E"; break; case 212: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 2,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 2,H"; break; case 213: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 2,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 2,L"; break; case 214: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 2,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_2)"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 2,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_2)"; break; case 215: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 2,A"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 2,A"; break; case 216: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 3,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 3,B"; break; case 217: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 3,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 3,C"; break; case 218: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 3,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 3,D"; break; case 219: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 3,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 3,E"; break; case 220: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 3,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 3,H"; break; case 221: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 3,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 3,L"; break; case 222: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 3,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_3);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 3,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_3);"; break; case 223: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 3,A"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 3,A"; break; case 224: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 4,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 4,B"; break; case 225: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 4,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 4,C"; break; case 226: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 4,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 4,D"; break; case 227: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 4,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 4,E"; break; case 228: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 4,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 4,H"; break; case 229: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 4,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 4,L"; break; case 230: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 4,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_4);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 4,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_4);"; break; case 231: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 4,A"; - $code$$inline_112_code$$inline_122$$ = "this.a |= BIT_4;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 4,A"; + $code$$inline_163_code$$inline_173$$ = "this.a |= BIT_4;"; break; case 232: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 5,B"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 5,B"; break; case 233: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 5,C"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 5,C"; break; case 234: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 5,D"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 5,D"; break; case 235: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 5,E"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 5,E"; break; case 236: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 5,H"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 5,H"; break; case 237: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 5,L"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 5,L"; break; case 238: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 5,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_5);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 5,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_5);"; break; case 239: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 5,A"; - $code$$inline_112_code$$inline_122$$ = "this.a |= BIT_5;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 5,A"; + $code$$inline_163_code$$inline_173$$ = "this.a |= BIT_5;"; break; case 240: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 6,B"; - $code$$inline_112_code$$inline_122$$ = "this.b |= BIT_6;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 6,B"; + $code$$inline_163_code$$inline_173$$ = "this.b |= BIT_6;"; break; case 241: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 6,C"; - $code$$inline_112_code$$inline_122$$ = "this.c |= BIT_6;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 6,C"; + $code$$inline_163_code$$inline_173$$ = "this.c |= BIT_6;"; break; case 242: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 6,D"; - $code$$inline_112_code$$inline_122$$ = "this.d |= BIT_6;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 6,D"; + $code$$inline_163_code$$inline_173$$ = "this.d |= BIT_6;"; break; case 243: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 6,E"; - $code$$inline_112_code$$inline_122$$ = "this.e |= BIT_6;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 6,E"; + $code$$inline_163_code$$inline_173$$ = "this.e |= BIT_6;"; break; case 244: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 6,H"; - $code$$inline_112_code$$inline_122$$ = "this.h |= BIT_6;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 6,H"; + $code$$inline_163_code$$inline_173$$ = "this.h |= BIT_6;"; break; case 245: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 6,L"; - $code$$inline_112_code$$inline_122$$ = "this.l |= BIT_6;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 6,L"; + $code$$inline_163_code$$inline_173$$ = "this.l |= BIT_6;"; break; case 246: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 6,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_6);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 6,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_6);"; break; case 247: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 6,A"; - $code$$inline_112_code$$inline_122$$ = "this.a |= BIT_6;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 6,A"; + $code$$inline_163_code$$inline_173$$ = "this.a |= BIT_6;"; break; case 248: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 7,B"; - $code$$inline_112_code$$inline_122$$ = "this.b |= BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 7,B"; + $code$$inline_163_code$$inline_173$$ = "this.b |= BIT_7;"; break; case 249: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 7,C"; - $code$$inline_112_code$$inline_122$$ = "this.c |= BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 7,C"; + $code$$inline_163_code$$inline_173$$ = "this.c |= BIT_7;"; break; case 250: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 7,D"; - $code$$inline_112_code$$inline_122$$ = "this.d |= BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 7,D"; + $code$$inline_163_code$$inline_173$$ = "this.d |= BIT_7;"; break; case 251: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 7,E"; - $code$$inline_112_code$$inline_122$$ = "this.e |= BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 7,E"; + $code$$inline_163_code$$inline_173$$ = "this.e |= BIT_7;"; break; case 252: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 7,H"; - $code$$inline_112_code$$inline_122$$ = "this.h |= BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 7,H"; + $code$$inline_163_code$$inline_173$$ = "this.h |= BIT_7;"; break; case 253: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 7,L"; - $code$$inline_112_code$$inline_122$$ = "this.l |= BIT_7;"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 7,L"; + $code$$inline_163_code$$inline_173$$ = "this.l |= BIT_7;"; break; case 254: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 7,(HL)"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_7);"; + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 7,(HL)"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getHL(), this.readMem(this.getHL()) | BIT_7);"; break; case 255: - $currAddr$$inline_120_inst$$inline_110_location$$26$$ = "SET 7,A", $code$$inline_112_code$$inline_122$$ = "this.a |= BIT_7;" + $currAddr$$inline_171_inst$$inline_161_location$$23$$ = "SET 7,A", $code$$inline_163_code$$inline_173$$ = "this.a |= BIT_7;"; } - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = {$opcode$:$code$$5_opcode$$inline_108_opcodesArray$$inline_118$$, $opcodes$:$_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$, $inst$:$currAddr$$inline_120_inst$$inline_110_location$$26$$, code:$code$$inline_112_code$$inline_122$$, $address$:$currAddr$$inline_111_target$$inline_121$$, $nextAddress$:$address$$inline_107_inst_opcode$$inline_117$$}; - $address$$inline_107_inst_opcode$$inline_117$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$inst$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.code; - $defaultInstruction$$inline_128_opcodesArray$$ = $defaultInstruction$$inline_128_opcodesArray$$.concat($_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$opcodes$); - $address$$8$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$nextAddress$; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = {$opcode$:$code$$5_opcode$$inline_159_opcodesArray$$inline_169$$, $opcodes$:$_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$, $inst$:$currAddr$$inline_171_inst$$inline_161_location$$23$$, code:$code$$inline_163_code$$inline_173$$, $address$:$currAddr$$inline_162_target$$inline_172$$, $nextAddress$:$address$$inline_158_inst_opcode$$inline_168$$}; + $address$$inline_158_inst_opcode$$inline_168$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$inst$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.code; + $defaultInstruction$$inline_179_opcodesArray$$ = $defaultInstruction$$inline_179_opcodesArray$$.concat($_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$opcodes$); + $address$$8$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$nextAddress$; break; case 204: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "CALL Z (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_ZERO) != 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "CALL Z (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_ZERO) != 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 205: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "CALL (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "CALL (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; $address$$8$$ += 2; break; case 206: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "ADC ," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.adc_a(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "ADC ," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.adc_a(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$++; break; case 207: - $address$$inline_115_target$$46$$ = 8; - $address$$inline_107_inst_opcode$$inline_117$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$); - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = 8; + $address$$inline_158_inst_opcode$$inline_168$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$); + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; break; case 208: - $address$$inline_107_inst_opcode$$inline_117$$ = "RET NC"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_CARRY) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RET NC"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_CARRY) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 209: - $address$$inline_107_inst_opcode$$inline_117$$ = "POP DE"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setDE(this.readMemWord(this.sp)); this.sp += 0x02;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "POP DE"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setDE(this.readMemWord(this.sp)); this.sp += 0x02;"; break; case 210: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "JP NC,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_CARRY) == 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "JP NC,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_CARRY) === 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 211: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "OUT (" + $JSSMS$Utils$toHex$$($_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$) + "),A"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.port.out(" + $JSSMS$Utils$toHex$$($_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$) + ", this.a);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "OUT (" + $JSSMS$Utils$toHex$$($_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$) + "),A"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = $JSCompiler_StaticMethods_peepholePortOut$$($JSCompiler_StaticMethods_disassemble$self$$, $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$); $address$$8$$++; break; case 212: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "CALL NC (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_CARRY) == 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "CALL NC (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_CARRY) === 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 213: - $address$$inline_107_inst_opcode$$inline_117$$ = "PUSH DE"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push2(this.d, this.e);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "PUSH DE"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push2(this.d, this.e);"; break; case 214: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "SUB " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sub_a(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "SUB " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sub_a(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$++; break; case 215: - $address$$inline_115_target$$46$$ = 16; - $address$$inline_107_inst_opcode$$inline_117$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$); - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = 16; + $address$$inline_158_inst_opcode$$inline_168$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$); + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; break; case 216: - $address$$inline_107_inst_opcode$$inline_117$$ = "RET C"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RET C"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 217: - $address$$inline_107_inst_opcode$$inline_117$$ = "EXX"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.exBC(); this.exDE(); this.exHL();"; + $address$$inline_158_inst_opcode$$inline_168$$ = "EXX"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.exBC(); this.exDE(); this.exHL();"; break; case 218: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "JP C,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_CARRY) != 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "JP C,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_CARRY) != 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 219: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "IN A,(" + $JSSMS$Utils$toHex$$($_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.a = this.port.in_(" + $JSSMS$Utils$toHex$$($_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$) + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "IN A,(" + $JSSMS$Utils$toHex$$($_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = $JSCompiler_StaticMethods_peepholePortIn$$($JSCompiler_StaticMethods_disassemble$self$$, $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$); $address$$8$$++; break; case 220: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "CALL C (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "CALL C (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_CARRY) != 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 221: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_disassemble$self$$, "IX", $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$inst$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.code; - $defaultInstruction$$inline_128_opcodesArray$$ = $defaultInstruction$$inline_128_opcodesArray$$.concat($_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$opcodes$); - $address$$8$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$nextAddress$; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_disassemble$self$$, "IX", $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$inst$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.code; + $defaultInstruction$$inline_179_opcodesArray$$ = $defaultInstruction$$inline_179_opcodesArray$$.concat($_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$opcodes$); + $address$$8$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$nextAddress$; break; case 222: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "SBC A," + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sbc_a(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "SBC A," + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sbc_a(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$++; break; case 223: - $address$$inline_115_target$$46$$ = 24; - $address$$inline_107_inst_opcode$$inline_117$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$); - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = 24; + $address$$inline_158_inst_opcode$$inline_168$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$); + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; break; case 224: - $address$$inline_107_inst_opcode$$inline_117$$ = "RET PO"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_PARITY) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RET PO"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_PARITY) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 225: - $address$$inline_107_inst_opcode$$inline_117$$ = "POP HL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setHL(this.readMemWord(this.sp)); this.sp += 0x02;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "POP HL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setHL(this.readMemWord(this.sp)); this.sp += 0x02;"; break; case 226: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "JP PO,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_PARITY) == 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "JP PO,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_PARITY) === 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 227: - $address$$inline_107_inst_opcode$$inline_117$$ = "EX (SP),HL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "temp = this.h;this.h = this.readMem(this.sp + 0x01);this.writeMem(this.sp + 0x01, temp);temp = this.l;this.l = this.readMem(this.sp);this.writeMem(this.sp, temp);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "EX (SP),HL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "temp = this.h;this.h = this.readMem(this.sp + 0x01);this.writeMem(this.sp + 0x01, temp);temp = this.l;this.l = this.readMem(this.sp);this.writeMem(this.sp, temp);"; break; case 228: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "CALL PO (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_PARITY) == 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "CALL PO (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_PARITY) === 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 229: - $address$$inline_107_inst_opcode$$inline_117$$ = "PUSH HL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push2(this.h, this.l);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "PUSH HL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push2(this.h, this.l);"; break; case 230: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "AND (" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a &= " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + "] | F_HALFCARRY;"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "AND (" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a &= " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + "] | F_HALFCARRY;"; $address$$8$$++; break; case 231: - $address$$inline_115_target$$46$$ = 32; - $address$$inline_107_inst_opcode$$inline_117$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$); - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = 32; + $address$$inline_158_inst_opcode$$inline_168$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$); + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; break; case 232: - $address$$inline_107_inst_opcode$$inline_117$$ = "RET PE"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_PARITY) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RET PE"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_PARITY) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 233: - $address$$inline_107_inst_opcode$$inline_117$$ = "JP (HL)"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.pc = this.getHL(); return;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "JP (HL)"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.pc = this.getHL(); return;"; $address$$8$$ = null; break; case 234: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "JP PE,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_PARITY) != 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "JP PE,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_PARITY) != 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 235: - $address$$inline_107_inst_opcode$$inline_117$$ = "EX DE,HL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "temp = this.d;this.d = this.h;this.h = temp;temp = this.e;this.e = this.l;this.l = temp;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "EX DE,HL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "temp = this.d;this.d = this.h;this.h = temp;temp = this.e;this.e = this.l;this.l = temp;"; break; case 236: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "CALL PE (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_PARITY) != 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "CALL PE (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_PARITY) != 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 237: - var $address$$inline_115_target$$46$$ = $address$$8$$, $address$$inline_107_inst_opcode$$inline_117$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_115_target$$46$$), $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = [$address$$inline_107_inst_opcode$$inline_117$$], $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "Unimplemented 0xED prefixed opcode", $currAddr$$inline_120_inst$$inline_110_location$$26$$ = $address$$inline_115_target$$46$$, - $currAddr$$inline_111_target$$inline_121$$ = null, $code$$inline_112_code$$inline_122$$ = 'throw "Unimplemented 0xED prefixed opcode";', $operand$$inline_123$$ = "", $location$$inline_124$$ = 0; - $address$$inline_115_target$$46$$++; - switch($address$$inline_107_inst_opcode$$inline_117$$) { + var $address$$inline_166_target$$46$$ = $address$$8$$, $address$$inline_158_inst_opcode$$inline_168$$ = $JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_166_target$$46$$), $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = [$address$$inline_158_inst_opcode$$inline_168$$], $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "Unimplemented 0xED prefixed opcode", $currAddr$$inline_171_inst$$inline_161_location$$23$$ = $address$$inline_166_target$$46$$, + $currAddr$$inline_162_target$$inline_172$$ = null, $code$$inline_163_code$$inline_173$$ = 'throw "Unimplemented 0xED prefixed opcode";', $operand$$inline_174$$ = "", $location$$inline_175$$ = 0; + $address$$inline_166_target$$46$$++; + switch($address$$inline_158_inst_opcode$$inline_168$$) { case 64: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IN B,(C)"; - $code$$inline_112_code$$inline_122$$ = "this.b = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.b];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IN B,(C)"; + $code$$inline_163_code$$inline_173$$ = "this.b = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.b];"; break; case 65: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUT (C),B"; - $code$$inline_112_code$$inline_122$$ = "this.port.out(this.c, this.b);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUT (C),B"; + $code$$inline_163_code$$inline_173$$ = "this.port.out(this.c, this.b);"; break; case 66: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "SBC HL,BC"; - $code$$inline_112_code$$inline_122$$ = "this.sbc16(this.getBC());"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "SBC HL,BC"; + $code$$inline_163_code$$inline_173$$ = "this.sbc16(this.getBC());"; break; case 67: - $location$$inline_124$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_115_target$$46$$); - $operand$$inline_123$$ = $JSSMS$Utils$toHex$$($location$$inline_124$$); - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD (" + $operand$$inline_123$$ + "),BC"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(" + $operand$$inline_123$$ + ", this.c);this.writeMem(" + $JSSMS$Utils$toHex$$($location$$inline_124$$ + 1) + ", this.b);"; - $address$$inline_115_target$$46$$ += 2; + $location$$inline_175$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_166_target$$46$$); + $operand$$inline_174$$ = $JSSMS$Utils$toHex$$($location$$inline_175$$); + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD (" + $operand$$inline_174$$ + "),BC"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(" + $operand$$inline_174$$ + ", this.c);this.writeMem(" + $JSSMS$Utils$toHex$$($location$$inline_175$$ + 1) + ", this.b);"; + $address$$inline_166_target$$46$$ += 2; break; case 68: ; @@ -7105,8 +7212,8 @@ function $JSCompiler_StaticMethods_disassemble$$($JSCompiler_StaticMethods_disas case 116: ; case 124: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "NEG"; - $code$$inline_112_code$$inline_122$$ = "temp = this.a;this.a = 0x00;this.sub_a(temp);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "NEG"; + $code$$inline_163_code$$inline_173$$ = "temp = this.a;this.a = 0x00;this.sub_a(temp);"; break; case 69: ; @@ -7123,9 +7230,9 @@ function $JSCompiler_StaticMethods_disassemble$$($JSCompiler_StaticMethods_disas case 117: ; case 125: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "RETN / RETI"; - $code$$inline_112_code$$inline_122$$ = "this.pc = this.readMemWord(this.sp);this.sp += 0x02;this.iff1 = this.iff2;return;"; - $address$$inline_115_target$$46$$ = null; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "RETN / RETI"; + $code$$inline_163_code$$inline_173$$ = "this.pc = this.readMemWord(this.sp);this.sp += 0x02;this.iff1 = this.iff2;return;"; + $address$$inline_166_target$$46$$ = null; break; case 70: ; @@ -7134,362 +7241,362 @@ function $JSCompiler_StaticMethods_disassemble$$($JSCompiler_StaticMethods_disas case 102: ; case 110: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IM 0"; - $code$$inline_112_code$$inline_122$$ = "this.im = 0x00;"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IM 0"; + $code$$inline_163_code$$inline_173$$ = "this.im = 0x00;"; break; case 71: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD I,A"; - $code$$inline_112_code$$inline_122$$ = "this.i = this.a;"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD I,A"; + $code$$inline_163_code$$inline_173$$ = "this.i = this.a;"; break; case 72: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IN C,(C)"; - $code$$inline_112_code$$inline_122$$ = "this.c = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.c];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IN C,(C)"; + $code$$inline_163_code$$inline_173$$ = "this.c = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.c];"; break; case 73: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUT (C),C"; - $code$$inline_112_code$$inline_122$$ = "this.port.out(this.c, this.c);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUT (C),C"; + $code$$inline_163_code$$inline_173$$ = "this.port.out(this.c, this.c);"; break; case 74: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "ADC HL,BC"; - $code$$inline_112_code$$inline_122$$ = "this.adc16(this.getBC());"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "ADC HL,BC"; + $code$$inline_163_code$$inline_173$$ = "this.adc16(this.getBC());"; break; case 75: - $operand$$inline_123$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_115_target$$46$$)); - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD BC,(" + $operand$$inline_123$$ + ")"; - $code$$inline_112_code$$inline_122$$ = "this.setBC(this.readMemWord(" + $operand$$inline_123$$ + "));"; - $address$$inline_115_target$$46$$ += 2; + $operand$$inline_174$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_166_target$$46$$)); + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD BC,(" + $operand$$inline_174$$ + ")"; + $code$$inline_163_code$$inline_173$$ = "this.setBC(this.readMemWord(" + $operand$$inline_174$$ + "));"; + $address$$inline_166_target$$46$$ += 2; break; case 79: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD R,A"; - $code$$inline_112_code$$inline_122$$ = "this.r = this.a;"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD R,A"; + $code$$inline_163_code$$inline_173$$ = "this.r = this.a;"; break; case 80: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IN D,(C)"; - $code$$inline_112_code$$inline_122$$ = "this.d = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.d];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IN D,(C)"; + $code$$inline_163_code$$inline_173$$ = "this.d = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.d];"; break; case 81: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUT (C),D"; - $code$$inline_112_code$$inline_122$$ = "this.port.out(this.c, this.d);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUT (C),D"; + $code$$inline_163_code$$inline_173$$ = "this.port.out(this.c, this.d);"; break; case 82: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "SBC HL,DE"; - $code$$inline_112_code$$inline_122$$ = "this.sbc16(this.getDE());"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "SBC HL,DE"; + $code$$inline_163_code$$inline_173$$ = "this.sbc16(this.getDE());"; break; case 83: - $location$$inline_124$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_115_target$$46$$); - $operand$$inline_123$$ = $JSSMS$Utils$toHex$$($location$$inline_124$$); - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD (" + $operand$$inline_123$$ + "),DE"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(" + $operand$$inline_123$$ + ", this.e);this.writeMem(" + $JSSMS$Utils$toHex$$($location$$inline_124$$ + 1) + ", this.d);"; - $address$$inline_115_target$$46$$ += 2; + $location$$inline_175$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_166_target$$46$$); + $operand$$inline_174$$ = $JSSMS$Utils$toHex$$($location$$inline_175$$); + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD (" + $operand$$inline_174$$ + "),DE"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(" + $operand$$inline_174$$ + ", this.e);this.writeMem(" + $JSSMS$Utils$toHex$$($location$$inline_175$$ + 1) + ", this.d);"; + $address$$inline_166_target$$46$$ += 2; break; case 86: ; case 118: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IM 1"; - $code$$inline_112_code$$inline_122$$ = "this.im = 0x01;"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IM 1"; + $code$$inline_163_code$$inline_173$$ = "this.im = 0x01;"; break; case 87: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD A,I"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.i;this.f = (this.f & F_CARRY) | this.SZ_TABLE[this.a] | (this.iff2 ? F_PARITY : 0);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD A,I"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.i;this.f = (this.f & F_CARRY) | this.SZ_TABLE[this.a] | (this.iff2 ? F_PARITY : 0);"; break; case 88: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IN E,(C)"; - $code$$inline_112_code$$inline_122$$ = "this.e = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.e];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IN E,(C)"; + $code$$inline_163_code$$inline_173$$ = "this.e = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.e];"; break; case 89: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUT (C),E"; - $code$$inline_112_code$$inline_122$$ = "this.port.out(this.c, this.e);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUT (C),E"; + $code$$inline_163_code$$inline_173$$ = "this.port.out(this.c, this.e);"; break; case 90: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "ADC HL,DE"; - $code$$inline_112_code$$inline_122$$ = "this.adc16(this.getDE());"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "ADC HL,DE"; + $code$$inline_163_code$$inline_173$$ = "this.adc16(this.getDE());"; break; case 91: - $operand$$inline_123$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_115_target$$46$$)); - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD DE,(" + $operand$$inline_123$$ + ")"; - $code$$inline_112_code$$inline_122$$ = "this.setDE(this.readMemWord(" + $operand$$inline_123$$ + "));"; - $address$$inline_115_target$$46$$ += 2; + $operand$$inline_174$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_166_target$$46$$)); + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD DE,(" + $operand$$inline_174$$ + ")"; + $code$$inline_163_code$$inline_173$$ = "this.setDE(this.readMemWord(" + $operand$$inline_174$$ + "));"; + $address$$inline_166_target$$46$$ += 2; break; case 95: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD A,R"; - $code$$inline_112_code$$inline_122$$ = "this.a = JSSMS.Utils.rndInt(0xFF);this.f = this.f & F_CARRY | this.SZ_TABLE[this.a] | (this.iff2 ? F_PARITY : 0x00);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD A,R"; + $code$$inline_163_code$$inline_173$$ = "this.a = JSSMS.Utils.rndInt(0xFF);this.f = this.f & F_CARRY | this.SZ_TABLE[this.a] | (this.iff2 ? F_PARITY : 0x00);"; break; case 96: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IN H,(C)"; - $code$$inline_112_code$$inline_122$$ = "this.h = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.h];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IN H,(C)"; + $code$$inline_163_code$$inline_173$$ = "this.h = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.h];"; break; case 97: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUT (C),H"; - $code$$inline_112_code$$inline_122$$ = "this.port.out(this.c, this.h);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUT (C),H"; + $code$$inline_163_code$$inline_173$$ = "this.port.out(this.c, this.h);"; break; case 98: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "SBC HL,HL"; - $code$$inline_112_code$$inline_122$$ = "this.sbc16(this.getHL());"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "SBC HL,HL"; + $code$$inline_163_code$$inline_173$$ = "this.sbc16(this.getHL());"; break; case 99: - $location$$inline_124$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_115_target$$46$$); - $operand$$inline_123$$ = $JSSMS$Utils$toHex$$($location$$inline_124$$); - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD (" + $operand$$inline_123$$ + "),HL"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(" + $operand$$inline_123$$ + ", this.l);this.writeMem(" + $JSSMS$Utils$toHex$$($location$$inline_124$$ + 1) + ", this.h);"; - $address$$inline_115_target$$46$$ += 2; + $location$$inline_175$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_166_target$$46$$); + $operand$$inline_174$$ = $JSSMS$Utils$toHex$$($location$$inline_175$$); + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD (" + $operand$$inline_174$$ + "),HL"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(" + $operand$$inline_174$$ + ", this.l);this.writeMem(" + $JSSMS$Utils$toHex$$($location$$inline_175$$ + 1) + ", this.h);"; + $address$$inline_166_target$$46$$ += 2; break; case 103: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "RRD"; - $code$$inline_112_code$$inline_122$$ = "var location = this.getHL();temp = this.readMem(location);this.writeMem(location, (temp >> 4) | ((this.a & 0x0F) << 4));this.a = (this.a & 0xF0) | (temp & 0x0F);this.f = this.f & F_CARRY | this.SZP_TABLE[this.a];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "RRD"; + $code$$inline_163_code$$inline_173$$ = "var location = this.getHL();temp = this.readMem(location);this.writeMem(location, (temp >> 4) | ((this.a & 0x0F) << 4));this.a = (this.a & 0xF0) | (temp & 0x0F);this.f = this.f & F_CARRY | this.SZP_TABLE[this.a];"; break; case 104: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IN L,(C)"; - $code$$inline_112_code$$inline_122$$ = "this.l = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.l];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IN L,(C)"; + $code$$inline_163_code$$inline_173$$ = "this.l = this.port.in_(this.c);this.f = (this.f & F_CARRY) | this.SZP_TABLE[this.l];"; break; case 105: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUT (C),L"; - $code$$inline_112_code$$inline_122$$ = "this.port.out(this.c, this.l);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUT (C),L"; + $code$$inline_163_code$$inline_173$$ = "this.port.out(this.c, this.l);"; break; case 106: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "ADC HL,HL"; - $code$$inline_112_code$$inline_122$$ = "this.adc16(this.getHL());"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "ADC HL,HL"; + $code$$inline_163_code$$inline_173$$ = "this.adc16(this.getHL());"; break; case 107: - $operand$$inline_123$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_115_target$$46$$)); - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD HL,(" + $operand$$inline_123$$ + ")"; - $code$$inline_112_code$$inline_122$$ = "this.setHL(this.readMemWord(" + $operand$$inline_123$$ + "));"; - $address$$inline_115_target$$46$$ += 2; + $operand$$inline_174$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_166_target$$46$$)); + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD HL,(" + $operand$$inline_174$$ + ")"; + $code$$inline_163_code$$inline_173$$ = "this.setHL(this.readMemWord(" + $operand$$inline_174$$ + "));"; + $address$$inline_166_target$$46$$ += 2; break; case 111: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "RLD"; - $code$$inline_112_code$$inline_122$$ = "var location = this.getHL();temp = this.readMem(location);this.writeMem(location, (temp & 0x0F) << 4 | (this.a & 0x0F));this.a = (this.a & 0xF0) | (temp >> 4);this.f = this.f & F_CARRY | this.SZP_TABLE[this.a];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "RLD"; + $code$$inline_163_code$$inline_173$$ = "var location = this.getHL();temp = this.readMem(location);this.writeMem(location, (temp & 0x0F) << 4 | (this.a & 0x0F));this.a = (this.a & 0xF0) | (temp >> 4);this.f = this.f & F_CARRY | this.SZP_TABLE[this.a];"; break; case 113: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUT (C),0"; - $code$$inline_112_code$$inline_122$$ = "this.port.out(this.c, 0);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUT (C),0"; + $code$$inline_163_code$$inline_173$$ = "this.port.out(this.c, 0);"; break; case 114: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "SBC HL,SP"; - $code$$inline_112_code$$inline_122$$ = "this.sbc16(this.sp);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "SBC HL,SP"; + $code$$inline_163_code$$inline_173$$ = "this.sbc16(this.sp);"; break; case 115: - $location$$inline_124$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_115_target$$46$$); - $operand$$inline_123$$ = $JSSMS$Utils$toHex$$($location$$inline_124$$); - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD (" + $operand$$inline_123$$ + "),SP"; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(" + $operand$$inline_123$$ + ", this.sp & 0xFF);this.writeMem(" + $JSSMS$Utils$toHex$$($location$$inline_124$$ + 1) + ", this.sp >> 8);"; - $address$$inline_115_target$$46$$ += 2; + $location$$inline_175$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_166_target$$46$$); + $operand$$inline_174$$ = $JSSMS$Utils$toHex$$($location$$inline_175$$); + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD (" + $operand$$inline_174$$ + "),SP"; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(" + $operand$$inline_174$$ + ", this.sp & 0xFF);this.writeMem(" + $JSSMS$Utils$toHex$$($location$$inline_175$$ + 1) + ", this.sp >> 8);"; + $address$$inline_166_target$$46$$ += 2; break; case 120: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IN A,(C)"; - $code$$inline_112_code$$inline_122$$ = "this.a = this.port.in_(this.c);this.f = this.f & F_CARRY | this.SZP_TABLE[this.a];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IN A,(C)"; + $code$$inline_163_code$$inline_173$$ = "this.a = this.port.in_(this.c);this.f = this.f & F_CARRY | this.SZP_TABLE[this.a];"; break; case 121: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUT (C),A"; - $code$$inline_112_code$$inline_122$$ = "this.port.out(this.c, this.a);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUT (C),A"; + $code$$inline_163_code$$inline_173$$ = "this.port.out(this.c, this.a);"; break; case 122: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "ADC HL,SP"; - $code$$inline_112_code$$inline_122$$ = "this.adc16(this.sp);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "ADC HL,SP"; + $code$$inline_163_code$$inline_173$$ = "this.adc16(this.sp);"; break; case 123: - $operand$$inline_123$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_115_target$$46$$)); - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LD SP,(" + $operand$$inline_123$$ + ")"; - $code$$inline_112_code$$inline_122$$ = "this.sp = this.readMemWord(" + $operand$$inline_123$$ + ");"; - $address$$inline_115_target$$46$$ += 2; + $operand$$inline_174$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$inline_166_target$$46$$)); + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LD SP,(" + $operand$$inline_174$$ + ")"; + $code$$inline_163_code$$inline_173$$ = "this.sp = this.readMemWord(" + $operand$$inline_174$$ + ");"; + $address$$inline_166_target$$46$$ += 2; break; case 160: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LDI"; - $code$$inline_112_code$$inline_122$$ = "temp = this.readMem(this.getHL());this.writeMem(this.getDE(), temp);this.decBC();this.incDE();this.incHL();temp = (temp + this.a) & 0xFF;this.f = (this.f & 0xC1) | (this.getBC() ? F_PARITY : 0) | (temp & 0x08) | ((temp & 0x02) ? 0x20 : 0);"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LDI"; + $code$$inline_163_code$$inline_173$$ = "temp = this.readMem(this.getHL());this.writeMem(this.getDE(), temp);this.decBC();this.incDE();this.incHL();temp = (temp + this.a) & 0xFF;this.f = (this.f & 0xC1) | (this.getBC() ? F_PARITY : 0) | (temp & 0x08) | ((temp & 0x02) ? 0x20 : 0);"; break; case 161: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "CPI"; - $code$$inline_112_code$$inline_122$$ = "temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);this.f = (this.f & 0xF8) | temp;"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "CPI"; + $code$$inline_163_code$$inline_173$$ = "temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);this.f = (this.f & 0xF8) | temp;"; break; case 162: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "INI"; - $code$$inline_112_code$$inline_122$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "INI"; + $code$$inline_163_code$$inline_173$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 163: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUTI"; - $code$$inline_112_code$$inline_122$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.incHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUTI"; + $code$$inline_163_code$$inline_173$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.incHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 168: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LDD"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LDD"; break; case 169: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "CPD"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "CPD"; break; case 170: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "IND"; - $code$$inline_112_code$$inline_122$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.decHL();if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "IND"; + $code$$inline_163_code$$inline_173$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.decHL();if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 171: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OUTD"; - $code$$inline_112_code$$inline_122$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.decHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OUTD"; + $code$$inline_163_code$$inline_173$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.decHL();this.b = this.dec8(this.b);if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 176: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LDIR"; - $currAddr$$inline_111_target$$inline_121$$ = $address$$inline_115_target$$46$$ - 2; - $code$$inline_112_code$$inline_122$$ = "this.writeMem(this.getDE(), this.readMem(this.getHL()));this.incDE();this.incHL();this.decBC();if (this.getBC() != 0x00) {this.tstates -= 0x05;this.f |= F_PARITY;return;} else {this.f &= ~ F_PARITY;}this.f &= ~ F_NEGATIVE; this.f &= ~ F_HALFCARRY;"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LDIR"; + $currAddr$$inline_162_target$$inline_172$$ = $address$$inline_166_target$$46$$ - 2; + $code$$inline_163_code$$inline_173$$ = "this.writeMem(this.getDE(), this.readMem(this.getHL()));this.incDE();this.incHL();this.decBC();if (this.getBC() != 0x00) {this.tstates -= 0x05;this.f |= F_PARITY;return;} else {this.f &= ~ F_PARITY;}this.f &= ~ F_NEGATIVE; this.f &= ~ F_HALFCARRY;"; break; case 177: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "CPIR"; - $currAddr$$inline_111_target$$inline_121$$ = $address$$inline_115_target$$46$$ - 2; - $code$$inline_112_code$$inline_122$$ = "temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() == 0x00 ? 0x00 : F_PARITY);" + ("if ((temp & F_PARITY) != 0x00 && (this.f & F_ZERO) == 0x00) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($currAddr$$inline_111_target$$inline_121$$) + ";return;}"); - $code$$inline_112_code$$inline_122$$ += "this.f = (this.f & 0xF8) | temp;"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "CPIR"; + $currAddr$$inline_162_target$$inline_172$$ = $address$$inline_166_target$$46$$ - 2; + $code$$inline_163_code$$inline_173$$ = "temp = (this.f & F_CARRY) | F_NEGATIVE;this.cp_a(this.readMem(this.getHL()));this.incHL();this.decBC();temp |= (this.getBC() === 0x00 ? 0x00 : F_PARITY);" + ("if ((temp & F_PARITY) != 0x00 && (this.f & F_ZERO) === 0x00) {this.tstates -= 0x05;this.pc = " + $JSSMS$Utils$toHex$$($currAddr$$inline_162_target$$inline_172$$) + ";return;}"); + $code$$inline_163_code$$inline_173$$ += "this.f = (this.f & 0xF8) | temp;"; break; case 178: - $currAddr$$inline_111_target$$inline_121$$ = $address$$inline_115_target$$46$$ - 2; - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "INIR"; - $code$$inline_112_code$$inline_122$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) == 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $currAddr$$inline_162_target$$inline_172$$ = $address$$inline_166_target$$46$$ - 2; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "INIR"; + $code$$inline_163_code$$inline_173$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.incHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) === 0x80) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 179: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OTIR"; - $currAddr$$inline_111_target$$inline_121$$ = $address$$inline_115_target$$46$$ - 2; - $code$$inline_112_code$$inline_122$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.incHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}"; - $code$$inline_112_code$$inline_122$$ += "if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OTIR"; + $currAddr$$inline_162_target$$inline_172$$ = $address$$inline_166_target$$46$$ - 2; + $code$$inline_163_code$$inline_173$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.incHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}"; + $code$$inline_163_code$$inline_173$$ += "if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 184: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "LDDR"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "LDDR"; break; case 185: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "CPDR"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "CPDR"; break; case 186: - $currAddr$$inline_111_target$$inline_121$$ = $address$$inline_115_target$$46$$ - 2; - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "INDR"; - $code$$inline_112_code$$inline_122$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.decHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; + $currAddr$$inline_162_target$$inline_172$$ = $address$$inline_166_target$$46$$ - 2; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "INDR"; + $code$$inline_163_code$$inline_173$$ = "temp = this.port.in_(this.c);this.writeMem(this.getHL(), temp);this.b = this.dec8(this.b);this.decHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; break; case 187: - $currAddr$$inline_111_target$$inline_121$$ = $address$$inline_115_target$$46$$ - 2, $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = "OTDR", $code$$inline_112_code$$inline_122$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.decHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}" + $currAddr$$inline_162_target$$inline_172$$ = $address$$inline_166_target$$46$$ - 2, $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = "OTDR", $code$$inline_163_code$$inline_173$$ = "temp = this.readMem(this.getHL());this.port.out(this.c, temp);this.b = this.dec8(this.b);this.decHL();if (this.b != 0x00) {this.tstates -= 0x05;return;}if (this.l + temp > 0xFF) {this.f |= F_CARRY; this.f |= F_HALFCARRY;} else {this.f &= ~ F_CARRY; this.f &= ~ F_HALFCARRY;}if ((temp & 0x80) != 0x00) {this.f |= F_NEGATIVE;} else {this.f &= ~ F_NEGATIVE;}"; } - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = {$opcode$:$address$$inline_107_inst_opcode$$inline_117$$, $opcodes$:$code$$5_opcode$$inline_108_opcodesArray$$inline_118$$, $inst$:$_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$, code:$code$$inline_112_code$$inline_122$$, $address$:$currAddr$$inline_120_inst$$inline_110_location$$26$$, $nextAddress$:$address$$inline_115_target$$46$$, target:$currAddr$$inline_111_target$$inline_121$$}; - $address$$inline_115_target$$46$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.target; - $address$$inline_107_inst_opcode$$inline_117$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$inst$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.code; - $defaultInstruction$$inline_128_opcodesArray$$ = $defaultInstruction$$inline_128_opcodesArray$$.concat($_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$opcodes$); - $address$$8$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$nextAddress$; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = {$opcode$:$address$$inline_158_inst_opcode$$inline_168$$, $opcodes$:$code$$5_opcode$$inline_159_opcodesArray$$inline_169$$, $inst$:$_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$, code:$code$$inline_163_code$$inline_173$$, $address$:$currAddr$$inline_171_inst$$inline_161_location$$23$$, $nextAddress$:$address$$inline_166_target$$46$$, target:$currAddr$$inline_162_target$$inline_172$$}; + $address$$inline_166_target$$46$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.target; + $address$$inline_158_inst_opcode$$inline_168$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$inst$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.code; + $defaultInstruction$$inline_179_opcodesArray$$ = $defaultInstruction$$inline_179_opcodesArray$$.concat($_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$opcodes$); + $address$$8$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$nextAddress$; break; case 238: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "XOR " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a ^= " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + "];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "XOR " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a ^= " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + "];"; $address$$8$$++; break; case 239: - $address$$inline_115_target$$46$$ = 40; - $address$$inline_107_inst_opcode$$inline_117$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$); - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = 40; + $address$$inline_158_inst_opcode$$inline_168$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$); + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; break; case 240: - $address$$inline_107_inst_opcode$$inline_117$$ = "RET P"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_SIGN) == 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RET P"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_SIGN) === 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 241: - $address$$inline_107_inst_opcode$$inline_117$$ = "POP AF"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.setAF(this.readMemWord(this.sp)); this.sp += 0x02;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "POP AF"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.setAF(this.readMemWord(this.sp)); this.sp += 0x02;"; break; case 242: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "JP P,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_SIGN) == 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "JP P,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_SIGN) === 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 243: - $address$$inline_107_inst_opcode$$inline_117$$ = "DI"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.iff1 = false; this.iff2 = false; this.EI_inst = true;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "DI"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.iff1 = false; this.iff2 = false; this.EI_inst = true;"; break; case 244: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "CALL P (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_SIGN) == 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "CALL P (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_SIGN) === 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 245: - $address$$inline_107_inst_opcode$$inline_117$$ = "PUSH AF"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push2(this.a, this.f);"; + $address$$inline_158_inst_opcode$$inline_168$$ = "PUSH AF"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push2(this.a, this.f);"; break; case 246: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "OR " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.f = this.SZP_TABLE[this.a |= " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + "];"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "OR " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.f = this.SZP_TABLE[this.a |= " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + "];"; $address$$8$$++; break; case 247: - $address$$inline_115_target$$46$$ = 48; - $address$$inline_107_inst_opcode$$inline_117$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$); - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;"; + $address$$inline_166_target$$46$$ = 48; + $address$$inline_158_inst_opcode$$inline_168$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$); + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; break; case 248: - $address$$inline_107_inst_opcode$$inline_117$$ = "RET M"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_SIGN) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; + $address$$inline_158_inst_opcode$$inline_168$$ = "RET M"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_SIGN) != 0x00) {this.tstates -= 0x06;this.pc = this.readMemWord(this.sp);this.sp += 0x02;return;}"; break; case 249: - $address$$inline_107_inst_opcode$$inline_117$$ = "LD SP,HL"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.sp = this.getHL()"; + $address$$inline_158_inst_opcode$$inline_168$$ = "LD SP,HL"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.sp = this.getHL()"; break; case 250: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "JP M,(" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_SIGN) != 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "JP M,(" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_SIGN) != 0x00) {this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 251: - $address$$inline_107_inst_opcode$$inline_117$$ = "EI"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.iff1 = true; this.iff2 = true; this.EI_inst = true;"; + $address$$inline_158_inst_opcode$$inline_168$$ = "EI"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.iff1 = true; this.iff2 = true; this.EI_inst = true;"; break; case 252: - $address$$inline_115_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = "CALL M (" + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ")"; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "if ((this.f & F_SIGN) != 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + ";return;}"; + $address$$inline_166_target$$46$$ = $JSCompiler_StaticMethods_readRom16bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = "CALL M (" + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ")"; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "if ((this.f & F_SIGN) != 0x00) {this.tstates -= 0x07;this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$ + 2) + ");this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + ";return;}"; $address$$8$$ += 2; break; case 253: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_disassemble$self$$, "IY", $address$$8$$); - $address$$inline_107_inst_opcode$$inline_117$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$inst$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.code; - $defaultInstruction$$inline_128_opcodesArray$$ = $defaultInstruction$$inline_128_opcodesArray$$.concat($_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$opcodes$); - $address$$8$$ = $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$.$nextAddress$; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSCompiler_StaticMethods_getIndex$$($JSCompiler_StaticMethods_disassemble$self$$, "IY", $address$$8$$); + $address$$inline_158_inst_opcode$$inline_168$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$inst$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.code; + $defaultInstruction$$inline_179_opcodesArray$$ = $defaultInstruction$$inline_179_opcodesArray$$.concat($_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$opcodes$); + $address$$8$$ = $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$.$nextAddress$; break; case 254: - $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); - $address$$inline_107_inst_opcode$$inline_117$$ = "CP " + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$; - $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.cp_a(" + $_inst_inst$$inline_119_opcodesArray$$inline_109_operand$$ + ");"; + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ = $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_readRom8bit$$($JSCompiler_StaticMethods_disassemble$self$$, $address$$8$$)); + $address$$inline_158_inst_opcode$$inline_168$$ = "CP " + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$; + $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.cp_a(" + $_inst_inst$$inline_170_opcodesArray$$inline_160_operand$$ + ");"; $address$$8$$++; break; case 255: - $address$$inline_115_target$$46$$ = 56, $address$$inline_107_inst_opcode$$inline_117$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$), $code$$5_opcode$$inline_108_opcodesArray$$inline_118$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_115_target$$46$$) + "; return;" + $address$$inline_166_target$$46$$ = 56, $address$$inline_158_inst_opcode$$inline_168$$ = "RST " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$), $code$$5_opcode$$inline_159_opcodesArray$$inline_169$$ = "this.push1(" + $JSSMS$Utils$toHex$$($address$$8$$) + "); this.pc = " + $JSSMS$Utils$toHex$$($address$$inline_166_target$$46$$) + "; return;"; } - var $opcode$$6_options$$inline_126$$ = {$opcode$:$opcode$$6_options$$inline_126$$, $opcodes$:$defaultInstruction$$inline_128_opcodesArray$$, $inst$:$address$$inline_107_inst_opcode$$inline_117$$, code:$code$$5_opcode$$inline_108_opcodesArray$$inline_118$$, $address$:$currAddr_hexOpcodes$$inline_130$$, $nextAddress$:$address$$8$$, target:$address$$inline_115_target$$46$$}, $defaultInstruction$$inline_128_opcodesArray$$ = {$address$:0, $hexAddress$:"", $opcode$:0, $opcodes$:[], $inst$:"", code:"", - $nextAddress$:null, target:null, $isJumpTarget$:!1, $jumpTargetNb$:0, label:""}, $prop$$inline_129$$, $currAddr_hexOpcodes$$inline_130$$ = ""; - for($prop$$inline_129$$ in $defaultInstruction$$inline_128_opcodesArray$$) { - void 0 != $opcode$$6_options$$inline_126$$[$prop$$inline_129$$] && ($defaultInstruction$$inline_128_opcodesArray$$[$prop$$inline_129$$] = $opcode$$6_options$$inline_126$$[$prop$$inline_129$$]) + var $opcode$$6_options$$inline_177$$ = {$opcode$:$opcode$$6_options$$inline_177$$, $opcodes$:$defaultInstruction$$inline_179_opcodesArray$$, $inst$:$address$$inline_158_inst_opcode$$inline_168$$, code:$code$$5_opcode$$inline_159_opcodesArray$$inline_169$$, $address$:$currAddr_hexOpcodes$$inline_181$$, $nextAddress$:$address$$8$$, target:$address$$inline_166_target$$46$$}, $defaultInstruction$$inline_179_opcodesArray$$ = {$address$:0, $hexAddress$:"", $opcode$:0, $opcodes$:[], $inst$:"", code:"", + $nextAddress$:null, target:null, $isJumpTarget$:!1, $jumpTargetNb$:0, label:""}, $prop$$inline_180$$, $currAddr_hexOpcodes$$inline_181$$ = ""; + for ($prop$$inline_180$$ in $defaultInstruction$$inline_179_opcodesArray$$) { + void 0 !== $opcode$$6_options$$inline_177$$[$prop$$inline_180$$] && ($defaultInstruction$$inline_179_opcodesArray$$[$prop$$inline_180$$] = $opcode$$6_options$$inline_177$$[$prop$$inline_180$$]); } - $defaultInstruction$$inline_128_opcodesArray$$.$hexAddress$ = $JSSMS$Utils$toHex$$($defaultInstruction$$inline_128_opcodesArray$$.$address$); - $defaultInstruction$$inline_128_opcodesArray$$.$opcodes$.length && ($currAddr_hexOpcodes$$inline_130$$ = $defaultInstruction$$inline_128_opcodesArray$$.$opcodes$.map($JSSMS$Utils$toHex$$).join(" ") + " "); - $defaultInstruction$$inline_128_opcodesArray$$.label = $defaultInstruction$$inline_128_opcodesArray$$.$hexAddress$ + " " + $currAddr_hexOpcodes$$inline_130$$ + $defaultInstruction$$inline_128_opcodesArray$$.$inst$; - return $defaultInstruction$$inline_128_opcodesArray$$ + $defaultInstruction$$inline_179_opcodesArray$$.$hexAddress$ = $JSSMS$Utils$toHex$$($defaultInstruction$$inline_179_opcodesArray$$.$address$); + $defaultInstruction$$inline_179_opcodesArray$$.$opcodes$.length && ($currAddr_hexOpcodes$$inline_181$$ = $defaultInstruction$$inline_179_opcodesArray$$.$opcodes$.map($JSSMS$Utils$toHex$$).join(" ") + " "); + $defaultInstruction$$inline_179_opcodesArray$$.label = $defaultInstruction$$inline_179_opcodesArray$$.$hexAddress$ + " " + $currAddr_hexOpcodes$$inline_181$$ + $defaultInstruction$$inline_179_opcodesArray$$.$inst$; + return $defaultInstruction$$inline_179_opcodesArray$$; } function $JSCompiler_StaticMethods_parseInstructions$$($JSCompiler_StaticMethods_parseInstructions$self$$) { $JSSMS$Utils$console$time$$("Instructions parsing"); - var $romSize$$ = 16384 * $JSCompiler_StaticMethods_parseInstructions$self$$.$rom$.length, $instruction$$, $currentAddress$$, $i$$11$$ = 0, $addresses$$ = [], $entryPoints$$ = [0, 56, 102]; - for($entryPoints$$.forEach(function($entryPoint$$) { - $addresses$$.push($entryPoint$$) + var $romSize$$ = 16384 * $JSCompiler_StaticMethods_parseInstructions$self$$.$rom$.length, $instruction$$, $currentAddress$$, $i$$13$$ = 0, $addresses$$ = [], $entryPoints$$ = [0, 56, 102]; + for ($entryPoints$$.forEach(function($entryPoint$$) { + $addresses$$.push($entryPoint$$); });$addresses$$.length;) { $currentAddress$$ = $addresses$$.shift(), $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$currentAddress$$] || ($currentAddress$$ >= $romSize$$ || 65 <= $currentAddress$$ >> 10 ? $JSSMS$Utils$console$log$$("Invalid address", $JSSMS$Utils$toHex$$($currentAddress$$)) : ($instruction$$ = $JSCompiler_StaticMethods_disassemble$$($JSCompiler_StaticMethods_parseInstructions$self$$, $currentAddress$$), $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$currentAddress$$] = - $instruction$$, null != $instruction$$.$nextAddress$ && $addresses$$.push($instruction$$.$nextAddress$), null != $instruction$$.target && $addresses$$.push($instruction$$.target))) + $instruction$$, null !== $instruction$$.$nextAddress$ && $addresses$$.push($instruction$$.$nextAddress$), null !== $instruction$$.target && $addresses$$.push($instruction$$.target))); } - for($entryPoints$$.forEach(function($entryPoint$$1$$) { - this.$instructions$[$entryPoint$$1$$] && (this.$instructions$[$entryPoint$$1$$].$isJumpTarget$ = !0) - }, $JSCompiler_StaticMethods_parseInstructions$self$$);$i$$11$$ < $romSize$$;$i$$11$$++) { - $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$11$$] && (null != $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$11$$].$nextAddress$ && $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$11$$].$nextAddress$] && $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$11$$].$nextAddress$].$jumpTargetNb$++, - null != $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$11$$].target && ($JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$11$$].target] ? ($JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$11$$].target].$isJumpTarget$ = !0, $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$11$$].target].$jumpTargetNb$++) : - $JSSMS$Utils$console$log$$("Invalid target address", $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$11$$].target)))) + for ($entryPoints$$.forEach(function($entryPoint$$1$$) { + this.$instructions$[$entryPoint$$1$$] && (this.$instructions$[$entryPoint$$1$$].$isJumpTarget$ = !0); + }, $JSCompiler_StaticMethods_parseInstructions$self$$);$i$$13$$ < $romSize$$;$i$$13$$++) { + $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$13$$] && (null !== $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$13$$].$nextAddress$ && $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$13$$].$nextAddress$] && $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$13$$].$nextAddress$].$jumpTargetNb$++, + null !== $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$13$$].target && ($JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$13$$].target] ? ($JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$13$$].target].$isJumpTarget$ = !0, $JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$13$$].target].$jumpTargetNb$++) : + $JSSMS$Utils$console$log$$("Invalid target address", $JSSMS$Utils$toHex$$($JSCompiler_StaticMethods_parseInstructions$self$$.$instructions$[$i$$13$$].target)))); } - $JSSMS$Utils$console$timeEnd$$("Instructions parsing") + $JSSMS$Utils$console$timeEnd$$("Instructions parsing"); } ;function $JSSMS$Keyboard$$($sms$$1$$) { this.$main$ = $sms$$1$$; - this.$ggstart$ = this.$a$ = this.$controller1$ = 0 + this.$ggstart$ = this.$a$ = this.$controller1$ = 0; } $JSSMS$Keyboard$$.prototype = {reset:function $$JSSMS$Keyboard$$$$reset$() { this.$ggstart$ = this.$a$ = this.$controller1$ = 255; - this.$pause_button$ = !1 + this.$pause_button$ = !1; }, keydown:function $$JSSMS$Keyboard$$$$keydown$($evt$$16$$) { switch($evt$$16$$.keyCode) { case 38: @@ -7535,9 +7642,9 @@ $JSSMS$Keyboard$$.prototype = {reset:function $$JSSMS$Keyboard$$$$reset$() { this.$a$ &= -65; break; default: - return + return; } - $evt$$16$$.preventDefault() + $evt$$16$$.preventDefault(); }, keyup:function $$JSSMS$Keyboard$$$$keyup$($evt$$17$$) { switch($evt$$17$$.keyCode) { case 38: @@ -7583,210 +7690,217 @@ $JSSMS$Keyboard$$.prototype = {reset:function $$JSSMS$Keyboard$$$$reset$() { this.$a$ |= 64; break; default: - return + return; } - $evt$$17$$.preventDefault() + $evt$$17$$.preventDefault(); }}; var $NO_ANTIALIAS$$ = Number.MIN_VALUE, $PSG_VOLUME$$ = [25, 20, 16, 13, 10, 8, 6, 5, 4, 3, 3, 2, 2, 1, 1, 0]; function $JSSMS$SN76489$$($sms$$2$$) { this.$main$ = $sms$$2$$; - this.$g$ = this.$n$ = 0; - this.$b$ = Array(8); - this.$c$ = 0; + this.$j$ = this.$q$ = 0; + this.$f$ = Array(8); + this.$g$ = 0; this.$a$ = Array(4); - this.$f$ = Array(4); - this.$i$ = Array(3); - this.$j$ = 16; - this.$h$ = 32768; - this.$m$ = Array(4) + this.$i$ = Array(4); + this.$n$ = Array(3); + this.$o$ = 16; + this.$m$ = 32768; + this.$p$ = Array(4); } -$JSSMS$SN76489$$.prototype = {$o$:function $$JSSMS$SN76489$$$$$o$$($clockSpeed$$, $sampleRate$$) { - this.$n$ = ($clockSpeed$$ << 8) / 16 / $sampleRate$$; - this.$c$ = this.$g$ = 0; - this.$j$ = 16; - this.$h$ = 32768; - for(var $i$$14$$ = 0;4 > $i$$14$$;$i$$14$$++) { - this.$b$[$i$$14$$ << 1] = 1, this.$b$[($i$$14$$ << 1) + 1] = 15, this.$a$[$i$$14$$] = 0, this.$f$[$i$$14$$] = 1, 3 != $i$$14$$ && (this.$i$[$i$$14$$] = $NO_ANTIALIAS$$) +$JSSMS$SN76489$$.prototype = {$s$:function $$JSSMS$SN76489$$$$$s$$($clockSpeed$$, $sampleRate$$) { + this.$q$ = ($clockSpeed$$ << 8) / 16 / $sampleRate$$; + this.$g$ = this.$j$ = 0; + this.$o$ = 16; + this.$m$ = 32768; + for (var $i$$16$$ = 0;4 > $i$$16$$;$i$$16$$++) { + this.$f$[$i$$16$$ << 1] = 1, this.$f$[($i$$16$$ << 1) + 1] = 15, this.$a$[$i$$16$$] = 0, this.$i$[$i$$16$$] = 1, 3 != $i$$16$$ && (this.$n$[$i$$16$$] = $NO_ANTIALIAS$$); } }}; -function $JSSMS$Vdp$$($i$$inline_133_i$$inline_136_sms$$3$$) { - this.$main$ = $i$$inline_133_i$$inline_136_sms$$3$$; - var $i$$16_r$$inline_137$$ = 0; - this.$N$ = 0; - this.$f$ = new $JSSMS$Utils$Uint8Array$$(16384); +function $JSSMS$Vdp$$($i$$inline_184_i$$inline_187_sms$$3$$) { + this.$main$ = $i$$inline_184_i$$inline_187_sms$$3$$; + var $i$$18_r$$inline_188$$ = 0; + this.$Q$ = 0; + this.$i$ = new $JSSMS$Utils$Uint8Array$$(16384); this.$a$ = new $JSSMS$Utils$Uint8Array$$(96); - for($i$$16_r$$inline_137$$ = 0;96 > $i$$16_r$$inline_137$$;$i$$16_r$$inline_137$$++) { - this.$a$[$i$$16_r$$inline_137$$] = 255 - } - this.$c$ = new $JSSMS$Utils$Uint8Array$$(16); - this.$h$ = 0; - this.$n$ = !1; - this.$v$ = this.$p$ = this.$M$ = this.$w$ = this.$g$ = this.$j$ = 0; - this.$t$ = new $JSSMS$Utils$Uint8Array$$(256); - this.$J$ = 0; - this.$b$ = $i$$inline_133_i$$inline_136_sms$$3$$.$a$.$canvasImageData$.data; - this.$T$ = new $JSSMS$Utils$Uint8Array$$(64); - this.$S$ = new $JSSMS$Utils$Uint8Array$$(64); - this.$R$ = new $JSSMS$Utils$Uint8Array$$(64); - this.$Q$ = new $JSSMS$Utils$Uint8Array$$(256); - this.$P$ = new $JSSMS$Utils$Uint8Array$$(256); - this.$O$ = new $JSSMS$Utils$Uint8Array$$(16); - this.$i$ = this.$K$ = this.$F$ = 0; - this.$m$ = !1; - this.$q$ = Array(192); - for($i$$16_r$$inline_137$$ = 0;192 > $i$$16_r$$inline_137$$;$i$$16_r$$inline_137$$++) { - this.$q$[$i$$16_r$$inline_137$$] = new $JSSMS$Utils$Uint8Array$$(25) - } - this.$I$ = Array(512); - this.$G$ = new $JSSMS$Utils$Uint8Array$$(512); - for($i$$inline_133_i$$inline_136_sms$$3$$ = this.$o$ = this.$s$ = 0;512 > $i$$inline_133_i$$inline_136_sms$$3$$;$i$$inline_133_i$$inline_136_sms$$3$$++) { - this.$I$[$i$$inline_133_i$$inline_136_sms$$3$$] = new $JSSMS$Utils$Uint8Array$$(64) - } - var $g$$inline_138$$, $b$$inline_139$$; - for($i$$inline_133_i$$inline_136_sms$$3$$ = 0;64 > $i$$inline_133_i$$inline_136_sms$$3$$;$i$$inline_133_i$$inline_136_sms$$3$$++) { - $i$$16_r$$inline_137$$ = $i$$inline_133_i$$inline_136_sms$$3$$ & 3, $g$$inline_138$$ = $i$$inline_133_i$$inline_136_sms$$3$$ >> 2 & 3, $b$$inline_139$$ = $i$$inline_133_i$$inline_136_sms$$3$$ >> 4 & 3, this.$T$[$i$$inline_133_i$$inline_136_sms$$3$$] = 85 * $i$$16_r$$inline_137$$ & 255, this.$S$[$i$$inline_133_i$$inline_136_sms$$3$$] = 85 * $g$$inline_138$$ & 255, this.$R$[$i$$inline_133_i$$inline_136_sms$$3$$] = 85 * $b$$inline_139$$ & 255 - } - for($i$$inline_133_i$$inline_136_sms$$3$$ = 0;256 > $i$$inline_133_i$$inline_136_sms$$3$$;$i$$inline_133_i$$inline_136_sms$$3$$++) { - $g$$inline_138$$ = $i$$inline_133_i$$inline_136_sms$$3$$ & 15, $b$$inline_139$$ = $i$$inline_133_i$$inline_136_sms$$3$$ >> 4 & 15, this.$Q$[$i$$inline_133_i$$inline_136_sms$$3$$] = ($g$$inline_138$$ << 4 | $g$$inline_138$$) & 255, this.$P$[$i$$inline_133_i$$inline_136_sms$$3$$] = ($b$$inline_139$$ << 4 | $b$$inline_139$$) & 255 - } - for($i$$inline_133_i$$inline_136_sms$$3$$ = 0;16 > $i$$inline_133_i$$inline_136_sms$$3$$;$i$$inline_133_i$$inline_136_sms$$3$$++) { - this.$O$[$i$$inline_133_i$$inline_136_sms$$3$$] = ($i$$inline_133_i$$inline_136_sms$$3$$ << 4 | $i$$inline_133_i$$inline_136_sms$$3$$) & 255 + for ($i$$18_r$$inline_188$$ = 0;96 > $i$$18_r$$inline_188$$;$i$$18_r$$inline_188$$++) { + this.$a$[$i$$18_r$$inline_188$$] = 255; + } + this.$g$ = new $JSSMS$Utils$Uint8Array$$(16); + this.$m$ = 0; + this.$q$ = !1; + this.$G$ = this.$t$ = this.$P$ = this.$I$ = this.$j$ = this.$o$ = 0; + this.$F$ = new $JSSMS$Utils$Uint8Array$$(256); + this.$N$ = 0; + this.$f$ = $i$$inline_184_i$$inline_187_sms$$3$$.$a$.$canvasImageData$.data; + this.$W$ = new $JSSMS$Utils$Uint8Array$$(64); + this.$V$ = new $JSSMS$Utils$Uint8Array$$(64); + this.$U$ = new $JSSMS$Utils$Uint8Array$$(64); + this.$T$ = new $JSSMS$Utils$Uint8Array$$(256); + this.$S$ = new $JSSMS$Utils$Uint8Array$$(256); + this.$R$ = new $JSSMS$Utils$Uint8Array$$(16); + this.$n$ = this.$O$ = this.$J$ = 0; + this.$p$ = !1; + this.$v$ = Array(192); + for ($i$$18_r$$inline_188$$ = 0;192 > $i$$18_r$$inline_188$$;$i$$18_r$$inline_188$$++) { + this.$v$[$i$$18_r$$inline_188$$] = new $JSSMS$Utils$Uint8Array$$(25); + } + this.$M$ = Array(512); + this.$K$ = new $JSSMS$Utils$Uint8Array$$(512); + for ($i$$inline_184_i$$inline_187_sms$$3$$ = this.$s$ = this.$w$ = 0;512 > $i$$inline_184_i$$inline_187_sms$$3$$;$i$$inline_184_i$$inline_187_sms$$3$$++) { + this.$M$[$i$$inline_184_i$$inline_187_sms$$3$$] = new $JSSMS$Utils$Uint8Array$$(64); + } + var $g$$inline_189$$, $b$$inline_190$$; + for ($i$$inline_184_i$$inline_187_sms$$3$$ = 0;64 > $i$$inline_184_i$$inline_187_sms$$3$$;$i$$inline_184_i$$inline_187_sms$$3$$++) { + $i$$18_r$$inline_188$$ = $i$$inline_184_i$$inline_187_sms$$3$$ & 3, $g$$inline_189$$ = $i$$inline_184_i$$inline_187_sms$$3$$ >> 2 & 3, $b$$inline_190$$ = $i$$inline_184_i$$inline_187_sms$$3$$ >> 4 & 3, this.$W$[$i$$inline_184_i$$inline_187_sms$$3$$] = 85 * $i$$18_r$$inline_188$$ & 255, this.$V$[$i$$inline_184_i$$inline_187_sms$$3$$] = 85 * $g$$inline_189$$ & 255, this.$U$[$i$$inline_184_i$$inline_187_sms$$3$$] = 85 * $b$$inline_190$$ & 255; + } + for ($i$$inline_184_i$$inline_187_sms$$3$$ = 0;256 > $i$$inline_184_i$$inline_187_sms$$3$$;$i$$inline_184_i$$inline_187_sms$$3$$++) { + $g$$inline_189$$ = $i$$inline_184_i$$inline_187_sms$$3$$ & 15, $b$$inline_190$$ = $i$$inline_184_i$$inline_187_sms$$3$$ >> 4 & 15, this.$T$[$i$$inline_184_i$$inline_187_sms$$3$$] = ($g$$inline_189$$ << 4 | $g$$inline_189$$) & 255, this.$S$[$i$$inline_184_i$$inline_187_sms$$3$$] = ($b$$inline_190$$ << 4 | $b$$inline_190$$) & 255; + } + for ($i$$inline_184_i$$inline_187_sms$$3$$ = 0;16 > $i$$inline_184_i$$inline_187_sms$$3$$;$i$$inline_184_i$$inline_187_sms$$3$$++) { + this.$R$[$i$$inline_184_i$$inline_187_sms$$3$$] = ($i$$inline_184_i$$inline_187_sms$$3$$ << 4 | $i$$inline_184_i$$inline_187_sms$$3$$) & 255; } } $JSSMS$Vdp$$.prototype = {reset:function $$JSSMS$Vdp$$$$reset$() { - var $i$$17$$; - this.$n$ = !0; - for($i$$17$$ = this.$w$ = this.$h$ = this.$v$ = this.$g$ = 0;16 > $i$$17$$;$i$$17$$++) { - this.$c$[$i$$17$$] = 0 - } - this.$c$[2] = 14; - this.$c$[5] = 126; - this.$main$.$cpu$.$I$ = !1; - this.$m$ = !0; - this.$s$ = 512; - this.$o$ = -1; - for($i$$17$$ = 0;16384 > $i$$17$$;$i$$17$$++) { - this.$f$[$i$$17$$] = 0 - } - for($i$$17$$ = 0;196608 > $i$$17$$;$i$$17$$ += 4) { - this.$b$[$i$$17$$] = 0, this.$b$[$i$$17$$ + 1] = 0, this.$b$[$i$$17$$ + 2] = 0, this.$b$[$i$$17$$ + 3] = 255 + var $i$$19$$; + this.$q$ = !0; + for ($i$$19$$ = this.$I$ = this.$m$ = this.$G$ = this.$j$ = 0;16 > $i$$19$$;$i$$19$$++) { + this.$g$[$i$$19$$] = 0; + } + this.$g$[2] = 14; + this.$g$[5] = 126; + this.$main$.$cpu$.$J$ = !1; + this.$p$ = !0; + this.$w$ = 512; + this.$s$ = -1; + for ($i$$19$$ = 0;16384 > $i$$19$$;$i$$19$$++) { + this.$i$[$i$$19$$] = 0; + } + for ($i$$19$$ = 0;196608 > $i$$19$$;$i$$19$$ += 4) { + this.$f$[$i$$19$$] = 0, this.$f$[$i$$19$$ + 1] = 0, this.$f$[$i$$19$$ + 2] = 0, this.$f$[$i$$19$$ + 3] = 255; } }}; function $JSCompiler_StaticMethods_forceFullRedraw$$($JSCompiler_StaticMethods_forceFullRedraw$self$$) { - $JSCompiler_StaticMethods_forceFullRedraw$self$$.$J$ = ($JSCompiler_StaticMethods_forceFullRedraw$self$$.$c$[2] & 14) << 10; - $JSCompiler_StaticMethods_forceFullRedraw$self$$.$s$ = 0; - $JSCompiler_StaticMethods_forceFullRedraw$self$$.$o$ = 511; - for(var $i$$18$$ = 0;512 > $i$$18$$;$i$$18$$++) { - $JSCompiler_StaticMethods_forceFullRedraw$self$$.$G$[$i$$18$$] = 1 - } - $JSCompiler_StaticMethods_forceFullRedraw$self$$.$i$ = ($JSCompiler_StaticMethods_forceFullRedraw$self$$.$c$[5] & -130) << 7; - $JSCompiler_StaticMethods_forceFullRedraw$self$$.$m$ = !0 + $JSCompiler_StaticMethods_forceFullRedraw$self$$.$N$ = ($JSCompiler_StaticMethods_forceFullRedraw$self$$.$g$[2] & 14) << 10; + $JSCompiler_StaticMethods_forceFullRedraw$self$$.$w$ = 0; + $JSCompiler_StaticMethods_forceFullRedraw$self$$.$s$ = 511; + for (var $i$$20$$ = 0;512 > $i$$20$$;$i$$20$$++) { + $JSCompiler_StaticMethods_forceFullRedraw$self$$.$K$[$i$$20$$] = 1; + } + $JSCompiler_StaticMethods_forceFullRedraw$self$$.$n$ = ($JSCompiler_StaticMethods_forceFullRedraw$self$$.$g$[5] & -130) << 7; + $JSCompiler_StaticMethods_forceFullRedraw$self$$.$p$ = !0; } ;function $JSSMS$DummyUI$$($sms$$4$$) { this.$main$ = $sms$$4$$; - this.reset = $JSCompiler_emptyFn$$(); - this.updateStatus = $JSCompiler_emptyFn$$(); - this.$writeFrame$ = $JSCompiler_emptyFn$$(); - this.$canvasImageData$ = {data:[]} + this.reset = function $this$reset$() { + }; + this.updateStatus = function $this$updateStatus$() { + }; + this.$writeFrame$ = function $this$$writeFrame$$() { + }; + this.$updateDisassembly$ = function $this$$updateDisassembly$$() { + }; + this.$canvasImageData$ = {data:[]}; } window.$ && ($.fn.JSSMSUI = function $$$fn$JSSMSUI$($roms$$) { - function $UI$$($root_sms$$5$$) { - this.$main$ = $root_sms$$5$$; - if("[object OperaMini]" == Object.prototype.toString.call(window.operamini)) { - $($parent$$2$$).html('
Oh no! Your browser can\'t run this emulator. Try the latest version of Firefox, Google Chrome, Opera or Safari!
') - }else { + function $UI$$($root$$2_sms$$5$$) { + function $touchStart$$($key$$18$$) { + return function($evt$$18$$) { + $self$$4$$.$main$.$keyboard$.$controller1$ &= ~$key$$18$$; + $evt$$18$$.preventDefault(); + }; + } + function $touchEnd$$($key$$19$$) { + return function($evt$$19$$) { + $self$$4$$.$main$.$keyboard$.$controller1$ |= $key$$19$$; + $evt$$19$$.preventDefault(); + }; + } + this.$main$ = $root$$2_sms$$5$$; + if ("[object OperaMini]" == Object.prototype.toString.call(window.operamini)) { + $($parent$$2$$).html('
Oh no! Your browser can\'t run this emulator. Try the latest version of Firefox, Google Chrome, Opera or Safari!
'); + } else { var $self$$4$$ = this; - $root_sms$$5$$ = $("
"); + $root$$2_sms$$5$$ = $("
"); var $screenContainer$$ = $('
'), $gamepadContainer$$ = $('
'), $controls$$ = $('
'), $fullscreenSupport$$ = $JSSMS$Utils$getPrefix$$(["fullscreenEnabled", "mozFullScreenEnabled", "webkitCancelFullScreen"]), - $requestAnimationFramePrefix_startButton$$ = $JSSMS$Utils$getPrefix$$(["requestAnimationFrame", "msRequestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame"], window), $i$$25$$; - if($requestAnimationFramePrefix_startButton$$) { - this.requestAnimationFrame = window[$requestAnimationFramePrefix_startButton$$].bind(window) - }else { + $requestAnimationFramePrefix_startButton$$ = $JSSMS$Utils$getPrefix$$(["requestAnimationFrame", "msRequestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame"], window), $i$$27$$; + if ($requestAnimationFramePrefix_startButton$$) { + this.requestAnimationFrame = window[$requestAnimationFramePrefix_startButton$$].bind(window); + } else { var $lastTime$$ = 0; - this.requestAnimationFrame = function $this$requestAnimationFrame$($callback$$54$$) { + this.requestAnimationFrame = function $this$requestAnimationFrame$($callback$$55$$) { var $currTime_timeToCall$$ = $JSSMS$Utils$getTimestamp$$(), $currTime_timeToCall$$ = Math.max(0, 1E3 / 60 - ($currTime_timeToCall$$ - $lastTime$$)); window.setTimeout(function() { $lastTime$$ = $JSSMS$Utils$getTimestamp$$(); - $callback$$54$$() - }, $currTime_timeToCall$$) - } + $callback$$55$$(); + }, $currTime_timeToCall$$); + }; } this.screen = $(""); this.$canvasContext$ = this.screen[0].getContext("2d"); this.$canvasContext$.webkitImageSmoothingEnabled = !1; this.$canvasContext$.mozImageSmoothingEnabled = !1; this.$canvasContext$.imageSmoothingEnabled = !1; - if(this.$canvasContext$.getImageData) { + if (this.$canvasContext$.getImageData) { this.$canvasImageData$ = this.$canvasContext$.getImageData(0, 0, 256, 192); this.$gamepad$ = {$u$:{$e$:$(".up", $gamepadContainer$$), $k$:1}, $r$:{$e$:$(".right", $gamepadContainer$$), $k$:8}, $d$:{$e$:$(".down", $gamepadContainer$$), $k$:2}, $l$:{$e$:$(".left", $gamepadContainer$$), $k$:4}, 1:{$e$:$(".fire1", $gamepadContainer$$), $k$:16}, 2:{$e$:$(".fire2", $gamepadContainer$$), $k$:32}}; $requestAnimationFramePrefix_startButton$$ = $(".start", $gamepadContainer$$); this.$romContainer$ = $('
'); this.$romSelect$ = $("").change(function() { - $self$$4$$.$loadROM$() + $self$$4$$.$loadROM$(); }); this.buttons = Object.create(null); this.buttons.start = $('').click(function() { - $self$$4$$.$main$.$isRunning$ ? ($self$$4$$.$main$.stop(), $self$$4$$.updateStatus("Paused"), $self$$4$$.buttons.start.attr("value", "Start")) : ($self$$4$$.$main$.start(), $self$$4$$.buttons.start.attr("value", "Pause")) + $self$$4$$.$main$.$isRunning$ ? ($self$$4$$.$main$.stop(), $self$$4$$.updateStatus("Paused"), $self$$4$$.buttons.start.attr("value", "Start")) : ($self$$4$$.$main$.start(), $self$$4$$.buttons.start.attr("value", "Pause")); }); this.buttons.reset = $('').click(function() { - "" != $self$$4$$.$main$.$romData$ && "" != $self$$4$$.$main$.$romFileName$ && $JSCompiler_StaticMethods_readRomDirectly$$($self$$4$$.$main$, $self$$4$$.$main$.$romData$, $self$$4$$.$main$.$romFileName$) ? ($self$$4$$.$main$.reset(), $JSCompiler_StaticMethods_forceFullRedraw$$($self$$4$$.$main$.$vdp$), $self$$4$$.$main$.start()) : $(this).attr("disabled", "disabled") + "" !== $self$$4$$.$main$.$romData$ && "" !== $self$$4$$.$main$.$romFileName$ && $JSCompiler_StaticMethods_readRomDirectly$$($self$$4$$.$main$, $self$$4$$.$main$.$romData$, $self$$4$$.$main$.$romFileName$) ? ($self$$4$$.$main$.reset(), $JSCompiler_StaticMethods_forceFullRedraw$$($self$$4$$.$main$.$vdp$), $self$$4$$.$main$.start()) : $(this).attr("disabled", "disabled"); }); this.$dissambler$ = $('
'); $($parent$$2$$).after(this.$dissambler$); this.buttons.$nextStep$ = $('').click(function() { - $self$$4$$.$main$.$nextStep$() + $self$$4$$.$main$.$nextStep$(); }); this.$main$.$soundEnabled$ && (this.buttons.$sound$ = $('').click(function() { - $self$$4$$.$main$.$soundEnabled$ ? ($self$$4$$.$main$.$soundEnabled$ = !1, $self$$4$$.buttons.$sound$.attr("value", "Enable sound")) : ($self$$4$$.$main$.$soundEnabled$ = !0, $self$$4$$.buttons.$sound$.attr("value", "Disable sound")) + $self$$4$$.$main$.$soundEnabled$ ? ($self$$4$$.$main$.$soundEnabled$ = !1, $self$$4$$.buttons.$sound$.attr("value", "Enable sound")) : ($self$$4$$.$main$.$soundEnabled$ = !0, $self$$4$$.buttons.$sound$.attr("value", "Disable sound")); })); $fullscreenSupport$$ ? this.buttons.$fullscreen$ = $('').click(function() { var $screen$$1$$ = $screenContainer$$[0]; - $screen$$1$$.requestFullscreen ? $screen$$1$$.requestFullscreen() : $screen$$1$$.mozRequestFullScreen ? $screen$$1$$.mozRequestFullScreen() : $screen$$1$$.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT) + $screen$$1$$.requestFullscreen ? $screen$$1$$.requestFullscreen() : $screen$$1$$.mozRequestFullScreen ? $screen$$1$$.mozRequestFullScreen() : $screen$$1$$.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); }) : (this.$zoomed$ = !1, this.buttons.zoom = $('').click(function() { $self$$4$$.$zoomed$ ? ($self$$4$$.screen.animate({width:"256px", height:"192px"}, function() { - $(this).removeAttr("style") + $(this).removeAttr("style"); }), $self$$4$$.buttons.zoom.attr("value", "Zoom in")) : ($self$$4$$.screen.animate({width:"512px", height:"384px"}), $self$$4$$.buttons.zoom.attr("value", "Zoom out")); - $self$$4$$.$zoomed$ = !$self$$4$$.$zoomed$ + $self$$4$$.$zoomed$ = !$self$$4$$.$zoomed$; })); - for($i$$25$$ in this.buttons) { - this.buttons[$i$$25$$].appendTo($controls$$) + for ($i$$27$$ in this.buttons) { + this.buttons[$i$$27$$].appendTo($controls$$); } this.log = $('
'); this.screen.appendTo($screenContainer$$); $gamepadContainer$$.appendTo($screenContainer$$); - $screenContainer$$.appendTo($root_sms$$5$$); - this.$romContainer$.appendTo($root_sms$$5$$); - $controls$$.appendTo($root_sms$$5$$); - this.log.appendTo($root_sms$$5$$); - $root_sms$$5$$.appendTo($($parent$$2$$)); - void 0 != $roms$$ && this.$setRoms$($roms$$); - $(document).bind("keydown", function($evt$$18$$) { - $self$$4$$.$main$.$keyboard$.keydown($evt$$18$$) - }).bind("keyup", function($evt$$19$$) { - $self$$4$$.$main$.$keyboard$.keyup($evt$$19$$) + $screenContainer$$.appendTo($root$$2_sms$$5$$); + this.$romContainer$.appendTo($root$$2_sms$$5$$); + $controls$$.appendTo($root$$2_sms$$5$$); + this.log.appendTo($root$$2_sms$$5$$); + $root$$2_sms$$5$$.appendTo($($parent$$2$$)); + void 0 !== $roms$$ && this.$setRoms$($roms$$); + $(document).bind("keydown", function($evt$$20$$) { + $self$$4$$.$main$.$keyboard$.keydown($evt$$20$$); + }).bind("keyup", function($evt$$21$$) { + $self$$4$$.$main$.$keyboard$.keyup($evt$$21$$); }); - for($i$$25$$ in this.$gamepad$) { - this.$gamepad$[$i$$25$$].$e$.on("mousedown touchstart", function($key$$18$$) { - return function($evt$$20$$) { - $self$$4$$.$main$.$keyboard$.$controller1$ &= ~$key$$18$$; - $evt$$20$$.preventDefault() - } - }(this.$gamepad$[$i$$25$$].$k$)).on("mouseup touchend", function($key$$19$$) { - return function($evt$$21$$) { - $self$$4$$.$main$.$keyboard$.$controller1$ |= $key$$19$$; - $evt$$21$$.preventDefault() - } - }(this.$gamepad$[$i$$25$$].$k$)) + for ($i$$27$$ in this.$gamepad$) { + this.$gamepad$[$i$$27$$].$e$.on("mousedown touchstart", $touchStart$$(this.$gamepad$[$i$$27$$].$k$)).on("mouseup touchend", $touchEnd$$(this.$gamepad$[$i$$27$$].$k$)); } $requestAnimationFramePrefix_startButton$$.on("mousedown touchstart", function($evt$$22$$) { $self$$4$$.$main$.$is_sms$ ? $self$$4$$.$main$.$pause_button$ = !0 : $self$$4$$.$main$.$keyboard$.$ggstart$ &= -129; - $evt$$22$$.preventDefault() + $evt$$22$$.preventDefault(); }).on("mouseup touchend", function($evt$$23$$) { $self$$4$$.$main$.$is_sms$ || ($self$$4$$.$main$.$keyboard$.$ggstart$ |= 128); - $evt$$23$$.preventDefault() - }) - }else { - $($parent$$2$$).html('
Oh no! Your browser doesn\'t support writing pixels directly to the <canvas> tag. Try the latest version of Firefox, Google Chrome, Opera or Safari!
') + $evt$$23$$.preventDefault(); + }); + } else { + $($parent$$2$$).html('
Oh no! Your browser doesn\'t support writing pixels directly to the <canvas> tag. Try the latest version of Firefox, Google Chrome, Opera or Safari!
'); } } } @@ -7795,849 +7909,2236 @@ window.$ && ($.fn.JSSMSUI = function $$$fn$JSSMSUI$($roms$$) { this.screen[0].width = 256; this.screen[0].height = 192; this.log.empty(); - this.$dissambler$.empty() + this.$dissambler$.empty(); }, $setRoms$:function $$UI$$$$$setRoms$$($roms$$1$$) { - var $groupName$$, $optgroup$$, $length$$19$$, $i$$26$$, $count$$7$$ = 0; + var $groupName$$, $optgroup$$, $length$$19$$, $i$$28$$, $count$$9$$ = 0; this.$romSelect$.children().remove(); $("").appendTo(this.$romSelect$); - for($groupName$$ in $roms$$1$$) { - if($roms$$1$$.hasOwnProperty($groupName$$)) { + for ($groupName$$ in $roms$$1$$) { + if ($roms$$1$$.hasOwnProperty($groupName$$)) { $optgroup$$ = $("").attr("label", $groupName$$); $length$$19$$ = $roms$$1$$[$groupName$$].length; - for($i$$26$$ = 0;$i$$26$$ < $length$$19$$;$i$$26$$++) { - $("").attr("value", $roms$$1$$[$groupName$$][$i$$26$$][1]).appendTo($optgroup$$) + for ($i$$28$$ = 0;$i$$28$$ < $length$$19$$;$i$$28$$++) { + $("").attr("value", $roms$$1$$[$groupName$$][$i$$28$$][1]).appendTo($optgroup$$); + } + $optgroup$$.appendTo(this.$romSelect$); + } + $count$$9$$++; + } + $count$$9$$ && this.$romSelect$.appendTo(this.$romContainer$); + }, $loadROM$:function $$UI$$$$$loadROM$$() { + var $self$$5$$ = this; + this.updateStatus("Downloading..."); + $.ajax({url:encodeURI(this.$romSelect$.val()), xhr:function() { + var $xhr$$1$$ = $.ajaxSettings.xhr(); + void 0 !== $xhr$$1$$.overrideMimeType && $xhr$$1$$.overrideMimeType("text/plain; charset=x-user-defined"); + return $self$$5$$.xhr = $xhr$$1$$; + }, complete:function($xhr$$2$$, $status$$) { + var $data$$35$$; + "error" == $status$$ ? $self$$5$$.updateStatus("The selected ROM file could not be loaded.") : ($data$$35$$ = $xhr$$2$$.responseText, $self$$5$$.$main$.stop(), $JSCompiler_StaticMethods_readRomDirectly$$($self$$5$$.$main$, $data$$35$$, $self$$5$$.$romSelect$.val()), $self$$5$$.$main$.reset(), $JSCompiler_StaticMethods_forceFullRedraw$$($self$$5$$.$main$.$vdp$), $self$$5$$.enable()); + }}); + }, enable:function $$UI$$$$enable$() { + this.buttons.start.removeAttr("disabled"); + this.buttons.start.attr("value", "Start"); + this.buttons.reset.removeAttr("disabled"); + this.buttons.$nextStep$.removeAttr("disabled"); + this.$main$.$soundEnabled$ && (this.buttons.$sound$ ? this.buttons.$sound$.attr("value", "Disable sound") : this.buttons.$sound$.attr("value", "Enable sound")); + }, updateStatus:function $$UI$$$$updateStatus$($s$$3$$) { + this.log.text($s$$3$$); + }, $writeFrame$:function() { + var $hiddenPrefix$$ = $JSSMS$Utils$getPrefix$$(["hidden", "mozHidden", "webkitHidden", "msHidden"]); + return $hiddenPrefix$$ ? function() { + document[$hiddenPrefix$$] || this.$canvasContext$.putImageData(this.$canvasImageData$, 0, 0); + } : function() { + this.$canvasContext$.putImageData(this.$canvasImageData$, 0, 0); + }; + }(), $updateDisassembly$:function $$UI$$$$$updateDisassembly$$($currentAddress$$1$$) { + for (var $instructions$$ = this.$main$.$cpu$.$instructions$, $length$$20$$ = $instructions$$.length, $html$$ = "", $i$$29$$ = 8 > $currentAddress$$1$$ ? 0 : $currentAddress$$1$$ - 8, $num$$4$$ = 0;16 > $num$$4$$ && $i$$29$$ <= $length$$20$$;$i$$29$$++) { + $instructions$$[$i$$29$$] && ($html$$ += "" + $instructions$$[$i$$29$$].$hexAddress$ + ($instructions$$[$i$$29$$].$isJumpTarget$ ? ":" : " ") + "" + $instructions$$[$i$$29$$].$inst$ + "", $num$$4$$++); + } + this.$dissambler$.html($html$$); + }}; + return $UI$$; +}); +function $JSSMS$Ports$$($sms$$6$$) { + this.$main$ = $sms$$6$$; + this.$vdp$ = $sms$$6$$.$vdp$; + this.$f$ = $sms$$6$$.$f$; + this.$keyboard$ = $sms$$6$$.$keyboard$; + this.$a$ = []; +} +$JSSMS$Ports$$.prototype = {reset:function $$JSSMS$Ports$$$$reset$() { + this.$a$ = Array(2); +}}; +function $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_in_$self$$, $port$$3$$) { + if ($JSCompiler_StaticMethods_in_$self$$.$main$.$is_gg$ && 7 > $port$$3$$) { + switch($port$$3$$) { + case 0: + return $JSCompiler_StaticMethods_in_$self$$.$keyboard$.$ggstart$ & 191 | 64; + case 1: + ; + case 2: + ; + case 3: + ; + case 4: + ; + case 5: + return 0; + case 6: + return 255; + } + } + switch($port$$3$$ & 193) { + case 64: + var $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$; + a: { + $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_in_$self$$.$vdp$; + if (0 == $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$Q$) { + if (218 < $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$t$) { + $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$t$ - 6; + break a; + } + } else { + if (242 < $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$t$) { + $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$t$ - 57; + break a; + } + } + $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$t$; + } + return $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$; + case 65: + return 0; + case 128: + $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_in_$self$$.$vdp$; + $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$q$ = !0; + var $statuscopy$$inline_267_value$$inline_264$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$P$; + $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$P$ = $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$i$[$JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$j$++ & + 16383] & 255; + return $statuscopy$$inline_267_value$$inline_264$$; + case 129: + return $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_in_$self$$.$vdp$, $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$q$ = !0, $statuscopy$$inline_267_value$$inline_264$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$m$, + $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$m$ = 0, $JSCompiler_StaticMethods_controlRead$self$$inline_266_JSCompiler_StaticMethods_dataRead$self$$inline_263_JSCompiler_StaticMethods_getVCount$self$$inline_261_JSCompiler_inline_result$$7$$.$main$.$cpu$.$J$ = !1, $statuscopy$$inline_267_value$$inline_264$$; + case 192: + return $JSCompiler_StaticMethods_in_$self$$.$keyboard$.$controller1$; + case 193: + return $JSCompiler_StaticMethods_in_$self$$.$keyboard$.$a$ & 63 | $JSCompiler_StaticMethods_in_$self$$.$a$[0] | $JSCompiler_StaticMethods_in_$self$$.$a$[1]; + } + return 255; +} +function $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$, $address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$, $reg$$inline_277_value$$82$$) { + if (!($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$main$.$is_gg$ && 7 > $address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$)) { + switch($address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ & 193) { + case 1: + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$a$[0] = ($reg$$inline_277_value$$82$$ & 32) << 1; + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$a$[1] = $reg$$inline_277_value$$82$$ & 128; + break; + case 128: + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$vdp$; + $address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ = 0; + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$q$ = !0; + switch($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$I$) { + case 0: + ; + case 1: + ; + case 2: + $address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$j$ & 16383; + if ($reg$$inline_277_value$$82$$ != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$i$[$address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$] & 255)) { + if ($address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ >= $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$n$ && $address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ < $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$n$ + + 64) { + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$p$ = !0; + } else { + if ($address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ >= $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$n$ + 128 && $address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ < $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$n$ + + 256) { + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$p$ = !0; + } else { + var $tileIndex$$inline_273$$ = $address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ >> 5; + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$K$[$tileIndex$$inline_273$$] = 1; + $tileIndex$$inline_273$$ < $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$w$ && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$w$ = $tileIndex$$inline_273$$); + $tileIndex$$inline_273$$ > $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$s$ && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$s$ = $tileIndex$$inline_273$$); + } + } + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$i$[$address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$] = $reg$$inline_277_value$$82$$; + } + break; + case 3: + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$main$.$is_sms$ ? ($address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ = 3 * ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$j$ & + 31), $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$W$[$reg$$inline_277_value$$82$$], + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ + 1] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$V$[$reg$$inline_277_value$$82$$], + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ + 2] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$U$[$reg$$inline_277_value$$82$$]) : + ($address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ = 3 * (($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$j$ & 63) >> 1), 0 === ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$j$ & + 1) ? ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$T$[$reg$$inline_277_value$$82$$], + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ + 1] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$S$[$reg$$inline_277_value$$82$$]) : + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ + 2] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$R$[$reg$$inline_277_value$$82$$]); + } + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$j$++; + break; + case 129: + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$vdp$; + if ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$q$) { + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$q$ = !1, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$o$ = $reg$$inline_277_value$$82$$, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$j$ = + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$j$ & 16128 | $reg$$inline_277_value$$82$$; + } else { + if ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$q$ = !0, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$I$ = $reg$$inline_277_value$$82$$ >> 6 & 3, + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$j$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$o$ | $reg$$inline_277_value$$82$$ << 8, 0 === $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$I$) { + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$P$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$i$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$j$++ & + 16383] & 255; + } else { + if (2 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$I$) { + $reg$$inline_277_value$$82$$ &= 15; + switch($reg$$inline_277_value$$82$$) { + case 0: + 0 !== ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$m$ & 4) && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$main$.$cpu$.$J$ = 0 !== ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$o$ & + 16)); + break; + case 1: + 0 !== ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$m$ & 128) && 0 !== ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$o$ & 32) && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$main$.$cpu$.$J$ = + !0); + ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$o$ & 3) != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$[$reg$$inline_277_value$$82$$] & 3) && + ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$p$ = !0); + break; + case 2: + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$N$ = ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$o$ & 14) << 10; + break; + case 5: + $address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$n$, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$n$ = + ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$o$ & -130) << 7, $address$$inline_272_old$$inline_278_port$$2_temp$$inline_271$$ != $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$n$ && + ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$p$ = !0); + } + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$[$reg$$inline_277_value$$82$$] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$o$; + } + } + } + break; + case 64: + ; + case 65: + if ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$main$.$soundEnabled$) { + switch($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$f$, 0 !== ($reg$$inline_277_value$$82$$ & 128) ? + ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$ = $reg$$inline_277_value$$82$$ >> 4 & 7, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$f$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$] = + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$f$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$] & 1008 | $reg$$inline_277_value$$82$$ & 15) : $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$f$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$] = + 0 === $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$ || 2 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$ || 4 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$ ? + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$f$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$] & 15 | ($reg$$inline_277_value$$82$$ & 63) << 4 : + $reg$$inline_277_value$$82$$ & 15, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$) { + case 0: + ; + case 2: + ; + case 4: + 0 === $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$f$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$] && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$f$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$g$] = + 1); + break; + case 6: + $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$o$ = 16 << ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$f$[6] & 3), $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_280_JSCompiler_StaticMethods_controlWrite$self$$inline_275_JSCompiler_StaticMethods_dataWrite$self$$inline_269_JSCompiler_StaticMethods_out$self$$.$m$ = + 32768; + } + } + ; + } + } +} +;var $Bytecode$$ = function() { + function $Bytecode$$1$$($address$$18$$, $page$$) { + this.$address$ = $address$$18$$; + this.page = $page$$; + this.$opcode$ = []; + this.target = this.$nextAddress$ = this.$operand$ = null; + this.$isJumpTarget$ = this.$canEnd$ = this.$isFunctionEnder$ = !1; + this.$jumpTargetNb$ = 0; + this.$ast$ = null; + } + $Bytecode$$1$$.prototype = {get $hexOpcode$() { + return this.$opcode$.length ? this.$opcode$.map($JSSMS$Utils$toHex$$).join(" ") : ""; + }, get label() { + var $name$$61$$ = this.name ? this.name.replace(/(nn|n|PC\+e|d)/, $JSSMS$Utils$toHex$$(this.target || this.$operand$ || 0)) : ""; + return $JSSMS$Utils$toHex$$(this.$address$ + 16384 * this.page) + " " + this.$hexOpcode$ + " " + $name$$61$$; + }}; + return $Bytecode$$1$$; +}(); +var $Parser$$ = function() { + function $parser$$($rom$$1$$, $frameReg$$) { + this.$g$ = new $RomStream$$($rom$$1$$); + this.$frameReg$ = $frameReg$$; + this.$a$ = Array($rom$$1$$.length); + this.$entryPoints$ = []; + this.$bytecodes$ = Array($rom$$1$$.length); + for (var $i$$30$$ = 0;$i$$30$$ < $rom$$1$$.length;$i$$30$$++) { + this.$a$[$i$$30$$] = [], this.$bytecodes$[$i$$30$$] = []; + } + } + function $disassemble$$($bytecode$$, $stream$$) { + $stream$$.page = $bytecode$$.page; + $stream$$.$RomStream_prototype$seek$($bytecode$$.$address$ + 16384 * $stream$$.page); + var $opcode$$13_opcode$$inline_285_opcode$$inline_289$$ = $stream$$.getUint8(), $operand$$3_operand$$inline_290$$ = null, $target$$48_target$$inline_291$$ = null, $isFunctionEnder_isFunctionEnder$$inline_292$$ = !1, $canEnd_canEnd$$inline_293$$ = !1; + $bytecode$$.$opcode$.push($opcode$$13_opcode$$inline_285_opcode$$inline_289$$); + switch($opcode$$13_opcode$$inline_285_opcode$$inline_289$$) { + case 0: + break; + case 1: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 2: + break; + case 3: + break; + case 4: + break; + case 5: + break; + case 6: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 7: + break; + case 8: + break; + case 9: + break; + case 10: + break; + case 11: + break; + case 12: + break; + case 13: + break; + case 14: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 15: + break; + case 16: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ + $stream$$.$RomStream_prototype$getInt8$(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 17: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 18: + break; + case 19: + break; + case 20: + break; + case 21: + break; + case 22: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 23: + break; + case 24: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ + $stream$$.$RomStream_prototype$getInt8$(); + $stream$$.$RomStream_prototype$seek$(null); + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 25: + break; + case 26: + break; + case 27: + break; + case 28: + break; + case 29: + break; + case 30: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 31: + break; + case 32: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ + $stream$$.$RomStream_prototype$getInt8$(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 33: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 34: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 35: + break; + case 36: + break; + case 37: + break; + case 38: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 39: + break; + case 40: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ + $stream$$.$RomStream_prototype$getInt8$(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 41: + break; + case 42: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 43: + break; + case 44: + break; + case 45: + break; + case 46: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 47: + break; + case 48: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ + $stream$$.$RomStream_prototype$getInt8$(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 49: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 50: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 51: + break; + case 52: + break; + case 53: + break; + case 54: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 55: + break; + case 56: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ + $stream$$.$RomStream_prototype$getInt8$(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 57: + break; + case 58: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 59: + break; + case 60: + break; + case 61: + break; + case 62: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 63: + break; + case 64: + break; + case 65: + break; + case 66: + break; + case 67: + break; + case 68: + break; + case 69: + break; + case 70: + break; + case 71: + break; + case 72: + break; + case 73: + break; + case 74: + break; + case 75: + break; + case 76: + break; + case 77: + break; + case 78: + break; + case 79: + break; + case 80: + break; + case 81: + break; + case 82: + break; + case 83: + break; + case 84: + break; + case 85: + break; + case 86: + break; + case 87: + break; + case 88: + break; + case 89: + break; + case 90: + break; + case 91: + break; + case 92: + break; + case 93: + break; + case 94: + break; + case 95: + break; + case 96: + break; + case 97: + break; + case 98: + break; + case 99: + break; + case 100: + break; + case 101: + break; + case 102: + break; + case 103: + break; + case 104: + break; + case 105: + break; + case 106: + break; + case 107: + break; + case 108: + break; + case 109: + break; + case 110: + break; + case 111: + break; + case 112: + break; + case 113: + break; + case 114: + break; + case 115: + break; + case 116: + break; + case 117: + break; + case 118: + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 119: + break; + case 120: + break; + case 121: + break; + case 122: + break; + case 123: + break; + case 124: + break; + case 125: + break; + case 126: + break; + case 127: + break; + case 128: + break; + case 129: + break; + case 130: + break; + case 131: + break; + case 132: + break; + case 133: + break; + case 134: + break; + case 135: + break; + case 136: + break; + case 137: + break; + case 138: + break; + case 139: + break; + case 140: + break; + case 141: + break; + case 142: + break; + case 143: + break; + case 144: + break; + case 145: + break; + case 146: + break; + case 147: + break; + case 148: + break; + case 149: + break; + case 150: + break; + case 151: + break; + case 152: + break; + case 153: + break; + case 154: + break; + case 155: + break; + case 156: + break; + case 157: + break; + case 158: + break; + case 159: + break; + case 160: + break; + case 161: + break; + case 162: + break; + case 163: + break; + case 164: + break; + case 165: + break; + case 166: + break; + case 167: + break; + case 168: + break; + case 169: + break; + case 170: + break; + case 171: + break; + case 172: + break; + case 173: + break; + case 174: + break; + case 175: + break; + case 176: + break; + case 177: + break; + case 178: + break; + case 179: + break; + case 180: + break; + case 181: + break; + case 182: + break; + case 183: + break; + case 184: + break; + case 185: + break; + case 186: + break; + case 187: + break; + case 188: + break; + case 189: + break; + case 190: + break; + case 191: + break; + case 192: + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 193: + break; + case 194: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 195: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $stream$$.$RomStream_prototype$seek$(null); + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 196: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 197: + break; + case 198: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 199: + $target$$48_target$$inline_291$$ = 0; + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 200: + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 201: + $stream$$.$RomStream_prototype$seek$(null); + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 202: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 203: + return $opcode$$13_opcode$$inline_285_opcode$$inline_289$$ = $stream$$.getUint8(), $bytecode$$.$opcode$.push($opcode$$13_opcode$$inline_285_opcode$$inline_289$$), $bytecode$$.$nextAddress$ = $stream$$.$RomStream_prototype$position$, $bytecode$$; + case 204: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 205: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 206: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 207: + $target$$48_target$$inline_291$$ = 8; + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 208: + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 209: + break; + case 210: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 211: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 212: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 213: + break; + case 214: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 215: + $target$$48_target$$inline_291$$ = 16; + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 216: + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 217: + break; + case 218: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 219: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 220: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 221: + return $getIndex$$($bytecode$$, $stream$$); + case 222: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 223: + $target$$48_target$$inline_291$$ = 24; + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 224: + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 225: + break; + case 226: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 227: + break; + case 228: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 229: + break; + case 230: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 231: + $target$$48_target$$inline_291$$ = 32; + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 232: + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 233: + $stream$$.$RomStream_prototype$seek$(null); + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 234: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 235: + break; + case 236: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 237: + $opcode$$13_opcode$$inline_285_opcode$$inline_289$$ = $stream$$.getUint8(); + $target$$48_target$$inline_291$$ = $operand$$3_operand$$inline_290$$ = null; + $canEnd_canEnd$$inline_293$$ = $isFunctionEnder_isFunctionEnder$$inline_292$$ = !1; + $bytecode$$.$opcode$.push($opcode$$13_opcode$$inline_285_opcode$$inline_289$$); + switch($opcode$$13_opcode$$inline_285_opcode$$inline_289$$) { + case 64: + break; + case 65: + break; + case 66: + break; + case 67: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 68: + ; + case 76: + ; + case 84: + ; + case 92: + ; + case 100: + ; + case 108: + ; + case 116: + ; + case 124: + break; + case 69: + ; + case 77: + ; + case 85: + ; + case 93: + ; + case 101: + ; + case 109: + ; + case 117: + ; + case 125: + $stream$$.$RomStream_prototype$seek$(null); + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 70: + ; + case 78: + ; + case 102: + ; + case 110: + break; + case 71: + break; + case 72: + break; + case 73: + break; + case 74: + break; + case 75: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 79: + break; + case 80: + break; + case 81: + break; + case 82: + break; + case 83: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 86: + ; + case 118: + break; + case 87: + break; + case 88: + break; + case 89: + break; + case 90: + break; + case 91: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 95: + break; + case 96: + break; + case 97: + break; + case 98: + break; + case 99: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 103: + break; + case 104: + break; + case 105: + break; + case 106: + break; + case 107: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 111: + break; + case 113: + break; + case 114: + break; + case 115: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 120: + break; + case 121: + break; + case 122: + break; + case 123: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint16(); + break; + case 160: + break; + case 161: + break; + case 162: + break; + case 163: + break; + case 168: + break; + case 169: + break; + case 170: + break; + case 171: + break; + case 176: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ - 2; + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 177: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ - 2; + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 178: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ - 2; + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 179: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ - 2; + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 184: + break; + case 185: + break; + case 186: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ - 2; + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 187: + $target$$48_target$$inline_291$$ = $stream$$.$RomStream_prototype$position$ - 2; + $canEnd_canEnd$$inline_293$$ = !0; + break; + default: + $JSSMS$Utils$console$error$$("Unexpected opcode", "0xED " + $toHex$$8$$($opcode$$13_opcode$$inline_285_opcode$$inline_289$$)); } - $optgroup$$.appendTo(this.$romSelect$) - } - $count$$7$$++ - } - $count$$7$$ && this.$romSelect$.appendTo(this.$romContainer$) - }, $loadROM$:function $$UI$$$$$loadROM$$() { - var $self$$5$$ = this; - this.updateStatus("Downloading..."); - $.ajax({url:escape(this.$romSelect$.val()), xhr:function() { - var $xhr$$1$$ = $.ajaxSettings.xhr(); - void 0 != $xhr$$1$$.overrideMimeType && $xhr$$1$$.overrideMimeType("text/plain; charset=x-user-defined"); - return $self$$5$$.xhr = $xhr$$1$$ - }, complete:function($xhr$$2$$, $status$$) { - var $data$$33$$; - "error" == $status$$ ? $self$$5$$.updateStatus("The selected ROM file could not be loaded.") : ($data$$33$$ = $xhr$$2$$.responseText, $self$$5$$.$main$.stop(), $JSCompiler_StaticMethods_readRomDirectly$$($self$$5$$.$main$, $data$$33$$, $self$$5$$.$romSelect$.val()), $self$$5$$.$main$.reset(), $JSCompiler_StaticMethods_forceFullRedraw$$($self$$5$$.$main$.$vdp$), $self$$5$$.enable()) - }}) - }, enable:function $$UI$$$$enable$() { - this.buttons.start.removeAttr("disabled"); - this.buttons.start.attr("value", "Start"); - this.buttons.reset.removeAttr("disabled"); - this.buttons.$nextStep$.removeAttr("disabled"); - this.$main$.$soundEnabled$ && (this.buttons.$sound$ ? this.buttons.$sound$.attr("value", "Disable sound") : this.buttons.$sound$.attr("value", "Enable sound")) - }, updateStatus:function $$UI$$$$updateStatus$($s$$3$$) { - this.log.text($s$$3$$) - }, $writeFrame$:function() { - var $hiddenPrefix$$ = $JSSMS$Utils$getPrefix$$(["hidden", "mozHidden", "webkitHidden", "msHidden"]); - return $hiddenPrefix$$ ? function() { - document[$hiddenPrefix$$] || this.$canvasContext$.putImageData(this.$canvasImageData$, 0, 0) - } : function() { - this.$canvasContext$.putImageData(this.$canvasImageData$, 0, 0) - } - }(), $updateDisassembly$:function $$UI$$$$$updateDisassembly$$($currentAddress$$1$$) { - for(var $instructions$$ = this.$main$.$cpu$.$instructions$, $length$$20$$ = $instructions$$.length, $html$$ = "", $i$$27$$ = 8 > $currentAddress$$1$$ ? 0 : $currentAddress$$1$$ - 8, $num$$4$$ = 0;16 > $num$$4$$ && $i$$27$$ <= $length$$20$$;$i$$27$$++) { - $instructions$$[$i$$27$$] && ($html$$ += "" + $instructions$$[$i$$27$$].$hexAddress$ + ($instructions$$[$i$$27$$].$isJumpTarget$ ? ":" : " ") + "" + $instructions$$[$i$$27$$].$inst$ + "", $num$$4$$++) - } - this.$dissambler$.html($html$$) - }}; - return $UI$$ -}); -function $JSSMS$Ports$$($sms$$6$$) { - this.$main$ = $sms$$6$$; - this.$vdp$ = $sms$$6$$.$vdp$; - this.$b$ = $sms$$6$$.$b$; - this.$keyboard$ = $sms$$6$$.$keyboard$; - this.$a$ = [] -} -$JSSMS$Ports$$.prototype = {reset:function $$JSSMS$Ports$$$$reset$() { - this.$a$ = Array(2) -}}; -function $JSCompiler_StaticMethods_in_$$($JSCompiler_StaticMethods_in_$self$$, $port$$3$$) { - if($JSCompiler_StaticMethods_in_$self$$.$main$.$is_gg$ && 7 > $port$$3$$) { - switch($port$$3$$) { - case 0: - return $JSCompiler_StaticMethods_in_$self$$.$keyboard$.$ggstart$ & 191 | 64; - case 1: - ; - case 2: - ; - case 3: - ; - case 4: - ; - case 5: - return 0; - case 6: - return 255 + $bytecode$$.$nextAddress$ = $stream$$.$RomStream_prototype$position$; + $bytecode$$.$operand$ = $operand$$3_operand$$inline_290$$; + $bytecode$$.target = $target$$48_target$$inline_291$$; + $bytecode$$.$isFunctionEnder$ = $isFunctionEnder_isFunctionEnder$$inline_292$$; + $bytecode$$.$canEnd$ = $canEnd_canEnd$$inline_293$$; + return $bytecode$$; + case 238: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 239: + $target$$48_target$$inline_291$$ = 40; + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 240: + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 241: + break; + case 242: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 243: + break; + case 244: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 245: + break; + case 246: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 247: + $target$$48_target$$inline_291$$ = 48; + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + case 248: + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 249: + break; + case 250: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 251: + break; + case 252: + $target$$48_target$$inline_291$$ = $stream$$.getUint16(); + $canEnd_canEnd$$inline_293$$ = !0; + break; + case 253: + return $getIndex$$($bytecode$$, $stream$$); + case 254: + $operand$$3_operand$$inline_290$$ = $stream$$.getUint8(); + break; + case 255: + $target$$48_target$$inline_291$$ = 56; + $isFunctionEnder_isFunctionEnder$$inline_292$$ = !0; + break; + default: + $JSSMS$Utils$console$error$$("Unexpected opcode", $toHex$$8$$($opcode$$13_opcode$$inline_285_opcode$$inline_289$$)); } - } - switch($port$$3$$ & 193) { - case 64: - var $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$; - a: { - $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_in_$self$$.$vdp$; - if(0 == $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$N$) { - if(218 < $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$p$) { - $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$p$ - 6; - break a - } - }else { - if(242 < $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$p$) { - $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$p$ - 57; - break a - } - } - $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$p$ - } - return $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$; - case 65: - return 0; - case 128: - $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_in_$self$$.$vdp$; - $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$n$ = !0; - var $statuscopy$$inline_216_value$$inline_213$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$M$; - $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$M$ = $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$f$[$JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$g$++ & - 16383] & 255; - return $statuscopy$$inline_216_value$$inline_213$$; - case 129: - return $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$ = $JSCompiler_StaticMethods_in_$self$$.$vdp$, $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$n$ = !0, $statuscopy$$inline_216_value$$inline_213$$ = $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$h$, - $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$h$ = 0, $JSCompiler_StaticMethods_controlRead$self$$inline_215_JSCompiler_StaticMethods_dataRead$self$$inline_212_JSCompiler_StaticMethods_getVCount$self$$inline_210_JSCompiler_inline_result$$7$$.$main$.$cpu$.$I$ = !1, $statuscopy$$inline_216_value$$inline_213$$; - case 192: - return $JSCompiler_StaticMethods_in_$self$$.$keyboard$.$controller1$; - case 193: - return $JSCompiler_StaticMethods_in_$self$$.$keyboard$.$a$ & 63 | $JSCompiler_StaticMethods_in_$self$$.$a$[0] | $JSCompiler_StaticMethods_in_$self$$.$a$[1] - } - return 255 -} -function $JSCompiler_StaticMethods_out$$($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$, $address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$, $reg$$inline_226_value$$82$$) { - if(!($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$main$.$is_gg$ && 7 > $address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$)) { - switch($address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ & 193) { - case 1: - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$a$[0] = ($reg$$inline_226_value$$82$$ & 32) << 1; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$a$[1] = $reg$$inline_226_value$$82$$ & 128; + $bytecode$$.$nextAddress$ = $stream$$.$RomStream_prototype$position$; + $bytecode$$.$operand$ = $operand$$3_operand$$inline_290$$; + $bytecode$$.target = $target$$48_target$$inline_291$$; + $bytecode$$.$isFunctionEnder$ = $isFunctionEnder_isFunctionEnder$$inline_292$$; + $bytecode$$.$canEnd$ = $canEnd_canEnd$$inline_293$$; + return $bytecode$$; + } + function $getIndex$$($bytecode$$3$$, $stream$$3$$) { + var $opcode$$16_operand$$inline_297$$ = $stream$$3$$.getUint8(), $opcode$$inline_298_operand$$5$$ = null, $isFunctionEnder$$2$$ = !1; + $bytecode$$3$$.$opcode$.push($opcode$$16_operand$$inline_297$$); + switch($opcode$$16_operand$$inline_297$$) { + case 9: + break; + case 25: + break; + case 33: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint16(); + break; + case 34: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint16(); + break; + case 35: + break; + case 36: + break; + case 37: + break; + case 38: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 41: + break; + case 42: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint16(); + break; + case 43: + break; + case 44: + break; + case 45: + break; + case 46: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 52: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 53: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 54: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint16(); + break; + case 57: + break; + case 68: + break; + case 69: + break; + case 70: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 76: + break; + case 77: + break; + case 78: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 84: + break; + case 85: + break; + case 86: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 92: + break; + case 93: + break; + case 94: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 96: + break; + case 97: + break; + case 98: + break; + case 99: + break; + case 100: + break; + case 101: + break; + case 102: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 103: + break; + case 104: + break; + case 105: + break; + case 106: + break; + case 107: + break; + case 108: + break; + case 109: + break; + case 110: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 111: + break; + case 112: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 113: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 114: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 115: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 116: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 117: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); break; - case 128: - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$vdp$; - $address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ = 0; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$n$ = !0; - switch($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$w$) { - case 0: - ; - case 1: - ; - case 2: - $address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$g$ & 16383; - if($reg$$inline_226_value$$82$$ != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$f$[$address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$] & 255)) { - if($address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ >= $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$i$ && $address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ < $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$i$ + - 64) { - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$m$ = !0 - }else { - if($address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ >= $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$i$ + 128 && $address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ < $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$i$ + - 256) { - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$m$ = !0 - }else { - var $tileIndex$$inline_222$$ = $address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ >> 5; - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$G$[$tileIndex$$inline_222$$] = 1; - $tileIndex$$inline_222$$ < $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$s$ && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$s$ = $tileIndex$$inline_222$$); - $tileIndex$$inline_222$$ > $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$o$ && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$o$ = $tileIndex$$inline_222$$) - } - } - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$f$[$address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$] = $reg$$inline_226_value$$82$$ - } - break; - case 3: - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$main$.$is_sms$ ? ($address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ = 3 * ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$g$ & - 31), $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$T$[$reg$$inline_226_value$$82$$], - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ + 1] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$S$[$reg$$inline_226_value$$82$$], - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ + 2] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$R$[$reg$$inline_226_value$$82$$]) : - ($address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ = 3 * (($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$g$ & 63) >> 1), 0 == ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$g$ & - 1) ? ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$Q$[$reg$$inline_226_value$$82$$], - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ + 1] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$P$[$reg$$inline_226_value$$82$$]) : - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$a$[$address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ + 2] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$O$[$reg$$inline_226_value$$82$$]) - } - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$g$++; + case 119: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); break; - case 129: - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$vdp$; - if($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$n$) { - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$n$ = !1, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$j$ = $reg$$inline_226_value$$82$$, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$g$ = - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$g$ & 16128 | $reg$$inline_226_value$$82$$ - }else { - if($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$n$ = !0, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$w$ = $reg$$inline_226_value$$82$$ >> 6 & 3, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$g$ = - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$j$ | $reg$$inline_226_value$$82$$ << 8, 0 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$w$) { - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$M$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$f$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$g$++ & - 16383] & 255 - }else { - if(2 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$w$) { - $reg$$inline_226_value$$82$$ &= 15; - switch($reg$$inline_226_value$$82$$) { - case 0: - 0 != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$h$ & 4) && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$main$.$cpu$.$I$ = 0 != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$j$ & - 16)); - break; - case 1: - 0 != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$h$ & 128) && 0 != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$j$ & 32) && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$main$.$cpu$.$I$ = - !0); - ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$j$ & 3) != ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$[$reg$$inline_226_value$$82$$] & 3) && - ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$m$ = !0); - break; - case 2: - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$J$ = ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$j$ & 14) << 10; - break; - case 5: - $address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$i$, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$i$ = - ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$j$ & -130) << 7, $address$$inline_221_old$$inline_227_port$$2_temp$$inline_220$$ != $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$i$ && - ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$m$ = !0) - } - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$[$reg$$inline_226_value$$82$$] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$j$ - } - } - } + case 124: break; - case 64: - ; - case 65: - if($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$main$.$soundEnabled$) { - switch($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$ = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$b$, 0 != ($reg$$inline_226_value$$82$$ & 128) ? ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$ = - $reg$$inline_226_value$$82$$ >> 4 & 7, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$b$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$] = $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$b$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$] & - 1008 | $reg$$inline_226_value$$82$$ & 15) : $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$b$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$] = 0 == - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$ || 2 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$ || 4 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$ ? - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$b$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$] & 15 | ($reg$$inline_226_value$$82$$ & 63) << 4 : - $reg$$inline_226_value$$82$$ & 15, $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$) { - case 0: - ; - case 2: - ; - case 4: - 0 == $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$b$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$] && ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$b$[$JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$c$] = - 1); - break; - case 6: - $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$j$ = 16 << ($JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$b$[6] & 3), $JSCompiler_StaticMethods_JSSMS_SN76489_prototype$write$self$$inline_229_JSCompiler_StaticMethods_controlWrite$self$$inline_224_JSCompiler_StaticMethods_dataWrite$self$$inline_218_JSCompiler_StaticMethods_out$self$$.$h$ = - 32768 + case 125: + break; + case 126: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 132: + break; + case 133: + break; + case 134: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 140: + break; + case 141: + break; + case 142: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 148: + break; + case 149: + break; + case 150: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 156: + break; + case 157: + break; + case 158: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 164: + break; + case 165: + break; + case 166: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 172: + break; + case 173: + break; + case 174: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 180: + break; + case 181: + break; + case 182: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 188: + break; + case 189: + break; + case 190: + $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(); + break; + case 203: + return $opcode$$16_operand$$inline_297$$ = $stream$$3$$.getUint8(), $opcode$$inline_298_operand$$5$$ = $stream$$3$$.getUint8(), $bytecode$$3$$.$opcode$.push($opcode$$inline_298_operand$$5$$), $bytecode$$3$$.$nextAddress$ = $stream$$3$$.$RomStream_prototype$position$, $bytecode$$3$$.$operand$ = $opcode$$16_operand$$inline_297$$, $bytecode$$3$$; + case 225: + break; + case 227: + break; + case 229: + break; + case 233: + $stream$$3$$.$RomStream_prototype$seek$(null); + $isFunctionEnder$$2$$ = !0; + break; + case 249: + break; + default: + $JSSMS$Utils$console$error$$("Unexpected opcode", "0xDD/0xFD " + $toHex$$8$$($opcode$$16_operand$$inline_297$$)); + } + $bytecode$$3$$.$nextAddress$ = $stream$$3$$.$RomStream_prototype$position$; + $bytecode$$3$$.$operand$ = $opcode$$inline_298_operand$$5$$; + $bytecode$$3$$.$isFunctionEnder$ = $isFunctionEnder$$2$$; + return $bytecode$$3$$; + } + function $RomStream$$($rom$$) { + this.$rom$ = $rom$$; + this.$a$ = null; + this.page = 0; + } + var $toHex$$8$$ = $JSSMS$Utils$toHex$$; + $parser$$.prototype = {$addEntryPoint$:function $$parser$$$$$addEntryPoint$$($obj$$36$$) { + this.$entryPoints$.push($obj$$36$$); + this.$f$($obj$$36$$.$address$); + }, parse:function $$parser$$$$parse$($currentPage_entryPoint$$2_page$$1$$) { + $JSSMS$Utils$console$time$$("Parsing"); + var $i$$31_pageStart$$, $length$$21_pageEnd$$; + void 0 === $currentPage_entryPoint$$2_page$$1$$ ? ($i$$31_pageStart$$ = 0, $length$$21_pageEnd$$ = this.$g$.length - 1) : ($i$$31_pageStart$$ = 0, $length$$21_pageEnd$$ = 16383); + for ($currentPage_entryPoint$$2_page$$1$$ = 0;$currentPage_entryPoint$$2_page$$1$$ < this.$a$.length;$currentPage_entryPoint$$2_page$$1$$++) { + for (;this.$a$[$currentPage_entryPoint$$2_page$$1$$].length;) { + var $currentAddress$$2_romPage_targetPage$$ = this.$a$[$currentPage_entryPoint$$2_page$$1$$].shift().$address$ % 16384; + if ($currentAddress$$2_romPage_targetPage$$ < $i$$31_pageStart$$ || $currentAddress$$2_romPage_targetPage$$ > $length$$21_pageEnd$$) { + $JSSMS$Utils$console$error$$("Address out of bound", $toHex$$8$$($currentAddress$$2_romPage_targetPage$$)); + } else { + if (!this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$]) { + var $bytecode$$5_targetAddress$$ = new $Bytecode$$($currentAddress$$2_romPage_targetPage$$, $currentPage_entryPoint$$2_page$$1$$); + this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$] = $disassemble$$($bytecode$$5_targetAddress$$, this.$g$); + null !== this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$].$nextAddress$ && this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$].$nextAddress$ >= $i$$31_pageStart$$ && this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$].$nextAddress$ <= $length$$21_pageEnd$$ && this.$f$(this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$].$nextAddress$); + null !== this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$].target && this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$].target >= $i$$31_pageStart$$ && this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$].target <= $length$$21_pageEnd$$ && this.$f$(this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$currentAddress$$2_romPage_targetPage$$].target); } } + } } - } -} -;(function() { - function $Bytecode$$1$$($address$$18$$, $page$$) { - this.$address$ = $address$$18$$; - this.page = $page$$; - this.$opcode$ = []; - this.target = this.$nextAddress$ = this.$operand$ = null; - this.$isJumpTarget$ = !1 - } - $Bytecode$$1$$.prototype = {get $hexOpcode$() { - return this.$opcode$.length ? this.$opcode$.map($JSSMS$Utils$toHex$$).join(" ") : "" - }, get label() { - var $name$$61$$ = this.name ? this.name.replace(/(nn|n|PC\+e|d)/, $JSSMS$Utils$toHex$$(this.target || this.$operand$ || 0)) : ""; - return $JSSMS$Utils$toHex$$(this.$address$ + 16384 * this.page) + " " + this.$hexOpcode$ + " " + $name$$61$$ - }}; - return $Bytecode$$1$$ -})(); -(function() { - function $parser$$($rom$$1$$, $frameReg$$) { - this.$frameReg$ = $frameReg$$; - this.$a$ = Array($rom$$1$$.length); - this.$b$ = Array($rom$$1$$.length); - for(var $i$$28$$ = 0;$i$$28$$ < $rom$$1$$.length;$i$$28$$++) { - this.$a$[$i$$28$$] = [], this.$b$[$i$$28$$] = [] + this.$bytecodes$[0][1023] ? this.$bytecodes$[0][1023].$isFunctionEnder$ = !0 : this.$bytecodes$[0][1022] && (this.$bytecodes$[0][1022].$isFunctionEnder$ = !0); + $i$$31_pageStart$$ = $length$$21_pageEnd$$ = $i$$31_pageStart$$ = 0; + for ($length$$21_pageEnd$$ = this.$entryPoints$.length;$i$$31_pageStart$$ < $length$$21_pageEnd$$;$i$$31_pageStart$$++) { + $currentPage_entryPoint$$2_page$$1$$ = this.$entryPoints$[$i$$31_pageStart$$].$address$, $currentAddress$$2_romPage_targetPage$$ = this.$entryPoints$[$i$$31_pageStart$$].$romPage$, this.$bytecodes$[$currentAddress$$2_romPage_targetPage$$][$currentPage_entryPoint$$2_page$$1$$].$isJumpTarget$ = !0, this.$bytecodes$[$currentAddress$$2_romPage_targetPage$$][$currentPage_entryPoint$$2_page$$1$$].$jumpTargetNb$++; } - } - $parser$$.prototype = {}; - return $parser$$ -})(); + for ($currentPage_entryPoint$$2_page$$1$$ = 0;$currentPage_entryPoint$$2_page$$1$$ < this.$bytecodes$.length;$currentPage_entryPoint$$2_page$$1$$++) { + for ($i$$31_pageStart$$ = 0, $length$$21_pageEnd$$ = this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$].length;$i$$31_pageStart$$ < $length$$21_pageEnd$$;$i$$31_pageStart$$++) { + this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$i$$31_pageStart$$] && (null !== this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$i$$31_pageStart$$].$nextAddress$ && this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$i$$31_pageStart$$].$nextAddress$] && this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$i$$31_pageStart$$].$nextAddress$].$jumpTargetNb$++, null !== + this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$i$$31_pageStart$$].target && ($currentAddress$$2_romPage_targetPage$$ = ~~(this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$i$$31_pageStart$$].target / 16384), $bytecode$$5_targetAddress$$ = this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$i$$31_pageStart$$].target % 16384, this.$bytecodes$[$currentAddress$$2_romPage_targetPage$$] && this.$bytecodes$[$currentAddress$$2_romPage_targetPage$$][$bytecode$$5_targetAddress$$] ? + (this.$bytecodes$[$currentAddress$$2_romPage_targetPage$$][$bytecode$$5_targetAddress$$].$isJumpTarget$ = !0, this.$bytecodes$[$currentAddress$$2_romPage_targetPage$$][$bytecode$$5_targetAddress$$].$jumpTargetNb$++) : $JSSMS$Utils$console$log$$("Invalid target address", $toHex$$8$$(this.$bytecodes$[$currentPage_entryPoint$$2_page$$1$$][$i$$31_pageStart$$].target)))); + } + } + $JSSMS$Utils$console$timeEnd$$("Parsing"); + }, $parseFromAddress$:function $$parser$$$$$parseFromAddress$$($obj$$37_romPage$$1$$) { + var $address$$19$$ = $obj$$37_romPage$$1$$.$address$ % 16384; + $obj$$37_romPage$$1$$ = $obj$$37_romPage$$1$$.$romPage$; + var $pageStart$$1$$ = 16384 * $obj$$37_romPage$$1$$, $pageEnd$$1$$ = 16384 * ($obj$$37_romPage$$1$$ + 1), $branch$$ = [], $bytecode$$6$$, $startingBytecode$$ = !0, $absoluteAddress$$ = 0; + 1024 > $address$$19$$ && 0 === $obj$$37_romPage$$1$$ && ($pageStart$$1$$ = 0, $pageEnd$$1$$ = 1024); + do { + this.$bytecodes$[$obj$$37_romPage$$1$$][$address$$19$$] ? $bytecode$$6$$ = this.$bytecodes$[$obj$$37_romPage$$1$$][$address$$19$$] : ($bytecode$$6$$ = new $Bytecode$$($address$$19$$, $obj$$37_romPage$$1$$), this.$bytecodes$[$obj$$37_romPage$$1$$][$address$$19$$] = $disassemble$$($bytecode$$6$$, this.$g$)); + if ($bytecode$$6$$.$canEnd$ && !$startingBytecode$$) { + break; + } + $address$$19$$ = $bytecode$$6$$.$nextAddress$ % 16384; + $branch$$.push($bytecode$$6$$); + $startingBytecode$$ = !1; + $absoluteAddress$$ = $address$$19$$ + 16384 * $obj$$37_romPage$$1$$; + } while (null !== $address$$19$$ && $absoluteAddress$$ >= $pageStart$$1$$ && $absoluteAddress$$ < $pageEnd$$1$$ && !$bytecode$$6$$.$isFunctionEnder$); + return $branch$$; + }, $f$:function $$parser$$$$$f$$($address$$20$$) { + var $memPage$$ = ~~($address$$20$$ / 16384), $romPage$$2$$ = this.$frameReg$[$memPage$$]; + this.$a$[$romPage$$2$$].push({$address$:$address$$20$$ % 16384, $romPage$:$romPage$$2$$, $memPage$:$memPage$$}); + }}; + $RomStream$$.prototype = {get $RomStream_prototype$position$() { + return this.$a$; + }, get length() { + return 16384 * this.$rom$.length; + }, $RomStream_prototype$seek$:function $$RomStream$$$$$RomStream_prototype$seek$$($pos$$) { + this.$a$ = $pos$$; + }, getUint8:function $$RomStream$$$$getUint8$() { + var $page$$2_value$$85$$ = 0, $page$$2_value$$85$$ = this.page, $address$$21$$ = this.$a$ & 16383, $page$$2_value$$85$$ = $SUPPORT_DATAVIEW$$ ? this.$rom$[$page$$2_value$$85$$].getUint8($address$$21$$) : this.$rom$[$page$$2_value$$85$$][$address$$21$$] & 255; + this.$a$++; + return $page$$2_value$$85$$; + }, $RomStream_prototype$getInt8$:function $$RomStream$$$$$RomStream_prototype$getInt8$$() { + var $page$$3_value$$86$$ = 0, $page$$3_value$$86$$ = this.page, $address$$22$$ = this.$a$ & 16383; + $SUPPORT_DATAVIEW$$ ? $page$$3_value$$86$$ = this.$rom$[$page$$3_value$$86$$].getInt8($address$$22$$) : ($page$$3_value$$86$$ = this.$rom$[$page$$3_value$$86$$][$address$$22$$] & 255, 128 <= $page$$3_value$$86$$ && ($page$$3_value$$86$$ -= 256)); + this.$a$++; + return $page$$3_value$$86$$ + 1; + }, getUint16:function $$RomStream$$$$getUint16$() { + var $page$$4_value$$87$$ = 0, $page$$4_value$$87$$ = this.page, $address$$23$$ = this.$a$ & 16383, $page$$4_value$$87$$ = $SUPPORT_DATAVIEW$$ ? 16383 > ($address$$23$$ & 16383) ? this.$rom$[$page$$4_value$$87$$].getUint16($address$$23$$, !0) : this.$rom$[$page$$4_value$$87$$].getUint8($address$$23$$) | this.$rom$[++$page$$4_value$$87$$].getUint8($address$$23$$) << 8 : this.$rom$[$page$$4_value$$87$$][$address$$23$$] & 255 | (this.$rom$[++$page$$4_value$$87$$][$address$$23$$] & 255) << 8; + this.$a$ += 2; + return $page$$4_value$$87$$; + }}; + return $parser$$; +}(); var $BIT_TABLE$$ = [1, 2, 4, 8, 16, 32, 64, 128]; function $n$IfStatement$$($test$$, $consequent$$, $alternate$$) { - void 0 == $alternate$$ && ($alternate$$ = null); - return{type:"IfStatement", test:$test$$, consequent:$consequent$$, alternate:$alternate$$} + void 0 === $alternate$$ && ($alternate$$ = null); + return{type:"IfStatement", test:$test$$, consequent:$consequent$$, alternate:$alternate$$}; } function $n$BlockStatement$$($body$$1$$) { - void 0 == $body$$1$$ && ($body$$1$$ = []); + void 0 === $body$$1$$ && ($body$$1$$ = []); Array.isArray($body$$1$$) || ($body$$1$$ = [$body$$1$$]); - return{type:"BlockStatement", body:$body$$1$$} + return{type:"BlockStatement", body:$body$$1$$}; } function $n$ExpressionStatement$$($expression$$2$$) { - return{type:"ExpressionStatement", expression:$expression$$2$$} + return{type:"ExpressionStatement", expression:$expression$$2$$}; } function $n$ReturnStatement$$() { var $argument$$; - void 0 == $argument$$ && ($argument$$ = null); - return{type:"ReturnStatement", argument:$argument$$} + void 0 === $argument$$ && ($argument$$ = null); + return{type:"ReturnStatement", argument:$argument$$}; } function $n$VariableDeclaration$$($name$$62$$, $init$$) { - return{type:"VariableDeclaration", declarations:[{type:"VariableDeclarator", id:{type:"Identifier", name:$name$$62$$}, init:$init$$}], kind:"var"} + return{type:"VariableDeclaration", declarations:[{type:"VariableDeclarator", id:{type:"Identifier", name:$name$$62$$}, init:$init$$}], kind:"var"}; } function $n$Identifier$$($name$$63$$) { - return{type:"Identifier", name:$name$$63$$} + return{type:"Identifier", name:$name$$63$$}; } function $n$Literal$$($value$$88$$) { - return"number" == typeof $value$$88$$ ? {type:"Literal", value:$value$$88$$, raw:$JSSMS$Utils$toHex$$($value$$88$$)} : {type:"Literal", value:$value$$88$$, raw:"" + $value$$88$$} + return "number" == typeof $value$$88$$ ? {type:"Literal", value:$value$$88$$, raw:$DEBUG$$ ? $JSSMS$Utils$toHex$$($value$$88$$) : "" + $value$$88$$} : {type:"Literal", value:$value$$88$$, raw:"" + $value$$88$$}; } function $n$CallExpression$$($callee$$, $args$$4$$) { - void 0 == $args$$4$$ && ($args$$4$$ = []); + void 0 === $args$$4$$ && ($args$$4$$ = []); Array.isArray($args$$4$$) || ($args$$4$$ = [$args$$4$$]); - return{type:"CallExpression", callee:$n$Identifier$$($callee$$), arguments:$args$$4$$} + return{type:"CallExpression", callee:$n$Identifier$$($callee$$), arguments:$args$$4$$}; } function $n$AssignmentExpression$$($operator$$, $left$$3$$, $right$$3$$) { - return{type:"AssignmentExpression", operator:$operator$$, left:$left$$3$$, right:$right$$3$$} + return{type:"AssignmentExpression", operator:$operator$$, left:$left$$3$$, right:$right$$3$$}; } function $n$BinaryExpression$$($operator$$1$$, $left$$4$$, $right$$4$$) { - return{type:"BinaryExpression", operator:$operator$$1$$, left:$left$$4$$, right:$right$$4$$} + return{type:"BinaryExpression", operator:$operator$$1$$, left:$left$$4$$, right:$right$$4$$}; } function $n$UnaryExpression$$($operator$$2$$, $argument$$1$$) { - return{type:"UnaryExpression", operator:$operator$$2$$, argument:$argument$$1$$} + return{type:"UnaryExpression", operator:$operator$$2$$, argument:$argument$$1$$}; } -function $n$MemberExpression$$($object$$1$$, $property$$3$$) { - return{type:"MemberExpression", computed:!0, object:$object$$1$$, property:$property$$3$$} +function $n$MemberExpression$$($object$$1$$, $property$$4$$) { + return{type:"MemberExpression", computed:!0, object:$object$$1$$, property:$property$$4$$}; } function $n$ConditionalExpression$$($test$$1$$, $consequent$$1$$, $alternate$$1$$) { - return{type:"ConditionalExpression", test:$test$$1$$, consequent:$consequent$$1$$, alternate:$alternate$$1$$} + return{type:"ConditionalExpression", test:$test$$1$$, consequent:$consequent$$1$$, alternate:$alternate$$1$$}; } function $n$Register$$($name$$64$$) { - return{type:"Register", name:$name$$64$$} + return{type:"Register", name:$name$$64$$}; } function $n$Bit$$($bitNumber$$) { - return $n$Literal$$($BIT_TABLE$$[$bitNumber$$]) + return $n$Literal$$($BIT_TABLE$$[$bitNumber$$]); } var $o$$ = {$SET16$:function($register1$$, $register2$$, $value$$89$$) { - return"Literal" == $value$$89$$.type ? [$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$), $evaluate$$($n$BinaryExpression$$(">>", $value$$89$$, $n$Literal$$(8))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register2$$), $evaluate$$($n$BinaryExpression$$("&", $value$$89$$, $n$Literal$$(255)))))] : [$n$VariableDeclaration$$("val", $value$$89$$), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$), $n$BinaryExpression$$(">>", - $n$Identifier$$("val"), $n$Literal$$(8)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register2$$), $n$BinaryExpression$$("&", $n$Identifier$$("val"), $n$Literal$$(255))))] + return "Literal" == $value$$89$$.type ? [$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$), $n$BinaryExpression$$(">>", $value$$89$$, $n$Literal$$(8)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register2$$), $n$BinaryExpression$$("&", $value$$89$$, $n$Literal$$(255))))] : [$n$VariableDeclaration$$("val", $value$$89$$), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$), $n$BinaryExpression$$(">>", + $n$Identifier$$("val"), $n$Literal$$(8)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register2$$), $n$BinaryExpression$$("&", $n$Identifier$$("val"), $n$Literal$$(255))))]; }, $EX$:function($register1$$1$$, $register2$$1$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$Register$$($register1$$1$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$1$$), $n$Register$$($register2$$1$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register2$$1$$), $n$Identifier$$("temp")))] -}, $xa$:function() { - return $JSCompiler_emptyFn$$() -}, $ea$:function($srcRegister$$, $dstRegister1$$, $dstRegister2$$) { - return void 0 == $dstRegister1$$ && void 0 == $dstRegister2$$ ? function($value$$90$$) { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $n$Literal$$($value$$90$$))) - } : "i" == $dstRegister1$$ && void 0 == $dstRegister2$$ ? function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $n$Register$$("i"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$MemberExpression$$($n$Identifier$$("SZ_TABLE"), $n$Register$$($srcRegister$$))), $n$ConditionalExpression$$($n$Identifier$$("iff2"), $n$Literal$$(4), $n$Literal$$(0)))))] - } : "r" == $dstRegister1$$ && void 0 == $dstRegister2$$ ? function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$Register$$($register1$$1$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$1$$), $n$Register$$($register2$$1$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register2$$1$$), $n$Identifier$$("temp")))]; +}, $NOOP$:function() { + return function() { + }; +}, $LD8$:function($srcRegister$$, $dstRegister1$$, $dstRegister2$$) { + return void 0 === $dstRegister1$$ && void 0 === $dstRegister2$$ ? function($value$$90$$) { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $n$Literal$$($value$$90$$))); + } : "i" == $dstRegister1$$ && void 0 === $dstRegister2$$ ? function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $n$Register$$("i"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$MemberExpression$$($n$Identifier$$("SZ_TABLE"), $n$Register$$($srcRegister$$))), $n$ConditionalExpression$$($n$Identifier$$("iff2"), $n$Literal$$(4), $n$Literal$$(0)))))]; + } : "r" == $dstRegister1$$ && void 0 === $dstRegister2$$ ? function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $n$CallExpression$$("JSSMS.Utils.rndInt", $n$Literal$$(255)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$MemberExpression$$($n$Identifier$$("SZ_TABLE"), $n$Register$$($srcRegister$$))), $n$ConditionalExpression$$($n$Identifier$$("iff2"), $n$Literal$$(4), - $n$Literal$$(0)))))] - } : void 0 == $dstRegister2$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $n$Register$$($dstRegister1$$))) + $n$Literal$$(0)))))]; + } : void 0 === $dstRegister2$$ ? function() { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $n$Register$$($dstRegister1$$))); } : "n" == $dstRegister1$$ && "n" == $dstRegister2$$ ? function($value$$91$$) { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $o$$.$READ_MEM8$($n$Literal$$($value$$91$$)))) + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $o$$.$READ_MEM8$($n$Literal$$($value$$91$$)))); } : function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($dstRegister1$$ + $dstRegister2$$).toUpperCase())))) - } -}, $fa$:function($srcRegister$$1$$, $dstRegister1$$1$$, $dstRegister2$$1$$) { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$), $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($dstRegister1$$ + $dstRegister2$$).toUpperCase())))); + }; +}, $LD8_D$:function($srcRegister$$1$$, $dstRegister1$$1$$, $dstRegister2$$1$$) { return function($value$$92$$) { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$1$$), $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($dstRegister1$$1$$ + $dstRegister2$$1$$).toUpperCase()), $n$Literal$$($value$$92$$))))) - } + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($srcRegister$$1$$), $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($dstRegister1$$1$$ + $dstRegister2$$1$$).toUpperCase()), $n$Literal$$($value$$92$$))))); + }; }, $LD16$:function($srcRegister1$$, $srcRegister2$$, $dstRegister1$$2$$, $dstRegister2$$2$$) { - if(void 0 == $dstRegister1$$2$$ && void 0 == $dstRegister2$$2$$) { + if (void 0 === $dstRegister1$$2$$ && void 0 === $dstRegister2$$2$$) { return function($value$$93$$) { - return $o$$.$SET16$($srcRegister1$$, $srcRegister2$$, $n$Literal$$($value$$93$$)) - } + return $o$$.$SET16$($srcRegister1$$, $srcRegister2$$, $n$Literal$$($value$$93$$)); + }; } - if("n" == $dstRegister1$$2$$ && "n" == $dstRegister2$$2$$) { + if ("n" == $dstRegister1$$2$$ && "n" == $dstRegister2$$2$$) { return function($value$$94$$) { - return $o$$.$SET16$($srcRegister1$$, $srcRegister2$$, $o$$.$READ_MEM16$($n$Literal$$($value$$94$$))) - } - } - $JSSMS$Utils$console$error$$("Wrong parameters number") -}, $ua$:function($srcRegister1$$1$$, $srcRegister2$$1$$, $dstRegister1$$3$$, $dstRegister2$$3$$) { - return void 0 == $dstRegister1$$3$$ && void 0 == $dstRegister2$$3$$ ? function($value$$95$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("get" + ($srcRegister1$$1$$ + $srcRegister2$$1$$).toUpperCase()), $n$Literal$$($value$$95$$)])) - } : "n" == $srcRegister1$$1$$ && "n" == $srcRegister2$$1$$ && void 0 == $dstRegister2$$3$$ ? function($value$$96$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$96$$), $n$Register$$($dstRegister1$$3$$)])) + return $o$$.$SET16$($srcRegister1$$, $srcRegister2$$, $o$$.$READ_MEM16$($n$Literal$$($value$$94$$))); + }; + } + $JSSMS$Utils$console$error$$("Wrong parameters number"); +}, $LD_WRITE_MEM$:function($srcRegister1$$1$$, $srcRegister2$$1$$, $dstRegister1$$3$$, $dstRegister2$$3$$) { + return void 0 === $dstRegister1$$3$$ && void 0 === $dstRegister2$$3$$ ? function($value$$95$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("get" + ($srcRegister1$$1$$ + $srcRegister2$$1$$).toUpperCase()), $n$Literal$$($value$$95$$)])); + } : "n" == $srcRegister1$$1$$ && "n" == $srcRegister2$$1$$ && void 0 === $dstRegister2$$3$$ ? function($value$$96$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$96$$), $n$Register$$($dstRegister1$$3$$)])); } : "n" == $srcRegister1$$1$$ && "n" == $srcRegister2$$1$$ ? function($value$$97$$) { - return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$97$$), $n$Register$$($dstRegister2$$3$$)])), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$97$$ + 1), $n$Register$$($dstRegister1$$3$$)]))] + return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$97$$), $n$Register$$($dstRegister2$$3$$)])), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$97$$ + 1), $n$Register$$($dstRegister1$$3$$)]))]; } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("get" + ($srcRegister1$$1$$ + $srcRegister2$$1$$).toUpperCase()), $n$Register$$($dstRegister1$$3$$)])) - } -}, $ra$:function($register1$$2$$, $register2$$2$$) { - return void 0 == $register1$$2$$ && void 0 == $register2$$2$$ ? function($value$$98$$) { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("sp"), $n$Literal$$($value$$98$$))) + return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("get" + ($srcRegister1$$1$$ + $srcRegister2$$1$$).toUpperCase()), $n$Register$$($dstRegister1$$3$$)])); + }; +}, $LD_SP$:function($register1$$2$$, $register2$$2$$) { + return void 0 === $register1$$2$$ && void 0 === $register2$$2$$ ? function($value$$98$$) { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("sp"), $n$Literal$$($value$$98$$))); } : function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("sp"), $n$CallExpression$$("get" + ($register1$$2$$ + $register2$$2$$).toUpperCase()))) - } -}, $ka$:function($register1$$3$$, $register2$$3$$) { - return void 0 == $register2$$3$$ ? function($value$$99$$) { - return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", $n$Literal$$($value$$99$$))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", $n$Literal$$($value$$99$$ + 1)))] + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("sp"), $n$CallExpression$$("get" + ($register1$$2$$ + $register2$$2$$).toUpperCase()))); + }; +}, $LD_NN$:function($register1$$3$$, $register2$$3$$) { + return void 0 === $register2$$3$$ ? function($value$$99$$) { + return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", $n$Literal$$($value$$99$$))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", $n$Literal$$($value$$99$$ + 1)))]; } : function($value$$100$$) { - return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$100$$), $n$Register$$($register2$$3$$)])), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$100$$ + 1), $n$Register$$($register1$$3$$)]))] - } -}, $V$:function($register1$$4$$, $register2$$4$$) { - return void 0 == $register2$$4$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$4$$), $n$CallExpression$$("inc8", $n$Register$$($register1$$4$$)))) + return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$100$$), $n$Register$$($register2$$3$$)])), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Literal$$($value$$100$$ + 1), $n$Register$$($register1$$3$$)]))]; + }; +}, $INC8$:function($register1$$4$$, $register2$$4$$) { + return void 0 === $register2$$4$$ ? function() { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$4$$), $n$CallExpression$$("inc8", $n$Register$$($register1$$4$$)))); } : "s" == $register1$$4$$ && "p" == $register2$$4$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("sp"), $n$BinaryExpression$$("+", $n$Identifier$$("sp"), $n$Literal$$(1)))) + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("sp"), $n$BinaryExpression$$("+", $n$Identifier$$("sp"), $n$Literal$$(1)))); } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("incMem", $n$CallExpression$$("getHL"))) - } -}, $U$:function($register1$$5$$, $register2$$5$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("incMem", $n$CallExpression$$("getHL"))); + }; +}, $INC16$:function($register1$$5$$, $register2$$5$$) { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register2$$5$$), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$Register$$($register2$$5$$), $n$Literal$$(1)), $n$Literal$$(255)))), $n$IfStatement$$($n$BinaryExpression$$("==", $n$Register$$($register2$$5$$), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$5$$), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$Register$$($register1$$5$$), - $n$Literal$$(1)), $n$Literal$$(255))))]))] - } + $n$Literal$$(1)), $n$Literal$$(255))))]))]; + }; }, $DEC8$:function($register1$$6$$, $register2$$6$$) { - return void 0 == $register2$$6$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$6$$), $n$CallExpression$$("dec8", $n$Register$$($register1$$6$$)))) + return void 0 === $register2$$6$$ ? function() { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$6$$), $n$CallExpression$$("dec8", $n$Register$$($register1$$6$$)))); } : "s" == $register1$$6$$ && "p" == $register2$$6$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("sp"), $n$BinaryExpression$$("-", $n$Identifier$$("sp"), $n$Literal$$(1)))) + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("sp"), $n$BinaryExpression$$("-", $n$Identifier$$("sp"), $n$Literal$$(1)))); } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("decMem", $n$CallExpression$$("getHL"))) - } -}, $F$:function($register1$$7$$, $register2$$7$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("decMem", $n$CallExpression$$("getHL"))); + }; +}, $DEC16$:function($register1$$7$$, $register2$$7$$) { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register2$$7$$), $n$BinaryExpression$$("&", $n$BinaryExpression$$("-", $n$Register$$($register2$$7$$), $n$Literal$$(1)), $n$Literal$$(255)))), $n$IfStatement$$($n$BinaryExpression$$("==", $n$Register$$($register2$$7$$), $n$Literal$$(255)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$7$$), $n$BinaryExpression$$("&", $n$BinaryExpression$$("-", $n$Register$$($register1$$7$$), - $n$Literal$$(1)), $n$Literal$$(255))))]))] - } -}, $g$:function($register1$$8$$, $register2$$8$$, $register3$$, $register4$$) { - return void 0 == $register4$$ ? function() { - return $o$$.$SET16$($register1$$8$$, $register2$$8$$, $n$CallExpression$$("add16", [$n$CallExpression$$("get" + ($register1$$8$$ + $register2$$8$$).toUpperCase()), $n$Register$$($register3$$)])) + $n$Literal$$(1)), $n$Literal$$(255))))]))]; + }; +}, $ADD16$:function($register1$$8$$, $register2$$8$$, $register3$$, $register4$$) { + return void 0 === $register4$$ ? function() { + return $o$$.$SET16$($register1$$8$$, $register2$$8$$, $n$CallExpression$$("add16", [$n$CallExpression$$("get" + ($register1$$8$$ + $register2$$8$$).toUpperCase()), $n$Register$$($register3$$)])); } : function() { - return $o$$.$SET16$($register1$$8$$, $register2$$8$$, $n$CallExpression$$("add16", [$n$CallExpression$$("get" + ($register1$$8$$ + $register2$$8$$).toUpperCase()), $n$CallExpression$$("get" + ($register3$$ + $register4$$).toUpperCase())])) - } -}, $Ma$:function() { + return $o$$.$SET16$($register1$$8$$, $register2$$8$$, $n$CallExpression$$("add16", [$n$CallExpression$$("get" + ($register1$$8$$ + $register2$$8$$).toUpperCase()), $n$CallExpression$$("get" + ($register3$$ + $register4$$).toUpperCase())])); + }; +}, $RLCA$:function() { return function() { - return $n$ExpressionStatement$$($n$CallExpression$$("rlca_a")) - } -}, $Qa$:function() { + return $n$ExpressionStatement$$($n$CallExpression$$("rlca_a")); + }; +}, $RRCA$:function() { return function() { - return $n$ExpressionStatement$$($n$CallExpression$$("rrca_a")) - } -}, $Ka$:function() { + return $n$ExpressionStatement$$($n$CallExpression$$("rrca_a")); + }; +}, $RLA$:function() { return function() { - return $n$ExpressionStatement$$($n$CallExpression$$("rla_a")) - } -}, $Oa$:function() { + return $n$ExpressionStatement$$($n$CallExpression$$("rla_a")); + }; +}, $RRA$:function() { return function() { - return $n$ExpressionStatement$$($n$CallExpression$$("rra_a")) - } -}, $w$:function() { + return $n$ExpressionStatement$$($n$CallExpression$$("rra_a")); + }; +}, $DAA$:function() { return function() { - return $n$ExpressionStatement$$($n$CallExpression$$("daa")) - } -}, $t$:function() { + return $n$ExpressionStatement$$($n$CallExpression$$("daa")); + }; +}, $CPL$:function() { return function() { - return $n$ExpressionStatement$$($n$CallExpression$$("cpl_a")) - } -}, $Va$:function() { + return $n$ExpressionStatement$$($n$CallExpression$$("cpl_a")); + }; +}, $SCF$:function() { return function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(1))), $n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(2)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(16))))] - } -}, $o$:function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(1))), $n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(2)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(16))))]; + }; +}, $CCF$:function() { return function() { - return $n$ExpressionStatement$$($n$CallExpression$$("ccf")) - } -}, $f$:function($register1$$9$$, $register2$$9$$) { - return void 0 == $register1$$9$$ && void 0 == $register2$$9$$ ? function($value$$101$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("add_a", $n$Literal$$($value$$101$$))) - } : void 0 == $register2$$9$$ ? function() { - return $n$ExpressionStatement$$($n$CallExpression$$("add_a", $n$Register$$($register1$$9$$))) + return $n$ExpressionStatement$$($n$CallExpression$$("ccf")); + }; +}, $ADD$:function($register1$$9$$, $register2$$9$$) { + return void 0 === $register1$$9$$ && void 0 === $register2$$9$$ ? function($value$$101$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("add_a", $n$Literal$$($value$$101$$))); + } : void 0 === $register2$$9$$ ? function() { + return $n$ExpressionStatement$$($n$CallExpression$$("add_a", $n$Register$$($register1$$9$$))); } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("add_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$9$$ + $register2$$9$$).toUpperCase())))) - } -}, $a$:function($register1$$10$$, $register2$$10$$) { - return void 0 == $register1$$10$$ && void 0 == $register2$$10$$ ? function($value$$102$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("adc_a", $n$Literal$$($value$$102$$))) - } : void 0 == $register2$$10$$ ? function() { - return $n$ExpressionStatement$$($n$CallExpression$$("adc_a", $n$Register$$($register1$$10$$))) + return $n$ExpressionStatement$$($n$CallExpression$$("add_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$9$$ + $register2$$9$$).toUpperCase())))); + }; +}, $ADC$:function($register1$$10$$, $register2$$10$$) { + return void 0 === $register1$$10$$ && void 0 === $register2$$10$$ ? function($value$$102$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("adc_a", $n$Literal$$($value$$102$$))); + } : void 0 === $register2$$10$$ ? function() { + return $n$ExpressionStatement$$($n$CallExpression$$("adc_a", $n$Register$$($register1$$10$$))); } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("adc_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$10$$ + $register2$$10$$).toUpperCase())))) - } -}, $bb$:function($register1$$11$$, $register2$$11$$) { - return void 0 == $register1$$11$$ && void 0 == $register2$$11$$ ? function($value$$103$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $n$Literal$$($value$$103$$))) - } : void 0 == $register2$$11$$ ? function() { - return $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $n$Register$$($register1$$11$$))) + return $n$ExpressionStatement$$($n$CallExpression$$("adc_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$10$$ + $register2$$10$$).toUpperCase())))); + }; +}, $SUB$:function($register1$$11$$, $register2$$11$$) { + return void 0 === $register1$$11$$ && void 0 === $register2$$11$$ ? function($value$$103$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $n$Literal$$($value$$103$$))); + } : void 0 === $register2$$11$$ ? function() { + return $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $n$Register$$($register1$$11$$))); } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$11$$ + $register2$$11$$).toUpperCase())))) - } -}, $Sa$:function($register1$$12$$, $register2$$12$$) { - return void 0 == $register1$$12$$ && void 0 == $register2$$12$$ ? function($value$$104$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("sbc_a", $n$Literal$$($value$$104$$))) - } : void 0 == $register2$$12$$ ? function() { - return $n$ExpressionStatement$$($n$CallExpression$$("sbc_a", $n$Register$$($register1$$12$$))) + return $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$11$$ + $register2$$11$$).toUpperCase())))); + }; +}, $SBC$:function($register1$$12$$, $register2$$12$$) { + return void 0 === $register1$$12$$ && void 0 === $register2$$12$$ ? function($value$$104$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("sbc_a", $n$Literal$$($value$$104$$))); + } : void 0 === $register2$$12$$ ? function() { + return $n$ExpressionStatement$$($n$CallExpression$$("sbc_a", $n$Register$$($register1$$12$$))); } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("sbc_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$12$$ + $register2$$12$$).toUpperCase())))) - } -}, $i$:function($register1$$13$$, $register2$$13$$) { - return void 0 == $register1$$13$$ && void 0 == $register2$$13$$ ? function($value$$105$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("a"), $n$Literal$$($value$$105$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16))))] - } : "a" != $register1$$13$$ && void 0 == $register2$$13$$ ? function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("a"), $n$Register$$($register1$$13$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16))))] - } : "a" == $register1$$13$$ && void 0 == $register2$$13$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16)))) + return $n$ExpressionStatement$$($n$CallExpression$$("sbc_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$12$$ + $register2$$12$$).toUpperCase())))); + }; +}, $AND$:function($register1$$13$$, $register2$$13$$) { + return void 0 === $register1$$13$$ && void 0 === $register2$$13$$ ? function($value$$105$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("a"), $n$Literal$$($value$$105$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16))))]; + } : "a" != $register1$$13$$ && void 0 === $register2$$13$$ ? function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("a"), $n$Register$$($register1$$13$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16))))]; + } : "a" == $register1$$13$$ && void 0 === $register2$$13$$ ? function() { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16)))); } : function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$13$$ + $register2$$13$$).toUpperCase())))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16))))] - } -}, $eb$:function($register1$$14$$, $register2$$14$$) { - return void 0 == $register1$$14$$ && void 0 == $register2$$14$$ ? function($value$$106$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("^=", $n$Register$$("a"), $n$Literal$$($value$$106$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))] - } : "a" != $register1$$14$$ && void 0 == $register2$$14$$ ? function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("^=", $n$Register$$("a"), $n$Register$$($register1$$14$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))] - } : "a" == $register1$$14$$ && void 0 == $register2$$14$$ ? function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("a"), $n$Literal$$(0))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Literal$$(0))))] + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$13$$ + $register2$$13$$).toUpperCase())))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16))))]; + }; +}, $XOR$:function($register1$$14$$, $register2$$14$$) { + return void 0 === $register1$$14$$ && void 0 === $register2$$14$$ ? function($value$$106$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("^=", $n$Register$$("a"), $n$Literal$$($value$$106$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))]; + } : "a" != $register1$$14$$ && void 0 === $register2$$14$$ ? function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("^=", $n$Register$$("a"), $n$Register$$($register1$$14$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))]; + } : "a" == $register1$$14$$ && void 0 === $register2$$14$$ ? function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("a"), $n$Literal$$(0))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Literal$$(0))))]; } : function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("^=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$14$$ + $register2$$14$$).toUpperCase())))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))] - } -}, $ya$:function($register1$$15$$, $register2$$15$$) { - return void 0 == $register1$$15$$ && void 0 == $register2$$15$$ ? function($value$$107$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("a"), $n$Literal$$($value$$107$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))] - } : "a" != $register1$$15$$ && void 0 == $register2$$15$$ ? function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("a"), $n$Register$$($register1$$15$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))] - } : "a" == $register1$$15$$ && void 0 == $register2$$15$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")))) + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("^=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$14$$ + $register2$$14$$).toUpperCase())))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))]; + }; +}, $OR$:function($register1$$15$$, $register2$$15$$) { + return void 0 === $register1$$15$$ && void 0 === $register2$$15$$ ? function($value$$107$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("a"), $n$Literal$$($value$$107$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))]; + } : "a" != $register1$$15$$ && void 0 === $register2$$15$$ ? function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("a"), $n$Register$$($register1$$15$$))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))]; + } : "a" == $register1$$15$$ && void 0 === $register2$$15$$ ? function() { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")))); } : function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$15$$ + $register2$$15$$).toUpperCase())))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))] - } -}, $p$:function($register1$$16$$, $register2$$16$$) { - return void 0 == $register1$$16$$ && void 0 == $register2$$16$$ ? function($value$$108$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("cp_a", $n$Literal$$($value$$108$$))) - } : void 0 == $register2$$16$$ ? function() { - return $n$ExpressionStatement$$($n$CallExpression$$("cp_a", $n$Register$$($register1$$16$$))) + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$15$$ + $register2$$15$$).toUpperCase())))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))]; + }; +}, $CP$:function($register1$$16$$, $register2$$16$$) { + return void 0 === $register1$$16$$ && void 0 === $register2$$16$$ ? function($value$$108$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("cp_a", $n$Literal$$($value$$108$$))); + } : void 0 === $register2$$16$$ ? function() { + return $n$ExpressionStatement$$($n$CallExpression$$("cp_a", $n$Register$$($register1$$16$$))); } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("cp_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$16$$ + $register2$$16$$).toUpperCase())))) - } -}, $Ea$:function($register1$$17$$, $register2$$17$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("cp_a", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$16$$ + $register2$$16$$).toUpperCase())))); + }; +}, $POP$:function($register1$$17$$, $register2$$17$$) { return function() { - return[].concat($o$$.$SET16$($register1$$17$$, $register2$$17$$, $o$$.$READ_MEM16$($n$Identifier$$("sp"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("+=", $n$Identifier$$("sp"), $n$Literal$$(2)))) - } -}, $Fa$:function($register1$$18$$, $register2$$18$$) { + return[].concat($o$$.$SET16$($register1$$17$$, $register2$$17$$, $o$$.$READ_MEM16$($n$Identifier$$("sp"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("+=", $n$Identifier$$("sp"), $n$Literal$$(2)))); + }; +}, $PUSH$:function($register1$$18$$, $register2$$18$$) { return function() { - return $n$ExpressionStatement$$($n$CallExpression$$("pushUint8", [$n$Register$$($register1$$18$$), $n$Register$$($register2$$18$$)])) - } + return $n$ExpressionStatement$$($n$CallExpression$$("pushUint8", [$n$Register$$($register1$$18$$), $n$Register$$($register2$$18$$)])); + }; }, $JR$:function($test$$2$$) { return function($value$$109$$, $target$$55$$) { - return $n$IfStatement$$($test$$2$$, $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", $n$Identifier$$("tstates"), $n$Literal$$(5))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$BinaryExpression$$("+", $n$Literal$$($target$$55$$ % 16384), $n$BinaryExpression$$("*", $n$Identifier$$("page"), $n$Literal$$(16384))))), $n$ReturnStatement$$()])) - } -}, $J$:function() { + return $n$IfStatement$$($test$$2$$, $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", $n$Identifier$$("tstates"), $n$Literal$$(5))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$BinaryExpression$$("+", $n$Literal$$($target$$55$$ % 16384), $n$BinaryExpression$$("*", $n$Identifier$$("page"), $n$Literal$$(16384))))), $n$ReturnStatement$$()])); + }; +}, $DJNZ$:function() { return function($value$$110$$, $target$$56$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("b"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("-", $n$Register$$("b"), $n$Literal$$(1)), $n$Literal$$(255)))), $o$$.$JR$($n$BinaryExpression$$("!=", $n$Register$$("b"), $n$Literal$$(0)))(void 0, $target$$56$$)] - } -}, $ca$:function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("b"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("-", $n$Register$$("b"), $n$Literal$$(1)), $n$Literal$$(255)))), $o$$.$JR$($n$BinaryExpression$$("!=", $n$Register$$("b"), $n$Literal$$(0)))(void 0, $target$$56$$)]; + }; +}, $JRNZ$:function() { return function($value$$111$$, $target$$57$$) { - return $o$$.$JR$($n$UnaryExpression$$("!", $n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(64)), $n$Literal$$(0))))(void 0, $target$$57$$) - } -}, $da$:function() { + return $o$$.$JR$($n$UnaryExpression$$("!", $n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(64)), $n$Literal$$(0))))(void 0, $target$$57$$); + }; +}, $JRZ$:function() { return function($value$$112$$, $target$$58$$) { - return $o$$.$JR$($n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(64)), $n$Literal$$(0)))(void 0, $target$$58$$) - } -}, $ba$:function() { + return $o$$.$JR$($n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(64)), $n$Literal$$(0)))(void 0, $target$$58$$); + }; +}, $JRNC$:function() { return function($value$$113$$, $target$$59$$) { - return $o$$.$JR$($n$UnaryExpression$$("!", $n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$Literal$$(0))))(void 0, $target$$59$$) - } -}, $aa$:function() { + return $o$$.$JR$($n$UnaryExpression$$("!", $n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$Literal$$(0))))(void 0, $target$$59$$); + }; +}, $JRC$:function() { return function($value$$114$$, $target$$60$$) { - return $o$$.$JR$($n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$Literal$$(0)))(void 0, $target$$60$$) - } -}, $Ha$:function($operator$$4$$, $bitMask$$) { - return void 0 == $operator$$4$$ && void 0 == $bitMask$$ ? function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $o$$.$READ_MEM16$($n$Identifier$$("sp")))), $n$ExpressionStatement$$($n$AssignmentExpression$$("+=", $n$Identifier$$("sp"), $n$Literal$$(2))), $n$ReturnStatement$$()] + return $o$$.$JR$($n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$Literal$$(0)))(void 0, $target$$60$$); + }; +}, $RET$:function($operator$$4$$, $bitMask$$) { + return void 0 === $operator$$4$$ && void 0 === $bitMask$$ ? function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $o$$.$READ_MEM16$($n$Identifier$$("sp")))), $n$ExpressionStatement$$($n$AssignmentExpression$$("+=", $n$Identifier$$("sp"), $n$Literal$$(2)))]; } : function() { return $n$IfStatement$$($n$BinaryExpression$$($operator$$4$$, $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$($bitMask$$)), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", $n$Identifier$$("tstates"), $n$Literal$$(6))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $o$$.$READ_MEM16$($n$Identifier$$("sp")))), $n$ExpressionStatement$$($n$AssignmentExpression$$("+=", $n$Identifier$$("sp"), $n$Literal$$(2))), - $n$ReturnStatement$$()])) - } -}, $Y$:function($operator$$5$$, $bitMask$$1$$) { - return void 0 == $operator$$5$$ && void 0 == $bitMask$$1$$ ? function($value$$116$$, $target$$62$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$Literal$$($target$$62$$))), $n$ReturnStatement$$()] + $n$ReturnStatement$$()])); + }; +}, $JP$:function($operator$$5$$, $bitMask$$1$$) { + return void 0 === $operator$$5$$ && void 0 === $bitMask$$1$$ ? function($value$$116$$, $target$$62$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$Literal$$($target$$62$$)))]; } : "h" == $operator$$5$$ && "l" == $bitMask$$1$$ ? function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$CallExpression$$("getHL"))), $n$ReturnStatement$$()] + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$CallExpression$$("getHL")))]; } : function($value$$118$$, $target$$64$$) { - return $n$IfStatement$$($n$BinaryExpression$$($operator$$5$$, $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$($bitMask$$1$$)), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$Literal$$($target$$64$$))), $n$ReturnStatement$$()])) - } -}, $n$:function($operator$$6$$, $bitMask$$2$$) { - return void 0 == $operator$$6$$ && void 0 == $bitMask$$2$$ ? function($value$$119$$, $target$$65$$, $nextAddress$$8$$) { - return[$n$ExpressionStatement$$($n$CallExpression$$("push", $n$BinaryExpression$$("+", $n$Literal$$($nextAddress$$8$$ % 16384), $n$BinaryExpression$$("*", $n$Identifier$$("page"), $n$Literal$$(16384))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$Literal$$($target$$65$$))), $n$ReturnStatement$$()] + return $n$IfStatement$$($n$BinaryExpression$$($operator$$5$$, $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$($bitMask$$1$$)), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$Literal$$($target$$64$$))), $n$ReturnStatement$$()])); + }; +}, $CALL$:function($operator$$6$$, $bitMask$$2$$) { + return void 0 === $operator$$6$$ && void 0 === $bitMask$$2$$ ? function($value$$119$$, $target$$65$$, $nextAddress$$8$$) { + return[$n$ExpressionStatement$$($n$CallExpression$$("push", $n$BinaryExpression$$("+", $n$Literal$$($nextAddress$$8$$ % 16384), $n$BinaryExpression$$("*", $n$Identifier$$("page"), $n$Literal$$(16384))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$Literal$$($target$$65$$))), $n$ReturnStatement$$()]; } : function($value$$120$$, $target$$66$$, $nextAddress$$9$$) { return $n$IfStatement$$($n$BinaryExpression$$($operator$$6$$, $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$($bitMask$$2$$)), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", $n$Identifier$$("tstates"), $n$Literal$$(7))), $n$ExpressionStatement$$($n$CallExpression$$("push", $n$BinaryExpression$$("+", $n$Literal$$($nextAddress$$9$$ % 16384), $n$BinaryExpression$$("*", $n$Identifier$$("page"), $n$Literal$$(16384))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", - $n$Identifier$$("pc"), $n$Literal$$($target$$66$$))), $n$ReturnStatement$$()])) - } -}, $Ra$:function($targetAddress$$1$$) { + $n$Identifier$$("pc"), $n$Literal$$($target$$66$$))), $n$ReturnStatement$$()])); + }; +}, $RST$:function($targetAddress$$1$$) { return function($value$$121$$, $target$$67$$, $nextAddress$$10$$) { - return[$n$ExpressionStatement$$($n$CallExpression$$("push", $n$BinaryExpression$$("+", $n$Literal$$($nextAddress$$10$$ % 16384), $n$BinaryExpression$$("*", $n$Identifier$$("page"), $n$Literal$$(16384))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$Literal$$($targetAddress$$1$$))), $n$ReturnStatement$$()] - } -}, $I$:function() { + return[$n$ExpressionStatement$$($n$CallExpression$$("push", $n$BinaryExpression$$("+", $n$Literal$$($nextAddress$$10$$ % 16384), $n$BinaryExpression$$("*", $n$Identifier$$("page"), $n$Literal$$(16384))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$Literal$$($targetAddress$$1$$))), $n$ReturnStatement$$()]; + }; +}, $DI$:function() { return function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff1"), $n$Literal$$(!1))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff2"), $n$Literal$$(!1))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("EI_inst"), $n$Literal$$(!0)))] - } -}, $K$:function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff1"), $n$Literal$$(!1))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff2"), $n$Literal$$(!1))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("EI_inst"), $n$Literal$$(!0)))]; + }; +}, $EI$:function() { return function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff1"), $n$Literal$$(!0))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff2"), $n$Literal$$(!0))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("EI_inst"), $n$Literal$$(!0)))] - } -}, $Ba$:function($register1$$19$$, $register2$$19$$) { - return void 0 == $register2$$19$$ ? function($value$$122$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("port.out", [$n$Literal$$($value$$122$$), $n$Register$$($register1$$19$$)])) + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff1"), $n$Literal$$(!0))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff2"), $n$Literal$$(!0))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("EI_inst"), $n$Literal$$(!0)))]; + }; +}, $OUT$:function($register1$$19$$, $register2$$19$$) { + return void 0 === $register2$$19$$ ? function($value$$122$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("port.out", [$n$Literal$$($value$$122$$), $n$Register$$($register1$$19$$)])); } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("port.out", [$n$Register$$($register1$$19$$), $n$Register$$($register2$$19$$)])) - } -}, $T$:function($register1$$20$$, $register2$$20$$) { - return void 0 == $register2$$20$$ ? function($value$$123$$) { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$20$$), $n$CallExpression$$("port.in_", $n$Literal$$($value$$123$$)))) + return $n$ExpressionStatement$$($n$CallExpression$$("port.out", [$n$Register$$($register1$$19$$), $n$Register$$($register2$$19$$)])); + }; +}, $IN$:function($register1$$20$$, $register2$$20$$) { + return void 0 === $register2$$20$$ ? function($value$$123$$) { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$20$$), $n$CallExpression$$("port.in_", $n$Literal$$($value$$123$$)))); } : function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$20$$), $n$CallExpression$$("port.in_", $n$Register$$($register2$$20$$)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$($register1$$20$$)))))] - } -}, $N$:function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$20$$), $n$CallExpression$$("port.in_", $n$Register$$($register2$$20$$)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$($register1$$20$$)))))]; + }; +}, $EX_AF$:function() { return function() { - return[].concat($o$$.$EX$("a", "a2"), $o$$.$EX$("f", "f2")) - } -}, $M$:function() { + return[].concat($o$$.$EX$("a", "a2"), $o$$.$EX$("f", "f2")); + }; +}, $EXX$:function() { return function() { - return[].concat($o$$.$EX$("b", "b2"), $o$$.$EX$("c", "c2"), $o$$.$EX$("d", "d2"), $o$$.$EX$("e", "e2"), $o$$.$EX$("h", "h2"), $o$$.$EX$("l", "l2")) - } -}, $O$:function() { + return[].concat($o$$.$EX$("b", "b2"), $o$$.$EX$("c", "c2"), $o$$.$EX$("d", "d2"), $o$$.$EX$("e", "e2"), $o$$.$EX$("h", "h2"), $o$$.$EX$("l", "l2")); + }; +}, $EX_DE_HL$:function() { return function() { - return[].concat($o$$.$EX$("d", "h"), $o$$.$EX$("e", "l")) - } -}, $P$:function() { + return[].concat($o$$.$EX$("d", "h"), $o$$.$EX$("e", "l")); + }; +}, $EX_SP_HL$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$Register$$("h"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("h"), $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$Identifier$$("sp"), $n$Literal$$(1))))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$BinaryExpression$$("+", $n$Identifier$$("sp"), $n$Literal$$(1)), $n$Identifier$$("temp")])), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), - $n$Register$$("l"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("l"), $o$$.$READ_MEM8$($n$Identifier$$("sp")))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Identifier$$("sp"), $n$Identifier$$("temp")]))] - } -}, $R$:function() { + $n$Register$$("l"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("l"), $o$$.$READ_MEM8$($n$Identifier$$("sp")))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Identifier$$("sp"), $n$Identifier$$("temp")]))]; + }; +}, $HALT$:function() { return function($ret_value$$125$$, $target$$71$$, $nextAddress$$14$$) { $ret_value$$125$$ = []; $ret_value$$125$$.push($n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("tstates"), $n$Literal$$(0)))); - return $ret_value$$125$$.concat([$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("halt"), $n$Literal$$(!0))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$BinaryExpression$$("+", $n$Literal$$(($nextAddress$$14$$ - 1) % 16384), $n$BinaryExpression$$("*", $n$Identifier$$("page"), $n$Literal$$(16384))))), $n$ReturnStatement$$()]) - } -}, $La$:$generateCBFunctions$$("rlc"), $Pa$:$generateCBFunctions$$("rrc"), $Ja$:$generateCBFunctions$$("rl"), $Na$:$generateCBFunctions$$("rr"), $Xa$:$generateCBFunctions$$("sla"), $Za$:$generateCBFunctions$$("sra"), $Ya$:$generateCBFunctions$$("sll"), $ab$:$generateCBFunctions$$("srl"), $m$:function($bit$$1$$, $register1$$21$$, $register2$$21$$) { - return void 0 == $register2$$21$$ ? function() { - return $n$ExpressionStatement$$($n$CallExpression$$("bit", $n$BinaryExpression$$("&", $n$Register$$($register1$$21$$), $n$Bit$$($bit$$1$$)))) + return $ret_value$$125$$.concat([$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("halt"), $n$Literal$$(!0))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$BinaryExpression$$("+", $n$Literal$$(($nextAddress$$14$$ - 1) % 16384), $n$BinaryExpression$$("*", $n$Identifier$$("page"), $n$Literal$$(16384))))), $n$ReturnStatement$$()]); + }; +}, $t$:$generateCBFunctions$$("rlc"), $w$:$generateCBFunctions$$("rrc"), $s$:$generateCBFunctions$$("rl"), $v$:$generateCBFunctions$$("rr"), $G$:$generateCBFunctions$$("sla"), $J$:$generateCBFunctions$$("sra"), $I$:$generateCBFunctions$$("sll"), $K$:$generateCBFunctions$$("srl"), $a$:function($bit$$1$$, $register1$$21$$, $register2$$21$$) { + return void 0 === $register2$$21$$ ? function() { + return $n$ExpressionStatement$$($n$CallExpression$$("bit", $n$BinaryExpression$$("&", $n$Register$$($register1$$21$$), $n$Bit$$($bit$$1$$)))); } : "h" == $register1$$21$$ && "l" == $register2$$21$$ ? function() { - return $n$ExpressionStatement$$($n$CallExpression$$("bit", $n$BinaryExpression$$("&", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$21$$ + $register2$$21$$).toUpperCase())), $n$Bit$$($bit$$1$$)))) + return $n$ExpressionStatement$$($n$CallExpression$$("bit", $n$BinaryExpression$$("&", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$21$$ + $register2$$21$$).toUpperCase())), $n$Bit$$($bit$$1$$)))); } : function($value$$126$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("location"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$21$$ + $register2$$21$$).toUpperCase()), $n$Literal$$($value$$126$$)), $n$Literal$$(65535)))), $n$ExpressionStatement$$($n$CallExpression$$("bit", $n$BinaryExpression$$("&", $o$$.$READ_MEM8$($n$Identifier$$("location")), $n$Bit$$($bit$$1$$))))] - } -}, $Ga$:function($bit$$2$$, $register1$$22$$, $register2$$22$$) { - return void 0 == $register2$$22$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$($register1$$22$$), $n$UnaryExpression$$("~", $n$Bit$$($bit$$2$$)))) + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("location"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$21$$ + $register2$$21$$).toUpperCase()), $n$Literal$$($value$$126$$)), $n$Literal$$(65535)))), $n$ExpressionStatement$$($n$CallExpression$$("bit", $n$BinaryExpression$$("&", $o$$.$READ_MEM8$($n$Identifier$$("location")), $n$Bit$$($bit$$1$$))))]; + }; +}, $q$:function($bit$$2$$, $register1$$22$$, $register2$$22$$) { + return void 0 === $register2$$22$$ ? function() { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$($register1$$22$$), $n$UnaryExpression$$("~", $n$Bit$$($bit$$2$$)))); } : "h" == $register1$$22$$ && "l" == $register2$$22$$ ? function() { - return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", $n$CallExpression$$("get" + ($register1$$22$$ + $register2$$22$$).toUpperCase()), $n$BinaryExpression$$("&", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$22$$ + $register2$$22$$).toUpperCase())), $n$UnaryExpression$$("~", $n$Bit$$($bit$$2$$))))) + return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", $n$CallExpression$$("get" + ($register1$$22$$ + $register2$$22$$).toUpperCase()), $n$BinaryExpression$$("&", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$22$$ + $register2$$22$$).toUpperCase())), $n$UnaryExpression$$("~", $n$Bit$$($bit$$2$$))))); } : function($value$$127$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("location"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$22$$ + $register2$$22$$).toUpperCase()), $n$Literal$$($value$$127$$)), $n$Literal$$(65535)))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Identifier$$("location"), $n$BinaryExpression$$("&", $o$$.$READ_MEM8$($n$Identifier$$("location")), $n$UnaryExpression$$("~", $n$Bit$$($bit$$2$$)))]))] - } -}, $Wa$:function($bit$$3$$, $register1$$23$$, $register2$$23$$) { - return void 0 == $register2$$23$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$($register1$$23$$), $n$Bit$$($bit$$3$$))) + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("location"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$22$$ + $register2$$22$$).toUpperCase()), $n$Literal$$($value$$127$$)), $n$Literal$$(65535)))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Identifier$$("location"), $n$BinaryExpression$$("&", $o$$.$READ_MEM8$($n$Identifier$$("location")), $n$UnaryExpression$$("~", $n$Bit$$($bit$$2$$)))]))]; + }; +}, $F$:function($bit$$3$$, $register1$$23$$, $register2$$23$$) { + return void 0 === $register2$$23$$ ? function() { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$($register1$$23$$), $n$Bit$$($bit$$3$$))); } : "h" == $register1$$23$$ && "l" == $register2$$23$$ ? function() { - return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("get" + ($register1$$23$$ + $register2$$23$$).toUpperCase()), $n$BinaryExpression$$("|", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$23$$ + $register2$$23$$).toUpperCase())), $n$Bit$$($bit$$3$$))])) + return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("get" + ($register1$$23$$ + $register2$$23$$).toUpperCase()), $n$BinaryExpression$$("|", $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$23$$ + $register2$$23$$).toUpperCase())), $n$Bit$$($bit$$3$$))])); } : function($value$$128$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("location"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$23$$ + $register2$$23$$).toUpperCase()), $n$Literal$$($value$$128$$)), $n$Literal$$(65535)))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Identifier$$("location"), $n$BinaryExpression$$("|", $o$$.$READ_MEM8$($n$Identifier$$("location")), $n$Bit$$($bit$$3$$))]))] - } -}, $va$:function($register1$$24$$, $register2$$24$$, $register3$$1$$) { - return void 0 == $register3$$1$$ ? function($value$$129$$) { - return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$24$$ + $register2$$24$$).toUpperCase()), $n$Literal$$($value$$129$$ & 255)), $n$Literal$$($value$$129$$ >> 8)]))] + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("location"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$23$$ + $register2$$23$$).toUpperCase()), $n$Literal$$($value$$128$$)), $n$Literal$$(65535)))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Identifier$$("location"), $n$BinaryExpression$$("|", $o$$.$READ_MEM8$($n$Identifier$$("location")), $n$Bit$$($bit$$3$$))]))]; + }; +}, $LD_X$:function($register1$$24$$, $register2$$24$$, $register3$$1$$) { + return void 0 === $register3$$1$$ ? function($value$$129$$) { + return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$24$$ + $register2$$24$$).toUpperCase()), $n$Literal$$($value$$129$$ & 255)), $n$Literal$$($value$$129$$ >> 8)]))]; } : function($value$$130$$) { - return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register2$$24$$ + $register3$$1$$).toUpperCase()), $n$Literal$$($value$$130$$)), $n$Register$$($register1$$24$$)]))] - } -}, $W$:function($register1$$25$$, $register2$$25$$) { + return[$n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register2$$24$$ + $register3$$1$$).toUpperCase()), $n$Literal$$($value$$130$$)), $n$Register$$($register1$$24$$)]))]; + }; +}, $INC_X$:function($register1$$25$$, $register2$$25$$) { return function($value$$131$$) { - return[$n$ExpressionStatement$$($n$CallExpression$$("incMem", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$25$$ + $register2$$25$$).toUpperCase()), $n$Literal$$($value$$131$$))))] - } -}, $G$:function($register1$$26$$, $register2$$26$$) { + return[$n$ExpressionStatement$$($n$CallExpression$$("incMem", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$25$$ + $register2$$25$$).toUpperCase()), $n$Literal$$($value$$131$$))))]; + }; +}, $DEC_X$:function($register1$$26$$, $register2$$26$$) { return function($value$$132$$) { - return[$n$ExpressionStatement$$($n$CallExpression$$("decMem", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$26$$ + $register2$$26$$).toUpperCase()), $n$Literal$$($value$$132$$))))] - } -}, $h$:function($register1$$27$$, $register2$$27$$) { + return[$n$ExpressionStatement$$($n$CallExpression$$("decMem", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$26$$ + $register2$$26$$).toUpperCase()), $n$Literal$$($value$$132$$))))]; + }; +}, $ADD_X$:function($register1$$27$$, $register2$$27$$) { return function($value$$133$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("add_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$27$$ + $register2$$27$$).toUpperCase()), $n$Literal$$($value$$133$$))))) - } -}, $c$:function($register1$$28$$, $register2$$28$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("add_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$27$$ + $register2$$27$$).toUpperCase()), $n$Literal$$($value$$133$$))))); + }; +}, $ADC_X$:function($register1$$28$$, $register2$$28$$) { return function($value$$134$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("adc_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$28$$ + $register2$$28$$).toUpperCase()), $n$Literal$$($value$$134$$))))) - } -}, $cb$:function($register1$$29$$, $register2$$29$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("adc_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$28$$ + $register2$$28$$).toUpperCase()), $n$Literal$$($value$$134$$))))); + }; +}, $SUB_X$:function($register1$$29$$, $register2$$29$$) { return function($value$$135$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$29$$ + $register2$$29$$).toUpperCase()), $n$Literal$$($value$$135$$))))) - } -}, $Ua$:function($register1$$30$$, $register2$$30$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$29$$ + $register2$$29$$).toUpperCase()), $n$Literal$$($value$$135$$))))); + }; +}, $SBC_X$:function($register1$$30$$, $register2$$30$$) { return function($value$$136$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("sbc_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$30$$ + $register2$$30$$).toUpperCase()), $n$Literal$$($value$$136$$))))) - } -}, $j$:function($register1$$31$$, $register2$$31$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("sbc_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$30$$ + $register2$$30$$).toUpperCase()), $n$Literal$$($value$$136$$))))); + }; +}, $AND_X$:function($register1$$31$$, $register2$$31$$) { return function($value$$137$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$31$$ + $register2$$31$$).toUpperCase()), $n$Literal$$($value$$137$$))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16))))] - } -}, $fb$:function($register1$$32$$, $register2$$32$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$31$$ + $register2$$31$$).toUpperCase()), $n$Literal$$($value$$137$$))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a")), $n$Literal$$(16))))]; + }; +}, $XOR_X$:function($register1$$32$$, $register2$$32$$) { return function($value$$138$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("^=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$32$$ + $register2$$32$$).toUpperCase()), $n$Literal$$($value$$138$$))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))] - } -}, $za$:function($register1$$33$$, $register2$$33$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("^=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$32$$ + $register2$$32$$).toUpperCase()), $n$Literal$$($value$$138$$))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))]; + }; +}, $OR_X$:function($register1$$33$$, $register2$$33$$) { return function($value$$139$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$33$$ + $register2$$33$$).toUpperCase()), $n$Literal$$($value$$139$$))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))] - } -}, $v$:function($register1$$34$$, $register2$$34$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("a"), $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$33$$ + $register2$$33$$).toUpperCase()), $n$Literal$$($value$$139$$))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$MemberExpression$$($n$Identifier$$("SZP_TABLE"), $n$Register$$("a"))))]; + }; +}, $CP_X$:function($register1$$34$$, $register2$$34$$) { return function($value$$140$$) { - return $n$ExpressionStatement$$($n$CallExpression$$("cp_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$34$$ + $register2$$34$$).toUpperCase()), $n$Literal$$($value$$140$$))))) - } -}, $Q$:function($register1$$35$$, $register2$$35$$) { + return $n$ExpressionStatement$$($n$CallExpression$$("cp_a", $o$$.$READ_MEM8$($n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$34$$ + $register2$$34$$).toUpperCase()), $n$Literal$$($value$$140$$))))); + }; +}, $EX_SP_X$:function($register1$$35$$, $register2$$35$$) { return function() { return[].concat($n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$CallExpression$$("get" + ($register1$$35$$ + $register2$$35$$).toUpperCase()))), $o$$.$SET16$($register1$$35$$, $register2$$35$$, $o$$.$READ_MEM16$($n$Identifier$$("sp"))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Identifier$$("sp"), $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(255))])), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$BinaryExpression$$("+", - $n$Identifier$$("sp"), $n$Literal$$(1)), $n$BinaryExpression$$(">>", $n$Identifier$$("sp"), $n$Literal$$(8))]))) - } -}, $Z$:function($register1$$36$$, $register2$$36$$) { + $n$Identifier$$("sp"), $n$Literal$$(1)), $n$BinaryExpression$$(">>", $n$Identifier$$("sp"), $n$Literal$$(8))]))); + }; +}, $JP_X$:function($register1$$36$$, $register2$$36$$) { return function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$CallExpression$$("get" + ($register1$$36$$ + $register2$$36$$).toUpperCase()))), $n$ReturnStatement$$()] - } -}, $b$:function($register1$$37$$, $register2$$37$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $n$CallExpression$$("get" + ($register1$$36$$ + $register2$$36$$).toUpperCase())))]; + }; +}, $ADC16$:function($register1$$37$$, $register2$$37$$) { return function() { - return[void 0 == $register2$$37$$ ? $n$VariableDeclaration$$("value", $n$Identifier$$($register1$$37$$)) : $n$VariableDeclaration$$("value", $n$BinaryExpression$$("|", $n$BinaryExpression$$("<<", $n$Register$$($register1$$37$$), $n$Literal$$(8)), $n$Register$$($register2$$37$$))), $n$VariableDeclaration$$("val", $n$BinaryExpression$$("|", $n$BinaryExpression$$("<<", $n$Register$$("h"), $n$Literal$$(8)), $n$Register$$("l"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), + return[void 0 === $register2$$37$$ ? $n$VariableDeclaration$$("value", $n$Identifier$$($register1$$37$$)) : $n$VariableDeclaration$$("value", $n$BinaryExpression$$("|", $n$BinaryExpression$$("<<", $n$Register$$($register1$$37$$), $n$Literal$$(8)), $n$Register$$($register2$$37$$))), $n$VariableDeclaration$$("val", $n$BinaryExpression$$("|", $n$BinaryExpression$$("<<", $n$Register$$("h"), $n$Literal$$(8)), $n$Register$$("l"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$BinaryExpression$$("+", $n$BinaryExpression$$("+", $n$Identifier$$("val"), $n$Identifier$$("value")), $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$BinaryExpression$$(">>", $n$BinaryExpression$$("^", $n$BinaryExpression$$("^", $n$Identifier$$("val"), $n$Identifier$$("temp")), $n$Identifier$$("value")), $n$Literal$$(8)), $n$Literal$$(16)), $n$BinaryExpression$$("&", $n$BinaryExpression$$(">>", $n$Identifier$$("temp"), $n$Literal$$(16)), $n$Literal$$(1))), $n$BinaryExpression$$("&", $n$BinaryExpression$$(">>", $n$Identifier$$("temp"), $n$Literal$$(8)), $n$Literal$$(128))), $n$ConditionalExpression$$($n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(65535)), $n$Literal$$(0)), $n$Literal$$(0), $n$Literal$$(64))), $n$BinaryExpression$$(">>", $n$BinaryExpression$$("&", $n$BinaryExpression$$("&", $n$BinaryExpression$$("^", $n$BinaryExpression$$("^", $n$Identifier$$("value"), $n$Identifier$$("val")), $n$Literal$$(32768)), $n$BinaryExpression$$("^", $n$Identifier$$("value"), $n$Identifier$$("temp"))), $n$Literal$$(32768)), $n$Literal$$(13))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("h"), $n$BinaryExpression$$("&", $n$BinaryExpression$$(">>", $n$Identifier$$("temp"), $n$Literal$$(8)), $n$Literal$$(255)))), - $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("l"), $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(255))))] - } -}, $Ta$:function($register1$$38$$, $register2$$38$$) { + $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("l"), $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(255))))]; + }; +}, $SBC16$:function($register1$$38$$, $register2$$38$$) { return function() { - return[void 0 == $register2$$38$$ ? $n$VariableDeclaration$$("value", $n$Identifier$$($register1$$38$$)) : $n$VariableDeclaration$$("value", $n$BinaryExpression$$("|", $n$BinaryExpression$$("<<", $n$Register$$($register1$$38$$), $n$Literal$$(8)), $n$Register$$($register2$$38$$))), $n$VariableDeclaration$$("val", $n$BinaryExpression$$("|", $n$BinaryExpression$$("<<", $n$Register$$("h"), $n$Literal$$(8)), $n$Register$$("l"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), + return[void 0 === $register2$$38$$ ? $n$VariableDeclaration$$("value", $n$Identifier$$($register1$$38$$)) : $n$VariableDeclaration$$("value", $n$BinaryExpression$$("|", $n$BinaryExpression$$("<<", $n$Register$$($register1$$38$$), $n$Literal$$(8)), $n$Register$$($register2$$38$$))), $n$VariableDeclaration$$("val", $n$BinaryExpression$$("|", $n$BinaryExpression$$("<<", $n$Register$$("h"), $n$Literal$$(8)), $n$Register$$("l"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$BinaryExpression$$("-", $n$BinaryExpression$$("-", $n$Identifier$$("val"), $n$Identifier$$("value")), $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$BinaryExpression$$(">>", $n$BinaryExpression$$("^", $n$BinaryExpression$$("^", $n$Identifier$$("val"), $n$Identifier$$("temp")), $n$Identifier$$("value")), $n$Literal$$(8)), $n$Literal$$(16)), $n$Literal$$(2)), $n$BinaryExpression$$("&", $n$BinaryExpression$$(">>", $n$Identifier$$("temp"), $n$Literal$$(16)), $n$Literal$$(1))), $n$BinaryExpression$$("&", $n$BinaryExpression$$(">>", $n$Identifier$$("temp"), $n$Literal$$(8)), $n$Literal$$(128))), $n$ConditionalExpression$$($n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(65535)), $n$Literal$$(0)), $n$Literal$$(0), $n$Literal$$(64))), $n$BinaryExpression$$(">>", $n$BinaryExpression$$("&", $n$BinaryExpression$$("&", $n$BinaryExpression$$("^", $n$Identifier$$("value"), $n$Identifier$$("val")), $n$BinaryExpression$$("^", $n$Identifier$$("val"), $n$Identifier$$("temp"))), $n$Literal$$(32768)), $n$Literal$$(13))))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("h"), $n$BinaryExpression$$("&", $n$BinaryExpression$$(">>", $n$Identifier$$("temp"), $n$Literal$$(8)), $n$Literal$$(255)))), - $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("l"), $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(255))))] - } -}, $wa$:function() { + $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("l"), $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(255))))]; + }; +}, $NEG$:function() { return function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$Register$$("a"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("a"), $n$Literal$$(0))), $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $n$Identifier$$("temp")))] - } -}, $Ia$:function() { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$Register$$("a"))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("a"), $n$Literal$$(0))), $n$ExpressionStatement$$($n$CallExpression$$("sub_a", $n$Identifier$$("temp")))]; + }; +}, $RETN_RETI$:function() { return function() { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $o$$.$READ_MEM16$($n$Identifier$$("sp")))), $n$ExpressionStatement$$($n$AssignmentExpression$$("+=", $n$Identifier$$("sp"), $n$Literal$$(2))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff1"), $n$Identifier$$("iff2")))] - } -}, $S$:function($value$$144$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("pc"), $o$$.$READ_MEM16$($n$Identifier$$("sp")))), $n$ExpressionStatement$$($n$AssignmentExpression$$("+=", $n$Identifier$$("sp"), $n$Literal$$(2))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("iff1"), $n$Identifier$$("iff2")))]; + }; +}, $IM$:function($value$$144$$) { return function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("im"), $n$Literal$$($value$$144$$))) - } -}, $X$:function() { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("im"), $n$Literal$$($value$$144$$))); + }; +}, $INI$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$CallExpression$$("port.in_", $n$Register$$("c")))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("getHL"), $n$Identifier$$("temp")])), $o$$.$DEC8$("b")(), $n$ExpressionStatement$$($n$CallExpression$$("incHL")), $n$IfStatement$$($n$BinaryExpression$$("==", $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(128)), $n$Literal$$(128)), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("|=", - $n$Register$$("f"), $n$Literal$$(2)))), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(2))))))] - } -}, $Da$:function() { + $n$Register$$("f"), $n$Literal$$(2)))), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(2))))))]; + }; +}, $OUTI$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $o$$.$READ_MEM8$($n$CallExpression$$("getHL")))), $n$ExpressionStatement$$($n$CallExpression$$("port.out", [$n$Register$$("c"), $n$Identifier$$("temp")])), $o$$.$DEC8$("b")(), $n$ExpressionStatement$$($n$CallExpression$$("incHL")), $n$IfStatement$$($n$BinaryExpression$$(">", $n$BinaryExpression$$("+", $n$Register$$("l"), $n$Identifier$$("temp")), $n$Literal$$(255)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(1))), $n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(16)))]), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(1)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(16))))])), $n$IfStatement$$($n$BinaryExpression$$("==", $n$BinaryExpression$$("&", $n$Identifier$$("temp"), - $n$Literal$$(128)), $n$Literal$$(128)), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(2)))), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(2))))))] - } -}, $Ca$:function() { + $n$Literal$$(128)), $n$Literal$$(128)), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(2)))), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(2))))))]; + }; +}, $OUTD$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $o$$.$READ_MEM8$($n$CallExpression$$("getHL")))), $n$ExpressionStatement$$($n$CallExpression$$("port.out", [$n$Register$$("c"), $n$Identifier$$("temp")])), $o$$.$DEC8$("b")(), $n$ExpressionStatement$$($n$CallExpression$$("decHL")), $n$IfStatement$$($n$BinaryExpression$$(">", $n$BinaryExpression$$("+", $n$Register$$("l"), $n$Identifier$$("temp")), $n$Literal$$(255)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(1))), $n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(16)))]), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(1)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(16))))])), $n$IfStatement$$($n$BinaryExpression$$("==", $n$BinaryExpression$$("&", $n$Identifier$$("temp"), - $n$Literal$$(128)), $n$Literal$$(128)), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(2)))), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(2))))))] - } -}, $ia$:function() { + $n$Literal$$(128)), $n$Literal$$(128)), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(2)))), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(2))))))]; + }; +}, $LDI$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $o$$.$READ_MEM8$($n$CallExpression$$("getHL")))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("getDE"), $n$Identifier$$("temp")])), $n$ExpressionStatement$$($n$CallExpression$$("decBC")), $n$ExpressionStatement$$($n$CallExpression$$("incDE")), $n$ExpressionStatement$$($n$CallExpression$$("incHL")), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$Identifier$$("temp"), $n$Register$$("a")), $n$Literal$$(255)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(193)), $n$ConditionalExpression$$($n$CallExpression$$("getBC"), $n$Literal$$(4), $n$Literal$$(0))), $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(8))), - $n$ConditionalExpression$$($n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(2)), $n$Literal$$(32), $n$Literal$$(0)))))] - } -}, $q$:function() { + $n$ConditionalExpression$$($n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(2)), $n$Literal$$(32), $n$Literal$$(0)))))]; + }; +}, $CPI$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$Literal$$(2)))), $n$ExpressionStatement$$($n$CallExpression$$("cp_a", [$o$$.$READ_MEM8$($n$CallExpression$$("getHL"))])), $n$ExpressionStatement$$($n$CallExpression$$("decBC")), $n$ExpressionStatement$$($n$CallExpression$$("incHL")), $n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Identifier$$("temp"), - $n$ConditionalExpression$$($n$BinaryExpression$$("==", $n$CallExpression$$("getBC"), $n$Literal$$(0)), $n$Literal$$(0), $n$Literal$$(4)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(248)), $n$Identifier$$("temp"))))] - } -}, $ga$:function() { + $n$ConditionalExpression$$($n$BinaryExpression$$("==", $n$CallExpression$$("getBC"), $n$Literal$$(0)), $n$Literal$$(0), $n$Literal$$(4)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(248)), $n$Identifier$$("temp"))))]; + }; +}, $LDD$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $o$$.$READ_MEM8$($n$CallExpression$$("getHL")))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("getDE"), $n$Identifier$$("temp")])), $n$ExpressionStatement$$($n$CallExpression$$("decBC")), $n$ExpressionStatement$$($n$CallExpression$$("decDE")), $n$ExpressionStatement$$($n$CallExpression$$("decHL")), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$Identifier$$("temp"), $n$Register$$("a")), $n$Literal$$(255)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(193)), $n$ConditionalExpression$$($n$CallExpression$$("getBC"), $n$Literal$$(4), $n$Literal$$(0))), $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(8))), - $n$ConditionalExpression$$($n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(2)), $n$Literal$$(32), $n$Literal$$(0)))))] - } -}, $ja$:function() { + $n$ConditionalExpression$$($n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(2)), $n$Literal$$(32), $n$Literal$$(0)))))]; + }; +}, $LDIR$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $o$$.$READ_MEM8$($n$CallExpression$$("getHL")))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("getDE"), $n$Identifier$$("temp")])), $n$ExpressionStatement$$($n$CallExpression$$("decBC")), $n$ExpressionStatement$$($n$CallExpression$$("incDE")), $n$ExpressionStatement$$($n$CallExpression$$("incHL")), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$Identifier$$("temp"), $n$Register$$("a")), $n$Literal$$(255)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(193)), $n$ConditionalExpression$$($n$CallExpression$$("getBC"), $n$Literal$$(4), $n$Literal$$(0))), $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(8))), - $n$ConditionalExpression$$($n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(2)), $n$Literal$$(32), $n$Literal$$(0))))), $n$IfStatement$$($n$BinaryExpression$$("!=", $n$CallExpression$$("getBC"), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", $n$Identifier$$("tstates"), $n$Literal$$(5))), $n$ReturnStatement$$()]))] - } -}, $s$:function() { + $n$ConditionalExpression$$($n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(2)), $n$Literal$$(32), $n$Literal$$(0))))), $n$IfStatement$$($n$BinaryExpression$$("!=", $n$CallExpression$$("getBC"), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", $n$Identifier$$("tstates"), $n$Literal$$(5))), $n$ReturnStatement$$()]))]; + }; +}, $CPIR$:function() { return function() { var $JSCompiler_temp_const$$19$$ = $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(1)), $n$Literal$$(2)))), $JSCompiler_temp_const$$18$$ = $n$ExpressionStatement$$($n$CallExpression$$("cp_a", [$o$$.$READ_MEM8$($n$CallExpression$$("getHL"))])), $JSCompiler_temp_const$$17$$ = $n$ExpressionStatement$$($n$CallExpression$$("decBC")), $JSCompiler_temp_const$$16$$ = $n$ExpressionStatement$$($n$CallExpression$$("incHL")), $JSCompiler_temp_const$$15$$ = $n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Identifier$$("temp"), $n$ConditionalExpression$$($n$BinaryExpression$$("==", $n$CallExpression$$("getBC"), $n$Literal$$(0)), $n$Literal$$(0), $n$Literal$$(4)))); return[$JSCompiler_temp_const$$19$$, $JSCompiler_temp_const$$18$$, $JSCompiler_temp_const$$17$$, $JSCompiler_temp_const$$16$$, $JSCompiler_temp_const$$15$$, $n$IfStatement$$({type:"LogicalExpression", operator:"&&", left:$n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(4)), $n$Literal$$(0)), right:$n$BinaryExpression$$("==", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(64)), $n$Literal$$(0))}, $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", - $n$Identifier$$("tstates"), $n$Literal$$(5))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(248)), $n$Identifier$$("temp")))), $n$ReturnStatement$$()])), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(248)), $n$Identifier$$("temp"))))] - } -}, $Aa$:function() { + $n$Identifier$$("tstates"), $n$Literal$$(5))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(248)), $n$Identifier$$("temp")))), $n$ReturnStatement$$()])), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(248)), $n$Identifier$$("temp"))))]; + }; +}, $OTIR$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $o$$.$READ_MEM8$($n$CallExpression$$("getHL")))), $n$ExpressionStatement$$($n$CallExpression$$("port.out", [$n$Register$$("c"), $n$Identifier$$("temp")])), $o$$.$DEC8$("b")(), $n$ExpressionStatement$$($n$CallExpression$$("incHL")), $n$IfStatement$$($n$BinaryExpression$$(">", $n$BinaryExpression$$("+", $n$Register$$("l"), $n$Identifier$$("temp")), $n$Literal$$(255)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(1))), $n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(16)))]), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(1)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(16))))])), $n$IfStatement$$($n$BinaryExpression$$("!=", $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(128)), $n$Literal$$(0)), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("|=", $n$Register$$("f"), $n$Literal$$(2)))), $n$BlockStatement$$($n$ExpressionStatement$$($n$AssignmentExpression$$("&=", $n$Register$$("f"), $n$UnaryExpression$$("~", $n$Literal$$(2)))))), $n$IfStatement$$($n$BinaryExpression$$("!=", $n$Register$$("b"), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", $n$Identifier$$("tstates"), $n$Literal$$(5))), - $n$ReturnStatement$$()]))] - } -}, $ha$:function() { + $n$ReturnStatement$$()]))]; + }; +}, $LDDR$:function() { return function() { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $o$$.$READ_MEM8$($n$CallExpression$$("getHL")))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$CallExpression$$("getDE"), $n$Identifier$$("temp")])), $n$ExpressionStatement$$($n$CallExpression$$("decBC")), $n$ExpressionStatement$$($n$CallExpression$$("decDE")), $n$ExpressionStatement$$($n$CallExpression$$("decHL")), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("temp"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$Identifier$$("temp"), $n$Register$$("a")), $n$Literal$$(255)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$("f"), $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("|", $n$BinaryExpression$$("&", $n$Register$$("f"), $n$Literal$$(193)), $n$ConditionalExpression$$($n$CallExpression$$("getBC"), $n$Literal$$(4), $n$Literal$$(0))), $n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(8))), - $n$ConditionalExpression$$($n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(2)), $n$Literal$$(32), $n$Literal$$(0))))), $n$IfStatement$$($n$BinaryExpression$$("!=", $n$CallExpression$$("getBC"), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", $n$Identifier$$("tstates"), $n$Literal$$(5))), $n$ReturnStatement$$()]))] - } -}, $ma$:$generateIndexCBFunctions$$("rlc"), $oa$:$generateIndexCBFunctions$$("rrc"), $la$:$generateIndexCBFunctions$$("rl"), $na$:$generateIndexCBFunctions$$("rr"), $pa$:$generateIndexCBFunctions$$("sla"), $sa$:$generateIndexCBFunctions$$("sra"), $qa$:$generateIndexCBFunctions$$("sll"), $ta$:$generateIndexCBFunctions$$("srl"), $READ_MEM8$:function($value$$155$$) { - return $n$CallExpression$$("readMem", $value$$155$$) + $n$ConditionalExpression$$($n$BinaryExpression$$("&", $n$Identifier$$("temp"), $n$Literal$$(2)), $n$Literal$$(32), $n$Literal$$(0))))), $n$IfStatement$$($n$BinaryExpression$$("!=", $n$CallExpression$$("getBC"), $n$Literal$$(0)), $n$BlockStatement$$([$n$ExpressionStatement$$($n$AssignmentExpression$$("-=", $n$Identifier$$("tstates"), $n$Literal$$(5))), $n$ReturnStatement$$()]))]; + }; +}, $g$:$generateIndexCBFunctions$$("rlc"), $j$:$generateIndexCBFunctions$$("rrc"), $f$:$generateIndexCBFunctions$$("rl"), $i$:$generateIndexCBFunctions$$("rr"), $m$:$generateIndexCBFunctions$$("sla"), $o$:$generateIndexCBFunctions$$("sra"), $n$:$generateIndexCBFunctions$$("sll"), $p$:$generateIndexCBFunctions$$("srl"), $READ_MEM8$:function($value$$155$$) { + return $n$CallExpression$$("readMem", $value$$155$$); }, $READ_MEM16$:function($value$$156$$) { - return $n$CallExpression$$("readMemWord", $value$$156$$) + return $n$CallExpression$$("readMemWord", $value$$156$$); }}; function $generateCBFunctions$$($fn$$3$$) { return function($register1$$39$$, $register2$$39$$) { - return void 0 == $register2$$39$$ ? function() { - return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$39$$), $n$CallExpression$$($fn$$3$$, $n$Register$$($register1$$39$$)))) + return void 0 === $register2$$39$$ ? function() { + return $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register1$$39$$), $n$CallExpression$$($fn$$3$$, $n$Register$$($register1$$39$$)))); } : function() { - return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", $n$CallExpression$$("get" + ($register1$$39$$ + $register2$$39$$).toUpperCase()), $n$CallExpression$$($fn$$3$$, $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$39$$ + $register2$$39$$).toUpperCase()))))) - } - } + return $n$ExpressionStatement$$($n$CallExpression$$("writeMem", $n$CallExpression$$("get" + ($register1$$39$$ + $register2$$39$$).toUpperCase()), $n$CallExpression$$($fn$$3$$, $o$$.$READ_MEM8$($n$CallExpression$$("get" + ($register1$$39$$ + $register2$$39$$).toUpperCase()))))); + }; + }; } function $generateIndexCBFunctions$$($fn$$4$$) { return function($register1$$40$$, $register2$$40$$, $register3$$2$$) { - return void 0 == $register3$$2$$ ? function($value$$157$$) { - return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("location"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$40$$ + $register2$$40$$).toUpperCase()), $n$Literal$$($value$$157$$)), $n$Literal$$(65535)))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Identifier$$("location"), $n$CallExpression$$($fn$$4$$, $o$$.$READ_MEM8$($n$Identifier$$("location")))]))] + return void 0 === $register3$$2$$ ? function($value$$157$$) { + return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("location"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$40$$ + $register2$$40$$).toUpperCase()), $n$Literal$$($value$$157$$)), $n$Literal$$(65535)))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", [$n$Identifier$$("location"), $n$CallExpression$$($fn$$4$$, $o$$.$READ_MEM8$($n$Identifier$$("location")))]))]; } : function($value$$158$$) { return[$n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Identifier$$("location"), $n$BinaryExpression$$("&", $n$BinaryExpression$$("+", $n$CallExpression$$("get" + ($register1$$40$$ + $register2$$40$$).toUpperCase()), $n$Literal$$($value$$158$$)), $n$Literal$$(65535)))), $n$ExpressionStatement$$($n$AssignmentExpression$$("=", $n$Register$$($register3$$2$$), $n$CallExpression$$($fn$$4$$, $o$$.$READ_MEM8$($n$Identifier$$("location"))))), $n$ExpressionStatement$$($n$CallExpression$$("writeMem", - [$n$Identifier$$("location"), $n$Register$$($register3$$2$$)]))] - } - } -} -function $evaluate$$($expression$$3$$) { - switch($expression$$3$$.type) { - case "BinaryExpression": - if("Literal" != $expression$$3$$.left.type && "Literal" != $expression$$3$$.right.type) { - break - } - switch($expression$$3$$.$operator$) { - case ">>": - return $n$Literal$$($expression$$3$$.left.value >> $expression$$3$$.right.value); - case "&": - return $n$Literal$$($expression$$3$$.left.value & $expression$$3$$.right.value) - } - } - return $expression$$3$$ + [$n$Identifier$$("location"), $n$Register$$($register3$$2$$)]))]; + }; + }; } ;var $opcodeTableCB$$ = [], $opcodeTableDDCB$$ = [], $opcodeTableFDCB$$ = [], $regs$$ = {B:["b"], C:["c"], D:["d"], E:["e"], H:["h"], L:["l"], "(HL)":["h", "l"], A:["a"]}; "RLC RRC RL RR SLA SRA SLL SRL".split(" ").forEach(function($op$$) { - for(var $reg$$2$$ in $regs$$) { + for (var $reg$$2$$ in $regs$$) { $opcodeTableCB$$.push({name:$op$$ + " " + $reg$$2$$, $ast$:$o$$[$op$$].apply(null, $regs$$[$reg$$2$$])}), "(HL)" != $reg$$2$$ ? ($opcodeTableDDCB$$.push({name:"LD " + $reg$$2$$ + "," + $op$$ + " (IX)", $ast$:$o$$["LD_" + $op$$].apply(null, ["ixH", "ixL"].concat($regs$$[$reg$$2$$]))}), $opcodeTableFDCB$$.push({name:"LD " + $reg$$2$$ + "," + $op$$ + " (IY)", $ast$:$o$$["LD_" + $op$$].apply(null, ["iyH", "iyL"].concat($regs$$[$reg$$2$$]))})) : ($opcodeTableDDCB$$.push({name:$op$$ + " (IX)", $ast$:$o$$["LD_" + - $op$$]("ixH", "ixL")}), $opcodeTableFDCB$$.push({name:$op$$ + " (IY)", $ast$:$o$$["LD_" + $op$$]("iyH", "iyL")})) + $op$$]("ixH", "ixL")}), $opcodeTableFDCB$$.push({name:$op$$ + " (IY)", $ast$:$o$$["LD_" + $op$$]("iyH", "iyL")})); } }); ["BIT", "RES", "SET"].forEach(function($op$$1$$) { - for(var $i$$31$$ = 0;8 > $i$$31$$;$i$$31$$++) { - for(var $reg$$3$$ in $regs$$) { - $opcodeTableCB$$.push({name:$op$$1$$ + " " + $i$$31$$ + "," + $reg$$3$$, $ast$:$o$$[$op$$1$$].apply(null, [$i$$31$$].concat($regs$$[$reg$$3$$]))}) + for (var $i$$33$$ = 0;8 > $i$$33$$;$i$$33$$++) { + for (var $reg$$3$$ in $regs$$) { + $opcodeTableCB$$.push({name:$op$$1$$ + " " + $i$$33$$ + "," + $reg$$3$$, $ast$:$o$$[$op$$1$$].apply(null, [$i$$33$$].concat($regs$$[$reg$$3$$]))}); } - for(var $j$$2$$ = 0;8 > $j$$2$$;$j$$2$$++) { - $opcodeTableDDCB$$.push({name:$op$$1$$ + " " + $i$$31$$ + " (IX)", $ast$:$o$$[$op$$1$$].apply(null, [$i$$31$$].concat(["ixH", "ixL"]))}), $opcodeTableFDCB$$.push({name:$op$$1$$ + " " + $i$$31$$ + " (IY)", $ast$:$o$$[$op$$1$$].apply(null, [$i$$31$$].concat(["iyH", "iyL"]))}) + for (var $j$$2$$ = 0;8 > $j$$2$$;$j$$2$$++) { + $opcodeTableDDCB$$.push({name:$op$$1$$ + " " + $i$$33$$ + " (IX)", $ast$:$o$$[$op$$1$$].apply(null, [$i$$33$$].concat(["ixH", "ixL"]))}), $opcodeTableFDCB$$.push({name:$op$$1$$ + " " + $i$$33$$ + " (IY)", $ast$:$o$$[$op$$1$$].apply(null, [$i$$33$$].concat(["iyH", "iyL"]))}); } } }); -function $generateIndexTable$$($index$$51_registerH$$) { - var $register_registerL$$ = $index$$51_registerH$$.substring(1, 2).toLowerCase(); - $index$$51_registerH$$ = "i" + $register_registerL$$ + "H"; - $register_registerL$$ = "i" + $register_registerL$$ + "L"; - $o$$.$LD16$($index$$51_registerH$$, $register_registerL$$); - $o$$.$LD16$($index$$51_registerH$$, $register_registerL$$, "n", "n") +function $generateIndexTable$$($index$$52$$) { + var $register_registerL$$ = $index$$52$$.substring(1, 2).toLowerCase(), $registerH$$ = "i" + $register_registerL$$ + "H", $register_registerL$$ = "i" + $register_registerL$$ + "L"; + return{9:{name:"ADD " + $index$$52$$ + ",BC", $ast$:$o$$.$ADD16$($registerH$$, $register_registerL$$, "b", "c")}, 25:{name:"ADD " + $index$$52$$ + ",DE", $ast$:$o$$.$ADD16$($registerH$$, $register_registerL$$, "d", "e")}, 33:{name:"LD " + $index$$52$$ + ",nn", $ast$:$o$$.$LD16$($registerH$$, $register_registerL$$)}, 34:{name:"LD (nn)," + $index$$52$$, $ast$:$o$$.$LD_NN$($registerH$$, $register_registerL$$)}, 35:{name:"INC " + $index$$52$$, $ast$:$o$$.$INC16$($registerH$$, $register_registerL$$)}, + 42:{name:"LD " + $index$$52$$ + ",(nn)", $ast$:$o$$.$LD16$($registerH$$, $register_registerL$$, "n", "n")}, 43:{name:"DEC " + $index$$52$$, $ast$:$o$$.$DEC16$($registerH$$, $register_registerL$$)}, 52:{name:"INC (" + $index$$52$$ + "+d)", $ast$:$o$$.$INC_X$($registerH$$, $register_registerL$$)}, 53:{name:"DEC (" + $index$$52$$ + "+d)", $ast$:$o$$.$DEC_X$($registerH$$, $register_registerL$$)}, 54:{name:"LD (" + $index$$52$$ + "+d),n", $ast$:$o$$.$LD_X$($registerH$$, $register_registerL$$)}, 57:{name:"ADD " + + $index$$52$$ + ",SP", $ast$:$o$$.$ADD16$($registerH$$, $register_registerL$$, "sp")}, 70:{name:"LD B,(" + $index$$52$$ + "+d)", $ast$:$o$$.$LD8_D$("b", $registerH$$, $register_registerL$$)}, 78:{name:"LD C,(" + $index$$52$$ + "+d)", $ast$:$o$$.$LD8_D$("c", $registerH$$, $register_registerL$$)}, 84:{name:" LD D," + $index$$52$$ + "H *", $ast$:$o$$.$LD8$("d", $registerH$$)}, 86:{name:"LD D,(" + $index$$52$$ + "+d)", $ast$:$o$$.$LD8_D$("d", $registerH$$, $register_registerL$$)}, 93:{name:"LD E," + + $index$$52$$ + "L *", $ast$:$o$$.$LD8$("e", $register_registerL$$)}, 94:{name:"LD E,(" + $index$$52$$ + "+d)", $ast$:$o$$.$LD8_D$("e", $registerH$$, $register_registerL$$)}, 96:{name:"LD " + $index$$52$$ + "H,B", $ast$:$o$$.$LD8$($registerH$$, "b")}, 97:{name:"LD " + $index$$52$$ + "H,C", $ast$:$o$$.$LD8$($registerH$$, "c")}, 98:{name:"LD " + $index$$52$$ + "H,D", $ast$:$o$$.$LD8$($registerH$$, "d")}, 99:{name:"LD " + $index$$52$$ + "H,E", $ast$:$o$$.$LD8$($registerH$$, "e")}, 100:{name:"LD " + + $index$$52$$ + "H," + $index$$52$$ + "H", $ast$:$o$$.$NOOP$()}, 101:{name:"LD " + $index$$52$$ + "H," + $index$$52$$ + "L *", $ast$:$o$$.$LD8_D$($registerH$$, $register_registerL$$)}, 102:{name:"LD H,(" + $index$$52$$ + "+d)", $ast$:$o$$.$LD8_D$("h", $registerH$$, $register_registerL$$)}, 103:{name:"LD " + $index$$52$$ + "H,A", $ast$:$o$$.$LD8$($registerH$$, "a")}, 104:{name:"LD " + $index$$52$$ + "L,B", $ast$:$o$$.$LD8$($register_registerL$$, "b")}, 105:{name:"LD " + $index$$52$$ + "L,C", $ast$:$o$$.$LD8$($register_registerL$$, + "c")}, 106:{name:"LD " + $index$$52$$ + "L,D", $ast$:$o$$.$LD8$($register_registerL$$, "d")}, 107:{name:"LD " + $index$$52$$ + "L,E", $ast$:$o$$.$LD8$($register_registerL$$, "e")}, 108:{name:"LD " + $index$$52$$ + "L," + $index$$52$$ + "H", $ast$:$o$$.$LD8_D$($register_registerL$$, $registerH$$)}, 109:{name:"LD " + $index$$52$$ + "L," + $index$$52$$ + "L *", $ast$:$o$$.$NOOP$()}, 110:{name:"LD L,(" + $index$$52$$ + "+d)", $ast$:$o$$.$LD8_D$("l", $registerH$$, $register_registerL$$)}, 111:{name:"LD " + + $index$$52$$ + "L,A *", $ast$:$o$$.$LD8$($register_registerL$$, "a")}, 112:{name:"LD (" + $index$$52$$ + "+d),B", $ast$:$o$$.$LD_X$("b", $registerH$$, $register_registerL$$)}, 113:{name:"LD (" + $index$$52$$ + "+d),C", $ast$:$o$$.$LD_X$("c", $registerH$$, $register_registerL$$)}, 114:{name:"LD (" + $index$$52$$ + "+d),D", $ast$:$o$$.$LD_X$("d", $registerH$$, $register_registerL$$)}, 115:{name:"LD (" + $index$$52$$ + "+d),E", $ast$:$o$$.$LD_X$("e", $registerH$$, $register_registerL$$)}, 116:{name:"LD (" + + $index$$52$$ + "+d),H", $ast$:$o$$.$LD_X$("h", $registerH$$, $register_registerL$$)}, 117:{name:"LD (" + $index$$52$$ + "+d),L", $ast$:$o$$.$LD_X$("l", $registerH$$, $register_registerL$$)}, 118:{name:"LD (" + $index$$52$$ + "+d),B", $ast$:$o$$.$LD_X$("b", $registerH$$, $register_registerL$$)}, 119:{name:"LD (" + $index$$52$$ + "+d),A", $ast$:$o$$.$LD_X$("a", $registerH$$, $register_registerL$$)}, 126:{name:"LD A,(" + $index$$52$$ + "+d)", $ast$:$o$$.$LD8_D$("a", $registerH$$, $register_registerL$$)}, + 124:{name:"LD A," + $index$$52$$ + "H", $ast$:$o$$.$LD8$("a", $registerH$$)}, 125:{name:"LD A," + $index$$52$$ + "L", $ast$:$o$$.$LD8$("a", $register_registerL$$)}, 132:{name:"ADD A," + $index$$52$$ + "H", $ast$:$o$$.$ADD$($register_registerL$$)}, 133:{name:"ADD A," + $index$$52$$ + "L", $ast$:$o$$.$ADD$($register_registerL$$)}, 134:{name:"ADD A,(" + $index$$52$$ + "+d)", $ast$:$o$$.$ADD_X$($registerH$$, $register_registerL$$)}, 140:{name:"ADC A," + $index$$52$$ + "H", $ast$:$o$$.$ADC$($register_registerL$$)}, + 141:{name:"ADC A," + $index$$52$$ + "L", $ast$:$o$$.$ADC$($register_registerL$$)}, 142:{name:"ADC A,(" + $index$$52$$ + "+d)", $ast$:$o$$.$ADC_X$($registerH$$, $register_registerL$$)}, 148:{name:"SUB A," + $index$$52$$ + "H", $ast$:$o$$.$SUB$($register_registerL$$)}, 149:{name:"SUB A," + $index$$52$$ + "L", $ast$:$o$$.$SUB$($register_registerL$$)}, 150:{name:"SUB A,(" + $index$$52$$ + "+d)", $ast$:$o$$.$SUB_X$($registerH$$, $register_registerL$$)}, 156:{name:"SBC A," + $index$$52$$ + "H", $ast$:$o$$.$SBC$($register_registerL$$)}, + 157:{name:"SBC A," + $index$$52$$ + "L", $ast$:$o$$.$SBC$($register_registerL$$)}, 158:{name:"SBC A,(" + $index$$52$$ + "+d)", $ast$:$o$$.$SBC_X$($registerH$$, $register_registerL$$)}, 166:{name:"AND A,(" + $index$$52$$ + "+d)", $ast$:$o$$.$AND_X$($registerH$$, $register_registerL$$)}, 174:{name:"XOR A,(" + $index$$52$$ + "+d)", $ast$:$o$$.$XOR_X$($registerH$$, $register_registerL$$)}, 182:{name:"OR A,(" + $index$$52$$ + "+d)", $ast$:$o$$.$OR_X$($registerH$$, $register_registerL$$)}, 190:{name:"CP (" + + $index$$52$$ + "+d)", $ast$:$o$$.$CP_X$($registerH$$, $register_registerL$$)}, 203:"IX" == $index$$52$$ ? $opcodeTableDDCB$$ : $opcodeTableFDCB$$, 225:{name:"POP " + $index$$52$$, $ast$:$o$$.$POP$($registerH$$, $register_registerL$$)}, 227:{name:"EX SP,(" + $index$$52$$ + ")", $ast$:$o$$.$EX_SP_X$($registerH$$, $register_registerL$$)}, 229:{name:"PUSH " + $index$$52$$, $ast$:$o$$.$PUSH$($registerH$$, $register_registerL$$)}, 233:{name:"JP (" + $index$$52$$ + ")", $ast$:$o$$.$JP_X$($registerH$$, + $register_registerL$$)}, 249:{name:"LD SP," + $index$$52$$, $ast$:$o$$.$LD_SP$($registerH$$, $register_registerL$$)}}; } -;$o$$.$LD16$("b", "c", "n", "n"); -$o$$.$LD16$("d", "e", "n", "n"); -$o$$.$LD16$("h", "l", "n", "n"); -$o$$.$LD16$("b", "c"); -$o$$.$LD16$("d", "e"); -$o$$.$LD16$("h", "l"); -$o$$.$LD16$("h", "l", "n", "n"); -$generateIndexTable$$("IX"); -$generateIndexTable$$("IY"); +;var $opcodeTableED$$ = {64:{name:"IN B,(C)", $ast$:$o$$.$IN$("b", "c")}, 66:{name:"SBC HL,BC", $ast$:$o$$.$SBC16$("b", "c")}, 65:{name:"OUT (C),B", $ast$:$o$$.$OUT$("c", "b")}, 67:{name:"LD (nn),BC", $ast$:$o$$.$LD_NN$("b", "c")}, 68:{name:"NEG", $ast$:$o$$.$NEG$()}, 69:{name:"RETN / RETI", $ast$:$o$$.$RETN_RETI$()}, 70:{name:"IM 0", $ast$:$o$$.$IM$(0)}, 72:{name:"IN C,(C)", $ast$:$o$$.$IN$("c", "c")}, 73:{name:"OUT (C),C", $ast$:$o$$.$OUT$("c", "c")}, 74:{name:"ADC HL,BC", $ast$:$o$$.$ADC16$("b", +"c")}, 75:{name:"LD BC,(nn)", $ast$:$o$$.$LD16$("b", "c", "n", "n")}, 76:{name:"NEG", $ast$:$o$$.$NEG$()}, 77:{name:"RETN / RETI", $ast$:$o$$.$RETN_RETI$()}, 78:{name:"IM 0", $ast$:$o$$.$IM$(0)}, 79:{name:"LD R,A", $ast$:$o$$.$LD8$("r", "a")}, 80:{name:"IN D,(C)", $ast$:$o$$.$IN$("d", "c")}, 81:{name:"OUT (C),D", $ast$:$o$$.$OUT$("c", "d")}, 82:{name:"SBC HL,DE", $ast$:$o$$.$SBC16$("d", "e")}, 83:{name:"LD (nn),DE", $ast$:$o$$.$LD_NN$("d", "e")}, 84:{name:"NEG", $ast$:$o$$.$NEG$()}, 85:{name:"RETN / RETI", +$ast$:$o$$.$RETN_RETI$()}, 86:{name:"IM 1", $ast$:$o$$.$IM$(1)}, 87:{name:"LD A,I", $ast$:$o$$.$LD8$("a", "i")}, 88:{name:"IN E,(C)", $ast$:$o$$.$IN$("e", "c")}, 89:{name:"OUT (C),E", $ast$:$o$$.$OUT$("c", "e")}, 90:{name:"ADC HL,DE", $ast$:$o$$.$ADC16$("d", "e")}, 91:{name:"LD DE,(nn)", $ast$:$o$$.$LD16$("d", "e", "n", "n")}, 92:{name:"NEG", $ast$:$o$$.$NEG$()}, 95:{name:"LD A,R", $ast$:$o$$.$LD8$("a", "r")}, 96:{name:"IN H,(C)", $ast$:$o$$.$IN$("h", "c")}, 97:{name:"OUT (C),H", $ast$:$o$$.$OUT$("c", +"h")}, 98:{name:"SBC HL,HL", $ast$:$o$$.$SBC16$("h", "l")}, 99:{name:"LD (nn),HL", $ast$:$o$$.$LD_NN$("h", "l")}, 100:{name:"NEG", $ast$:$o$$.$NEG$()}, 102:{name:"IM 0", $ast$:$o$$.$IM$(0)}, 104:{name:"IN L,(C)", $ast$:$o$$.$IN$("l", "c")}, 105:{name:"OUT (C),L", $ast$:$o$$.$OUT$("c", "l")}, 106:{name:"ADC HL,HL", $ast$:$o$$.$ADC16$("h", "l")}, 107:{name:"LD HL,(nn)", $ast$:$o$$.$LD16$("h", "l", "n", "n")}, 108:{name:"NEG", $ast$:$o$$.$NEG$()}, 110:{name:"IM 0", $ast$:$o$$.$IM$(0)}, 115:{name:"LD (nn),SP", +$ast$:$o$$.$LD_NN$("sp")}, 116:{name:"NEG", $ast$:$o$$.$NEG$()}, 118:{name:"IM 1", $ast$:$o$$.$IM$(1)}, 120:{name:"IN A,(C)", $ast$:$o$$.$IN$("a", "c")}, 121:{name:"OUT (C),A", $ast$:$o$$.$OUT$("c", "a")}, 122:{name:"ADC HL,SP", $ast$:$o$$.$ADC16$("sp")}, 124:{name:"NEG", $ast$:$o$$.$NEG$()}, 160:{name:"LDI", $ast$:$o$$.$LDI$()}, 161:{name:"CPI", $ast$:$o$$.$CPI$()}, 162:{name:"INI", $ast$:$o$$.$INI$()}, 163:{name:"OUTI", $ast$:$o$$.$OUTI$()}, 168:{name:"LDD", $ast$:$o$$.$LDD$()}, 171:{name:"OUTD", +$ast$:$o$$.$OUTD$()}, 176:{name:"LDIR", $ast$:$o$$.$LDIR$()}, 177:{name:"CPIR", $ast$:$o$$.$CPIR$()}, 179:{name:"OTIR", $ast$:$o$$.$OTIR$()}, 184:{name:"LDDR", $ast$:$o$$.$LDDR$()}}; +var $opcodeTable$$ = [{name:"NOP", $ast$:$o$$.$NOOP$()}, {name:"LD BC,nn", $ast$:$o$$.$LD16$("b", "c")}, {name:"LD (BC),A", $ast$:$o$$.$LD_WRITE_MEM$("b", "c", "a")}, {name:"INC BC", $ast$:$o$$.$INC16$("b", "c")}, {name:"INC B", $ast$:$o$$.$INC8$("b")}, {name:"DEC B", $ast$:$o$$.$DEC8$("b")}, {name:"LD B,n", $ast$:$o$$.$LD8$("b")}, {name:"RLCA", $ast$:$o$$.$RLCA$()}, {name:"EX AF AF'", $ast$:$o$$.$EX_AF$()}, {name:"ADD HL,BC", $ast$:$o$$.$ADD16$("h", "l", "b", "c")}, {name:"LD A,(BC)", $ast$:$o$$.$LD8$("a", +"b", "c")}, {name:"DEC BC", $ast$:$o$$.$DEC16$("b", "c")}, {name:"INC C", $ast$:$o$$.$INC8$("c")}, {name:"DEC C", $ast$:$o$$.$DEC8$("c")}, {name:"LD C,n", $ast$:$o$$.$LD8$("c")}, {name:"RRCA", $ast$:$o$$.$RRCA$()}, {name:"DJNZ (PC+e)", $ast$:$o$$.$DJNZ$()}, {name:"LD DE,nn", $ast$:$o$$.$LD16$("d", "e")}, {name:"LD (DE),A", $ast$:$o$$.$LD_WRITE_MEM$("d", "e", "a")}, {name:"INC DE", $ast$:$o$$.$INC16$("d", "e")}, {name:"INC D", $ast$:$o$$.$INC8$("d")}, {name:"DEC D", $ast$:$o$$.$DEC8$("d")}, {name:"LD D,n", +$ast$:$o$$.$LD8$("d")}, {name:"RLA", $ast$:$o$$.$RLA$()}, {name:"JR (PC+e)", $ast$:$o$$.$JP$()}, {name:"ADD HL,DE", $ast$:$o$$.$ADD16$("h", "l", "d", "e")}, {name:"LD A,(DE)", $ast$:$o$$.$LD8$("a", "d", "e")}, {name:"DEC DE", $ast$:$o$$.$DEC16$("d", "e")}, {name:"INC E", $ast$:$o$$.$INC8$("e")}, {name:"DEC E", $ast$:$o$$.$DEC8$("e")}, {name:"LD E,n", $ast$:$o$$.$LD8$("e")}, {name:"RRA", $ast$:$o$$.$RRA$()}, {name:"JR NZ,(PC+e)", $ast$:$o$$.$JRNZ$()}, {name:"LD HL,nn", $ast$:$o$$.$LD16$("h", "l")}, +{name:"LD (nn),HL", $ast$:$o$$.$LD_NN$("h", "l")}, {name:"INC HL", $ast$:$o$$.$INC16$("h", "l")}, {name:"INC H", $ast$:$o$$.$INC8$("h")}, {name:"DEC H", $ast$:$o$$.$DEC8$("h")}, {name:"LD H,n", $ast$:$o$$.$LD8$("h")}, {name:"DAA", $ast$:$o$$.$DAA$()}, {name:"JR Z,(PC+e)", $ast$:$o$$.$JRZ$()}, {name:"ADD HL,HL", $ast$:$o$$.$ADD16$("h", "l", "h", "l")}, {name:"LD HL,(nn)", $ast$:$o$$.$LD16$("h", "l", "n", "n")}, {name:"DEC HL", $ast$:$o$$.$DEC16$("h", "l")}, {name:"INC L", $ast$:$o$$.$INC8$("l")}, +{name:"DEC L", $ast$:$o$$.$DEC8$("l")}, {name:"LD L,n", $ast$:$o$$.$LD8$("l")}, {name:"CPL", $ast$:$o$$.$CPL$()}, {name:"JR NC,(PC+e)", $ast$:$o$$.$JRNC$()}, {name:"LD SP,nn", $ast$:$o$$.$LD_SP$()}, {name:"LD (nn),A", $ast$:$o$$.$LD_WRITE_MEM$("n", "n", "a")}, {name:"INC SP", $ast$:$o$$.$INC8$("s", "p")}, {name:"INC (HL)", $ast$:$o$$.$INC8$("h", "l")}, {name:"DEC (HL)", $ast$:$o$$.$DEC8$("h", "l")}, {name:"LD (HL),n", $ast$:$o$$.$LD_WRITE_MEM$("h", "l")}, {name:"SCF", $ast$:$o$$.$SCF$()}, {name:"JR C,(PC+e)", +$ast$:$o$$.$JRC$()}, {name:"ADD HL,SP", $ast$:$o$$.$ADD16$("h", "l", "sp")}, {name:"LD A,(nn)", $ast$:$o$$.$LD8$("a", "n", "n")}, {name:"DEC SP", $ast$:$o$$.$DEC8$("s", "p")}, {name:"INC A", $ast$:$o$$.$INC8$("a")}, {name:"DEC A", $ast$:$o$$.$DEC8$("a")}, {name:"LD A,n", $ast$:$o$$.$LD8$("a")}, {name:"CCF", $ast$:$o$$.$CCF$()}, {name:"LD B,B", $ast$:$o$$.$NOOP$()}, {name:"LD B,C", $ast$:$o$$.$LD8$("b", "c")}, {name:"LD B,D", $ast$:$o$$.$LD8$("b", "d")}, {name:"LD B,E", $ast$:$o$$.$LD8$("b", "e")}, +{name:"LD B,H", $ast$:$o$$.$LD8$("b", "h")}, {name:"LD B,L", $ast$:$o$$.$LD8$("b", "l")}, {name:"LD B,(HL)", $ast$:$o$$.$LD8$("b", "h", "l")}, {name:"LD B,A", $ast$:$o$$.$LD8$("b", "a")}, {name:"LD C,B", $ast$:$o$$.$LD8$("c", "b")}, {name:"LD C,C", $ast$:$o$$.$NOOP$()}, {name:"LD C,D", $ast$:$o$$.$LD8$("c", "d")}, {name:"LD C,E", $ast$:$o$$.$LD8$("c", "e")}, {name:"LD C,H", $ast$:$o$$.$LD8$("c", "h")}, {name:"LD C,L", $ast$:$o$$.$LD8$("c", "l")}, {name:"LD C,(HL)", $ast$:$o$$.$LD8$("c", "h", "l")}, +{name:"LD C,A", $ast$:$o$$.$LD8$("c", "a")}, {name:"LD D,B", $ast$:$o$$.$LD8$("d", "b")}, {name:"LD D,C", $ast$:$o$$.$LD8$("d", "c")}, {name:"LD D,D", $ast$:$o$$.$NOOP$()}, {name:"LD D,E", $ast$:$o$$.$LD8$("d", "e")}, {name:"LD D,H", $ast$:$o$$.$LD8$("d", "h")}, {name:"LD D,L", $ast$:$o$$.$LD8$("d", "l")}, {name:"LD D,(HL)", $ast$:$o$$.$LD8$("d", "h", "l")}, {name:"LD D,A", $ast$:$o$$.$LD8$("d", "a")}, {name:"LD E,B", $ast$:$o$$.$LD8$("e", "b")}, {name:"LD E,C", $ast$:$o$$.$LD8$("e", "c")}, {name:"LD E,D", +$ast$:$o$$.$LD8$("e", "d")}, {name:"LD E,E", $ast$:$o$$.$NOOP$()}, {name:"LD E,H", $ast$:$o$$.$LD8$("e", "h")}, {name:"LD E,L", $ast$:$o$$.$LD8$("e", "l")}, {name:"LD E,(HL)", $ast$:$o$$.$LD8$("e", "h", "l")}, {name:"LD E,A", $ast$:$o$$.$LD8$("e", "a")}, {name:"LD H,B", $ast$:$o$$.$LD8$("h", "b")}, {name:"LD H,C", $ast$:$o$$.$LD8$("h", "c")}, {name:"LD H,D", $ast$:$o$$.$LD8$("h", "d")}, {name:"LD H,E", $ast$:$o$$.$LD8$("h", "e")}, {name:"LD H,H", $ast$:$o$$.$NOOP$()}, {name:"LD H,L", $ast$:$o$$.$LD8$("h", +"l")}, {name:"LD H,(HL)", $ast$:$o$$.$LD8$("h", "h", "l")}, {name:"LD H,A", $ast$:$o$$.$LD8$("h", "a")}, {name:"LD L,B", $ast$:$o$$.$LD8$("l", "b")}, {name:"LD L,C", $ast$:$o$$.$LD8$("l", "c")}, {name:"LD L,D", $ast$:$o$$.$LD8$("l", "d")}, {name:"LD L,E", $ast$:$o$$.$LD8$("l", "e")}, {name:"LD L,H", $ast$:$o$$.$LD8$("l", "h")}, {name:"LD L,L", $ast$:$o$$.$NOOP$()}, {name:"LD L,(HL)", $ast$:$o$$.$LD8$("l", "h", "l")}, {name:"LD L,A", $ast$:$o$$.$LD8$("l", "a")}, {name:"LD (HL),B", $ast$:$o$$.$LD_WRITE_MEM$("h", +"l", "b")}, {name:"LD (HL),C", $ast$:$o$$.$LD_WRITE_MEM$("h", "l", "c")}, {name:"LD (HL),D", $ast$:$o$$.$LD_WRITE_MEM$("h", "l", "d")}, {name:"LD (HL),E", $ast$:$o$$.$LD_WRITE_MEM$("h", "l", "e")}, {name:"LD (HL),H", $ast$:$o$$.$LD_WRITE_MEM$("h", "l", "h")}, {name:"LD (HL),L", $ast$:$o$$.$LD_WRITE_MEM$("h", "l", "l")}, {name:"HALT", $ast$:$o$$.$HALT$()}, {name:"LD (HL),A", $ast$:$o$$.$LD_WRITE_MEM$("h", "l", "a")}, {name:"LD A,B", $ast$:$o$$.$LD8$("a", "b")}, {name:"LD A,C", $ast$:$o$$.$LD8$("a", +"c")}, {name:"LD A,D", $ast$:$o$$.$LD8$("a", "d")}, {name:"LD A,E", $ast$:$o$$.$LD8$("a", "e")}, {name:"LD A,H", $ast$:$o$$.$LD8$("a", "h")}, {name:"LD A,L", $ast$:$o$$.$LD8$("a", "l")}, {name:"LD A,(HL)", $ast$:$o$$.$LD8$("a", "h", "l")}, {name:"LD A,A", $ast$:$o$$.$NOOP$()}, {name:"ADD A,B", $ast$:$o$$.$ADD$("b")}, {name:"ADD A,C", $ast$:$o$$.$ADD$("c")}, {name:"ADD A,D", $ast$:$o$$.$ADD$("d")}, {name:"ADD A,E", $ast$:$o$$.$ADD$("e")}, {name:"ADD A,H", $ast$:$o$$.$ADD$("h")}, {name:"ADD A,L", $ast$:$o$$.$ADD$("l")}, +{name:"ADD A,(HL)", $ast$:$o$$.$ADD$("h", "l")}, {name:"ADD A,A", $ast$:$o$$.$ADD$("a")}, {name:"ADC A,B", $ast$:$o$$.$ADC$("b")}, {name:"ADC A,C", $ast$:$o$$.$ADC$("c")}, {name:"ADC A,D", $ast$:$o$$.$ADC$("d")}, {name:"ADC A,E", $ast$:$o$$.$ADC$("e")}, {name:"ADC A,H", $ast$:$o$$.$ADC$("h")}, {name:"ADC A,L", $ast$:$o$$.$ADC$("l")}, {name:"ADC A,(HL)", $ast$:$o$$.$ADC$("h", "l")}, {name:"ADC A,A", $ast$:$o$$.$ADC$("a")}, {name:"SUB A,B", $ast$:$o$$.$SUB$("b")}, {name:"SUB A,C", $ast$:$o$$.$SUB$("c")}, +{name:"SUB A,D", $ast$:$o$$.$SUB$("d")}, {name:"SUB A,E", $ast$:$o$$.$SUB$("e")}, {name:"SUB A,H", $ast$:$o$$.$SUB$("h")}, {name:"SUB A,L", $ast$:$o$$.$SUB$("l")}, {name:"SUB A,(HL)", $ast$:$o$$.$SUB$("h", "l")}, {name:"SUB A,A", $ast$:$o$$.$SUB$("a")}, {name:"SBC A,B", $ast$:$o$$.$SBC$("b")}, {name:"SBC A,C", $ast$:$o$$.$SBC$("c")}, {name:"SBC A,D", $ast$:$o$$.$SBC$("d")}, {name:"SBC A,E", $ast$:$o$$.$SBC$("e")}, {name:"SBC A,H", $ast$:$o$$.$SBC$("h")}, {name:"SBC A,L", $ast$:$o$$.$SBC$("l")}, {name:"SBC A,(HL)", +$ast$:$o$$.$SBC$("h", "l")}, {name:"SBC A,A", $ast$:$o$$.$SBC$("a")}, {name:"AND A,B", $ast$:$o$$.$AND$("b")}, {name:"AND A,C", $ast$:$o$$.$AND$("c")}, {name:"AND A,D", $ast$:$o$$.$AND$("d")}, {name:"AND A,E", $ast$:$o$$.$AND$("e")}, {name:"AND A,H", $ast$:$o$$.$AND$("h")}, {name:"AND A,L", $ast$:$o$$.$AND$("l")}, {name:"AND A,(HL)", $ast$:$o$$.$AND$("h", "l")}, {name:"AND A,A", $ast$:$o$$.$AND$("a")}, {name:"XOR A,B", $ast$:$o$$.$XOR$("b")}, {name:"XOR A,C", $ast$:$o$$.$XOR$("c")}, {name:"XOR A,D", +$ast$:$o$$.$XOR$("d")}, {name:"XOR A,E", $ast$:$o$$.$XOR$("e")}, {name:"XOR A,H", $ast$:$o$$.$XOR$("h")}, {name:"XOR A,L", $ast$:$o$$.$XOR$("l")}, {name:"XOR A,(HL)", $ast$:$o$$.$XOR$("h", "l")}, {name:"XOR A,A", $ast$:$o$$.$XOR$("a")}, {name:"OR A,B", $ast$:$o$$.$OR$("b")}, {name:"OR A,C", $ast$:$o$$.$OR$("c")}, {name:"OR A,D", $ast$:$o$$.$OR$("d")}, {name:"OR A,E", $ast$:$o$$.$OR$("e")}, {name:"OR A,H", $ast$:$o$$.$OR$("h")}, {name:"OR A,L", $ast$:$o$$.$OR$("l")}, {name:"OR A,(HL)", $ast$:$o$$.$OR$("h", +"l")}, {name:"OR A,A", $ast$:$o$$.$OR$("a")}, {name:"CP A,B", $ast$:$o$$.$CP$("b")}, {name:"CP A,C", $ast$:$o$$.$CP$("c")}, {name:"CP A,D", $ast$:$o$$.$CP$("d")}, {name:"CP A,E", $ast$:$o$$.$CP$("e")}, {name:"CP A,H", $ast$:$o$$.$CP$("h")}, {name:"CP A,L", $ast$:$o$$.$CP$("l")}, {name:"CP A,(HL)", $ast$:$o$$.$CP$("h", "l")}, {name:"CP A,A", $ast$:$o$$.$CP$("a")}, {name:"RET NZ", $ast$:$o$$.$RET$("==", 64)}, {name:"POP BC", $ast$:$o$$.$POP$("b", "c")}, {name:"JP NZ,(nn)", $ast$:$o$$.$JP$("==", 64)}, +{name:"JP (nn)", $ast$:$o$$.$JP$()}, {name:"CALL NZ (nn)", $ast$:$o$$.$CALL$("==", 64)}, {name:"PUSH BC", $ast$:$o$$.$PUSH$("b", "c")}, {name:"ADD A,n", $ast$:$o$$.$ADD$()}, {name:"RST 0x00", $ast$:$o$$.$RST$(0)}, {name:"RET Z", $ast$:$o$$.$RET$("!=", 64)}, {name:"RET", $ast$:$o$$.$RET$()}, {name:"JP Z,(nn)", $ast$:$o$$.$JP$("!=", 64)}, $opcodeTableCB$$, {name:"CALL Z (nn)", $ast$:$o$$.$CALL$("!=", 64)}, {name:"CALL (nn)", $ast$:$o$$.$CALL$()}, {name:"ADC A,n", $ast$:$o$$.$ADC$()}, {name:"RST 0x08", +$ast$:$o$$.$RST$(8)}, {name:"RET NC", $ast$:$o$$.$RET$("==", 1)}, {name:"POP DE", $ast$:$o$$.$POP$("d", "e")}, {name:"JP NC,(nn)", $ast$:$o$$.$JP$("==", 1)}, {name:"OUT (n),A", $ast$:$o$$.$OUT$("a")}, {name:"CALL NC (nn)", $ast$:$o$$.$CALL$("==", 1)}, {name:"PUSH DE", $ast$:$o$$.$PUSH$("d", "e")}, {name:"SUB n", $ast$:$o$$.$SUB$()}, {name:"RST 0x10", $ast$:$o$$.$RST$(16)}, {name:"RET C", $ast$:$o$$.$RET$("!=", 1)}, {name:"EXX", $ast$:$o$$.$EXX$()}, {name:"JP C,(nn)", $ast$:$o$$.$JP$("!=", 1)}, {name:"IN A,(n)", +$ast$:$o$$.$IN$("a")}, {name:"CALL C (nn)", $ast$:$o$$.$CALL$("!=", 1)}, $generateIndexTable$$("IX"), {name:"SBC A,n", $ast$:$o$$.$SBC$()}, {name:"RST 0x18", $ast$:$o$$.$RST$(24)}, {name:"RET PO", $ast$:$o$$.$RET$("==", 4)}, {name:"POP HL", $ast$:$o$$.$POP$("h", "l")}, {name:"JP PO,(nn)", $ast$:$o$$.$JP$("==", 4)}, {name:"EX (SP),HL", $ast$:$o$$.$EX_SP_HL$()}, {name:"CALL PO (nn)", $ast$:$o$$.$CALL$("==", 4)}, {name:"PUSH HL", $ast$:$o$$.$PUSH$("h", "l")}, {name:"AND (n)", $ast$:$o$$.$AND$()}, {name:"RST 0x20", +$ast$:$o$$.$RST$(32)}, {name:"RET PE", $ast$:$o$$.$RET$("!=", 4)}, {name:"JP (HL)", $ast$:$o$$.$JP$("h", "l")}, {name:"JP PE,(nn)", $ast$:$o$$.$JP$("!=", 4)}, {name:"EX DE,HL", $ast$:$o$$.$EX_DE_HL$()}, {name:"CALL PE (nn)", $ast$:$o$$.$CALL$("!=", 4)}, $opcodeTableED$$, {name:"XOR n", $ast$:$o$$.$XOR$()}, {name:"RST 0x28", $ast$:$o$$.$RST$(40)}, {name:"RET P", $ast$:$o$$.$RET$("==", 128)}, {name:"POP AF", $ast$:$o$$.$POP$("a", "f")}, {name:"JP P,(nn)", $ast$:$o$$.$JP$("==", 128)}, {name:"DI", $ast$:$o$$.$DI$()}, +{name:"CALL P (nn)", $ast$:$o$$.$CALL$("==", 128)}, {name:"PUSH AF", $ast$:$o$$.$PUSH$("a", "f")}, {name:"OR n", $ast$:$o$$.$OR$()}, {name:"RST 0x30", $ast$:$o$$.$RST$(48)}, {name:"RET M", $ast$:$o$$.$RET$("!=", 128)}, {name:"LD SP,HL", $ast$:$o$$.$LD_SP$("h", "l")}, {name:"JP M,(nn)", $ast$:$o$$.$JP$("!=", 128)}, {name:"EI", $ast$:$o$$.$EI$()}, {name:"CALL M (nn)", $ast$:$o$$.$CALL$("!=", 128)}, $generateIndexTable$$("IY"), {name:"CP n", $ast$:$o$$.$CP$()}, {name:"RST 0x38", $ast$:$o$$.$RST$(56)}]; +var $Analyzer$$ = function() { + function $Analyzer$$1$$() { + this.$bytecodes$ = {}; + this.$ast$ = []; + this.$missingOpcodes$ = {}; + } + $Analyzer$$1$$.prototype = {$analyze$:function $$Analyzer$$1$$$$$analyze$$($bytecodes$$) { + var $i$$34$$ = 0; + this.$bytecodes$ = $bytecodes$$; + this.$ast$ = Array(this.$bytecodes$.length); + $JSSMS$Utils$console$time$$("Analyzing"); + for ($i$$34$$ = 0;$i$$34$$ < this.$bytecodes$.length;$i$$34$$++) { + this.$a$($i$$34$$), this.$f$($i$$34$$); + } + $JSSMS$Utils$console$timeEnd$$("Analyzing"); + for ($i$$34$$ in this.$missingOpcodes$) { + console.error("Missing opcode", $i$$34$$, this.$missingOpcodes$[$i$$34$$]); + } + }, $analyzeFromAddress$:function $$Analyzer$$1$$$$$analyzeFromAddress$$($bytecodes$$1$$) { + this.$bytecodes$ = [$bytecodes$$1$$]; + this.$ast$ = []; + this.$missingOpcodes$ = {}; + this.$a$(0); + this.$bytecodes$[0][this.$bytecodes$[0].length - 1].$isFunctionEnder$ = !0; + this.$ast$ = [this.$bytecodes$]; + for (var $i$$35$$ in this.$missingOpcodes$) { + console.error("Missing opcode", $i$$35$$, this.$missingOpcodes$[$i$$35$$]); + } + }, $a$:function $$Analyzer$$1$$$$$a$$($page$$5$$) { + var $self$$6$$ = this; + this.$bytecodes$[$page$$5$$] = this.$bytecodes$[$page$$5$$].map(function($bytecode$$7$$) { + var $i$$36_opcode$$18$$; + switch($bytecode$$7$$.$opcode$.length) { + case 1: + $i$$36_opcode$$18$$ = $opcodeTable$$[$bytecode$$7$$.$opcode$[0]]; + break; + case 2: + $i$$36_opcode$$18$$ = $opcodeTable$$[$bytecode$$7$$.$opcode$[0]][$bytecode$$7$$.$opcode$[1]]; + break; + case 3: + $i$$36_opcode$$18$$ = $opcodeTable$$[$bytecode$$7$$.$opcode$[0]][$bytecode$$7$$.$opcode$[1]][$bytecode$$7$$.$opcode$[2]]; + break; + default: + $JSSMS$Utils$console$error$$("Something went wrong in parsing. Opcode: [" + $bytecode$$7$$.$opcode$.join(" ") + "]"); + } + if ($i$$36_opcode$$18$$ && $i$$36_opcode$$18$$.$ast$) { + var $ast$$ = $i$$36_opcode$$18$$.$ast$($bytecode$$7$$.$operand$, $bytecode$$7$$.target, $bytecode$$7$$.$nextAddress$); + Array.isArray($ast$$) || void 0 === $ast$$ || ($ast$$ = [$ast$$]); + $bytecode$$7$$.$ast$ = $ast$$; + $DEBUG$$ && ($bytecode$$7$$.name = $i$$36_opcode$$18$$.name, $i$$36_opcode$$18$$.$opcode$ && ($bytecode$$7$$.$opcode$ = $i$$36_opcode$$18$$.$opcode$($bytecode$$7$$.$operand$, $bytecode$$7$$.target, $bytecode$$7$$.$nextAddress$))); + } else { + $i$$36_opcode$$18$$ = $bytecode$$7$$.$hexOpcode$, $self$$6$$.$missingOpcodes$[$i$$36_opcode$$18$$] = void 0 !== $self$$6$$.$missingOpcodes$[$i$$36_opcode$$18$$] ? $self$$6$$.$missingOpcodes$[$i$$36_opcode$$18$$] + 1 : 1; + } + return $bytecode$$7$$; + }); + }, $f$:function $$Analyzer$$1$$$$$f$$($page$$6$$) { + this.$ast$[$page$$6$$] = []; + var $self$$7$$ = this, $pointer$$ = -1, $startNewFunction$$ = !0, $prevBytecode$$ = {}; + this.$bytecodes$[$page$$6$$].forEach(function($bytecode$$8$$) { + if ($bytecode$$8$$.$isJumpTarget$ || $startNewFunction$$) { + $pointer$$++, $self$$7$$.$ast$[$page$$6$$][$pointer$$] = [], $startNewFunction$$ = !1, $prevBytecode$$.$isFunctionEnder$ = !0; + } + $self$$7$$.$ast$[$page$$6$$][$pointer$$].push($bytecode$$8$$); + $bytecode$$8$$.$isFunctionEnder$ && ($startNewFunction$$ = !0); + $prevBytecode$$ = $bytecode$$8$$; + }); + }}; + return $Analyzer$$1$$; +}(); +var $Optimizer$$ = function() { + function $Optimizer$$1$$() { + this.$ast$ = []; + } + $Optimizer$$1$$.prototype = {$optimize$:function $$Optimizer$$1$$$$$optimize$$($functions_i$$37$$) { + this.$ast$ = $functions_i$$37$$; + for ($functions_i$$37$$ = 0;$functions_i$$37$$ < this.$ast$.length;$functions_i$$37$$++) { + this.$g$($functions_i$$37$$); + } + }, $g$:function $$Optimizer$$1$$$$$g$$($page$$7$$) { + this.$ast$[$page$$7$$] = this.$ast$[$page$$7$$].map(this.$a$); + this.$ast$[$page$$7$$] = this.$ast$[$page$$7$$].map(this.$f$); + }, $a$:function $$Optimizer$$1$$$$$a$$($fn$$5$$) { + return $fn$$5$$.map(function($bytecodes$$2$$) { + var $ast$$1$$ = $bytecodes$$2$$.$ast$; + if (!$ast$$1$$) { + return $bytecodes$$2$$; + } + $bytecodes$$2$$.$ast$ = $JSSMS$Utils$traverse$$($ast$$1$$, function($ast$$2$$) { + if ("BinaryExpression" == $ast$$2$$.type && "Literal" == $ast$$2$$.left.type && "Literal" == $ast$$2$$.right.type) { + var $value$$159$$ = 0; + switch($ast$$2$$.$operator$) { + case ">>": + $value$$159$$ = $ast$$2$$.left.value >> $ast$$2$$.right.value; + break; + case "&": + $value$$159$$ = $ast$$2$$.left.value & $ast$$2$$.right.value; + break; + default: + return $JSSMS$Utils$console$log$$("Unimplemented evaluation optimization for operator", $ast$$2$$.$operator$), $ast$$2$$; + } + $ast$$2$$.type = "Literal"; + $ast$$2$$.value = $value$$159$$; + $ast$$2$$.$raw$ = $DEBUG$$ ? $JSSMS$Utils$toHex$$($value$$159$$) : "" + $value$$159$$; + delete $ast$$2$$.right; + delete $ast$$2$$.left; + } + return $ast$$2$$; + }); + return $bytecodes$$2$$; + }); + }, $f$:function $$Optimizer$$1$$$$$f$$($fn$$6$$) { + var $definedReg$$ = {$b$:!1, $c$:!1, $d$:!1, $e$:!1, $h$:!1, $l$:!1}, $definedRegValue$$ = {$b$:{}, $c$:{}, $d$:{}, $e$:{}, $h$:{}, $l$:{}}; + return $fn$$6$$.map(function($bytecodes$$3$$) { + var $ast$$3$$ = $bytecodes$$3$$.$ast$; + if (!$ast$$3$$) { + return $bytecodes$$3$$; + } + $bytecodes$$3$$.$ast$ = $JSSMS$Utils$traverse$$($ast$$3$$, function($ast$$4$$) { + "AssignmentExpression" == $ast$$4$$.type && "=" == $ast$$4$$.$operator$ && "Register" == $ast$$4$$.left.type && "Literal" == $ast$$4$$.right.type && "a" != $ast$$4$$.left.name && "f" != $ast$$4$$.left.name && ($definedReg$$[$ast$$4$$.left.name] = !0, $definedRegValue$$[$ast$$4$$.left.name] = $ast$$4$$.right); + if ("AssignmentExpression" == $ast$$4$$.type && "Register" == $ast$$4$$.left.type && "Literal" != $ast$$4$$.right.type && "a" != $ast$$4$$.left.name && "f" != $ast$$4$$.left.name) { + return $definedReg$$[$ast$$4$$.left.name] = !1, $definedRegValue$$[$ast$$4$$.left.name] = {}, $ast$$4$$; + } + if ("CallExpression" == $ast$$4$$.type) { + return $ast$$4$$.arguments[0] && "Register" == $ast$$4$$.arguments[0].type && $definedReg$$[$ast$$4$$.arguments[0].name] && "a" != $ast$$4$$.arguments[0].name && "f" != $ast$$4$$.arguments[0].name && ($ast$$4$$.arguments[0] = $definedRegValue$$[$ast$$4$$.arguments[0].name]), $ast$$4$$.arguments[1] && "Register" == $ast$$4$$.arguments[1].type && $definedReg$$[$ast$$4$$.arguments[1].name] && "a" != $ast$$4$$.arguments[1].name && "f" != $ast$$4$$.arguments[1].name && ($ast$$4$$.arguments[1] = + $definedRegValue$$[$ast$$4$$.arguments[1].name]), $ast$$4$$; + } + if ("MemberExpression" == $ast$$4$$.type && "Register" == $ast$$4$$.$property$.type && $definedReg$$[$ast$$4$$.$property$.name] && "a" != $ast$$4$$.$property$.name && "f" != $ast$$4$$.$property$.name) { + return $ast$$4$$.$property$ = $definedRegValue$$[$ast$$4$$.$property$.name], $ast$$4$$; + } + "BinaryExpression" == $ast$$4$$.type && ("Register" == $ast$$4$$.right.type && $definedReg$$[$ast$$4$$.right.name] && "a" != $ast$$4$$.right.name && "f" != $ast$$4$$.right.name && ($ast$$4$$.right = $definedRegValue$$[$ast$$4$$.right.name]), "Register" == $ast$$4$$.left.type && $definedReg$$[$ast$$4$$.left.name] && "a" != $ast$$4$$.left.name && "f" != $ast$$4$$.left.name && ($ast$$4$$.left = $definedRegValue$$[$ast$$4$$.left.name])); + return $ast$$4$$; + }); + return $bytecodes$$3$$; + }); + }}; + return $Optimizer$$1$$; +}(); +var $Generator$$ = function() { + function $Generator$$1$$() { + this.$ast$ = []; + } + function $getTotalTStates$$1$$($opcodes$$1$$) { + switch($opcodes$$1$$[0]) { + case 203: + return $OP_CB_STATES$$[$opcodes$$1$$[1]]; + case 221: + ; + case 253: + return 2 == $opcodes$$1$$.length ? $OP_DD_STATES$$[$opcodes$$1$$[1]] : $OP_INDEX_CB_STATES$$[$opcodes$$1$$[2]]; + case 237: + return $OP_ED_STATES$$[$opcodes$$1$$[1]]; + default: + return $OP_STATES$$[$opcodes$$1$$[0]]; + } + } + function $convertRegisters$$($ast$$5$$) { + return $JSSMS$Utils$traverse$$($ast$$5$$, function($node$$4$$) { + "Register" == $node$$4$$.type && ($node$$4$$.type = "Identifier"); + return $node$$4$$; + }); + } + var $whitelist$$ = "page temp location val value JSSMS.Utils.rndInt".split(" "); + $Generator$$1$$.prototype = {$generate$:function $$Generator$$1$$$$$generate$$($functions$$1$$) { + for (var $page$$8$$ = 0;$page$$8$$ < $functions$$1$$.length;$page$$8$$++) { + $functions$$1$$[$page$$8$$] = $functions$$1$$[$page$$8$$].map(function($fn$$7$$) { + var $body$$2$$ = [{type:"ExpressionStatement", expression:{type:"Literal", value:"use strict", raw:'"use strict"'}}], $name$$65$$ = $fn$$7$$[0].$address$, $tstates$$2$$ = 0; + $fn$$7$$ = $fn$$7$$.map(function($bytecode$$9$$) { + void 0 === $bytecode$$9$$.$ast$ && ($bytecode$$9$$.$ast$ = []); + $tstates$$2$$ += $getTotalTStates$$1$$($bytecode$$9$$.$opcode$); + var $decreaseTStateStmt_nextAddress$$44_updatePcStmt$$ = [{type:"ExpressionStatement", expression:{type:"AssignmentExpression", operator:"-=", left:{type:"Identifier", name:"tstates"}, right:{type:"Literal", value:$tstates$$2$$, raw:$DEBUG$$ ? $JSSMS$Utils$toHex$$($tstates$$2$$) : "" + $tstates$$2$$}}}]; + $tstates$$2$$ = 0; + $bytecode$$9$$.$ast$ = [].concat($decreaseTStateStmt_nextAddress$$44_updatePcStmt$$, $bytecode$$9$$.$ast$); + $bytecode$$9$$.$isFunctionEnder$ && null !== $bytecode$$9$$.$nextAddress$ && ($decreaseTStateStmt_nextAddress$$44_updatePcStmt$$ = $bytecode$$9$$.$nextAddress$ % 16384, $decreaseTStateStmt_nextAddress$$44_updatePcStmt$$ = {type:"ExpressionStatement", expression:{type:"AssignmentExpression", operator:"=", left:{type:"Identifier", name:"pc"}, right:{type:"BinaryExpression", operator:"+", left:{type:"Literal", value:$decreaseTStateStmt_nextAddress$$44_updatePcStmt$$, raw:$DEBUG$$ ? $JSSMS$Utils$toHex$$($decreaseTStateStmt_nextAddress$$44_updatePcStmt$$) : + "" + $decreaseTStateStmt_nextAddress$$44_updatePcStmt$$}, right:{type:"BinaryExpression", operator:"*", left:{type:"Identifier", name:"page"}, right:{type:"Literal", value:16384, raw:"0x4000"}}}}}, $bytecode$$9$$.$ast$.push($decreaseTStateStmt_nextAddress$$44_updatePcStmt$$)); + $DEBUG$$ && $bytecode$$9$$.$ast$[0] && ($bytecode$$9$$.$ast$[0].$leadingComments$ = [{type:"Line", value:" " + $bytecode$$9$$.label}]); + return $bytecode$$9$$.$ast$; + }); + $fn$$7$$.forEach(function($ast$$6$$) { + $body$$2$$ = $body$$2$$.concat($ast$$6$$); + }); + $body$$2$$ = $convertRegisters$$($body$$2$$); + $body$$2$$ = $JSSMS$Utils$traverse$$($body$$2$$, function($obj$$38$$) { + $obj$$38$$.type && "Identifier" == $obj$$38$$.type && -1 == $whitelist$$.indexOf($obj$$38$$.name) && ($obj$$38$$.name = "this." + $obj$$38$$.name); + return $obj$$38$$; + }); + return{type:"Program", body:[{type:"FunctionDeclaration", id:{type:"Identifier", name:$name$$65$$}, params:[{type:"Identifier", name:"page"}, {type:"Identifier", name:"temp"}, {type:"Identifier", name:"location"}], defaults:[], body:{type:"BlockStatement", body:$body$$2$$}, rest:null, generator:!1, expression:!1}]}; + }); + } + this.$ast$ = $functions$$1$$; + }}; + return $Generator$$1$$; +}(); +var $Recompiler$$ = function() { + function $Recompiler$$1$$($cpu$$) { + this.$cpu$ = $cpu$$; + this.$rom$ = []; + this.options = {}; + this.$parser$ = {}; + this.$analyzer$ = new $Analyzer$$; + this.$optimizer$ = new $Optimizer$$; + this.$generator$ = new $Generator$$; + this.$bytecodes$ = {}; + } + $Recompiler$$1$$.prototype = {$g$:function $$Recompiler$$1$$$$$g$$($rom$$2$$) { + this.$rom$ = $rom$$2$$; + this.$parser$ = new $Parser$$($rom$$2$$, this.$cpu$.$frameReg$); + }, reset:function $$Recompiler$$1$$$$reset$() { + var $self$$8$$ = this; + this.options.$entryPoints$ = [{$address$:0, $romPage$:0, $memPage$:0}, {$address$:56, $romPage$:0, $memPage$:0}, {$address$:102, $romPage$:0, $memPage$:0}]; + 2 >= this.$rom$.length ? $JSSMS$Utils$console$log$$("Parsing full ROM") : (this.options.$pageLimit$ = 0, $JSSMS$Utils$console$log$$("Parsing initial memory page of ROM")); + for (var $fns$$ = this.parse().$analyze$().$optimize$().$generate$(), $page$$9$$ = 0;$page$$9$$ < this.$rom$.length;$page$$9$$++) { + $fns$$[$page$$9$$].forEach(function($fn$$8$$) { + var $funcName$$ = $fn$$8$$.body[0].id.name; + $DEBUG$$ && ($fn$$8$$.body[0].id.name = "_" + $JSSMS$Utils$toHex$$($funcName$$)); + $self$$8$$.$cpu$.$branches$[$page$$9$$][$funcName$$] = (new Function("return " + $self$$8$$.$f$($fn$$8$$)))(); + }); + } + }, parse:function $$Recompiler$$1$$$$parse$() { + var $self$$9$$ = this; + this.options.$entryPoints$.forEach(function($entryPoint$$3$$) { + $self$$9$$.$parser$.$addEntryPoint$($entryPoint$$3$$); + }); + this.$parser$.parse(this.options.$pageLimit$); + return this; + }, $analyze$:function $$Recompiler$$1$$$$$analyze$$() { + this.$analyzer$.$analyze$(this.$parser$.$bytecodes$); + return this; + }, $optimize$:function $$Recompiler$$1$$$$$optimize$$() { + this.$optimizer$.$optimize$(this.$analyzer$.$ast$); + return this; + }, $generate$:function $$Recompiler$$1$$$$$generate$$() { + this.$generator$.$generate$(this.$optimizer$.$ast$); + return this.$generator$.$ast$; + }, $a$:function $$Recompiler$$1$$$$$a$$($address$$24$$, $romPage$$3$$, $memPage$$1$$) { + var $self$$10$$ = this; + this.$parseFromAddress$($address$$24$$, $romPage$$3$$, $memPage$$1$$).$analyzeFromAddress$().$optimize$().$generate$()[0].forEach(function($fn$$9$$) { + $DEBUG$$ && ($fn$$9$$.body[0].id.name = "_" + $JSSMS$Utils$toHex$$($fn$$9$$.body[0].id.name)); + $self$$10$$.$cpu$.$branches$[$romPage$$3$$][$address$$24$$ % 16384] = (new Function("return " + $self$$10$$.$f$($fn$$9$$)))(); + }); + }, $parseFromAddress$:function $$Recompiler$$1$$$$$parseFromAddress$$($address$$25_obj$$39$$, $romPage$$4$$, $memPage$$2$$) { + $address$$25_obj$$39$$ = {$address$:$address$$25_obj$$39$$, $romPage$:$romPage$$4$$, $memPage$:$memPage$$2$$}; + this.$parser$.$entryPoints$.push($address$$25_obj$$39$$); + this.$bytecodes$ = this.$parser$.$parseFromAddress$($address$$25_obj$$39$$); + return this; + }, $analyzeFromAddress$:function $$Recompiler$$1$$$$$analyzeFromAddress$$() { + this.$analyzer$.$analyzeFromAddress$(this.$bytecodes$); + return this; + }, $f$:function $$Recompiler$$1$$$$$f$$($fn$$10$$) { + return window.escodegen.generate($fn$$10$$, {$comment$:!0, $renumber$:!0, $hexadecimal$:!0, parse:$DEBUG$$ ? window.esprima.parse : function($c$$1$$) { + return{type:"Program", body:[{type:"ExpressionStatement", expression:{type:"Literal", value:$c$$1$$, raw:$c$$1$$}}]}; + }}); + }}; + return $Recompiler$$1$$; +}(); window.JSSMS = $JSSMS$$; })(global);