db48x / emularity

easily embed emulators
GNU General Public License v3.0
619 stars 108 forks source link

Arcade not work #54

Open jfranpino opened 5 years ago

jfranpino commented 5 years ago

I can not get the example_arcade to work. I have the file examples/targ.zip And I have the emulator emulators/jsmess/mameexidy.js

But it does not work, I leave my code:

 ```

var emulator = new Emulator (document.querySelector ("# canvas"), null, new JSMAMELoader (JSMAMELoader.driver ("targ"), JSMAMELoader.nativeResolution (256, 256), JSMAMELoader.emulatorJS ("emulators / jsmess / mameexidy.js"), JSMAMELoader.mountFile ("targ.zip", JSMAMELoader.fetchFile ("Game File", "examples / targ.zip")))) emulator.setScale (2); emulator.start ({waitAfterDownloading: true});

db48x commented 5 years ago

Do you get any error messages on the dev console?

db48x commented 5 years ago

Also, I notice that your code has "emulators / jsmess / mameexidy.js" instead of "emulators/jsmess/mameexidy.js". Those spaces would certainly cause it to fail to load the file (unless you really saved it to directories that have those spaces in their names), but it's also possible that github mangled your comment.

jfranpino commented 5 years ago

My error messages is "Failed to download game data!" The code no contained any spaces, is error the copy/paste in this edit text web

db48x commented 5 years ago

What about in the js console? Or are there any 404 errors in the networking tab of the dev tools? You can open the dev tools with the keyboard shortcut control-shift-i in any decent browser.

jfranpino commented 5 years ago

error 1 error 2

db48x commented 5 years ago

Reload the page while the devtools are recording the network activity, that way you can see which request failed.

jfranpino commented 5 years ago

image

ins429 commented 4 years ago

Possibly a CORS problem. I had to run a dev server, simply create-react-app and put everything I need in the public directory.