mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 10:56:30 +00:00
Various bug fixes / add Arari 5200 / compile new cores to asmjs
This commit is contained in:
parent
04d0e94a3c
commit
99a5cf4a05
22 changed files with 317 additions and 143 deletions
|
@ -97,6 +97,7 @@ EJS_BETA = true;
|
|||
**[Lynx][Atari Lynx]** |
|
||||
**[7800][Atari 7800]** |
|
||||
**[2600][Atari 2600]**
|
||||
**[5200][Atari 5200]**
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
@ -157,6 +158,7 @@ EJS_BETA = true;
|
|||
[Atari Lynx]: docs/Systems/Atari%20Lynx.md
|
||||
[Atari 7800]: docs/Systems/Atari%207800.md
|
||||
[Atari 2600]: docs/Systems/Atari%202600.md
|
||||
[Atari 5200]: docs/Systems/Atari%205200.md
|
||||
|
||||
[NES / Famicom]: docs/Systems/NES-Famicom.md
|
||||
[SNES]: docs/Systems/SNES.md
|
||||
|
|
BIN
data/cores/a2500-asmjs.data
Normal file
BIN
data/cores/a2500-asmjs.data
Normal file
Binary file not shown.
BIN
data/cores/a2500-wasm.data
Normal file
BIN
data/cores/a2500-wasm.data
Normal file
Binary file not shown.
BIN
data/cores/gb-asmjs.data
Normal file
BIN
data/cores/gb-asmjs.data
Normal file
Binary file not shown.
Binary file not shown.
BIN
data/cores/gba-asmjs.data
Normal file
BIN
data/cores/gba-asmjs.data
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
data/cores/nds-asmjs.data
Normal file
BIN
data/cores/nds-asmjs.data
Normal file
Binary file not shown.
Binary file not shown.
BIN
data/cores/nes-asmjs.data
Normal file
BIN
data/cores/nes-asmjs.data
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
data/cores/vb-asmjs.data
Normal file
BIN
data/cores/vb-asmjs.data
Normal file
Binary file not shown.
Binary file not shown.
243
data/emu-main.js
243
data/emu-main.js
|
@ -1046,6 +1046,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
'lynx': ['lnx'],
|
||||
'jaguar': ['j64', 'jag', 'rom', 'abs', 'cof', 'bin', 'prg'],
|
||||
'a7800': ['a78', 'bin'],
|
||||
'a5200': ['a52', 'bin'],
|
||||
'a2600': ['a26', 'bin'],
|
||||
'ngp': ['ngp', 'ngc'],
|
||||
'n64': ['n64', 'v64', 'z64', 'bin', 'u1', 'ndd'],
|
||||
|
@ -1089,6 +1090,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
'msx': 'bluemsx',
|
||||
'atari2600': 'a2600',
|
||||
'atari7800': 'a7800',
|
||||
'atari5200': 'a5200',
|
||||
'lynx': 'lynx',
|
||||
'ws': 'ws',
|
||||
'arcade': 'arcade',
|
||||
|
@ -1927,15 +1929,28 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
'src': _0x18a437.createObjectURL(_0x17edbf)
|
||||
});
|
||||
document.body.appendChild(_0x2c1832), _0x2c1832.onload = function() {
|
||||
void 0x0 === window.addRunDependency && 'undefined' != typeof EmulatorJS && (_0x4d7024.Module = EmulatorJS(_0x18cb26), EmulatorJS = void 0x0), null !== _0x4d7024.memData && _0x29b999(_0x4d7024.memData), _0x4d7024.Module || (_0x4d7024.Module = window.Module), _0x4d7024.Module && _0x4d7024.Module.FS ? _0x4d7024.FS = _0x4d7024.Module.FS : _0x4d7024.FS = window.FS;
|
||||
void 0x0 === window.addRunDependency && 'undefined' != typeof EmulatorJS && (_0x4d7024.Module = EmulatorJS(_0x18cb26), EmulatorJS = void 0x0);
|
||||
null !== _0x4d7024.memData && (_0xc6823.coreVer !== 2) && _0x29b999(_0x4d7024.memData);
|
||||
_0x4d7024.Module || (_0x4d7024.Module = window.Module);
|
||||
_0x4d7024.Module && _0x4d7024.Module.FS ? _0x4d7024.FS = _0x4d7024.Module.FS : _0x4d7024.FS = window.FS;
|
||||
};
|
||||
} else _0x247459 = function(_0x3df03e) {
|
||||
for (var _0x17edbf = [], _0x2c1832 = 0x0; _0x2c1832 < _0x3df03e.length; _0x2c1832 += 0x1) {
|
||||
var _0xcf0289 = _0x3df03e[_0x2c1832];
|
||||
_0xcf0289 > 0xff && (_0xcf0289 &= 0xff), _0x17edbf.push(String.fromCharCode(_0xcf0289));
|
||||
}
|
||||
return _0x17edbf.join('');
|
||||
}(_0x247459), window.eval(_0x247459), void 0x0 === window.addRunDependency && 'undefined' != typeof EmulatorJS && (_0x4d7024.Module = EmulatorJS(_0x18cb26), EmulatorJS = void 0x0), null !== _0x4d7024.memData && _0x29b999(_0x4d7024.memData), _0x4d7024.Module || (_0x4d7024.Module = window.Module), _0x4d7024.Module && _0x4d7024.Module.FS ? _0x4d7024.FS = _0x4d7024.Module.FS : _0x4d7024.FS = window.FS, window.EJS_MODULE = _0x4d7024.Module, window.ejs_loader = _0x4d7024, window.ejs_media = _0xdcec2a;
|
||||
} else {
|
||||
_0x247459 = function(_0x3df03e) {
|
||||
for (var _0x17edbf = [], _0x2c1832 = 0x0; _0x2c1832 < _0x3df03e.length; _0x2c1832 += 0x1) {
|
||||
var _0xcf0289 = _0x3df03e[_0x2c1832];
|
||||
_0xcf0289 > 0xff && (_0xcf0289 &= 0xff), _0x17edbf.push(String.fromCharCode(_0xcf0289));
|
||||
}
|
||||
return _0x17edbf.join('');
|
||||
}(_0x247459);
|
||||
window.eval(_0x247459);
|
||||
void 0x0 === window.addRunDependency && 'undefined' != typeof EmulatorJS && (_0x4d7024.Module = EmulatorJS(_0x18cb26), EmulatorJS = void 0x0);
|
||||
null !== _0x4d7024.memData && (_0xc6823.coreVer !== 2) && _0x29b999(_0x4d7024.memData);
|
||||
_0x4d7024.Module || (_0x4d7024.Module = window.Module);
|
||||
_0x4d7024.Module && _0x4d7024.Module.FS ? _0x4d7024.FS = _0x4d7024.Module.FS : _0x4d7024.FS = window.FS;
|
||||
window.EJS_MODULE = _0x4d7024.Module;
|
||||
window.ejs_loader = _0x4d7024;
|
||||
window.ejs_media = _0xdcec2a;
|
||||
}
|
||||
_0x247459 = null;
|
||||
};
|
||||
_0x1093f4.call(_0xc6823, _0xc6823.elements.container, 'script-loaded', function(_0x467eee) {
|
||||
|
@ -1958,7 +1973,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
_this = this,
|
||||
_0x26d6a1 = function(_0x3787ba) {
|
||||
_0x132da7(_0x4d7024.loading.querySelector('.' .concat(_0x4fce24['start-game'])), true);
|
||||
var _0x3787ba = _0x4d7024.loading.querySelector('.' .concat(_0x4fce24.p1))
|
||||
var _0x3787ba = _0x4d7024.loading.querySelector('.' .concat(_0x4fce24.p1));
|
||||
_0x3787ba.innerHTML = _this.localization('Loading')+'...';
|
||||
if (true === _0x528f2b && true === _0x547484 && true === _0x5e24fa) {
|
||||
window.Module = {
|
||||
|
@ -1989,7 +2004,11 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
});
|
||||
return window.URL.createObjectURL(_0x2c1832);
|
||||
}
|
||||
return _0x3fe7ca.includes('.js.mem') && (Object.keys(_0x4d7024.coreFileData).includes(_0x3fe7ca) && (_0x3787ba = _0x4d7024.coreFileData[_0x3fe7ca]), _0x3787ba) ? (_0x4d7024.memData = null, _0x3787ba.buffer) : _0x3fe7ca;
|
||||
if (_0x3fe7ca.includes('.js.mem') && Object.keys(_0x4d7024.coreFileData).includes(_0x3fe7ca)) {
|
||||
_0x3787ba = _0x4d7024.coreFileData[_0x3fe7ca];
|
||||
return URL.createObjectURL(new Blob([_0x3787ba.buffer]));
|
||||
}
|
||||
return null;
|
||||
},
|
||||
'readAsync': function(_0x20d016, _0x9d2de4, _0x1425ee) {
|
||||
if (_0x20d016 instanceof ArrayBuffer) setTimeout(function() {
|
||||
|
@ -2035,31 +2054,37 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
_0x550f17.a.get(_0xa88a13, {}).then(function(_0x578a2b) {
|
||||
var _0x2458d5, _0x5d075f = _0x29078e[_this.system],
|
||||
_0x28ee7f = _0x578a2b.data[_this.system],
|
||||
_0x124167 = _0x28ee7f.version ? _0x28ee7f.version : 0x1,
|
||||
_0x124167 = _0x28ee7f.version ? _0x28ee7f.version : 1,
|
||||
_0x254bc2 = Boolean(_0x28ee7f.netplay),
|
||||
_0x5b1dcd = Boolean(_0x28ee7f.state),
|
||||
_0x9a1f1 = Boolean(_0x28ee7f.asmjs),
|
||||
_0x3e4345 = Boolean(_0x28ee7f.wasm);
|
||||
if (_0xc6823.coreVer !== 2 && _0x28ee7f.old) {
|
||||
var status = _0x4d7024.loading.querySelector('.' .concat(_0x4fce24.p1));
|
||||
if (!(_this.config.oldCores && _0x28ee7f.oldCores === 1) && _0x28ee7f.newCores === 1 && (_0x2d904a.wasm || _0x9a1f1)) {
|
||||
_this.coreVer = 2;
|
||||
_this.elements.settings.panels.home.querySelector('[role="menu"]').innerHTML = "";
|
||||
_0x7f9f36.setCoreOptionsMenu.call(_this);
|
||||
}
|
||||
if (_this.coreVer !== 2 && _0x28ee7f.old) {
|
||||
_0x9a1f1 = Boolean(_0x28ee7f.old.asmjs);
|
||||
_0x3e4345 = Boolean(_0x28ee7f.old.wasm);
|
||||
}
|
||||
if ('nds' == _this.system && ! _0x2d904a.wasm) {
|
||||
_0x5b1dcd = !0x1;
|
||||
if ('nds' == _this.system && !_0x2d904a.wasm) {
|
||||
_0x5b1dcd = false;
|
||||
};
|
||||
//alert(_0x5b1dcd) // is save/load state supported
|
||||
if (_0xc6823.statesSupported === false) {
|
||||
if (_this.statesSupported === false) {
|
||||
_0x5b1dcd = false;
|
||||
};
|
||||
_0x4d7024.coreFileVersion = _0x124167;
|
||||
_0x4d7024.coreFileName = _0x5d075f;
|
||||
var _0x2eb141 = !0x1;
|
||||
var _0x2eb141 = false;
|
||||
['webgl2', 'experimental-webgl2'].includes(_0x2d904a.webgl.WEBGL_CONTEXT) && (_0x2eb141 = true);
|
||||
'undefined' != typeof EJS_N64_LEGACY && 0x1 == EJS_N64_LEGACY && (_0x2eb141 = !0x1);
|
||||
if ('mame' == _this.system) {
|
||||
var data = _this.mameCore;
|
||||
if (! data || data === null || data.split('|').length !== 2) {
|
||||
_0x3787ba.innerHTML = '<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+_this.localization('Missing mame config')+'</strong>';
|
||||
status.innerHTML = '<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+_this.localization('Missing mame config')+'</strong>';
|
||||
return;
|
||||
}
|
||||
var _0x3787ba = data.split('|');
|
||||
|
@ -2074,7 +2099,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
} else {
|
||||
_0x2458d5 = _this.system.concat('-old-').concat(_0x3787ba[0], '-wasm.data');
|
||||
}
|
||||
_0x3787ba[0x0] ? (_0x2d904a.wasm && _0x3e4345 ? (_0x31a5b3 = true) : (_0x3787ba.innerHTML = '<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+_this.localization('Webassembly support is not detected in this browser')+'</strong>', _0x2458d5 = ''), _0x2458d5 && (_0x24de8d.db ? _0x24de8d.get(_0x2458d5, function(_0x655c87) {
|
||||
_0x3787ba[0x0] ? (_0x2d904a.wasm && _0x3e4345 ? (_0x31a5b3 = true) : (status.innerHTML = '<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+_this.localization('Webassembly support is not detected in this browser')+'</strong>', _0x2458d5 = ''), _0x2458d5 && (_0x24de8d.db ? _0x24de8d.get(_0x2458d5, function(_0x655c87) {
|
||||
if (_0x655c87 && _0x655c87.version === _0x124167) {
|
||||
if (_0xc6823.coreVer === 2) {
|
||||
_0x4f0fcc(_0x655c87.data);
|
||||
|
@ -2084,7 +2109,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
_0x4f0fcc(_0x3787ba);
|
||||
}
|
||||
} else _0x3641d6(_0x2458d5, _0x124167);
|
||||
}) : _0x3641d6(_0x2458d5, _0x124167))) : _0x3787ba.innerHTML = '<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+_this.localization('Unsupported Game')+'</strong>';
|
||||
}) : _0x3641d6(_0x2458d5, _0x124167))) : status.innerHTML = '<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+_this.localization('Unsupported Game')+'</strong>';
|
||||
} else {
|
||||
_0x2458d5 = false;
|
||||
var type;
|
||||
|
@ -2104,7 +2129,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
}
|
||||
'undefined' != typeof EJS_CUSTOM_COREFILE && (_0x2458d5 = EJS_CUSTOM_COREFILE);
|
||||
if (_0x2458d5 !== true) {
|
||||
_0x3787ba.innerHTML = '<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+_this.localization('Please upgrade your browser to the latest version')+'</strong>';
|
||||
status.innerHTML = '<strong style="color:#f00;text-shadow: 0px 0px 3px;">'+_this.localization('Please upgrade your browser to the latest version')+'</strong>';
|
||||
return;
|
||||
}
|
||||
if (_this.coreVer === 2) {
|
||||
|
@ -2135,7 +2160,11 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
};
|
||||
_0x455c85(_0x4d7024.loading.querySelector('.' .concat(_0x4fce24['start-game'])), 'click touchstart', _0x26d6a1);
|
||||
if (_0xc6823.startOnLoad === true) {
|
||||
_0x4d7024.loading.querySelector('.' .concat(_0x4fce24['start-game'])).click();
|
||||
if (true === _0x528f2b && true === _0x547484 && true === _0x5e24fa) {
|
||||
_0x4d7024.loading.querySelector('.' .concat(_0x4fce24['start-game'])).click();
|
||||
} else {
|
||||
console.warn('Start on load attempted, but user has not yet interacted with the document');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2545,29 +2574,31 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
'saveLoadDB': function(type) {
|
||||
try {
|
||||
if (_0x2593da && typeof _0x2593da.getCoreOptionsValues == 'function') {
|
||||
if ((!this.gameName && this.config.gameUrl.startsWith('blob:')) || !window.indexedDB) {
|
||||
return false;
|
||||
}
|
||||
var location = _0x2593da.getCoreOptionsValues()['save-state-location'];
|
||||
if (!location || location === 'download') {
|
||||
return false;
|
||||
}
|
||||
var slot = _0x2593da.getCoreOptionsValues()['save-state-slot'];
|
||||
var game = this.config.gameUrl.split('/').pop();
|
||||
if (this.gameName) {
|
||||
game = this.gameName;
|
||||
};
|
||||
if ((!this.gameName && this.config.gameUrl.startsWith('blob:')) || !window.indexedDB) {
|
||||
return false;
|
||||
}
|
||||
var key = game + '-' + slot;
|
||||
if (!location || location === 'download') {
|
||||
return false;
|
||||
}
|
||||
if (type === 'save') {
|
||||
try {
|
||||
var data = _0x378b5c.saveState();
|
||||
_0x378b5c.saveLoaddbDB.put(key, data);
|
||||
} catch(e) {return false;};
|
||||
} else {
|
||||
_0x378b5c.saveLoaddbDB.get(key).then(function(data) {
|
||||
EJS_loadState(data);
|
||||
});
|
||||
}
|
||||
(async function() {
|
||||
if (type === 'save') {
|
||||
try {
|
||||
var data = await _0x378b5c.saveState();
|
||||
_0x378b5c.saveLoaddbDB.put(key, data);
|
||||
} catch(e) {return false;};
|
||||
} else {
|
||||
_0x378b5c.saveLoaddbDB.get(key).then(function(data) {
|
||||
EJS_loadState(data);
|
||||
});
|
||||
}
|
||||
})();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -4058,27 +4089,6 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
}), _0xa88a13.elements.buttons.cheat && _0x1093f4.call(_0xa88a13, _0xa88a13.elements.buttons.cheat, 'click', function(_0x44b01a) {
|
||||
_0x132da7(_0xa88a13.elements.dialogs.cheat, !0x1);
|
||||
});
|
||||
_0x1093f4.call(_0xa88a13, _0xa88a13.elements.container, 'savestate', function(_0x25b541) {
|
||||
if (_0x378b5c.saveLoadDB.call(_0xa88a13, 'save')) {
|
||||
return
|
||||
}
|
||||
var _0x2c1832 = _0x25b541.detail.state;
|
||||
if (_0x1e2c68.function(_0xa88a13.config.onsavestate)) _0xa88a13.config.onsavestate.call(null, {
|
||||
'screenshot': _0x25b541.detail.screenshot,
|
||||
'state': _0x2c1832
|
||||
});
|
||||
else {
|
||||
var _0x2b5fc8 = new Blob([_0x2c1832]),
|
||||
_0x152605 = _0xa88a13.startName.split('/').pop().split('.'),
|
||||
_0x51d471 = _0x152605.slice(0x0, _0x152605.length - 0x1).join('.')
|
||||
if (typeof _0xa88a13.gameName == 'string') {
|
||||
var _0x51d471 = _0xa88a13.gameName
|
||||
}
|
||||
var _0x49f6b6 = _0x51d471 ? '' .concat(_0x51d471, '.state') : 'game.state';
|
||||
_0x4e4ca6()(_0x2b5fc8, _0x49f6b6);
|
||||
}
|
||||
_0xa88a13.elements.container.focus();
|
||||
});
|
||||
_0xa88a13.game.stateloadField = _0x428003('input'), _0xa88a13.game.stateloadField.type = 'file', _0xa88a13.game.stateloadField.onchange = function _0x17edbf(_0xcd4599) {
|
||||
var _0xfd246e, _0x3fdd71 = _0xcd4599.target.files;
|
||||
_0x3fdd71.length > 0x0 && ((_0xfd246e = new FileReader()).file_name = _0x3fdd71[0x0].name, _0xfd246e.onload = function() {
|
||||
|
@ -4087,7 +4097,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
}, _0xfd246e.readAsArrayBuffer(_0x3fdd71[0x0])), _0xa88a13.game.stateloadField = _0x428003('input'), _0xa88a13.game.stateloadField.type = 'file', _0xa88a13.game.stateloadField.onchange = _0x17edbf;
|
||||
}, _0x1093f4.call(_0xa88a13, _0xa88a13.elements.container, 'loadstate', function(_0x13504c) {
|
||||
if (_0x378b5c.saveLoadDB.call(_0xa88a13, 'load')) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
_0x1e2c68.function(_0xa88a13.config.onloadstate) ? _0xa88a13.config.onloadstate.call(null, _0xa88a13.loadState) : _0xa88a13.game.stateloadField.click(), _0xa88a13.elements.container.focus();
|
||||
}), document.addEventListener('visibilitychange', function() {
|
||||
|
@ -4164,10 +4174,38 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
_0x378b5c.toggleShader = function(_0x433182) {
|
||||
return _0x762355(_0x433182);
|
||||
}
|
||||
_0x378b5c.getStateInfo = _0x27f4c4.Module.cwrap('get_state_info', 'string', []);
|
||||
_0x378b5c.saveState = function() {
|
||||
var _0xa88a14, _0x17edbf = _0x378b5c.getStateInfo().split('|'),
|
||||
_0x2c1832 = _0x17edbf[0x0] >> 0x0;
|
||||
if (_0xa88a13.coreVer !== 2) {
|
||||
_0x378b5c.getStateInfo = _0x27f4c4.Module.cwrap('get_state_info', 'string', []);
|
||||
} else {
|
||||
_0x378b5c.getInfoOfState = _0x27f4c4.Module.cwrap('get_state_info', 'string', []);
|
||||
_0x378b5c.getStateInfo1 = _0x27f4c4.Module.cwrap('save_state_info', 'null', []);
|
||||
_0x378b5c.getStateInfo = function() {
|
||||
_0x378b5c.getStateInfo1();
|
||||
return new Promise(function(resolve, reject) {
|
||||
var a = _0x378b5c.getInfoOfState();
|
||||
if (a) {
|
||||
resolve(a);
|
||||
return;
|
||||
}
|
||||
var b = setInterval(function() {
|
||||
a = _0x378b5c.getInfoOfState();
|
||||
if (a) {
|
||||
clearInterval(b);
|
||||
resolve(a);
|
||||
}
|
||||
}, 50)
|
||||
});
|
||||
}
|
||||
}
|
||||
_0x378b5c.saveState = async function() {
|
||||
var _0xa88a14;
|
||||
var _0x17edbf;
|
||||
if (_0xa88a13.coreVer !== 2) {
|
||||
_0x17edbf = _0x378b5c.getStateInfo().split('|');
|
||||
} else {
|
||||
_0x17edbf = (await _0x378b5c.getStateInfo()).split('|');
|
||||
}
|
||||
var _0x2c1832 = _0x17edbf[0x0] >> 0x0;
|
||||
if (_0x2c1832 > 0x0) {
|
||||
_0xa88a14 = new Uint8Array(_0x2c1832);
|
||||
for (var _0x2ef6be = _0x17edbf[0x1] >> 0x0, _0x3cc34b = 0x0; _0x3cc34b < _0x2c1832; _0x3cc34b++) _0xa88a14[_0x3cc34b] = _0x27f4c4.Module.getValue(_0x2ef6be + _0x3cc34b);
|
||||
|
@ -4212,7 +4250,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
};
|
||||
_0x27f4c4.Module._set_cheat && (_0x378b5c.setCheat = _0x27f4c4.Module.cwrap('set_cheat', 'number', ['number', 'number', 'string']));
|
||||
_0x27f4c4.Module._reset_cheat && (_0x378b5c.resetCheat = _0x27f4c4.Module._reset_cheat);
|
||||
_0x378b5c.quickSaveState = function() {
|
||||
_0x378b5c.quickSaveState = async function() {
|
||||
if (_0xa88a13.started && !_0x378b5c.connected) {
|
||||
if (_0xa88a13.statesSupported === false) {
|
||||
_0xa88a13.elements.widgets.stateInfoDiv.innerHTML = 'CANNOT CURRENTLY SAVE STATE';
|
||||
|
@ -4235,7 +4273,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
_0x27f4c4.FS.unlink(name);
|
||||
} catch (_0x4b4d4c) {}
|
||||
try {
|
||||
var _0x17edbf = _0x378b5c.saveState();
|
||||
var _0x17edbf = await _0x378b5c.saveState();
|
||||
_0x27f4c4._FS.createDataFile('/', name, _0x17edbf, true, true);
|
||||
_0xa88a13.elements.widgets.stateInfoDiv.innerHTML = 'STATE SAVED TO SLOT ' + slot;
|
||||
clearTimeout(_0x378b5c.saveMsgTransitions);
|
||||
|
@ -4243,6 +4281,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
_0xa88a13.elements.widgets.stateInfoDiv.innerHTML = '';
|
||||
}, 1500)
|
||||
} catch(e) {
|
||||
console.warn(e);
|
||||
_0xa88a13.elements.widgets.stateInfoDiv.innerHTML = 'FAILED TO SAVE STATE TO SLOT ' + slot;
|
||||
clearTimeout(_0x378b5c.saveMsgTransitions);
|
||||
_0x378b5c.saveMsgTransitions = setTimeout(function() {
|
||||
|
@ -4920,7 +4959,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
_0xa88a13 = {};
|
||||
break;
|
||||
default:
|
||||
_0xa88a13 = {}, console.warn('Unsupported emulator');
|
||||
_0xa88a13 = {};
|
||||
}
|
||||
if (this.coreVer === 2) {
|
||||
_0xa88a13 = {};
|
||||
|
@ -5705,22 +5744,22 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
_0x17f3cb = _0x428003('div', {
|
||||
'role': 'menu'
|
||||
});
|
||||
_0x174c46.appendChild(_0x17f3cb)
|
||||
_0x3f3385.appendChild(_0x174c46)
|
||||
this.elements.settings.panels.home = _0x174c46
|
||||
_0x262fb8.appendChild(_0x3f3385)
|
||||
_0x2746ab.appendChild(_0x262fb8)
|
||||
_0x17edbf.appendChild(_0x2746ab)
|
||||
this.elements.settings.popup = _0x262fb8
|
||||
this.elements.settings.menu = _0x2746ab
|
||||
_0x174c46.appendChild(_0x17f3cb);
|
||||
_0x3f3385.appendChild(_0x174c46);
|
||||
this.elements.settings.panels.home = _0x174c46;
|
||||
_0x262fb8.appendChild(_0x3f3385);
|
||||
_0x2746ab.appendChild(_0x262fb8);
|
||||
_0x17edbf.appendChild(_0x2746ab);
|
||||
this.elements.settings.popup = _0x262fb8;
|
||||
this.elements.settings.menu = _0x2746ab;
|
||||
_0x17edbf.appendChild(_0x7f9f36.createButton.call(this, 'fullscreen'))
|
||||
var _0x19edbf = this;
|
||||
_0x17edbf.addEventListener('mousedown', function() {
|
||||
_0x19edbf.onButtonDiv = true;
|
||||
})
|
||||
this.elements.controls = _0x17edbf
|
||||
_0x7f9f36.setNormalOptionsMenu.call(this)
|
||||
_0x7f9f36.setCoreOptionsMenu.call(this)
|
||||
this.elements.controls = _0x17edbf;
|
||||
_0x7f9f36.setNormalOptionsMenu.call(this);
|
||||
_0x7f9f36.setCoreOptionsMenu.call(this);
|
||||
return _0x17edbf;
|
||||
},
|
||||
'inject': function() {
|
||||
|
@ -6109,13 +6148,38 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
}, 'fullscreen'), this.bind(_0x2c1832.buttons.gamepad, 'click', function() {
|
||||
_0x5ab74d.toggleControls.call(_0x17edbf, !0x1), _0x132da7(_0x2c1832.dialogs.gamepad, !0x1);
|
||||
}, 'mute'), this.bind(_0x2c1832.buttons.saveState, 'click', function() {
|
||||
_0xbae705.call(_0x17edbf, _0x17edbf.elements.container, 'savestate-start', !0x1, {});
|
||||
var _0x31e271 = _0xdcec2a.saveState(),
|
||||
_0x2c1832 = _0xdcec2a.getScreenData();
|
||||
_0xbae705.call(_0x17edbf, _0x17edbf.elements.container, 'savestate', !0x1, {
|
||||
'state': _0x31e271,
|
||||
'screenshot': _0x2c1832
|
||||
});
|
||||
(async function() {
|
||||
_0xbae705.call(_0x17edbf, _0x17edbf.elements.container, 'savestate-start', false, {});
|
||||
var _0x31e271 = await _0xdcec2a.saveState(),
|
||||
_0x2c1832 = _0xdcec2a.getScreenData();
|
||||
|
||||
if (_0x378b5c.saveLoadDB.call(_0x17edbf, 'save')) {
|
||||
console.log('a');
|
||||
return;
|
||||
}
|
||||
var _0x2c1832 = _0x31e271;
|
||||
if (_0x1e2c68.function(_0x17edbf.config.onsavestate)) _0x17edbf.config.onsavestate.call(null, {
|
||||
'screenshot': _0x2c1832,
|
||||
'state': _0x2c1832
|
||||
});
|
||||
else {
|
||||
var _0x2b5fc8 = new Blob([_0x2c1832]),
|
||||
_0x152605 = _0x17edbf.startName.split('/').pop().split('.'),
|
||||
_0x51d471 = _0x152605.slice(0x0, _0x152605.length - 0x1).join('.');
|
||||
if (typeof _0x17edbf.gameName == 'string') {
|
||||
var _0x51d471 = _0x17edbf.gameName
|
||||
}
|
||||
var _0x49f6b6 = _0x51d471 ? '' .concat(_0x51d471, '.state') : 'game.state';
|
||||
var a = document.createElement('a');
|
||||
a.download = _0x49f6b6;
|
||||
a.href = URL.createObjectURL(_0x2b5fc8);
|
||||
a.click();
|
||||
setTimeout(function() {
|
||||
URL.revokeObjectURL(a.href);
|
||||
}, 2000);
|
||||
}
|
||||
_0x17edbf.elements.container.focus();
|
||||
})();
|
||||
}, 'mute'), this.bind(_0x2c1832.buttons.loadState, 'click', function() {
|
||||
_0xbae705.call(_0x17edbf, _0x17edbf.elements.container, 'loadstate', !0x1, {});
|
||||
}, 'mute'), this.bind(_0x2c1832.buttons.settings, 'click', function(_0x1396ee) {
|
||||
|
@ -6264,16 +6328,7 @@ window.EJS_main = function(_0xa88a13, _0x17edbf, _0x2c1832) {
|
|||
this.game = this.game;
|
||||
this.game.innerHTML = '';
|
||||
this.config = _0x5dc0c0({}, _0x39ca5e, _0x6954aa.defaults, _0x2ba0e6 || {});
|
||||
this.coreVer = function(core, oldCores) {
|
||||
/*if (['dos'].includes(core)) {
|
||||
return 2;
|
||||
}*/
|
||||
if (oldCores !== true && window.WebAssembly) {
|
||||
var supportedCores = ['nes', 'snes', 'gb', 'gba', 'nds', 'n64', 'vb'];
|
||||
return supportedCores.includes(core) ? 2 : 1;
|
||||
}
|
||||
return 1;
|
||||
}(this.config.system, this.config.oldCores); // 2 = beta cores, 1 = old cores
|
||||
this.coreVer = 1;
|
||||
this.lightgun = this.config.lightgun;
|
||||
this.loadStateOnStart = this.config.loadStateOnStart || false;
|
||||
this.adUrl = this.config.adUrl || null;
|
||||
|
|
|
@ -6911,4 +6911,4 @@ var EJS = function(_0x574f5e) {
|
|||
}, _0x17a9ac.prototype.setJitter = function(_0x2d4fd2) {
|
||||
this.jitter = _0x2d4fd2;
|
||||
};
|
||||
}, null, window.EJS_main]).default;
|
||||
}, null, window.EJS_main]).default;
|
||||
|
|
2
data/emulator.min.js
vendored
2
data/emulator.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
(async function() {
|
||||
var VERSION = 2.0;
|
||||
var VERSION = 2.1;
|
||||
if ((window.location && ['localhost', '127.0.0.1'].includes(location.hostname)) ||
|
||||
'undefined' != typeof EJS_DEBUG_XX && true === EJS_DEBUG_XX) {
|
||||
fetch('https://raw.githack.com/ethanaobrien/emulatorjs/main/data/version.json').then(response => {
|
||||
|
|
172
data/v.json
172
data/v.json
|
@ -1,73 +1,95 @@
|
|||
{
|
||||
"nes": {
|
||||
"version":"19",
|
||||
"version":"20",
|
||||
"netplay": 1,
|
||||
"old": {"wasm":1, "asmjs":1 },
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 1,
|
||||
"oldCores": 1
|
||||
},
|
||||
"snes": {
|
||||
"version":"16",
|
||||
"version":"17",
|
||||
"netplay": 1,
|
||||
"old": {"wasm":1, "asmjs":1 },
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"asmjs": 0,
|
||||
"wasm": 1,
|
||||
"newCores": 1,
|
||||
"oldCores": 1
|
||||
},
|
||||
"snes2010": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"snes2005": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"snes2002": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"arcade": {
|
||||
"version":"14",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"fba0.2.97.29": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"pce": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"pceCD": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"ngp": {
|
||||
"version":"2",
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"ws": {
|
||||
"version":"1",
|
||||
|
@ -81,178 +103,238 @@
|
|||
"netplay": 0,
|
||||
"state": 0,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"bluemsx": {
|
||||
"version":"1",
|
||||
"netplay": 0,
|
||||
"state": 0,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"vb": {
|
||||
"version":"2",
|
||||
"version":"3",
|
||||
"netplay": 0,
|
||||
"old": {"wasm":1, "asmjs":1 },
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 1,
|
||||
"oldCores": 1
|
||||
},
|
||||
|
||||
"atari2600": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"atari5200": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1,
|
||||
"newCores": 1,
|
||||
"oldCores": 0
|
||||
},
|
||||
"a7800": {
|
||||
"version":"4",
|
||||
"netplay": 0,
|
||||
"state": 0,
|
||||
"asmjs": 1,
|
||||
"wasm": 0
|
||||
"wasm": 0,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"atari7800": {
|
||||
"version":"4",
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 0
|
||||
"wasm": 0,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"lynx": {
|
||||
"version":"1",
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"jaguar": {
|
||||
"version":"1",
|
||||
"netplay": 0,
|
||||
"state": 0,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"gb": {
|
||||
"version":"7",
|
||||
"version":"8",
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"old": {"wasm":0, "asmjs":1 },
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 1,
|
||||
"oldCores": 1
|
||||
},
|
||||
"gbc": {
|
||||
"version":"4",
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 0
|
||||
"wasm": 0,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"gba": {
|
||||
"version":"5",
|
||||
"version":"6",
|
||||
"netplay": 0,
|
||||
"old": {"wasm":0, "asmjs":1 },
|
||||
"state": 1,
|
||||
"asmjs": 0,
|
||||
"wasm": 1
|
||||
"asmjs": 1,
|
||||
"wasm": 1,
|
||||
"newCores": 1,
|
||||
"oldCores": 1
|
||||
},
|
||||
"segaGG": {
|
||||
"version":"9",
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"segaMD": {
|
||||
"version":"9",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"segaMS": {
|
||||
"version":"9",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"segaCD": {
|
||||
"version":"9",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 0
|
||||
"wasm": 0,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"segaSaturn": {
|
||||
"version":"3",
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 0
|
||||
"wasm": 0,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"psx": {
|
||||
"version":"10",
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"asmjs": 0,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"n64": {
|
||||
"version":"8",
|
||||
"version":"9",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 0,
|
||||
"old": {"wasm":0, "asmjs":1 },
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 1,
|
||||
"oldCores": 1
|
||||
},
|
||||
"nds": {
|
||||
"version":"11",
|
||||
"version":"12",
|
||||
"old": {"wasm":1, "asmjs":1 },
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 1,
|
||||
"oldCores": 1
|
||||
},
|
||||
"3do": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 0
|
||||
"wasm": 0,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"sega32x": {
|
||||
"version":"2",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"mame2003": {
|
||||
"version":"1",
|
||||
"netplay": 1,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 0
|
||||
"wasm": 0,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"mame": {
|
||||
"version":"4",
|
||||
"netplay": 0,
|
||||
"state": 0,
|
||||
"asmjs": 0,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"vbanext": {
|
||||
"version":"1",
|
||||
"netplay": 0,
|
||||
"state": 1,
|
||||
"asmjs": 1,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 0,
|
||||
"oldCores": 1
|
||||
},
|
||||
"dos": {
|
||||
"version":"1",
|
||||
"netplay": 0,
|
||||
"state": 0,
|
||||
"asmjs": 0,
|
||||
"wasm": 1
|
||||
"wasm": 1,
|
||||
"newCores": 1,
|
||||
"oldCores": 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{ "current_version": 2.0 }
|
||||
{ "current_version": 2.1 }
|
||||
|
|
35
docs/Systems/Atari 5200.md
Normal file
35
docs/Systems/Atari 5200.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Atari 5200
|
||||
|
||||
I do not know the file extension limits for this system. <br>
|
||||
There is no bios for this system.
|
||||
|
||||
## Code example
|
||||
|
||||
```html
|
||||
<div style='width:640px;height:480px;max-width:100%'>
|
||||
<div id='game'></div>
|
||||
</div>
|
||||
|
||||
<script type='text/javascript'>
|
||||
|
||||
EJS_player = '#game';
|
||||
EJS_core = 'atari5200';
|
||||
|
||||
// URL to Game rom
|
||||
|
||||
EJS_gameUrl = '';
|
||||
|
||||
/*
|
||||
* Path to the WASM / JS files
|
||||
* HAS TO BE in the same directory.
|
||||
*/
|
||||
|
||||
EJS_pathtodata = 'data/';
|
||||
|
||||
</script>
|
||||
|
||||
<script src='data/loader.js'></script>
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue