db48x / emularity

easily embed emulators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Atari 800 example

mrrcollins opened this issue · comments

I'm so close, but the keyboard is messed up (backspace enters several returns) and the sound isn't quite right. In the folder on my webserver I have the following files:

a800xl.cfg a800xl.zip browserfs.min.js es6-promise.js loader.js mameatari400.wasm
a800xl.json atari400.wasm browserfs.min.js.map index.html mameatari400.js

I grabbed them from various places. For some reason a800xl.cfg is empty though.

My index.html is:

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>example computer program</title>
  </head>
  <body>
      <h1>Hey There!</h1>
    <canvas id="canvas" style="width: 50%; height: 50%; display: block; margin: 0 auto;"/>
    <script type="text/javascript" src="es6-promise.js"></script>
    <script type="text/javascript" src="browserfs.min.js"></script>
    <script type="text/javascript" src="loader.js"></script>
    <script type="text/javascript">
      var emulator = new Emulator(document.querySelector("#canvas"),
                                  null,
                                  new JSMESSLoader(JSMESSLoader.driver("a800xl"),
                                                   JSMESSLoader.nativeResolution(672, 450),
                                                   JSMESSLoader.scale(2),
                                                   JSMESSLoader.emulatorJS("mameatari400.js"),
                                                   JSMESSLoader.mountFile("a800xl.zip",
                                                                          JSMESSLoader.fetchFile("Bios",
                                                                                                 "a800xl.zip"))))
      emulator.start({ waitAfterDownloading: true });
    </script>
  </body>
</html>

I don't know how to fix the keyboard, sound, or mount a floppy disk. Is there a list of functions for JSMESSLoader somewhere?

Also, I copy mameatari400.wasm to atari400.wasm because the console said the page was looking for the file.

Thanks!

I don't know how to fix the keyboard, sound, or mount a floppy disk. Is there a list of functions for JSMESSLoader somewhere?

All of these are things that the emulator has control over. You need to read the MAME documentation to learn how to configure it.