Closed TheUnityGuy closed 1 year ago
that is the emulatorjs.com use new cores,
if you want to run,
change emulator_4.99_19_Nenge.js
=> ${EmulatorCoresHost}/cores/${coreName}?v=${coreVersion}
=>set your localhost cores path
return T.FetchItem({
url: `${EmulatorCoresHost}/cores/${coreName}?v=${coreVersion}`,
store: 'data-system',
dataOption: {
version: coreVersion,
system:E['system']=='vbanext'?'gba':E['system'],
},
version:coreVersion,
unpack:true,
Filter(wasmU8){
/**
* 检查是否合法7z压缩包
*/
let mime = T.F.checkBuffer(wasmU8);
if (!mime || !['zip', '7z'].includes(mime)) {
wasmU8 = wasmU8['slice'](0xc);
wasmU8['set']([0x37, 0x7a, 0xbc, 0xaf, 0x27, 0x1c, 0x0, 0x3], 0x0);
}
return wasmU8;
},
go here https://github.com/nenge123/emulatorjs/tree/0.4.23/cores
download old cores.
if you down emulatorjs 0.4.101 [Latest](https://github.com/nenge123/emulatorjs/releases/latest)
_0x29f314
=>set to site path
T.FetchItem({
url: '' ['concat'](_0x29f314, '/cores/')['concat'](_0x3e120c, '?v=')['concat'](_0x2c8cd5),
key: _0x3e120c,
store: 'data-system',
dataOption: {
version: _0x2c8cd5,
system: E['system'] == 'vbanext' ? 'gba' : E['system'],
},
Alright, so if I'd like to embed your emulator on my own website, which version / files do you reccomend to use? The files specified to download in readme: common.min.js, extract7z.zip, libunrar.min.zip, zip.min.js, extractzip.min.js, emulator_4.99_19_Nenge.min.zip, /i18n/*.json, /frontend/buttons.zip+shader.zip, /bios/arcade.7z or something else?
As for now, I understand that I should be using cores from https://github.com/nenge123/emulatorjs/tree/0.4.23/cores and that's great, now which emulator version/files are going to work the best (I need PSX emulation the most if that's the case).
Also, thank you for your support ;)
if you down
emulatorjs 0.4.101 [Latest](https://github.com/nenge123/emulatorjs/releases/latest)
and... if I actually download emulatorjs 0.4.101, what should I change to make it usable for offline use without emulatorjs.com?
that question .... some old cores hava errro, like mgba(gba.zip),
Okay, let's say these old cores work just fine for my requirements (maybe use the compiled wasm cores from the webretro repository - I saw your pull on this repo). How can I use them with the latest emulatorjs 0.4.101? Is editing _0x29f314 to my host as you said before enough?
To be honest, it can be buggy and unstable. In my language there is a saying: "nikt nie będzie z tego strzelał" - "nobody's gonna shoot with it" 😅
if you down
emulatorjs 0.4.101 [Latest](https://github.com/nenge123/emulatorjs/releases/latest)
_0x29f314
=>set to site pathT.FetchItem({ url: '' ['concat'](_0x29f314, '/cores/')['concat'](_0x3e120c, '?v=')['concat'](_0x2c8cd5), key: _0x3e120c, store: 'data-system', dataOption: { version: _0x2c8cd5, system: E['system'] == 'vbanext' ? 'gba' : E['system'], },```
tried it, following errors in console:
.... I'm too long not update, pls wait my update or use this dafault (4.99_19)
if you use the newest cores in emulatorjs.com,some cores must need the network, the old cores not need network
like the psx.7z cores must visit (https://www.emulatorjs.com/api/v?name=psx) get hash key(headers data) to run start
Okay, thanks ;D Awesome work btw
fork 0.4.99_test
async Wasm_Download(coreName, coreVersion) {
console.log('读取/下载 wasm file 若需加载指定核心(旧版)修改这里', coreName);
let url = `//www.emulatorjs.com/cores/${coreName}?v=${coreVersion}`,
key = coreName;
if (E['offline']) {
coreName = coreName.replace(/\.data$/, '.7z');
url = E['RootPath'] + '/oldcores/' + coreName + '?v=' + coreVersion;
key = 'old-' + #coreName;
}
//www.emulatorjs.com/cores/${coreName}?v=${coreVersion}
change your old cores
https://github.com/nenge123/emulatorjs/tree/0.4.23/cores
//f12
Nenge.getStore('data-system').put('psx-wasm.data',{
contents:await Nenge.FetchItem({url:'https://emulatorjs.nenge.net/oldcores/psx-wasm.7z',unpack:!0}),
filesize:432498,
filetype: "application/octet-stream",
system: "psx",
timestamp:Nenge.date,
type:"datalist",
version:17})
if you can make wasm to C find out this md5 function, the new core can not need the emulatorjs.com key
Thu Aug 03 2023 21:37:55 GMT+0800 (中国标准时间) 'f1450e3bcca18531e6ae2a9ef9af9c74'
Thu Aug 03 2023 21:38:55 GMT+0800 (中国标准时间) 'a74ce6b6f6099abdf885288e8856ea9b'
Thu Aug 03 2023 21:39:55 GMT+0800 (中国标准时间) 'a74ce6b6f6099abdf885288e8856ea9b'
Thu Aug 03 2023 21:40:55 GMT+0800 (中国标准时间) '4a1da18315d277bdd77df3ada2c16af7'
Thu Aug 03 2023 21:41:55 GMT+0800 (中国标准时间) '8263626e26b00ea717262685036f4869'
Thu Aug 03 2023 21:42:55 GMT+0800 (中国标准时间) '8263626e26b00ea717262685036f4869'
Thu Aug 03 2023 21:43:55 GMT+0800 (中国标准时间) '8f1039df42d35c1e765a44aafd1324d0'
Thu Aug 03 2023 21:44:55 GMT+0800 (中国标准时间) '8f1039df42d35c1e765a44aafd1324d0'
Thu Aug 03 2023 21:45:55 GMT+0800 (中国标准时间) '65c7644b60be1bf773de8bb3bf30ea6c'
Thu Aug 03 2023 21:46:55 GMT+0800 (中国标准时间) '6a723ef36f2cbb77598b605943935816'
Thu Aug 03 2023 21:47:55 GMT+0800 (中国标准时间) '6a723ef36f2cbb77598b605943935816'
Thu Aug 03 2023 21:48:55 GMT+0800 (中国标准时间) 'a1859a6fedc722a77005e9064b93ed1d'
@TheUnityGuy the version 0.5.8 cores was decode download https://github.com/nenge123/emulatorjs/tree/0.5.8/ the newest cores!
Thanks!
if you want to run in 04.99_test
add <input>
under the <canvas>
//add before Module,callMain()
if(Module.specialHTMLTargets){
I[1].assign(Module.specialHTMLTargets,{
'#canvas':this.canvas,
'#canvas-input':T.$('#ejs-input'),
'#canvas-mouse':T.$('#game')
});
}
//before Module,callMain() set hash
//'961a64459508e2435a5ef45e1fc816d232d57c66d2f3ea56d2af90bef14773f0'
if (Module['_get_content_crc'] && ejs_loader['newCoreKey2']) ArgInfo[2] = ejs_loader['newCoreKey2'];
//change
if (Module['_get_content_crc']) ArgInfo[2] = '961a64459508e2435a5ef45e1fc816d232d57c66d2f3ea56d2af90bef14773f0';
//the hash from
if(this._get_content_crc){
T.$('iframe').src = 'https://www.emulatorjs.com/embed/load.html';
T.once(window,'message',e=>{
console.log(e.data);
hash = e.data.key;
//Module,callMain()
});
}
@TheUnityGuy perfect solution to hash value problems replace function make time lock,then hash key not need to change. https://github.com/nenge123/emulatorjs/blob/0.5.8/readme.md
While doing everything as written on readme, nothing happens on index.html, blank page appears and no errors in console either. My directory tree (I have also tried to put zh-hans in i18n folder, buttons.zip and shader.zip in frontend, etc - same result):
Could you help me?