Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Error #709

Closed
DP5PNG opened this issue Oct 17, 2023 · 2 comments
Closed

Network Error #709

DP5PNG opened this issue Oct 17, 2023 · 2 comments

Comments

@DP5PNG
Copy link

DP5PNG commented Oct 17, 2023

Ok, I'll preface this by saying I'm stupid, so if this is super obvious sorry in advance.
So basically, I'm using replit to get the emulator working, but whenever I hit play on the actual website (not the webview, because that never works) it hits me with a network error, any ideas? Here's the code I have:

<div style='width:fill;height:fill;max-width:100%'>
  <div id='game'></div>
</div>

<script type='text/javascript'>
  EJS_player = '#game';

  EJS_DEBUG_XX = true;
  // Can also be pcsx_rearmed or mednafen_psx_hw
  EJS_core = 'psx';

  // URL to BIOS file
  EJS_biosUrl = '';

  // URL to Game rom
  EJS_gameUrl = 'x5.bin';

  // Path to the data directory
  EJS_pathtodata = 'https://cdn.jsdelivr.net/gh/ethanaobrien/emulatorjs@main/data/';
</script>
<script src='https://cdn.jsdelivr.net/gh/ethanaobrien/emulatorjs@main/data/loader.js'></script>
@ethanaobrien
Copy link
Member

2 things.

  1. See the faq, Replit is known to have problems
  2. https://cdn.jsdelivr.net/gh/ethanaobrien/emulatorjs@main/data/ is a very outdated url. It should be https://cdn.jsdelivr.net/gh/EmulatorJS/EmulatorJS@main/data/

@HunterBoy344
Copy link

Try editing EmulatorJS's index.html to load a ROM with a fetch request rather than from the file input. This is how I made it automatically load a file named "data.z64," and yes, it works on Replit:

(starting after the script tag)
            window.onload = async () => {
                const response = await fetch("data.z64")
                const url = await response.blob()
                const parts = ["data", "z64"]
(continue with "const core..." like original version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants